diff options
Diffstat (limited to 'src/chunk.hpp')
| -rw-r--r-- | src/chunk.hpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/chunk.hpp b/src/chunk.hpp index 1b702d81..c0cb436d 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -44,30 +44,30 @@ struct chunk final void mark_modified() noexcept; struct ground_mesh_tuple final { - GL::Mesh& mesh; - const std::array<std::uint8_t, TILE_COUNT>& ids; + GL::Mesh& mesh; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + const std::array<std::uint8_t, TILE_COUNT>& ids; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) }; struct wall_mesh_tuple final { - GL::Mesh& mesh; - const std::array<std::uint8_t, TILE_COUNT>& n; - const std::array<std::uint8_t, TILE_COUNT>& w; + GL::Mesh& mesh; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + const std::array<std::uint16_t, TILE_COUNT*2>& ids; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) }; ground_mesh_tuple ensure_ground_mesh() noexcept; tile_atlas* ground_atlas_at(std::size_t i) const noexcept; wall_mesh_tuple ensure_wall_mesh() noexcept; - tile_atlas* wall_n_atlas_at(std::size_t i) const noexcept; - tile_atlas* wall_w_atlas_at(std::size_t i) const noexcept; + tile_atlas* wall_atlas_at(std::size_t i) const noexcept; private: - std::array<std::shared_ptr<tile_atlas>, TILE_COUNT> _ground_atlases, _wall_north_atlases, _wall_west_atlases; + std::array<std::shared_ptr<tile_atlas>, TILE_COUNT> _ground_atlases; + std::array<std::uint8_t, TILE_COUNT> ground_indexes = {}; + std::array<variant_t, TILE_COUNT> _ground_variants = {}; + std::array<std::shared_ptr<tile_atlas>, TILE_COUNT*2> _wall_atlases; + std::array<std::uint16_t, TILE_COUNT*2> wall_indexes = {}; + std::array<variant_t, TILE_COUNT*2> _wall_variants; std::array<std::shared_ptr<anim_atlas>, TILE_COUNT> _scenery_atlases; std::array<scenery, TILE_COUNT> _scenery_variants = {}; - std::array<variant_t, TILE_COUNT> _ground_variants = {}, _wall_north_variants = {}, _wall_west_variants = {}; std::bitset<TILE_COUNT*2> _passability = {}; - std::array<std::uint8_t, TILE_COUNT> ground_indexes = {}; - std::array<std::uint8_t, TILE_COUNT> wall_n_indexes = {}, wall_w_indexes = {}; GL::Mesh ground_mesh{NoCreate}, wall_mesh{NoCreate}; mutable std::uint8_t _maybe_empty : 1 = true, _ground_modified : 1 = true, |
