diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-29 19:35:25 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-29 19:35:25 +0100 |
commit | ca6ff463979d5c250ab04e940bead875f11e7352 (patch) | |
tree | 479b06c90e1af3652c30e5554c3cada57ac81975 /src | |
parent | cd1e7b6564e8508f84e84706557b89eb5471a978 (diff) |
scenery wip
Diffstat (limited to 'src')
-rw-r--r-- | src/chunk.cpp | 2 | ||||
-rw-r--r-- | src/chunk.hpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp index 6a325125..55afe1b9 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -147,11 +147,13 @@ chunk& chunk::operator=(chunk&&) noexcept = default; void chunk::mark_ground_modified() noexcept { _ground_modified = true; } void chunk::mark_walls_modified() noexcept { _walls_modified = true; } +void chunk::mark_scenery_modified() noexcept { _scenery_modified = true; } void chunk::mark_modified() noexcept { mark_ground_modified(); mark_walls_modified(); + mark_scenery_modified(); } } // namespace floormat diff --git a/src/chunk.hpp b/src/chunk.hpp index 16533e5a..9acd5f12 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -41,6 +41,7 @@ struct chunk final void mark_ground_modified() noexcept; void mark_walls_modified() noexcept; + void mark_scenery_modified() noexcept; void mark_modified() noexcept; struct ground_mesh_tuple final { @@ -69,9 +70,10 @@ private: std::array<scenery, TILE_COUNT> _scenery_variants = {}; std::bitset<TILE_COUNT*2> _passability = {}; GL::Mesh ground_mesh{NoCreate}, wall_mesh{NoCreate}; - mutable bool _maybe_empty : 1 = true, - _ground_modified : 1 = true, - _walls_modified : 1 = true; + mutable bool _maybe_empty : 1 = true, + _ground_modified : 1 = true, + _walls_modified : 1 = true, + _scenery_modified : 1 = true; }; } // namespace floormat |