My Project
|
world name factory More...
#include <WorldNameFactory.h>
Public Member Functions | |
CWorldNameFactory (const string &sWorldConfigFile) | |
give the world config file.The world name is derived using the following method. More... | |
void | ResetWorldName (const string &sWorldConfigFile) |
give the world config file or the world name.The world name is derived using the following method. More... | |
void | SetWorldName (const string &sWorldName) |
set world name. More... | |
string | GetDefaultWorldConfigName () |
suppose the given world name is "sample". More... | |
string | GetTerrainConfigFile (int x, int y) |
suppose the given world name is "sample". More... | |
string | GetTerrainElevationFile (int x, int y) |
suppose the given world name is "sample". More... | |
string | GetTerrainOnloadFile (int x, int y) |
suppose the given world name is "sample". More... | |
string | GetTerrainMaskFile (int x, int y) |
suppose the given world name is "sample". More... | |
string | GetWorldName () |
get world name | |
string | GetWorldDirectory () |
get world root path. More... | |
string | GetWorldCharacterDirectory () |
get world character path. More... | |
string | GetDefaultTileConfigName () |
get default file config file path. More... | |
string | GetTerrainInfoDataFile (int x, int y) |
suppose the given world name is "sample". More... | |
string | GetBlockRegionFileName (int x, int y, bool usingTempFile) |
get block region data file name | |
string | GetBlockGameSaveDir (bool usingTempFile) |
string | GetBlockTemplateFileName (bool usingTempFile) |
get block template file name | |
world name factory
CWorldNameFactory::CWorldNameFactory | ( | const string & | sWorldConfigFile | ) |
give the world config file.The world name is derived using the following method.
the longest directory name in the given file or just the input. e.g. "sample/worldconfig.txt", "sample/aaa/worldconfig.txt" will generate the world name "sample" and "sample/aaa"
string CWorldNameFactory::GetDefaultTileConfigName | ( | ) |
get default file config file path.
suppose the given world name is "sample". The generated file name is "sample/flat.txt"
string CWorldNameFactory::GetDefaultWorldConfigName | ( | ) |
suppose the given world name is "sample".
The generated file name is "sample/sample.worldconfig.txt"
string CWorldNameFactory::GetTerrainConfigFile | ( | int | x, |
int | y | ||
) |
suppose the given world name is "sample".
tile pos is (0,0) The generated file name is "sample/config/sample_0_0.config.txt"
string CWorldNameFactory::GetTerrainElevationFile | ( | int | x, |
int | y | ||
) |
suppose the given world name is "sample".
tile pos is (0,0) The generated file name is "sample/elev/sample_0_0.raw"
string CWorldNameFactory::GetTerrainInfoDataFile | ( | int | x, |
int | y | ||
) |
suppose the given world name is "sample".
tile pos is (0,0) The generated file name is "sample/elev/sample_0_0_info.raw"
string CWorldNameFactory::GetTerrainMaskFile | ( | int | x, |
int | y | ||
) |
suppose the given world name is "sample".
tile pos is (0,0) The generated file name is "sample/config/sample_0_0.mask"
string CWorldNameFactory::GetTerrainOnloadFile | ( | int | x, |
int | y | ||
) |
suppose the given world name is "sample".
tile pos is (0,0) The generated file name is "sample/script/sample_0_0.onload.lua"
string CWorldNameFactory::GetWorldCharacterDirectory | ( | ) |
get world character path.
suppose the given world name is "sample". The generated file name is "sample/character/"
string CWorldNameFactory::GetWorldDirectory | ( | ) |
get world root path.
suppose the given world name is "sample". The generated file name is "sample/"
void CWorldNameFactory::ResetWorldName | ( | const string & | sWorldConfigFile | ) |
give the world config file or the world name.The world name is derived using the following method.
the longset directory name in the given file or just the input. e.g. "sample/worldconfig.txt", "sample", "sample/aaa/worldconfig.txt" will all generate the world name "sample", "sample", "sample/aaa"
void ParaTerrain::CWorldNameFactory::SetWorldName | ( | const string & | sWorldName | ) |
set world name.
if empty, world name will not be used in all sub folders. this is the default setting for all newly created world.