43 #include <allegro5/allegro.h>
44 #include <allegro5/allegro_image.h>
45 #include <allegro5/allegro_primitives.h>
46 #include <allegro5/allegro_font.h>
47 #include <allegro5/allegro_ttf.h>
173 virtual void Draw(
double a_dCamX,
double a_dCamY);
182 virtual void Move(
double a_dLagCount);
189 virtual void Do_ai();
198 virtual void DoCollision(
TSprite *
const a_pSprite);
209 void SetPosition(
double a_dX,
double a_dY,
double a_dAngle);
218 void SetPosition(
double a_dX,
double a_dY);
225 void SetHeight(
int a_nHeight);
232 void SetSpeed(
double a_dSpeed);
239 void SetImage(ALLEGRO_BITMAP * a_pImage);
280 std::list <TSprite *> m_lstItems;
290 int CountSaveObjects();
323 void Move(
double a_dLagCount);
336 void Add(
TSprite *
const a_pSprite);
348 void Draw_sensor(
int a_nX,
int a_nY,
TShip *
const a_pPlayer);
355 void DrawHud(
TShip *
const a_pPlayer);
364 void SetOrigin(
double a_dX,
double a_dY);
371 void Folow(
TSprite *
const a_pSprite);
393 void Clear(
bool a_blKeepPlayer);
419 TSprite * Seek(
int a_nID,
double a_dViewDistance,
double a_dX,
double a_dY);
436 TSprite * Seek(
int a_nMember,
bool a_blEnemy,
double a_dViewDistance,
double a_dX,
double a_dY);
453 TSprite * Seekstarbase(
int a_nMember,
bool a_blEnemy,
double a_dViewDistance,
double a_dX,
double a_dY);
466 bool Detect_collision(
TSprite * a_pSprite1,
TSprite * a_pSprite2);
475 TEngine(
int a_nWidth,
int a_nHeight);
490 bool Save(ofstream & a_SaveStream);
499 bool Load(ifstream & a_LoadStream);
524 m_strError = a_strError;
532 virtual const char*
what()
const throw()
534 return m_strError.c_str();
virtual ~A5Exception()
Definition: Engine.h:537
ALLEGRO_COLOR m_clMAGENTA
Definition: Engine.h:310
bool m_blReleasing
Definition: Engine.h:107
int m_nProbes
Definition: Engine.h:72
int m_nScreenMidY
Definition: Engine.h:299
A5Exception(string a_strError)
Exception Constructor.
Definition: Engine.h:522
int m_nCrew
Definition: Engine.h:77
int m_nLife
Definition: Engine.h:85
int m_nPopulation
Definition: Engine.h:83
bool m_blDocked
Definition: Engine.h:105
TEngine * m_pEngine
Pointer to the engine.
Definition: Engine.h:137
int m_nCount
Definition: Engine.h:86
ALLEGRO_COLOR m_clRED
Definition: Engine.h:309
int m_nBitmapMidY
Definition: Engine.h:150
int m_nBitmapHeight
Definition: Engine.h:148
int m_nCloakState
Definition: Engine.h:93
bool m_blMustSurvive
Definition: Engine.h:109
int m_nZ
Definition: Engine.h:74
int m_nTorpedoes
Definition: Engine.h:71
virtual const char * what() const
Exception descriptor.
Definition: Engine.h:532
virtual void Do_ai()
** VIRTUAL ** Enter AI routine Called by Engine
Definition: Engine.cpp:86
bool m_blCanFind
Definition: Engine.h:113
double m_dX
Definition: Engine.h:143
int m_nWarpFactor
Definition: Engine.h:73
int m_nZ
Z drawing order ( Depth)
Definition: Engine.h:141
ALLEGRO_COLOR m_clYELLOW
Definition: Engine.h:306
double m_dAngle
Definition: Engine.h:102
int m_nScreenHeight
Definition: Engine.h:297
Definition: KeyMapper.h:77
bool m_blDestroyed
Definition: Engine.h:153
bool m_blDocking
Definition: Engine.h:106
int m_nEnergy
Definition: Engine.h:78
int m_AI
Definition: Engine.h:75
int m_nBitmapWidth
Definition: Engine.h:147
bool m_blMustBeDestroyed
Definition: Engine.h:108
double m_dX
Definition: Engine.h:97
bool m_blCanCloak
Definition: Engine.h:115
int m_nPhotonTimer
Definition: Engine.h:88
ALLEGRO_COLOR m_clGREEN
Definition: Engine.h:305
int m_nBitmapMidX
Definition: Engine.h:149
int m_nCloakCharge
Definition: Engine.h:90
int m_nScreenMidX
Definition: Engine.h:298
ID m_ID
Definition: Engine.h:65
int m_nPhaserPower
Definition: Engine.h:82
Definition: Universe.h:95
MEMBER
Definition: types.h:133
ALLEGRO_COLOR m_clBROWN
Definition: Engine.h:307
double m_dWaypointY
Definition: Engine.h:101
MEMBER m_Member
Definition: Engine.h:66
bool m_blPhaserOn
Definition: Engine.h:114
bool m_blNoRelease
Definition: Engine.h:112
int m_nTask
Definition: Engine.h:92
virtual void Draw(double a_dCamX, double a_dCamY)
VIRTUAL Draw the ship and some effects (phaser) relative to camera position
Definition: Ship.cpp:579
virtual void Move(double a_dLagCount)
** VIRTUAL ** Move the sprite according to its speed. Called by Engine
Definition: Engine.cpp:58
friend class TEngine
Definition: Ship.h:331
int m_nShieldTimer
Definition: Engine.h:87
double m_dWaypointX
Definition: Engine.h:100
double m_dY
Definition: Engine.h:98
int m_nTranslucency
Definition: Engine.h:91
bool Comp(const TSprite *a_pV1, const TSprite *a_p_V2)
Compare function for Z sorting. Compares the Z value of the sprites passed through the pointers...
Definition: Engine.cpp:991
double m_dY
Definition: Engine.h:143
int m_nCloakCounter
Definition: Engine.h:89
int m_nRepairItem
Definition: Engine.h:76
int m_nSectorPositionX
Definition: Engine.h:94
ALLEGRO_COLOR m_clATHM
Definition: Engine.h:312
bool m_blMustReachPosition
Definition: Engine.h:110
ID m_ID
an ID providig some runtime type information
Definition: Engine.h:161
bool m_blSensorStatic
Definition: Engine.h:295
MEMBER m_Member
A sprite can be associated with a certain group (Federation, Klingon etc.)
Definition: Engine.h:158
ALLEGRO_COLOR m_clBLUE
Definition: Engine.h:308
int m_nShieldEnergy
Definition: Engine.h:79
int m_nPlanetType
Definition: Engine.h:69
int m_nTarget
Definition: Engine.h:84
ALLEGRO_COLOR m_clWHITE
Definition: Engine.h:304
ALLEGRO_COLOR m_clBLACK
Definition: Engine.h:303
int m_nScreenWidth
Definition: Engine.h:296
bool m_blDock
Definition: Engine.h:111
ALLEGRO_COLOR m_clAQUA
Definition: Engine.h:311
int m_nPhaserEnergy
Definition: Engine.h:80
double m_dAngleSeek
Definition: Engine.h:103
ALLEGRO_BITMAP * m_pImage
pointer to a bitmap representing this sprite
Definition: Engine.h:139
int m_nSectorPositionY
Definition: Engine.h:95
ID
Definition: types.h:170
double m_dSpeed
Definition: Engine.h:99
int m_nPreferedTarget
Definition: Engine.h:81