aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-01-01 23:30:29 +0000
committerTorbjörn Andersson2008-01-01 23:30:29 +0000
commit46368eac5f1afc6d3fe706a3efffc7ccf336a924 (patch)
treecb3d4bd82a9de2b3eece58ec320cf8f3d857145e
parent86aeae4a74fff70b6a694ba582b49e722677235f (diff)
downloadscummvm-rg350-46368eac5f1afc6d3fe706a3efffc7ccf336a924.tar.gz
scummvm-rg350-46368eac5f1afc6d3fe706a3efffc7ccf336a924.tar.bz2
scummvm-rg350-46368eac5f1afc6d3fe706a3efffc7ccf336a924.zip
Added what I hope is the proper fix for bug #1498785 ("LOOM: Unknown Roland
MIDI music events"). It would probably be safe to commit to the 0.11 branch, but I don't know for sure which games would be affected other than EGA Loom. svn-id: r30132
-rw-r--r--engines/scumm/midiparser_ro.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp
index 858a852c22..b804061206 100644
--- a/engines/scumm/midiparser_ro.cpp
+++ b/engines/scumm/midiparser_ro.cpp
@@ -69,9 +69,20 @@ void MidiParser_RO::parseNextEvent (EventInfo &info) {
if (info.command() == 0xA) {
++_lastMarkerCount;
info.event = 0xF0;
- } else if (info.event == 0xF0) {
+ } else if (info.command() == 0xF) {
byte delay = *(_position._play_pos++);
info.delta += delay;
+ if (info.event != 0xF0) {
+ // The event is usually 0xF0 but there are a
+ // few cases in EGA Loom where it's 0xF1. I'm
+ // speculating that this is for adding values
+ // greater than 255 to info.delta. See bug
+ // #1498785.
+ //
+ // The actual calculation is pure guesswork,
+ // but the result sounds good enough to me.
+ info.delta += 256;
+ }
continue;
}
break;