diff options
author | Bastien Bouclet | 2017-07-19 19:07:57 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-07-19 19:07:57 +0200 |
commit | 103602250762e31fc62c6e42e694a5ea317d295b (patch) | |
tree | 3ce2d3f8201703b8a0b94da37e855140dcfd8dcd /engines/mohawk/riven_card.cpp | |
parent | d03475e5abbbce905d1f4914198dddcd01250ac1 (diff) | |
download | scummvm-rg350-103602250762e31fc62c6e42e694a5ea317d295b.tar.gz scummvm-rg350-103602250762e31fc62c6e42e694a5ea317d295b.tar.bz2 scummvm-rg350-103602250762e31fc62c6e42e694a5ea317d295b.zip |
MOHAWK: Riven: Add script patch for missing sound when entering sub
Fixes #9972.
Diffstat (limited to 'engines/mohawk/riven_card.cpp')
-rw-r--r-- | engines/mohawk/riven_card.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp index f387bc450b..d3166f31fc 100644 --- a/engines/mohawk/riven_card.cpp +++ b/engines/mohawk/riven_card.cpp @@ -66,7 +66,7 @@ void RivenCard::loadCardResource(uint16 id) { // Apply script patches for this card uint32 globalId = _vm->getStack()->getCardGlobalId(id); for (uint i = 0; i < _scripts.size(); i++) { - _scripts[i].script->applyCardPatches(_vm, globalId, _scripts[i].type); + _scripts[i].script->applyCardPatches(_vm, globalId, _scripts[i].type, 0xFFFF); } delete inStream; @@ -252,8 +252,10 @@ void RivenCard::loadHotspots(uint16 id) { uint16 hotspotCount = inStream->readUint16BE(); _hotspots.resize(hotspotCount); + uint32 globalId = _vm->getStack()->getCardGlobalId(id); for (uint16 i = 0; i < hotspotCount; i++) { _hotspots[i] = new RivenHotspot(_vm, inStream); + _hotspots[i]->applyScriptPatches(globalId); } delete inStream; @@ -642,6 +644,13 @@ RivenScriptPtr RivenHotspot::getScript(uint16 scriptType) const { return RivenScriptPtr(); } + +void RivenHotspot::applyScriptPatches(uint32 cardGlobalId) { + for (uint16 i = 0; i < _scripts.size(); i++) { + _scripts[i].script->applyCardPatches(_vm, cardGlobalId, _scripts[i].type, _blstID); + } +} + bool RivenHotspot::isEnabled() const { return (_flags & kFlagEnabled) != 0; } |