[Scummvm-cvs-logs] scummvm master -> f019d5a4881c8ee42fa36ef0613d9e82b3b36297
bluegr
bluegr at gmail.com
Wed Apr 3 23:40:27 CEST 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
17ca8d14b1 Properly fix bugs #3267956 and #3605377
f019d5a488 SCI: Add a hack to fix bug #3596335
Commit: 17ca8d14b1e0d1960485029878c728ef4d6d6132
https://github.com/scummvm/scummvm/commit/17ca8d14b1e0d1960485029878c728ef4d6d6132
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-04-03T14:37:43-07:00
Commit Message:
Properly fix bugs #3267956 and #3605377
SCI: Only stop after fading, if the song to be faded is faded down. Also,
reset the song signal when fading starts. It was set to -1 when fading
started in bug #3267956, thus it stopped immediately.
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index db35705..f943ee6 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -182,7 +182,7 @@ void SoundCommandParser::processPlaySound(reg_t obj) {
// for the missing signal. We signal the game scripts to stop waiting
// forever by setting the song's dataInc selector to something other than 0
if (g_sci->getGameId() == GID_KQ5 && resourceId == 1849)
- writeSelectorValue(_segMan, obj, SELECTOR(dataInc), 1);
+ musicSlot->dataInc = 1;
musicSlot->loop = readSelectorValue(_segMan, obj, SELECTOR(loop));
musicSlot->priority = readSelectorValue(_segMan, obj, SELECTOR(priority));
@@ -380,6 +380,8 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
case 4: // SCI01+
case 5: // SCI1+ (SCI1 late sound scheme), with fade and continue
+ musicSlot->fadeTo = CLIP<uint16>(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX);
+
if (argc == 5) {
// TODO: We currently treat this argument as a boolean, but may
// have to handle different non-zero values differently. (e.g.,
@@ -387,12 +389,13 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
// There is a script bug in KQ6, room 460 (the room with the flying
// books). An object is passed here, which should not be treated as
// a true flag. Fixes bugs #3555404 and #3291115.
- musicSlot->stopAfterFading = (argv[4].isNumber() && argv[4].toUint16() != 0);
+ // We should only stop after fading if the music is fading down. Fixes
+ // bugs #3267956 and #3605377.
+ musicSlot->stopAfterFading = (argv[4].isNumber() && argv[4].toUint16() != 0 && musicSlot->fadeTo < musicSlot->volume);
} else {
musicSlot->stopAfterFading = false;
}
- musicSlot->fadeTo = CLIP<uint16>(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX);
// Check if the song is already at the requested volume. If it is, don't
// perform any fading. Happens for example during the intro of Longbow.
if (musicSlot->fadeTo != musicSlot->volume) {
@@ -402,23 +405,20 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
else
musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
+ // Reset the song signal when starting to fade. Fixes bug #3267956,
+ // where it was set to -1 when fading started, thus it stopped immediately
+ musicSlot->signal = 0;
} else {
// Stop the music, if requested. Fixes bug #3555404.
+ // Reset the song signal when starting to fade. Fixes bug #3267956,
+ // where it was set to -1 when fading started, thus it stopped immediately
if (musicSlot->stopAfterFading)
processStopSound(obj, false);
+ else
+ musicSlot->signal = 0;
}
musicSlot->fadeTicker = 0;
-
- // 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:
Commit: f019d5a4881c8ee42fa36ef0613d9e82b3b36297
https://github.com/scummvm/scummvm/commit/f019d5a4881c8ee42fa36ef0613d9e82b3b36297
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-04-03T14:37:43-07:00
Commit Message:
SCI: Add a hack to fix bug #3596335
Game scripts are waiting indefinitely for a song, thus we change its dataInc
selector to prevent that from happening
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index f943ee6..82099fd 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -418,6 +418,11 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
musicSlot->signal = 0;
}
+ // HACK to fix scripts waiting indefinitely after getting the "love"
+ // page from the spider (bug #3596335).
+ if (g_sci->getGameId() == GID_KQ6 && musicSlot->resourceId == 465 && musicSlot->fadeTo == 0)
+ musicSlot->dataInc = 1;
+
musicSlot->fadeTicker = 0;
break;
More information about the Scummvm-git-logs
mailing list