#include <CBomberMove.h>

Public Member Functions | |
| CBomberMove (void) | |
| Constructor. | |
| ~CBomberMove (void) | |
| Destructor. | |
| void | Create (int BlockX, int BlockY, int Player) |
| Initialize the object. | |
| void | Destroy (void) |
| Free any memory allocated by this object. | |
| void | Update (float DeltaTime) |
| Make the bomber move according to the bomber move command it received. | |
| void | WriteSnapshot (CArenaSnapshot &Snapshot) |
| void | ReadSnapshot (CArenaSnapshot &Snapshot) |
| void | Command (EBomberMove BomberMove) |
| Give a move order to the bomber for next update. | |
| void | SetArena (CArena *pArena) |
| Set the arena to use. | |
| int | GetBlockX (void) |
| Return the block position X of the bomber. | |
| int | GetBlockY (void) |
| Return the block position Y of the bomber. | |
| int | GetX (void) |
| Get the integer X position (in pixels) of the bomber in the arena. | |
| int | GetY (void) |
| Get the integer Y position (in pixels) of the bomber in the arena. | |
| bool | CouldMove (void) |
| Return whether the bomber could move the last time he tried. | |
| EBomberMove | GetMove (void) |
| Return the current move order the bomber has to perform. | |
| EBomberMove | GetLastRealMove (void) |
| Return the direction where the bomber was going the last time he really moved. | |
Private Member Functions | |
| bool | TryMove (float fPixels) |
| Make the bomber move in the current direction (bomber move) and return if he could move. | |
| ETurning | TurnTest (EBomberMove TestMove) |
| Return what would be the turning state if we tried moving in the specified direction (bomber move). | |
| ECanMove | CanMove (EBomberMove TestMove) |
| Return the appropriate ECanMove value when trying to go in the current direction (bomber move). This is a virtual test. | |
| bool | IsObstacle (int X, int Y) |
| Return whether there is a wall or a bomb on the specified block. | |
Private Attributes | |
| CArena * | m_pArena |
| Arena where to check for obstacles. | |
| int | m_Player |
| Player number of the parent bomber. -1 when not initialized. | |
| float | m_X |
| Float position X in arena (in pixels) from the top left corner of the arena. | |
| float | m_Y |
| Float position Y in arena (in pixels) from the top left corner of the arena. | |
| int | m_iX |
| Integer position X in arena (in pixels) from the top left corner of the arena. | |
| int | m_iY |
| Integer position Y in arena (in pixels) from the top left corner of the arena. | |
| int | m_BlockX |
| Position X in the arena grid (in blocks). | |
| int | m_BlockY |
| Position Y in the arena grid (in blocks). | |
| EBomberMove | m_BomberMove |
| Describes the move that the owner player currently wants the bomber to perform. | |
| EBomberMove | m_LastRealBomberMove |
| Describes the last "real" (ie. not BOMBERMOVE_NONE) move the owner player wanted the bomber to perform. | |
| ETurning | m_Turning |
| Is the bomber turning around a wall and how. | |
| bool | m_CouldMove |
| Could the bomber move the last time he tried? (used for Inertia sickness). | |
| CBomberMove::CBomberMove | ( | void | ) |
Constructor.
| CBomberMove::~CBomberMove | ( | void | ) |
Destructor.
| bool CBomberMove::TryMove | ( | float | fPixels | ) | [private] |
Make the bomber move in the current direction (bomber move) and return if he could move.


| ETurning CBomberMove::TurnTest | ( | EBomberMove | TestMove | ) | [private] |
Return what would be the turning state if we tried moving in the specified direction (bomber move).


| ECanMove CBomberMove::CanMove | ( | EBomberMove | TestMove | ) | [private] |
Return the appropriate ECanMove value when trying to go in the current direction (bomber move). This is a virtual test.


| bool CBomberMove::IsObstacle | ( | int | X, | |
| int | Y | |||
| ) | [private] |
Return whether there is a wall or a bomb on the specified block.
| void CBomberMove::Create | ( | int | BlockX, | |
| int | BlockY, | |||
| int | Player | |||
| ) |
Initialize the object.


| void CBomberMove::Destroy | ( | void | ) |
Free any memory allocated by this object.

| void CBomberMove::Update | ( | float | DeltaTime | ) |
Make the bomber move according to the bomber move command it received.


| void CBomberMove::WriteSnapshot | ( | CArenaSnapshot & | Snapshot | ) |


| void CBomberMove::ReadSnapshot | ( | CArenaSnapshot & | Snapshot | ) |


| void CBomberMove::Command | ( | EBomberMove | BomberMove | ) |
Give a move order to the bomber for next update.


| void CBomberMove::SetArena | ( | CArena * | pArena | ) | [inline] |
Set the arena to use.

| int CBomberMove::GetBlockX | ( | void | ) | [inline] |
Return the block position X of the bomber.

| int CBomberMove::GetBlockY | ( | void | ) | [inline] |
Return the block position Y of the bomber.

| int CBomberMove::GetX | ( | void | ) | [inline] |
Get the integer X position (in pixels) of the bomber in the arena.

| int CBomberMove::GetY | ( | void | ) | [inline] |
Get the integer Y position (in pixels) of the bomber in the arena.

| bool CBomberMove::CouldMove | ( | void | ) | [inline] |
Return whether the bomber could move the last time he tried.

| EBomberMove CBomberMove::GetMove | ( | void | ) | [inline] |
Return the current move order the bomber has to perform.

| EBomberMove CBomberMove::GetLastRealMove | ( | void | ) | [inline] |
Return the direction where the bomber was going the last time he really moved.

CArena* CBomberMove::m_pArena [private] |
Arena where to check for obstacles.
int CBomberMove::m_Player [private] |
Player number of the parent bomber. -1 when not initialized.
float CBomberMove::m_X [private] |
Float position X in arena (in pixels) from the top left corner of the arena.
float CBomberMove::m_Y [private] |
Float position Y in arena (in pixels) from the top left corner of the arena.
int CBomberMove::m_iX [private] |
Integer position X in arena (in pixels) from the top left corner of the arena.
int CBomberMove::m_iY [private] |
Integer position Y in arena (in pixels) from the top left corner of the arena.
int CBomberMove::m_BlockX [private] |
Position X in the arena grid (in blocks).
int CBomberMove::m_BlockY [private] |
Position Y in the arena grid (in blocks).
EBomberMove CBomberMove::m_BomberMove [private] |
Describes the move that the owner player currently wants the bomber to perform.
EBomberMove CBomberMove::m_LastRealBomberMove [private] |
Describes the last "real" (ie. not BOMBERMOVE_NONE) move the owner player wanted the bomber to perform.
ETurning CBomberMove::m_Turning [private] |
Is the bomber turning around a wall and how.
bool CBomberMove::m_CouldMove [private] |
Could the bomber move the last time he tried? (used for Inertia sickness).
1.5.5