Some refactor
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#include "World.h"
|
||||
|
||||
#include "../files/WorldFiles.h"
|
||||
#include "../voxels/Chunk.h"
|
||||
#include "../voxels/Chunks.h"
|
||||
|
||||
World::World(std::string name, std::string directory, Chunks* chunks) : name(name), chunks(chunks) {
|
||||
wfile = new WorldFiles(directory, REGION_VOL * (CHUNK_VOL * 2 + 8));
|
||||
}
|
||||
|
||||
World::~World(){
|
||||
delete wfile;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef WORLD_WORLD_H_
|
||||
#define WORLD_WORLD_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
class WorldFiles;
|
||||
class Chunks;
|
||||
|
||||
class World {
|
||||
public:
|
||||
std::string name;
|
||||
WorldFiles* wfile;
|
||||
Chunks* chunks;
|
||||
|
||||
World(std::string name, std::string directory, Chunks* chunks);
|
||||
~World();
|
||||
};
|
||||
|
||||
#endif /* WORLD_WORLD_H_ */
|
||||
Reference in New Issue
Block a user