diff options
author | Strangerke | 2013-12-11 01:01:58 +0100 |
---|---|---|
committer | Strangerke | 2013-12-11 01:01:58 +0100 |
commit | c71bf890c5e5dec9f29cb3683b5584e5a3e866df (patch) | |
tree | 1c464da3c620a213932fcea3b63a1987b900eca8 /engines/tsage/ringworld2 | |
parent | a66543293e71d6ed6919c088c2e43882252f68db (diff) | |
download | scummvm-rg350-c71bf890c5e5dec9f29cb3683b5584e5a3e866df.tar.gz scummvm-rg350-c71bf890c5e5dec9f29cb3683b5584e5a3e866df.tar.bz2 scummvm-rg350-c71bf890c5e5dec9f29cb3683b5584e5a3e866df.zip |
TSAGE: R2R - Fix a bug in action4, some renaming
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 40 | ||||
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.h | 4 |
2 files changed, 23 insertions, 21 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index a3235b3990..cfba50e7f9 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -3388,7 +3388,7 @@ void Scene1337::Action4::signal() { switch (_actionIndex++) { case 0: - if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) { + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (!scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) { if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0); @@ -3425,7 +3425,7 @@ void Scene1337::Action4::signal() { scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]); scene->_animatedCard._card.hide(); - if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId == 0))) { + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (!scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) { if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); scene->_animatedCard._card.setPosition(Common::Point(162, 95)); @@ -3460,7 +3460,7 @@ void Scene1337::Action4::signal() { scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]); scene->_animatedCard._card.hide(); - if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId == 0))) { + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId == 0) && (!scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) { if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); scene->_animatedCard._card.setPosition(Common::Point(162, 95)); @@ -3495,7 +3495,7 @@ void Scene1337::Action4::signal() { scene->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]); scene->_animatedCard._card.hide(); - if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId == 0) && (scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId == 0))) { + if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId == 0) && (!scene->subC264B(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) { if (scene->_cardsAvailableNumb < 0) scene->shuffleCards(); scene->_animatedCard._card.setPosition(Common::Point(162, 95)); @@ -3962,11 +3962,11 @@ void Scene1337::Action11::signal() { } } - if ((found) && (scene->subC3E92(scene->_actionIdx1) != -1)) { + if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) { scene->_actionCard1 = &scene->_gameBoardSide[0]._handCard[i]; scene->_actionCard2 = &scene->_gameBoardSide[0]._emptyStationPos; if (scene->_actionIdx1 != 0) { - int tmpVal = scene->subC3E92(scene->_actionIdx1); + int tmpVal = scene->getFreeHandCard(scene->_actionIdx1); scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); @@ -3981,11 +3981,11 @@ void Scene1337::Action11::signal() { } } - if ((found) && (scene->subC3E92(scene->_actionIdx1) != -1)) { + if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) { scene->_actionCard1 = &scene->_gameBoardSide[1]._handCard[i]; scene->_actionCard2 = &scene->_gameBoardSide[1]._emptyStationPos; if (scene->_actionIdx1 != 1) { - int tmpVal = scene->subC3E92(scene->_actionIdx1); + int tmpVal = scene->getFreeHandCard(scene->_actionIdx1); scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); @@ -4000,7 +4000,7 @@ void Scene1337::Action11::signal() { } } - if ((found) && (scene->subC3E92(scene->_actionIdx1) != -1)) { + if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) { scene->subC4CD2(); if (MessageDialog::show(USE_DOUBLE_AGENT, NO_MSG, YES_MSG) == 0) scene->subC4CEC(); @@ -4009,7 +4009,7 @@ void Scene1337::Action11::signal() { scene->_actionCard1 = &scene->_gameBoardSide[2]._handCard[i]; scene->_actionCard2 = &scene->_gameBoardSide[2]._emptyStationPos; if (scene->_actionIdx1 != 2) { - int tmpVal = scene->subC3E92(scene->_actionIdx1); + int tmpVal = scene->getFreeHandCard(scene->_actionIdx1); scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); @@ -4025,11 +4025,11 @@ void Scene1337::Action11::signal() { } } - if ((found) && (scene->subC3E92(scene->_actionIdx1) != -1)) { + if ((found) && (scene->getFreeHandCard(scene->_actionIdx1) != -1)) { scene->_actionCard1 = &scene->_gameBoardSide[3]._handCard[i]; scene->_actionCard2 = &scene->_gameBoardSide[3]._emptyStationPos; if (scene->_actionIdx1 != 3) { - int tmpVal = scene->subC3E92(scene->_actionIdx1); + int tmpVal = scene->getFreeHandCard(scene->_actionIdx1); scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal]; } scene->_item1.setAction(&scene->_action12); @@ -4096,7 +4096,7 @@ void Scene1337::Action11::signal() { scene->subC4CEC(); } else { if (scene->_actionIdx2 != 2) { - int tmpVal = scene->subC3E92(scene->_actionIdx2); + int tmpVal = scene->getFreeHandCard(scene->_actionIdx2); scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx2]._handCard[tmpVal]; } } @@ -4263,16 +4263,16 @@ void Scene1337::Action12::signal() { if (scene->_actionIdx1 != 1) { switch (scene->_actionIdx1) { case 0: - scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->subC3E92(0)]; + scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->getFreeHandCard(0)]; break; case 3: - scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->subC3E92(3)]; + scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->getFreeHandCard(3)]; break; default: break; } } else { - scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[scene->subC3E92(1)]; + scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[scene->getFreeHandCard(1)]; } } @@ -4667,8 +4667,8 @@ void Scene1337::subC2586() { } -bool Scene1337::subC264B(int arg1) { - switch (arg1) { +bool Scene1337::subC264B(int cardId) { + switch (cardId) { case 10: // No break on purpose case 12: @@ -5039,7 +5039,7 @@ void Scene1337::subC33C0(Card *subObj1, Card *subObj2) { _item1.setAction(&_action7); } -int Scene1337::subC3E92(int playerId) { +int Scene1337::getFreeHandCard(int playerId) { if ( (_gameBoardSide[playerId]._handCard[0]._cardId == 0) && (_gameBoardSide[playerId]._handCard[1]._cardId == 0) && (_gameBoardSide[playerId]._handCard[2]._cardId == 0) @@ -5384,6 +5384,8 @@ void Scene1337::subPostInit() { _autoplay = false; _instructionsDisplayedFl = false; _instructionsWaitCount = 0; + + actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154); } void Scene1337::suggestInstructions() { diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.h b/engines/tsage/ringworld2/ringworld2_scenes1.h index aa78686cbf..de0f3c9af4 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.h +++ b/engines/tsage/ringworld2/ringworld2_scenes1.h @@ -333,7 +333,7 @@ public: void subC20E5(); void handleNextTurn(); void subC2586(); - bool subC264B(int arg1); + bool subC264B(int cardId); bool subC2687(int arg1); int subC26CB(int arg1, int arg2); int findNormalCardInHand(int playerId); @@ -353,7 +353,7 @@ public: void subC34A1(Card *subObj1, Card *subObj2); Card *subC34EC(int arg1); void subC358E(Card *subObj1, int arg2); - int subC3E92(int playerId); + int getFreeHandCard(int playerId); void discardCard(Card *card); void subC4CD2(); void subC4CEC(); |