Browse Source

Decrease level of road

And swap bottom and top lines in code, to make them appear in natural
order.
DricomDragon 4 years ago
parent
commit
f26c266836
1 changed files with 8 additions and 7 deletions
  1. 8 7
      main.cpp

+ 8 - 7
main.cpp

@@ -51,16 +51,17 @@ void clearWorld(float world[HEIGHT][WIDTH][BLOC_TOTAL]) {
 			for (int bloc(0); bloc < BLOC_TOTAL; bloc++)
 				world[j][i][bloc] = 0.0f;
 
-	// Bottom water line
-	const float waterLevel = 1.0f;
-	putHorizonLine(HEIGHT - 1, WATER, world, waterLevel);
-
-	// Pseudo road
-	putHorizonLine(HEIGHT / 2, PLAIN, world);
-
 	// Top mountain line
 	const float mountainLevel = 1.0f;
 	putHorizonLine(0, MOUNTAIN, world, mountainLevel);
+
+	// Pseudo road
+	const float roadLevel = 0.1f;
+	putHorizonLine(HEIGHT / 2, PLAIN, world, roadLevel);
+
+	// Bottom water line
+	const float waterLevel = 1.0f;
+	putHorizonLine(HEIGHT - 1, WATER, world, waterLevel);
 }
 
 void drawWorld(float world[HEIGHT][WIDTH][BLOC_TOTAL], SDL_Surface* tileSet[], SDL_Surface* out) {