aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-04-06 19:14:24 +0200
committerWillem Jan Palenstijn2013-04-06 20:31:34 +0200
commiteb4832524841db53cf2ee638552283db5a7b0c96 (patch)
treea8ae57bd02b54c5235447a894ef1d1502508eae2 /engines/sci/sound/soundcmd.cpp
parentda3583f5691ba45be7b82ac3930cf0fc36e938f0 (diff)
downloadscummvm-rg350-eb4832524841db53cf2ee638552283db5a7b0c96.tar.gz
scummvm-rg350-eb4832524841db53cf2ee638552283db5a7b0c96.tar.bz2
scummvm-rg350-eb4832524841db53cf2ee638552283db5a7b0c96.zip
SCI: Revert "Added a more specific workaround for bug #3267956.[...]"
This reverts commit 5654e1257551bf176c7fd06c756612bec3d79033. Conflicts: engines/sci/sound/soundcmd.cpp
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 54c602c731..d03e084782 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -373,6 +373,14 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
return acc;
}
+ // If the current volume of the slot is the same as the target volume,
+ // return without performing any fading. This fixes the music in room
+ // 406 in KQ6 (bug #3267956), where the game scripts ask for the background
+ // music to be played, and then faded to volume 127 (but the music is
+ // already at volume 127) and subsequently stopped.
+ if (argc >= 4 && musicSlot->volume == CLIP<uint16>(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX))
+ return acc;
+
switch (argc) {
case 1: // SCI0
// SCI0 fades out all the time and when fadeout is done it will also
@@ -402,16 +410,6 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
// but some games pass other values here as well (e.g. some KQ6 scripts
// pass 3 here)
musicSlot->stopAfterFading = (argc == 5) ? (argv[4].toUint16() != 0) : false;
-
- // WORKAROUND/HACK: In the labyrinth in KQ6, when falling in the pit and
- // lighting the lantern, the game scripts perform a fade in of the game
- // music, but set it to stop after fading. Remove that flag here. This is
- // marked as both a workaround and a hack because this issue could be a
- // problem with our fading code and an incorrect handling of that
- // parameter, or a script bug in that scene. Fixes bug #3267956.
- if (g_sci->getGameId() == GID_KQ6 && g_sci->getEngineState()->currentRoomNumber() == 406 &&
- musicSlot->resourceId == 400)
- musicSlot->stopAfterFading = false;
break;
default: