summaryrefslogtreecommitdiffstats
path: root/source/Generating/HeiGen.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-11 10:18:01 +0200
committermadmaxoft <github@xoft.cz>2013-10-11 10:18:01 +0200
commita9e70c84b59032f8efcd634069ae97660a58eba1 (patch)
tree7cbbd0e1d70288fc61f0538c30c26dab8911b8e5 /source/Generating/HeiGen.h
parentAdded GetIniItemSet() function. (diff)
downloadcuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.tar
cuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.tar.gz
cuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.tar.bz2
cuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.tar.lz
cuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.tar.xz
cuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.tar.zst
cuberite-a9e70c84b59032f8efcd634069ae97660a58eba1.zip
Diffstat (limited to '')
-rw-r--r--source/Generating/HeiGen.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/Generating/HeiGen.h b/source/Generating/HeiGen.h
index 437b5f104..1b246c70a 100644
--- a/source/Generating/HeiGen.h
+++ b/source/Generating/HeiGen.h
@@ -25,14 +25,15 @@ class cHeiGenFlat :
public cTerrainHeightGen
{
public:
- cHeiGenFlat(int a_Height) : m_Height(a_Height) {}
+ cHeiGenFlat(void) : m_Height(5) {}
protected:
int m_Height;
- // cTerrainHeightGen override:
+ // cTerrainHeightGen overrides:
virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
+ virtual void InitializeHeightGen(cIniFile & a_IniFile) override;
} ;
@@ -44,18 +45,19 @@ class cHeiGenCache :
public cTerrainHeightGen
{
public:
- cHeiGenCache(cTerrainHeightGen * a_HeiGenToCache, int a_CacheSize); // Doesn't take ownership of a_HeiGenToCache
+ cHeiGenCache(cTerrainHeightGen & a_HeiGenToCache, int a_CacheSize); // Doesn't take ownership of a_HeiGenToCache
~cHeiGenCache();
- // cTerrainHeightGen override:
+ // cTerrainHeightGen overrides:
virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
+ virtual void InitializeHeightGen(cIniFile & a_IniFile) override;
/// Retrieves height at the specified point in the cache, returns true if found, false if not found
bool GetHeightAt(int a_ChunkX, int a_ChunkZ, int a_RelX, int a_RelZ, HEIGHTTYPE & a_Height);
protected:
- cTerrainHeightGen * m_HeiGenToCache;
+ cTerrainHeightGen & m_HeiGenToCache;
struct sCacheData
{
@@ -83,7 +85,7 @@ class cHeiGenClassic :
public cTerrainHeightGen
{
public:
- cHeiGenClassic(int a_Seed, float a_HeightFreq1, float a_HeightAmp1, float a_HeightFreq2, float a_HeightAmp2, float a_HeightFreq3, float a_HeightAmp3);
+ cHeiGenClassic(int a_Seed);
protected:
@@ -95,8 +97,9 @@ protected:
float GetNoise(float x, float y);
- // cTerrainHeightGen override:
+ // cTerrainHeightGen overrides:
virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
+ virtual void InitializeHeightGen(cIniFile & a_IniFile) override;
} ;
@@ -130,8 +133,9 @@ protected:
} ;
static const sGenParam m_GenParam[biNumBiomes];
- // cTerrainHeightGen override:
+ // cTerrainHeightGen overrides:
virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override;
+ virtual void InitializeHeightGen(cIniFile & a_IniFile) override;
NOISE_DATATYPE GetHeightAt(int a_RelX, int a_RelZ, int a_ChunkX, int a_ChunkZ, const BiomeNeighbors & a_BiomeNeighbors);
} ;