[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.10,1.11 logic.cpp,1.82,1.83

Gregory Montoir cyx at users.sourceforge.net
Sat Nov 8 08:37:38 CET 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv32699

Modified Files:
	command.cpp logic.cpp 
Log Message:
fix dufflebag problem

Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- command.cpp	6 Nov 2003 21:06:00 -0000	1.10
+++ command.cpp	8 Nov 2003 16:36:54 -0000	1.11
@@ -1216,6 +1216,8 @@
 		if (cmdGs->id == command) {
 			if (cmdGs->gameStateSlot > 0) {
 				if (_logic->gameState(cmdGs->gameStateSlot) != cmdGs->gameStateValue) {
+					debug(0, "Command::setConditions() - Failed test %X", ret);
+					debug(0, "Command::setConditions() - GS[%d] == %d (should be %d)", cmdGs->gameStateSlot, _logic->gameState(cmdGs->gameStateSlot), cmdGs->gameStateValue);
 					// failed test
 					ret = i;
 					break;
@@ -1229,7 +1231,6 @@
 	}
 
 	if (ret > 0) {
-		debug(0, "Command::setConditions() - Failed test %X", ret);
 		// we've failed, so see if we need to make Joe speak
 		cmdGs = &_cmdGameState[ret];
 		if (cmdGs->speakValue > 0 && lastCmd) {

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- logic.cpp	8 Nov 2003 11:32:32 -0000	1.82
+++ logic.cpp	8 Nov 2003 16:36:54 -0000	1.83
@@ -679,8 +679,10 @@
 }
 
 void Logic::gameState(int index, int16 newValue) {
-	if (index >= 0 && index < GAME_STATE_COUNT)
-		 _gameState[index] = newValue;
+	if (index >= 0 && index < GAME_STATE_COUNT) {
+		debug(0, "Logic::gameState() - GAMESTATE[%d] = %d", index, newValue);
+		_gameState[index] = newValue;
+	}
 	else
 		error("[QueenLogic::gameState] invalid index: %i", index);
 }
@@ -847,6 +849,8 @@
 
 
 void Logic::roomSetupFurniture() {
+
+	int16 gstate[9];
 	_numFurnitureStatic = 0;
 	_numFurnitureAnimated = 0;
 	_numFurnitureAnimatedLen = 0;
@@ -858,7 +862,7 @@
 	for (i = 1; i <= _numFurniture; ++i) {
 		if (_furnitureData[i].room == _currentRoom) {
 			++furnitureTotal;
-			_gameState[furnitureTotal] = _furnitureData[i].gameStateValue;
+			gstate[furnitureTotal] = _furnitureData[i].gameStateValue;
 		}
 	}
 	if (furnitureTotal == 0) {
@@ -873,7 +877,7 @@
 
 	// unpack the static bobs
 	for	(i = 1; i <= furnitureTotal; ++i) {
-		int16 obj = _gameState[i];
+		int16 obj = gstate[i];
 		if (obj > 0 && obj <= 5000) {
 			GraphicData *pgd = &_graphicData[obj];
 			if (pgd->lastFrame == 0) {
@@ -893,7 +897,7 @@
 	// unpack the animated bobs
 	uint16 curBob = 0;
 	for  (i = 1; i <= furnitureTotal; ++i) {
-		int16 obj = _gameState[i];
+		int16 obj = gstate[i];
 		if (obj > 0 && obj <= 5000) {
 			GraphicData *pgd = &_graphicData[obj];
 
@@ -926,7 +930,7 @@
 	// unpack the paste downs
 	++curImage;
 	for  (i = 1; i <= furnitureTotal; ++i) {
-		int16 obj = _gameState[i];
+		int16 obj = gstate[i];
 		if (obj > 5000) {
 			obj -= 5000;
 			GraphicData *pgd = &_graphicData[obj];





More information about the Scummvm-git-logs mailing list