add biomes table

This commit is contained in:
MihailRis
2024-08-19 17:57:09 +03:00
parent c3831afd19
commit 4bd5f1b629
4 changed files with 49 additions and 28 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ public:
virtual std::shared_ptr<Heightmap> generateHeightmap(
const glm::ivec2& offset, const glm::ivec2& size, uint64_t seed) = 0;
virtual const Biome& getBiome() const = 0;
virtual const std::vector<Biome>& getBiomes() const = 0;
/// @return Number of biome parameters, that biome choosing depending on
virtual uint getBiomeParameters() const = 0;
+2 -1
View File
@@ -56,7 +56,8 @@ void WorldGenerator::generate(
{chunkX * CHUNK_W, chunkZ * CHUNK_D}, {CHUNK_W, CHUNK_D}, seed
);
auto values = heightmap->getValues();
const auto& biome = def.script->getBiome();
const auto& biomes = def.script->getBiomes();
const auto& biome = biomes.at(0);
const auto& groundLayers = biome.groundLayers;
const auto& seaLayers = biome.seaLayers;