From bdd86d7934e95ee1db54531b51431554d5b91796 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 28 Nov 2013 19:58:20 +0100 Subject: BiomeVisualiser: Added the TwoLevel biome generator. --- src/Generating/BioGen.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'src/Generating/BioGen.h') diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h index 892168bb6..8bd460d8f 100644 --- a/src/Generating/BioGen.h +++ b/src/Generating/BioGen.h @@ -239,3 +239,41 @@ protected: + +class cBioGenTwoLevel : + public cBiomeGen +{ + typedef cBiomeGen super; + +public: + cBioGenTwoLevel(int a_Seed); + +protected: + /// The Voronoi map that decides the groups of biomes + cVoronoiMap m_VoronoiLarge; + + /// The Voronoi map that decides biomes inside individual biome groups + cVoronoiMap m_VoronoiSmall; + + /// The noise used to distort the input X coord + cPerlinNoise m_DistortX; + + /// The noise used to distort the inupt Z coord + cPerlinNoise m_DistortZ; + + cNoise m_Noise; + + + // cBiomeGen overrides: + virtual void GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap) override; + virtual void InitializeBiomeGen(cIniFile & a_IniFile) override; + + /// Selects biome from the specified biome group, based on the specified index. + /// Note that both params may overflow + /// a_DistLevel is either 0 or 1; zero when it is at the edge of the small Voronoi cell, 1 near the center + EMCSBiome SelectBiome(int a_BiomeGroup, int a_BiomeIdx, int a_DistLevel); +} ; + + + + -- cgit v1.2.3