From 75c2dc82b3814d0d74c0c7910e64a9ac081bfbaa Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 10 Jan 2009 22:11:22 +0000 Subject: Implemented screen vfx #8 svn-id: r35806 --- engines/made/screenfx.cpp | 18 +++++++++++++----- engines/made/screenfx.h | 3 ++- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'engines') 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 diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h index 18fcbd29ce..7852855301 100644 --- a/engines/made/screenfx.h +++ b/engines/made/screenfx.h @@ -52,7 +52,8 @@ private: void setPalette(byte *palette); void setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue); void copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2); - void copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2); + void copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2, + int xd = -1, int yd = -1); void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx01(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); -- cgit v1.2.3