From a8fa9fe920d4ed48ed1b88a6e585cdbff648039e Mon Sep 17 00:00:00 2001 From: untodesu Date: Sun, 16 Mar 2025 20:18:16 +0500 Subject: 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 --- game/shared/feature.hh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 game/shared/feature.hh (limited to 'game/shared/feature.hh') 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> { +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 */ -- cgit