Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
Functions | |
std::vector< class Animation * > * | GetRandCommAnimation (int faction, Unit *unit, unsigned char &sex) |
void | SerializeFaction (FILE *file) |
std::string | SerializeFaction () |
void | LoadSerializedFaction (FILE *file) |
void | LoadSerializedFaction (char *&buf) |
int | numnums (const char *str) |
int | GetNumAnimation (int faction) |
returns the index of the faction with that name More... | |
class Unit * | GetContraband (int faction) |
const char * | GetFaction (int faction) |
int | GetFactionIndex (const std::string &name) |
int | GetUpgradeFaction () |
int | GetNeutralFaction () |
int | GetPlanetFaction () |
float | GetIntRelation (const int myfaction, const int theirfaction) |
std::string | GetFactionName (int index) |
bool | isCitizenInt (int index) |
bool | isCitizen (const std::string &name) |
void | AdjustIntRelation (const int myfaction, const int theirfaction, const float factor, const float rank) |
int | GetPlaylist (const int myfaction) |
const float * | GetSparkColor (const int myfaction) |
unsigned int | GetNumFactions () |
FSM * | GetConversation (const int myfaction, const int theirfaction) |
Texture * | getForceLogo (int faction) |
Texture * | getSquadLogo (int faction) |
Animation * | createAnimation (const char *anim) |
Texture * | createTexture (const char *tex, const char *tmp, bool force=false) |
Texture * | createTexture (const char *tex, bool force=false) |
std::vector< class Animation * > * | GetAnimation (int faction, int n, unsigned char &sex) |
Animation * | GetRandExplosionAnimation (int whichfaction, std::string &which) |
void | LoadFactionPlaylists () |
void | LoadContrabandLists () |
Variables | |
int | upgradefac = 0 |
int | neutralfac = 0 |
int | planetfac = 0 |
void FactionUtil::AdjustIntRelation | ( | const int | myfaction, |
const int | theirfaction, | ||
const float | factor, | ||
const float | rank | ||
) |
Definition at line 90 of file faction_util_generic.cpp.
References vs_options::AllowCivilWar, vs_options::AllowNonplayerFactionChange, vs_options::CappedFactionRating, StarSystemGent::faction, factions, isPlayerFaction(), and vs_options::min_relationship.
Animation * FactionUtil::createAnimation | ( | const char * | anim) |
Definition at line 124 of file faction_util.cpp.
Referenced by Faction::beginElement().
Definition at line 137 of file faction_util.cpp.
References GFXFALSE, GFXTRUE, MIPMAP, BaseUtil::Texture(), TEXTURE2D, and TEXTURE_2D.
Referenced by getForceLogo(), getSquadLogo(), and SphereMesh::InitSphere().
Definition at line 129 of file faction_util.cpp.
References GFXFALSE, GFXTRUE, MIPMAP, BaseUtil::Texture(), TEXTURE2D, and TEXTURE_2D.
Definition at line 59 of file faction_util.cpp.
References StarSystemGent::faction, and factions.
Referenced by GetRandCommAnimation().
Definition at line 42 of file faction_util_generic.cpp.
References StarSystemGent::faction, and factions.
Referenced by Arrested(), UniverseUtil::GetContrabandList(), CommunicatingAI::InitiateContrabandSearch(), and CommunicatingAI::UpdateContrabandSearch().
Definition at line 18 of file faction_util_generic.cpp.
References StarSystemGent::faction, and factions.
Referenced by CommunicatingAI::Destroy(), FireKeyboard::Execute(), CommunicatingAI::ProcessCommMessage(), and CommunicatingAI::RandomInitiateCommunication().
const char * FactionUtil::GetFaction | ( | int | faction) |
Definition at line 24 of file faction_util_generic.cpp.
References factions.
Referenced by BaseInterface::BaseInterface(), BaseComputer::constructControls(), UnitUtil::getFactionName(), GetFactionName(), getLogicOrInterrupt(), GetWarpMesh(), LoadFactionPlaylists(), Mesh::LoadMeshes(), Unit::LoadRow(), Mesh::PostProcessLoading(), Enhancement::reactToCollision(), setStaticFlightgroup(), GameUnit< UnitType >::Split(), and UnitUtil::switchFg().
int FactionUtil::GetFactionIndex | ( | const std::string & | name) |
Returns the relationship between myfaction and theirfaction 1 is happy. 0 is neutral (btw 1 and 0 will not attack) -1 is mad. <0 will attack
Referenced by BriefingUtil::addShip(), Planet::AddSpaceElevator(), AddUnitToSystem(), UniverseUtil::AdjustRelation(), UniverseUtil::adjustRelationModifier(), Arrested(), Mission::call_unit_launch(), StarSystem::Statistics::CheckVitals(), Beam::Collide(), createObjects(), Unit::DealDamageToHullReturnArmor(), NavigationSystem::DrawSystem(), Orders::AggressiveAI::Execute(), BaseComputer::getColorForGroup(), UniverseUtil::GetContrabandList(), UnitUtil::getPhysicsPriority(), UniverseUtil::GetRelation(), UniverseUtil::getRelationModifier(), isCitizen(), LoadMission(), UnitUtil::orbit(), UniverseUtil::precacheUnit(), NetClient::Respawn(), UnitUtil::setFactionName(), BaseComputer::showPlayerInfo(), showUnitStats(), UniverseUtil::StopTargettingEachOther(), UniverseUtil::TargetEachOther(), and NavigationSystem::CachedSystemIterator::SystemInfo::UpdateColor().
string FactionUtil::GetFactionName | ( | int | index) |
Definition at line 71 of file faction_util_generic.cpp.
References GetFaction().
Referenced by UniverseUtil::adjustRelationModifierInt(), cell_has_recursive_data(), NavigationSystem::DrawMission(), NavigationSystem::DrawSystem(), Pilot::getAnger(), BaseComputer::getColorForGroup(), UniverseUtil::getRelationModifierInt(), SaveNetUtil::GetSaveStrings(), GetUnitRow(), Planet::InitPlanet(), UnitFactory::parseAsteroidBuffer(), NavigationSystem::ParseFile(), UnitFactory::parseMissileBuffer(), UnitFactory::parseNebulaBuffer(), UnitFactory::parsePlanetBuffer(), UnitFactory::parseUnitBuffer(), Mount::PhysicsAlignedFire(), BaseComputer::recalcTitle(), BaseComputer::showPlayerInfo(), and UpgradeAllowed().
Definition at line 17 of file faction_util.cpp.
References createTexture(), StarSystemGent::faction, and factions.
Referenced by getSquadLogo().
Definition at line 139 of file faction_generic.h.
References factions.
Referenced by UnitUtil::getFactionRelation(), UniverseUtil::GetRelation(), UnitUtil::getRelationFromFaction(), UnitUtil::getRelationToFaction(), and ScoreKill().
|
inline |
Definition at line 129 of file faction_generic.h.
References neutralfac.
Referenced by HaloSystem::AddHalo(), StarSystem::AddUnit(), Pilot::adjustSpecificRelationship(), Unit::ApplyDamage(), Unit::DealDamageToHullReturnArmor(), Orders::TurretAI::Execute(), FlyByKeyboard::Execute(), getAutoRSize(), UnitUtil::getPhysicsPriority(), Planet::InitPlanet(), BaseComputer::showPlayerInfo(), StarSystem::Statistics::Statistics(), and Unit::Unit().
returns the index of the faction with that name
Definition at line 52 of file faction_util.cpp.
References StarSystemGent::faction, and factions.
unsigned int FactionUtil::GetNumFactions | ( | ) |
Definition at line 122 of file faction_util_generic.cpp.
References factions.
Referenced by NavigationSystem::DrawMission(), NavigationSystem::ParseFile(), ScoreKill(), NavigationSystem::Setup(), and BaseComputer::showPlayerInfo().
|
inline |
Definition at line 134 of file faction_generic.h.
References planetfac.
Referenced by Planet::InitPlanet(), ScoreKill(), and BaseComputer::showPlayerInfo().
Definition at line 114 of file faction_util_generic.cpp.
References factions.
std::vector< Animation * > * FactionUtil::GetRandCommAnimation | ( | int | faction, |
Unit * | unit, | ||
unsigned char & | sex | ||
) |
Definition at line 65 of file faction_util.cpp.
References Faction::comm_face_t::base, Faction::comm_face_t::CEITHER, Faction::comm_face_t::CNO, Faction::comm_face_t::CYES, Faction::comm_face_t::dockable, StarSystemGent::faction, factions, fprintf, GetAnimation(), UnitUtil::getFlightgroupName(), i, and UnitUtil::isDockableUnit().
Referenced by Pilot::getCommFace(), and Pilot::SetComm().
Definition at line 97 of file faction_util.cpp.
References factions.
Referenced by GameUnit< UnitType >::Explode().
Definition at line 118 of file faction_util_generic.cpp.
References factions.
Referenced by BaseComputer::constructControls(), DoParticles(), NavigationSystem::DrawMission(), factionColorTextString(), BaseComputer::getColorForGroup(), and NavigationSystem::CachedSystemIterator::SystemInfo::UpdateColor().
Definition at line 34 of file faction_util.cpp.
References createTexture(), StarSystemGent::faction, factions, and getForceLogo().
|
inline |
Definition at line 124 of file faction_generic.h.
References upgradefac.
Referenced by buildUpgradeDescription(), Beam::Collide(), Unit::DealDamageToHullReturnArmor(), Unit::EjectCargo(), Orders::TurretAI::Execute(), FlyByKeyboard::Execute(), GameUnit< UnitType >::Explode(), Unit::FilterDowngradeList(), getAutoRSize(), UnitUtil::getPhysicsPriority(), getUnitFromUpgradeName(), Radar::Track::IdentifyType(), Unit::reactToCollision(), Unit::Repair(), Unit::RepairUpgrade(), ScoreKill(), BaseComputer::SellUpgradeOperation::selectMount(), BaseComputer::showPlayerInfo(), TargUn(), Unit::UpAndDownGrade(), Unit::UpdatePhysics(), Unit::Upgrade(), and UpgradeUnit().
bool FactionUtil::isCitizen | ( | const std::string & | name) |
Definition at line 67 of file faction_util_generic.cpp.
References GetFactionIndex(), and isCitizenInt().
Definition at line 63 of file faction_util_generic.cpp.
References StarSystemGent::faction, and factions.
Referenced by StarSystem::Statistics::AddUnit(), StarSystem::Statistics::CheckVitals(), ChooseNavPoint(), isCitizen(), and StarSystem::Statistics::RemoveUnit().
void FactionUtil::LoadContrabandLists | ( | ) |
Still in faction_xml.cpp because createUnit
Definition at line 382 of file faction_xml.cpp.
References contrabandlists, UnitFactory::createUnit(), factions, and i.
Referenced by bootstrap_main_loop().
void FactionUtil::LoadFactionPlaylists | ( | ) |
Definition at line 115 of file faction_util.cpp.
References Music::Addlist(), factions, GetFaction(), i, and muzak.
Referenced by createObjects().
void FactionUtil::LoadSerializedFaction | ( | FILE * | file) |
Definition at line 155 of file faction_util_generic.cpp.
References StarSystemGent::faction, factions, j, k, and numnums().
Referenced by LoadSerializedFaction(), Faction::LoadXML(), and SaveGame::ReadSavedPackets().
void FactionUtil::LoadSerializedFaction | ( | char *& | buf) |
Definition at line 196 of file faction_util_generic.cpp.
References blah, bleh, StarSystemGent::faction, factions, j, k, LoadSerializedFaction(), numnums(), savedFactions, and whitespaceNewline().
int FactionUtil::numnums | ( | const char * | str) |
Definition at line 148 of file faction_util_generic.cpp.
Referenced by LoadSerializedFaction().
void FactionUtil::SerializeFaction | ( | FILE * | file) |
Definition at line 126 of file faction_util_generic.cpp.
References StarSystemGent::faction, factions, j, and VSFileSystem::vs_fprintf().
Referenced by SaveGame::WriteDynamicUniverse().
string FactionUtil::SerializeFaction | ( | ) |
Definition at line 134 of file faction_util_generic.cpp.
References StarSystemGent::faction, factions, and j.
int FactionUtil::neutralfac = 0 |
Definition at line 17 of file faction_util_generic.cpp.
Referenced by HaloSystem::AddHalo(), Faction::beginElement(), Unit::DealDamageToHullReturnArmor(), and GetNeutralFaction().
int FactionUtil::planetfac = 0 |
Definition at line 16 of file faction_util_generic.cpp.
Referenced by Faction::beginElement(), and GetPlanetFaction().
int FactionUtil::upgradefac = 0 |
Definition at line 15 of file faction_util_generic.cpp.
Referenced by Faction::beginElement(), GetUpgradeFaction(), Unit::reactToCollision(), and Unit::Upgrade().