From 86d3f30347d5ee7ee67a4f16d5043b9bef0539db Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 21 Oct 2006 12:22:30 +0000 Subject: Dummy handler for music commands 0xA and 0xB to keep Elvira1 from crashing. It also seems to restore the missing first note of the intro music. svn-id: r24406 --- engines/agos/midiparser_s1d.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp index fca369dfda..268012d5bc 100644 --- a/engines/agos/midiparser_s1d.cpp +++ b/engines/agos/midiparser_s1d.cpp @@ -45,7 +45,7 @@ protected: bool _no_delta; protected: - void parseNextEvent (EventInfo &info); + void parseNextEvent(EventInfo &info); void resetTracking(); uint32 readVLQ2(byte * &data); @@ -97,6 +97,15 @@ void MidiParser_S1D::parseNextEvent(EventInfo &info) { info.length = 0; break; + case 0xA: + case 0xB: + // I'm not sure what these are meant to do, or what the + // parameter is. Elvira 1 needs them, though, and who am I to + // argue with her? + info.basic.param1 = *(_position._play_pos++); + info.basic.param2 = 0; + break; + case 0xC: info.basic.param1 = *(_position._play_pos++); info.basic.param2 = 0; @@ -112,7 +121,7 @@ void MidiParser_S1D::parseNextEvent(EventInfo &info) { info.length = 0; break; } - // OTherwise fall through to default. + // Otherwise fall through to default. default: debug(6, "MidiParser_S1D: Unexpected byte 0x%02X found", (int) info.command()); -- cgit v1.2.3