Starshatter_Open
Open source Starshatter engine
|
#include <Hangar.h>
Public Types | |
enum | HANGAR_STATE { UNAVAIL = -2, MAINT = -1, STORAGE = 0, PREP, ALERT, QUEUED, LOCKED, LAUNCH, ACTIVE, APPROACH, RECOVERY } |
enum | CONSTANTS { MAX_SQUADRONS = 10 } |
Public Member Functions | |
Hangar () | |
Hangar (const Hangar &rhs) | |
virtual | ~Hangar () |
virtual void | ExecFrame (double seconds) |
void | SetShip (Ship *s) |
virtual bool | CreateSquadron (Text squadron, CombatGroup *g, const ShipDesign *design, int count, int iff=-1, int *def_load=0, int maint_count=0, int dead_count=0) |
virtual bool | GotoActiveFlight (int squadron, int slot, Element *elem, int *loadout) |
virtual bool | GotoAlert (int squadron, int slot, FlightDeck *d, Element *elem=0, int *loadout=0, bool pkg=false, bool expedite=false) |
virtual bool | Ready (int squadron, int slot, FlightDeck *d) |
virtual bool | Launch (int squadron, int slot) |
virtual bool | StandDown (int squadron, int slot) |
virtual bool | CanStow (Ship *s) |
virtual bool | Stow (Ship *s) |
virtual bool | FindSlot (Ship *s, int &squadron, int &slot, int state=UNAVAIL) |
virtual bool | FindSquadronAndSlot (Ship *s, int &squadron, int &slot) |
virtual bool | FindAvailSlot (const ShipDesign *s, int &squadron, int &slot) |
virtual bool | FinishPrep (HangarSlot *slot) |
virtual void | SetAllIFF (int iff) |
virtual bool | Update (SimObject *obj) |
virtual const char * | GetObserverName () const |
int | NumSquadrons () const |
Text | SquadronName (int n) const |
int | SquadronSize (int n) const |
int | SquadronIFF (int n) const |
const ShipDesign * | SquadronDesign (int n) const |
int | NumShipsReady (int squadron) const |
int | NumShipsMaint (int squadron) const |
int | NumShipsDead (int squadron) const |
int | NumSlotsEmpty () const |
int | GetActiveElements (List< Element > &active_list) |
const HangarSlot * | GetSlot (int squadron, int index) const |
Ship * | GetShip (const HangarSlot *s) const |
const ShipDesign * | GetDesign (const HangarSlot *s) const |
FlightDeck * | GetFlightDeck (const HangarSlot *s) const |
int | GetFlightDeckSlot (const HangarSlot *s) const |
int | GetState (const HangarSlot *s) const |
double | TimeRemaining (const HangarSlot *s) const |
Element * | GetPackageElement (const HangarSlot *s) const |
const int * | GetLoadout (const HangarSlot *s) const |
Text | StatusName (const HangarSlot *s) const |
int | PreflightQueue (FlightDeck *d) const |
DWORD | GetLastPatrolLaunch () const |
void | SetLastPatrolLaunch (DWORD t) |
Public Member Functions inherited from SimObserver | |
virtual | ~SimObserver () |
int | operator== (const SimObserver &o) const |
virtual void | Observe (SimObject *obj) |
virtual void | Ignore (SimObject *obj) |
Protected Attributes | |
Ship * | ship |
int | nsquadrons |
int | nslots [MAX_SQUADRONS] |
Text | names [MAX_SQUADRONS] |
HangarSlot * | squadrons [MAX_SQUADRONS] |
DWORD | last_patrol_launch |
Protected Attributes inherited from SimObserver | |
List< SimObject > | observe_list |
Additional Inherited Members | |
Static Public Member Functions inherited from SimObserver | |
static const char * | TYPENAME () |
enum Hangar::CONSTANTS |
enum Hangar::HANGAR_STATE |
Hangar::Hangar | ( | ) |
Definition at line 78 of file Hangar.cpp.
Hangar::Hangar | ( | const Hangar & | rhs | ) |
Definition at line 87 of file Hangar.cpp.
|
virtual |
Definition at line 96 of file Hangar.cpp.
|
virtual |
Definition at line 484 of file Hangar.cpp.
|
virtual |
Definition at line 294 of file Hangar.cpp.
|
virtual |
Definition at line 105 of file Hangar.cpp.
|
virtual |
Definition at line 620 of file Hangar.cpp.
Definition at line 532 of file Hangar.cpp.
|
virtual |
Definition at line 598 of file Hangar.cpp.
|
virtual |
Definition at line 202 of file Hangar.cpp.
Definition at line 886 of file Hangar.cpp.
const ShipDesign * Hangar::GetDesign | ( | const HangarSlot * | s | ) | const |
Definition at line 720 of file Hangar.cpp.
FlightDeck * Hangar::GetFlightDeck | ( | const HangarSlot * | s | ) | const |
Definition at line 727 of file Hangar.cpp.
int Hangar::GetFlightDeckSlot | ( | const HangarSlot * | s | ) | const |
Definition at line 734 of file Hangar.cpp.
DWORD Hangar::GetLastPatrolLaunch | ( | ) | const |
Definition at line 907 of file Hangar.cpp.
const int * Hangar::GetLoadout | ( | const HangarSlot * | s | ) | const |
Definition at line 762 of file Hangar.cpp.
|
virtual |
Reimplemented from SimObserver.
Definition at line 281 of file Hangar.cpp.
Element * Hangar::GetPackageElement | ( | const HangarSlot * | s | ) | const |
Definition at line 755 of file Hangar.cpp.
Ship * Hangar::GetShip | ( | const HangarSlot * | s | ) | const |
Definition at line 713 of file Hangar.cpp.
const HangarSlot * Hangar::GetSlot | ( | int | squadron, |
int | index | ||
) | const |
Definition at line 701 of file Hangar.cpp.
int Hangar::GetState | ( | const HangarSlot * | s | ) | const |
Definition at line 741 of file Hangar.cpp.
|
virtual |
Definition at line 332 of file Hangar.cpp.
|
virtual |
Definition at line 386 of file Hangar.cpp.
|
virtual |
Definition at line 412 of file Hangar.cpp.
int Hangar::NumShipsDead | ( | int | squadron | ) | const |
Definition at line 850 of file Hangar.cpp.
int Hangar::NumShipsMaint | ( | int | squadron | ) | const |
Definition at line 833 of file Hangar.cpp.
int Hangar::NumShipsReady | ( | int | squadron | ) | const |
Definition at line 816 of file Hangar.cpp.
int Hangar::NumSlotsEmpty | ( | ) | const |
Definition at line 867 of file Hangar.cpp.
int Hangar::PreflightQueue | ( | FlightDeck * | d | ) | const |
Definition at line 795 of file Hangar.cpp.
|
virtual |
Definition at line 642 of file Hangar.cpp.
|
virtual |
Definition at line 921 of file Hangar.cpp.
void Hangar::SetLastPatrolLaunch | ( | DWORD | t | ) |
Definition at line 913 of file Hangar.cpp.
const ShipDesign * Hangar::SquadronDesign | ( | int | n | ) | const |
Definition at line 692 of file Hangar.cpp.
int Hangar::SquadronIFF | ( | int | n | ) | const |
Definition at line 683 of file Hangar.cpp.
Text Hangar::SquadronName | ( | int | n | ) | const |
Definition at line 665 of file Hangar.cpp.
int Hangar::SquadronSize | ( | int | n | ) | const |
Definition at line 674 of file Hangar.cpp.
|
virtual |
Definition at line 425 of file Hangar.cpp.
Text Hangar::StatusName | ( | const HangarSlot * | s | ) | const |
Definition at line 769 of file Hangar.cpp.
|
virtual |
Definition at line 498 of file Hangar.cpp.
double Hangar::TimeRemaining | ( | const HangarSlot * | s | ) | const |
Definition at line 748 of file Hangar.cpp.
|
virtual |
Reimplemented from SimObserver.
Definition at line 251 of file Hangar.cpp.
|
protected |
|
protected |
|
protected |