aboutsummaryrefslogtreecommitdiff
path: root/engines/made/screenfx.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-01-10 22:11:22 +0000
committerPaul Gilbert2009-01-10 22:11:22 +0000
commit75c2dc82b3814d0d74c0c7910e64a9ac081bfbaa (patch)
treeb43907a22ec8479aabb4813f6450a0e88b9af080 /engines/made/screenfx.cpp
parent5b80774dded7b39083ff8eabc633e88fefc15975 (diff)
downloadscummvm-rg350-75c2dc82b3814d0d74c0c7910e64a9ac081bfbaa.tar.gz
scummvm-rg350-75c2dc82b3814d0d74c0c7910e64a9ac081bfbaa.tar.bz2
scummvm-rg350-75c2dc82b3814d0d74c0c7910e64a9ac081bfbaa.zip
Implemented screen vfx #8
svn-id: r35806
Diffstat (limited to 'engines/made/screenfx.cpp')
-rw-r--r--engines/made/screenfx.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index 9f71dfeff8..ae0c10321e 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -257,10 +257,14 @@ void ScreenEffects::copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, i
}
-void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2) {
+void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2,
+ int xd, int yd) {
+ if (xd == -1) xd = x1;
+ if (yd == -1) yd = y1;
+
Graphics::Surface *vgaScreen = _screen->lockScreen();
byte *source = (byte*)surface->getBasePtr(x1, y1);
- byte *dest = (byte*)vgaScreen->getBasePtr(x1, y1);
+ byte *dest = (byte*)vgaScreen->getBasePtr(xd, yd);
for (int y = 0; y < y2 - y1; y++) {
memcpy(dest, source, x2 - x1);
dest += 320;
@@ -343,10 +347,14 @@ void ScreenEffects::vfx07(Graphics::Surface *surface, byte *palette, byte *newPa
setPalette(palette);
}
+// "Screen slide in" right to left
void ScreenEffects::vfx08(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
- // TODO
- warning("Unimplemented visual effect: 8");
- vfx00(surface, palette, newPalette, colorCount);
+ for (int x = 8; x <= 320; x += 8) {
+ copyRect(surface, 0, 0, x, 200, 320 - x, 0);
+ _screen->updateScreenAndWait(25);
+ }
+
+ setPalette(palette);
}
// "Checkerboard" effect