[Scummvm-cvs-logs] scummvm master -> 0f30ba2f10df20cbe57f67fcf98b3125c1c57e5f

bluegr bluegr at gmail.com
Sun Jul 7 18:42:38 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0f30ba2f10 SCI: Fix bug #3614566 - "LSL6: ScummVM locks up at Electro-Shock room"


Commit: 0f30ba2f10df20cbe57f67fcf98b3125c1c57e5f
    https://github.com/scummvm/scummvm/commit/0f30ba2f10df20cbe57f67fcf98b3125c1c57e5f
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-07-07T09:41:42-07:00

Commit Message:
SCI: Fix bug #3614566 - "LSL6: ScummVM locks up at Electro-Shock room"

We now do the jumpToTick() for hold events after waiting for the delta
of the current event, like we do for the signal set events. This keeps
the fixes for the hold timings in QFG3, while not breaking LSL6.

Many thanks to wjp for pinpointing the actual cause of the issue.

Changed paths:
    engines/sci/sound/midiparser_sci.cpp
    engines/sci/sound/midiparser_sci.h



diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 9546b15..00089cd 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -57,6 +57,7 @@ MidiParser_SCI::MidiParser_SCI(SciVersion soundVersion, SciMusic *music) :
 	_signalToSet = 0;
 	_dataincAdd = false;
 	_dataincToAdd = 0;
+	_jumpToHoldTick = false;
 	_resetOnPause = false;
 	_pSnd = 0;
 }
@@ -452,6 +453,10 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
 
 		debugC(4, kDebugLevelSound, "signal %04x", _signalToSet);
 	}
+	if (_jumpToHoldTick) {
+		_jumpToHoldTick = false;
+		jumpToTick(_loopTick, false, false);
+	}
 
 	info.start = _position._playPos;
 	info.delta = 0;
@@ -532,9 +537,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
 				// marker set for that song by cmdSetSoundHold.
 				// If it is, loop back, but don't stop notes when jumping.
 				if (info.basic.param2 == _pSnd->hold) {
-					uint32 extraDelta = info.delta;
-					jumpToTick(_loopTick, false, false);
-					_nextEvent.delta += extraDelta;
+					_jumpToHoldTick = true;
 				}
 				break;
 			case kUpdateCue:
diff --git a/engines/sci/sound/midiparser_sci.h b/engines/sci/sound/midiparser_sci.h
index d3fd337..7bd6899 100644
--- a/engines/sci/sound/midiparser_sci.h
+++ b/engines/sci/sound/midiparser_sci.h
@@ -110,6 +110,7 @@ protected:
 	int16 _signalToSet;
 	bool _dataincAdd;
 	int16 _dataincToAdd;
+	bool _jumpToHoldTick;
 	bool _resetOnPause;
 
 	bool _channelUsed[16];






More information about the Scummvm-git-logs mailing list