Generator test mode setting
This commit is contained in:
+4
-1
@@ -20,7 +20,10 @@ Level::Level(World* world, Player* player, ChunksStorage* chunksStorage, LevelEv
|
||||
|
||||
uint matrixSize = (settings.chunks.loadDistance+
|
||||
settings.chunks.padding) * 2;
|
||||
chunks = new Chunks(matrixSize, matrixSize, 0, 0, world->wfile, events);
|
||||
chunks = new Chunks(matrixSize, matrixSize,
|
||||
0, 0,
|
||||
world->wfile,
|
||||
events);
|
||||
lighting = new Lighting(chunks);
|
||||
chunksController = new ChunksController(this, chunks, lighting, settings.chunks.padding);
|
||||
playerController = new PlayerController(this, settings);
|
||||
|
||||
+3
-3
@@ -14,15 +14,15 @@
|
||||
|
||||
using std::shared_ptr;
|
||||
|
||||
World::World(std::string name, std::string directory, int seed) : name(name), seed(seed) {
|
||||
wfile = new WorldFiles(directory, REGION_VOL * (CHUNK_DATA_LEN * 2 + 8));
|
||||
World::World(std::string name, std::string directory, int seed, EngineSettings& settings) : name(name), seed(seed) {
|
||||
wfile = new WorldFiles(directory, REGION_VOL * (CHUNK_DATA_LEN * 2 + 8), settings.debug.generatorTestMode);
|
||||
}
|
||||
|
||||
World::~World(){
|
||||
delete wfile;
|
||||
}
|
||||
|
||||
void World::write(Level* level) {
|
||||
void World::write(Level* level, bool writeChunks) {
|
||||
Chunks* chunks = level->chunks;
|
||||
|
||||
for (size_t i = 0; i < chunks->volume; i++) {
|
||||
|
||||
+2
-2
@@ -16,10 +16,10 @@ public:
|
||||
WorldFiles* wfile;
|
||||
int seed;
|
||||
|
||||
World(std::string name, std::string directory, int seed);
|
||||
World(std::string name, std::string directory, int seed, EngineSettings& settings);
|
||||
~World();
|
||||
|
||||
void write(Level* level);
|
||||
void write(Level* level, bool writeChunks);
|
||||
Level* loadLevel(Player* player, EngineSettings& settings);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user