summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-07 16:45:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-07 16:45:28 +0200
commit15e8cebc19bfb484ba46a3589378d52ca769769e (patch)
treecd4174c7d15671434773acdc957a6bf894d6b29d /main
parent7b7e0ba851189848ff1c89761a1609e6a978fb19 (diff)
a
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 };