aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamieson Christian2003-08-10 11:44:43 +0000
committerJamieson Christian2003-08-10 11:44:43 +0000
commite8d04067a08a91f8eae5a9d3178518f9f8cebc78 (patch)
tree5ca17226dcfdd347f1d59d1324fd169482b104e6
parent550bf93656eb0c7677751ee18ba1adaa29dad3ba (diff)
downloadscummvm-rg350-e8d04067a08a91f8eae5a9d3178518f9f8cebc78.tar.gz
scummvm-rg350-e8d04067a08a91f8eae5a9d3178518f9f8cebc78.tar.bz2
scummvm-rg350-e8d04067a08a91f8eae5a9d3178518f9f8cebc78.zip
Fix for Bug [785373] SAM: Overlapping music at Bigfoot convention
Included the ImDeferredCommand list when checking for sounds that have been queued to play. Also added sound queue processing between execution of exit script and entry script. In the case of this bug, the entry script required that the iMuse state be fully up to date, including last-moment changes from the previous exit script. svn-id: r9622
-rw-r--r--scumm/imuse.cpp9
-rw-r--r--scumm/scummvm.cpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 4dea9ec6e9..44ad845a59 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -454,6 +454,15 @@ int IMuseInternal::get_queue_sound_status(int sound) {
return 2;
i = (i + 1) &(ARRAYSIZE(_cmd_queue) - 1);
}
+
+ for (i = 0; i < ARRAYSIZE (_deferredCommands); ++i) {
+ if (_deferredCommands[i].time_left && _deferredCommands[i].a == 8 &&
+ _deferredCommands[i].b == sound)
+ {
+ return 2;
+ }
+ }
+
return 0;
}
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index a6583d1ece..0a75b46ba5 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1743,6 +1743,7 @@ void Scumm::startScene(int room, Actor *a, int objectNr) {
killScriptsAndResources();
clearEnqueue();
stopCycle(0);
+ _sound->processSoundQues();
for (i = 1; i < _numActors; i++) {
_actors[i].hideActor();