From 68694a9c9d7d27d3b79c7b96bb67f56db2f75c45 Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 18:18:08 +0500 Subject: Metadata voxels! --- game/shared/world/chunk.hh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'game/shared/world/chunk.hh') diff --git a/game/shared/world/chunk.hh b/game/shared/world/chunk.hh index c5bba12..4a1e557 100644 --- a/game/shared/world/chunk.hh +++ b/game/shared/world/chunk.hh @@ -9,6 +9,7 @@ constexpr static unsigned int BIOME_VOID = 0U; namespace world { class Dimension; +class Voxel; } // namespace world namespace world @@ -18,11 +19,11 @@ public: explicit Chunk(entt::entity entity, Dimension* dimension); virtual ~Chunk(void) = default; - voxel_id get_voxel(const local_pos& lpos) const; - voxel_id get_voxel(const std::size_t index) const; + const Voxel* get_voxel(const local_pos& lpos) const; + const Voxel* get_voxel(const std::size_t index) const; - void set_voxel(voxel_id voxel, const local_pos& lpos); - void set_voxel(voxel_id voxel, const std::size_t index); + void set_voxel(const Voxel* voxel, const local_pos& lpos); + void set_voxel(const Voxel* voxel, const std::size_t index); const VoxelStorage& get_voxels(void) const; void set_voxels(const VoxelStorage& voxels); -- cgit