From 88c01588aa0830e219eaa62588839e4d1e2883ce Mon Sep 17 00:00:00 2001 From: untodesu Date: Wed, 25 Jun 2025 00:44:36 +0500 Subject: Clang-format the entire source code --- game/shared/dimension.hh | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'game/shared/dimension.hh') 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; 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 m_chunkmap; + emhash8::HashMap 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 */ -- cgit