From ca6ff463979d5c250ab04e940bead875f11e7352 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 29 Nov 2022 19:35:25 +0100 Subject: scenery wip --- src/chunk.cpp | 2 ++ src/chunk.hpp | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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_variants = {}; std::bitset _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 -- cgit v1.2.3