summaryrefslogtreecommitdiffhomepage
path: root/main/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-14 07:33:47 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-14 07:33:47 +0100
commitdc5e66b5a29fd7de8ddf59852ceefd982289b7c3 (patch)
tree18bf0a274f1595d6d2d6cfb32a3b3825d843e315 /main/draw.cpp
parent29bdd5f2170b9d46a8b3b0973c4c0845d6a2b61e (diff)
a
Diffstat (limited to 'main/draw.cpp')
-rw-r--r--main/draw.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index 57623eef..84d90f65 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -136,12 +136,8 @@ void main_impl::draw_world() noexcept
if (check_chunk_visible(_shader.camera_offset(), sz))
{
_anim_mesh.draw(_shader, c);
- for (auto i = 0_uz; i < TILE_COUNT; i++)
- {
- const local_coords xy{i};
- if (auto [atlas, s] = c[xy].scenery(); atlas)
- _anim_mesh.add_clickable(_shader, window_size(), pos, std::uint8_t(i), atlas, s, _clickable_scenery);
- }
+ for (const auto& e : c.entities())
+ _anim_mesh.add_clickable(_shader, window_size(), e, _clickable_scenery);
}
}