diff options
-rw-r--r-- | engines/tsage/ringworld2/ringworld2_scenes1.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp index cf611090a0..8c960f47e1 100644 --- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp +++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp @@ -4293,7 +4293,8 @@ void Scene1337::Action12::signal() { scene->_selectedCard._stationPos = event.mousePos; - if (scene->_actionPlayerIdx == 0) { + switch (scene->_actionPlayerIdx) { + case 0: for (i = 0; i <= 3; i++) { if (scene->_gameBoardSide[0]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[0]._handCard[i]._cardId != 0)) { found = true; @@ -4301,42 +4302,44 @@ void Scene1337::Action12::signal() { break; } } - } - - if (scene->_actionPlayerIdx == 3) { + break; + case 1: for (i = 0; i <= 3; i++) { - if (scene->_gameBoardSide[3]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)) { + if (scene->_gameBoardSide[1]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)) { found = true; - scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[i]; + scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[i]; break; } } - } - - if (scene->_actionPlayerIdx == 1) { + break; + case 3: for (i = 0; i <= 3; i++) { - if (scene->_gameBoardSide[1]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[1]._handCard[i]._cardId != 0)) { + if (scene->_gameBoardSide[3]._handCard[i].isIn(scene->_selectedCard._stationPos) && (scene->_gameBoardSide[3]._handCard[i]._cardId != 0)) { found = true; - scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[i]; + scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[i]; break; } } + break; + default: + break; } } scene->subC4CEC(); - } else if (scene->_actionPlayerIdx != 1) { + } else { switch (scene->_actionPlayerIdx) { case 0: scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->getRandomCardFromHand(0)]; break; + case 1: + scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[scene->getRandomCardFromHand(1)]; + break; case 3: scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->getRandomCardFromHand(3)]; break; default: break; } - } else { - scene->_actionCard3 = &scene->_gameBoardSide[1]._handCard[scene->getRandomCardFromHand(1)]; } scene->_actionCard1->_card.postInit(); |