#include <Engine.h>
Inherited by TAnimation, TBullet, TParticle, TProbe, TShip, and TSpaceObject.
|
virtual void | Draw (double a_dCamX, double a_dCamY) |
| ** VIRTUAL ** Draw the sprite. is sprite and camera are in the same position, the sprite will be in the middle of the screen ! Called by Engine More...
|
|
virtual void | Move (double a_dLagCount) |
| ** VIRTUAL ** Move the sprite according to its speed. Called by Engine More...
|
|
virtual void | Do_ai () |
| ** VIRTUAL ** Enter AI routine Called by Engine More...
|
|
virtual void | DoCollision (TSprite *const a_pSprite) |
| ** VIRTUAL ** Handle collision if m_blCanCollide is true 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 () |
|
|
class | TEngine |
|
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. More...
|
|
TSprite is the basic sprite class where all sprite classes should be derived from. a TSprite can be handled and drawn by the Engine
Basic sprite constructor.
** VIRTUAL ** Enter AI routine Called by Engine
Reimplemented in TAnimation, TEnterprise, TRomulanBop, TKlingonBOP, TBullet, TFederation_Ship, TKlingonBC, TStarbase, TParticle, TSpaceObject, and TProbe.
void TSprite::DoCollision |
( |
TSprite *const |
a_pSprite | ) |
|
|
virtual |
** VIRTUAL ** Handle collision if m_blCanCollide is true Called by Engine
- Parameters
-
TSprite | * const a_pSprite a sprite that collided with this one. |
Reimplemented in TShip.
void TSprite::Draw |
( |
double |
a_dCamX, |
|
|
double |
a_dCamY |
|
) |
| |
|
virtual |
** VIRTUAL ** Draw the sprite. is sprite and camera are in the same position, the sprite will be in the middle of the screen ! Called by Engine
- Parameters
-
double | a_dCamX X position of the CENTER of the camera |
double | a_dCamY X position of the CENTER of the camera |
Reimplemented in TShip, TBullet, TProbe, and TParticle.
Get the X position.
- Returns
- X Position of the sprite
Get the Y position.
- Returns
- Y Position of the sprite
void TSprite::Move |
( |
double |
a_dLagCount | ) |
|
|
virtual |
** VIRTUAL ** Move the sprite according to its speed. Called by Engine
- Parameters
-
double | a_dLagCount The lagtime since the last cycle |
void TSprite::SetHeight |
( |
int |
a_nHeight | ) |
|
Sets the Height Z position ( drawing order)
- Parameters
-
void TSprite::SetImage |
( |
ALLEGRO_BITMAP * |
a_pImage | ) |
|
Sets the Image of the sprite.
- Parameters
-
ALLEGRO_BITMAP | * a_pImage Bitmap representing the sprite |
void TSprite::SetPosition |
( |
double |
a_dX, |
|
|
double |
a_dY, |
|
|
double |
a_dAngle |
|
) |
| |
Sets the position of this sprite.
- Parameters
-
double | a_dX X position |
double | a_dY Y position |
double | a_dAngle Rotation angle |
void TSprite::SetPosition |
( |
double |
a_dX, |
|
|
double |
a_dY |
|
) |
| |
Sets the position of this sprite.
- Parameters
-
double | a_dX X position |
double | a_dY Y position |
void TSprite::SetSpeed |
( |
double |
a_dSpeed | ) |
|
Sets the Speed.
- Parameters
-
Compare function for Z sorting. Compares the Z value of the sprites passed through the pointers.
- Parameters
-
const | TSprite * a_pV1 Pointer to first sprite. |
const | TSprite * a_p_V2 Pointer to secons sprite. |
- Returns
- true if the first sprite has a greater Z value than the second.
bool TSprite::m_blCanCollide |
bool TSprite::m_blCanFind |
bool TSprite::m_blDestroyed |
an ID providig some runtime type information
A sprite can be associated with a certain group (Federation, Klingon etc.)
int TSprite::m_nBitmapHeight |
|
protected |
int TSprite::m_nBitmapMidX |
|
protected |
int TSprite::m_nBitmapMidY |
|
protected |
int TSprite::m_nBitmapWidth |
|
protected |
ALLEGRO_BITMAP* TSprite::m_pImage |
|
protected |
pointer to a bitmap representing this sprite
The documentation for this class was generated from the following files: