Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
AI computation orchestator for CCmpAIManager. More...
Classes | |
class | CAIPlayer |
struct | SCommandSets |
Public Member Functions | |
CAIWorker () | |
~CAIWorker () | |
void | Init (const ScriptInterface &simInterface) |
bool | HasLoadedEntityTemplates () const |
bool | LoadScripts (const std::wstring &moduleName) |
void | PostCommand (int playerid, JS::HandleValue cmd) |
JS::Value | ComputePathScript (JS::HandleValue position, JS::HandleValue goal, pass_class_t passClass) |
void | ComputePath (const CFixedVector2D &pos, const CFixedVector2D &goal, pass_class_t passClass, std::vector< CFixedVector2D > &waypoints) |
CParamNode | GetTemplate (const std::string &name) |
void | DumpImage (const std::wstring &name, const std::vector< u32 > &data, u32 w, u32 h, u32 max) |
Debug function for AI scripts to dump 2D array data (e.g. More... | |
void | SetRNGSeed (u32 seed) |
bool | TryLoadSharedComponent () |
bool | AddPlayer (const std::wstring &aiName, player_id_t player, u8 difficulty, const std::wstring &behavior) |
bool | RunGamestateInit (const Script::StructuredClone &gameState, const Grid< NavcellData > &passabilityMap, const Grid< u8 > &territoryMap, const std::map< std::string, pass_class_t > &nonPathfindingPassClassMasks, const std::map< std::string, pass_class_t > &pathfindingPassClassMasks) |
void | UpdateGameState (JS::HandleValue gameState) |
void | UpdatePathfinder (const Grid< NavcellData > &passabilityMap, bool globallyDirty, const Grid< u8 > &dirtinessGrid, bool justDeserialized, const std::map< std::string, pass_class_t > &nonPathfindingPassClassMasks, const std::map< std::string, pass_class_t > &pathfindingPassClassMasks) |
void | UpdateTerritoryMap (const Grid< u8 > &territoryMap) |
void | StartComputation () |
void | WaitToFinishComputation () |
void | GetCommands (std::vector< SCommandSets > &commands) |
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, u32 numAis) |
int | getPlayerSize () |
Private Member Functions | |
void | TraceMember (JSTracer *trc) |
void | LoadMetadata (const VfsPath &path, JS::MutableHandleValue out) |
void | PerformComputation () |
Static Private Member Functions | |
static void | Trace (JSTracer *trc, void *data) |
Private Attributes | |
std::shared_ptr< ScriptInterface > | m_ScriptInterface |
boost::rand48 | m_RNG |
u32 | m_TurnNum |
JS::PersistentRootedValue | m_EntityTemplates |
bool | m_HasLoadedEntityTemplates |
std::map< VfsPath, JS::Heap< JS::Value > > | m_PlayerMetadata |
std::vector< std::shared_ptr< CAIPlayer > > | m_Players |
bool | m_HasSharedComponent |
JS::PersistentRootedValue | m_SharedAIObj |
std::vector< SCommandSets > | m_Commands |
std::set< std::wstring > | m_LoadedModules |
JS::PersistentRootedValue | m_GameState |
Grid< NavcellData > | m_PassabilityMap |
JS::PersistentRootedValue | m_PassabilityMapVal |
Grid< u8 > | m_TerritoryMap |
JS::PersistentRootedValue | m_TerritoryMapVal |
std::map< std::string, pass_class_t > | m_NonPathfindingPassClasses |
std::map< std::string, pass_class_t > | m_PathfindingPassClasses |
HierarchicalPathfinder | m_HierarchicalPathfinder |
LongPathfinder | m_LongPathfinder |
bool | m_CommandsComputed |
CTemplateLoader | m_TemplateLoader |
AI computation orchestator for CCmpAIManager.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Debug function for AI scripts to dump 2D array data (e.g.
terrain tile weights).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |