X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fchunk.hpp;h=c7bcd2ffe7313e5c2c1542f2b13b4962c5f8fd10;hb=774253e509ce13881229efda8849bf6f3c47b665;hp=7e720bd84c5b49945f7dc7a45e6b2f0f1af9d699;hpb=3072e2cd49ad1614100d1a1c73afe6a4888fb875;p=blank.git diff --git a/src/chunk.hpp b/src/chunk.hpp index 7e720bd..c7bcd2f 100644 --- a/src/chunk.hpp +++ b/src/chunk.hpp @@ -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]; }