aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_scripts.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2016-08-07 10:49:00 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit670a3c4558f3c2c7e7c0d84d95b906e6fe0ce804 (patch)
tree97d07cf30de54be748a20980b150d888ff8ffea8 /engines/mohawk/riven_scripts.cpp
parent3c8decec0a416d874ae6db93c7e4977ec36432fb (diff)
downloadscummvm-rg350-670a3c4558f3c2c7e7c0d84d95b906e6fe0ce804.tar.gz
scummvm-rg350-670a3c4558f3c2c7e7c0d84d95b906e6fe0ce804.tar.bz2
scummvm-rg350-670a3c4558f3c2c7e7c0d84d95b906e6fe0ce804.zip
MOHAWK: Move card id remapping to RivenStack
Diffstat (limited to 'engines/mohawk/riven_scripts.cpp')
-rw-r--r--engines/mohawk/riven_scripts.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index cfc97bfe59..3155c4347c 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -394,7 +394,8 @@ void RivenSimpleCommand::stopSound(uint16 op, uint16 argc, uint16 *argv) {
// would cause all ambient sounds not to play. An alternative
// fix would be to stop all scripts on a stack change, but this
// does fine for now.
- if (_vm->getCurStack()->getId() == kStackTspit && (_vm->getCurCardRMAP() == 0x6e9a || _vm->getCurCardRMAP() == 0xfeeb))
+ if (_vm->getCurStack()->getId() == kStackTspit && (_vm->getCurStack()->getCurrentCardGlobalId() == 0x6e9a ||
+ _vm->getCurStack()->getCurrentCardGlobalId() == 0xfeeb))
return;
// The argument is a bitflag for the setting.
@@ -477,7 +478,7 @@ void RivenSimpleCommand::changeStack(uint16 op, uint16 argc, uint16 *argv) {
_vm->changeToStack(index);
uint32 rmapCode = (argv[1] << 16) + argv[2];
- uint16 cardID = _vm->matchRMAPToCard(rmapCode);
+ uint16 cardID = _vm->getCurStack()->getCardStackId(rmapCode);
_vm->changeToCard(cardID);
}
@@ -580,7 +581,7 @@ void RivenSimpleCommand::activatePLST(uint16 op, uint16 argc, uint16 *argv) {
void RivenSimpleCommand::activateSLST(uint16 op, uint16 argc, uint16 *argv) {
// WORKAROUND: Disable the SLST that is played during Riven's intro.
// Riven X does this too (spoke this over with Jeff)
- if (_vm->getCurStack()->getId() == kStackTspit && _vm->getCurCardRMAP() == 0x6e9a && argv[0] == 2)
+ if (_vm->getCurStack()->getId() == kStackTspit && _vm->getCurStack()->getCurrentCardGlobalId() == 0x6e9a && argv[0] == 2)
return;
_vm->_activatedSLST = true;