diff options
Diffstat (limited to '')
-rw-r--r-- | source/cLuaChunk.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/source/cLuaChunk.h b/source/cLuaChunk.h new file mode 100644 index 000000000..5e1395a4c --- /dev/null +++ b/source/cLuaChunk.h @@ -0,0 +1,39 @@ +#pragma once
+
+#include "ChunkDef.h"
+
+class cLuaChunk //tolua_export
+{ //tolua_export
+public:
+ cLuaChunk( cChunkDef::BlockTypes & a_BlockTypes
+ , cChunkDef::BlockNibbles & a_BlockNibbles
+ , cChunkDef::HeightMap & a_HeightMap
+ , cChunkDef::BiomeMap & a_BiomeMap
+ )
+ : m_BiomeMap( a_BiomeMap )
+ , m_BlockTypes( a_BlockTypes )
+ , m_BlockMeta( a_BlockNibbles )
+ , m_HeightMap( a_HeightMap )
+ {}
+ ~cLuaChunk()
+ {}
+
+ void SetBlock( const Vector3i & a_Pos, char a_BlockID, unsigned char a_BlockMeta ) //tolua_export
+ { //tolua_export
+ } //tolua_export
+
+ void FillBlocks( char a_BlockID, unsigned char a_BlockMeta ) //tolua_export
+ { //tolua_export
+ const NIBBLETYPE CompressedMeta = a_BlockMeta | a_BlockMeta << 4;
+ memset( m_BlockTypes, a_BlockID, sizeof( cChunkDef::BlockTypes ) );
+ memset( m_BlockMeta, CompressedMeta, sizeof( cChunkDef::BlockNibbles ) );
+
+ memset( m_BiomeMap, 0, sizeof( cChunkDef::BiomeMap ) );
+ memset( m_HeightMap, 0, sizeof( cChunkDef::HeightMap ) );
+ } //tolua_export
+private:
+ EMCSBiome * m_BiomeMap;
+ BLOCKTYPE * m_BlockTypes;
+ NIBBLETYPE * m_BlockMeta;
+ HEIGHTTYPE * m_HeightMap;
+}; //tolua_export
\ No newline at end of file |