Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
Classes | |
struct | AIEvresult |
A struct indicating an event that may or may not be executed. More... | |
struct | ElemAttrMap |
Functions | |
void | GeneralAIEventBegin (void *userData, const XML_Char *name, const XML_Char **atts) |
void | GeneralAIEventEnd (void *userData, const XML_Char *name) |
void | LoadAI (const char *filename, ElemAttrMap &result, const string &faction) |
void | LoadAI (const char *filename, ElemAttrMap &result, const std::string &faction) |
Variables | |
const int | AIUNKNOWN = 0 |
const int | AIMIN = 1 |
const int | AIMAX = 2 |
const int | AISCRIPT = 3 |
const int | AINOT = 4 |
const int | TIMEIT = 5 |
const int | OBEDIENCE = 6 |
const int | TIMETOINTERRUPT = 7 |
const int | PRIORITY = 8 |
const XMLSupport::EnumMap::Pair | AIattribute_names [] |
const XMLSupport::EnumMap | attr_map (AIattribute_names, 9) |
General namespace that does nothing on its own, but Deals with the parsing of an XML file tha tcontains a number of event "if" statements Each statement can have a minimum, max value and a "not" flag to invert it and the type references the enum in the class using this one, and is eventually only used for the "not" tag
void AIEvents::GeneralAIEventBegin | ( | void * | userData, |
const XML_Char * | name, | ||
const XML_Char ** | atts | ||
) |
Definition at line 82 of file event_xml.cpp.
References AIMAX, AIMIN, AINOT, AISCRIPT, attr_map, AIEvents::ElemAttrMap::element_map, float, AIEvents::ElemAttrMap::level, XMLSupport::EnumMap::lookup(), max(), AIEvents::ElemAttrMap::maxtime, min(), AIEvents::ElemAttrMap::obedience, OBEDIENCE, XMLSupport::parse_float(), PRIORITY, AIEvents::ElemAttrMap::result, TIMEIT, and TIMETOINTERRUPT.
Referenced by LoadAI().
void AIEvents::GeneralAIEventEnd | ( | void * | userData, |
const XML_Char * | name | ||
) |
Definition at line 146 of file event_xml.cpp.
References AIEvents::ElemAttrMap::level, and AIEvents::ElemAttrMap::result.
Referenced by LoadAI().
void AIEvents::LoadAI | ( | const char * | filename, |
ElemAttrMap & | result, | ||
const std::string & | faction | ||
) |
void AIEvents::LoadAI | ( | const char * | filename, |
ElemAttrMap & | result, | ||
const string & | faction | ||
) |
Definition at line 158 of file event_xml.cpp.
References VSFileSystem::AiFile, f, fprintf, GeneralAIEventBegin(), GeneralAIEventEnd(), VegaConfig::getVariable(), AIEvents::ElemAttrMap::level, AIEvents::ElemAttrMap::maxtime, AIEvents::ElemAttrMap::obedience, VSFileSystem::Ok, XMLSupport::parse_float(), and vs_config.
Referenced by getLogicOrInterrupt().
const XMLSupport::EnumMap::Pair AIEvents::AIattribute_names[] |
Definition at line 69 of file event_xml.cpp.
const int AIEvents::AIMAX = 2 |
Definition at line 62 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::AIMIN = 1 |
Definition at line 61 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::AINOT = 4 |
Definition at line 64 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::AISCRIPT = 3 |
Definition at line 63 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::AIUNKNOWN = 0 |
Definition at line 60 of file event_xml.cpp.
const XMLSupport::EnumMap AIEvents::attr_map(AIattribute_names, 9) |
Referenced by GeneralAIEventBegin().
const int AIEvents::OBEDIENCE = 6 |
Definition at line 66 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::PRIORITY = 8 |
Definition at line 68 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::TIMEIT = 5 |
Definition at line 65 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().
const int AIEvents::TIMETOINTERRUPT = 7 |
Definition at line 67 of file event_xml.cpp.
Referenced by GeneralAIEventBegin().