aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMichael Pearce2002-09-09 05:56:11 +0000
committerMichael Pearce2002-09-09 05:56:11 +0000
commit0fbefc72aa7fd29b74dd2fac41ebfae0dfcac781 (patch)
tree7db3576c01a534d363786bb7a16c18b85eec2452 /scumm
parent5b8eb34406373daa7a167f89d32dbe72c3cdc005 (diff)
downloadscummvm-rg350-0fbefc72aa7fd29b74dd2fac41ebfae0dfcac781.tar.gz
scummvm-rg350-0fbefc72aa7fd29b74dd2fac41ebfae0dfcac781.tar.bz2
scummvm-rg350-0fbefc72aa7fd29b74dd2fac41ebfae0dfcac781.zip
Applied roever's screen effects patch (#602595) and fixed LethalWP's Makefile ;)
svn-id: r4909
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp90
1 files changed, 86 insertions, 4 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 07f92f9e33..2bbaf04dc6 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -681,16 +681,16 @@ void Scumm::fadeIn(int effect)
unkScreenEffect6();
break;
case 130:
- unkScreenEffect1();
+ scrollEffect(3); // right unkScreenEffect1();
break;
case 131:
- unkScreenEffect2();
+ scrollEffect(2); // left unkScreenEffect2();
break;
case 132:
- unkScreenEffect3();
+ scrollEffect(1); // down unkScreenEffect3();
break;
case 133:
- unkScreenEffect4();
+ scrollEffect(0); // up unkScreenEffect4();
break;
case 134:
dissolveEffect(1, 1);
@@ -2092,6 +2092,88 @@ void Scumm::dissolveEffect(int width, int height) {
}
}
+void Scumm::scrollEffect(int dir) {
+
+ VirtScreen *vs = &virtscr[0];
+
+ int x, y;
+ int step;
+
+ if ((dir == 0) || (dir == 1))
+ step = vs->height;
+ else
+ step = vs->width;
+
+#define scrolltime 500 // ms the scroll is supposed to take
+#define picturedelay 20
+
+ step /= (scrolltime/picturedelay);
+
+ switch (dir) {
+ case 0:
+ //up
+ y = 1 + step;
+ while (y < vs->height) {
+ _system->move_screen(0, -step, vs->height);
+ _system->copy_rect(vs->screenPtr + vs->xstart + (y - step) * vs->width,
+ vs->width,
+ 0, vs->height - step,
+ vs->width, step);
+ _system->update_screen();
+ waitForTimer(picturedelay);
+
+ y += step;
+ }
+ break;
+ case 1:
+ // down
+ y = 1 + step;
+ while (y < vs->height) {
+ _system->move_screen(0, step, vs->height);
+ _system->copy_rect(vs->screenPtr + vs->xstart + vs->width * (vs->height-y),
+ vs->width,
+ 0, 0,
+ vs->width, step);
+ _system->update_screen();
+ waitForTimer(picturedelay);
+
+ y += step;
+ }
+ break;
+ case 2:
+ // left
+ x = 1 + step;
+ while (x < vs->width) {
+ _system->move_screen(-step, 0, vs->height);
+ _system->copy_rect(vs->screenPtr + vs->xstart + x - step,
+ vs->width,
+ vs->width - step, 0,
+ step, vs->height);
+ _system->update_screen();
+ waitForTimer(picturedelay);
+
+ x += step;
+ }
+ break;
+ case 3:
+ // right
+ x = 1 + step;
+ while (x < vs->width) {
+ _system->move_screen(step, 0, vs->height);
+ _system->copy_rect(vs->screenPtr + vs->xstart + vs->width - x,
+ vs->width,
+ 0, 0,
+ step, vs->height);
+ _system->update_screen();
+ waitForTimer(picturedelay);
+
+ x += step;
+ }
+ break;
+ }
+}
+
+
void Scumm::unkScreenEffect6() {
if (_gameId == GID_LOOM256)
dissolveEffect(1, 1);