diff options
author | Bastien Bouclet | 2016-08-03 20:07:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | abe6889bbe640c15e0fdf454d3867eb22869db5c (patch) | |
tree | 670b1274c3210eaded25de5f3d84e009c7f10425 | |
parent | 0aaa3760c25e37800f0fda6ef4771c2347d72f7c (diff) | |
download | scummvm-rg350-abe6889bbe640c15e0fdf454d3867eb22869db5c.tar.gz scummvm-rg350-abe6889bbe640c15e0fdf454d3867eb22869db5c.tar.bz2 scummvm-rg350-abe6889bbe640c15e0fdf454d3867eb22869db5c.zip |
MOHAWK: Remove the current card id from the Riven engine class
-rw-r--r-- | engines/mohawk/console.cpp | 9 | ||||
-rw-r--r-- | engines/mohawk/riven.cpp | 26 | ||||
-rw-r--r-- | engines/mohawk/riven.h | 3 | ||||
-rw-r--r-- | engines/mohawk/riven_card.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/riven_card.h | 2 | ||||
-rw-r--r-- | engines/mohawk/riven_external.cpp | 77 | ||||
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 3 | ||||
-rw-r--r-- | engines/mohawk/riven_saveload.cpp | 3 | ||||
-rw-r--r-- | engines/mohawk/riven_scripts.cpp | 11 |
9 files changed, 73 insertions, 65 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp index 4d30008b4f..87a0cd4e94 100644 --- a/engines/mohawk/console.cpp +++ b/engines/mohawk/console.cpp @@ -41,6 +41,7 @@ #ifdef ENABLE_RIVEN #include "mohawk/riven.h" +#include "mohawk/riven_card.h" #include "mohawk/riven_external.h" #include "mohawk/riven_sound.h" #endif @@ -410,7 +411,7 @@ bool RivenConsole::Cmd_ChangeCard(int argc, const char **argv) { } bool RivenConsole::Cmd_CurCard(int argc, const char **argv) { - debugPrintf("Current Card: %d\n", _vm->getCurCard()); + debugPrintf("Current Card: %d\n", _vm->getCurCard()->getId()); return true; } @@ -457,7 +458,7 @@ bool RivenConsole::Cmd_PlaySLST(int argc, const char **argv) { _vm->_sound->stopSound(); _vm->_sound->stopAllSLST(); - uint16 card = (argc == 3) ? (uint16)atoi(argv[2]) : _vm->getCurCard(); + uint16 card = (argc == 3) ? (uint16)atoi(argv[2]) : _vm->getCurCard()->getId(); _vm->_sound->playSLST((uint16)atoi(argv[1]), card); return false; @@ -511,7 +512,7 @@ bool RivenConsole::Cmd_ChangeStack(int argc, const char **argv) { } bool RivenConsole::Cmd_Hotspots(int argc, const char **argv) { - debugPrintf("Current card (%d) has %d hotspots:\n", _vm->getCurCard(), _vm->getHotspotCount()); + debugPrintf("Current card (%d) has %d hotspots:\n", _vm->getCurCard()->getId(), _vm->getHotspotCount()); for (uint16 i = 0; i < _vm->getHotspotCount(); i++) { debugPrintf("Hotspot %d, index %d, BLST ID %d (", i, _vm->_hotspots[i].index, _vm->_hotspots[i].blstID); @@ -671,7 +672,7 @@ bool RivenConsole::Cmd_ListZipCards(int argc, const char **argv) { bool RivenConsole::Cmd_GetRMAP(int argc, const char **argv) { uint32 rmapCode = _vm->getCurCardRMAP(); - debugPrintf("RMAP for %s %d = %08x\n", _vm->getStackName(_vm->getCurStack()).c_str(), _vm->getCurCard(), rmapCode); + debugPrintf("RMAP for %s %d = %08x\n", _vm->getStackName(_vm->getCurStack()).c_str(), _vm->getCurCard()->getId(), rmapCode); return true; } diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp index 9403627212..cf194a538d 100644 --- a/engines/mohawk/riven.cpp +++ b/engines/mohawk/riven.cpp @@ -66,7 +66,6 @@ MohawkEngine_Riven::MohawkEngine_Riven(OSystem *syst, const MohawkGameDescriptio _console = nullptr; _saveLoad = nullptr; _optionsDialog = nullptr; - _curCard = 0; _card = nullptr; _hotspotCount = 0; _curHotspot = -1; @@ -379,8 +378,7 @@ static const RivenSpecialChange rivenSpecialChange[] = { }; void MohawkEngine_Riven::changeToCard(uint16 dest) { - _curCard = dest; - debug (1, "Changing to card %d", _curCard); + debug (1, "Changing to card %d", dest); // Clear the graphics cache (images typically aren't used // on different cards). @@ -388,9 +386,9 @@ void MohawkEngine_Riven::changeToCard(uint16 dest) { if (!(getFeatures() & GF_DEMO)) { for (byte i = 0; i < 13; i++) - if (_curStack == rivenSpecialChange[i].startStack && _curCard == matchRMAPToCard(rivenSpecialChange[i].startCardRMAP)) { + if (_curStack == rivenSpecialChange[i].startStack && dest == matchRMAPToCard(rivenSpecialChange[i].startCardRMAP)) { changeToStack(rivenSpecialChange[i].targetStack); - _curCard = matchRMAPToCard(rivenSpecialChange[i].targetCardRMAP); + dest = matchRMAPToCard(rivenSpecialChange[i].targetCardRMAP); } } @@ -407,7 +405,7 @@ void MohawkEngine_Riven::refreshCard() { // Clear any timer still floating around removeTimer(); - loadHotspots(_curCard); + loadHotspots(_card->getId()); _gfx->_updatesEnabled = true; _gfx->clearWaterEffects(); @@ -423,7 +421,7 @@ void MohawkEngine_Riven::refreshCard() { // Activate the first sound list if none have been activated if (!_activatedSLST) - _sound->playSLST(1, _curCard); + _sound->playSLST(1, _card->getId()); if (_showHotspots) for (uint16 i = 0; i < _hotspotCount; i++) @@ -462,7 +460,7 @@ void MohawkEngine_Riven::loadHotspots(uint16 id) { // Known weird hotspots: // - tspit 371 (DVD: 377), hotspot 4 if (left >= right || top >= bottom) { - warning("%s %d hotspot %d is invalid: (%d, %d, %d, %d)", getStackName(_curStack).c_str(), _curCard, i, left, top, right, bottom); + warning("%s %d hotspot %d is invalid: (%d, %d, %d, %d)", getStackName(_curStack).c_str(), id, i, left, top, right, bottom); left = top = right = bottom = 0; _hotspots[i].enabled = 0; } @@ -554,10 +552,10 @@ void MohawkEngine_Riven::checkInventoryClick() { // In the demo, check if we've clicked the exit button if (getFeatures() & GF_DEMO) { if (g_demoExitRect->contains(mousePos)) { - if (_curStack == kStackAspit && _curCard == 1) { + if (_curStack == kStackAspit && _card->getId() == 1) { // From the main menu, go to the "quit" screen changeToCard(12); - } else if (_curStack == kStackAspit && _curCard == 12) { + } else if (_curStack == kStackAspit && _card->getId() == 12) { // From the "quit" screen, just quit _gameOver = true; } else { @@ -576,7 +574,7 @@ void MohawkEngine_Riven::checkInventoryClick() { // Set the return stack/card id's. _vars["returnstackid"] = _curStack; - _vars["returncardid"] = _curCard; + _vars["returncardid"] = _card->getId(); // See RivenGraphics::showInventory() for an explanation // of the variables' meanings. @@ -668,7 +666,7 @@ uint16 MohawkEngine_Riven::matchRMAPToCard(uint32 rmapCode) { uint32 MohawkEngine_Riven::getCurCardRMAP() { Common::SeekableReadStream *rmapStream = getResource(ID_RMAP, 1); - rmapStream->seek(_curCard * 4); + rmapStream->seek(_card->getId() * 4); uint32 rmapCode = rmapStream->readUint32BE(); delete rmapStream; return rmapCode; @@ -785,7 +783,7 @@ static void catherineIdleTimer(MohawkEngine_Riven *vm) { cathState = 1; // Play the movie, blocking - vm->_video->activateMLST(movie, vm->getCurCard()); + vm->_video->activateMLST(movie, vm->getCurCard()->getId()); vm->_cursor->hideCursor(); vm->_video->playMovieBlockingRiven(movie); vm->_cursor->showCursor(); @@ -919,7 +917,7 @@ static void sunnersBeachTimer(MohawkEngine_Riven *vm) { // Unlike the other cards' scripts which automatically // activate the MLST, we have to set it manually here. uint16 mlstID = vm->_rnd->getRandomNumberRng(3, 8); - vm->_video->activateMLST(mlstID, vm->getCurCard()); + vm->_video->activateMLST(mlstID, vm->getCurCard()->getId()); VideoHandle handle = vm->_video->playMovieRiven(mlstID); timerTime = handle->getDuration().msecs() + vm->_rnd->getRandomNumberRng(1, 30) * 1000; diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h index 11a6d071ee..300078667d 100644 --- a/engines/mohawk/riven.h +++ b/engines/mohawk/riven.h @@ -144,7 +144,6 @@ private: InstallerArchive _installerArchive; // Stack/Card-related functions and variables - uint16 _curCard; uint16 _curStack; void handleEvents(); @@ -176,7 +175,7 @@ public: Common::String getName(uint16 nameResource, uint16 nameID); Common::String getStackName(uint16 stack) const; void runUpdateScreenScript(); - uint16 getCurCard() const { return _curCard; } + RivenCard *getCurCard() const { return _card; } uint16 getCurStack() const { return _curStack; } uint16 matchRMAPToCard(uint32); uint32 getCurCardRMAP(); diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp index f45fde1d1e..90a6888f22 100644 --- a/engines/mohawk/riven_card.cpp +++ b/engines/mohawk/riven_card.cpp @@ -66,4 +66,8 @@ void RivenCard::runScript(uint16 scriptType) { } } +uint16 RivenCard::getId() const { + return _id; +} + } // End of namespace Mohawk diff --git a/engines/mohawk/riven_card.h b/engines/mohawk/riven_card.h index 94bbfe6968..a615e70466 100644 --- a/engines/mohawk/riven_card.h +++ b/engines/mohawk/riven_card.h @@ -38,6 +38,8 @@ public: void initializeZipMode(); void runScript(uint16 scriptType); + uint16 getId() const; + private: void loadCardResource(uint16 id); diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp index fb98145b44..38fe8b2166 100644 --- a/engines/mohawk/riven_external.cpp +++ b/engines/mohawk/riven_external.cpp @@ -22,6 +22,7 @@ #include "mohawk/cursors.h" #include "mohawk/riven.h" +#include "mohawk/riven_card.h" #include "mohawk/riven_external.h" #include "mohawk/riven_graphics.h" #include "mohawk/riven_sound.h" @@ -770,11 +771,11 @@ void RivenExternal::xblabbooknextpage(uint16 argc, uint16 *argv) { void RivenExternal::xsoundplug(uint16 argc, uint16 *argv) { if (_vm->_vars["bheat"] != 0) - _vm->_sound->playSLST(1, _vm->getCurCard()); + _vm->_sound->playSLST(1, _vm->getCurCard()->getId()); else if (_vm->_vars["bcratergg"] != 0) - _vm->_sound->playSLST(2, _vm->getCurCard()); + _vm->_sound->playSLST(2, _vm->getCurCard()->getId()); else - _vm->_sound->playSLST(3, _vm->getCurCard()); + _vm->_sound->playSLST(3, _vm->getCurCard()->getId()); } void RivenExternal::xbchangeboiler(uint16 argc, uint16 *argv) { @@ -789,60 +790,60 @@ void RivenExternal::xbchangeboiler(uint16 argc, uint16 *argv) { // Water is filling/draining from the boiler if (water == 0) { if (platform == 1) - _vm->_video->activateMLST(12, _vm->getCurCard()); + _vm->_video->activateMLST(12, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(10, _vm->getCurCard()); + _vm->_video->activateMLST(10, _vm->getCurCard()->getId()); } else if (heat == 1) { if (platform == 1) - _vm->_video->activateMLST(22, _vm->getCurCard()); + _vm->_video->activateMLST(22, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(19, _vm->getCurCard()); + _vm->_video->activateMLST(19, _vm->getCurCard()->getId()); } else { if (platform == 1) - _vm->_video->activateMLST(16, _vm->getCurCard()); + _vm->_video->activateMLST(16, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(13, _vm->getCurCard()); + _vm->_video->activateMLST(13, _vm->getCurCard()->getId()); } } else if (argv[0] == 2 && water != 0) { if (heat == 1) { // Turning on the heat if (platform == 1) - _vm->_video->activateMLST(23, _vm->getCurCard()); + _vm->_video->activateMLST(23, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(20, _vm->getCurCard()); + _vm->_video->activateMLST(20, _vm->getCurCard()->getId()); } else { // Turning off the heat if (platform == 1) - _vm->_video->activateMLST(18, _vm->getCurCard()); + _vm->_video->activateMLST(18, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(15, _vm->getCurCard()); + _vm->_video->activateMLST(15, _vm->getCurCard()->getId()); } } else if (argv[0] == 3) { if (platform == 1) { // Lowering the platform if (water == 1) { if (heat == 1) - _vm->_video->activateMLST(24, _vm->getCurCard()); + _vm->_video->activateMLST(24, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(17, _vm->getCurCard()); + _vm->_video->activateMLST(17, _vm->getCurCard()->getId()); } else - _vm->_video->activateMLST(11, _vm->getCurCard()); + _vm->_video->activateMLST(11, _vm->getCurCard()->getId()); } else { // Raising the platform if (water == 1) { if (heat == 1) - _vm->_video->activateMLST(21, _vm->getCurCard()); + _vm->_video->activateMLST(21, _vm->getCurCard()->getId()); else - _vm->_video->activateMLST(14, _vm->getCurCard()); + _vm->_video->activateMLST(14, _vm->getCurCard()->getId()); } else - _vm->_video->activateMLST(9, _vm->getCurCard()); + _vm->_video->activateMLST(9, _vm->getCurCard()->getId()); } } if (argc > 1) - _vm->_sound->playSLST(argv[1], _vm->getCurCard()); + _vm->_sound->playSLST(argv[1], _vm->getCurCard()->getId()); else if (argv[0] == 2) - _vm->_sound->playSLST(1, _vm->getCurCard()); + _vm->_sound->playSLST(1, _vm->getCurCard()->getId()); _vm->_cursor->setCursor(kRivenHideCursor); _vm->_video->playMovieBlockingRiven(11); @@ -851,10 +852,10 @@ void RivenExternal::xbchangeboiler(uint16 argc, uint16 *argv) { void RivenExternal::xbupdateboiler(uint16 argc, uint16 *argv) { if (_vm->_vars["bheat"] != 0) { if (_vm->_vars["bblrgrt"] == 0) { - _vm->_video->activateMLST(8, _vm->getCurCard()); + _vm->_video->activateMLST(8, _vm->getCurCard()->getId()); _vm->_video->playMovieRiven(8); } else { - _vm->_video->activateMLST(7, _vm->getCurCard()); + _vm->_video->activateMLST(7, _vm->getCurCard()->getId()); _vm->_video->playMovieRiven(7); } } else { @@ -972,11 +973,11 @@ void RivenExternal::xbfreeytram(uint16 argc, uint16 *argv) { } // Activate the MLST and play the video - _vm->_video->activateMLST(mlstId, _vm->getCurCard()); + _vm->_video->activateMLST(mlstId, _vm->getCurCard()->getId()); _vm->_video->playMovieBlockingRiven(11); // Now play the second movie - _vm->_video->activateMLST(mlstId + 5, _vm->getCurCard()); + _vm->_video->activateMLST(mlstId + 5, _vm->getCurCard()->getId()); _vm->_video->playMovieBlockingRiven(12); } @@ -1381,19 +1382,19 @@ void RivenExternal::xgplaywhark(uint16 argc, uint16 *argv) { // Activate the correct video based on the amount of times we've been visited switch (wharkVisits) { case 1: - _vm->_video->activateMLST(3, _vm->getCurCard()); + _vm->_video->activateMLST(3, _vm->getCurCard()->getId()); break; case 2: // One of two random videos - _vm->_video->activateMLST(4 + _vm->_rnd->getRandomBit(), _vm->getCurCard()); + _vm->_video->activateMLST(4 + _vm->_rnd->getRandomBit(), _vm->getCurCard()->getId()); break; case 3: // One of two random videos - _vm->_video->activateMLST(6 + _vm->_rnd->getRandomBit(), _vm->getCurCard()); + _vm->_video->activateMLST(6 + _vm->_rnd->getRandomBit(), _vm->getCurCard()->getId()); break; case 4: // Red alert! Shields online! Brace yourself for impact! - _vm->_video->activateMLST(8, _vm->getCurCard()); + _vm->_video->activateMLST(8, _vm->getCurCard()->getId()); break; } @@ -1468,7 +1469,7 @@ static void catherineViewerIdleTimer(MohawkEngine_Riven *vm) { cathState = 3; // Begin playing the new movie - vm->_video->activateMLST(movie, vm->getCurCard()); + vm->_video->activateMLST(movie, vm->getCurCard()->getId()); VideoHandle videoHandle = vm->_video->playMovieRiven(30); // Reset the timer @@ -1509,7 +1510,7 @@ void RivenExternal::xglview_prisonon(uint16 argc, uint16 *argv) { // Begin playing a movie immediately if Catherine is already in the viewer if (cathMovie == 8 || (cathMovie >= 13 && cathMovie <= 16)) { - _vm->_video->activateMLST(cathMovie, _vm->getCurCard()); + _vm->_video->activateMLST(cathMovie, _vm->getCurCard()->getId()); VideoHandle videoHandle = _vm->_video->playMovieRiven(30); timeUntilNextMovie = videoHandle->getDuration().msecs() + _vm->_rnd->getRandomNumber(60) * 1000; @@ -2111,7 +2112,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) { _vm->_gfx->drawPLST(3); // Black out the screen _vm->_gfx->updateScreen(); // Update the screen _vm->_sound->playSound(0); // Play the link sound - _vm->_video->activateMLST(7, _vm->getCurCard()); // Activate Gehn Link Video + _vm->_video->activateMLST(7, _vm->getCurCard()->getId()); // Activate Gehn Link Video _vm->_video->playMovieBlockingRiven(1); // Play Gehn Link Video _vm->_vars["agehn"] = 4; // Set Gehn to the trapped state _vm->_vars["atrapbook"] = 1; // We've got the trap book again @@ -2252,7 +2253,7 @@ void RivenExternal::xgwatch(uint16 argc, uint16 *argv) { } // Now play the video for the watch - _vm->_video->activateMLST(1, _vm->getCurCard()); + _vm->_video->activateMLST(1, _vm->getCurCard()->getId()); _vm->_video->playMovieBlockingRiven(1); // And, finally, refresh @@ -2336,7 +2337,7 @@ void RivenExternal::xrhideinventory(uint16 argc, uint16 *argv) { static void rebelPrisonWindowTimer(MohawkEngine_Riven *vm) { // Randomize a video out in the middle of Tay uint16 movie = vm->_rnd->getRandomNumberRng(2, 13); - vm->_video->activateMLST(movie, vm->getCurCard()); + vm->_video->activateMLST(movie, vm->getCurCard()->getId()); VideoHandle handle = vm->_video->playMovieRiven(movie); // Ensure the next video starts after this one ends @@ -2404,25 +2405,25 @@ void RivenExternal::xtexterior300_telescopedown(uint16 argc, uint16 *argv) { if (_vm->_vars["pcage"] == 2) { // The best ending: Catherine is free, Gehn is trapped, Atrus comes to rescue you. // And now we fall back to Earth... all the way... - _vm->_video->activateMLST(8, _vm->getCurCard()); + _vm->_video->activateMLST(8, _vm->getCurCard()->getId()); runEndGame(8, 5000); } else if (_vm->_vars["agehn"] == 4) { // The ok ending: Catherine is still trapped, Gehn is trapped, Atrus comes to rescue you. // Nice going! Catherine and the islanders are all dead now! Just go back to your home... - _vm->_video->activateMLST(9, _vm->getCurCard()); + _vm->_video->activateMLST(9, _vm->getCurCard()->getId()); runEndGame(9, 5000); } else if (_vm->_vars["atrapbook"] == 1) { // The bad ending: Catherine is trapped, Gehn is free, Atrus gets shot by Gehn, // And then you get shot by Cho. Nice going! Catherine and the islanders are dead // and you have just set Gehn free from Riven, not to mention you're dead. - _vm->_video->activateMLST(10, _vm->getCurCard()); + _vm->_video->activateMLST(10, _vm->getCurCard()->getId()); runEndGame(10, 5000); } else { // The impossible ending: You don't have Catherine's journal and yet you were somehow // able to open the hatch on the telescope. The game provides an ending for those who // cheat, load a saved game with the combo, or just guess the telescope combo. Atrus // doesn't come and you just fall into the fissure. - _vm->_video->activateMLST(11, _vm->getCurCard()); + _vm->_video->activateMLST(11, _vm->getCurCard()->getId()); runEndGame(11, 5000); } } else { diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index b583bc9710..983c31efa3 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -22,6 +22,7 @@ #include "mohawk/resource.h" #include "mohawk/riven.h" +#include "mohawk/riven_card.h" #include "mohawk/riven_graphics.h" #include "mohawk/riven_sound.h" @@ -82,7 +83,7 @@ void RivenGraphics::copyImageToScreen(uint16 image, uint32 left, uint32 top, uin } void RivenGraphics::drawPLST(uint16 x) { - Common::SeekableReadStream* plst = _vm->getResource(ID_PLST, _vm->getCurCard()); + Common::SeekableReadStream* plst = _vm->getResource(ID_PLST, _vm->getCurCard()->getId()); uint16 recordCount = plst->readUint16BE(); for (uint16 i = 0; i < recordCount; i++) { diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp index 755f87767d..766ad30c51 100644 --- a/engines/mohawk/riven_saveload.cpp +++ b/engines/mohawk/riven_saveload.cpp @@ -22,6 +22,7 @@ #include "mohawk/resource.h" #include "mohawk/riven.h" +#include "mohawk/riven_card.h" #include "mohawk/riven_saveload.h" #include "common/system.h" @@ -403,7 +404,7 @@ Common::Error RivenSaveLoad::saveGame(const int slot, const Common::String &desc // Convert class variables to variable numbers _vm->_vars["currentstackid"] = _vm->getCurStack(); - _vm->_vars["currentcardid"] = _vm->getCurCard(); + _vm->_vars["currentcardid"] = _vm->getCurCard()->getId(); Common::OutSaveFile *saveFile = _saveFileMan->openForSaving(filename); if (!saveFile) diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp index 134c383c5a..2f26081ca1 100644 --- a/engines/mohawk/riven_scripts.cpp +++ b/engines/mohawk/riven_scripts.cpp @@ -22,6 +22,7 @@ #include "mohawk/cursors.h" #include "mohawk/riven.h" +#include "mohawk/riven_card.h" #include "mohawk/riven_external.h" #include "mohawk/riven_graphics.h" #include "mohawk/riven_scripts.h" @@ -552,19 +553,19 @@ void RivenSimpleCommand::activateSLST(uint16 op, uint16 argc, uint16 *argv) { if (_vm->getCurStack() == kStackTspit && _vm->getCurCardRMAP() == 0x6e9a && argv[0] == 2) return; - _vm->_sound->playSLST(argv[0], _vm->getCurCard()); + _vm->_sound->playSLST(argv[0], _vm->getCurCard()->getId()); _vm->_activatedSLST = true; } // Command 41: activate MLST record and play void RivenSimpleCommand::activateMLSTAndPlay(uint16 op, uint16 argc, uint16 *argv) { - _vm->_video->activateMLST(argv[0], _vm->getCurCard()); + _vm->_video->activateMLST(argv[0], _vm->getCurCard()->getId()); _vm->_video->playMovieRiven(argv[0]); } // Command 43: activate BLST record (card hotspot enabling lists) void RivenSimpleCommand::activateBLST(uint16 op, uint16 argc, uint16 *argv) { - Common::SeekableReadStream* blst = _vm->getResource(ID_BLST, _vm->getCurCard()); + Common::SeekableReadStream* blst = _vm->getResource(ID_BLST, _vm->getCurCard()->getId()); uint16 recordCount = blst->readUint16BE(); for (uint16 i = 0; i < recordCount; i++) { @@ -586,7 +587,7 @@ void RivenSimpleCommand::activateBLST(uint16 op, uint16 argc, uint16 *argv) { // Command 44: activate FLST record (information on which SFXE resource this card should use) void RivenSimpleCommand::activateFLST(uint16 op, uint16 argc, uint16 *argv) { - Common::SeekableReadStream* flst = _vm->getResource(ID_FLST, _vm->getCurCard()); + Common::SeekableReadStream* flst = _vm->getResource(ID_FLST, _vm->getCurCard()->getId()); uint16 recordCount = flst->readUint16BE(); for (uint16 i = 0; i < recordCount; i++) { @@ -619,7 +620,7 @@ void RivenSimpleCommand::zipMode(uint16 op, uint16 argc, uint16 *argv) { // Command 46: activate MLST record (movie lists) void RivenSimpleCommand::activateMLST(uint16 op, uint16 argc, uint16 *argv) { - _vm->_video->activateMLST(argv[0], _vm->getCurCard()); + _vm->_video->activateMLST(argv[0], _vm->getCurCard()->getId()); } void RivenSimpleCommand::dump(const Common::StringArray &varNames, const Common::StringArray &xNames, byte tabs) { |