gzip compress/decompress + refactor

This commit is contained in:
MihailRis
2024-01-17 00:52:55 +03:00
parent 3837cdcf95
commit b0165b1014
10 changed files with 119 additions and 65 deletions
+4
View File
@@ -49,3 +49,7 @@ void Level::update() {
chunks->resize(matrixSize, matrixSize);
}
}
World* Level::getWorld() {
return world.get();
}
+5 -1
View File
@@ -1,6 +1,8 @@
#ifndef WORLD_LEVEL_H_
#define WORLD_LEVEL_H_
#include <memory>
#include "../typedefs.h"
#include "../settings.h"
@@ -15,7 +17,7 @@ class ChunksStorage;
class Level {
public:
World* world;
std::unique_ptr<World> world;
const Content* const content;
Player* player;
Chunks* chunks;
@@ -34,6 +36,8 @@ public:
~Level();
void update();
World* getWorld();
};
#endif /* WORLD_LEVEL_H_ */