1
0

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:
madmaxoft@gmail.com
2013-03-17 17:55:03 +00:00
parent 3844523882
commit 1ed3b3aed2
16 changed files with 444 additions and 662 deletions

View File

@@ -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;
}