[Scummvm-cvs-logs] scummvm master -> dc2d8793b968d462ff9f05f00977ef8ccad2d924

bluegr bluegr at gmail.com
Mon Apr 1 20:33:48 CEST 2013


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

Summary:
2e93ee2b83 SCI: Fix bug #3605269 - "SCI: KQ5 Windows CD - Game Hangs Before Final Battle"
dc2d8793b9 SCI: Set the song's sound queue signal to -1 when stopping a sound, like SSCI does


Commit: 2e93ee2b8301cf48e86c799c429f5e09fd09f051
    https://github.com/scummvm/scummvm/commit/2e93ee2b8301cf48e86c799c429f5e09fd09f051
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-04-01T11:31:50-07:00

Commit Message:
SCI: Fix bug #3605269 - "SCI: KQ5 Windows CD - Game Hangs Before Final Battle"

This is caused because songs 1840, 1843 and 1849 are all missing their special
SCI signaling channel (channel 15), so the game scripts wait indefinitely for
signals which are never set

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



diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 4d12d95..c0de7fe 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -177,6 +177,18 @@ void SoundCommandParser::processPlaySound(reg_t obj) {
 		writeSelectorValue(_segMan, obj, SELECTOR(state), kSoundPlaying);
 	}
 
+	// 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))
+		writeSelectorValue(_segMan, obj, SELECTOR(dataInc), 1);
+
 	musicSlot->loop = readSelectorValue(_segMan, obj, SELECTOR(loop));
 	musicSlot->priority = readSelectorValue(_segMan, obj, SELECTOR(priority));
 	// Reset hold when starting a new song. kDoSoundSetHold is always called after


Commit: dc2d8793b968d462ff9f05f00977ef8ccad2d924
    https://github.com/scummvm/scummvm/commit/dc2d8793b968d462ff9f05f00977ef8ccad2d924
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-04-01T11:31:50-07:00

Commit Message:
SCI: Set the song's sound queue signal to -1 when stopping a sound, like SSCI does

Previously, we set the signal of the sound objects themselves to -1, but set the
sound queue's signal to 0. This now matches the original behavior.

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



diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index c0de7fe..9450e77 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -267,7 +267,7 @@ void SoundCommandParser::processStopSound(reg_t obj, bool sampleFinishedPlaying)
 		writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
 
 	musicSlot->dataInc = 0;
-	musicSlot->signal = 0;
+	musicSlot->signal = SIGNAL_OFFSET;
 	_music->soundStop(musicSlot);
 }
 






More information about the Scummvm-git-logs mailing list