Cuberite
A lightweight, fast and extensible game server for Minecraft
|
A simple cache that stores N most recently generated chunks' biomes; N being settable upon creation. More...
#include <BioGen.h>
Classes | |
struct | sCacheData |
Public Member Functions | |
cBioGenCache (cBiomeGen &a_BioGenToCache, size_t a_CacheSize) | |
Public Member Functions inherited from cBiomeGen | |
virtual | ~cBiomeGen () |
Protected Member Functions | |
virtual void | GenBiomes (cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &a_BiomeMap) override |
Generates biomes for the given chunk. More... | |
virtual void | InitializeBiomeGen (cIniFile &a_IniFile) override |
Reads parameters from the ini file, prepares generator for use. More... | |
Protected Attributes | |
cBiomeGen & | m_BioGenToCache |
std::vector< sCacheData > | m_CacheData |
std::vector< size_t > | m_CacheOrder |
size_t | m_CacheSize |
size_t | m_NumHits |
size_t | m_NumMisses |
size_t | m_TotalChain |
Private Types | |
using | Super = cBiomeGen |
Friends | |
class | cBioGenMulticache |
Additional Inherited Members | |
Static Public Member Functions inherited from cBiomeGen | |
static std::unique_ptr< cBiomeGen > | CreateBiomeGen (cIniFile &a_IniFile, int a_Seed, bool &a_CacheOffByDefault) |
Creates the correct BiomeGen descendant based on the ini file settings. More... | |
A simple cache that stores N most recently generated chunks' biomes; N being settable upon creation.
|
private |
cBioGenCache::cBioGenCache | ( | cBiomeGen & | a_BioGenToCache, |
size_t | a_CacheSize | ||
) |
Definition at line 59 of file BioGen.cpp.
|
overrideprotectedvirtual |
Generates biomes for the given chunk.
Implements cBiomeGen.
Definition at line 78 of file BioGen.cpp.
|
overrideprotectedvirtual |
Reads parameters from the ini file, prepares generator for use.
Reimplemented from cBiomeGen.
Definition at line 129 of file BioGen.cpp.
|
friend |
|
protected |