diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-14 21:56:09 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-03-14 21:56:09 +0100 |
commit | 0b24efeb005e293a026f2ac8666020cea8316578 (patch) | |
tree | 4523c34112fbec3f056337191c00bddb6f7253d0 /source/WGFlat.cpp | |
parent | Fixed the server not waiting for the world to save completely before stopping (diff) | |
download | cuberite-0b24efeb005e293a026f2ac8666020cea8316578.tar cuberite-0b24efeb005e293a026f2ac8666020cea8316578.tar.gz cuberite-0b24efeb005e293a026f2ac8666020cea8316578.tar.bz2 cuberite-0b24efeb005e293a026f2ac8666020cea8316578.tar.lz cuberite-0b24efeb005e293a026f2ac8666020cea8316578.tar.xz cuberite-0b24efeb005e293a026f2ac8666020cea8316578.tar.zst cuberite-0b24efeb005e293a026f2ac8666020cea8316578.zip |
Diffstat (limited to 'source/WGFlat.cpp')
-rw-r--r-- | source/WGFlat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/WGFlat.cpp b/source/WGFlat.cpp index 725572334..5c901c916 100644 --- a/source/WGFlat.cpp +++ b/source/WGFlat.cpp @@ -35,7 +35,7 @@ cWGFlat::cWGFlat(cWorld * a_World) : void cWGFlat::GenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_BlockData, cEntityList & a_Entities, cBlockEntityList & a_BlockEntities)
{
- int SliceSize = cChunk::c_ChunkWidth * cChunk::c_ChunkWidth;
+ int SliceSize = cChunkDef::Width * cChunkDef::Width;
memset(a_BlockData, E_BLOCK_BEDROCK, SliceSize);
switch (m_Height)
{
@@ -73,18 +73,18 @@ void cWGFlat::GenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ, char * a_B break;
}
}
- memset(a_BlockData + SliceSize * m_Height, E_BLOCK_AIR, cChunk::c_NumBlocks - SliceSize * m_Height);
+ memset(a_BlockData + SliceSize * m_Height, E_BLOCK_AIR, cChunkDef::NumBlocks - SliceSize * m_Height);
SliceSize /= 2; // Nibbles from now on
- char * Meta = a_BlockData + cChunk::c_NumBlocks;
- memset(Meta, 0, cChunk::c_NumBlocks / 2);
+ char * Meta = a_BlockData + cChunkDef::NumBlocks;
+ memset(Meta, 0, cChunkDef::NumBlocks / 2);
- char * SkyLight = Meta + cChunk::c_NumBlocks / 2;
+ char * SkyLight = Meta + cChunkDef::NumBlocks / 2;
memset(SkyLight, 0, m_Height * SliceSize);
- memset(SkyLight + m_Height * SliceSize, 0xff, cChunk::c_NumBlocks / 2 - m_Height * SliceSize);
+ memset(SkyLight + m_Height * SliceSize, 0xff, cChunkDef::NumBlocks / 2 - m_Height * SliceSize);
- char * BlockLight = SkyLight + cChunk::c_NumBlocks / 2;
- memset(BlockLight, 0, cChunk::c_NumBlocks / 2);
+ char * BlockLight = SkyLight + cChunkDef::NumBlocks / 2;
+ memset(BlockLight, 0, cChunkDef::NumBlocks / 2);
}
|