summaryrefslogtreecommitdiffstats
path: root/source/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-02 19:17:46 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-02 19:17:46 +0100
commit5856500be7440f56ab60be53b610ab49ee9b41ba (patch)
treeb756a166b462d4311ef2faf22f10a0127e50a004 /source/Generating/ComposableGenerator.cpp
parentFixed GCC error in ManualBindings (diff)
downloadcuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.tar
cuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.tar.gz
cuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.tar.bz2
cuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.tar.lz
cuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.tar.xz
cuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.tar.zst
cuberite-5856500be7440f56ab60be53b610ab49ee9b41ba.zip
Diffstat (limited to '')
-rw-r--r--source/Generating/ComposableGenerator.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/source/Generating/ComposableGenerator.cpp b/source/Generating/ComposableGenerator.cpp
index 680c2e204..a758d5049 100644
--- a/source/Generating/ComposableGenerator.cpp
+++ b/source/Generating/ComposableGenerator.cpp
@@ -146,33 +146,21 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
bool CacheOffByDefault = false;
if (NoCaseCompare(BiomeGenName, "constant") == 0)
{
- AString Biome = a_IniFile.GetValueSet("Generator", "ConstantBiome", "Plains");
- EMCSBiome b = StringToBiome(Biome);
- if (b == -1)
- {
- LOGWARN("[Generator]::ConstantBiome value \"%s\" not recognized, using \"Plains\".", Biome.c_str());
- b = biPlains;
- }
- m_BiomeGen = new cBioGenConstant(b);
+ m_BiomeGen = new cBioGenConstant;
CacheOffByDefault = true; // we're generating faster than a cache would retrieve data :)
}
else if (NoCaseCompare(BiomeGenName, "checkerboard") == 0)
{
- int BiomeSize = a_IniFile.GetValueSetI("Generator", "CheckerboardBiomeSize", 64);
- AString Biomes = a_IniFile.GetValueSet ("Generator", "CheckerBoardBiomes", "");
- m_BiomeGen = new cBioGenCheckerboard(BiomeSize, Biomes);
+ m_BiomeGen = new cBioGenCheckerboard;
CacheOffByDefault = true; // we're (probably) generating faster than a cache would retrieve data
}
else if (NoCaseCompare(BiomeGenName, "voronoi") == 0)
{
- int CellSize = a_IniFile.GetValueSetI("Generator", "VoronoiCellSize", 64);
- AString Biomes = a_IniFile.GetValueSet ("Generator", "VoronoiBiomes", "");
- m_BiomeGen = new cBioGenVoronoi(Seed, CellSize, Biomes);
+ m_BiomeGen = new cBioGenVoronoi(Seed);
}
else if (NoCaseCompare(BiomeGenName, "multistepmap") == 0)
{
m_BiomeGen = new cBioGenMultiStepMap(Seed);
- ((cBioGenMultiStepMap *)m_BiomeGen)->Init(a_IniFile);
}
else
{
@@ -180,9 +168,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
{
LOGWARNING("Unknown BiomeGen \"%s\", using \"DistortedVoronoi\" instead.", BiomeGenName.c_str());
}
- int CellSize = a_IniFile.GetValueSetI("Generator", "DistortedVoronoiCellSize", 96);
- AString Biomes = a_IniFile.GetValueSet ("Generator", "DistortedVoronoiBiomes", "");
- m_BiomeGen = new cBioGenDistortedVoronoi(Seed, CellSize, Biomes);
+ m_BiomeGen = new cBioGenDistortedVoronoi(Seed);
}
// Add a cache, if requested:
@@ -199,6 +185,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
LOGINFO("Using a cache for biomegen of size %d.", CacheSize);
m_BiomeGen = new cBioGenCache(m_BiomeGen, CacheSize);
}
+ m_BiomeGen->Initialize(a_IniFile);
}