diff options
| author | untodesu <kirill@untode.su> | 2025-06-25 00:44:36 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-06-25 00:44:36 +0500 |
| commit | 88c01588aa0830e219eaa62588839e4d1e2883ce (patch) | |
| tree | 602bb27dd3399aab4aae8c19630e3b7a8dac824b /game/shared/dimension.hh | |
| parent | 99cf6cca8dbbc1e563c10cf0167432d3d8af9783 (diff) | |
| download | voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.tar.bz2 voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.zip | |
Clang-format the entire source code
Diffstat (limited to 'game/shared/dimension.hh')
| -rw-r--r-- | game/shared/dimension.hh | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/game/shared/dimension.hh b/game/shared/dimension.hh index 8806115..c609a14 100644 --- a/game/shared/dimension.hh +++ b/game/shared/dimension.hh @@ -14,32 +14,32 @@ using dimension_height_map = std::array<voxel_pos::value_type, CHUNK_AREA>; class Dimension { public: - explicit Dimension(const char *name, float gravity); + explicit Dimension(const char* name, float gravity); virtual ~Dimension(void); - const char *get_name(void) const; + const char* get_name(void) const; float get_gravity(void) const; public: - Chunk *create_chunk(const chunk_pos &cpos); - Chunk *find_chunk(entt::entity entity) const; - Chunk *find_chunk(const chunk_pos &cpos) const; + Chunk* create_chunk(const chunk_pos& cpos); + Chunk* find_chunk(entt::entity entity) const; + Chunk* find_chunk(const chunk_pos& cpos) const; void remove_chunk(entt::entity entity); - void remove_chunk(const chunk_pos &cpos); - void remove_chunk(Chunk *chunk); + void remove_chunk(const chunk_pos& cpos); + 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; + voxel_id get_voxel(const voxel_pos& vpos) const; + voxel_id 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(voxel_id voxel, const voxel_pos& vpos); + bool set_voxel(voxel_id voxel, const chunk_pos& cpos, const local_pos& lpos); public: - virtual void init(Config &config); + virtual void init(Config& config); virtual void init_late(std::uint64_t global_seed); - virtual bool generate(const chunk_pos &cpos, VoxelStorage &voxels); + virtual bool generate(const chunk_pos& cpos, VoxelStorage& voxels); public: entt::registry chunks; @@ -47,39 +47,39 @@ public: private: std::string m_name; - emhash8::HashMap<chunk_pos, Chunk *> m_chunkmap; + emhash8::HashMap<chunk_pos, Chunk*> m_chunkmap; float m_gravity; }; struct ChunkComponent final { chunk_pos cpos; - Chunk *chunk; + Chunk* chunk; }; struct ChunkCreateEvent final { - Dimension *dimension; + Dimension* dimension; chunk_pos cpos; - Chunk *chunk; + Chunk* chunk; }; struct ChunkDestroyEvent final { - Dimension *dimension; + Dimension* dimension; chunk_pos cpos; - Chunk *chunk; + Chunk* chunk; }; struct ChunkUpdateEvent final { - Dimension *dimension; + Dimension* dimension; chunk_pos cpos; - Chunk *chunk; + Chunk* chunk; }; struct VoxelSetEvent final { - Dimension *dimension; + Dimension* dimension; chunk_pos cpos; local_pos lpos; voxel_id voxel; - Chunk *chunk; + Chunk* chunk; }; #endif /* SHARED_DIMENSION_HH */ |
