Rewritten generators so that they use the cChunkDesc class (and thus can use cBlockArea merging)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1282 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -39,6 +39,16 @@ cChunkDesc::~cChunkDesc()
|
||||
|
||||
|
||||
|
||||
void cChunkDesc::SetChunkCoords(int a_ChunkX, int a_ChunkZ)
|
||||
{
|
||||
m_ChunkX = a_ChunkX;
|
||||
m_ChunkZ = a_ChunkZ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cChunkDesc::FillBlocks(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
|
||||
{
|
||||
const NIBBLETYPE CompressedMeta = a_BlockMeta | (a_BlockMeta << 4);
|
||||
@@ -411,3 +421,19 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
|
||||
|
||||
|
||||
|
||||
HEIGHTTYPE cChunkDesc::GetMaxHeight(void) const
|
||||
{
|
||||
HEIGHTTYPE MaxHeight = m_HeightMap[0];
|
||||
for (int i = 1; i < ARRAYCOUNT(m_HeightMap); i++)
|
||||
{
|
||||
if (m_HeightMap[i] > MaxHeight)
|
||||
{
|
||||
MaxHeight = m_HeightMap[i];
|
||||
}
|
||||
}
|
||||
return MaxHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user