aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-28 16:23:00 +0000
committerFilippos Karapetis2009-12-28 16:23:00 +0000
commit0a6e2127acec9039d4cb98637d189fb84504e8d1 (patch)
tree1de9809093c71ffed21b174b44e0f87221c54651 /engines
parent3c6b7ce3b5474fb893c8623e3af558806c6c76c6 (diff)
downloadscummvm-rg350-0a6e2127acec9039d4cb98637d189fb84504e8d1.tar.gz
scummvm-rg350-0a6e2127acec9039d4cb98637d189fb84504e8d1.tar.bz2
scummvm-rg350-0a6e2127acec9039d4cb98637d189fb84504e8d1.zip
SCI/new music code: Added a workaround for a music-related game bug in Castle of Dr. Brain
svn-id: r46678
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sfx/soundcmd.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index c4df4c9b85..dba77ccf3c 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -222,8 +222,8 @@ reg_t SoundCommandParser::parseCommand(int argc, reg_t *argv, reg_t acc) {
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 @@ void SoundCommandParser::cmdPauseHandle(reg_t obj, int16 value) {
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;