summaryrefslogtreecommitdiffstats
path: root/src/game/shared/world/dimension.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
committeruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
commit6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch)
treef085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/shared/world/dimension.hh
parentf40d09cb8f712e87691af4912f3630d92d692779 (diff)
downloadvoxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2
voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/shared/world/dimension.hh')
-rw-r--r--src/game/shared/world/dimension.hh20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/game/shared/world/dimension.hh b/src/game/shared/world/dimension.hh
index 6549bf6..b57640a 100644
--- a/src/game/shared/world/dimension.hh
+++ b/src/game/shared/world/dimension.hh
@@ -3,26 +3,15 @@
#include "shared/const.hh"
#include "shared/types.hh"
-namespace io
-{
class ConfigMap;
-} // namespace io
-namespace world
-{
class Chunk;
class Voxel;
class VoxelStorage;
-} // namespace world
-namespace world
-{
using dimension_entropy_map = std::array<std::uint64_t, CHUNK_AREA>;
using dimension_height_map = std::array<voxel_pos::value_type, CHUNK_AREA>;
-} // namespace world
-namespace world
-{
class Dimension {
public:
explicit Dimension(std::string_view name, float gravity);
@@ -48,7 +37,7 @@ public:
bool set_voxel(const Voxel* voxel, const chunk_pos& cpos, const local_pos& lpos);
public:
- virtual void init(io::ConfigMap& config);
+ virtual void init(ConfigMap& config);
virtual void init_late(std::uint64_t global_seed);
virtual bool generate(const chunk_pos& cpos, VoxelStorage& voxels);
@@ -61,18 +50,12 @@ private:
emhash8::HashMap<chunk_pos, Chunk*> m_chunkmap;
float m_gravity;
};
-} // namespace world
-namespace world
-{
struct ChunkComponent final {
chunk_pos cpos;
Chunk* chunk;
};
-} // namespace world
-namespace world
-{
struct ChunkCreateEvent final {
Dimension* dimension;
chunk_pos cpos;
@@ -98,4 +81,3 @@ struct VoxelSetEvent final {
local_pos lpos;
Chunk* chunk;
};
-} // namespace world