mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-02 15:38:59 +00:00
TSAGE: R2R - Fix a bug in action4, some renaming
This commit is contained in:
parent
a66543293e
commit
c71bf890c5
@ -3388,7 +3388,7 @@ void Scene1337::Action4::signal() {
|
|||||||
|
|
||||||
switch (_actionIndex++) {
|
switch (_actionIndex++) {
|
||||||
case 0:
|
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)
|
if (scene->_cardsAvailableNumb < 0)
|
||||||
scene->shuffleCards();
|
scene->shuffleCards();
|
||||||
scene->_animatedCard._card.setPosition(Common::Point(162, 95), 0);
|
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->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[0]);
|
||||||
|
|
||||||
scene->_animatedCard._card.hide();
|
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)
|
if (scene->_cardsAvailableNumb < 0)
|
||||||
scene->shuffleCards();
|
scene->shuffleCards();
|
||||||
scene->_animatedCard._card.setPosition(Common::Point(162, 95));
|
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->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[1]);
|
||||||
|
|
||||||
scene->_animatedCard._card.hide();
|
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)
|
if (scene->_cardsAvailableNumb < 0)
|
||||||
scene->shuffleCards();
|
scene->shuffleCards();
|
||||||
scene->_animatedCard._card.setPosition(Common::Point(162, 95));
|
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->setAnimationInfo(&scene->_gameBoardSide[scene->_currentPlayerNumb]._handCard[2]);
|
||||||
|
|
||||||
scene->_animatedCard._card.hide();
|
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)
|
if (scene->_cardsAvailableNumb < 0)
|
||||||
scene->shuffleCards();
|
scene->shuffleCards();
|
||||||
scene->_animatedCard._card.setPosition(Common::Point(162, 95));
|
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->_actionCard1 = &scene->_gameBoardSide[0]._handCard[i];
|
||||||
scene->_actionCard2 = &scene->_gameBoardSide[0]._emptyStationPos;
|
scene->_actionCard2 = &scene->_gameBoardSide[0]._emptyStationPos;
|
||||||
if (scene->_actionIdx1 != 0) {
|
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->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
|
||||||
}
|
}
|
||||||
scene->_item1.setAction(&scene->_action12);
|
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->_actionCard1 = &scene->_gameBoardSide[1]._handCard[i];
|
||||||
scene->_actionCard2 = &scene->_gameBoardSide[1]._emptyStationPos;
|
scene->_actionCard2 = &scene->_gameBoardSide[1]._emptyStationPos;
|
||||||
if (scene->_actionIdx1 != 1) {
|
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->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
|
||||||
}
|
}
|
||||||
scene->_item1.setAction(&scene->_action12);
|
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();
|
scene->subC4CD2();
|
||||||
if (MessageDialog::show(USE_DOUBLE_AGENT, NO_MSG, YES_MSG) == 0)
|
if (MessageDialog::show(USE_DOUBLE_AGENT, NO_MSG, YES_MSG) == 0)
|
||||||
scene->subC4CEC();
|
scene->subC4CEC();
|
||||||
@ -4009,7 +4009,7 @@ void Scene1337::Action11::signal() {
|
|||||||
scene->_actionCard1 = &scene->_gameBoardSide[2]._handCard[i];
|
scene->_actionCard1 = &scene->_gameBoardSide[2]._handCard[i];
|
||||||
scene->_actionCard2 = &scene->_gameBoardSide[2]._emptyStationPos;
|
scene->_actionCard2 = &scene->_gameBoardSide[2]._emptyStationPos;
|
||||||
if (scene->_actionIdx1 != 2) {
|
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->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
|
||||||
}
|
}
|
||||||
scene->_item1.setAction(&scene->_action12);
|
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->_actionCard1 = &scene->_gameBoardSide[3]._handCard[i];
|
||||||
scene->_actionCard2 = &scene->_gameBoardSide[3]._emptyStationPos;
|
scene->_actionCard2 = &scene->_gameBoardSide[3]._emptyStationPos;
|
||||||
if (scene->_actionIdx1 != 3) {
|
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->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx1]._handCard[tmpVal];
|
||||||
}
|
}
|
||||||
scene->_item1.setAction(&scene->_action12);
|
scene->_item1.setAction(&scene->_action12);
|
||||||
@ -4096,7 +4096,7 @@ void Scene1337::Action11::signal() {
|
|||||||
scene->subC4CEC();
|
scene->subC4CEC();
|
||||||
} else {
|
} else {
|
||||||
if (scene->_actionIdx2 != 2) {
|
if (scene->_actionIdx2 != 2) {
|
||||||
int tmpVal = scene->subC3E92(scene->_actionIdx2);
|
int tmpVal = scene->getFreeHandCard(scene->_actionIdx2);
|
||||||
scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx2]._handCard[tmpVal];
|
scene->_actionCard3 = &scene->_gameBoardSide[scene->_actionIdx2]._handCard[tmpVal];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4263,16 +4263,16 @@ void Scene1337::Action12::signal() {
|
|||||||
if (scene->_actionIdx1 != 1) {
|
if (scene->_actionIdx1 != 1) {
|
||||||
switch (scene->_actionIdx1) {
|
switch (scene->_actionIdx1) {
|
||||||
case 0:
|
case 0:
|
||||||
scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->subC3E92(0)];
|
scene->_actionCard3 = &scene->_gameBoardSide[0]._handCard[scene->getFreeHandCard(0)];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->subC3E92(3)];
|
scene->_actionCard3 = &scene->_gameBoardSide[3]._handCard[scene->getFreeHandCard(3)];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} 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) {
|
bool Scene1337::subC264B(int cardId) {
|
||||||
switch (arg1) {
|
switch (cardId) {
|
||||||
case 10:
|
case 10:
|
||||||
// No break on purpose
|
// No break on purpose
|
||||||
case 12:
|
case 12:
|
||||||
@ -5039,7 +5039,7 @@ void Scene1337::subC33C0(Card *subObj1, Card *subObj2) {
|
|||||||
_item1.setAction(&_action7);
|
_item1.setAction(&_action7);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Scene1337::subC3E92(int playerId) {
|
int Scene1337::getFreeHandCard(int playerId) {
|
||||||
if ( (_gameBoardSide[playerId]._handCard[0]._cardId == 0)
|
if ( (_gameBoardSide[playerId]._handCard[0]._cardId == 0)
|
||||||
&& (_gameBoardSide[playerId]._handCard[1]._cardId == 0)
|
&& (_gameBoardSide[playerId]._handCard[1]._cardId == 0)
|
||||||
&& (_gameBoardSide[playerId]._handCard[2]._cardId == 0)
|
&& (_gameBoardSide[playerId]._handCard[2]._cardId == 0)
|
||||||
@ -5384,6 +5384,8 @@ void Scene1337::subPostInit() {
|
|||||||
_autoplay = false;
|
_autoplay = false;
|
||||||
_instructionsDisplayedFl = false;
|
_instructionsDisplayedFl = false;
|
||||||
_instructionsWaitCount = 0;
|
_instructionsWaitCount = 0;
|
||||||
|
|
||||||
|
actionDisplay(1330, 114, 159, 10, 1, 200, 0, 7, 0, 154, 154);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene1337::suggestInstructions() {
|
void Scene1337::suggestInstructions() {
|
||||||
|
@ -333,7 +333,7 @@ public:
|
|||||||
void subC20E5();
|
void subC20E5();
|
||||||
void handleNextTurn();
|
void handleNextTurn();
|
||||||
void subC2586();
|
void subC2586();
|
||||||
bool subC264B(int arg1);
|
bool subC264B(int cardId);
|
||||||
bool subC2687(int arg1);
|
bool subC2687(int arg1);
|
||||||
int subC26CB(int arg1, int arg2);
|
int subC26CB(int arg1, int arg2);
|
||||||
int findNormalCardInHand(int playerId);
|
int findNormalCardInHand(int playerId);
|
||||||
@ -353,7 +353,7 @@ public:
|
|||||||
void subC34A1(Card *subObj1, Card *subObj2);
|
void subC34A1(Card *subObj1, Card *subObj2);
|
||||||
Card *subC34EC(int arg1);
|
Card *subC34EC(int arg1);
|
||||||
void subC358E(Card *subObj1, int arg2);
|
void subC358E(Card *subObj1, int arg2);
|
||||||
int subC3E92(int playerId);
|
int getFreeHandCard(int playerId);
|
||||||
void discardCard(Card *card);
|
void discardCard(Card *card);
|
||||||
void subC4CD2();
|
void subC4CD2();
|
||||||
void subC4CEC();
|
void subC4CEC();
|
||||||
|
Loading…
Reference in New Issue
Block a user