add Joe struct + get/set functions

svn-id: r10651
This commit is contained in:
Joost Peters 2003-10-07 00:26:04 +00:00
parent 249444e4c6
commit 9e585098d8
2 changed files with 33 additions and 1 deletions

View File

@ -421,6 +421,18 @@ uint16 Logic::findFrame(uint16 obj) {
return framenum;
}
void Logic::joeFacing(uint16 dir) {
_joe.facing = dir;
}
void Logic::joeX(uint16 x) {
_joe.x = x;
}
void Logic::joeY(uint16 y) {
_joe.y = y;
}
int16 Logic::gameState(int index) {
if (index >= 0 && index < GAME_STATE_COUNT)
return _gameState[index];

View File

@ -32,6 +32,13 @@ enum {
FRAME_XTRA = 2
};
enum {
LEFT = 1,
RIGHT = 2,
FRONT = 3,
BACK = 4
};
class Logic {
public:
@ -53,6 +60,14 @@ public:
uint16 walkOffCount();
WalkOffData *walkOffData(int index);
uint16 joeFacing() { return _joe.facing; }
uint16 joeX() { return _joe.x; }
uint16 joeY() { return _joe.y; }
void joeFacing(uint16 dir);
void joeX(uint16 x);
void joeY(uint16 y);
int16 gameState(int index);
void gameState(int index, int16 newValue);
@ -84,11 +99,16 @@ protected:
uint16 (*_actorData)[12]; // FIXME: ActorData *_actorData;
int16 (*_area)[11][8]; // FIXME: Area *_area[11];
WalkOffData *_walkOffData;
enum {
GAME_STATE_COUNT = 211
};
struct {
uint16 x, y;
uint16 facing;
} _joe;
int16 _gameState[GAME_STATE_COUNT];
uint16 _maxAnimatedFrame, _maxStaticFrame, _maxAnimatedFrameLen; // FMAXA, FMAX, FMAXALEN