1 #ifndef BLANK_WORLD_CHUNKLOADER_HPP_
2 #define BLANK_WORLD_CHUNKLOADER_HPP_
11 class BlockTypeRegistry;
22 ChunkLoader(const Config &, const BlockTypeRegistry &, const Generator &) noexcept;
24 void Generate(const Chunk::Pos &from, const Chunk::Pos &to);
25 void GenerateSurrounding(const Chunk::Pos &);
27 std::list<Chunk> &Loaded() noexcept { return loaded; }
29 Chunk *Loaded(const Chunk::Pos &) noexcept;
30 bool Queued(const Chunk::Pos &) noexcept;
31 bool Known(const Chunk::Pos &) noexcept;
32 Chunk &ForceLoad(const Chunk::Pos &);
34 void Rebase(const Chunk::Pos &);
38 Chunk &Generate(const Chunk::Pos &pos);
39 void Insert(Chunk &) noexcept;
40 void Remove(Chunk &) noexcept;
45 const BlockTypeRegistry ®
48 std::list<Chunk> loaded;
49 std::list<Chunk::Pos> to_generate;
50 std::list<Chunk> to_free;