summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 4476e1ef..a579f1eb 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -85,10 +85,10 @@ chunk app::make_test_chunk()
{
constexpr auto N = TILE_MAX_DIM;
chunk c;
- c.foreach_tile([&, this](tile& x, std::size_t k, local_coords pt) {
- const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? floor2 : floor1;
- x.ground_image = { atlas, (std::uint8_t)(k % atlas->num_tiles().product()) };
- });
+ for (auto [x, k, pt] : c) {
+ const auto& atlas = pt.x > N/2 && pt.y >= N/2 ? floor2 : floor1;
+ x.ground_image = { atlas, (std::uint8_t)(k % atlas->num_tiles().product()) };
+ }
constexpr auto K = N/2;
c[{K, K }].wall_north = { wall1, 0 };
c[{K, K }].wall_west = { wall2, 0 };