diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/clickable.hpp | 3 | ||||
-rw-r--r-- | main/draw.cpp | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/main/clickable.hpp b/main/clickable.hpp index 0b491a52..7a192fb3 100644 --- a/main/clickable.hpp +++ b/main/clickable.hpp @@ -2,6 +2,7 @@ #include "src/global-coords.hpp" #include <memory> #include <Corrade/Containers/BitArrayView.h> +#include <Magnum/Math/Vector2.h> #include <Magnum/Math/Range.h> namespace floormat { @@ -13,7 +14,7 @@ struct clickable final { Math::Range2D<int> dest; BitArrayView bitmask; entity* e; - float depth; + float depth, slope; uint32_t stride; bool mirrored; }; diff --git a/main/draw.cpp b/main/draw.cpp index cf8ab20a..37b88e7c 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -134,11 +134,7 @@ void main_impl::draw_world() noexcept continue; const with_shifted_camera_offset o{_shader, pos, {minx, miny}, {maxx, maxy}}; if (check_chunk_visible(_shader.camera_offset(), sz)) - { - _anim_mesh.draw(_shader, c); - for (const auto& e : c.entities()) - _anim_mesh.add_clickable(_shader, window_size(), e, _clickable_scenery); - } + _anim_mesh.draw(_shader, sz, c, _clickable_scenery); } GL::Renderer::setDepthMask(true); |