diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-05-26 11:51:38 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-05-26 11:51:38 +0200 |
commit | 7d421d0069dbc8bcf948a29d39c3f8e65de19b33 (patch) | |
tree | 35c04379407563c8d9fbb03f0116e9d1732028ba /src | |
parent | a768733aec06a395ad409e5ed8c49dee69414d64 (diff) |
draw, editor, main: add toggling vobj display
Diffstat (limited to 'src')
-rw-r--r-- | src/entity.hpp | 2 | ||||
-rw-r--r-- | src/light.cpp | 1 | ||||
-rw-r--r-- | src/light.hpp | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/entity.hpp b/src/entity.hpp index b49999e7..21628a19 100644 --- a/src/entity.hpp +++ b/src/entity.hpp @@ -73,7 +73,7 @@ struct entity entity_type type_of() const noexcept; static Pair<global_coords, Vector2b> normalize_coords(global_coords coord, Vector2b cur_offset, Vector2i delta); - bool is_dynamic() const; + virtual bool is_dynamic() const; bool can_rotate(rotation new_r); bool can_move_to(Vector2i delta); size_t move_to(size_t& i, Vector2i delta, rotation new_r); diff --git a/src/light.cpp b/src/light.cpp index 551e931d..ed7c4ae1 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -40,6 +40,7 @@ Vector2 light::ordinal_offset(Vector2b) const entity_type light::type() const noexcept { return entity_type::light; } bool light::update(size_t, float) { return false; } +bool light::is_dynamic() const { return true; } bool light::is_virtual() const { return true; } float light::calc_intensity(float half_dist, light_falloff falloff) diff --git a/src/light.hpp b/src/light.hpp index 73d28272..15dbc7c6 100644 --- a/src/light.hpp +++ b/src/light.hpp @@ -34,6 +34,7 @@ struct light final : entity float depth_offset() const override; entity_type type() const noexcept override; bool update(size_t i, float dt) override; + bool is_dynamic() const override; bool is_virtual() const override; static float calc_intensity(float half_dist, light_falloff falloff); |