diff options
author | Travis Howell | 2008-03-23 00:34:39 +0000 |
---|---|---|
committer | Travis Howell | 2008-03-23 00:34:39 +0000 |
commit | 56711f148906946cb7b10725c44dcee6f8719f52 (patch) | |
tree | 0ca450120a4c7319a4cce4d1559bc53bbca8683a | |
parent | c5d48856a3fab896e84bc4052e22dd950727289d (diff) | |
download | scummvm-rg350-56711f148906946cb7b10725c44dcee6f8719f52.tar.gz scummvm-rg350-56711f148906946cb7b10725c44dcee6f8719f52.tar.bz2 scummvm-rg350-56711f148906946cb7b10725c44dcee6f8719f52.zip |
Add comments about unknown cases and remove unused cases in parseNextEvent().
svn-id: r31224
-rw-r--r-- | engines/agos/midiparser_s1d.cpp | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp index 342f716c22..ad3dd4cb5e 100644 --- a/engines/agos/midiparser_s1d.cpp +++ b/engines/agos/midiparser_s1d.cpp @@ -112,44 +112,72 @@ void MidiParser_S1D::parseNextEvent(EventInfo &info) { ++_position._play_pos; // I have NO IDEA what the second byte is for. break; + case 0xD: + // Triggered by MOD0/MOD1/MOD2/MOD3/MOD4/MOD6/MOD7/MOD8/MOD9 in Elvira 2 + // Triggered by MOD0/MOD2/MOD3/MOD5/MOD6/MOD7/MOD8/MOD9/MOD10/MOD12/MOD14/MOD15/MOD20 in Waxworks + break; + + case 0xE: + // Triggered by MOD9 in Elvira 1 + // Triggered by MOD3/MOD5 in Elvira 2 + // Triggered by MOD3/MOD7/MOD8/MOD13 in Waxworks + break; + case 0xF: - if (info.event == 0xFC) { - // This means End of Track. - // Rewrite in SMF (MIDI transmission) form. - info.event = 0xFF; - info.ext.type = 0x2F; - info.length = 0; - break; - } + debug(0, "MidiParser_S1D: Unexpected type 0x%02X", (int) info.event); switch (info.event & 0x0F) { - case 0x2: // Song Position Pointer? - info.basic.param1 = *(_position._play_pos++); - info.basic.param2 = *(_position._play_pos++); + case 0x0: + // Trigged by MOD2/MOD6/MOD15 in Waxworks break; - case 0x3: // Song Select? + case 0x3: // Not sure, Song Select? + // Trigged by MOD1/MOD7/MOD10 in Elvira 1 info.basic.param1 = *(_position._play_pos++); info.basic.param2 = 0; break; - case 0x8: + case 0x4: + // Trigged by MOD8 in Elvira 1 + break; + + case 0x7: + // Trigged by MOD6 in Elvira 2 + // Trigged by MOD5 in Waxworks + break; + + case 0x8: // Not sure, ? + // Trigged by MOD19 in Waxworks info.basic.param1 = info.basic.param2 = 0; break; - case 0xF: // META event? + case 0xA: + // Trigged by MOD5 in Elvira 2 + break; + + case 0xC: + // This means End of Track. + // Rewrite in SMF (MIDI transmission) form. + info.event = 0xFF; + info.ext.type = 0x2F; + info.length = 0; + break; + + case 0xF: // Not sure, META event? + // Trigged by MOD8/MOD9/MOD11/MOD12/MOD13 in Waxworks 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(10, "MidiParser_S1D: Unexpected type 0x%02X found", (int) info.event); + error("MidiParser_S1D: Unexpected type 0x%02X found", (int) info.event); break; } break; default: - debug(10, "MidiParser_S1D: Unexpected event 0x%02X found", (int) info.command()); + error("MidiParser_S1D: Unexpected event 0x%02X found", (int) info.command()); break; } } |