This commit is contained in:
MihailRis
2024-08-18 17:29:02 +03:00
parent 2a506e9891
commit 810519fb4d
3 changed files with 27 additions and 2 deletions
+6
View File
@@ -8,6 +8,7 @@ struct voxel;
class Content;
struct GeneratorDef;
/// @brief High-level world generation controller
class WorldGenerator {
const GeneratorDef& def;
const Content* content;
@@ -18,6 +19,11 @@ public:
);
virtual ~WorldGenerator() = default;
/// @brief Generate complete chunk voxels
/// @param voxels destinatiopn chunk voxels buffer
/// @param x chunk position X divided by CHUNK_W
/// @param z chunk position Y divided by CHUNK_D
/// @param seed world seed
virtual void generate(voxel* voxels, int x, int z, uint64_t seed);
inline static std::string DEFAULT = "core:default";