[Scummvm-cvs-logs] CVS: scummvm/queen logic.cpp,1.16,1.17 logic.h,1.8,1.9 cutaway.cpp,1.6,1.7
David Eriksson
twogood at users.sourceforge.net
Sat Oct 4 01:52:05 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.h,1.27,1.28 driver96.h,1.52,1.53 keyboard.cpp,1.10,1.11 language.cpp,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen structs.h,NONE,1.1 logic.h,1.9,1.10 graphics.h,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv26215
Modified Files:
logic.cpp logic.h cutaway.cpp
Log Message:
Added gameState to QueenLogic
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- logic.cpp 3 Oct 2003 19:59:19 -0000 1.16
+++ logic.cpp 4 Oct 2003 08:50:48 -0000 1.17
@@ -382,4 +382,19 @@
return framenum;
}
+int16 QueenLogic::gameState(int index) {
+ if (index >= 0 && index < GAME_STATE_COUNT)
+ return _gameState[index];
+ else
+ error("[QueenLogic::gameState] invalid index: %i", index);
+}
+
+void QueenLogic::gameState(int index, int16 newValue) {
+ if (index >= 0 && index < GAME_STATE_COUNT)
+ _gameState[index] = newValue;
+ else
+ error("[QueenLogic::gameState] invalid index: %i", index);
+}
+
+
} // End of namespace Queen
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- logic.h 3 Oct 2003 19:47:41 -0000 1.8
+++ logic.h 4 Oct 2003 08:50:48 -0000 1.9
@@ -68,6 +68,8 @@
uint16 walkOffCount();
uint16 *walkOffData(int index);
+ int16 gameState(int index);
+ void gameState(int index, int16 newValue);
protected:
uint8 *_jas;
@@ -95,6 +97,13 @@
uint16 (*_actorData)[12];
int16 (*_area)[11][8];
uint16 (*_walkOffData)[3];
+
+ enum {
+ GAME_STATE_COUNT = 211
+ };
+
+ int16 _gameState[GAME_STATE_COUNT];
+
uint16 _maxAnimatedFrame, _maxStaticFrame, _maxAnimatedFrameLen; // FMAXA, FMAX, FMAXALEN
QueenResource *_resource;
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cutaway.cpp 3 Oct 2003 19:47:41 -0000 1.6
+++ cutaway.cpp 4 Oct 2003 08:50:48 -0000 1.7
@@ -966,7 +966,7 @@
for (int i = 0; i < gameStateCount; i++) {
int16 stateIndex = (int16)READ_BE_UINT16(ptr); ptr += 2;
- /*int16 stateValue = (int16)READ_BE_UINT16(ptr);*/ ptr += 2;
+ int16 stateValue = (int16)READ_BE_UINT16(ptr); ptr += 2;
int16 objectIndex = (int16)READ_BE_UINT16(ptr); ptr += 2;
int16 areaIndex = (int16)READ_BE_UINT16(ptr); ptr += 2;
int16 areaSubIndex = (int16)READ_BE_UINT16(ptr); ptr += 2;
@@ -975,11 +975,11 @@
bool update = false;
if (stateIndex > 0) {
- // XXX if(GAMESTATE[stateIndex] == stateValue)
- // XXX update = true;
+ if(_queenLogic->gameState(stateIndex) == stateValue)
+ update = true;
}
else {
- // XXX GAMESTATE[abs(stateIndex)] = stateValue;
+ _queenLogic->gameState(abs(stateIndex), stateValue);
update = true;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.h,1.27,1.28 driver96.h,1.52,1.53 keyboard.cpp,1.10,1.11 language.cpp,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen structs.h,NONE,1.1 logic.h,1.9,1.10 graphics.h,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list