[Scummvm-git-logs] scummvm master -> 3365a3cd5f2e5e715a0ef29a065b41cb96bd44e2
antoniou79
noreply at scummvm.org
Fri Nov 7 10:05:55 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
3365a3cd5f TSAGE: Impement hack to slow down fader
Commit: 3365a3cd5f2e5e715a0ef29a065b41cb96bd44e2
https://github.com/scummvm/scummvm/commit/3365a3cd5f2e5e715a0ef29a065b41cb96bd44e2
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-11-07T12:05:40+02:00
Commit Message:
TSAGE: Impement hack to slow down fader
This brings behavior closer to original (tested for Blue Force) but not quite
The hack uses the "high" byte of the _step (int) which is otherwise unused by the engine to store a counter that is used to slow down the calls to _scenePalette->fade()
Changed paths:
engines/tsage/core.cpp
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 04a8ea4e907..147dbf3a875 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -1213,7 +1213,7 @@ void PaletteRotation::remove() {
void PaletteRotation::set(ScenePalette *palette, int start, int end, int rotationMode, int duration, Action *action) {
_duration = duration;
- _step = false;
+ _step = 0;
_action = action;
_scenePalette = palette;
@@ -1259,12 +1259,22 @@ void PaletteFader::synchronize(Serializer &s) {
}
void PaletteFader::signal() {
- _percent -= _step;
- if (_percent > 0) {
- _scenePalette->fade((byte *)_palette, true /* 256 */, _percent);
- } else {
- remove();
+ // FIXME: HACK to slow down fading process and mimic the original behavior
+ // This hack is in the same spirit as the one in SceneObjectList::draw() for slowing down the scroller
+ int count = (_step & 0x7F00) >> 8;
+
+ if (count++ == 0) {
+ _percent -= _step;
+ if (_percent > 0) {
+ _scenePalette->fade((byte *)_palette, true /* 256 */, _percent);
+ } else {
+ remove();
+ }
}
+
+ if (count == 2)
+ count = 0;
+ _step = (count << 8) | (_step & 0xFF);
}
void PaletteFader::remove() {
More information about the Scummvm-git-logs
mailing list