1
0

Added a flat terrain generator with settable terrain height

git-svn-id: http://mc-server.googlecode.com/svn/trunk@404 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-03-12 19:39:41 +00:00
parent cb1edaf6df
commit 10c8c75bb7
8 changed files with 160 additions and 10 deletions

View File

@@ -5,13 +5,7 @@
#include "cWorld.h"
#include "cWorldGenerator.h"
#include "cWorldGenerator_Test.h"
typedef std::pair<int, int> ChunkCoord;
typedef std::list< ChunkCoord > ChunkCoordList;
#include "WGFlat.h"
@@ -51,10 +45,14 @@ bool cChunkGenerator::Start(cWorld * a_World, const AString & a_WorldGeneratorNa
{
m_World = a_World;
if (a_WorldGeneratorName.compare("Test") == 0 )
if (NoCaseCompare(a_WorldGeneratorName, "Test") == 0 )
{
m_pWorldGenerator = new cWorldGenerator_Test(a_World);
}
else if (NoCaseCompare(a_WorldGeneratorName, "flat") == 0)
{
m_pWorldGenerator = new cWGFlat(a_World);
}
else // Default
{
m_pWorldGenerator = new cWorldGenerator(a_World);