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.
This commit is contained in:
Filippos Karapetis 2013-07-07 19:41:42 +03:00
parent a949a88220
commit 0f30ba2f10
2 changed files with 7 additions and 3 deletions

View File

@ -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:

View File

@ -110,6 +110,7 @@ protected:
int16 _signalToSet;
bool _dataincAdd;
int16 _dataincToAdd;
bool _jumpToHoldTick;
bool _resetOnPause;
bool _channelUsed[16];