Starshatter_Open
Open source Starshatter engine
|
#include <Weapon.h>
Public Types | |
enum | Constants { MAX_BARRELS = 8 } |
enum | Orders { MANUAL, AUTO, POINT_DEFENSE } |
enum | Control { SINGLE_FIRE, RIPPLE_FIRE, SALVO_FIRE } |
enum | Sweep { SWEEP_NONE, SWEEP_TIGHT, SWEEP_WIDE } |
Public Types inherited from System | |
enum | CATEGORY { MISC_SYSTEM = 0, DRIVE = 1, WEAPON, SHIELD, SENSOR, COMPUTER, POWER_SOURCE, FLIGHT_DECK, FARCASTER } |
enum | STATUS { DESTROYED, CRITICAL, DEGRADED, NOMINAL, MAINT } |
enum | POWER_FLAGS { POWER_WATTS = 1, POWER_CRITICAL = 2 } |
Public Member Functions | |
Weapon (WeaponDesign *d, int nmuz, Vec3 *muzzles, double az=0, double el=0) | |
Weapon (const Weapon &rhs) | |
virtual | ~Weapon () |
int | operator== (const Weapon &w) const |
int | Track (SimObject *targ, System *sub) |
Shot * | Fire () |
Shot * | NetFirePrimary (SimObject *targ, System *sub, int count) |
Shot * | NetFireSecondary (SimObject *targ, System *sub, DWORD objid) |
void | SetTarget (SimObject *t, System *sub) |
void | SelectTarget () |
bool | CanTarget (DWORD classification) const |
SimObject * | GetTarget () const |
System * | GetSubTarget () const |
void | SetFiringOrders (int o) |
int | GetFiringOrders () const |
void | SetControlMode (int m) |
int | GetControlMode () const |
void | SetSweep (int s) |
int | GetSweep () const |
void | Enable () |
void | Disable () |
const WeaponDesign * | Design () const |
const char * | Group () const |
int | Enabled () const |
int | Ammo () const |
int | Guided () const |
int | Locked () const |
float | Velocity () const |
float | Mass () const |
float | Resistance () const |
Shot * | GetBeam (int i) |
void | SetAmmo (int a) |
bool | IsPrimary () const |
bool | IsDrone () const |
bool | IsDecoy () const |
bool | IsProbe () const |
bool | IsMissile () const |
bool | IsBeam () const |
virtual void | ExecFrame (double factor) |
virtual void | Orient (const Physical *rep) |
virtual void | Distribute (double delivered_energy, double seconds) |
const Ship * | Owner () const |
void | SetOwner (Ship *ship) |
int | GetIndex () const |
void | SetIndex (int n) |
Point | GetAimVector () const |
void | SetAzimuth (double a) |
double | GetAzimuth () const |
void | SetElevation (double e) |
double | GetElevation () const |
void | SetRestAzimuth (double a) |
double | GetRestAzimuth () const |
void | SetRestElevation (double e) |
double | GetRestElevation () const |
void | SetAzimuthMax (double a) |
double | GetAzimuthMax () const |
void | SetAzimuthMin (double a) |
double | GetAzimuthMin () const |
void | SetElevationMax (double e) |
double | GetElevationMax () const |
void | SetElevationMin (double e) |
double | GetElevationMin () const |
void | SetGroup (const char *n) |
bool | IsBlockedFriendly () const |
void | SetBlockedFriendly (bool b) |
Solid * | GetTurret () |
Solid * | GetTurretBase () |
Solid * | GetVisibleStore (int i) |
virtual bool | Update (SimObject *obj) |
virtual const char * | GetObserverName () const |
Public Member Functions inherited from System | |
System (CATEGORY t, int s, const char *n, int maxv, double energy=0, double capacity=100, double sink_rate=1) | |
System (const System &s) | |
virtual | ~System () |
int | operator== (const System &s) const |
CATEGORY | Type () const |
int | Subtype () const |
const char * | Name () const |
const char * | Abbreviation () const |
void | SetName (const char *n) |
void | SetAbbreviation (const char *a) |
void | SetDesign (SystemDesign *d) |
virtual int | Value () const |
int | MaxValue () const |
STATUS | Status () const |
double | Availability () const |
double | Safety () const |
double | Stability () const |
virtual void | CalcStatus () |
virtual void | Repair () |
double | NetAvail () const |
void | SetNetAvail (double d) |
List< Component > & | GetComponents () |
virtual void | ApplyDamage (double damage) |
virtual void | ExecMaintFrame (double seconds) |
virtual void | DoEMCON (int emcon) |
virtual void | Mount (Point loc, float radius, float hull_factor=0.5f) |
virtual void | Mount (const System &system) |
Point | MountLocation () const |
double | Radius () const |
double | HullProtection () const |
bool | IsPowerCritical () const |
bool | UsesWatts () const |
virtual double | GetRequest (double seconds) const |
int | GetSourceIndex () const |
void | SetSourceIndex (int i) |
virtual int | Charge () const |
bool | IsPowerOn () const |
virtual void | PowerOn () |
virtual void | PowerOff () |
virtual double | GetPowerLevel () const |
virtual void | SetPowerLevel (double level) |
virtual void | SetOverride (bool over) |
virtual void | DrainPower (double to_level) |
void | SetCapacity (double c) |
double | GetCapacity () const |
double | GetEnergy () const |
double | GetSinkRate () const |
void | SetEMCONPower (int emcon, int power_level) |
int | GetEMCONPower (int emcon) |
int | GetExplosionType () const |
void | SetExplosionType (int t) |
Ship * | GetShip () const |
void | SetShip (Ship *s) |
int | GetID () const |
void | SetID (int n) |
Public Member Functions inherited from SimObserver | |
virtual | ~SimObserver () |
int | operator== (const SimObserver &o) const |
virtual void | Observe (SimObject *obj) |
virtual void | Ignore (SimObject *obj) |
Static Public Member Functions | |
static const char * | TYPENAME () |
Protected Member Functions | |
Shot * | FireBarrel (int n) |
Shot * | CreateShot (const Point &loc, const Camera &cam, WeaponDesign *dsn, const Ship *owner) |
void | SetBeamPoints (bool aim=false) |
void | Aim () |
void | AimTurret (double az, double el) |
void | ZeroAim () |
void | FindObjective () |
Point | Transform (const Point &pt) |
bool | CanLockPoint (const Point &test, double &az, double &el, Point *obj=0) |
enum Weapon::Constants |
enum Weapon::Control |
enum Weapon::Orders |
enum Weapon::Sweep |
Weapon::Weapon | ( | WeaponDesign * | d, |
int | nmuz, | ||
Vec3 * | muzzles, | ||
double | az = 0 , |
||
double | el = 0 |
||
) |
Definition at line 33 of file Weapon.cpp.
Weapon::Weapon | ( | const Weapon & | rhs | ) |
Definition at line 99 of file Weapon.cpp.
|
virtual |
Definition at line 141 of file Weapon.cpp.
|
protected |
Definition at line 928 of file Weapon.cpp.
|
protected |
Definition at line 1146 of file Weapon.cpp.
|
protected |
Definition at line 1086 of file Weapon.cpp.
bool Weapon::CanTarget | ( | DWORD | classification | ) | const |
Definition at line 443 of file Weapon.cpp.
|
protected |
Definition at line 831 of file Weapon.cpp.
|
inline |
|
virtual |
Reimplemented from System.
Definition at line 369 of file Weapon.cpp.
|
virtual |
Reimplemented from System.
Definition at line 289 of file Weapon.cpp.
|
protected |
Definition at line 1031 of file Weapon.cpp.
Shot * Weapon::Fire | ( | ) |
Definition at line 591 of file Weapon.cpp.
|
protected |
Definition at line 730 of file Weapon.cpp.
Shot * Weapon::GetBeam | ( | int | i | ) |
Definition at line 203 of file Weapon.cpp.
|
virtual |
Reimplemented from SimObserver.
Definition at line 410 of file Weapon.cpp.
Solid * Weapon::GetTurret | ( | ) |
Definition at line 245 of file Weapon.cpp.
Solid * Weapon::GetTurretBase | ( | ) |
Definition at line 251 of file Weapon.cpp.
Solid * Weapon::GetVisibleStore | ( | int | i | ) |
Definition at line 257 of file Weapon.cpp.
bool Weapon::IsBeam | ( | ) | const |
Definition at line 195 of file Weapon.cpp.
bool Weapon::IsDecoy | ( | ) | const |
Definition at line 177 of file Weapon.cpp.
bool Weapon::IsDrone | ( | ) | const |
Definition at line 171 of file Weapon.cpp.
bool Weapon::IsMissile | ( | ) | const |
Definition at line 189 of file Weapon.cpp.
bool Weapon::IsPrimary | ( | ) | const |
Definition at line 165 of file Weapon.cpp.
bool Weapon::IsProbe | ( | ) | const |
Definition at line 183 of file Weapon.cpp.
Definition at line 667 of file Weapon.cpp.
Definition at line 697 of file Weapon.cpp.
|
virtual |
Reimplemented from System.
Definition at line 843 of file Weapon.cpp.
void Weapon::SelectTarget | ( | ) |
Definition at line 496 of file Weapon.cpp.
void Weapon::SetAmmo | ( | int | a | ) |
Definition at line 266 of file Weapon.cpp.
|
protected |
Definition at line 900 of file Weapon.cpp.
void Weapon::SetControlMode | ( | int | m | ) |
Definition at line 427 of file Weapon.cpp.
void Weapon::SetFiringOrders | ( | int | o | ) |
Definition at line 420 of file Weapon.cpp.
void Weapon::SetOwner | ( | Ship * | ship | ) |
Definition at line 214 of file Weapon.cpp.
void Weapon::SetSweep | ( | int | s | ) |
Definition at line 434 of file Weapon.cpp.
Definition at line 451 of file Weapon.cpp.
Definition at line 575 of file Weapon.cpp.
Definition at line 1073 of file Weapon.cpp.
|
inlinestatic |
Reimplemented from SimObserver.
|
virtual |
Reimplemented from SimObserver.
Definition at line 394 of file Weapon.cpp.
|
protected |
Definition at line 1177 of file Weapon.cpp.
|
protected |
|
protected |
|
protected |
|
protected |