diff options
author | Travis Howell | 2006-10-21 12:59:23 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-21 12:59:23 +0000 |
commit | 4913db71689a5c4077e54525471677a0ca3eda13 (patch) | |
tree | 9390ec99e98dbf8d19b3789b59871df78a251013 | |
parent | 9edf1e6a1a95f45b9883e298edc7e578ff9495d1 (diff) | |
download | scummvm-rg350-4913db71689a5c4077e54525471677a0ca3eda13.tar.gz scummvm-rg350-4913db71689a5c4077e54525471677a0ca3eda13.tar.bz2 scummvm-rg350-4913db71689a5c4077e54525471677a0ca3eda13.zip |
Add extra events, which are triggered by Elvira 1/2 and WW
svn-id: r24408
-rw-r--r-- | engines/agos/midiparser_s1d.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp index 268012d5bc..8146d8c805 100644 --- a/engines/agos/midiparser_s1d.cpp +++ b/engines/agos/midiparser_s1d.cpp @@ -121,10 +121,35 @@ void MidiParser_S1D::parseNextEvent(EventInfo &info) { info.length = 0; break; } - // Otherwise fall through to default. + switch (info.event & 0x0F) { + case 0x2: // Song Position Pointer? + info.basic.param1 = *(_position._play_pos++); + info.basic.param2 = *(_position._play_pos++); + break; + + case 0x3: // Song Select? + info.basic.param1 = *(_position._play_pos++); + info.basic.param2 = 0; + break; + + case 0x8: + info.basic.param1 = info.basic.param2 = 0; + break; + + case 0xF: // META event? + info.ext.type = *(_position._play_pos++); + info.length = readVLQ(_position._play_pos); + info.ext.data = _position._play_pos; + _position._play_pos += info.length; + break; + default: + debug(0, "MidiParser_S1D: Unexpected type 0x%02X found", (int) info.event); + break; + } + break; default: - debug(6, "MidiParser_S1D: Unexpected byte 0x%02X found", (int) info.command()); + debug(0, "MidiParser_S1D: Unexpected event 0x%02X found", (int) info.command()); break; } } |