aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorMatthew Hoops2010-01-19 05:01:45 +0000
committerMatthew Hoops2010-01-19 05:01:45 +0000
commitc20df070f35557a8de5fbd3475ee5579abc584bf (patch)
tree361551f2e166d6fc98778d21ebb3fa782a5419fb /engines/mohawk
parent9baa2acdca4a3d9440e836d917f14b5e1cdb6178 (diff)
downloadscummvm-rg350-c20df070f35557a8de5fbd3475ee5579abc584bf.tar.gz
scummvm-rg350-c20df070f35557a8de5fbd3475ee5579abc584bf.tar.bz2
scummvm-rg350-c20df070f35557a8de5fbd3475ee5579abc584bf.zip
Make the workaround for the Riven intro background music work in the DVD version too.
svn-id: r47371
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/console.cpp7
-rw-r--r--engines/mohawk/riven.cpp7
-rw-r--r--engines/mohawk/riven.h1
-rw-r--r--engines/mohawk/riven_scripts.cpp2
4 files changed, 11 insertions, 6 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 099e6c926e..894afbd4d2 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -581,11 +581,8 @@ bool RivenConsole::Cmd_ListZipCards(int argc, const char **argv) {
}
bool RivenConsole::Cmd_GetRMAP(int argc, const char **argv) {
- Common::SeekableReadStream *rmapStream = _vm->getRawData(ID_RMAP, 1);
- rmapStream->seek(_vm->getCurCard() * 4);
- DebugPrintf("RMAP for %s %d = %08x\n", _vm->getStackName(_vm->getCurStack()).c_str(), _vm->getCurCard(), rmapStream->readUint32BE());
- delete rmapStream;
-
+ uint32 rmapCode = _vm->getCurCardRMAP();
+ DebugPrintf("RMAP for %s %d = %08x\n", _vm->getStackName(_vm->getCurStack()).c_str(), _vm->getCurCard(), rmapCode);
return true;
}
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 20cf55c398..7cb69b95e1 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -536,6 +536,13 @@ uint16 MohawkEngine_Riven::matchRMAPToCard(uint32 rmapCode) {
return index - 1;
}
+uint32 MohawkEngine_Riven::getCurCardRMAP() {
+ Common::SeekableReadStream *rmapStream = getRawData(ID_RMAP, 1);
+ rmapStream->seek(_curCard * 4);
+ uint32 rmapCode = rmapStream->readUint32BE();
+ return rmapCode;
+}
+
void MohawkEngine_Riven::runCardScript(uint16 scriptType) {
assert(_cardData.hasData);
for (uint16 i = 0; i < _cardData.scripts.size(); i++)
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index a09320bc16..eb9c6f4d3f 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -157,6 +157,7 @@ public:
uint16 getCurCard() { return _curCard; }
uint16 getCurStack() { return _curStack; }
uint16 matchRMAPToCard(uint32);
+ uint32 getCurCardRMAP();
Common::Point _mousePos;
RivenHotspot *_hotspots;
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index 090b30d39c..512354427a 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -542,7 +542,7 @@ void RivenScript::activatePLST(uint16 op, uint16 argc, uint16 *argv) {
void RivenScript::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() == tspit && _vm->getCurCard() == 155 && argv[0] == 2)
+ if (_vm->getCurStack() == tspit && _vm->getCurCardRMAP() == 0x6e9a && argv[0] == 2)
return;
_vm->_sound->playSLST(argv[0], _vm->getCurCard());