diff options
Diffstat (limited to 'source/ChunkDef.h')
-rw-r--r-- | source/ChunkDef.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/ChunkDef.h b/source/ChunkDef.h index db3bf4740..0eebabefe 100644 --- a/source/ChunkDef.h +++ b/source/ChunkDef.h @@ -218,6 +218,13 @@ public: } + inline static BLOCKTYPE GetBlock(const BLOCKTYPE * a_BlockTypes, int a_Idx) + { + ASSERT((a_Idx >= 0) && (a_Idx < Width * Width * Height)); + return a_BlockTypes[a_Idx]; + } + + inline static int GetHeight(const HeightMap & a_HeightMap, int a_X, int a_Z) { return a_HeightMap[a_X + Width * a_Z]; |