From a4a418a679f1ac760a8763edd856f0178cfc6dde Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 25 May 2012 07:18:52 +0000 Subject: Merged the composable_generator branch into the trunk git-svn-id: http://mc-server.googlecode.com/svn/trunk@504 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cRoot.cpp | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) (limited to 'source/cRoot.cpp') diff --git a/source/cRoot.cpp b/source/cRoot.cpp index 69127f78e..d110c96a3 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -13,7 +13,6 @@ #include "cSleep.h" #include "cThread.h" #include "cFileFormatUpdater.h" -#include "cGenSettings.h" #include "cRedstone.h" #include "../iniFile/iniFile.h" @@ -193,31 +192,6 @@ void cRoot::LoadGlobalSettings() { cRedstone::s_UseRedstone = IniFile.GetValueB("Redstone", "SimulateRedstone", true ); } - - - // I think this should be removed? I can't believe anybody is using it anyway - cIniFile GenSettings("terrain.ini"); - if( GenSettings.ReadFile() ) - { -#define READ_INI_TERRAIN_VAL( var, type ) cGenSettings::var = (type)GenSettings.GetValueF("Terrain", #var, cGenSettings::var ) - READ_INI_TERRAIN_VAL( HeightFreq1, float ); - READ_INI_TERRAIN_VAL( HeightFreq2, float ); - READ_INI_TERRAIN_VAL( HeightFreq3, float ); - READ_INI_TERRAIN_VAL( HeightAmp1, float ); - READ_INI_TERRAIN_VAL( HeightAmp2, float ); - READ_INI_TERRAIN_VAL( HeightAmp3, float ); - } - else - { -#define SET_INI_TERRAIN_VAL( var ) GenSettings.SetValueF("Terrain", #var, cGenSettings::var ) - SET_INI_TERRAIN_VAL( HeightFreq1 ); - SET_INI_TERRAIN_VAL( HeightFreq2 ); - SET_INI_TERRAIN_VAL( HeightFreq3 ); - SET_INI_TERRAIN_VAL( HeightAmp1 ); - SET_INI_TERRAIN_VAL( HeightAmp2 ); - SET_INI_TERRAIN_VAL( HeightAmp3 ); - GenSettings.WriteFile(); - } } @@ -237,15 +211,15 @@ void cRoot::LoadWorlds() // Then load the other worlds unsigned int KeyNum = IniFile.FindKey("Worlds"); unsigned int NumWorlds = IniFile.GetNumValues( KeyNum ); - if( NumWorlds > 0 ) + if ( NumWorlds > 0 ) { - for(unsigned int i = 0; i < NumWorlds; i++) + for (unsigned int i = 0; i < NumWorlds; i++) { std::string ValueName = IniFile.GetValueName(KeyNum, i ); if( ValueName.compare("World") == 0 ) { std::string WorldName = IniFile.GetValue(KeyNum, i ); - if( WorldName.size() > 0 ) + if (!WorldName.empty()) { cWorld* NewWorld = new cWorld( WorldName.c_str() ); NewWorld->InitializeSpawn(); -- cgit v1.2.3