33#define PME_GETREADY_TIME 2000
34#define PME_PACMAN_START_SPEED 4
35#define PME_PACMAN_START_LIFES 3
36#define PME_PACMAN_ENPOWERED_TIME 7000
37#define PME_GHOST_START_SPEED 3
38#define PME_GHOST_SPEED_VARIATION 1
39#define PME_GHOST_CHASING_TIME 20000
40#define PME_GHOST_SCATTERING_TIME 6000
41#define PME_CRUISE_MODE 8
44#include "MemoryManager.h"
45#include "Pac-Man_Evolution.h"
50class Object :
public CMemPME
53 Object(Sint32, Sint32, Sint32, GameField*);
55 virtual Sint32 execute();
56 Sint32 render(Sint32, Sint32);
57 virtual Sint32 debug(Sint32);
60 virtual Sint32 msgPause();
61 virtual Sint32 msgGoInit();
62 virtual Sint32 msgPelletPowerEaten(Sint32, Sint32);
63 virtual Sint32 msgGhostCollision();
67 void getName(
string&);
68 void getPositionMaze(Sint32&, Sint32&);
69 void getDirection(Sint32&, Sint32&);
75 Sint32 iPositionX, iPositionY;
76 Sint32 iMazeX, iMazeY;
77 Sint32 iMazePrevX, iMazePrevY;
78 Sint32 iStartingPositionX;
79 Sint32 iStartingPositionY;
80 Sint32 iMazeRenderingX;
81 Sint32 iMazeRenderingY;
82 bool bRenderExecuteSync;
85 GameField* pGameField;
89class State :
public CMemPME
92 explicit State(
const string&);
94 virtual void enter(Actor*);
95 virtual void execute(Actor*) = 0;
96 virtual void exit(Actor*);
97 void getName(
string &);
103class Actor :
public Object
106 Actor(Sint32 iObjID, Sint32 iMX, Sint32 iMY, GameField* GF);
108 virtual Sint32 execute();
109 Sint32 debug(Sint32);
114 SS_EVADE_FIRST_STAGE = 1,
115 SS_EVADE_SECOND_STAGE = 2,
130 double euclideanDistance(Sint32, Sint32, MazePoint&);
131 Sint32 getStateName(
string&);
135 Sint32 setBrain(Sint32);
136 Sint32 think(Sint32&, Sint32&);
139 Sint32 moveX(Sint32);
140 Sint32 moveY(Sint32);
146 vector<MazePoint> vPath;
147 MazePoint pointNextStep;
148 MazePoint pointTarget;
155 void stateChange(State*);
156 void statePrevious();
157 bool stateCurrentCheck(State&);
158 bool statePreviousCheck(State&);
159 State* pCurrentState;
160 State* pPreviousState;