[Scummvm-cvs-logs] SF.net SVN: scummvm:[46678] scummvm/trunk/engines/sci/sfx/soundcmd.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Dec 28 17:23:00 CET 2009
Revision: 46678
http://scummvm.svn.sourceforge.net/scummvm/?rev=46678&view=rev
Author: thebluegr
Date: 2009-12-28 16:23:00 +0000 (Mon, 28 Dec 2009)
Log Message:
-----------
SCI/new music code: Added a workaround for a music-related game bug in Castle of Dr. Brain
Modified Paths:
--------------
scummvm/trunk/engines/sci/sfx/soundcmd.cpp
Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2009-12-28 16:21:59 UTC (rev 46677)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp 2009-12-28 16:23:00 UTC (rev 46678)
@@ -222,8 +222,8 @@
if (command < _soundCommands.size()) {
//if (strcmp(_soundCommands[command]->desc, "cmdUpdateCues"))
- //printf("%s\n", _soundCommands[command]->desc); // debug
- debugC(2, kDebugLevelSound, "%s", _soundCommands[command]->desc);
+ //printf("%s, object %04x:%04x\n", _soundCommands[command]->desc, PRINT_REG(obj)); // debug
+ debugC(2, kDebugLevelSound, "%s, object %04x:%04x", _soundCommands[command]->desc, PRINT_REG(obj));
(this->*(_soundCommands[command]->sndCmd))(obj, value);
} else {
warning("Invalid sound command requested (%d), valid range is 0-%d", command, _soundCommands.size() - 1);
@@ -507,6 +507,14 @@
changeHandleStatus(obj, value ? SOUND_STATUS_SUSPENDED : SOUND_STATUS_PLAYING);
#else
MusicEntry *musicSlot = _music->getSlot(obj);
+
+ if (musicSlot->status == kSndStatusStopped) {
+ // WORKAROUND for the Sierra logo screen in Castle of Dr. Brain, where the
+ // game tries to pause/unpause the wrong sound in the playlist
+ if (!strcmp(_segMan->getObjectName(obj), "cMusic2"))
+ musicSlot = _music->getSlot(_segMan->findObjectByName("cMusic"));
+ }
+
if (!musicSlot) {
warning("cmdPauseHandle: Slot not found");
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list