aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/ringworld2
diff options
context:
space:
mode:
authorStrangerke2013-12-24 18:31:09 +0100
committerStrangerke2013-12-24 18:31:09 +0100
commit2f5e15d2e0b0fc158f7415ac9d99e30108c69932 (patch)
tree5df672e777b92b26f17d98bd75522b75847d411e /engines/tsage/ringworld2
parent28955963d4bcd71e1ae829a3a6690e135b17c2c1 (diff)
downloadscummvm-rg350-2f5e15d2e0b0fc158f7415ac9d99e30108c69932.tar.gz
scummvm-rg350-2f5e15d2e0b0fc158f7415ac9d99e30108c69932.tar.bz2
scummvm-rg350-2f5e15d2e0b0fc158f7415ac9d99e30108c69932.zip
TSAGE: R2R - change a use of checkAntiDelayCard() for consistency
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp39
1 files changed, 22 insertions, 17 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index fb0fcd56d4..0025d0ba61 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -3374,7 +3374,8 @@ void Scene1337::Action4::signal() {
switch (_actionIndex++) {
case 0:
- if ((scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0) && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
if (scene->_cardsAvailableNumb < 0)
scene->shuffleCards();
scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
@@ -3396,8 +3397,8 @@ void Scene1337::Action4::signal() {
}
break;
case 1:
- if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.x)
- && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.y) ) {
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card1Pos.y) ) {
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.postInit();
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card._moveDiff = Common::Point(30, 30);
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._card.setVisage(1332);
@@ -3411,7 +3412,8 @@ 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->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
if (scene->_cardsAvailableNumb < 0)
scene->shuffleCards();
scene->_animatedCard._card.setPosition(Common::Point(162, 95));
@@ -3431,8 +3433,8 @@ void Scene1337::Action4::signal() {
signal();
break;
case 2:
- if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.x)
- && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.y) ) {
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card2Pos.y) ) {
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.postInit();
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card._moveDiff = Common::Point(30, 30);
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]._card.setVisage(1332);
@@ -3446,7 +3448,8 @@ 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->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
if (scene->_cardsAvailableNumb < 0)
scene->shuffleCards();
scene->_animatedCard._card.setPosition(Common::Point(162, 95));
@@ -3466,8 +3469,8 @@ void Scene1337::Action4::signal() {
signal();
break;
case 3:
- if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.x)
- && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.y) ) {
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card3Pos.y) ) {
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.postInit();
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card._moveDiff = Common::Point(30, 30);
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]._card.setVisage(1332);
@@ -3481,7 +3484,8 @@ 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->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
+ if ( (scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._cardId == 0)
+ && (!scene->isStationCard(scene->_gameBoardSide[scene->_currentPlayerNumb]._delayCard._cardId))) {
if (scene->_cardsAvailableNumb < 0)
scene->shuffleCards();
scene->_animatedCard._card.setPosition(Common::Point(162, 95));
@@ -3501,8 +3505,8 @@ void Scene1337::Action4::signal() {
signal();
break;
case 4:
- if ( ( scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.x)
- && ( scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.y) ) {
+ if ( (scene->_animatedCard._card._position.x == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.x)
+ && (scene->_animatedCard._card._position.y == scene->_gameBoardSide[scene->_currentPlayerNumb]._card4Pos.y) ) {
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.postInit();
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card._moveDiff = Common::Point(30, 30);
scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[3]._card.setVisage(1332);
@@ -5798,7 +5802,8 @@ void Scene1337::handlePlayer0() {
for (int i = 0; i <= 3; i++) {
if ((getStationCardId(_gameBoardSide[0]._handCard[i]._cardId) != -1)
- && (_gameBoardSide[2]._delayCard._cardId == 0) && isAttackPossible(2, _gameBoardSide[0]._handCard[i]._cardId)) {
+ && (_gameBoardSide[2]._delayCard._cardId == 0)
+ && isAttackPossible(2, _gameBoardSide[0]._handCard[i]._cardId)) {
playDelayCard(&_gameBoardSide[0]._handCard[i], &_gameBoardSide[2]._delayCard);
return;
}
@@ -6361,7 +6366,10 @@ void Scene1337::handlePlayer2() {
// Check anti-delay card
if (_gameBoardSide[2]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
actionDisplay(1330, 42, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!checkAntiDelayCard(_gameBoardSide[2]._delayCard._cardId, _selectedCard._cardId)) {
+ } else if (checkAntiDelayCard(_gameBoardSide[2]._delayCard._cardId, _selectedCard._cardId)) {
+ playAntiDelayCard(&_selectedCard, &_gameBoardSide[2]._delayCard);
+ return;
+ } else {
if (_gameBoardSide[2]._delayCard._cardId != 0) {
switch (_gameBoardSide[2]._delayCard._cardId) {
case 11:
@@ -6382,9 +6390,6 @@ void Scene1337::handlePlayer2() {
} else {
actionDisplay(1330, 41, 159, 10, 1, 200, 0, 7, 0, 154, 154);
}
- } else {
- playAntiDelayCard(&_selectedCard, &_gameBoardSide[2]._delayCard);
- return;
}
} else if ((getStationCardId(_selectedCard._cardId) == -1) && (isDelayCard(_selectedCard._cardId) == -1)) {
if (_selectedCard._cardId == 13) {