Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <communication.h>
Classes | |
struct | Node |
Public Member Functions | |
bool | StopAllSounds (unsigned char sex) |
FSM (const std::string &filename) | |
void | LoadXML (const char *factionfile) |
void | beginElement (const string &name, const AttributeList attributes) |
std::string | GetEdgesString (unsigned int curstate) |
float | getDeltaRelation (int prevstate, unsigned int curstate) const |
int | getCommMessageMood (int curstate, float mood, float randomresponsefactor, float relationship) const |
int | getDefaultState (float relationship) const |
int | GetUnDockNode () const |
int | GetFailDockNode () const |
int | GetDockNode () const |
int | GetAbleToDockNode () const |
int | GetUnAbleToDockNode () const |
int | GetYesNode () const |
int | GetNoNode () const |
int | GetHitNode () const |
int | GetDamagedNode () const |
int | GetDealtDamageNode () const |
int | GetScoreKillNode () const |
int | GetRequestLandNode () const |
int | GetContrabandInitiateNode () const |
int | GetContrabandUnDetectedNode () const |
int | GetContrabandDetectedNode () const |
int | GetContrabandWobblyNode () const |
Static Public Member Functions | |
static void | beginElement (void *userData, const XML_Char *name, const XML_Char **atts) |
static void | endElement (void *userData, const XML_Char *name) |
Public Attributes | |
vector< Node > | nodes |
Definition at line 5 of file communication.h.
FSM::FSM | ( | const std::string & | filename) |
Definition at line 8 of file communication.cpp.
References i, LoadXML(), FSM::Node::MakeNode(), and nodes.
void FSM::beginElement | ( | const string & | name, |
const AttributeList | attributes | ||
) |
Definition at line 52 of file communication_xml.cpp.
References CommXML::attribute_map, CommXML::EDGE, CommXML::element_map, CommXML::FILENAME, i, CommXML::INDEX, XMLSupport::EnumMap::lookup(), CommXML::NODE, XMLSupport::parse_float(), XMLSupport::parse_int(), CommXML::SEXE, CommXML::SOUND, strtoupper(), unitlevel, and CommXML::UNKNOWN.
Referenced by LoadXML().
|
static |
Definition at line 47 of file communication_xml.cpp.
|
static |
Definition at line 118 of file communication_xml.cpp.
References CommXML::element_map, XMLSupport::EnumMap::lookup(), unitlevel, and CommXML::UNKNOWN.
Referenced by LoadXML().
int FSM::GetAbleToDockNode | ( | ) | const |
Definition at line 65 of file communication.cpp.
References nodes.
Referenced by Order::ProcessCommunicationMessages().
int FSM::getCommMessageMood | ( | int | curstate, |
float | mood, | ||
float | randomresponsefactor, | ||
float | relationship | ||
) | const |
Definition at line 204 of file communication.cpp.
References b, FSM::Node::edges, float, g, getDefaultState(), VegaConfig::getVariable(), i, int, nodes, nonneg(), XMLSupport::parse_float(), sq(), and vs_config.
Referenced by CommunicatingAI::selectCommunicationMessageMood().
int FSM::GetContrabandDetectedNode | ( | ) | const |
Definition at line 90 of file communication.cpp.
References nodes.
Referenced by CommunicatingAI::TerminateContrabandSearch().
int FSM::GetContrabandInitiateNode | ( | ) | const |
Definition at line 80 of file communication.cpp.
References nodes.
Referenced by CommunicatingAI::InitiateContrabandSearch().
int FSM::GetContrabandUnDetectedNode | ( | ) | const |
Definition at line 85 of file communication.cpp.
References nodes.
Referenced by CommunicatingAI::TerminateContrabandSearch().
int FSM::GetContrabandWobblyNode | ( | ) | const |
Definition at line 95 of file communication.cpp.
References nodes.
Referenced by CommunicatingAI::UpdateContrabandSearch().
int FSM::GetDamagedNode | ( | ) | const |
Definition at line 110 of file communication.cpp.
References nodes.
Referenced by Unit::ApplyDamage().
int FSM::GetDealtDamageNode | ( | ) | const |
Definition at line 115 of file communication.cpp.
References nodes.
Referenced by Unit::ApplyDamage().
Definition at line 251 of file communication.cpp.
References FSM::Node::edges, float, i, nodes, nonneg(), and sq().
Referenced by FireKeyboard::Execute(), getCommMessageMood(), CommunicationMessage::getCurrentState(), MatchingMood(), CommunicatingAI::RandomInitiateCommunication(), and CommunicatingAI::selectCommunicationMessageMood().
Definition at line 299 of file communication.cpp.
References fprintf, and nodes.
Referenced by CommunicationMessage::getDeltaRelation().
int FSM::GetDockNode | ( | ) | const |
std::string FSM::GetEdgesString | ( | unsigned int | curstate) |
Definition at line 283 of file communication.cpp.
References fprintf, VegaConfig::getVariable(), i, nodes, XMLSupport::parse_bool(), tostring(), and vs_config.
Referenced by FireKeyboard::Execute().
int FSM::GetFailDockNode | ( | ) | const |
int FSM::GetHitNode | ( | ) | const |
Definition at line 105 of file communication.cpp.
References nodes.
Referenced by Unit::ApplyDamage(), and GetMadAt().
int FSM::GetNoNode | ( | ) | const |
Definition at line 70 of file communication.cpp.
References nodes.
Referenced by HelpOut(), Orders::AggressiveAI::ProcessCurrentFgDirective(), and TryDock().
int FSM::GetRequestLandNode | ( | ) | const |
Definition at line 100 of file communication.cpp.
References nodes.
Referenced by RequestClearence().
int FSM::GetScoreKillNode | ( | ) | const |
int FSM::GetUnAbleToDockNode | ( | ) | const |
Definition at line 60 of file communication.cpp.
References nodes.
Referenced by Order::ProcessCommunicationMessages().
int FSM::GetUnDockNode | ( | ) | const |
Definition at line 45 of file communication.cpp.
References nodes.
Referenced by BaseInterface::Room::Launch::Click(), BaseInterface::Room::Eject::Click(), DoDockingOps(), CommunicatingAI::selectCommunicationMessageMood(), and TryDock().
int FSM::GetYesNode | ( | ) | const |
Definition at line 75 of file communication.cpp.
References nodes.
Referenced by HelpOut(), and Orders::AggressiveAI::ProcessCurrentFgDirective().
void FSM::LoadXML | ( | const char * | factionfile) |
Definition at line 133 of file communication_xml.cpp.
References beginElement(), VSFileSystem::CommFile, endElement(), f, fprintf, VSFileSystem::Ok, and unitlevel.
Referenced by FSM().
bool FSM::StopAllSounds | ( | unsigned char | sex) |
Definition at line 172 of file communication.cpp.
Referenced by CommunicatingAI::Destroy().
vector< Node > FSM::nodes |
Definition at line 32 of file communication.h.
Referenced by FireKeyboard::Execute(), FSM(), GetAbleToDockNode(), getCommMessageMood(), GetContrabandDetectedNode(), GetContrabandInitiateNode(), GetContrabandUnDetectedNode(), GetContrabandWobblyNode(), CommunicationMessage::getCurrentState(), GetDamagedNode(), GetDealtDamageNode(), getDefaultState(), getDeltaRelation(), GetDockNode(), GetEdgesString(), GetFailDockNode(), GetHitNode(), GetNoNode(), GetRequestLandNode(), GetScoreKillNode(), GetUnAbleToDockNode(), GetUnDockNode(), GetYesNode(), MatchingMood(), and StopAllSounds().