summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-21 15:19:48 +0200
committermadmaxoft <github@xoft.cz>2014-07-21 17:40:43 +0200
commit93d29555e58df172bafba530afbc593c16ec66a3 (patch)
tree681174bef875ffd821d7d87602f2063251f25673 /src/Generating
parentStyle: Normalized spaces after if, for and while. (diff)
downloadcuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.gz
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.bz2
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.lz
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.xz
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.zst
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.zip
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/Caves.cpp6
-rw-r--r--src/Generating/ChunkGenerator.cpp2
-rw-r--r--src/Generating/FinishGen.cpp8
-rw-r--r--src/Generating/HeiGen.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp
index 21bfd98b8..3b71efb57 100644
--- a/src/Generating/Caves.cpp
+++ b/src/Generating/Caves.cpp
@@ -703,10 +703,10 @@ cGridStructGen::cStructurePtr cStructGenWormNestCaves::CreateStructure(int a_Gri
////////////////////////////////////////////////////////////////////////////////
// cStructGenMarbleCaves:
-static float GetMarbleNoise( float x, float y, float z, cNoise & a_Noise )
+static float GetMarbleNoise( float x, float y, float z, cNoise & a_Noise)
{
static const float PI_2 = 1.57079633f;
- float oct1 = (a_Noise.CubicNoise3D(x * 0.1f, y * 0.1f, z * 0.1f )) * 4;
+ float oct1 = (a_Noise.CubicNoise3D(x * 0.1f, y * 0.1f, z * 0.1f)) * 4;
oct1 = oct1 * oct1 * oct1;
if (oct1 < 0.f) oct1 = PI_2;
@@ -730,7 +730,7 @@ void cStructGenMarbleCaves::GenFinish(cChunkDesc & a_ChunkDesc)
const float xx = (float)(a_ChunkDesc.GetChunkX() * cChunkDef::Width + x);
int Top = a_ChunkDesc.GetHeight(x, z);
- for (int y = 1; y < Top; ++y )
+ for (int y = 1; y < Top; ++y)
{
if (a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_STONE)
{
diff --git a/src/Generating/ChunkGenerator.cpp b/src/Generating/ChunkGenerator.cpp
index 9383a3adf..0baf1e991 100644
--- a/src/Generating/ChunkGenerator.cpp
+++ b/src/Generating/ChunkGenerator.cpp
@@ -229,7 +229,7 @@ void cChunkGenerator::Execute(void)
}
cChunkCoords coords = m_Queue.front(); // Get next coord from queue
- m_Queue.erase( m_Queue.begin() ); // Remove coordinate from queue
+ m_Queue.erase( m_Queue.begin()); // Remove coordinate from queue
bool SkipEnabled = (m_Queue.size() > QUEUE_SKIP_LIMIT);
Lock.Unlock(); // Unlock ASAP
m_evtRemoved.Set();
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 00a93023d..dca346e52 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -239,14 +239,14 @@ void cFinishGenSprinkleFoliage::GenFinish(cChunkDesc & a_ChunkDesc)
}
const float xx = (float)BlockX;
- float val1 = m_Noise.CubicNoise2D(xx * 0.1f, zz * 0.1f );
- float val2 = m_Noise.CubicNoise2D(xx * 0.01f, zz * 0.01f );
+ float val1 = m_Noise.CubicNoise2D(xx * 0.1f, zz * 0.1f);
+ float val2 = m_Noise.CubicNoise2D(xx * 0.01f, zz * 0.01f);
switch (a_ChunkDesc.GetBlockType(x, Top, z))
{
case E_BLOCK_GRASS:
{
- float val3 = m_Noise.CubicNoise2D(xx * 0.01f + 10, zz * 0.01f + 10 );
- float val4 = m_Noise.CubicNoise2D(xx * 0.05f + 20, zz * 0.05f + 20 );
+ float val3 = m_Noise.CubicNoise2D(xx * 0.01f + 10, zz * 0.01f + 10);
+ float val4 = m_Noise.CubicNoise2D(xx * 0.05f + 20, zz * 0.05f + 20);
if (val1 + val2 > 0.2f)
{
a_ChunkDesc.SetBlockType(x, ++Top, z, E_BLOCK_YELLOW_FLOWER);
diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp
index 3df1a90ff..870ceef7f 100644
--- a/src/Generating/HeiGen.cpp
+++ b/src/Generating/HeiGen.cpp
@@ -253,7 +253,7 @@ float cHeiGenClassic::GetNoise(float x, float y)
float oct2 = m_Noise.CubicNoise2D(x * m_HeightFreq2, y * m_HeightFreq2) * m_HeightAmp2;
float oct3 = m_Noise.CubicNoise2D(x * m_HeightFreq3, y * m_HeightFreq3) * m_HeightAmp3;
- float height = m_Noise.CubicNoise2D(x * 0.1f, y * 0.1f ) * 2;
+ float height = m_Noise.CubicNoise2D(x * 0.1f, y * 0.1f) * 2;
float flatness = ((m_Noise.CubicNoise2D(x * 0.5f, y * 0.5f) + 1.f) * 0.5f) * 1.1f; // 0 ... 1.5
flatness *= flatness * flatness;