diff options
| author | untodesu <kirill@untode.su> | 2025-03-16 20:18:16 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-03-16 20:18:16 +0500 |
| commit | a8fa9fe920d4ed48ed1b88a6e585cdbff648039e (patch) | |
| tree | 63520fe106ff2e445fa93d2992d14d4f7e60b8e5 /game/shared/feature.hh | |
| parent | 933ed978a21d5ffefc376d66f0dc9f5354292ca7 (diff) | |
| download | voxelius-a8fa9fe920d4ed48ed1b88a6e585cdbff648039e.tar.bz2 voxelius-a8fa9fe920d4ed48ed1b88a6e585cdbff648039e.zip | |
Improved terrain generation - features! [1/2]
- @reglnk asked me to commit this early to experiment with this
weird-ass heightmap bug that messes with tree placement
Diffstat (limited to 'game/shared/feature.hh')
| -rw-r--r-- | game/shared/feature.hh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/game/shared/feature.hh b/game/shared/feature.hh new file mode 100644 index 0000000..eb7cf2a --- /dev/null +++ b/game/shared/feature.hh @@ -0,0 +1,18 @@ +#ifndef SHARED_FEATURE_HH +#define SHARED_FEATURE_HH 1 +#pragma once + +#include "shared/types.hh" + +class Dimension; +class VoxelStorage; + +class Feature final : public std::vector<std::pair<voxel_pos, voxel_id>> { +public: + explicit Feature(void) = default; + virtual ~Feature(void) = default; + void place(const voxel_pos &vpos, Dimension *dimension, bool overwrite = false) const; + void place(const voxel_pos &vpos, const chunk_pos &cpos, VoxelStorage &voxels, bool overwrite = false) const; +}; + +#endif /* SHARED_FEATURE_HH */ |
