summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/BioGen.cpp21
-rw-r--r--src/Generating/BioGen.h7
2 files changed, 19 insertions, 9 deletions
diff --git a/src/Generating/BioGen.cpp b/src/Generating/BioGen.cpp
index 3e3a034b2..a17555f37 100644
--- a/src/Generating/BioGen.cpp
+++ b/src/Generating/BioGen.cpp
@@ -747,7 +747,12 @@ cBioGenTwoLevel::cBioGenTwoLevel(int a_Seed) :
m_VoronoiSmall(a_Seed + 2000),
m_DistortX(a_Seed + 3000),
m_DistortZ(a_Seed + 4000),
- m_Noise(a_Seed + 5000)
+ m_Noise1(a_Seed + 5001),
+ m_Noise2(a_Seed + 5002),
+ m_Noise3(a_Seed + 5003),
+ m_Noise4(a_Seed + 5004),
+ m_Noise5(a_Seed + 5005),
+ m_Noise6(a_Seed + 5006)
{
}
@@ -769,12 +774,12 @@ void cBioGenTwoLevel::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap
int BlockZ = BaseZ + z * 4;
float BlockXF = (float)(16 * BlockX) / 128;
float BlockZF = (float)(16 * BlockZ) / 128;
- double NoiseX = m_Noise.CubicNoise3D(BlockXF / 16, BlockZF / 16, 1000);
- NoiseX += 0.5 * m_Noise.CubicNoise3D(BlockXF / 8, BlockZF / 8, 2000);
- NoiseX += 0.08 * m_Noise.CubicNoise3D(BlockXF, BlockZF, 3000);
- double NoiseZ = m_Noise.CubicNoise3D(BlockXF / 16, BlockZF / 16, 4000);
- NoiseZ += 0.5 * m_Noise.CubicNoise3D(BlockXF / 8, BlockZF / 8, 5000);
- NoiseZ += 0.08 * m_Noise.CubicNoise3D(BlockXF, BlockZF, 6000);
+ double NoiseX = m_Noise1.CubicNoise2D(BlockXF / 16, BlockZF / 16);
+ NoiseX += 0.5 * m_Noise2.CubicNoise2D(BlockXF / 8, BlockZF / 8);
+ NoiseX += 0.08 * m_Noise3.CubicNoise2D(BlockXF, BlockZF);
+ double NoiseZ = m_Noise4.CubicNoise2D(BlockXF / 16, BlockZF / 16);
+ NoiseZ += 0.5 * m_Noise5.CubicNoise2D(BlockXF / 8, BlockZF / 8);
+ NoiseZ += 0.08 * m_Noise6.CubicNoise2D(BlockXF, BlockZF);
DistortX[4 * x][4 * z] = BlockX + (int)(64 * NoiseX);
DistortZ[4 * x][4 * z] = BlockZ + (int)(64 * NoiseZ);
@@ -788,8 +793,8 @@ void cBioGenTwoLevel::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap
{
for (int x = 0; x < cChunkDef::Width; x++)
{
- int BiomeGroup = m_VoronoiLarge.GetValueAt(DistortX[x][z], DistortZ[x][z]) / 7;
int MinDist1, MinDist2;
+ int BiomeGroup = m_VoronoiLarge.GetValueAt(DistortX[x][z], DistortZ[x][z], MinDist1, MinDist2) / 7;
int BiomeIdx = m_VoronoiSmall.GetValueAt(DistortX[x][z], DistortZ[x][z], MinDist1, MinDist2) / 11;
cChunkDef::SetBiome(a_BiomeMap, x, z, SelectBiome(BiomeGroup, BiomeIdx, (MinDist1 < MinDist2 / 4) ? 0 : 1));
}
diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h
index 8bd460d8f..227ec97d7 100644
--- a/src/Generating/BioGen.h
+++ b/src/Generating/BioGen.h
@@ -261,7 +261,12 @@ protected:
/// The noise used to distort the inupt Z coord
cPerlinNoise m_DistortZ;
- cNoise m_Noise;
+ cNoise m_Noise1;
+ cNoise m_Noise2;
+ cNoise m_Noise3;
+ cNoise m_Noise4;
+ cNoise m_Noise5;
+ cNoise m_Noise6;
// cBiomeGen overrides: