aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-05-26 12:56:29 +0000
committerTorbjörn Andersson2005-05-26 12:56:29 +0000
commit4b82800cc51b2bc3285bfc1eab3c4e16618105c6 (patch)
tree3b94558cd0c2322fb6fc4d383fe20f8c1ca6375e /scumm
parent983d6d71b82e6e516e7103b2d6c3f462c2c8844a (diff)
downloadscummvm-rg350-4b82800cc51b2bc3285bfc1eab3c4e16618105c6.tar.gz
scummvm-rg350-4b82800cc51b2bc3285bfc1eab3c4e16618105c6.tar.bz2
scummvm-rg350-4b82800cc51b2bc3285bfc1eab3c4e16618105c6.zip
Be less agressive about re-using trigger slots. This fixes bug #888161,
hopefully without causing any regressions. svn-id: r18261
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 66994236ef..333471c4bc 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -897,7 +897,10 @@ int32 IMuseInternal::ImSetTrigger(int sound, int id, int a, int b, int c, int d,
for (i = ARRAYSIZE(_snm_triggers); i; --i, ++trig) {
if (!trig->id)
break;
- if (trig->id == id && trig->sound == sound)
+ // We used to only compare 'id' and 'sound' here, but at least
+ // at the Dino Bungie Memorial that causes the music to stop
+ // after getting the T-Rex tooth. See bug #888161.
+ if (trig->id == id && trig->sound == sound && trig->command[0] == a)
break;
uint16 diff;
@@ -1215,7 +1218,7 @@ void IMuseInternal::initGM(MidiDriver *midi) {
midi->sysEx(buffer, 6);
debug(2, "GM SysEx: GM System On");
g_system->delayMillis(200);
-
+
if (_enable_gs) {
// All GS devices recognize the GS Reset command,
@@ -1279,7 +1282,7 @@ void IMuseInternal::initGM(MidiDriver *midi) {
midi->send(( 0 << 16) | (38 << 8) | (0xB0 | i));
midi->send(( 127 << 16) | (100 << 8) | (0xB0 | i));
midi->send(( 127 << 16) | (101 << 8) | (0xB0 | i));
- }
+ }
debug(2, "GM Controller 6 Change: Channels 1-16 Pitch Bend Sensitivity is 12 semitones");
// Set channels 1-16 Mod. LFO1 Pitch Depth to 4