diff options
author | Gregory Montoir | 2003-11-08 16:36:54 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-11-08 16:36:54 +0000 |
commit | 31b514652807dd5682326a7121c85af51a15a3a2 (patch) | |
tree | 20299376079a27ef1bd4a820f60b6285bfed6a04 /queen | |
parent | 688c80b0620ae5765355a4048864bb3de84ebf74 (diff) | |
download | scummvm-rg350-31b514652807dd5682326a7121c85af51a15a3a2.tar.gz scummvm-rg350-31b514652807dd5682326a7121c85af51a15a3a2.tar.bz2 scummvm-rg350-31b514652807dd5682326a7121c85af51a15a3a2.zip |
fix dufflebag problem
svn-id: r11208
Diffstat (limited to 'queen')
-rw-r--r-- | queen/command.cpp | 3 | ||||
-rw-r--r-- | queen/logic.cpp | 16 |
2 files changed, 12 insertions, 7 deletions
diff --git a/queen/command.cpp b/queen/command.cpp index 4934b0d643..c2eb937f87 100644 --- a/queen/command.cpp +++ b/queen/command.cpp @@ -1216,6 +1216,8 @@ int16 Command::setConditions(uint16 command, bool lastCmd) { 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 @@ int16 Command::setConditions(uint16 command, bool lastCmd) { } 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) { diff --git a/queen/logic.cpp b/queen/logic.cpp index 2e2fe237c3..6f04a5990f 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -679,8 +679,10 @@ int16 Logic::gameState(int index) { } 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::roomErase() { void Logic::roomSetupFurniture() { + + int16 gstate[9]; _numFurnitureStatic = 0; _numFurnitureAnimated = 0; _numFurnitureAnimatedLen = 0; @@ -858,7 +862,7 @@ void Logic::roomSetupFurniture() { 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 @@ void Logic::roomSetupFurniture() { // 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 @@ void Logic::roomSetupFurniture() { // 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 @@ void Logic::roomSetupFurniture() { // 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]; |