add automatic biome-based structures placement

This commit is contained in:
MihailRis
2024-09-24 17:08:25 +03:00
parent 323c2f2935
commit 806ed4b155
8 changed files with 174 additions and 106 deletions
+5 -2
View File
@@ -47,8 +47,6 @@ class WorldGenerator {
/// @brief Chunk prototypes loading surround map
SurroundMap surroundMap;
std::vector<std::array<std::shared_ptr<VoxelFragment>, 4>> structures;
/// @brief Generate chunk prototype (see ChunkPrototype)
/// @param x chunk position X divided by CHUNK_W
/// @param z chunk position Y divided by CHUNK_D
@@ -61,6 +59,11 @@ class WorldGenerator {
void generateBiomes(ChunkPrototype& prototype, int x, int z);
void generateHeightmap(ChunkPrototype& prototype, int x, int z);
void placeStructure(
const glm::ivec3 offset, size_t structure, uint8_t rotation,
int chunkX, int chunkZ
);
public:
WorldGenerator(
const GeneratorDef& def,