summaryrefslogtreecommitdiffhomepage
path: root/main
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-05-26 11:51:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-05-26 11:51:38 +0200
commit7d421d0069dbc8bcf948a29d39c3f8e65de19b33 (patch)
tree35c04379407563c8d9fbb03f0116e9d1732028ba /main
parenta768733aec06a395ad409e5ed8c49dee69414d64 (diff)
draw, editor, main: add toggling vobj display
Diffstat (limited to 'main')
-rw-r--r--main/draw.cpp2
-rw-r--r--main/main-impl.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index a8bac01c..322f4f66 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -171,7 +171,7 @@ void main_impl::draw_world() noexcept
auto& c = *c_;
const with_shifted_camera_offset o{_shader, pos, {minx, miny}, {maxx, maxy}};
if (check_chunk_visible(_shader.camera_offset(), sz))
- _anim_mesh.draw(_shader, sz, c, _clickable_scenery);
+ _anim_mesh.draw(_shader, sz, c, _clickable_scenery, _do_render_vobjs);
}
_shader.set_tint({1, 1, 1, 1});
diff --git a/main/main-impl.cpp b/main/main-impl.cpp
index f6a3dff0..c774e589 100644
--- a/main/main-impl.cpp
+++ b/main/main-impl.cpp
@@ -46,6 +46,9 @@ Vector2i floormat_main::window_size() const noexcept
return _framebuffer_size;
}
+void floormat_main::set_render_vobjs(bool value) { _do_render_vobjs = value; }
+bool floormat_main::is_rendering_vobjs() const { return _do_render_vobjs; }
+
void main_impl::set_cursor(uint32_t cursor) noexcept
{
if (cursor != _mouse_cursor || _mouse_cursor == (uint32_t)-1)