summaryrefslogtreecommitdiffstats
path: root/source/StructGen.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-22 20:51:38 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-22 20:51:38 +0200
commit3f30d5dfd29484c0201118ff525863d8ce266aa8 (patch)
tree14b33499d08ea5da09b616394b8597117008fc05 /source/StructGen.cpp
parentRavines: removed an unneeded member (diff)
downloadcuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.tar
cuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.tar.gz
cuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.tar.bz2
cuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.tar.lz
cuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.tar.xz
cuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.tar.zst
cuberite-3f30d5dfd29484c0201118ff525863d8ce266aa8.zip
Diffstat (limited to '')
-rw-r--r--source/StructGen.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/source/StructGen.cpp b/source/StructGen.cpp
index a97da1a53..ba70aa2c5 100644
--- a/source/StructGen.cpp
+++ b/source/StructGen.cpp
@@ -296,72 +296,6 @@ int cStructGenTrees::GetNumTrees(
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// cStructGenMarbleCaves:
-
-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;
-
- oct1 = oct1 * oct1 * oct1;
- if (oct1 < 0.f) oct1 = PI_2;
- if (oct1 > PI_2) oct1 = PI_2;
-
- return oct1;
-}
-
-
-
-
-
-void cStructGenMarbleCaves::GenStructures(
- int a_ChunkX, int a_ChunkZ,
- cChunkDef::BlockTypes & a_BlockTypes, // Block types to read and change
- cChunkDef::BlockNibbles & a_BlockMeta, // Block meta to read and change
- cChunkDef::HeightMap & a_HeightMap, // Height map to read and change by the current data
- cEntityList & a_Entities, // Entities may be added or deleted
- cBlockEntityList & a_BlockEntities // Block entities may be added or deleted
-)
-{
- cNoise Noise(m_Seed);
- for (int z = 0; z < cChunkDef::Width; z++)
- {
- const float zz = (float)(a_ChunkZ * cChunkDef::Width + z);
- for (int x = 0; x < cChunkDef::Width; x++)
- {
- const float xx = (float)(a_ChunkX * cChunkDef::Width + x);
-
- int Top = cChunkDef::GetHeight(a_HeightMap, x, z);
- for (int y = 1; y < Top; ++y )
- {
- if (cChunkDef::GetBlock(a_BlockTypes, x, y, z) != E_BLOCK_STONE)
- {
- continue;
- }
-
- const float yy = (float)y;
- const float WaveNoise = 1;
- if (cosf(GetMarbleNoise(xx, yy * 0.5f, zz, Noise)) * fabs(cosf(yy * 0.2f + WaveNoise * 2) * 0.75f + WaveNoise) > 0.0005f)
- {
- if (y > 4)
- {
- cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_AIR);
- }
- else
- {
- cChunkDef::SetBlock(a_BlockTypes, x, y, z, E_BLOCK_STATIONARY_LAVA);
- }
- }
- } // for y
- } // for x
- } // for z
-}
-
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cStructGenOreNests:
void cStructGenOreNests::GenStructures(