summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--main.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/main.cpp b/main.cpp
index 0f573dc5..066f33d9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -55,15 +55,10 @@ struct app final : Platform::Application
chunk make_test_chunk();
tile_shader _shader;
- tile_atlas_ floor1 =
- //loader.tile_atlas("../share/game/images/tiles.tga", {8,4});
- //loader.tile_atlas("../share/game/images/tiles2.tga", {8,5});
- //loader.tile_atlas("../share/game/images/floor1.tga", {4, 4});
- loader.tile_atlas("../share/game/images/metal1.tga", {2, 2});
- tile_atlas_ floor2 =
- loader.tile_atlas("../share/game/images/floor1.tga", {4, 4});
- tile_atlas_ wall1 =
- loader.tile_atlas("../share/game/images/metal2.tga", {2, 2});
+ tile_atlas_ floor1 = loader.tile_atlas("../share/game/images/metal1.tga", {2, 2});
+ tile_atlas_ floor2 = loader.tile_atlas("../share/game/images/floor1.tga", {4, 4});
+ tile_atlas_ wall1 = loader.tile_atlas("../share/game/images/metal2.tga", {2, 2});
+ tile_atlas_ wall2 = loader.tile_atlas("../share/game/images/wood1.tga", {2, 2});
chunk _chunk = make_test_chunk();
floor_mesh _floor_mesh;
wall_mesh _wall_mesh;
@@ -83,11 +78,11 @@ chunk app::make_test_chunk()
const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? floor2 : floor1;
x.ground_image = { atlas, (std::uint8_t)(k % atlas->size()) };
});
- constexpr auto C = N/2;
- c[{C, C}].wall_north = { wall1, 0 };
- c[{C, C}].wall_west = { floor1, 0 };
- c[{C, C+1}].wall_north = { wall1, 0 };
- c[{C+1, C}].wall_west = { floor1, 0 };
+ constexpr auto K = N/2;
+ c[{K, K }].wall_north = { wall1, 0 };
+ c[{K, K }].wall_west = { wall2, 0 };
+ c[{K, K+1}].wall_north = { wall1, 0 };
+ c[{K+1, K }].wall_west = { wall2, 0 };
return c;
}