diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2016-02-06 11:37:34 +0100 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2016-02-06 11:37:34 +0100 |
commit | 6fdd7194c81be7234a126bdc3b48f0291fce3567 (patch) | |
tree | 7d5ac74b7385ce4ebf77588d80549c884c2b993c /src/Generating/HeiGen.h | |
parent | Merge pull request #2958 from LogicParrot/fence (diff) | |
parent | Bulk clearing of whitespace (diff) | |
download | cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.gz cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.bz2 cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.lz cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.xz cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.zst cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.zip |
Diffstat (limited to 'src/Generating/HeiGen.h')
-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 { |