From 537e1afcb1134a3b49fbc5483243e46b46b42f22 Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 26 Dec 2011 02:39:43 +0000 Subject: Moved the actual world generation from cChunk.cpp to a more isolated file cWorldGenerator.cpp New generators should inherit cWorldGenerator and implement their own generation algorithms git-svn-id: http://mc-server.googlecode.com/svn/trunk@117 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunk.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'source/cChunk.h') diff --git a/source/cChunk.h b/source/cChunk.h index b18a763b2..b794f4153 100644 --- a/source/cChunk.h +++ b/source/cChunk.h @@ -80,15 +80,14 @@ public: void PositionToWorldPosition(int a_ChunkX, int a_ChunkY, int a_ChunkZ, int & a_X, int & a_Y, int & a_Z); void AddTickBlockEntity( cFurnaceEntity* a_Entity ); - //{ - // m_TickBlockEntities.remove( a_Entity ); - // m_TickBlockEntities.push_back( a_Entity ); - //} - void RemoveTickBlockEntity( cFurnaceEntity* a_Entity ); - //{ - // m_TickBlockEntities.remove( a_Entity ); - //} + + inline static unsigned int cChunk::MakeIndex(int x, int y, int z ) + { + if( x < 16 && x > -1 && y < 128 && y > -1 && z < 16 && z > -1 ) + return y + (z * 128) + (x * 128 * 16); + return 0; + } static const int c_NumBlocks = 16*128*16; static const int c_BlockDataSize = c_NumBlocks * 2 + (c_NumBlocks/2); // 2.5 * numblocks @@ -111,13 +110,6 @@ private: void CreateBlockEntities(); - inline unsigned int cChunk::MakeIndex(int x, int y, int z ) - { - if( x < 16 && x > -1 && y < 128 && y > -1 && z < 16 && z > -1 ) - return y + (z * 128) + (x * 128 * 16); - return 0; - } - bool m_bCalculateLighting; bool m_bCalculateHeightmap; -- cgit v1.2.3