|
@@ -38,6 +38,17 @@ void drawWorld(float world[HEIGHT][WIDTH][BLOC_TOTAL], SDL_Surface* tileSet[], S
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void printWorld(float world[HEIGHT][WIDTH][BLOC_TOTAL]) {
|
|
|
+ for (int k(0); k < BLOC_TOTAL; k++) {
|
|
|
+ std::cout << k << ":" << std::endl;
|
|
|
+ for (int j(0); j < HEIGHT; j++) {
|
|
|
+ for (int i(0); i < WIDTH; i++)
|
|
|
+ std::cout << world[j][i][k];
|
|
|
+ std::cout << std::endl;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
int main()
|
|
|
{
|
|
|
/// [1] Start
|
|
@@ -162,6 +173,8 @@ int main()
|
|
|
|
|
|
SDL_FreeSurface(screen);
|
|
|
|
|
|
+ printWorld(world);
|
|
|
+
|
|
|
std::cout << "No error caught." << std::endl;
|
|
|
return 0;
|
|
|
}
|