From 4f3b85f4efc05affb7b4a7080e349360a3352048 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 26 Aug 2011 11:29:13 +0300 Subject: SCI: Fixed bug #3311911 - "SCI: QFG3: Intro music abruptly stops" --- engines/sci/sound/midiparser_sci.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/sci') diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 95b165468d..f48a68dc66 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -626,7 +626,11 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { if (info.ext.type == 0x2F) {// end of track reached if (_pSnd->loop) _pSnd->loop--; - if (_pSnd->loop) { + // QFG3 abuses the hold flag. Its scripts call kDoSoundSetHold, + // but sometimes there's no hold marker in the associated songs + // (e.g. song 110, during the intro). The original interpreter + // treats this case as an infinite loop (bug #3311911). + if (_pSnd->loop || _pSnd->hold > 0) { // We need to play it again... jumpToTick(_loopTick); } else { -- cgit v1.2.3