Make the workaround for the Riven intro background music work in the DVD version too.

svn-id: r47371
This commit is contained in:
Matthew Hoops 2010-01-19 05:01:45 +00:00
parent 9baa2acdca
commit c20df070f3
4 changed files with 11 additions and 6 deletions

View file

@ -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;
}

View file

@ -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++)

View file

@ -157,6 +157,7 @@ public:
uint16 getCurCard() { return _curCard; }
uint16 getCurStack() { return _curStack; }
uint16 matchRMAPToCard(uint32);
uint32 getCurCardRMAP();
Common::Point _mousePos;
RivenHotspot *_hotspots;

View file

@ -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());