aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/screen.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index cd2227f130..71d49a7aae 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -422,10 +422,9 @@ void Screen::getFadeParams(const uint8 *palette, int delay, int &delayInc, int &
maxDiff = MAX<uint8>(maxDiff, diff);
}
- delayInc = delay << 8;
+ delayInc = (delay << 8) & 0x7FFF;
if (maxDiff != 0)
delayInc /= maxDiff;
- delayInc &= 0x7FFF;
delay = delayInc;
for (diff = 1; diff <= maxDiff; ++diff) {