mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
Added generation seed support
This commit is contained in:
parent
37dd882fdb
commit
1038a79b78
11 changed files with 25 additions and 17 deletions
|
|
@ -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(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue