converter now takes the Level to convert as input
This commit is contained in:
parent
9b5426a6af
commit
7bf1d8eed4
BIN
Levels/ObjectSetups/Lvl1.png
Normal file
BIN
Levels/ObjectSetups/Lvl1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 B |
@ -4,15 +4,9 @@
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
//global variable level:
|
||||
unsigned int level;
|
||||
|
||||
int main( int argc, char *argv[] ){
|
||||
//TODO: always update this:
|
||||
unsigned int numLevels=1;
|
||||
unsigned int level=atoi(argv[1]);
|
||||
Converter conv;
|
||||
//iterate over all Levels
|
||||
for (level=1; level<=numLevels; level++){
|
||||
bool idFound[256][256];
|
||||
for (int i=0; i<256; i++){
|
||||
for (int j=0; j<256; j++){
|
||||
@ -23,8 +17,7 @@ int main( int argc, char *argv[] ){
|
||||
char levelChar[2];
|
||||
sprintf (levelChar,"%i", level);
|
||||
std::string levelString = levelChar;
|
||||
std::string filePath = "../Levels/setupLvl" + levelString + ".png";
|
||||
//printf("%s", filePath);
|
||||
std::string filePath = "../Levels/ObjectSetups/Lvl" + levelString + ".png";
|
||||
std::vector<unsigned char> image; //the raw pixels
|
||||
unsigned int width, height;
|
||||
unsigned error = lodepng::decode(image, width, height, filePath);
|
||||
@ -64,6 +57,5 @@ int main( int argc, char *argv[] ){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user