]> git.localhorst.tv Git - blank.git/blobdiff - src/chunk.hpp
add some light blocks to generated surfaces
[blank.git] / src / chunk.hpp
index 7e720bd84c5b49945f7dc7a45e6b2f0f1af9d699..c7bcd2ffe7313e5c2c1542f2b13b4962c5f8fd10 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]; }