[Scummvm-cvs-logs] scummvm master -> 077acc5575a1918850e38df06d72579583f55053

bluegr md5 at scummvm.org
Fri Sep 23 16:48:28 CEST 2011


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:
077acc5575 SCI: Fixed bug #3413301 - "SCI: KQ6CD: Game stops responding at the bookworm"


Commit: 077acc5575a1918850e38df06d72579583f55053
    https://github.com/scummvm/scummvm/commit/077acc5575a1918850e38df06d72579583f55053
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-23T07:42:14-07:00

Commit Message:
SCI: Fixed bug #3413301 - "SCI: KQ6CD: Game stops responding at the bookworm"

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



diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index d4cff76..e73df69 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -130,8 +130,14 @@ reg_t SoundCommandParser::kDoSoundPlay(int argc, reg_t *argv, reg_t acc) {
 void SoundCommandParser::processPlaySound(reg_t obj) {
 	MusicEntry *musicSlot = _music->getSlot(obj);
 	if (!musicSlot) {
-		warning("kDoSound(play): Slot not found (%04x:%04x)", PRINT_REG(obj));
-		return;
+		warning("kDoSound(play): Slot not found (%04x:%04x), initializing it manually", PRINT_REG(obj));
+		// The sound hasn't been initialized for some reason, so initialize it here.
+		// Happens in KQ6, room 460, when giving the creature to the bookwork (the
+		// bookworm's child). Fixes bug #3413301.
+		processInitSound(obj);
+		musicSlot = _music->getSlot(obj);
+		if (!musicSlot)
+			error("Failed to initialize uninitialized sound slot");
 	}
 
 	int resourceId = getSoundResourceId(obj);






More information about the Scummvm-git-logs mailing list