Pyrogenesis
13997
|
Random map generator interface. More...
#include <MapGenerator.h>
Public Member Functions | |
CMapGenerator () | |
~CMapGenerator () | |
void | GenerateMap (const VfsPath &scriptFile, const std::string &settings) |
Start the map generator thread. More... | |
int | GetProgress () |
Get status of the map generator thread. More... | |
shared_ptr < ScriptInterface::StructuredClone > | GetResults () |
Get random map data, according to this format: http://trac.wildfiregames.com/wiki/Random_Map_Generator_Internals#Dataformat. More... | |
Private Member Functions | |
NONCOPYABLE (CMapGenerator) | |
Private Attributes | |
CMapGeneratorWorker * | m_Worker |
Random map generator interface.
Initialized by CMapReader and then checked periodically during loading, until it's finished (progress value is 0).
The actual work is performed by CMapGeneratorWorker in a separate thread.
Definition at line 37 of file MapGenerator.h.
CMapGenerator::CMapGenerator | ( | ) |
Definition at line 262 of file MapGenerator.cpp.
CMapGenerator::~CMapGenerator | ( | ) |
Definition at line 266 of file MapGenerator.cpp.
void CMapGenerator::GenerateMap | ( | const VfsPath & | scriptFile, |
const std::string & | settings | ||
) |
Start the map generator thread.
scriptFile | The VFS path for the script, e.g. "maps/random/latium.js" |
settings | JSON string containing settings for the map generator |
Definition at line 271 of file MapGenerator.cpp.
int CMapGenerator::GetProgress | ( | ) |
Get status of the map generator thread.
Definition at line 276 of file MapGenerator.cpp.
shared_ptr< ScriptInterface::StructuredClone > CMapGenerator::GetResults | ( | ) |
Get random map data, according to this format: http://trac.wildfiregames.com/wiki/Random_Map_Generator_Internals#Dataformat.
Definition at line 281 of file MapGenerator.cpp.
|
private |
|
private |
Definition at line 69 of file MapGenerator.h.