From f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 15 May 2014 00:14:06 +0200 Subject: VillageGen rewritten using BFSPieceGenerator. Piece composition is not good yet, the buildings aren't height-adjusted and the road pieces will need special processing. This is mainly for adjusting the per-piece params. --- src/Generating/ComposableGenerator.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 2e886336f..1bb836684 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -25,6 +25,7 @@ #include "Noise3DGenerator.h" #include "POCPieceGenerator.h" #include "Ravines.h" +#include "VillageGen.h" @@ -32,6 +33,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // cTerrainCompositionGen: + cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & a_IniFile, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_Seed) { AString CompoGenName = a_IniFile.GetValueSet("Generator", "CompositionGen", ""); @@ -404,6 +406,13 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cStructGenTrees(Seed, m_BiomeGen, m_HeightGen, m_CompositionGen)); } + else if (NoCaseCompare(*itr, "Villages") == 0) + { + int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 256); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 7); + int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128); + m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen, *m_HeightGen)); + } else if (NoCaseCompare(*itr, "WaterLakes") == 0) { int Probability = a_IniFile.GetValueSetI("Generator", "WaterLakesProbability", 25); -- cgit v1.2.3 From 56f7ad2cd9f1bfd69502918ebe760748e453959d Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 15 May 2014 10:44:08 +0200 Subject: Changed village generator defaults to more reasonable values. --- src/Generating/ComposableGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 1bb836684..f264599c9 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -408,8 +408,8 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "Villages") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 256); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 7); + int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 384); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 3); int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128); m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen, *m_HeightGen)); } -- cgit v1.2.3 From 6aa7df367f8db7506a8a5ab853c26e3c9fd60253 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 22 May 2014 21:47:56 +0200 Subject: Villages have min and max density setting. Also made roads use 3+9 scheme, instead of 3+5, for the house connectors. Fixes #1020. --- src/Generating/ComposableGenerator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index f264599c9..4dd626ed4 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -408,10 +408,12 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "Villages") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 384); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 3); - int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128); - m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen, *m_HeightGen)); + int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 384); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 2); + int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128); + int MinDensity = a_IniFile.GetValueSetI("Generator", "VillageMinDensity", 50); + int MaxDensity = a_IniFile.GetValueSetI("Generator", "VillageMaxDensity", 80); + m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, MinDensity, MaxDensity, *m_BiomeGen, *m_HeightGen)); } else if (NoCaseCompare(*itr, "WaterLakes") == 0) { -- cgit v1.2.3 From 7672ca7eefc7233b507938d0592d1f565191d0ee Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 31 May 2014 22:06:14 +0200 Subject: Added an initial version of the underwater base generator. --- src/Generating/ComposableGenerator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 4dd626ed4..cf736ce64 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -25,6 +25,7 @@ #include "Noise3DGenerator.h" #include "POCPieceGenerator.h" #include "Ravines.h" +#include "UnderwaterBaseGen.h" #include "VillageGen.h" @@ -406,6 +407,13 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cStructGenTrees(Seed, m_BiomeGen, m_HeightGen, m_CompositionGen)); } + else if (NoCaseCompare(*itr, "UnderwaterBases") == 0) + { + int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7); + int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128); + m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen)); + } else if (NoCaseCompare(*itr, "Villages") == 0) { int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 384); -- cgit v1.2.3 From 8bff3e5af220070ecc789ef551c0b8428b8953ef Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 31 May 2014 22:28:51 +0100 Subject: Implemented end and nether portals --- src/Generating/ComposableGenerator.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 2e886336f..03ed0291f 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -39,7 +39,6 @@ cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & { LOGWARN("[Generator] CompositionGen value not set in world.ini, using \"Biomal\"."); CompoGenName = "Biomal"; - a_IniFile.SetValue("Generator", "CompositionGen", CompoGenName); } cTerrainCompositionGen * res = NULL; @@ -93,7 +92,6 @@ cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & else { LOGWARN("Unknown CompositionGen \"%s\", using \"Biomal\" instead.", CompoGenName.c_str()); - a_IniFile.DeleteValue("Generator", "CompositionGen"); a_IniFile.SetValue("Generator", "CompositionGen", "Biomal"); return CreateCompositionGen(a_IniFile, a_BiomeGen, a_HeightGen, a_Seed); } @@ -291,19 +289,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) int Seed = m_ChunkGenerator.GetSeed(); eDimension Dimension = StringToDimension(a_IniFile.GetValue("General", "Dimension", "Overworld")); - // Older configuration used "Structures" in addition to "Finishers"; we don't distinguish between the two anymore (#398) - // Therefore, we load Structures from the ini file for compatibility, but move its contents over to Finishers: - AString Structures = a_IniFile.GetValue("Generator", "Structures", ""); - AString Finishers = a_IniFile.GetValueSet("Generator", "Finishers", "Ravines, WormNestCaves, WaterLakes, LavaLakes, OreNests, Trees, SprinkleFoliage, Ice, Snow, Lilypads, BottomLava, DeadBushes, PreSimulator"); - if (!Structures.empty()) - { - LOGINFO("[Generator].Structures is deprecated, moving the contents to [Generator].Finishers."); - // Structures used to generate before Finishers, so place them first: - Structures.append(", "); - Finishers = Structures + Finishers; - a_IniFile.SetValue("Generator", "Finishers", Finishers); - } - a_IniFile.DeleteValue("Generator", "Structures"); + AString Finishers = a_IniFile.GetValueSet("Generator", "Finishers", ""); // Create all requested finishers: AStringVector Str = StringSplitAndTrim(Finishers, ","); -- cgit v1.2.3 From ec40c7c83ad1ef62b2c8e759bd9a76cf916f5e5b Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 5 Jun 2014 23:44:31 +0200 Subject: Added RainbowRoads finisher generator. --- src/Generating/ComposableGenerator.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index cf736ce64..1801b7375 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -24,6 +24,7 @@ #include "NetherFortGen.h" #include "Noise3DGenerator.h" #include "POCPieceGenerator.h" +#include "RainbowRoadsGen.h" #include "Ravines.h" #include "UnderwaterBaseGen.h" #include "VillageGen.h" @@ -391,6 +392,13 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cFinishGenPreSimulator); } + else if (NoCaseCompare(*itr, "RainbowRoads") == 0) + { + int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30); + int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260); + m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxDepth, MaxSize)); + } else if (NoCaseCompare(*itr, "Ravines") == 0) { m_FinishGens.push_back(new cStructGenRavines(Seed, 128)); @@ -409,9 +417,9 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "UnderwaterBases") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7); - int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128); + int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7); + int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128); m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen)); } else if (NoCaseCompare(*itr, "Villages") == 0) -- cgit v1.2.3 From ee50790398791c38e563eee04cf12780fab74baf Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 16 Jun 2014 15:12:50 +0100 Subject: Merge branch 'master' of github.com:mc-server/MCServer --- src/Generating/ComposableGenerator.cpp | 36 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 1801b7375..22941dcbe 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -357,12 +357,13 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) else if (NoCaseCompare(*itr, "MineShafts") == 0) { int GridSize = a_IniFile.GetValueSetI("Generator", "MineShaftsGridSize", 512); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "MineShaftsMaxOffset", 256); int MaxSystemSize = a_IniFile.GetValueSetI("Generator", "MineShaftsMaxSystemSize", 160); int ChanceCorridor = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceCorridor", 600); int ChanceCrossing = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceCrossing", 200); int ChanceStaircase = a_IniFile.GetValueSetI("Generator", "MineShaftsChanceStaircase", 200); m_FinishGens.push_back(new cStructGenMineShafts( - Seed, GridSize, MaxSystemSize, + Seed, GridSize, MaxOffset, MaxSystemSize, ChanceCorridor, ChanceCrossing, ChanceStaircase )); } @@ -376,9 +377,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "NetherForts") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "NetherFortsGridSize", 512); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "NetherFortsMaxDepth", 12); - m_FinishGens.push_back(new cNetherFortGen(Seed, GridSize, MaxDepth)); + int GridSize = a_IniFile.GetValueSetI("Generator", "NetherFortsGridSize", 512); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "NetherFortMaxOffset", 128); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "NetherFortsMaxDepth", 12); + m_FinishGens.push_back(new cNetherFortGen(Seed, GridSize, MaxOffset, MaxDepth)); } else if (NoCaseCompare(*itr, "OreNests") == 0) { @@ -394,10 +396,11 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "RainbowRoads") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30); - int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260); - m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxDepth, MaxSize)); + int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxOffset", 128); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30); + int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260); + m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize)); } else if (NoCaseCompare(*itr, "Ravines") == 0) { @@ -417,19 +420,21 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "UnderwaterBases") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7); - int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128); - m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen)); + int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxOffset", 128); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7); + int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128); + m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize, *m_BiomeGen)); } else if (NoCaseCompare(*itr, "Villages") == 0) { int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 384); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "VillageMaxOffset", 128); int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 2); int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128); int MinDensity = a_IniFile.GetValueSetI("Generator", "VillageMinDensity", 50); int MaxDensity = a_IniFile.GetValueSetI("Generator", "VillageMaxDensity", 80); - m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, MinDensity, MaxDensity, *m_BiomeGen, *m_HeightGen)); + m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize, MinDensity, MaxDensity, *m_BiomeGen, *m_HeightGen)); } else if (NoCaseCompare(*itr, "WaterLakes") == 0) { @@ -442,7 +447,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "WormNestCaves") == 0) { - m_FinishGens.push_back(new cStructGenWormNestCaves(Seed)); + int Size = a_IniFile.GetValueSetI("Generator", "WormNestCavesSize", 64); + int Grid = a_IniFile.GetValueSetI("Generator", "WormNestCavesGrid", 96); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "WormNestMaxOffset", 32); + m_FinishGens.push_back(new cStructGenWormNestCaves(Seed, Size, Grid, MaxOffset)); } else { -- cgit v1.2.3 From 0a95d04ab38b81f87d4fa421601d25f37df1f6a1 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 21 Jun 2014 20:19:44 +0200 Subject: Added a TestRails generator. This is for debugging purposes only. --- src/Generating/ComposableGenerator.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 22941dcbe..7b6234161 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -26,6 +26,7 @@ #include "POCPieceGenerator.h" #include "RainbowRoadsGen.h" #include "Ravines.h" +#include "TestRailsGen.h" #include "UnderwaterBaseGen.h" #include "VillageGen.h" @@ -414,6 +415,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cFinishGenSprinkleFoliage(Seed)); } + else if (NoCaseCompare(*itr, "TestRails") == 0) + { + m_FinishGens.push_back(new cTestRailsGen(Seed, 100, 1, 7, 50)); + } else if (NoCaseCompare(*itr, "Trees") == 0) { m_FinishGens.push_back(new cStructGenTrees(Seed, m_BiomeGen, m_HeightGen, m_CompositionGen)); -- cgit v1.2.3 From 2423fbf2efa39e28cc348acc11b9269e573dcdef Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:15:34 +0200 Subject: Normalized comments. This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign. --- src/Generating/ComposableGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 7b6234161..167fbab37 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -34,7 +34,7 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cTerrainCompositionGen: cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & a_IniFile, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_Seed) @@ -114,7 +114,7 @@ cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cComposableGenerator: cComposableGenerator::cComposableGenerator(cChunkGenerator & a_ChunkGenerator) : -- cgit v1.2.3 From 5e198c673009cf8ca9d92cf59848999bc96bbc37 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:50:58 +0200 Subject: Basic style fixes. --- src/Generating/ComposableGenerator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 167fbab37..09921abb0 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -234,7 +234,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile) { if (CacheSize < 4) { - LOGWARNING("Biomegen cache size set too low, would hurt performance instead of helping. Increasing from %d to %d", + LOGWARNING("Biomegen cache size set too low, would hurt performance instead of helping. Increasing from %d to %d", CacheSize, 4 ); CacheSize = 4; @@ -252,7 +252,7 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile) void cComposableGenerator::InitHeightGen(cIniFile & a_IniFile) { bool CacheOffByDefault = false; - m_HeightGen = cTerrainHeightGen::CreateHeightGen(a_IniFile, *m_BiomeGen, m_ChunkGenerator.GetSeed(), CacheOffByDefault); + m_HeightGen = cTerrainHeightGen::CreateHeightGen(a_IniFile, *m_BiomeGen, m_ChunkGenerator.GetSeed(), CacheOffByDefault); // Add a cache, if requested: int CacheSize = a_IniFile.GetValueSetI("Generator", "HeightGenCacheSize", CacheOffByDefault ? 0 : 64); @@ -260,7 +260,7 @@ void cComposableGenerator::InitHeightGen(cIniFile & a_IniFile) { if (CacheSize < 4) { - LOGWARNING("Heightgen cache size set too low, would hurt performance instead of helping. Increasing from %d to %d", + LOGWARNING("Heightgen cache size set too low, would hurt performance instead of helping. Increasing from %d to %d", CacheSize, 4 ); CacheSize = 4; -- cgit v1.2.3 From 7bf9da74413c69cbd79a9db81ba098e13b847904 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 20 Jul 2014 16:23:45 +0200 Subject: First attempt for a new foliage finisher --- src/Generating/ComposableGenerator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 7b6234161..21626e76b 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -338,6 +338,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) float Threshold = (float)a_IniFile.GetValueSetF("Generator", "DualRidgeCavesThreshold", 0.3); m_FinishGens.push_back(new cStructGenDualRidgeCaves(Seed, Threshold)); } + else if (NoCaseCompare(*itr, "Foliage") == 0) + { + m_FinishGens.push_back(new cFinishGenFoliage(Seed)); + } else if (NoCaseCompare(*itr, "Ice") == 0) { m_FinishGens.push_back(new cFinishGenIce); -- cgit v1.2.3 From 76b79b51adfd8e71312cf777595483bb1ec68910 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 20 Jul 2014 19:22:41 +0200 Subject: Renamed cFinishGenFoliage to cFinishGenTallGrass Better grass density Added double tall grass. --- src/Generating/ComposableGenerator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 21626e76b..2717f4e41 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -338,10 +338,6 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) float Threshold = (float)a_IniFile.GetValueSetF("Generator", "DualRidgeCavesThreshold", 0.3); m_FinishGens.push_back(new cStructGenDualRidgeCaves(Seed, Threshold)); } - else if (NoCaseCompare(*itr, "Foliage") == 0) - { - m_FinishGens.push_back(new cFinishGenFoliage(Seed)); - } else if (NoCaseCompare(*itr, "Ice") == 0) { m_FinishGens.push_back(new cFinishGenIce); @@ -419,6 +415,10 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cFinishGenSprinkleFoliage(Seed)); } + else if (NoCaseCompare(*itr, "TallGrass") == 0) + { + m_FinishGens.push_back(new cFinishGenTallGrass(Seed)); + } else if (NoCaseCompare(*itr, "TestRails") == 0) { m_FinishGens.push_back(new cTestRailsGen(Seed, 100, 1, 7, 50)); -- cgit v1.2.3 From 77f4297c6ee4daca51220f60b626658a22a22ea2 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 27 Jul 2014 00:03:26 +0200 Subject: RoughRavines: Initial generator implementation. This provides the basic shape of the ravines, with the basic settings based on GridStructGen, and good default values. --- src/Generating/ComposableGenerator.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index ab6accee7..757f6ddb7 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -26,6 +26,7 @@ #include "POCPieceGenerator.h" #include "RainbowRoadsGen.h" #include "Ravines.h" +#include "RoughRavines.h" #include "TestRailsGen.h" #include "UnderwaterBaseGen.h" #include "VillageGen.h" @@ -397,16 +398,23 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "RainbowRoads") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512); + int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512); int MaxOffset = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxOffset", 128); - int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30); - int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30); + int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260); m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize)); } else if (NoCaseCompare(*itr, "Ravines") == 0) { m_FinishGens.push_back(new cStructGenRavines(Seed, 128)); } + else if (NoCaseCompare(*itr, "RoughRavines") == 0) + { + int GridSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesGridSize", 256); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxOffset", 128); + int MaxSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxSize", 64); + m_FinishGens.push_back(new cRoughRavines(Seed, MaxSize, GridSize, MaxOffset)); + } else if (NoCaseCompare(*itr, "Snow") == 0) { m_FinishGens.push_back(new cFinishGenSnow); -- cgit v1.2.3 From 472f70a6762369eb3375eb1ed874a95faaf2de71 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 27 Jul 2014 13:54:27 +0200 Subject: RoughRavines: More settings - size, width, roughness --- src/Generating/ComposableGenerator.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 757f6ddb7..3326dda36 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -410,10 +410,20 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "RoughRavines") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesGridSize", 256); - int MaxOffset = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxOffset", 128); - int MaxSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxSize", 64); - m_FinishGens.push_back(new cRoughRavines(Seed, MaxSize, GridSize, MaxOffset)); + int GridSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesGridSize", 256); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxOffset", 128); + int MaxSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxSize", 128); + int MinSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMinSize", 64); + double MaxCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCenterWidth", 8); + double MinCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCenterWidth", 2); + double MaxRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxRoughness", 0.2); + double MinRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinRoughness", 0.05); + m_FinishGens.push_back(new cRoughRavines( + Seed, MaxSize, MinSize, + (float)MaxCenterWidth, (float)MinCenterWidth, + (float)MaxRoughness, (float)MinRoughness, + GridSize, MaxOffset + )); } else if (NoCaseCompare(*itr, "Snow") == 0) { -- cgit v1.2.3 From 30893e7ee2f4dbaa3e4348b07cdc77aada168e1f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 27 Jul 2014 19:57:47 +0200 Subject: RoughRavines: Made floor and ceiling settings-adjustable. The world.ini has settings for the minimum and maximum height for each at the ravines' center and edges. --- src/Generating/ComposableGenerator.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 3326dda36..0d9bedf45 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -410,18 +410,30 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "RoughRavines") == 0) { - int GridSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesGridSize", 256); - int MaxOffset = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxOffset", 128); - int MaxSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxSize", 128); - int MinSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMinSize", 64); - double MaxCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCenterWidth", 8); - double MinCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCenterWidth", 2); - double MaxRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxRoughness", 0.2); - double MinRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinRoughness", 0.05); + int GridSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesGridSize", 256); + int MaxOffset = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxOffset", 128); + int MaxSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxSize", 128); + int MinSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMinSize", 64); + double MaxCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCenterWidth", 8); + double MinCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCenterWidth", 2); + double MaxRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxRoughness", 0.2); + double MinRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinRoughness", 0.05); + double MaxFloorHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxFloorHeightEdge", 8); + double MinFloorHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinFloorHeightEdge", 30); + double MaxFloorHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxFloorHeightCenter", 20); + double MinFloorHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinFloorHeightCenter", 6); + double MaxCeilingHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCeilingHeightEdge", 56); + double MinCeilingHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCeilingHeightEdge", 38); + double MaxCeilingHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCeilingHeightCenter", 58); + double MinCeilingHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCeilingHeightCenter", 36); m_FinishGens.push_back(new cRoughRavines( Seed, MaxSize, MinSize, - (float)MaxCenterWidth, (float)MinCenterWidth, - (float)MaxRoughness, (float)MinRoughness, + (float)MaxCenterWidth, (float)MinCenterWidth, + (float)MaxRoughness, (float)MinRoughness, + (float)MaxFloorHeightEdge, (float)MinFloorHeightEdge, + (float)MaxFloorHeightCenter, (float)MinFloorHeightCenter, + (float)MaxCeilingHeightEdge, (float)MinCeilingHeightEdge, + (float)MaxCeilingHeightCenter, (float)MinCeilingHeightCenter, GridSize, MaxOffset )); } -- cgit v1.2.3 From bf1aa7993202c2f57de88b068d999d262f1874f6 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 28 Jul 2014 14:23:29 +0200 Subject: Renamed cFinishGenSingleBiomeSingleTopBlock to cFinishGenSingleTopBlock Now accepts a vector of biomes and a vector of allowed blocks. --- src/Generating/ComposableGenerator.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index ab6accee7..ed1e7f6c1 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -323,7 +323,24 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "DeadBushes") == 0) { - m_FinishGens.push_back(new cFinishGenSingleBiomeSingleTopBlock(Seed, E_BLOCK_DEAD_BUSH, biDesert, 2, E_BLOCK_SAND, E_BLOCK_SAND)); + // A list with all the allowed biomes. + cFinishGenSingleTopBlock::BiomeList AllowedBiomes; + AllowedBiomes.push_back(biDesert); + AllowedBiomes.push_back(biDesertHills); + AllowedBiomes.push_back(biDesertM); + AllowedBiomes.push_back(biMesa); + AllowedBiomes.push_back(biMesaBryce); + AllowedBiomes.push_back(biMesaPlateauF); + AllowedBiomes.push_back(biMesaPlateauFM); + AllowedBiomes.push_back(biMesaPlateauM); + + // A list with all the allowed blocks that can be below the lilypad. + cFinishGenSingleTopBlock::BlockList AllowedBlocks; + AllowedBlocks.push_back(E_BLOCK_SAND); + AllowedBlocks.push_back(E_BLOCK_HARDENED_CLAY); + AllowedBlocks.push_back(E_BLOCK_STAINED_CLAY); + + m_FinishGens.push_back(new cFinishGenSingleTopBlock(Seed, E_BLOCK_DEAD_BUSH, AllowedBiomes, 2, AllowedBlocks)); } else if (NoCaseCompare(*itr, "DirectOverhangs") == 0) { @@ -370,7 +387,17 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "Lilypads") == 0) { - m_FinishGens.push_back(new cFinishGenSingleBiomeSingleTopBlock(Seed, E_BLOCK_LILY_PAD, biSwampland, 4, E_BLOCK_WATER, E_BLOCK_STATIONARY_WATER)); + // A list with all the allowed biomes. + cFinishGenSingleTopBlock::BiomeList AllowedBiomes; + AllowedBiomes.push_back(biSwampland); + AllowedBiomes.push_back(biSwamplandM); + + // A list with all the allowed blocks that can be below the lilypad. + cFinishGenSingleTopBlock::BlockList AllowedBlocks; + AllowedBlocks.push_back(E_BLOCK_WATER); + AllowedBlocks.push_back(E_BLOCK_STATIONARY_WATER); + + m_FinishGens.push_back(new cFinishGenSingleTopBlock(Seed, E_BLOCK_LILY_PAD, AllowedBiomes, 4, AllowedBlocks)); } else if (NoCaseCompare(*itr, "NetherClumpFoliage") == 0) { -- cgit v1.2.3 From 579f850506a1cc72f8f205f9e8c686f434e63023 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 28 Jul 2014 14:28:16 +0200 Subject: Forgot Mesa Plateau biome. --- src/Generating/ComposableGenerator.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index ed1e7f6c1..a8c1a842f 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -330,6 +330,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) AllowedBiomes.push_back(biDesertM); AllowedBiomes.push_back(biMesa); AllowedBiomes.push_back(biMesaBryce); + AllowedBiomes.push_back(biMesaPlateau); AllowedBiomes.push_back(biMesaPlateauF); AllowedBiomes.push_back(biMesaPlateauFM); AllowedBiomes.push_back(biMesaPlateauM); -- cgit v1.2.3 From 4ccf14f3b3f7deb19a32afd4253c506d5a224c54 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Tue, 29 Jul 2014 17:01:15 +0200 Subject: Some finishing touches Removed whitespace fixed dead bush comment --- src/Generating/ComposableGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index a8c1a842f..5231b499f 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -335,7 +335,7 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) AllowedBiomes.push_back(biMesaPlateauFM); AllowedBiomes.push_back(biMesaPlateauM); - // A list with all the allowed blocks that can be below the lilypad. + // A list with all the allowed blocks that can be below the dead bush. cFinishGenSingleTopBlock::BlockList AllowedBlocks; AllowedBlocks.push_back(E_BLOCK_SAND); AllowedBlocks.push_back(E_BLOCK_HARDENED_CLAY); -- cgit v1.2.3