diff options
| author | untodesu <kirill@untode.su> | 2025-07-01 03:08:39 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-07-01 03:08:39 +0500 |
| commit | 458e0005690ea9d579588a0a12368fc2c2c9a93a (patch) | |
| tree | 588a9ca6cb3c76d9193b5bd4601d64f0e50e8c8c /src/game/server/overworld.hh | |
| parent | c7b0c8e0286a1b2bb7ec55e579137dfc3b22eeb9 (diff) | |
| download | voxelius-458e0005690ea9d579588a0a12368fc2c2c9a93a.tar.bz2 voxelius-458e0005690ea9d579588a0a12368fc2c2c9a93a.zip | |
I hyper-focued on refactoring again
- I put a cool-sounding "we are number one" remix on repeat and straight
up grinded the entire repository to a better state until 03:09 AM. I
guess I have something wrong in my brain that makes me do this shit
Diffstat (limited to 'src/game/server/overworld.hh')
| -rw-r--r-- | src/game/server/overworld.hh | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/game/server/overworld.hh b/src/game/server/overworld.hh deleted file mode 100644 index fa3eb42..0000000 --- a/src/game/server/overworld.hh +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef SERVER_OVERWORLD_HH -#define SERVER_OVERWORLD_HH 1 -#pragma once - -#include "core/config.hh" - -#include "shared/const.hh" -#include "shared/dimension.hh" -#include "shared/feature.hh" - -constexpr static unsigned int OW_NUM_TREES = 4U; - -struct Overworld_Metadata final { - dimension_entropy_map entropy; - dimension_height_map heightmap; - std::vector<local_pos> trees; -}; - -class Overworld final : public Dimension { -public: - explicit Overworld(const char* name); - virtual ~Overworld(void) = default; - -public: - virtual void init(Config& config) override; - virtual void init_late(std::uint64_t global_seed) override; - virtual bool generate(const chunk_pos& cpos, VoxelStorage& voxels) override; - -private: - bool is_inside_cave(const voxel_pos& vpos); - bool is_inside_terrain(const voxel_pos& vpos); - -private: - const Overworld_Metadata& get_or_create_metadata(const chunk_pos_xz& cpos); - -private: - void generate_terrain(const chunk_pos& cpos, VoxelStorage& voxels); - void generate_surface(const chunk_pos& cpos, VoxelStorage& voxels); - void generate_caves(const chunk_pos& cpos, VoxelStorage& voxels); - void generate_features(const chunk_pos& cpos, VoxelStorage& voxels); - -private: - ConfigInt m_terrain_variation; - ConfigInt m_bottommost_chunk; - -private: - emhash8::HashMap<chunk_pos_xz, Overworld_Metadata> m_metamap; - -private: - fnl_state m_fnl_variation; - fnl_state m_fnl_terrain; - fnl_state m_fnl_caves_a; - fnl_state m_fnl_caves_b; - fnl_state m_fnl_nvdi; - -private: - Feature m_feat_tree[OW_NUM_TREES]; - -private: - std::mutex m_mutex; -}; - -#endif // SERVER_OVERWORLD_HH |
