diff options
author | Alyssa Milburn | 2014-01-27 10:09:32 +0100 |
---|---|---|
committer | Alyssa Milburn | 2014-01-27 10:10:35 +0100 |
commit | bb1cd924f044a22d1aeef4b6c8a6e0c66aa2cf9d (patch) | |
tree | d41d6f7563b04422c170004a9d9c78818845e77e /engines/sci/sound | |
parent | 3a236181c47db06f5e5f82391133b29fefeefaca (diff) | |
download | scummvm-rg350-bb1cd924f044a22d1aeef4b6c8a6e0c66aa2cf9d.tar.gz scummvm-rg350-bb1cd924f044a22d1aeef4b6c8a6e0c66aa2cf9d.tar.bz2 scummvm-rg350-bb1cd924f044a22d1aeef4b6c8a6e0c66aa2cf9d.zip |
SCI: Fix breakage from f92df4c6
Diffstat (limited to 'engines/sci/sound')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 27 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.h | 2 |
2 files changed, 14 insertions, 15 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 6f250e0a3a..f776eb9b8d 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -601,11 +601,10 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { }// switch (info.command()) } -void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { +bool MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { if (!fireEvents) { // We don't do any processing that should be done while skipping events - MidiParser::processEvent(info, fireEvents); - return; + return MidiParser::processEvent(info, fireEvents); } switch (info.command()) { @@ -657,7 +656,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { } // Done with this event. - return; + return true; } // Break to let parent handle the rest. @@ -684,7 +683,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { switch (info.basic.param1) { case kSetReverb: // Already handled above - return; + return true; case kMidiHold: // Check if the hold ID marker is the same as the hold ID // marker set for that song by cmdSetSoundHold. @@ -692,9 +691,9 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { if (info.basic.param2 == _pSnd->hold) { jumpToTick(_loopTick, false, false); // Done with this event. - return; + return true; } - return; + return true; case kUpdateCue: if (!_jumpingToTick) { int inc; @@ -715,17 +714,17 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { debugC(4, kDebugLevelSound, "datainc %04x", inc); } - return; + return true; case kResetOnPause: _resetOnPause = info.basic.param2; - return; + return true; // Unhandled SCI commands case 0x46: // LSL3 - binoculars case 0x61: // Iceman (AdLib?) case 0x73: // Hoyle case 0xD1: // KQ4, when riding the unicorn // Obscure SCI commands - ignored - return; + return true; // Standard MIDI commands case 0x01: // mod wheel case 0x04: // foot controller @@ -740,10 +739,10 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { case 0x4B: // voice mapping // TODO: is any support for this needed at the MIDI parser level? warning("Unhanded SCI MIDI command 0x%x - voice mapping (parameter %d)", info.basic.param1, info.basic.param2); - return; + return true; default: warning("Unhandled SCI MIDI command 0x%x (parameter %d)", info.basic.param1, info.basic.param2); - return; + return true; } } @@ -762,7 +761,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { jumpToTick(_loopTick); // Done with this event. - return; + return true; } else { _pSnd->status = kSoundStopped; @@ -782,7 +781,7 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) { // Let parent handle the rest - MidiParser::processEvent(info, fireEvents); + return MidiParser::processEvent(info, fireEvents); } byte MidiParser_SCI::getSongReverb() { diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h index 7e24c34144..7c3c5c3483 100644 --- a/engines/sci/sound/midiparser_sci.h +++ b/engines/sci/sound/midiparser_sci.h @@ -89,7 +89,7 @@ public: protected: void parseNextEvent(EventInfo &info); - void processEvent(const EventInfo &info, bool fireEvents = true); + bool processEvent(const EventInfo &info, bool fireEvents = true); byte *midiMixChannels(); byte *midiFilterChannels(int channelMask); byte midiGetNextChannel(long ticker); |