]> git.localhorst.tv Git - blank.git/blobdiff - src/chunk.hpp
use same load distance for initial and movement
[blank.git] / src / chunk.hpp
index 7e720bd84c5b49945f7dc7a45e6b2f0f1af9d699..d8408ec9062e34bbb4f5344c4cb9df79eef0dd5b 100644 (file)
@@ -76,6 +76,10 @@ public:
                        (idx / Width()) % Height() == Height() - 1;    // high Y plane
        }
 
+       bool IsSurface(int index) const { return IsSurface(ToPos(index)); }
+       bool IsSurface(const Block::Pos &pos) const { return IsSurface(Pos(pos)); }
+       bool IsSurface(const Pos &pos) const;
+
        void SetNeighbor(Chunk &);
        bool HasNeighbor(Block::Face f) const { return neighbor[f]; }
        Chunk &GetNeighbor(Block::Face f) { return *neighbor[f]; }
@@ -157,6 +161,7 @@ public:
        ChunkLoader(const BlockTypeRegistry &, const Generator &);
 
        void Generate(const Chunk::Pos &from, const Chunk::Pos &to);
+       void GenerateSurrounding(const Chunk::Pos &);
 
        std::list<Chunk> &Loaded() { return loaded; }