CExplosion Class Reference

An element in the arena which represents an explosion. More...

#include <CExplosion.h>

Inheritance diagram for CExplosion:

Inheritance graph
[legend]
Collaboration diagram for CExplosion:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CExplosion (void)
 Constructor (initialize the base class).
virtual ~CExplosion (void)
 Destructor (uninitialize the base class).
void Create (int BlockX, int BlockY, int FlameSize)
 Initialize the explosion.
void Destroy (void)
 Uninitialize the explosion.
bool Update (float DeltaTime)
 Update the explosion. Return whether the element should be deleted by the arena.
void Display (void)
 Display the explosion.
void OnWriteSnapshot (CArenaSnapshot &Snapshot)
void OnReadSnapshot (CArenaSnapshot &Snapshot)
int GetBlockX (void)
 Return the block position X of the center of the explosion.
int GetBlockY (void)
 Return the block position Y of the center of the explosion.
const vector< SFlame > & GetFlames (void)
 Return the (read-only) flames of the explosions.

Private Member Functions

void Burn (int X, int Y, EBurnDirection BurnDirection)
 Globally burn the specified block (walls, unprotected items, ...).
void PutFlame (int BlockX, int BlockY, int FlameType)
 Record a flame whose description is specified.

Private Attributes

int m_iX
 Position X (in pixels) of the center of the explosion in the arena.
int m_iY
 Position Y (in pixels) of the center of the explosion in the arena.
int m_BlockX
 Position X (in blocks) of the center of the explosion in the arena grid.
int m_BlockY
 Position Y (in blocks) of the center of the explosion in the arena grid.
int m_State
 State of the explosion (min = STATE0, max = STATE3).
float m_Timer
 Time counter for states evolution.
int m_FlameSize
 Maximum size of the rays of flames (in blocks).
vector< SFlamem_Flames
 Flames created by the explosion.
bool m_Dead
 Is the explosion dead? (can it be deleted by the arena?).
int m_FlameSizeUp
 Maximum flame size (in blocks) of the ray of flames which goes up.
int m_FlameSizeDown
 Maximum flame size (in blocks) of the ray of flames which goes down.
int m_FlameSizeLeft
 Maximum flame size (in blocks) of the ray of flames which goes left.
int m_FlameSizeRight
 Maximum flame size (in blocks) of the ray of flames which goes right.
bool m_StopUp
 Is the flame ray stopped by something is this direction?
bool m_StopDown
 Is the flame ray stopped by something is this direction?
bool m_StopLeft
 Is the flame ray stopped by something is this direction?
bool m_StopRight
 Is the flame ray stopped by something is this direction?


Detailed Description

An element in the arena which represents an explosion.

Constructor & Destructor Documentation

CExplosion::CExplosion ( void   ) 

Constructor (initialize the base class).

CExplosion::~CExplosion ( void   )  [virtual]

Destructor (uninitialize the base class).


Member Function Documentation

void CExplosion::Burn ( int  X,
int  Y,
EBurnDirection  BurnDirection 
) [private]

Globally burn the specified block (walls, unprotected items, ...).

Here is the caller graph for this function:

void CExplosion::PutFlame ( int  BlockX,
int  BlockY,
int  FlameType 
) [private]

Record a flame whose description is specified.

Here is the caller graph for this function:

void CExplosion::Create ( int  BlockX,
int  BlockY,
int  FlameSize 
)

Initialize the explosion.

Here is the call graph for this function:

Here is the caller graph for this function:

void CExplosion::Destroy ( void   ) 

Uninitialize the explosion.

Reimplemented from CElement.

Here is the call graph for this function:

Here is the caller graph for this function:

bool CExplosion::Update ( float  DeltaTime  )  [virtual]

Update the explosion. Return whether the element should be deleted by the arena.

Implements CElement.

Here is the call graph for this function:

Here is the caller graph for this function:

void CExplosion::Display ( void   )  [virtual]

Display the explosion.

Implements CElement.

Here is the call graph for this function:

Here is the caller graph for this function:

void CExplosion::OnWriteSnapshot ( CArenaSnapshot Snapshot  )  [virtual]

Implements CElement.

Here is the call graph for this function:

void CExplosion::OnReadSnapshot ( CArenaSnapshot Snapshot  )  [virtual]

Implements CElement.

Here is the call graph for this function:

int CExplosion::GetBlockX ( void   )  [inline]

Return the block position X of the center of the explosion.

Here is the caller graph for this function:

int CExplosion::GetBlockY ( void   )  [inline]

Return the block position Y of the center of the explosion.

Here is the caller graph for this function:

const vector< SFlame > & CExplosion::GetFlames ( void   )  [inline]

Return the (read-only) flames of the explosions.

Here is the caller graph for this function:


Member Data Documentation

int CExplosion::m_iX [private]

Position X (in pixels) of the center of the explosion in the arena.

int CExplosion::m_iY [private]

Position Y (in pixels) of the center of the explosion in the arena.

int CExplosion::m_BlockX [private]

Position X (in blocks) of the center of the explosion in the arena grid.

int CExplosion::m_BlockY [private]

Position Y (in blocks) of the center of the explosion in the arena grid.

int CExplosion::m_State [private]

State of the explosion (min = STATE0, max = STATE3).

float CExplosion::m_Timer [private]

Time counter for states evolution.

int CExplosion::m_FlameSize [private]

Maximum size of the rays of flames (in blocks).

vector<SFlame> CExplosion::m_Flames [private]

Flames created by the explosion.

bool CExplosion::m_Dead [private]

Is the explosion dead? (can it be deleted by the arena?).

Maximum flame size (in blocks) of the ray of flames which goes up.

Maximum flame size (in blocks) of the ray of flames which goes down.

Maximum flame size (in blocks) of the ray of flames which goes left.

Maximum flame size (in blocks) of the ray of flames which goes right.

bool CExplosion::m_StopUp [private]

Is the flame ray stopped by something is this direction?

bool CExplosion::m_StopDown [private]

Is the flame ray stopped by something is this direction?

bool CExplosion::m_StopLeft [private]

Is the flame ray stopped by something is this direction?

bool CExplosion::m_StopRight [private]

Is the flame ray stopped by something is this direction?


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

Generated on Sat Oct 18 12:26:44 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo