18 #ifndef INCLUDED_MAPGENERATOR
19 #define INCLUDED_MAPGENERATOR
25 #include <boost/random/linear_congruential.hpp>
66 shared_ptr<ScriptInterface::StructuredClone>
GetResults();
109 shared_ptr<ScriptInterface::StructuredClone>
GetResults();
123 static bool LoadLibrary(
void* cbdata, std::wstring name);
125 static void SetProgress(
void* cbdata,
int progress);
126 static void MaybeGC(
void* cbdata);
127 static std::vector<std::string>
GetCivData(
void* cbdata);
146 #endif //INCLUDED_MAPGENERATOR
int GetProgress()
Get status of the map generator thread.
static void SetProgress(void *cbdata, int progress)
CMapGeneratorWorker * m_Worker
shared_ptr< ScriptInterface::StructuredClone > GetResults()
Get random map data, according to this format: http://trac.wildfiregames.com/wiki/Random_Map_Generato...
static void MaybeGC(void *cbdata)
static std::vector< std::string > GetCivData(void *cbdata)
boost::rand48 m_MapGenRNG
A non-recursive mutual exclusion lock.
Random map generator interface.
static void * RunThread(void *data)
shared_ptr< ScriptInterface::StructuredClone > m_MapData
static void ExportMap(void *cbdata, CScriptValRooted data)
ScriptInterface * m_ScriptInterface
std::set< std::wstring > m_LoadedLibraries
int GetProgress()
Get status of the map generator thread.
static bool LoadLibrary(void *cbdata, std::wstring name)
Random map generator worker thread.
void GenerateMap(const VfsPath &scriptFile, const std::string &settings)
Start the map generator thread.
shared_ptr< ScriptInterface::StructuredClone > GetResults()
Get random map data, according to this format: http://trac.wildfiregames.com/wiki/Random_Map_Generato...
Abstraction around a SpiderMonkey JSContext.
bool LoadScripts(const std::wstring &libraryName)
Load all scripts of the given library.
NONCOPYABLE(CMapGenerator)
void Initialize(const VfsPath &scriptFile, const std::string &settings)
Start the map generator thread.