Implements worker thread for CCmpAIManager.
More...
|
| | CAIWorker () |
| |
| | ~CAIWorker () |
| |
| bool | TryLoadSharedComponent (bool hasTechs) |
| |
| bool | AddPlayer (const std::wstring &aiName, player_id_t player, uint8_t difficulty, bool callConstructor) |
| |
| bool | RunGamestateInit (const shared_ptr< ScriptInterface::StructuredClone > &gameState, const Grid< u16 > &passabilityMap, const Grid< u8 > &territoryMap) |
| |
| void | StartComputation (const shared_ptr< ScriptInterface::StructuredClone > &gameState, const Grid< u16 > &passabilityMap, const Grid< u8 > &territoryMap, bool territoryMapDirty) |
| |
| void | WaitToFinishComputation () |
| |
| void | GetCommands (std::vector< SCommandSets > &commands) |
| |
| void | RegisterTechTemplates (const shared_ptr< ScriptInterface::StructuredClone > &techTemplates) |
| |
| void | LoadEntityTemplates (const std::vector< std::pair< std::string, const CParamNode * > > &templates) |
| |
| void | Serialize (std::ostream &stream, bool isDebug) |
| |
| void | SerializeState (ISerializer &serializer) |
| |
| void | Deserialize (std::istream &stream) |
| |
| int | getPlayerSize () |
| |
| void | RegisterSerializablePrototype (std::wstring name, CScriptVal proto) |
| |
Implements worker thread for CCmpAIManager.
Definition at line 73 of file CCmpAIManager.cpp.
| CAIWorker::~CAIWorker |
( |
| ) |
|
|
inline |
| bool CAIWorker::AddPlayer |
( |
const std::wstring & |
aiName, |
|
|
player_id_t |
player, |
|
|
uint8_t |
difficulty, |
|
|
bool |
callConstructor |
|
) |
| |
|
inline |
| void CAIWorker::Deserialize |
( |
std::istream & |
stream | ) |
|
|
inline |
| static void CAIWorker::DumpHeap |
( |
void * |
cbdata | ) |
|
|
inlinestatic |
| static void CAIWorker::DumpImage |
( |
void * |
cbdata, |
|
|
std::wstring |
name, |
|
|
std::vector< u32 > |
data, |
|
|
u32 |
w, |
|
|
u32 |
h, |
|
|
u32 |
max |
|
) |
| |
|
inlinestatic |
Debug function for AI scripts to dump 2D array data (e.g.
terrain tile weights).
Definition at line 383 of file CCmpAIManager.cpp.
| static void CAIWorker::ForceGC |
( |
void * |
cbdata | ) |
|
|
inlinestatic |
| void CAIWorker::GetCommands |
( |
std::vector< SCommandSets > & |
commands | ) |
|
|
inline |
| int CAIWorker::getPlayerSize |
( |
| ) |
|
|
inline |
| void CAIWorker::LoadEntityTemplates |
( |
const std::vector< std::pair< std::string, const CParamNode * > > & |
templates | ) |
|
|
inline |
| void CAIWorker::PerformComputation |
( |
| ) |
|
|
inlineprivate |
| void CAIWorker::RegisterSerializablePrototype |
( |
std::wstring |
name, |
|
|
CScriptVal |
proto |
|
) |
| |
|
inline |
| void CAIWorker::Serialize |
( |
std::ostream & |
stream, |
|
|
bool |
isDebug |
|
) |
| |
|
inline |
| void CAIWorker::SerializeState |
( |
ISerializer & |
serializer | ) |
|
|
inline |
| bool CAIWorker::TryLoadSharedComponent |
( |
bool |
hasTechs | ) |
|
|
inline |
| void CAIWorker::WaitToFinishComputation |
( |
| ) |
|
|
inline |
| bool CAIWorker::m_CommandsComputed |
|
private |
| std::map<std::wstring, JSObject*> CAIWorker::m_DeserializablePrototypes |
|
private |
| bool CAIWorker::m_HasLoadedEntityTemplates |
|
private |
| bool CAIWorker::m_HasSharedComponent |
|
private |
| Grid<u16> CAIWorker::m_PassabilityMap |
|
private |
| std::vector<shared_ptr<CAIPlayer> > CAIWorker::m_Players |
|
private |
| boost::rand48 CAIWorker::m_RNG |
|
private |
| std::map<JSObject*, std::wstring> CAIWorker::m_SerializablePrototypes |
|
private |
| Grid<u8> CAIWorker::m_TerritoryMap |
|
private |
The documentation for this class was generated from the following file: