diff options
| author | untodesu <kirill@untode.su> | 2025-09-12 16:16:06 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-12 16:16:06 +0500 |
| commit | fc80fa024fc93dac6ea89461ef36f455c5e468a2 (patch) | |
| tree | 7c4ea8f03b6778572d59784dc28b600e3f8f2268 /game/shared/world/dimension.hh | |
| parent | 12947aafcc6a6eb362cc454e2149796ec9265743 (diff) | |
| parent | 522a7514012da86f7b9643179f0763746f3b232e (diff) | |
| download | voxelius-fc80fa024fc93dac6ea89461ef36f455c5e468a2.tar.bz2 voxelius-fc80fa024fc93dac6ea89461ef36f455c5e468a2.zip | |
Merge pull request #15 from untodesu/metavoxels
Metavoxels
Diffstat (limited to 'game/shared/world/dimension.hh')
| -rw-r--r-- | game/shared/world/dimension.hh | 11 |
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
|
