[Scummvm-cvs-logs] scummvm master -> eb4832524841db53cf2ee638552283db5a7b0c96
wjp
wjp at usecode.org
Sat Apr 6 20:33:46 CEST 2013
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0f2fae14cc SCI: Revert "Add a hack to fix bug #3596335"
9155e8e1a1 SCI: Revert "Properly fix bugs #3267956 and #3605377"
5a2ef39335 SCI: Revert "Fix script bug #3555404 - "SCI: KQ6 Spider Scene Game Freeze""
da3583f569 SCI: Revert "Clarify comment from rev 5654e12 further"
eb48325248 SCI: Revert "Added a more specific workaround for bug #3267956.[...]"
Commit: 0f2fae14cc238494fa4371428a1368eed547828c
https://github.com/scummvm/scummvm/commit/0f2fae14cc238494fa4371428a1368eed547828c
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-06T11:31:34-07:00
Commit Message:
SCI: Revert "Add a hack to fix bug #3596335"
This reverts commit f019d5a4881c8ee42fa36ef0613d9e82b3b36297.
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 4029910..0312c02 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -423,11 +423,6 @@ 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;
Commit: 9155e8e1a1a4f38b9543af30f6b4a9477b7653c8
https://github.com/scummvm/scummvm/commit/9155e8e1a1a4f38b9543af30f6b4a9477b7653c8
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-06T11:31:34-07:00
Commit Message:
SCI: Revert "Properly fix bugs #3267956 and #3605377"
This reverts commit 17ca8d14b1e0d1960485029878c728ef4d6d6132,
except for a minor unrelated change to the workaround for bug #3605269
Conflicts:
engines/sci/sound/soundcmd.cpp
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 0312c02..2f18202 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -385,8 +385,6 @@ 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.,
@@ -394,13 +392,12 @@ 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.
- // 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);
+ musicSlot->stopAfterFading = (argv[4].isNumber() && argv[4].toUint16() != 0);
} 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) {
@@ -410,20 +407,23 @@ 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: 5a2ef39335291fb7408a5552cda4ea0fcea292c0
https://github.com/scummvm/scummvm/commit/5a2ef39335291fb7408a5552cda4ea0fcea292c0
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-06T11:31:34-07:00
Commit Message:
SCI: Revert "Fix script bug #3555404 - "SCI: KQ6 Spider Scene Game Freeze""
This reverts commit 8524ebd699254a6786033f0e41b9a45c563feb11.
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 2f18202..65dcf57 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -385,36 +385,29 @@ 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);
+ // 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)
+ return acc;
+
+ // sometimes we get objects in that position, fix it up (ffs. workarounds)
+ if (!argv[1].getSegment())
+ musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16();
+ else
+ musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
+ musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
+ musicSlot->fadeTicker = 0;
+
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).
- // 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);
+ // some KQ6 scripts pass 3 here)
+ musicSlot->stopAfterFading = (argv[4].toUint16() != 0);
} 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) {
- // sometimes we get objects in that position, fix it up (ffs. workarounds)
- if (!argv[1].getSegment())
- musicSlot->fadeStep = volume > musicSlot->fadeTo ? -argv[3].toUint16() : argv[3].toUint16();
- else
- musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
- musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
- } else {
- // Stop the music, if requested. Fixes bug #3555404.
- if (musicSlot->stopAfterFading)
- processStopSound(obj, false);
- }
-
- 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
Commit: da3583f5691ba45be7b82ac3930cf0fc36e938f0
https://github.com/scummvm/scummvm/commit/da3583f5691ba45be7b82ac3930cf0fc36e938f0
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-06T11:31:34-07:00
Commit Message:
SCI: Revert "Clarify comment from rev 5654e12 further"
This reverts commit 9f74a6eda2355bb09b9b963be41509ed67016a6c.
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 65dcf57..54c602c 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -398,15 +398,10 @@ 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;
-
- 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;
- }
+ // 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;
// 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
Commit: eb4832524841db53cf2ee638552283db5a7b0c96
https://github.com/scummvm/scummvm/commit/eb4832524841db53cf2ee638552283db5a7b0c96
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2013-04-06T11:31:34-07:00
Commit Message:
SCI: Revert "Added a more specific workaround for bug #3267956.[...]"
This reverts commit 5654e1257551bf176c7fd06c756612bec3d79033.
Conflicts:
engines/sci/sound/soundcmd.cpp
Changed paths:
engines/sci/sound/soundcmd.cpp
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 54c602c..d03e084 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:
More information about the Scummvm-git-logs
mailing list