Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <cockpit_generic.h>
Public Member Functions | |
virtual void | setTargetLabel (const string &msg) |
virtual string | getTargetLabel () |
void | updateAttackers () |
virtual void | ReceivedTargetInfo () |
bool | autoInProgress () |
bool | unitInAutoRegion (Unit *un) |
void | SetView (const enum VIEWSTYLE tmp) |
Sets the current viewstyle. More... | |
enum VIEWSTYLE | GetView () |
virtual void | InitStatic () |
virtual void | Shake (float amt, int level) |
virtual int | Autopilot (Unit *target) |
void | RestoreGodliness () |
virtual void | RestoreViewPort () |
Restores the view from the IDentity Matrix needed to draw sprites. More... | |
std::string & | GetUnitFileName (unsigned int which=0) |
std::string & | GetUnitSystemName (unsigned int which=0) |
std::string & | GetUnitBaseName (unsigned int which=0) |
const std::string & | GetUnitFileName (unsigned int which=0) const |
const std::string & | GetUnitSystemName (unsigned int which=0) const |
const std::string & | GetUnitBaseName (unsigned int which=0) const |
void | RemoveUnit (unsigned int which=0) |
std::string | GetUnitModifications () |
size_t | GetNumUnits () const |
void | PackUnitInfo (vector< std::string > &info) const |
void | UnpackUnitInfo (vector< std::string > &info) |
Cockpit (const char *file, Unit *parent, const std::string &pilotname) | |
virtual | ~Cockpit () |
virtual float | LookupTargetStat (int stat, Unit *target) |
Looks up a particular Gauge stat on target unit. More... | |
virtual void | Init (const char *file, bool defaultCockpit=false) |
Loads cockpit info...just as constructor. More... | |
void | recreate (const std::string &pilotname) |
virtual void | SetParent (Unit *unit, const char *filename, const char *unitmodname, const QVector &startloc) |
Unit * | GetParent () |
Unit * | GetSaveParent () |
virtual void | Draw () |
Draws Cockpit then restores viewport. More... | |
bool | Update () |
virtual void | UpdAutoPilot () |
virtual void | SetupViewPort (bool clip=true) |
Sets up the world for rendering...call before draw. More... | |
virtual int | getVDUMode (int vdunum) |
virtual void | VDUSwitch (int vdunum) |
virtual void | ScrollVDU (int vdunum, int howmuch) |
virtual void | ScrollAllVDU (int howmuch) |
virtual int | getScrollOffset (unsigned int whichtype) |
virtual void | SelectProperCamera () |
virtual void | Eject () |
virtual void | EjectDock () |
virtual void | SetInsidePanYawSpeed (float speed) |
virtual void | SetInsidePanPitchSpeed (float speed) |
virtual void | SetCommAnimation (Animation *ani, Unit *un) |
virtual void | SetStaticAnimation () |
virtual NavigationSystem * | AccessNavSystem () |
Accesses the current navigationsystem. More... | |
virtual std::string | GetNavSelectedSystem () |
virtual Camera * | AccessCamera () |
Accesses the current camera. More... | |
virtual Camera * | AccessCamera (int) |
Returns the passed in cam. More... | |
virtual void | SelectCamera (int) |
Changes current camera to selected camera. More... | |
virtual void | SetViewport () |
GFXLoadMatrix proper camera. More... | |
virtual void | visitSystem (std::string systemName) |
virtual bool | SetDrawNavSystem (bool) |
virtual bool | CanDrawNavSystem () |
virtual bool | DrawNavSystem () |
virtual bool | CheckCommAnimation (Unit *un) |
virtual void | OnPauseBegin () |
virtual void | OnPauseEnd () |
virtual void | OnDockEnd (Unit *, Unit *) |
virtual void | OnJumpBegin (Unit *) |
virtual void | OnJumpEnd (Unit *) |
Static Public Member Functions | |
static bool | tooManyAttackers () |
static std::string | MakeBaseName (const Unit *base) |
static void | Respawn (const KBData &, KBSTATE) |
static void | SwitchControl (const KBData &, KBSTATE) |
static void | ForceSwitchControl (const KBData &, KBSTATE) |
static void | TurretControl (const KBData &, KBSTATE) |
Public Attributes | |
double | secondsWithZeroEnergy |
int | number_of_attackers |
unsigned int | retry_dock |
double | TimeOfLastCollision |
char | jumpok |
float | godliness |
std::string | communication_choices |
float | credits |
float | zoomfactor |
How far away chasecam and pan cam is. More... | |
class Flightgroup * | fg |
Sets owner of this cockpit. More... | |
class StarSystem * | activeStarSystem |
class SaveGame * | savegame |
Protected Member Functions | |
virtual void | LoadXML (const char *file) |
virtual void | LoadXML (VSFileSystem::VSFile &f) |
virtual void | beginElement (const string &name, const AttributeList &attributes) |
virtual void | endElement (const string &name) |
virtual void | Delete () |
Destructs cockpit info for new loading. More... | |
virtual void | DrawNavigationSymbol (const Vector &loc, const Vector &p, const Vector &q, float size) |
draws the navigation symbol around targetted location More... | |
virtual float | computeLockingSymbol (Unit *par) |
draws the target box around targetted unit More... | |
virtual void | DrawTargetBox () |
virtual void | DrawTargetBoxes (const Radar::Sensor &) |
draws the target box around all units More... | |
virtual void | DrawTurretTargetBoxes () |
draws a target cross around all units targeted by your turrets // ** jay More... | |
virtual void | DrawTacticalTargetBox () |
Shows the flightgroup's target, if any. More... | |
virtual void | DrawRadar (const Radar::Sensor &) |
Draws all the tracks on the radar. More... | |
virtual void | DrawGauges (Unit *un) |
Draws gauges. More... | |
Static Protected Member Functions | |
static void | beginElement (void *userData, const XML_Char *name, const XML_Char **atts) |
static void | endElement (void *userData, const XML_Char *name) |
Protected Attributes | |
enum VIEWSTYLE | view |
style of current view (chase cam, inside) More... | |
int | currentcamera |
float | radar_time |
float | gauge_time [UnitImages< void >::NUMGAUGES] |
float | StartArmor [9] |
float | maxfuel |
saved values to compare with current values (might need more for damage) More... | |
float | maxhull |
UnitContainer | parent |
this is the parent that Cockpit will read data from More... | |
UnitContainer | parentturret |
int | unitfaction |
float | shakin |
4 views f/r/l/b More... | |
std::string | unitmodname |
Video Display Units (may need more than 2 in future) More... | |
float | autopilot_time |
UnitContainer | autopilot_target |
float | cockpit_offset |
float | viewport_offset |
float | cockpit_time |
bool | ejecting |
bool | going_to_dock_screen |
int | partial_number_of_attackers |
The Cockpit Contains all displayable information about a particular Unit * Gauges are used to indicate analog controls, and some diagital ones The ones starting from KPS are digital with text readout
Definition at line 34 of file cockpit_generic.h.
Cockpit::Cockpit | ( | const char * | file, |
Unit * | parent, | ||
const std::string & | pilotname | ||
) |
Definition at line 180 of file cockpit_generic.cpp.
References activeStarSystem, currentcamera, ejecting, fg, going_to_dock_screen, Init(), InitStatic(), jumpok, number_of_attackers, partial_number_of_attackers, RestoreGodliness(), secondsWithZeroEnergy, and TimeOfLastCollision.
|
virtual |
|
inlinevirtual |
Accesses the current camera.
Reimplemented in GameCockpit.
Definition at line 246 of file cockpit_generic.h.
Referenced by CockpitKeys::_PitchDown(), CockpitKeys::_PitchUp(), CockpitKeys::_YawLeft(), CockpitKeys::_YawRight(), GameUniverse::AccessCamera(), FaceCamTarget(), UnitUtil::getPhysicsPriority(), and UpdateCameraSnds().
Returns the passed in cam.
Reimplemented in GameCockpit.
Definition at line 251 of file cockpit_generic.h.
|
inlinevirtual |
Accesses the current navigationsystem.
Reimplemented in GameCockpit.
Definition at line 237 of file cockpit_generic.h.
Referenced by NavPath::addNewPath(), NavPath::evaluate(), AbsolutePathNode::getDescription(), CurrentPathNode::initSearchQueue(), TargetPathNode::initSearchQueue(), CriteriaContains::isDestination(), CriteriaOwnedBy::isDestination(), CriteriaSector::isDestination(), CurrentPathNode::isDestination(), TargetPathNode::isDestination(), NavPath::removeOldPath(), NavPath::setDestinationNode(), and NavPath::setSourceNode().
|
inline |
Definition at line 117 of file cockpit_generic.h.
Referenced by Orders::AggressiveAI::Execute(), Orders::FormUp::Execute(), Orders::FormUpToOwner::Execute(), FlyTo::Execute(), and Orders::AggressiveAI::ExecuteNoEnemies().
Reimplemented in GameCockpit.
Definition at line 289 of file cockpit_generic.cpp.
References autopilot_target, autopilot_time, Unit::AutoPilotTo(), FaceTarget(), GetElapsedTime(), GetParent(), getTimeCompression(), VegaConfig::getVariable(), XMLSupport::parse_bool(), XMLSupport::parse_float(), UnitContainer::SetUnit(), vs_config, and zoomfactor.
Referenced by FlyByKeyboard::Execute().
|
staticprotected |
Definition at line 41 of file cockpit_generic.cpp.
|
inlineprotectedvirtual |
Definition at line 71 of file cockpit_generic.h.
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 264 of file cockpit_generic.h.
Referenced by FireKeyboard::Execute().
Reimplemented in GameCockpit.
Definition at line 272 of file cockpit_generic.h.
Referenced by FireKeyboard::ProcessCommMessage().
draws the target box around targetted unit
Definition at line 78 of file cockpit_generic.h.
|
protectedvirtual |
Destructs cockpit info for new loading.
Definition at line 147 of file cockpit_generic.cpp.
Referenced by ~Cockpit().
|
inlinevirtual |
Draws Cockpit then restores viewport.
Reimplemented in GameCockpit.
Definition at line 208 of file cockpit_generic.h.
Referenced by GameStarSystem::Draw().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
draws the navigation symbol around targetted location
Definition at line 76 of file cockpit_generic.h.
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 268 of file cockpit_generic.h.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Shows the flightgroup's target, if any.
Definition at line 88 of file cockpit_generic.h.
Referenced by GameCockpit::Draw().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
draws a target cross around all units targeted by your turrets // ** jay
Definition at line 86 of file cockpit_generic.h.
Referenced by GameCockpit::Draw().
|
virtual |
Reimplemented in GameCockpit.
Definition at line 68 of file cockpit_generic.cpp.
References ejecting, and going_to_dock_screen.
Referenced by FireKeyboard::Execute().
|
virtual |
Reimplemented in GameCockpit.
Definition at line 74 of file cockpit_generic.cpp.
References ejecting, and going_to_dock_screen.
Referenced by FireKeyboard::Execute().
|
staticprotected |
Definition at line 46 of file cockpit_generic.cpp.
|
inlineprotectedvirtual |
Definition at line 72 of file cockpit_generic.h.
Definition at line 231 of file cockpit_generic.h.
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 241 of file cockpit_generic.h.
Referenced by NearestSystem(), and Unit::UpdatePhysics().
|
inline |
Definition at line 174 of file cockpit_generic.h.
Referenced by buyShip(), CreateCargoForOwnerStarshipName(), BaseComputer::loadShipDealerControls(), PackUnitInfo(), sellShip(), and SwapInNewShipName().
|
inline |
Definition at line 202 of file cockpit_generic.h.
Referenced by AddUnitToSystem(), UniverseUtil::AdjustRelation(), FlyByWire::Afterburn(), Unit::ApplyDamage(), GameCockpit::AutoLanding(), Autopilot(), GameCockpit::Autopilot(), Mission::call_unit_launch(), Orders::FireAt::ChooseTargets(), Beam::Collide(), CommunicatingAI::Destroy(), ZoneMgr::displayNPCs(), FireKeyboard::DockKey(), DockToSavedBases(), FireKeyboard::DoSpeechAndAni(), GameStarSystem::Draw(), GameUnit< UnitType >::Draw(), GameCockpit::Draw(), NavigationSystem::Draw(), NavigationSystem::DrawObjectives(), NavigationSystem::DrawShip(), NavigationSystem::DrawSystem(), FlyTo::Execute(), GameUnit< UnitType >::Explode(), NetActionConfirm::finalizeJoinGame(), Mount::Fire(), Unit::ForceDock(), UnitUtil::getPhysicsPriority(), UniverseUtil::getPlayer(), UniverseUtil::getPlayerX(), UniverseUtil::GetRelation(), SaveNetUtil::GetSaveStrings(), GameCockpit::getTargetLabel(), HelpOut(), CockpitKeys::Inside(), isPlayerFaction(), FireKeyboard::JoinFg(), FlyByKeyboard::JumpKey(), LeadMe(), UniverseUtil::loadGame(), LoadMission(), BaseComputer::loadMissionsMasterList(), Unit::PerformDockingOperations(), FireKeyboard::ProcessCommMessage(), RefreshGUI(), NetClient::Respawn(), NetServer::saveAccount(), ScoreKill(), NetServer::sendCustom(), NetServer::sendMessage(), NetServer::sendMission(), NetServer::sendSaveData(), GameCockpit::setTargetLabel(), starSystemOK(), SuicideKey(), SwapInNewShipName(), SwitchUnits(), CockpitKeys::TextMessageCallback(), GameUnit< UnitType >::Thrust(), GameUnit< UnitType >::TransferUnitToSystem(), FireKeyboard::UnDockKey(), Update(), GameCockpit::UpdAutoPilot(), UpdAutoPilot(), and GameUniverse::WriteSaveGame().
Unit * Cockpit::GetSaveParent | ( | ) |
Definition at line 113 of file cockpit_generic.cpp.
Referenced by GameStarSystem::Draw(), UnitUtil::getPhysicsPriority(), TargIncomingMissile(), and WriteSaveGame().
Reimplemented in GameCockpit.
Definition at line 220 of file cockpit_generic.h.
Referenced by FireKeyboard::Execute().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 110 of file cockpit_generic.h.
Referenced by UniverseUtil::getTargetLabel().
|
inline |
Definition at line 154 of file cockpit_generic.h.
Referenced by CreateCargoForOwnerStarship(), PackUnitInfo(), and SwapInNewShipName().
const std::string & Cockpit::GetUnitBaseName | ( | unsigned int | which = 0 ) | const |
|
inline |
Definition at line 140 of file cockpit_generic.h.
Referenced by bootstrap_main_loop(), buyShip(), CreateCargoForOwnerStarship(), CreateCargoForOwnerStarshipName(), PackUnitInfo(), NetClient::Respawn(), sellShip(), SwapInNewShipName(), Update(), and GameUniverse::WriteSaveGame().
const std::string & Cockpit::GetUnitFileName | ( | unsigned int | which = 0 ) | const |
|
inline |
Definition at line 169 of file cockpit_generic.h.
Referenced by buildShipDescription(), buyShip(), and WriteSaveGame().
|
inline |
Definition at line 147 of file cockpit_generic.h.
Referenced by CreateCargoForOwnerStarship(), PackUnitInfo(), sellShip(), and SwapInNewShipName().
const std::string & Cockpit::GetUnitSystemName | ( | unsigned int | which = 0 ) | const |
Reimplemented in GameCockpit.
Definition at line 213 of file cockpit_generic.h.
Referenced by ExamineWhenTargetKey(), and SwitchVDUTo().
|
inline |
Definition at line 128 of file cockpit_generic.h.
References GFXMatrices::view.
Referenced by CockpitKeys::Inside(), CockpitKeys::LookDown(), CockpitKeys::LookLeft(), CockpitKeys::LookRight(), and CockpitKeys::LookUp().
|
virtual |
Loads cockpit info...just as constructor.
Definition at line 81 of file cockpit_generic.cpp.
References VSFileSystem::VSFile::Close(), VSFileSystem::CockpitFile, f, accountXML::file, VSFileSystem::Ok, and VSFileSystem::VSFile::OpenReadOnly().
Referenced by Cockpit(), createObjects(), GameCockpit::Init(), CockpitKeys::Inside(), recreate(), and SwitchUnits2().
|
virtual |
Reimplemented in GameCockpit.
Definition at line 160 of file cockpit_generic.cpp.
Referenced by Cockpit().
|
inlineprotectedvirtual |
Definition at line 67 of file cockpit_generic.h.
|
inlineprotectedvirtual |
Definition at line 68 of file cockpit_generic.h.
Looks up a particular Gauge stat on target unit.
Reimplemented in GameCockpit.
Definition at line 190 of file cockpit_generic.h.
|
static |
Definition at line 943 of file cockpit_generic.cpp.
References Unit::getFgSubnumber(), Unit::getFlightgroup(), Unit::getFullname(), Flightgroup::name, and XMLSupport::tostring().
Referenced by CreateCargoForOwnerStarship(), and SwapInNewShipName().
Reimplemented in GameCockpit.
Definition at line 279 of file cockpit_generic.h.
Referenced by Unit::UnDock().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 280 of file cockpit_generic.h.
Referenced by StarSystem::JumpTo().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 281 of file cockpit_generic.h.
Referenced by StarSystem::ProcessPendingJumps().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 277 of file cockpit_generic.h.
Referenced by FireKeyboard::Execute().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 278 of file cockpit_generic.h.
Referenced by FireKeyboard::Execute().
void Cockpit::PackUnitInfo | ( | vector< std::string > & | info) | const |
Definition at line 865 of file cockpit_generic.cpp.
References GetNumUnits(), GetUnitBaseName(), GetUnitFileName(), GetUnitSystemName(), and i.
Referenced by SaveNetUtil::GetSaveStrings(), and WriteSaveGame().
|
inlinevirtual |
void Cockpit::recreate | ( | const std::string & | pilotname) |
Definition at line 271 of file cockpit_generic.cpp.
References Init(), savegame, and SaveGame::SetCallsign().
void Cockpit::RemoveUnit | ( | unsigned int | which = 0 ) |
Definition at line 933 of file cockpit_generic.cpp.
Referenced by sellShip(), and SwapInNewShipName().
Definition at line 229 of file cockpit_generic.h.
void Cockpit::RestoreGodliness | ( | ) |
Definition at line 152 of file cockpit_generic.cpp.
References VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.
Referenced by Cockpit(), and Unit::RestoreGodliness().
|
inlinevirtual |
Restores the view from the IDentity Matrix needed to draw sprites.
Reimplemented in GameCockpit.
Definition at line 138 of file cockpit_generic.h.
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 219 of file cockpit_generic.h.
Referenced by CockpitKeys::ScrollDown(), and CockpitKeys::ScrollUp().
|
inlinevirtual |
Changes current camera to selected camera.
Reimplemented in GameCockpit.
Definition at line 256 of file cockpit_generic.h.
Referenced by GameUniverse::SelectCamera().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 224 of file cockpit_generic.h.
Referenced by GameUniverse::StartDraw().
Reimplemented in GameCockpit.
Definition at line 233 of file cockpit_generic.h.
Referenced by UnitUtil::commAnimation(), UnitUtil::communicateTo(), FireKeyboard::DoSpeechAndAni(), and MyFunction().
Reimplemented in GameCockpit.
Definition at line 260 of file cockpit_generic.h.
|
virtual |
Reimplemented in GameCockpit.
Definition at line 860 of file cockpit_generic.cpp.
Referenced by CockpitKeys::LookDown(), and CockpitKeys::LookUp().
|
virtual |
Reimplemented in GameCockpit.
Definition at line 855 of file cockpit_generic.cpp.
Referenced by CockpitKeys::LookLeft(), and CockpitKeys::LookRight().
|
virtual |
Definition at line 120 of file cockpit_generic.cpp.
References _Universe, Universe::activeStarSystem(), Unit::ArmorData(), Unit::faction, Unit::FuelData(), Unit::getFlightgroup(), Unit::GetHull(), and SERVER.
Referenced by buyShip(), createObjects(), Unit::EjectCargo(), NetClient::Respawn(), and Update().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 234 of file cockpit_generic.h.
Referenced by CommunicatingAI::Destroy().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 109 of file cockpit_generic.h.
Referenced by UniverseUtil::setTargetLabel().
|
inlinevirtual |
Sets up the world for rendering...call before draw.
Reimplemented in GameCockpit.
Definition at line 212 of file cockpit_generic.h.
Referenced by GameStarSystem::Draw(), and GameUnit< UnitType >::Draw().
|
inline |
Sets the current viewstyle.
Definition at line 124 of file cockpit_generic.h.
References GFXMatrices::view.
Referenced by GameCockpit::Autopilot(), CockpitKeys::Behind(), GameCockpit::Draw(), CockpitKeys::InitPanInside(), CockpitKeys::Inside(), CockpitKeys::InsideBack(), CockpitKeys::InsideLeft(), CockpitKeys::InsideRight(), CockpitKeys::OutsideTarget(), CockpitKeys::Pan(), CockpitKeys::PanTarget(), NetClient::Respawn(), SetStartupView(), and CockpitKeys::ViewTarget().
|
inlinevirtual |
GFXLoadMatrix proper camera.
Reimplemented in GameCockpit.
Definition at line 258 of file cockpit_generic.h.
Referenced by GameUniverse::SetViewport().
Reimplemented in GameCockpit.
Definition at line 133 of file cockpit_generic.h.
Referenced by Unit::ApplyNetDamage().
Definition at line 230 of file cockpit_generic.h.
|
static |
Definition at line 407 of file cockpit_generic.cpp.
References too_many_attackers.
Referenced by Orders::FireAt::ShouldFire().
Definition at line 232 of file cockpit_generic.h.
Definition at line 165 of file cockpit_generic.cpp.
References UnitUtil::getSignificantDistance(), VegaConfig::getVariable(), XMLSupport::parse_float(), and vs_config.
Referenced by FlyTo::Execute(), and Orders::AggressiveAI::ExecuteNoEnemies().
void Cockpit::UnpackUnitInfo | ( | vector< std::string > & | info) |
Definition at line 880 of file cockpit_generic.cpp.
References i.
Referenced by bootstrap_main_loop(), NetClient::Respawn(), and Update().
bool Cockpit::Update | ( | ) |
Definition at line 497 of file cockpit_generic.cpp.
References _Universe, Universe::AccessCockpit(), active_missions, activeStarSystem, Universe::activeStarSystem(), StarSystem::AddUnit(), Background::Cache(), Universe::clearAllSystems(), CopySavedShips(), UnitCollection::createIterator(), UnitFactory::createUnit(), credits, Universe::CurrentCockpit(), Unit::DisableTurretAI(), dockingdistance(), DockToSavedBases(), DoCockpitKeys(), Unit::EjectCargo(), ejecting, Unit::EndRequestClearance(), Unit::EnergyData(), fg, findUnitInStarsystem(), Flightgroup::flightgroup_nr, Background::BackgroundClone::FreeClone(), Universe::GenerateStarSystem(), Universe::getActiveStarSystem(), StarSystem::getBackground(), SaveGame::GetCallsign(), Unit::GetDestinations(), StarSystem::getFileName(), GetFinalTurret(), Universe::getNumActiveStarSystem(), GetParent(), SaveGame::GetPlayerLocation(), Unit::getRelation(), SaveGame::GetSavedCredits(), UnitUtil::getSignificantDistance(), SaveGame::GetStarSystem(), Unit::getSubUnits(), UnitContainer::GetUnit(), GetUnitFileName(), StarSystem::getUnitList(), VegaConfig::getVariable(), Mission::getVariable(), going_to_dock_screen, UniverseUtil::hideSplashScreen(), i, index, Unit::IsCleared(), Unit::isDocked(), Universe::isPlayerStarship(), Unit::isUnit(), jumpok, k, Unit::Kill(), SaveGame::LoadSavedMissions(), Magnitude(), MISSILEPTR, mission, Unit::name, Network, Flightgroup::nr_ships, Flightgroup::nr_ships_left, Universe::numPlayers(), Unit::owner, parentturret, XMLSupport::parse_bool(), XMLSupport::parse_float(), SaveGame::ParseSaveGame(), PLANETPTR, Universe::popActiveStarSystem(), Unit::Position(), PowerDownShield(), Universe::pushActiveStarSystem(), QVector, SaveGame::ReloadPickledData(), RequestClearence(), NetClient::respawnRequest(), respawnunit, retry_dock, Unit::rSize(), UniverseUtil::SafeEntrancePoint(), savegame, secondsWithZeroEnergy, SERVER, Unit::SetCurPosition(), SetParent(), SaveGame::SetPlayerLocation(), SaveGame::SetStarSystem(), Unit::SetTurretAI(), UnitContainer::SetUnit(), Unit::shield, SIMULATION_ATOM, StarSystem::SwapIn(), StarSystem::SwapOut(), switchunit, SwitchUnits(), SwitchUnitsTurret(), Unit::Target(), turretcontrol, unitfaction, unitmodname, UnpackUnitInfo(), UpdAutoPilot(), Vector, vs_config, and zoomfactor.
Referenced by StarSystem::Update().
void Cockpit::updateAttackers | ( | ) |
Definition at line 412 of file cockpit_generic.cpp.
References _Universe, Universe::AccessCockpit(), Universe::activeStarSystem(), UnitCollection::createIterator(), Unit::getAverageGunSpeed(), UnitUtil::getDistance(), StarSystem::getUnitList(), VegaConfig::getVariable(), UnitCollection::UnitIterator::isDone(), number_of_attackers, Universe::numPlayers(), parent, XMLSupport::parse_int(), partial_number_of_attackers, speed, Unit::Target(), too_many_attackers, and vs_config.
Referenced by StarSystem::Update().
|
virtual |
Reimplemented in GameCockpit.
Definition at line 373 of file cockpit_generic.cpp.
References autopilot_target, autopilot_time, Unit::AutoPilotTo(), GetParent(), UnitContainer::GetUnit(), UnitContainer::SetUnit(), and SIMULATION_ATOM.
Referenced by Update().
|
inlinevirtual |
Reimplemented in GameCockpit.
Definition at line 217 of file cockpit_generic.h.
Referenced by CockpitKeys::SwitchLVDU(), CockpitKeys::SwitchMVDU(), CockpitKeys::SwitchRVDU(), CockpitKeys::SwitchULVDU(), CockpitKeys::SwitchUMVDU(), CockpitKeys::SwitchURVDU(), and SwitchVDUTo().
|
virtual |
Reimplemented in GameCockpit.
Definition at line 840 of file cockpit_generic.cpp.
References UniverseUtil::GetAdjacentSystem(), UniverseUtil::GetNumAdjacentSystems(), i, and visitSystemHelp().
Referenced by NavigationSystem::Setup(), Unit::TransferUnitToSystem(), and GameCockpit::visitSystem().
class StarSystem* Cockpit::activeStarSystem |
Definition at line 200 of file cockpit_generic.h.
Referenced by Cockpit(), createObjects(), ZoneMgr::displayNPCs(), ExecuteDirector(), SaveNetUtil::GetSaveStrings(), Unit::getStarSystem(), NebulaUpdate(), processDelayedMissions(), UniverseUtil::receivedCustom(), NetClient::Respawn(), GameUniverse::StartDraw(), Unit::TransferUnitToSystem(), StarSystem::Update(), Update(), GameNebula::UpdatePhysics2(), and WriteSaveGame().
|
protected |
Definition at line 62 of file cockpit_generic.h.
Referenced by Autopilot(), GameCockpit::Autopilot(), GameCockpit::UpdAutoPilot(), and UpdAutoPilot().
|
protected |
Color of cockpit default text The font that the entire cockpit will use. Currently without color
Definition at line 61 of file cockpit_generic.h.
Referenced by Autopilot(), GameCockpit::Autopilot(), GameCockpit::UpdAutoPilot(), and UpdAutoPilot().
|
protected |
two values that represent the adjustment to perspective needed to center teh crosshairs in the perceived view.
Definition at line 66 of file cockpit_generic.h.
Referenced by GameCockpit::DrawNavSystem(), and GameCockpit::SetupViewPort().
|
protected |
Definition at line 93 of file cockpit_generic.h.
Referenced by GameCockpit::Draw(), and GameCockpit::InitStatic().
std::string Cockpit::communication_choices |
Definition at line 183 of file cockpit_generic.h.
Referenced by FireKeyboard::Execute().
float Cockpit::credits |
Definition at line 184 of file cockpit_generic.h.
Referenced by UnitUtil::addCredits(), bootstrap_main_loop(), BaseComputer::buySelectedCargo(), buyShip(), BaseComputer::buyUpgrade(), BaseComputer::BuyUpgradeOperation::concludeTransaction(), BaseComputer::SellUpgradeOperation::concludeTransaction(), BaseComputer::configureUpgradeCommitControls(), Unit::FilterUpgradeList(), BaseComputer::fixUpgrade(), Unit::ForceDock(), UnitUtil::getCredits(), SaveNetUtil::GetSaveStrings(), BaseComputer::isTransactionOK(), BaseComputer::maxQuantityForPlayer(), BaseComputer::recalcTitle(), NetClient::Respawn(), BaseComputer::sellSelectedCargo(), sellShip(), BaseComputer::sellUpgrade(), Update(), BaseComputer::updateTransactionControlsForSelection(), GameUniverse::WriteSaveGame(), and WriteSaveGame().
|
protected |
Definition at line 39 of file cockpit_generic.h.
Referenced by Cockpit(), GameCockpit::DrawNavSystem(), and GameCockpit::SelectCamera().
|
protected |
Definition at line 94 of file cockpit_generic.h.
Referenced by Cockpit(), GameCockpit::Eject(), Eject(), GameCockpit::EjectDock(), EjectDock(), and Update().
class Flightgroup* Cockpit::fg |
Sets owner of this cockpit.
Definition at line 199 of file cockpit_generic.h.
Referenced by Cockpit(), NetClient::Respawn(), and Update().
|
protected |
Definition at line 41 of file cockpit_generic.h.
Referenced by GameCockpit::InitStatic().
float Cockpit::godliness |
Definition at line 134 of file cockpit_generic.h.
Referenced by Unit::DealDamageToHullReturnArmor().
|
protected |
Definition at line 95 of file cockpit_generic.h.
Referenced by Cockpit(), GameCockpit::Eject(), Eject(), GameCockpit::EjectDock(), EjectDock(), and Update().
char Cockpit::jumpok |
Definition at line 108 of file cockpit_generic.h.
Referenced by Cockpit(), GameCockpit::LookupUnitStat(), TurnJumpOKLightOn(), and Update().
|
protected |
saved values to compare with current values (might need more for damage)
Definition at line 48 of file cockpit_generic.h.
Referenced by GameCockpit::LookupUnitStat().
|
protected |
Definition at line 48 of file cockpit_generic.h.
Referenced by GameCockpit::LookupUnitStat().
int Cockpit::number_of_attackers |
Definition at line 105 of file cockpit_generic.h.
Referenced by Cockpit(), Orders::FireAt::ShouldFire(), and updateAttackers().
|
protected |
this is the parent that Cockpit will read data from
Definition at line 50 of file cockpit_generic.h.
Referenced by GameCockpit::Draw(), GameCockpit::SetupViewPort(), updateAttackers(), and GameCockpit::VDUSwitch().
|
protected |
Definition at line 51 of file cockpit_generic.h.
Referenced by Update().
|
protected |
Definition at line 96 of file cockpit_generic.h.
Referenced by Cockpit(), and updateAttackers().
|
protected |
Definition at line 40 of file cockpit_generic.h.
Referenced by GameCockpit::InitStatic().
unsigned int Cockpit::retry_dock |
Definition at line 106 of file cockpit_generic.h.
Referenced by DockToSavedBases(), and Update().
class SaveGame* Cockpit::savegame |
Definition at line 235 of file cockpit_generic.h.
Referenced by bootstrap_main_loop(), buyShip(), checkedVisited(), clearSaveData(), clearSaveString(), createObjects(), ZoneInfo::display(), ZoneMgr::displayNPCs(), NavigationSystem::DrawMission(), eraseSaveData(), eraseSaveString(), UniverseUtil::GetGalaxyFaction(), getSaveData(), getSaveDataLength(), getSaveString(), getSaveStringLength(), SaveNetUtil::GetSaveStrings(), getStringList(), GetSystemColor(), CriteriaContains::isDestination(), loadStringList(), pushSaveData(), pushSaveString(), putSaveData(), putSaveString(), Enhancement::reactToCollision(), recreate(), NetClient::Respawn(), saveDataList(), saveStringList(), ScoreKill(), UniverseUtil::SetGalaxyFaction(), BaseComputer::showPlayerInfo(), NetClient::startGame(), Mission::terminateMission(), CockpitKeys::TextMessageCallback(), Update(), UpdateMasterPartList(), visitSystemHelp(), GameUniverse::WriteSaveGame(), WriteSaveGame(), ~Cockpit(), and GameCockpit::~GameCockpit().
double Cockpit::secondsWithZeroEnergy |
Definition at line 104 of file cockpit_generic.h.
|
protected |
4 views f/r/l/b
Definition at line 54 of file cockpit_generic.h.
Referenced by GameCockpit::Draw(), and GameCockpit::Shake().
|
protected |
8 armor vals and 1 for startfuel
Definition at line 45 of file cockpit_generic.h.
Referenced by GameCockpit::LookupUnitStat().
double Cockpit::TimeOfLastCollision |
Definition at line 107 of file cockpit_generic.h.
Referenced by bootstrap_main_loop(), Cockpit(), GameCockpit::LookupUnitStat(), Unit::reactToCollision(), NetClient::Reconnect(), and NetClient::synchronizeTime().
|
protected |
Definition at line 52 of file cockpit_generic.h.
Referenced by Update().
|
protected |
Video Display Units (may need more than 2 in future)
Definition at line 56 of file cockpit_generic.h.
Referenced by Update().
|
protected |
style of current view (chase cam, inside)
Definition at line 38 of file cockpit_generic.h.
Referenced by GameCockpit::Draw(), GameCockpit::SelectProperCamera(), and GameCockpit::SetupViewPort().
|
protected |
Definition at line 66 of file cockpit_generic.h.
Referenced by GameCockpit::Init(), and GameCockpit::SetupViewPort().
float Cockpit::zoomfactor |
How far away chasecam and pan cam is.
Definition at line 186 of file cockpit_generic.h.
Referenced by Autopilot(), GameCockpit::Draw(), NetClient::Respawn(), GameCockpit::SetupViewPort(), Update(), GameCockpit::UpdAutoPilot(), CockpitKeys::ZoomIn(), CockpitKeys::ZoomOut(), and CockpitKeys::ZoomReset().