My Project
Public Member Functions | List of all members
ParaTerrain::CWorldNameFactory Class Reference

world name factory More...

#include <WorldNameFactory.h>

Inheritance diagram for ParaTerrain::CWorldNameFactory:
ParaEngine::CWorldInfo

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
 

Detailed Description

world name factory

Constructor & Destructor Documentation

§ CWorldNameFactory()

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"

Member Function Documentation

§ GetDefaultTileConfigName()

string CWorldNameFactory::GetDefaultTileConfigName ( )

get default file config file path.

suppose the given world name is "sample". The generated file name is "sample/flat.txt"

§ GetDefaultWorldConfigName()

string CWorldNameFactory::GetDefaultWorldConfigName ( )

suppose the given world name is "sample".

The generated file name is "sample/sample.worldconfig.txt"

§ GetTerrainConfigFile()

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"

§ GetTerrainElevationFile()

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"

§ GetTerrainInfoDataFile()

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"

§ GetTerrainMaskFile()

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"

§ GetTerrainOnloadFile()

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"

§ GetWorldCharacterDirectory()

string CWorldNameFactory::GetWorldCharacterDirectory ( )

get world character path.

suppose the given world name is "sample". The generated file name is "sample/character/"

§ GetWorldDirectory()

string CWorldNameFactory::GetWorldDirectory ( )

get world root path.

suppose the given world name is "sample". The generated file name is "sample/"

§ ResetWorldName()

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"

§ SetWorldName()

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.


The documentation for this class was generated from the following files: