[Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.21,1.22 logic.h,1.12,1.13
Joost Peters
joostp at users.sourceforge.net
Mon Oct 6 17:27:01 CEST 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv18051/queen
Modified Files:
logic.cpp logic.h
Log Message:
add Joe struct + get/set functions
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- logic.cpp 6 Oct 2003 13:20:29 -0000 1.21
+++ logic.cpp 7 Oct 2003 00:26:04 -0000 1.22
@@ -421,6 +421,18 @@
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];
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- logic.h 6 Oct 2003 13:20:29 -0000 1.12
+++ logic.h 7 Oct 2003 00:26:04 -0000 1.13
@@ -32,6 +32,13 @@
FRAME_XTRA = 2
};
+enum {
+ LEFT = 1,
+ RIGHT = 2,
+ FRONT = 3,
+ BACK = 4
+};
+
class Logic {
public:
@@ -53,6 +60,14 @@
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 @@
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
More information about the Scummvm-git-logs
mailing list