aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/ringworld2
diff options
context:
space:
mode:
authorStrangerke2013-12-22 15:36:26 +0100
committerStrangerke2013-12-22 15:36:26 +0100
commitd1a191ce598063b18e407671578f15e89b65764a (patch)
tree046ed938966dacc890159887c971fcab79c13036 /engines/tsage/ringworld2
parent27d1ac113cc194cf16bee7a7e1414961a61f6589 (diff)
downloadscummvm-rg350-d1a191ce598063b18e407671578f15e89b65764a.tar.gz
scummvm-rg350-d1a191ce598063b18e407671578f15e89b65764a.tar.bz2
scummvm-rg350-d1a191ce598063b18e407671578f15e89b65764a.zip
TSAGE: R2R - more refactoring in scene group 1
Diffstat (limited to 'engines/tsage/ringworld2')
-rw-r--r--engines/tsage/ringworld2/ringworld2_scenes1.cpp654
1 files changed, 319 insertions, 335 deletions
diff --git a/engines/tsage/ringworld2/ringworld2_scenes1.cpp b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
index 8d108105dd..fb0fcd56d4 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes1.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes1.cpp
@@ -6298,296 +6298,290 @@ void Scene1337::handlePlayer2() {
if (_discardPile.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
discardCard(&_selectedCard);
return;
- } else {
- if (_selectedCard._cardId == 1) {
- bool isInCardFl = false;
- int i;
- for (i = 0; i <= 7; i++) {
- if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- isInCardFl = true;
- break;
- }
+ } else if (_selectedCard._cardId == 1) {
+ bool isInCardFl = false;
+ int i;
+ for (i = 0; i <= 7; i++) {
+ if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ isInCardFl = true;
+ break;
}
+ }
- if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 0)) {
- if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
- actionDisplay(1330, 55, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else {
- playPlatformCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
- return;
- }
+ if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 0)) {
+ if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
+ actionDisplay(1330, 55, 159, 10, 1, 200, 0, 7, 0, 154, 154);
} else {
- actionDisplay(1330, 56, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ playPlatformCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
+ return;
}
- } else if (_selectedCard._cardId <= 9) {
- bool isInCardFl = false;
- int i;
- for (i = 0; i <= 7; i++) {
- if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ } else {
+ actionDisplay(1330, 56, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_selectedCard._cardId <= 9) {
+ bool isInCardFl = false;
+ int i;
+ for (i = 0; i <= 7; i++) {
+ if (_gameBoardSide[2]._outpostStation[i].isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ isInCardFl = true;
+ break;
+ }
+ }
+ if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 1)) {
+ isInCardFl = false;
+ for (int j = 0; j <= 7; j++) {
+ if (_selectedCard._cardId == _gameBoardSide[2]._outpostStation[j]._cardId) {
isInCardFl = true;
break;
}
}
- if ((isInCardFl) && (_gameBoardSide[2]._outpostStation[i]._cardId == 1)) {
- isInCardFl = false;
- for (int j = 0; j <= 7; j++) {
- if (_selectedCard._cardId == _gameBoardSide[2]._outpostStation[j]._cardId) {
- isInCardFl = true;
- break;
- }
+ if (isInCardFl) {
+ // This station is already in place
+ actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
+ // You must eliminate your delay before you can play a station
+ actionDisplay(1330, 35, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else {
+ int stationCount = 0;
+ for (int k = 0; k <= 7; k++) {
+ if ((_gameBoardSide[2]._outpostStation[k]._cardId > 1) && (_gameBoardSide[2]._outpostStation[k]._cardId <= 9))
+ ++stationCount;
}
- if (isInCardFl) {
- // This station is already in place
- actionDisplay(1330, 34, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (isDelayCard(_gameBoardSide[2]._delayCard._cardId) != -1) {
- // You must eliminate your delay before you can play a station
- actionDisplay(1330, 35, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else {
- int stationCount = 0;
- for (int k = 0; k <= 7; k++) {
- if ((_gameBoardSide[2]._outpostStation[k]._cardId > 1) && (_gameBoardSide[2]._outpostStation[k]._cardId <= 9))
- ++stationCount;
- }
- if (stationCount == 7)
- _winnerId = 2;
+ if (stationCount == 7)
+ _winnerId = 2;
- playStationCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
- return;
- }
- } else {
- actionDisplay(1330, 37, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ playStationCard(&_selectedCard, &_gameBoardSide[2]._outpostStation[i]);
+ return;
}
- } else if ((_selectedCard._cardId == 26) || (_selectedCard._cardId == 30) ||(_selectedCard._cardId == 32) || (_selectedCard._cardId == 28)) {
- // 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)) {
- if (_gameBoardSide[2]._delayCard._cardId != 0) {
- switch (_gameBoardSide[2]._delayCard._cardId) {
- case 11:
- actionDisplay(1330, 68, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 14:
- actionDisplay(1330, 80, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 16:
- actionDisplay(1330, 84, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 24:
- actionDisplay(1330, 96, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
- }
- } else {
- actionDisplay(1330, 41, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else {
+ actionDisplay(1330, 37, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if ((_selectedCard._cardId == 26) || (_selectedCard._cardId == 30) ||(_selectedCard._cardId == 32) || (_selectedCard._cardId == 28)) {
+ // 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)) {
+ if (_gameBoardSide[2]._delayCard._cardId != 0) {
+ switch (_gameBoardSide[2]._delayCard._cardId) {
+ case 11:
+ actionDisplay(1330, 68, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 14:
+ actionDisplay(1330, 80, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 16:
+ actionDisplay(1330, 84, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 24:
+ actionDisplay(1330, 96, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
}
} else {
- playAntiDelayCard(&_selectedCard, &_gameBoardSide[2]._delayCard);
- return;
+ actionDisplay(1330, 41, 159, 10, 1, 200, 0, 7, 0, 154, 154);
}
} else {
- if ((getStationCardId(_selectedCard._cardId) == -1) && (isDelayCard(_selectedCard._cardId) == -1)) {
- if (_selectedCard._cardId == 13) {
- if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- for (int k = 0; k <= 7; k++) {
- if (_gameBoardSide[0]._outpostStation[k]._cardId != 0) {
- playCounterTrickCard(&_selectedCard, 0);
- return;
- }
- }
- actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- for (int k = 0; k <= 7; k++) {
- if (_gameBoardSide[3]._outpostStation[k]._cardId != 0) {
- playCounterTrickCard(&_selectedCard, 3);
- return;
- }
- }
- actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- for (int k = 0; k <= 7; k++) {
- if (_gameBoardSide[1]._outpostStation[k]._cardId == 0) {
- playCounterTrickCard(&_selectedCard, 1);
- return;
- }
- }
- actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else {
- actionDisplay(1330, 128, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ playAntiDelayCard(&_selectedCard, &_gameBoardSide[2]._delayCard);
+ return;
+ }
+ } else if ((getStationCardId(_selectedCard._cardId) == -1) && (isDelayCard(_selectedCard._cardId) == -1)) {
+ if (_selectedCard._cardId == 13) {
+ if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ for (int k = 0; k <= 7; k++) {
+ if (_gameBoardSide[0]._outpostStation[k]._cardId != 0) {
+ playCounterTrickCard(&_selectedCard, 0);
+ return;
}
- } else if (_selectedCard._cardId == 25) {
- if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if ( (_gameBoardSide[0]._handCard[0]._cardId != 0)
- || (_gameBoardSide[0]._handCard[1]._cardId != 0)
- || (_gameBoardSide[0]._handCard[2]._cardId != 0)
- || (_gameBoardSide[0]._handCard[3]._cardId != 0) ) {
- int k;
- for (k = 0; k <= 3; k++){
- if (_gameBoardSide[2]._handCard[k]._cardId == 0)
- break;
- }
- playThieftCard(2, &_gameBoardSide[2]._handCard[k], 0);
- return;
- } else {
- actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if ( (_gameBoardSide[1]._handCard[0]._cardId != 0)
- || (_gameBoardSide[1]._handCard[1]._cardId != 0)
- || (_gameBoardSide[1]._handCard[2]._cardId != 0)
- || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) {
- int k;
- for (k = 0; k <= 3; k++){
- if (_gameBoardSide[2]._handCard[k]._cardId == 0)
- break;
- }
- playThieftCard(2, &_gameBoardSide[2]._handCard[k], 1);
- return;
- } else {
- actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
+ }
+ actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ for (int k = 0; k <= 7; k++) {
+ if (_gameBoardSide[3]._outpostStation[k]._cardId != 0) {
+ playCounterTrickCard(&_selectedCard, 3);
+ return;
}
-
- if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if ( (_gameBoardSide[3]._handCard[0]._cardId != 0)
- || (_gameBoardSide[3]._handCard[1]._cardId != 0)
- || (_gameBoardSide[3]._handCard[2]._cardId != 0)
- || (_gameBoardSide[3]._handCard[3]._cardId != 0) ) {
- int k;
- for (k = 0; k <= 3; k++){
- if (_gameBoardSide[2]._handCard[k]._cardId == 0)
- break;
- }
- playThieftCard(2, &_gameBoardSide[2]._handCard[k], 3);
- return;
- } else {
- actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- }
- } else {
- actionDisplay(1330, 129, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ for (int k = 0; k <= 7; k++) {
+ if (_gameBoardSide[1]._outpostStation[k]._cardId == 0) {
+ playCounterTrickCard(&_selectedCard, 1);
+ return;
}
- } else if (_selectedCard._cardId == 29) {
- // Interceptor cards are used to prevent collision
- actionDisplay(1330, 136, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (_selectedCard._cardId == 27) {
- actionDisplay(1330, 137, 159, 10, 1, 200, 0, 7, 0, 154, 154);
}
+ actionDisplay(1330, 74, 159, 10, 1, 200, 0, 7, 0, 154, 154);
} else {
- if (_gameBoardSide[0]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[0]._delayCard._cardId != 0) {
- actionDisplay(1330, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!isAttackPossible(0, _selectedCard._cardId)) {
- switch (_selectedCard._cardId) {
- case 10:
- actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
+ actionDisplay(1330, 128, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_selectedCard._cardId == 25) {
+ if (_gameBoardSide[0]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if ( (_gameBoardSide[0]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[0]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[0]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[0]._handCard[3]._cardId != 0) ) {
+ int k;
+ for (k = 0; k <= 3; k++){
+ if (_gameBoardSide[2]._handCard[k]._cardId == 0)
+ break;
}
- } else {
- playDelayCard(&_selectedCard, &_gameBoardSide[0]._delayCard);
+ playThieftCard(2, &_gameBoardSide[2]._handCard[k], 0);
return;
- }
- } else if (_gameBoardSide[3]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[3]._delayCard._cardId != 0) {
- actionDisplay(1330, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!isAttackPossible(3, _selectedCard._cardId)) {
- switch (_selectedCard._cardId) {
- case 10:
- actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
+ } else {
+ actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_gameBoardSide[1]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if ( (_gameBoardSide[1]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[1]._handCard[3]._cardId != 0) ) {
+ int k;
+ for (k = 0; k <= 3; k++){
+ if (_gameBoardSide[2]._handCard[k]._cardId == 0)
+ break;
}
- } else {
- playDelayCard(&_selectedCard, &_gameBoardSide[3]._delayCard);
+ playThieftCard(2, &_gameBoardSide[2]._handCard[k], 1);
return;
- }
- } else if (_gameBoardSide[1]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
- if (_gameBoardSide[1]._delayCard._cardId != 0) {
- actionDisplay(1330, 19, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- } else if (!isAttackPossible(1, _selectedCard._cardId)) {
- switch (_selectedCard._cardId) {
- case 10:
- actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 12:
- actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 15:
- actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 17:
- actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 18:
- actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 19:
- actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 20:
- actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- case 21:
- actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
- break;
- default:
- break;
+ } else {
+ actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ }
+
+ if (_gameBoardSide[3]._emptyStationPos.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if ( (_gameBoardSide[3]._handCard[0]._cardId != 0)
+ || (_gameBoardSide[3]._handCard[1]._cardId != 0)
+ || (_gameBoardSide[3]._handCard[2]._cardId != 0)
+ || (_gameBoardSide[3]._handCard[3]._cardId != 0) ) {
+ int k;
+ for (k = 0; k <= 3; k++){
+ if (_gameBoardSide[2]._handCard[k]._cardId == 0)
+ break;
}
- } else {
- playDelayCard(&_selectedCard, &_gameBoardSide[1]._delayCard);
+ playThieftCard(2, &_gameBoardSide[2]._handCard[k], 3);
return;
- }
} else {
- actionDisplay(1330, 38, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ actionDisplay(1330, 99, 159, 10, 1, 200, 0, 7, 0, 154, 154);
}
+ } else {
+ actionDisplay(1330, 129, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_selectedCard._cardId == 29) {
+ // Interceptor cards are used to prevent collision
+ actionDisplay(1330, 136, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (_selectedCard._cardId == 27) {
+ actionDisplay(1330, 137, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ }
+ } else if (_gameBoardSide[0]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[0]._delayCard._cardId != 0) {
+ actionDisplay(1330, 15, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (!isAttackPossible(0, _selectedCard._cardId)) {
+ switch (_selectedCard._cardId) {
+ case 10:
+ actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else {
+ playDelayCard(&_selectedCard, &_gameBoardSide[0]._delayCard);
+ return;
+ }
+ } else if (_gameBoardSide[3]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[3]._delayCard._cardId != 0) {
+ actionDisplay(1330, 17, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (!isAttackPossible(3, _selectedCard._cardId)) {
+ switch (_selectedCard._cardId) {
+ case 10:
+ actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
+ }
+ } else {
+ playDelayCard(&_selectedCard, &_gameBoardSide[3]._delayCard);
+ return;
+ }
+ } else if (_gameBoardSide[1]._delayCard.isIn(Common::Point(_selectedCard._stationPos.x + 12, _selectedCard._stationPos.y + 12))) {
+ if (_gameBoardSide[1]._delayCard._cardId != 0) {
+ actionDisplay(1330, 19, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ } else if (!isAttackPossible(1, _selectedCard._cardId)) {
+ switch (_selectedCard._cardId) {
+ case 10:
+ actionDisplay(1330, 66, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 12:
+ actionDisplay(1330, 70, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 15:
+ actionDisplay(1330, 82, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 17:
+ actionDisplay(1330, 86, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 18:
+ actionDisplay(1330, 88, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 19:
+ actionDisplay(1330, 90, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 20:
+ actionDisplay(1330, 92, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ case 21:
+ actionDisplay(1330, 94, 159, 10, 1, 200, 0, 7, 0, 154, 154);
+ break;
+ default:
+ break;
}
+ } else {
+ playDelayCard(&_selectedCard, &_gameBoardSide[1]._delayCard);
+ return;
}
+ } else {
+ actionDisplay(1330, 38, 159, 10, 1, 200, 0, 7, 0, 154, 154);
}
}
} else {
@@ -8673,12 +8667,10 @@ void Scene1550::enterArea() {
R2_GLOBALS._sceneManager._hasPalette = false;
_wallType = 0;
}
- } else {
- if (_screenNumber == 1234) {
- R2_GLOBALS._sceneManager._fadeMode = FADEMODE_IMMEDIATE;
- loadScene(1550);
- R2_GLOBALS._sceneManager._hasPalette = false;
- }
+ } else if (_screenNumber == 1234) {
+ R2_GLOBALS._sceneManager._fadeMode = FADEMODE_IMMEDIATE;
+ loadScene(1550);
+ R2_GLOBALS._sceneManager._hasPalette = false;
}
if (_screenNumber == 1234)
@@ -11146,30 +11138,28 @@ bool Scene1800::PassengerDoor::startAction(CursorType action, Event &event) {
}
}
}
+ } else if (scene->_leftStaircase._frame == 1) {
+ return SceneActor::startAction(action, event);
} else {
- if (scene->_leftStaircase._frame == 1) {
- return SceneActor::startAction(action, event);
+ R2_GLOBALS.clearFlag(29);
+ R2_GLOBALS._player.disableControl();
+ if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
+ if (R2_GLOBALS.getFlag(14)) {
+ scene->_sceneMode = 2;
+ scene->setAction(&scene->_sequenceManager, scene, 1809, &scene->_companion, &scene->_doors, NULL);
+ R2_GLOBALS.clearFlag(14);
+ } else {
+ scene->_sceneMode = 1806;
+ scene->setAction(&scene->_sequenceManager, scene, 1806, &R2_GLOBALS._player, &scene->_companion, &scene->_rightDoor, NULL);
+ }
} else {
- R2_GLOBALS.clearFlag(29);
- R2_GLOBALS._player.disableControl();
- if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
- if (R2_GLOBALS.getFlag(14)) {
- scene->_sceneMode = 2;
- scene->setAction(&scene->_sequenceManager, scene, 1809, &scene->_companion, &scene->_doors, NULL);
- R2_GLOBALS.clearFlag(14);
- } else {
- scene->_sceneMode = 1806;
- scene->setAction(&scene->_sequenceManager, scene, 1806, &R2_GLOBALS._player, &scene->_companion, &scene->_rightDoor, NULL);
- }
+ if (R2_GLOBALS.getFlag(14)) {
+ scene->_sceneMode = 2;
+ scene->setAction(&scene->_sequenceManager, scene, 1809, &R2_GLOBALS._player, &scene->_doors, NULL);
+ R2_GLOBALS.clearFlag(14);
} else {
- if (R2_GLOBALS.getFlag(14)) {
- scene->_sceneMode = 2;
- scene->setAction(&scene->_sequenceManager, scene, 1809, &R2_GLOBALS._player, &scene->_doors, NULL);
- R2_GLOBALS.clearFlag(14);
- } else {
- scene->_sceneMode = 1807;
- scene->setAction(&scene->_sequenceManager, scene, 1807, &R2_GLOBALS._player, &scene->_companion, &scene->_rightDoor, NULL);
- }
+ scene->_sceneMode = 1807;
+ scene->setAction(&scene->_sequenceManager, scene, 1807, &R2_GLOBALS._player, &scene->_companion, &scene->_rightDoor, NULL);
}
}
}
@@ -11326,14 +11316,12 @@ void Scene1800::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._walkRegions.disableRegion(10);
R2_GLOBALS._walkRegions.disableRegion(11);
}
+ } else if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
+ R2_GLOBALS._player.setPosition(Common::Point(140, 160));
+ _companion.setPosition(Common::Point(180, 160));
} else {
- if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
- R2_GLOBALS._player.setPosition(Common::Point(140, 160));
- _companion.setPosition(Common::Point(180, 160));
- } else {
- R2_GLOBALS._player.setPosition(Common::Point(180, 160));
- _companion.setPosition(Common::Point(140, 160));
- }
+ R2_GLOBALS._player.setPosition(Common::Point(180, 160));
+ _companion.setPosition(Common::Point(140, 160));
}
_playerShadow.postInit();
@@ -11388,23 +11376,19 @@ void Scene1800::postInit(SceneObjectList *OwnerList) {
_sceneMode = 1815;
setAction(&_sequenceManager, this, 1815, &R2_GLOBALS._player, &_companion, &_leftDoor, NULL);
}
+ } else if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
+ _sceneMode = 1816;
+ setAction(&_sequenceManager, this, 1816, &R2_GLOBALS._player, &_companion, &_rightDoor, NULL);
} else {
- if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
- _sceneMode = 1816;
- setAction(&_sequenceManager, this, 1816, &R2_GLOBALS._player, &_companion, &_rightDoor, NULL);
- } else {
- _sceneMode = 1817;
- setAction(&_sequenceManager, this, 1817, &R2_GLOBALS._player, &_companion, &_rightDoor, NULL);
- }
+ _sceneMode = 1817;
+ setAction(&_sequenceManager, this, 1817, &R2_GLOBALS._player, &_companion, &_rightDoor, NULL);
}
+ } else if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
+ _sceneMode = 1800;
+ setAction(&_sequenceManager, this, 1800, &R2_GLOBALS._player, &_companion, NULL);
} else {
- if (R2_GLOBALS._player._characterIndex == R2_QUINN) {
- _sceneMode = 1800;
- setAction(&_sequenceManager, this, 1800, &R2_GLOBALS._player, &_companion, NULL);
- } else {
- _sceneMode = 1801;
- setAction(&_sequenceManager, this, 1801, &R2_GLOBALS._player, &_companion, NULL);
- }
+ _sceneMode = 1801;
+ setAction(&_sequenceManager, this, 1801, &R2_GLOBALS._player, &_companion, NULL);
}
R2_GLOBALS._player._oldCharacterScene[R2_QUINN] = 1800;
@@ -11910,36 +11894,36 @@ void Scene1850::postInit(SceneObjectList *OwnerList) {
R2_GLOBALS._player.setVisage(1500);
_companion.setVisage(1505);
}
- } else { // Not Quinn
- if (R2_GLOBALS.getFlag(32)) {
- R2_GLOBALS._player.setVisage(1508);
- _companion.setVisage(1511);
-
- _screen.postInit();
- _screen.setup(1853, 3, 1);
- _screen.setPosition(Common::Point(122, 113));
- _screen.fixPriority(114);
- _screen._effect = EFFECT_SHADED2;
- _screen.setDetails(1850, 30, -1, -1, 2, (SceneItem *) NULL);
-
- _helmet.postInit();
- _helmet.setup(1853, 3, 2);
- _helmet.setPosition(Common::Point(139, 111));
- _helmet.fixPriority(114);
- _helmet._effect = EFFECT_SHADED2;
- _helmet.setDetails(1850, 28, -1, -1, 1, (SceneItem *) NULL);
-
- if (R2_GLOBALS.getFlag(31)) {
- _screen._shade = 0;
- _helmet._shade = 0;
- } else {
- _screen._shade = 6;
- _helmet._shade = 6;
- }
+ } else if (R2_GLOBALS.getFlag(32)) {
+ // Not Quinn, flag 32
+ R2_GLOBALS._player.setVisage(1508);
+ _companion.setVisage(1511);
+
+ _screen.postInit();
+ _screen.setup(1853, 3, 1);
+ _screen.setPosition(Common::Point(122, 113));
+ _screen.fixPriority(114);
+ _screen._effect = EFFECT_SHADED2;
+ _screen.setDetails(1850, 30, -1, -1, 2, (SceneItem *) NULL);
+
+ _helmet.postInit();
+ _helmet.setup(1853, 3, 2);
+ _helmet.setPosition(Common::Point(139, 111));
+ _helmet.fixPriority(114);
+ _helmet._effect = EFFECT_SHADED2;
+ _helmet.setDetails(1850, 28, -1, -1, 1, (SceneItem *) NULL);
+
+ if (R2_GLOBALS.getFlag(31)) {
+ _screen._shade = 0;
+ _helmet._shade = 0;
} else {
- R2_GLOBALS._player.setVisage(1505);
- _companion.setVisage(1500);
+ _screen._shade = 6;
+ _helmet._shade = 6;
}
+ } else {
+ // Not Quinn, nor flag 32
+ R2_GLOBALS._player.setVisage(1505);
+ _companion.setVisage(1500);
}
R2_GLOBALS._player.animate(ANIM_MODE_1, NULL);