X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FChunkStore.hpp;h=12debef87b8f4997460959c40d5b71f668f91d22;hb=1bc2f230105ad6e1ee8d999ddc079cd85d244bf9;hp=68434bbd84952489a98fa4dd9b2490ad7606cdd9;hpb=13e676a6e49128ebc6c63b8dd08bef51d360e8e9;p=blank.git diff --git a/src/world/ChunkStore.hpp b/src/world/ChunkStore.hpp index 68434bb..12debef 100644 --- a/src/world/ChunkStore.hpp +++ b/src/world/ChunkStore.hpp @@ -20,13 +20,15 @@ public: ChunkStore &operator =(const ChunkStore &) = delete; public: - ChunkIndex &MakeIndex(const Chunk::Pos &base, int extent); + ChunkIndex &MakeIndex(const ExactLocation::Coarse &base, int extent); void UnregisterIndex(ChunkIndex &); + ChunkIndex *ClosestIndex(const ExactLocation::Coarse &pos); + /// returns nullptr if given position is not loaded - Chunk *Get(const Chunk::Pos &); + Chunk *Get(const ExactLocation::Coarse &); /// returns nullptr if given position is not indexed - Chunk *Allocate(const Chunk::Pos &); + Chunk *Allocate(const ExactLocation::Coarse &); std::list::iterator begin() noexcept { return loaded.begin(); } std::list::iterator end() noexcept { return loaded.end(); } @@ -42,7 +44,7 @@ public: /// get coordinates of a missing chunk /// this will return garbage if none are actually missing - Chunk::Pos NextMissing() noexcept; + ExactLocation::Coarse NextMissing() noexcept; void Clean();