diff options
author | Joost Peters | 2003-10-07 00:26:04 +0000 |
---|---|---|
committer | Joost Peters | 2003-10-07 00:26:04 +0000 |
commit | 9e585098d8cca0ad8e36294efd8d2f175141278b (patch) | |
tree | fe618549a2c438592e7abd5877a0be8027800f2d | |
parent | 249444e4c63543bf6fc5035e47c297938fa2684e (diff) | |
download | scummvm-rg350-9e585098d8cca0ad8e36294efd8d2f175141278b.tar.gz scummvm-rg350-9e585098d8cca0ad8e36294efd8d2f175141278b.tar.bz2 scummvm-rg350-9e585098d8cca0ad8e36294efd8d2f175141278b.zip |
add Joe struct + get/set functions
svn-id: r10651
-rw-r--r-- | queen/logic.cpp | 12 | ||||
-rw-r--r-- | queen/logic.h | 22 |
2 files changed, 33 insertions, 1 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp index 3de5cf135d..d1c87b7953 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -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]; diff --git a/queen/logic.h b/queen/logic.h index 0323ed1ea9..9f5c1beb12 100644 --- a/queen/logic.h +++ b/queen/logic.h @@ -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 |