summaryrefslogtreecommitdiffstats
path: root/src/Generating/Noise3DGenerator.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-12 21:24:26 +0100
committerMattes D <github@xoft.cz>2014-11-12 21:24:26 +0100
commit5fb2526e0739fa27d925a686669f2c3aef56e825 (patch)
treec548202392d5f2cf12ee7b23a45c9f0a9026d9c6 /src/Generating/Noise3DGenerator.h
parentBiomalNoise3D: Added a few biomes. (diff)
downloadcuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.tar
cuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.tar.gz
cuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.tar.bz2
cuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.tar.lz
cuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.tar.xz
cuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.tar.zst
cuberite-5fb2526e0739fa27d925a686669f2c3aef56e825.zip
Diffstat (limited to 'src/Generating/Noise3DGenerator.h')
-rw-r--r--src/Generating/Noise3DGenerator.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/Generating/Noise3DGenerator.h b/src/Generating/Noise3DGenerator.h
index ba541fbcc..eaac182ba 100644
--- a/src/Generating/Noise3DGenerator.h
+++ b/src/Generating/Noise3DGenerator.h
@@ -69,8 +69,7 @@ protected:
class cNoise3DComposable :
- public cTerrainHeightGen,
- public cTerrainCompositionGen
+ public cTerrainShapeGen
{
public:
cNoise3DComposable(int a_Seed);
@@ -127,12 +126,8 @@ protected:
void GenerateNoiseArrayIfNeeded(int a_ChunkX, int a_ChunkZ);
// cTerrainHeightGen overrides:
- virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
- virtual void InitializeHeightGen(cIniFile & a_IniFile) override { Initialize(a_IniFile); }
-
- // cTerrainCompositionGen overrides:
- virtual void ComposeTerrain(cChunkDesc & a_ChunkDesc) override;
- virtual void InitializeCompoGen(cIniFile & a_IniFile) override { Initialize(a_IniFile); }
+ virtual void GenShape(int a_ChunkX, int a_ChunkZ, cChunkDesc::Shape & a_Shape) override;
+ virtual void InitializeShapeGen(cIniFile & a_IniFile) override { Initialize(a_IniFile); }
} ;
@@ -140,8 +135,7 @@ protected:
class cBiomalNoise3DComposable :
- public cTerrainHeightGen,
- public cTerrainCompositionGen
+ public cTerrainShapeGen
{
public:
cBiomalNoise3DComposable(int a_Seed, cBiomeGenPtr a_BiomeGen);
@@ -194,7 +188,7 @@ protected:
// Cache for the last calculated chunk (reused between heightmap and composition queries):
int m_LastChunkX;
int m_LastChunkZ;
- NOISE_DATATYPE m_NoiseArray[17 * 17 * 257]; // x + 17 * z + 17 * 17 * y
+ NOISE_DATATYPE m_NoiseArray[17 * 17 * 257]; // 257 * x + y + 257 * 17 * z
/** Weights for summing up neighboring biomes. */
NOISE_DATATYPE m_Weight[AVERAGING_SIZE * 2 + 1][AVERAGING_SIZE * 2 + 1];
@@ -212,13 +206,9 @@ protected:
/** Returns the parameters for the specified biome. */
void GetBiomeParams(EMCSBiome a_Biome, NOISE_DATATYPE & a_HeightAmp, NOISE_DATATYPE & a_MidPoint);
- // cTerrainHeightGen overrides:
- virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
- virtual void InitializeHeightGen(cIniFile & a_IniFile) override { Initialize(a_IniFile); }
-
- // cTerrainCompositionGen overrides:
- virtual void ComposeTerrain(cChunkDesc & a_ChunkDesc) override;
- virtual void InitializeCompoGen(cIniFile & a_IniFile) override { Initialize(a_IniFile); }
+ // cTerrainShapeGen overrides:
+ virtual void GenShape(int a_ChunkX, int a_ChunkZ, cChunkDesc::Shape & a_Shape) override;
+ virtual void InitializeShapeGen(cIniFile & a_IniFile) override { Initialize(a_IniFile); }
} ;