summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-02 05:31:06 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-02 05:31:06 +0200
commitab16b95656fbcf719604072263f8375cd80213c2 (patch)
tree41b52d7a95126e85c8f44adc6d7138a319746cb8 /main
parent93880a5b068239768ba8b6e562a21e3d9103c124 (diff)
a
Diffstat (limited to 'main')
-rw-r--r--main/clickable.hpp3
-rw-r--r--main/draw.cpp6
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);