StarTrekV3_Linux  Version3
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Pages
TEnterprise Class Reference

#include <Enterprise.h>

Inherits TShip.

Public Member Functions

virtual void DoEngineering ()
 VIRTUAL Do Engineering AI, damage control, energy management etc. Should be called in Do_ai(), inherited from TSprite More...
 
virtual void Do_ai ()
 ** VIRTUAL ** Enter AI routine Called by Engine More...
 
double GetX ()
 
double GetY ()
 
int GetWarp ()
 
double GetAngle ()
 
void SetX (double a_dX)
 
void SetY (double a_dY)
 
void LockUp ()
 
void LockDown ()
 
void SetNavigationMode (NAVIGATION_MODE a_Mode)
 
void SetDefaultNavigationOrigin ()
 
void DNavOriginX (int a_nOffset)
 
void DNavOriginY (int a_nOffset)
 
void UpdateStarmap (int a_dXOffset, int a_dYOffset)
 
void IncNavX ()
 
void DecNavX ()
 
void IncNavY ()
 
void DecNavY ()
 
void FirePhoton (bool bf)
 
void LaunchProbe ()
 
void draw_engineering ()
 
void draw_transporter ()
 
void DrawTargetInfo (int a_nSelection, int a_nXLocation, int a_nYLocation)
 
void Draw_Navigation (Universe *a_pUniverse)
 
void StartWarp (int a_nWarpFactor)
 
void DoWarp ()
 
void StopWarp ()
 
 TEnterprise ()
 
- Public Member Functions inherited from TShip
 TShip ()
 constructor More...
 
virtual ~TShip ()
 virtual destructor More...
 
double WayPoint (double a_dX, double a_dY)
 Calculate angle to reach waypoint. More...
 
double GetX ()
 Get the X position. More...
 
double GetY ()
 Get the Y position. More...
 
double GetSpeed ()
 Get the speed. More...
 
double GetAngle ()
 Get the Angle. More...
 
int GetCloackState ()
 Get the cloak state. More...
 
virtual void CalcPhaserDamage (double a_dEnergy, int a_nTarget)
 VIRTUAL Calculates the shield energy reduction and damage done by incoming phaser fire. More...
 
virtual void DoCollision (TSprite *a_pSprite)
 VIRTUAL Handle collision for this ship More...
 
virtual void DoCloak ()
 VIRTUAL Handle Cloaking Called by DoEngineering if m_blCanCloak is true More...
 
virtual void Draw (double a_dCamX, double a_dCamY)
 VIRTUAL Draw the ship and some effects (phaser) relative to camera position More...
 
virtual void Explode ()
 VIRTUAL Destroy this ship with an explosion should be called in Do_AI() when damage is critical More...
 
virtual void Control ()
 VIRTUAL Do the actual steering of the ship should be called in Do_AI() when m_dAngleSeek is calculated More...
 
bool Dock (TShip *a_pBaseTarget)
 Handle Docking procedure. More...
 
bool TryEnterDocking ()
 Try to enter the docking procedure. More...
 
void Release (TShip *a_pBaseTarget)
 Start releasing procedure from Docked. More...
 
void PrecalcFireAngles (int a_nLimit)
 Calculate the best firing angles for photon torpedoes Only works if sensor and computer are in good shape. More...
 
void LooseTarget ()
 Make this ship loose it's target. More...
 
double CalcVolume ()
 Calculate the Volume for events happening on/near this ship. More...
 
void Die ()
 set health of systems to zero so the ship will be destroyed More...
 
- Public Member Functions inherited from TSprite
virtual void Move (double a_dLagCount)
 ** VIRTUAL ** Move the sprite according to its speed. Called by Engine More...
 
void SetPosition (double a_dX, double a_dY, double a_dAngle)
 Sets the position of this sprite. More...
 
void SetPosition (double a_dX, double a_dY)
 Sets the position of this sprite. More...
 
void SetHeight (int a_nHeight)
 Sets the Height Z position ( drawing order) More...
 
void SetSpeed (double a_dSpeed)
 Sets the Speed. More...
 
void SetImage (ALLEGRO_BITMAP *a_pImage)
 Sets the Image of the sprite. More...
 
double GetX ()
 Get the X position. More...
 
double GetY ()
 Get the Y position. More...
 
 TSprite ()
 Basic sprite constructor. More...
 
virtual ~TSprite ()
 

Static Public Member Functions

static bool Init ()
 

Public Attributes

int m_nSectorPositionX
 
int m_nSectorPositionY
 
int m_nWarpFactor
 
int m_nProbes
 
- Public Attributes inherited from TShip
bool m_blPhaserOn
 Phaser firing. More...
 
bool m_blShieldOn
 Shields up ? More...
 
bool m_blDocked
 Is this ship docked. More...
 
bool m_blDocking
 Has this ship entered a docking procedure. More...
 
bool m_blReleasing
 Has this ship entered a release procedure from a Dock. More...
 
int m_nTask
 Tactical task number AI. More...
 
int m_nMaxShieldEnergy
 Maximum charge of shield. More...
 
int m_nShieldEnergy
 current charge of shield decreases when hit More...
 
int m_nEnergy
 Available energy for systems.. Warpcore output. More...
 
int m_nCloakState
 state of cloaking device if any More...
 
ALLEGRO_COLOR m_PhaserColor
 The color of the phaser. More...
 
TShipm_pTarget
 Pointer to target. More...
 
TShipm_pBaseTarget
 Pointer to starbase. More...
 
string m_strName
 Name of a ship. More...
 
vector< int > m_lstHealth
 Health of subsystems. More...
 
int m_nMaxHealth
 Maximum health of any system. More...
 
bool m_blMustBeDestroyed
 if true this ship must be destroyed to complete a task More...
 
bool m_blMustSurvive
 if true this ship must survive to complete a task More...
 
bool m_blMustReachPosition
 if true this ship must reach a certain position (m_dSafePosX, m_dSafePosY) More...
 
bool m_blDock
 True if ship must also dock. More...
 
bool m_blNoRelease
 if true ship will stay docked until false More...
 
- Public Attributes inherited from TSprite
bool m_blDestroyed
 
bool m_blCanCollide
 
bool m_blCanFind
 
MEMBER m_Member
 A sprite can be associated with a certain group (Federation, Klingon etc.) More...
 
ID m_ID
 an ID providig some runtime type information More...
 

Additional Inherited Members

- Protected Member Functions inherited from TShip
void SetSpeed (double a_dSpeed)
 Sets the speed of a ship. More...
 
- Protected Attributes inherited from TShip
AI m_AI
 AI state. More...
 
ID m_PreferedBase
 The ID of the starbasetype to dock at. (types.h) More...
 
double m_dSteer
 Turning rate. More...
 
double m_dAngleSeek
 Angle turning to (steering direction) More...
 
double m_dTargetDistance
 Distance to target if any. More...
 
double m_dViewDistance
 Maximum distance to detect other ships etc. More...
 
double m_dPhaserX
 start of Phaser line Offset X More...
 
double m_dPhaserY
 start of Phaser line Offset Y More...
 
double m_dSafePosX
 Safe position for Escort missions X. More...
 
double m_dSafePosY
 Safe position for Escort missions Y. More...
 
double m_dMaxSpeed
 Maximum speed. More...
 
double m_dWaypointX
 Waypoint to go to X. More...
 
double m_dWaypointY
 Waypoint to go to Y. More...
 
double m_dPhaserAngle
 Angle of phaser when firing. More...
 
double m_dAimangle
 Angle of bullets ( firing direction) More...
 
int m_nRepairItem
 Item being repaired by crew, if any. More...
 
int m_nCrew
 Number of crewmen. More...
 
int m_nPhaserEnergy
 Energy of the phaser. More...
 
int m_nPreferedTarget
 What target subpart to fire at. More...
 
int m_nPhaserPower
 How powerful is the phaser ( efficiency) More...
 
int m_nTorpedoes
 Number of torpedo weapons. More...
 
int m_nFlyheight
 standard cruise Z value.. used for dock and release procedures More...
 
int m_nEnergyTimer
 Timer for Energy management ( warpcore) More...
 
int m_nRepairTimer
 Timer for repairs. More...
 
int m_nPhaserFireTimer
 Timer for phaser damaging target. More...
 
int m_nPhaserTimer
 Timer for phaser recharge. More...
 
int m_nShieldTimer
 Timer to recharge shield. More...
 
int m_nPhotonTimer
 Timer to reload photon tubes. More...
 
int m_nCloakCounter
 counter for cloaking device if any More...
 
int m_nCloakCharge
 Energy of cloaking device. More...
 
int m_nTranslucency
 Cloaking effect. More...
 
bool m_blCanCloak
 Can this ship Cloak. More...
 
- Protected Attributes inherited from TSprite
TEnginem_pEngine
 Pointer to the engine. More...
 
ALLEGRO_BITMAP * m_pImage
 pointer to a bitmap representing this sprite More...
 
int m_nZ
 Z drawing order ( Depth) More...
 
double m_dAngle
 
double m_dX
 
double m_dY
 
double m_dSpeed
 
int m_nBitmapWidth
 
int m_nBitmapHeight
 
int m_nBitmapMidX
 
int m_nBitmapMidY
 

Constructor & Destructor Documentation

TEnterprise::TEnterprise ( )

Member Function Documentation

void TEnterprise::DecNavX ( )
void TEnterprise::DecNavY ( )
void TEnterprise::DNavOriginX ( int  a_nOffset)
void TEnterprise::DNavOriginY ( int  a_nOffset)
void TEnterprise::Do_ai ( )
virtual

** VIRTUAL ** Enter AI routine Called by Engine

Reimplemented from TSprite.

void TEnterprise::DoEngineering ( )
virtual

VIRTUAL Do Engineering AI, damage control, energy management etc. Should be called in Do_ai(), inherited from TSprite

Reimplemented from TShip.

void TEnterprise::DoWarp ( )
void TEnterprise::draw_engineering ( )
void TEnterprise::Draw_Navigation ( Universe a_pUniverse)
void TEnterprise::draw_transporter ( )
void TEnterprise::DrawTargetInfo ( int  a_nSelection,
int  a_nXLocation,
int  a_nYLocation 
)
void TEnterprise::FirePhoton ( bool  bf)
double TEnterprise::GetAngle ( )
inline
int TEnterprise::GetWarp ( )
inline
double TEnterprise::GetX ( )
double TEnterprise::GetY ( )
void TEnterprise::IncNavX ( )
void TEnterprise::IncNavY ( )
bool TEnterprise::Init ( )
static
void TEnterprise::LaunchProbe ( )
void TEnterprise::LockDown ( )
void TEnterprise::LockUp ( )
void TEnterprise::SetDefaultNavigationOrigin ( )
void TEnterprise::SetNavigationMode ( NAVIGATION_MODE  a_Mode)
void TEnterprise::SetX ( double  a_dX)
void TEnterprise::SetY ( double  a_dY)
void TEnterprise::StartWarp ( int  a_nWarpFactor)
void TEnterprise::StopWarp ( )
void TEnterprise::UpdateStarmap ( int  a_dXOffset,
int  a_dYOffset 
)

Member Data Documentation

int TEnterprise::m_nProbes
int TEnterprise::m_nSectorPositionX
int TEnterprise::m_nSectorPositionY
int TEnterprise::m_nWarpFactor

The documentation for this class was generated from the following files: