[Scummvm-cvs-logs] scummvm master -> 841b6ca540f4d24a99302c873dc37aee374c4d7b

wjp wjp at usecode.org
Fri Apr 5 21:16:19 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:
841b6ca540 SCI: Revert "Add a more generic solution for the problem found in bug #3605269"


Commit: 841b6ca540f4d24a99302c873dc37aee374c4d7b
    https://github.com/scummvm/scummvm/commit/841b6ca540f4d24a99302c873dc37aee374c4d7b
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-05T12:14:55-07:00

Commit Message:
SCI: Revert "Add a more generic solution for the problem found in bug #3605269"

This reverts commit c6320a28e483e52b489cae8e86774008e030492b.
SSCI does not interpret signals on other channels than 15.

Conflicts:
	engines/sci/sound/soundcmd.cpp

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



diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 0e56724..4e54797 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -475,13 +475,7 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
 	case 0xC:
 		info.basic.param1 = *(_position._playPos++);
 		info.basic.param2 = 0;
-		// Normally, song signalling events are sent through the special SCI
-		// channel 15. There are some songs where that special channel is
-		// missing completely, and the signals are sent through the other
-		// channels. Such a case is the Windows version of KQ5CD, songs 1840,
-		// 1843 and 1849 (bug #3605269). Therefore, we check if channel 15 is
-		// present, and if not, we accept signals from all other channels.
-		if (info.channel() == 0xF || !_channelUsed[15]) {	// SCI special channel
+		if (info.channel() == 0xF) {// SCI special case
 			if (info.basic.param1 != kSetSignalLoop) {
 				// At least in kq5/french&mac the first scene in the intro has
 				// a song that sets signal to 4 immediately on tick 0. Signal
@@ -497,8 +491,6 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
 					_position._playTick || info.delta) {
 					_signalSet = true;
 					_signalToSet = info.basic.param1;
-					debugC(kDebugLevelSound, "Setting signal of song %d to %d from channel %d",
-							_pSnd->resourceId, _signalToSet, info.channel());
 				}
 			} else {
 				_loopTick = _position._playTick + info.delta;
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 82099fd..4029910 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -177,11 +177,16 @@ void SoundCommandParser::processPlaySound(reg_t obj) {
 		writeSelectorValue(_segMan, obj, SELECTOR(state), kSoundPlaying);
 	}
 
-	// WORKAROUND: Song 1849 in the Windows version of KQ5CD does not have
-	// correct signalling data, causing the game scripts to wait indefinitely
-	// for the missing signal. We signal the game scripts to stop waiting
-	// forever by setting the song's dataInc selector to something other than 0
-	if (g_sci->getGameId() == GID_KQ5 && resourceId == 1849)
+	// WORKAROUND: Songs 1840, 1843 and 1849 in the Windows version of KQ5CD
+	// are all missing their channel 15 (all played during its ending
+	// sequences, when fighting with Mordack). This makes the game scripts
+	// wait indefinitely for the missing signals in these songs. In the
+	// original interpreter, this bug manifests as an "Out of heap" error. We
+	// signal the game scripts to stop waiting forever by setting the song's
+	// dataInc selector to something other than 0. This causes Mordack's
+	// appearing animation to occur a bit earlier than expected, but at least
+	// the game doesn't freeze at that point. Fixes bug #3605269.
+	if (g_sci->getGameId() == GID_KQ5 && (resourceId == 1840 || resourceId == 1843 || resourceId == 1849))
 		musicSlot->dataInc = 1;
 
 	musicSlot->loop = readSelectorValue(_segMan, obj, SELECTOR(loop));






More information about the Scummvm-git-logs mailing list