Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <configxml.h>
Public Member Functions | |
VegaConfig (const char *configfile) | |
virtual | ~VegaConfig () |
void | getColor (configNode *node, string name, float color[4], bool have_color=false) |
void | getColor (string section, string name, float color[4], bool have_color=false) |
void | gethColor (string section, string name, float color[4], int hexcolor) |
void | getColor (string name, float color[4], bool have_color=false) |
string | getVariable (string section, string name, string defaultvalue) |
string | getVariable (string section, string subsection, string name, string defaultvalue) |
configNode * | findSection (string section, configNode *startnode) |
configNode * | findEntry (string name, configNode *startnode) |
void | setVariable (configNode *entry, string value) |
bool | setVariable (string section, string name, string value) |
bool | setVariable (string section, string subsection, string name, string value) |
easyDomNode * | Variables () |
virtual void | bindKeys () |
Public Attributes | |
int | axis_axis [MAX_AXIS] |
int | axis_joy [MAX_AXIS] |
bool | axis_inverse [MAX_AXIS] |
float | hatswitch [MAX_HATSWITCHES][MAX_VALUES] |
float | hatswitch_margin [MAX_HATSWITCHES] |
int | hatswitch_axis [MAX_HATSWITCHES] |
int | hatswitch_joystick [MAX_HATSWITCHES] |
Protected Member Functions | |
string | getVariable (configNode *section, string name, string defaultval) |
bool | checkConfig (configNode *node) |
void | doVariables (configNode *node) |
void | checkSection (configNode *node, enum section_t section_type) |
void | checkVar (configNode *node) |
void | doSection (string prefix, configNode *node, enum section_t section_type) |
void | doVar (string prefix, configNode *node) |
void | doColors (configNode *node) |
bool | checkColor (string prefix, configNode *node) |
virtual void | doBindings (configNode *node) |
virtual void | checkBind (configNode *node) |
virtual void | doAxis (configNode *node) |
virtual void | checkHatswitch (int nr, configNode *node) |
Protected Attributes | |
configNode * | variables |
configNode * | bindings |
configNode * | colors |
map< string, string > | map_variables |
map< string, vColor > | map_colors |
int | hs_value_index |
Definition at line 58 of file configxml.h.
|
explicit |
Definition at line 38 of file configxml.cpp.
References checkConfig(), colors, easyDomFactory< domNodeType >::LoadXML(), and variables.
|
virtual |
|
inlinevirtual |
|
inlineprotectedvirtual |
Definition at line 110 of file configxml.h.
|
protected |
Definition at line 162 of file configxml.cpp.
References vColor::a, a, easyDomNode::attr_value(), vColor::b, b, configNode::color, vColor::g, g, getColor(), map_colors, vColor::name, easyDomNode::Name(), and vColor::r.
Referenced by doSection().
|
protected |
Definition at line 63 of file configxml.cpp.
References bindings, doColors(), doVariables(), easyDomNode::Name(), and easyDomNode::subnodes.
Referenced by VegaConfig().
|
inlineprotectedvirtual |
Definition at line 112 of file configxml.h.
|
protected |
Definition at line 126 of file configxml.cpp.
References easyDomNode::attr_value(), doSection(), easyDomNode::Name(), and easyDomNode::printNode().
Referenced by doColors(), and doVariables().
|
protected |
Definition at line 151 of file configxml.cpp.
References doVar(), and easyDomNode::Name().
|
inlineprotectedvirtual |
Definition at line 111 of file configxml.h.
|
inlineprotectedvirtual |
Definition at line 109 of file configxml.h.
|
protected |
Definition at line 237 of file configxml.cpp.
References checkSection(), colors, SECTION_COLOR, and easyDomNode::subnodes.
Referenced by checkConfig().
|
protected |
Definition at line 103 of file configxml.cpp.
References easyDomNode::attr_value(), checkColor(), doVar(), easyDomNode::Name(), SECTION_COLOR, SECTION_VAR, and easyDomNode::subnodes.
Referenced by checkSection().
|
protected |
Definition at line 139 of file configxml.cpp.
References easyDomNode::attr_value(), and map_variables.
Referenced by checkVar(), and doSection().
|
protected |
Definition at line 86 of file configxml.cpp.
References checkSection(), SECTION_VAR, easyDomNode::subnodes, and variables.
Referenced by checkConfig().
configNode * VegaConfig::findEntry | ( | string | name, |
configNode * | startnode | ||
) |
Definition at line 359 of file configxml.cpp.
References findSection().
Referenced by setVariable().
configNode * VegaConfig::findSection | ( | string | section, |
configNode * | startnode | ||
) |
Definition at line 366 of file configxml.cpp.
References easyDomNode::subnodes.
Referenced by findEntry(), and setVariable().
void VegaConfig::getColor | ( | configNode * | node, |
string | name, | ||
float | color[4], | ||
bool | have_color = false |
||
) |
Definition at line 332 of file configxml.cpp.
References configNode::color, vColor::g, and easyDomNode::subnodes.
Referenced by checkColor(), DockBoxColor(), DrawDamageFlash(), drawlistitem(), DrawNode(), NavigationSystem::DrawSystem(), GameCockpit::GameCockpit(), getColor(), getConfigColor(), getDamageColor(), gethColor(), getSphereColor(), getUnitTypeColor(), GFXInit(), anonymous_namespace{sensor.cpp}::RetrColor(), RetrColor(), and NavigationSystem::Setup().
Definition at line 76 of file configxml.h.
References getColor().
Definition at line 304 of file configxml.cpp.
References float, and getColor().
string VegaConfig::getVariable | ( | string | section, |
string | name, | ||
string | defaultvalue | ||
) |
Definition at line 267 of file configxml.cpp.
References map_variables.
Referenced by abletodock(), FlyByWire::Accel(), accelStarHandler(), Radar::CollectRadarTracks::acquire(), ActuallyWarpTo(), GamePlanet::AddAtmosphere(), Unit::AddCargo(), GamePlanet::AddCity(), AddDocks(), HaloSystem::AddHalo(), AddLights(), AddMounts(), GamePlanet::AddRing(), addShieldMesh(), AddSounds(), Unit::AddVelocity(), Pilot::adjustSpecificRelationship(), Orders::AggressiveAI::AfterburnerJumpTurnTowards(), Orders::AggressiveAI::AggressiveAI(), AIEvents::AIEvresult::AIEvresult(), aim_assist(), AllocVerticesForSystem(), AllUnitsCloseAndEngage(), Unit::ApplyDamage(), Unit::ApplyLocalDamage(), Unit::ApplyNetDamage(), GameUnit< UnitType >::ArmorDamageSound(), Arrested(), AUDAdjustSound(), AUDInit(), AUDQueryAudability(), NetClient::authenticate(), GameCockpit::AutoLanding(), Cockpit::Autopilot(), GameCockpit::Autopilot(), Unit::AutoPilotToErrorMessage(), Background::Background(), basicRepairPrice(), PointStarVlist::BeginDrawState(), BeamXML::beginElement(), StarSystemGent::beginStar(), biModifyMouseSensitivity(), BlurBases(), bolt_draw::bolt_draw(), bootstrap_draw(), bootstrap_first_loop(), bootstrap_main_loop(), buildCargoDescription(), buyShip(), PaintText::calcLayout(), CalculateNearestWarpUnit(), Animation::CalculateOrientation(), charWidth(), checkedVisited(), ChooseNavPoint(), Orders::FireAt::ChooseTargets(), ChooseTargets(), CityLights::CityLights(), FlyByKeyboard::clamp_axis(), Unit::ClampThrust(), Unit::ClampTorque(), Unit::ClampVelocity(), BaseInterface::Room::Launch::Click(), BaseInterface::Room::Eject::Click(), Unit::Cloak(), CloseEnoughCone(), CloseEnoughToAutotrack(), CloseEnoughToNavOrDest(), Bolt::Collide(), Beam::Collide(), Unit::Collide(), Unit::CollideAll(), collideTrees::colTree(), Order::Communicate(), CommunicatingAI::CommunicatingAI(), CompileRunPython(), ComputeMinDowngradePercent(), computeStarColor(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), ConfigAllows(), ConfigCondition(), BaseComputer::configureUpgradeCommitControls(), NetClient::connectLoad(), BaseComputer::constructControls(), GameStarSystem::createBackground(), CreateCargoForOwnerStarship(), BaseComputer::createCategoryCell(), CreateLists(), GameMenu::createNetworkControls(), Unit::DamageRandSys(), Unit::DealDamageToHullReturnArmor(), GameUnit< UnitType >::DealDamageToShield(), DealPossibleJumpDamage(), DealWithWarp(), Unit::DecreaseWarpEnergy(), delayucharStarHandler(), DestroyPlayerSystem(), DestroySystem(), Mission::DirectorStart(), DistanceWarrantsWarpTo(), GameCockpit::DoAutoLanding(), DockedScript(), Orders::DockingOps::DockingOps(), DockToSavedBases(), Orders::DockingOps::DockToTarget(), DoDockingOps(), DoEnterExitAni(), Pilot::DoHit(), DoParticles(), ParticlePoint::Draw(), Radar::SphereDisplay::Draw(), Halo::Draw(), Bolt::Draw(), Background::Draw(), WarpTrail::Draw(), HaloSystem::Draw(), Animation::Draw(), SpriteStarVlist::Draw(), GamePlanet::Draw(), VDU::Draw(), Stars::Draw(), GameUnit< UnitType >::Draw(), GameCockpit::Draw(), BaseInterface::Room::BaseText::Draw(), BaseInterface::Room::BaseShip::Draw(), BaseInterface::Room::BaseVSSprite::Draw(), BaseInterface::Room::BaseTalk::Draw(), BaseInterface::Room::Draw(), NavigationSystem::Draw(), BaseInterface::Draw(), ParticleTrail::DrawAndUpdate(), NavigationSystem::DrawButton(), drawChars(), NavigationSystem::DrawCursor(), DrawDamageFlash(), drawdescription(), NavigationSystem::DrawGrid(), DrawHUDSprite(), NavigationSystem::DrawMission(), GameCockpit::DrawNavSystem(), DrawNodeDescription(), GameUnit< UnitType >::DrawNow(), DrawObjectivesTextPlane(), DrawOneTargetBox(), DrawShield(), NavigationSystem::DrawShip(), NavigationSystem::DrawSystem(), Radar::SphereDisplay::DrawTrack(), Unit::EjectCargo(), Unit::EnergyData(), EstimateGain(), NavPath::evaluate(), Orders::TurretAI::Execute(), FlyByJoystick::Execute(), PlanetaryOrbit::Execute(), Orders::AggressiveAI::Execute(), Orders::FireAt::Execute(), FlyByKeyboard::Execute(), Order::Execute(), Orders::ChangeHeading::Execute(), Orders::AutoLongHaul::Execute(), EvadeLeftRightC::Execute(), FireKeyboard::Execute(), Orders::FormUp::Execute(), Orders::FormUpToOwner::Execute(), FlyByWire::Execute(), Orders::LoopAround::Execute(), Orders::FacePerpendicular::Execute(), FlyTo::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), ExecuteRequestClearenceKey(), GameUnit< UnitType >::Explode(), Unit::ExplodingProgress(), Missile::ExplosionRadius(), Unit::ExplosionRadius(), Orders::FacePerpendicular::FacePerpendicular(), Orders::FaceTargetITTS::FaceTargetITTS(), Unit::FilterDowngradeList(), Unit::FilterUpgradeList(), Radar::Sensor::FindTracksInRange(), Unit::Fire(), Orders::FireAt::FireAt(), FireBitmask(), Unit::FireEngines(), Orders::FireAt::FireWeapons(), flickerDamage(), FlyByKeyboard::FlyByKeyboard(), FlyByWire::FlyByWire(), ForceChangeTarget(), Unit::ForceDock(), GameCockpit::GameCockpit(), GameMissile::GameMissile(), Universe::Generate1(), Universe::Generate2(), GenerateAutoError(), generateStarSystem(), Pilot::getAnger(), getAutoRSize(), vs_options::getCallsign(), ROLES::getCapitalRoles(), BaseComputer::getColorForGroup(), FSM::getCommMessageMood(), getControlType(), getDefaultProgram(), FSM::GetEdgesString(), getFuelConversion(), GetFuelUsage(), getInitialZoomFactor(), Mesh::getLOD(), GetMadAt(), Unit::GetManifest(), getMasterPartListUnitName(), UnitUtil::getPhysicsPriority(), CommunicatingAI::GetRandomUnit(), UniverseUtil::getSaveInfo(), GameCockpit::getsoundending(), StarSystemGent::getStarColorFromRadius(), getStringFont(), getStringFontForHeight(), UniverseUtil::getSubVariable(), getTemplate(), BaseUtil::GetTextHeight(), Unit::getTractorability(), getUnitNameAndFgNoBase(), getVariable(), UniverseUtil::getVariable(), Unit::GetVelocityDifficultyMult(), GFXCircle(), GFXInit(), GFXShaderReloaded(), GFXTransferTexture(), GoTo(), Music::GotoSong(), HoldPositionWithRespectTo(), howFarToJump(), GameUnit< UnitType >::HullDamageSound(), Unit::ImportPartList(), Unit::IncreaseWarpEnergy(), vs_options::init(), Beam::Init(), NetClient::init(), Unit::Init(), init_opengl_extensions(), BaseInterface::InitCallbacks(), initfov(), VSFileSystem::InitMods(), Music::InitMuzak(), VSFileSystem::InitPaths(), Planet::InitPlanet(), Mesh::initTechnique(), InitUnitTables(), Unit::InsideCollideTree(), LinearPrediction::Interpolate(), UnitUtil::isCloseEnoughToDock(), isMissile(), Unit::jumpReactToCollision(), Unit::Kill(), LaunchOneParticle(), Texture::Load(), AIEvents::LoadAI(), BaseComputer::loadCargoControls(), VSFileSystem::LoadConfig(), Mesh::LoadMeshes(), BaseComputer::loadNewsControls(), Unit::LoadRow(), BaseComputer::loadSellUpgradeControls(), Nebula::LoadXML(), NetClient::loginAcctLoop(), NetClient::loginLoop(), GameCockpit::LookupUnitStat(), Orders::LoopAround::LoopAround(), Orders::LoopAroundAgro::LoopAroundAgro(), main(), MakeFogMesh(), Unit::makeMasterPartList(), StarSystemGent::MakePlanet(), Unit::massSerializer(), MatchingMood(), Unit::Computer::max_ab_speed(), max_allowable_travel_time(), Unit::Computer::max_speed(), Mount::Mount(), BaseInterface::MouseOver(), Music::Music(), Music::Mute(), MyFunction(), Nearby(), NearestSystem(), BaseComputer::newsPickerChangedSelection(), NoDockWithClear(), Orders::DockingOps::PerformDockingOperations(), Mount::PhysicsAlignedFire(), Pilot::Pilot(), Orders::FireAt::PossiblySwitchTarget(), Mesh::PostProcessLoading(), preEmptiveClientFire(), PrettyDistanceString(), Unit::PriceCargo(), Priority(), Orders::AggressiveAI::ProcessCurrentFgDirective(), Logo::ProcessDrawQueue(), Beam::ProcessDrawQueue(), Orders::AggressiveAI::ProcessLogicItem(), Slider::processMouseDown(), StaticDisplay::processMouseDown(), Picker::processMouseDown(), StarSystem::ProcessPendingJumps(), Mesh::ProcessZFarMeshes(), pushTowardsMean(), GameNebula::PutInsideCam(), Unit::rayCollide(), GameMissile::reactToCollision(), GamePlanet::reactToCollision(), Missile::reactToCollision(), Unit::reactToCollision(), StarSystemGent::readColorGrads(), Muzak::readerThread(), BaseComputer::recalcTitle(), Orders::AggressiveAI::ReCommandWing(), FlyByKeyboard::reduce_axis(), Unit::RefillWarpEnergy(), weapon_info::Refire(), Unit::RegenShields(), Orders::FireAt::ReInit(), Unit::RemoveCargo(), Unit::RemoveFromSystem(), Unit::Repair(), Unit::RepairUpgrade(), Unit::ResolveForces(), NetClient::Respawn(), RestoreEnvmapState(), RestoreGlowMapState(), Cockpit::RestoreGodliness(), RestoreSpecMapState(), RollLeftHard(), RollRightHard(), saturate(), SaturatedColor(), ScaleJumpRadius(), ScoreKill(), CommunicatingAI::selectCommunicationMessage(), sellShip(), NetServer::sendDamages(), NetClient::sendPosition(), NetServer::sendUnDock(), NetClient::SetConfigServerAddress(), SetFogMaterialColor(), ShipCommands::setkps(), FireKeyboard::SetParent(), FireKeyboard::SetShieldsOff(), FireKeyboard::SetShieldsOneThird(), FireKeyboard::SetShieldsTwoThird(), SetStartupView(), GameCockpit::SetStaticAnimation(), Unit::SetTurretAI(), NavigationSystem::Setup(), SetupGLLightGlobals(), SetupSpecMapFirstPass(), SetupViewport(), GameCockpit::SetupViewPort(), GameCockpit::Shake(), Unit::ShieldUp(), HaloSystem::ShouldDraw(), Orders::FireAt::ShouldFire(), ShoveCamBelowUnit(), BaseComputer::showPlayerInfo(), BaseComputer::showShipStats(), ShowText(), showUnitStats(), soundServerPipes(), speedStarHandler(), GameUnit< UnitType >::Split(), SpriteStarVlist::SpriteStarVlist(), Stars::Stars(), AccountServer::start(), NetServer::start(), VDU::staticable(), SwitchUnits2(), SwitchUnitsTurret(), NetClient::synchronizeTime(), TargAll(), TargNear(), TargSig(), TargUn(), CockpitKeys::TextMessageKey(), BaseUtil::Texture(), GameUnit< UnitType >::Thrust(), WeaponComparator< FORWARD >::ToggleWeaponSet(), totalShieldEnergyCapacitance(), trackPrice(), GameUnit< UnitType >::TransferUnitToSystem(), TryDock(), Unit::UnDock(), Cockpit::unitInAutoRegion(), Unit::UpAndDownGrade(), Universe::Update(), Cockpit::Update(), Cockpit::updateAttackers(), CommunicatingAI::UpdateContrabandSearch(), Beam::UpdatePhysics(), Unit::UpdatePhysics(), GameNebula::UpdatePhysics2(), Missile::UpdatePhysics2(), BaseComputer::updateTransactionControlsForSelection(), GameCockpit::UpdAutoPilot(), Unit::UpgradeMounts(), useAfterburner(), useAfterburnerToFollow(), useAfterburnerToRun(), useJitteryAutopilot(), useStroke(), GameCockpit::visitSystem(), UniverseUtil::vsConfig(), VSFS_DEBUG(), WARPENERGYMULTIPLIER(), GameUnit< UnitType >::WarpMatrix(), WarpPursuit(), WarpToP(), winsys_init(), StarSystemGent::WriteLight(), Unit::WriteUnit(), and Unit::WriteUnitString().
string VegaConfig::getVariable | ( | string | section, |
string | subsection, | ||
string | name, | ||
string | defaultvalue | ||
) |
|
protected |
Definition at line 280 of file configxml.cpp.
References easyDomNode::attr_value(), getVariable(), XMLSupport::parse_bool(), and easyDomNode::subnodes.
void VegaConfig::setVariable | ( | configNode * | entry, |
string | value | ||
) |
Definition at line 382 of file configxml.cpp.
References easyDomNode::set_attribute().
Referenced by GameMenu::readJoinGameControls(), and setVariable().
bool VegaConfig::setVariable | ( | string | section, |
string | name, | ||
string | value | ||
) |
Definition at line 389 of file configxml.cpp.
References findEntry(), findSection(), map_variables, setVariable(), and variables.
bool VegaConfig::setVariable | ( | string | section, |
string | subsection, | ||
string | name, | ||
string | value | ||
) |
Definition at line 403 of file configxml.cpp.
References findEntry(), findSection(), map_variables, setVariable(), and variables.
|
inline |
Definition at line 64 of file configxml.h.
Referenced by GameVegaConfig::GameVegaConfig().
Definition at line 66 of file configxml.h.
Definition at line 65 of file configxml.h.
Referenced by FlyByJoystick::Execute(), and GameVegaConfig::GameVegaConfig().
|
protected |
Definition at line 95 of file configxml.h.
Referenced by checkConfig(), and ~VegaConfig().
|
protected |
Definition at line 96 of file configxml.h.
Referenced by doColors(), VegaConfig(), and ~VegaConfig().
float VegaConfig::hatswitch[MAX_HATSWITCHES][MAX_VALUES] |
Definition at line 69 of file configxml.h.
Referenced by GameVegaConfig::GameVegaConfig(), and ProcessJoystick().
int VegaConfig::hatswitch_axis[MAX_HATSWITCHES] |
Definition at line 71 of file configxml.h.
Referenced by ProcessJoystick().
int VegaConfig::hatswitch_joystick[MAX_HATSWITCHES] |
Definition at line 72 of file configxml.h.
Referenced by ProcessJoystick().
float VegaConfig::hatswitch_margin[MAX_HATSWITCHES] |
Definition at line 70 of file configxml.h.
Referenced by GameVegaConfig::GameVegaConfig(), and ProcessJoystick().
|
protected |
Definition at line 99 of file configxml.h.
|
protected |
Definition at line 98 of file configxml.h.
Referenced by checkColor(), and getColor().
|
protected |
Definition at line 97 of file configxml.h.
Referenced by doVar(), getVariable(), and setVariable().
|
protected |
Definition at line 94 of file configxml.h.
Referenced by doVariables(), setVariable(), Variables(), VegaConfig(), and ~VegaConfig().