Added generation seed support

This commit is contained in:
MihailRis
2022-07-01 02:31:30 +03:00
committed by GitHub
parent 37dd882fdb
commit 1038a79b78
11 changed files with 25 additions and 17 deletions
+3 -1
View File
@@ -11,6 +11,7 @@
#include <atomic>
class Chunk;
class World;
enum LoaderMode {
OFF, IDLE, LOAD, RENDER,
@@ -22,11 +23,12 @@ private:
void _thread();
std::atomic<Chunk*> current {nullptr};
std::atomic<Chunk**> closes {nullptr};
std::atomic<World*> world {nullptr};
std::atomic<LoaderMode> state {IDLE};
void perform(Chunk* chunk, Chunk** closes_passed, LoaderMode mode);
public:
ChunksLoader() : loaderThread{} {
ChunksLoader(World* world) : loaderThread{}, world(world) {
loaderThread = std::thread{&ChunksLoader::_thread, this};
}
~ChunksLoader(){