aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-06-22 00:03:13 +0000
committerTravis Howell2006-06-22 00:03:13 +0000
commit36807a857d944d35679dc01cb7a4e5ca535bda2f (patch)
tree56ae143a070ead940a63355edf610af00330f608 /engines
parentd2bd1de292c1ff393fb2757fec2af2b1c4731019 (diff)
downloadscummvm-rg350-36807a857d944d35679dc01cb7a4e5ca535bda2f.tar.gz
scummvm-rg350-36807a857d944d35679dc01cb7a4e5ca535bda2f.tar.bz2
scummvm-rg350-36807a857d944d35679dc01cb7a4e5ca535bda2f.zip
Add cyx's patch for VAR_FADE_DELAY timer changes in fade effects
svn-id: r23255
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/gfx.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 699c6ac3f8..2881558efa 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -52,7 +52,8 @@ struct StripTable {
enum {
kScrolltime = 500, // ms scrolling is supposed to take
- kPictureDelay = 20
+ kPictureDelay = 20,
+ kFadeDelay = 4 // 1/4th of a jiffie
};
#define NUM_SHAKE_POSITIONS 8
@@ -3103,6 +3104,7 @@ void ScummEngine::transitionEffect(int a) {
int bottom;
int l, t, r, b;
const int height = MIN((int)virtscr[0].h, _screenHeight);
+ const int delay = (VAR_FADE_DELAY != 0xFF) ? VAR(VAR_FADE_DELAY) * kFadeDelay : kPictureDelay;
for (i = 0; i < 16; i++) {
delta[i] = transitionEffects[a].deltaTable[i];
@@ -3146,7 +3148,7 @@ void ScummEngine::transitionEffect(int a) {
// Draw the current state to the screen and wait a few secs so the
// user can watch the effect taking place.
- waitForTimer(VAR_FADE_DELAY != 0xFF ? VAR(VAR_FADE_DELAY) * 10 : 30);
+ waitForTimer(delay);
}
}
@@ -3271,13 +3273,14 @@ void ScummEngine::scrollEffect(int dir) {
int x, y;
int step;
+ const int delay = (VAR_FADE_DELAY != 0xFF) ? VAR(VAR_FADE_DELAY) * kFadeDelay : kPictureDelay;
if ((dir == 0) || (dir == 1))
step = vs->h;
else
step = vs->w;
- step = (step * kPictureDelay) / kScrolltime;
+ step = (step * delay) / kScrolltime;
switch (dir) {
case 0:
@@ -3290,7 +3293,7 @@ void ScummEngine::scrollEffect(int dir) {
0, vs->h - step,
vs->w, step);
_system->updateScreen();
- waitForTimer(kPictureDelay);
+ waitForTimer(delay);
y += step;
}
@@ -3305,7 +3308,7 @@ void ScummEngine::scrollEffect(int dir) {
0, 0,
vs->w, step);
_system->updateScreen();
- waitForTimer(kPictureDelay);
+ waitForTimer(delay);
y += step;
}
@@ -3320,7 +3323,7 @@ void ScummEngine::scrollEffect(int dir) {
vs->w - step, 0,
step, vs->h);
_system->updateScreen();
- waitForTimer(kPictureDelay);
+ waitForTimer(delay);
x += step;
}
@@ -3335,7 +3338,7 @@ void ScummEngine::scrollEffect(int dir) {
0, 0,
step, vs->h);
_system->updateScreen();
- waitForTimer(kPictureDelay);
+ waitForTimer(delay);
x += step;
}