summaryrefslogtreecommitdiffstats
path: root/src/Generating/BioGen.h
diff options
context:
space:
mode:
authorDayBr3ak <benj.groeneveld@gmail.com>2014-09-02 10:49:46 +0200
committerDayBr3ak <benj.groeneveld@gmail.com>2014-09-02 10:54:26 +0200
commitac4ec5117dbe0ae12e73968b6a6d6cbc1640933a (patch)
tree1a973b407190b4ae072a4481ba0bdb3ef191b456 /src/Generating/BioGen.h
parentadding config file entry #381 (diff)
downloadcuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.tar
cuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.tar.gz
cuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.tar.bz2
cuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.tar.lz
cuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.tar.xz
cuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.tar.zst
cuberite-ac4ec5117dbe0ae12e73968b6a6d6cbc1640933a.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/BioGen.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h
index f9564ed24..feb449c06 100644
--- a/src/Generating/BioGen.h
+++ b/src/Generating/BioGen.h
@@ -77,6 +77,9 @@ protected:
} ;
+
+
+
class cBioGenMulticache :
public cBiomeGen
{
@@ -88,33 +91,18 @@ public:
~cBioGenMulticache();
protected:
-
- cBiomeGen * m_BioGenToCache;
-
- struct sCacheData
- {
- int m_ChunkX;
- int m_ChunkZ;
- cChunkDef::BiomeMap m_BiomeMap;
- };
-
- // To avoid moving large amounts of data for the MRU behavior, we MRU-ize indices to an array of the actual data
- int m_CacheSize;
int m_CachesLength;
-
- int ** m_CachesOrder; // MRU-ized order, indices into the multiple m_CachesData array
- sCacheData ** m_CachesData;
-
- // Cache statistics
- int m_NumHits;
- int m_NumMisses;
- int m_TotalChain; // Number of cache items walked to get to a hit (only added for hits)
+ int m_InternalCacheLength;
+ std::vector<cBiomeGen*> m_Caches;
virtual void GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap) override;
virtual void InitializeBiomeGen(cIniFile & a_IniFile) override;
};
+
+
+
/// Base class for generators that use a list of available biomes. This class takes care of the list.
class cBiomeGenList :
public cBiomeGen