More world generators support

This commit is contained in:
Onran
2024-02-21 11:54:10 +09:00
committed by GitHub
parent 399bd9c362
commit 9cc2f93cfd
9 changed files with 209 additions and 30 deletions
+3 -2
View File
@@ -10,6 +10,7 @@
#include "../voxels/Chunks.h"
#include "../voxels/ChunksStorage.h"
#include "../voxels/WorldGenerator.h"
#include "../world/WorldTypes.h"
#include "../graphics/Mesh.h"
#include "../lighting/Lighting.h"
#include "../files/WorldFiles.h"
@@ -26,7 +27,7 @@ ChunksController::ChunksController(Level* level, uint padding)
chunks(level->chunks),
lighting(level->lighting),
padding(padding),
generator(new WorldGenerator(level->content)) {
generator(WorldTypes::createWorldGenerator(level->getWorld()->getType(), level->content)) {
}
ChunksController::~ChunksController(){
@@ -130,4 +131,4 @@ void ChunksController::createChunk(int x, int z) {
}
chunk->setLoaded(true);
chunk->setReady(true);
}
}