WorldLoader.h 435 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <Critical.h>
  3. #include <HashMap.h>
  4. #include <Thread.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. };