summaryrefslogtreecommitdiffstats
path: root/source/Generating/CompoGen.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-19 09:32:02 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-19 09:32:02 +0100
commitb4697ab9dbece2afc8d4edbd86678fa8735578b9 (patch)
treec39af3d9dbb0f6323fb05820d2d29ff0ed3b18ea /source/Generating/CompoGen.cpp
parentTrees: fixed a glitch in large jungle trees' leaves (1 column was missing) (diff)
downloadcuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.tar
cuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.tar.gz
cuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.tar.bz2
cuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.tar.lz
cuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.tar.xz
cuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.tar.zst
cuberite-b4697ab9dbece2afc8d4edbd86678fa8735578b9.zip
Diffstat (limited to 'source/Generating/CompoGen.cpp')
-rw-r--r--source/Generating/CompoGen.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/Generating/CompoGen.cpp b/source/Generating/CompoGen.cpp
index 34a83bd52..2e0ec5d18 100644
--- a/source/Generating/CompoGen.cpp
+++ b/source/Generating/CompoGen.cpp
@@ -20,8 +20,7 @@
void cCompoGenSameBlock::ComposeTerrain(cChunkDesc & a_ChunkDesc)
{
- memset(a_ChunkDesc.GetBlockTypes(), E_BLOCK_AIR, sizeof(a_ChunkDesc.GetBlockTypes()));
- memset(a_ChunkDesc.GetBlockMetas(), 0, sizeof(a_ChunkDesc.GetBlockMetas()));
+ a_ChunkDesc.FillBlocks(E_BLOCK_AIR, 0);
for (int z = 0; z < cChunkDef::Width; z++)
{
for (int x = 0; x < cChunkDef::Width; x++)
@@ -80,8 +79,7 @@ void cCompoGenDebugBiomes::ComposeTerrain(cChunkDesc & a_ChunkDesc)
E_BLOCK_BEDROCK,
} ;
- memset(a_ChunkDesc.GetBlockTypes(), E_BLOCK_AIR, sizeof(a_ChunkDesc.GetBlockTypes()));
- memset(a_ChunkDesc.GetBlockMetas(), 0, sizeof(a_ChunkDesc.GetBlockMetas()));
+ a_ChunkDesc.FillBlocks(E_BLOCK_AIR, 0);
for (int z = 0; z < cChunkDef::Width; z++)
{
@@ -134,8 +132,7 @@ void cCompoGenClassic::ComposeTerrain(cChunkDesc & a_ChunkDesc)
- bedrock at the bottom
*/
- memset(a_ChunkDesc.GetBlockTypes(), E_BLOCK_AIR, sizeof(a_ChunkDesc.GetBlockTypes()));
- memset(a_ChunkDesc.GetBlockMetas(), 0, sizeof(a_ChunkDesc.GetBlockMetas()));
+ a_ChunkDesc.FillBlocks(E_BLOCK_AIR, 0);
// The patterns to use for different situations, must be same length!
const BLOCKTYPE PatternGround[] = {m_BlockTop, m_BlockMiddle, m_BlockMiddle, m_BlockMiddle} ;
@@ -191,8 +188,7 @@ void cCompoGenClassic::ComposeTerrain(cChunkDesc & a_ChunkDesc)
void cCompoGenBiomal::ComposeTerrain(cChunkDesc & a_ChunkDesc)
{
- memset(a_ChunkDesc.GetBlockTypes(), E_BLOCK_AIR, sizeof(a_ChunkDesc.GetBlockTypes()));
- memset(a_ChunkDesc.GetBlockMetas(), 0, sizeof(a_ChunkDesc.GetBlockMetas()));
+ a_ChunkDesc.FillBlocks(E_BLOCK_AIR, 0);
int ChunkX = a_ChunkDesc.GetChunkX();
int ChunkZ = a_ChunkDesc.GetChunkZ();