summaryrefslogtreecommitdiffstats
path: root/game/shared/world/dimension.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 18:18:08 +0500
committeruntodesu <kirill@untode.su>2025-09-11 18:18:08 +0500
commit68694a9c9d7d27d3b79c7b96bb67f56db2f75c45 (patch)
treefa306d55b8333ffdb184befd41386830af2c3945 /game/shared/world/dimension.hh
parent12947aafcc6a6eb362cc454e2149796ec9265743 (diff)
downloadvoxelius-68694a9c9d7d27d3b79c7b96bb67f56db2f75c45.tar.bz2
voxelius-68694a9c9d7d27d3b79c7b96bb67f56db2f75c45.zip
Metadata voxels!
Diffstat (limited to 'game/shared/world/dimension.hh')
-rw-r--r--game/shared/world/dimension.hh11
1 files changed, 6 insertions, 5 deletions
diff --git a/game/shared/world/dimension.hh b/game/shared/world/dimension.hh
index bf9bfe1..58e0765 100644
--- a/game/shared/world/dimension.hh
+++ b/game/shared/world/dimension.hh
@@ -11,6 +11,7 @@ class ConfigMap;
namespace world
{
class Chunk;
+class Voxel;
class VoxelStorage;
} // namespace world
@@ -40,11 +41,11 @@ public:
void remove_chunk(Chunk* chunk);
public:
- voxel_id get_voxel(const voxel_pos& vpos) const;
- voxel_id get_voxel(const chunk_pos& cpos, const local_pos& lpos) const;
+ const Voxel* get_voxel(const voxel_pos& vpos) const;
+ const Voxel* get_voxel(const chunk_pos& cpos, const local_pos& lpos) const;
- bool set_voxel(voxel_id voxel, const voxel_pos& vpos);
- bool set_voxel(voxel_id voxel, const chunk_pos& cpos, const local_pos& lpos);
+ bool set_voxel(const Voxel* voxel, const voxel_pos& vpos);
+ bool set_voxel(const Voxel* voxel, const chunk_pos& cpos, const local_pos& lpos);
public:
virtual void init(io::ConfigMap& config);
@@ -92,9 +93,9 @@ struct ChunkUpdateEvent final {
struct VoxelSetEvent final {
Dimension* dimension;
+ const Voxel* voxel;
chunk_pos cpos;
local_pos lpos;
- voxel_id voxel;
Chunk* chunk;
};
} // namespace world