WorldLoader.h 440 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <Thread.h>
  3. #include <HashMap.h>
  4. #include <Critical.h>
  5. #include "Area.h"
  6. class WorldLoader : public Framework::Thread
  7. {
  8. private:
  9. Framework::Critical cs;
  10. Framework::Array<Area> requestQueue;
  11. bool exit;
  12. public:
  13. WorldLoader();
  14. ~WorldLoader();
  15. void thread() override;
  16. void requestLoading( Area request );
  17. void exitAndWait();
  18. bool existsChunk( int x, int y, int dimension ) const;
  19. };