aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-04-28 12:00:27 +0200
committerWillem Jan Palenstijn2011-04-28 12:03:10 +0200
commit9f74a6eda2355bb09b9b963be41509ed67016a6c (patch)
tree5834e960044369ae8863959cba03dc19c6a11786
parent3e01d35281c2a279ed3ad6873c87cddddb926a36 (diff)
downloadscummvm-rg350-9f74a6eda2355bb09b9b963be41509ed67016a6c.tar.gz
scummvm-rg350-9f74a6eda2355bb09b9b963be41509ed67016a6c.tar.bz2
scummvm-rg350-9f74a6eda2355bb09b9b963be41509ed67016a6c.zip
SCI: Clarify comment from rev 5654e12 further
-rw-r--r--engines/sci/sound/soundcmd.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 1be16f17fb..a2b09eab4c 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -345,10 +345,15 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
musicSlot->fadeTicker = 0;
- // TODO: We handle this as a bit field (i.e. containing values 0 and 1),
- // 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;
+
+ if (argc == 5) {
+ // TODO: We currently treat this argument as a boolean, but may
+ // have to handle different non-zero values differently. (e.g.,
+ // some KQ6 scripts pass 3 here)
+ musicSlot->stopAfterFading = (argv[4].toUint16() != 0);
+ } else {
+ musicSlot->stopAfterFading = 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