diff options
author | Mattes D <github@xoft.cz> | 2020-04-13 18:38:06 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-04-16 22:07:48 +0200 |
commit | 9ee47e59995f858ec531b3ee467f131594e4ba1f (patch) | |
tree | f005d8af4a0362d7eab8a96a71aca0d73275f8e1 /src/Generating/BioGen.h | |
parent | Prevent crash when breeding (diff) | |
download | cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.gz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.bz2 cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.lz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.xz cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.tar.zst cuberite-9ee47e59995f858ec531b3ee467f131594e4ba1f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Generating/BioGen.h | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h index c20babde0..ee297adb2 100644 --- a/src/Generating/BioGen.h +++ b/src/Generating/BioGen.h @@ -42,10 +42,10 @@ protected: /** A simple cache that stores N most recently generated chunks' biomes; N being settable upon creation */ -class cBioGenCache : +class cBioGenCache: public cBiomeGen { - typedef cBiomeGen super; + using Super = cBiomeGen; public: @@ -87,11 +87,10 @@ protected: -class cBioGenMulticache : +class cBioGenMulticache: public cBiomeGen { - - typedef cBiomeGen super; + using Super = cBiomeGen; public: /* Creates a new multicache - a cache that divides the caching into several sub-caches based on the chunk coords. @@ -120,12 +119,13 @@ protected: /** Base class for generators that use a list of available biomes. This class takes care of the list. */ -class cBiomeGenList : +class cBiomeGenList: public cBiomeGen { - typedef cBiomeGen super; + using Super = cBiomeGen; protected: + // List of biomes that the generator is allowed to generate: typedef std::vector<EMCSBiome> EMCSBiomes; EMCSBiomes m_Biomes; @@ -139,12 +139,13 @@ protected: -class cBioGenCheckerboard : +class cBioGenCheckerboard: public cBiomeGenList { - typedef cBiomeGenList super; + using Super = cBiomeGenList; protected: + int m_BiomeSize; // cBiomeGen overrides: @@ -156,18 +157,20 @@ protected: -class cBioGenVoronoi : +class cBioGenVoronoi: public cBiomeGenList { - typedef cBiomeGenList super; + using Super = cBiomeGenList; public: + cBioGenVoronoi(int a_Seed) : m_Voronoi(a_Seed) { } protected: + cVoronoiMap m_Voronoi; // cBiomeGen overrides: @@ -181,13 +184,14 @@ protected: -class cBioGenDistortedVoronoi : +class cBioGenDistortedVoronoi: public cBiomeGenList { - typedef cBiomeGenList super; + using Super = cBiomeGenList; public: - cBioGenDistortedVoronoi(int a_Seed) : + + cBioGenDistortedVoronoi(int a_Seed): m_Noise(a_Seed), m_Voronoi(a_Seed), m_CellSize(0) @@ -216,12 +220,13 @@ protected: -class cBioGenMultiStepMap : +class cBioGenMultiStepMap: public cBiomeGen { - typedef cBiomeGen super; + using Super = cBiomeGen; public: + cBioGenMultiStepMap(int a_Seed); protected: @@ -276,12 +281,13 @@ protected: -class cBioGenTwoLevel : +class cBioGenTwoLevel: public cBiomeGen { - typedef cBiomeGen super; + using Super = cBiomeGen; public: + cBioGenTwoLevel(int a_Seed); protected: |