diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 22:45:45 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 22:50:18 +0100 |
commit | ca6ef58b1ee8521e4b940ee4883dee714960e413 (patch) | |
tree | 8532add455224b07c07a759e3d906f50c0695888 /src/Generating/HeiGen.h | |
parent | Merge pull request #2972 from marvinkopf/PlayerAutoComplete (diff) | |
download | cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2 cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/HeiGen.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Generating/HeiGen.h b/src/Generating/HeiGen.h index e3b951b44..67c6c00cd 100644 --- a/src/Generating/HeiGen.h +++ b/src/Generating/HeiGen.h @@ -30,14 +30,14 @@ class cHeiGenCache : public: cHeiGenCache(cTerrainHeightGenPtr a_HeiGenToCache, size_t a_CacheSize); ~cHeiGenCache(); - + // cTerrainHeightGen overrides: virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override; virtual HEIGHTTYPE GetHeightAt(int a_BlockX, int a_BlockZ) 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: struct sCacheData { @@ -45,15 +45,15 @@ protected: int m_ChunkZ; cChunkDef::HeightMap m_HeightMap; } ; - + /** The terrain height generator that is being cached. */ cTerrainHeightGenPtr m_HeiGenToCache; - + // To avoid moving large amounts of data for the MRU behavior, we MRU-ize indices to an array of the actual data size_t m_CacheSize; size_t * m_CacheOrder; // MRU-ized order, indices into m_CacheData array sCacheData * m_CacheData; // m_CacheData[m_CacheOrder[0]] is the most recently used - + // Cache statistics size_t m_NumHits; size_t m_NumMisses; @@ -74,7 +74,7 @@ public: // cTerrainHeightGen overrides: virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override; virtual HEIGHTTYPE GetHeightAt(int a_BlockX, int a_BlockZ) 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); @@ -102,7 +102,7 @@ class cHeiGenFlat : { public: cHeiGenFlat(void) : m_Height(5) {} - + protected: HEIGHTTYPE m_Height; @@ -121,7 +121,7 @@ class cHeiGenClassic : { public: cHeiGenClassic(int a_Seed); - + protected: int m_Seed; @@ -129,7 +129,7 @@ protected: float m_HeightFreq1, m_HeightAmp1; float m_HeightFreq2, m_HeightAmp2; float m_HeightFreq3, m_HeightAmp3; - + float GetNoise(float x, float y); // cTerrainHeightGen overrides: @@ -146,14 +146,14 @@ class cHeiGenMountains : { public: cHeiGenMountains(int a_Seed); - + protected: int m_Seed; cRidgedMultiNoise m_MountainNoise; cRidgedMultiNoise m_DitchNoise; cPerlinNoise m_Perlin; - + // cTerrainHeightGen overrides: virtual void GenHeightMap(int a_ChunkX, int a_ChunkZ, cChunkDef::HeightMap & a_HeightMap) override; virtual void InitializeHeightGen(cIniFile & a_IniFile) override; @@ -189,7 +189,7 @@ protected: cNoise m_Noise; cBiomeGenPtr m_BiomeGen; - + // Per-biome terrain generator parameters: struct sGenParam { |