[Scummvm-cvs-logs] SF.net SVN: scummvm:[35822] scummvm/trunk/engines/made
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Jan 11 12:15:17 CET 2009
Revision: 35822
http://scummvm.svn.sourceforge.net/scummvm/?rev=35822&view=rev
Author: dreammaster
Date: 2009-01-11 11:15:16 +0000 (Sun, 11 Jan 2009)
Log Message:
-----------
Completed screen vfx #8, and also implemented screen vfx #18
Modified Paths:
--------------
scummvm/trunk/engines/made/screenfx.cpp
scummvm/trunk/engines/made/screenfx.h
Modified: scummvm/trunk/engines/made/screenfx.cpp
===================================================================
--- scummvm/trunk/engines/made/screenfx.cpp 2009-01-11 06:51:17 UTC (rev 35821)
+++ scummvm/trunk/engines/made/screenfx.cpp 2009-01-11 11:15:16 UTC (rev 35822)
@@ -273,6 +273,22 @@
_screen->unlockScreen();
}
+void ScreenEffects::reposition(int16 x1, int16 y1, int16 x2, int16 y2, int xd, int yd) {
+ Graphics::Surface *vgaScreen = _screen->lockScreen();
+ byte *source = (byte *)vgaScreen->getBasePtr(x1, y1);
+ byte *dest = (byte *)vgaScreen->getBasePtr(xd, yd);
+ for (int y = 0; y < y2 - y1; y++) {
+ if (dest < source)
+ memcpy(dest, source, x2 - x1);
+ else
+ Common::copy_backward(source, source + x2 - x1, dest + x2 - x1);
+
+ dest += 320;
+ source += 320;
+ }
+ _screen->unlockScreen();
+}
+
// No effect
void ScreenEffects::vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
setPalette(palette);
@@ -350,6 +366,8 @@
// "Screen slide in" right to left
void ScreenEffects::vfx08(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
for (int x = 8; x <= 320; x += 8) {
+ if (x != 320)
+ reposition(8, 0, 328 - x, 200, 0, 0);
copyRect(surface, 0, 0, x, 200, 320 - x, 0);
_screen->updateScreenAndWait(25);
}
@@ -478,10 +496,16 @@
}
+// "Screen slide in" left to right
void ScreenEffects::vfx18(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
- // TODO
- warning("Unimplemented visual effect: 18");
- vfx00(surface, palette, newPalette, colorCount);
+ for (int x = 8; x <= 320; x += 8) {
+ if (x != 320)
+ reposition(x, 0, 312, 200, x + 8, 0);
+ copyRect(surface, 320 - x, 0, 320, 200, 0, 0);
+ _screen->updateScreenAndWait(25);
+ }
+
+ setPalette(palette);
}
void ScreenEffects::vfx19(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
Modified: scummvm/trunk/engines/made/screenfx.h
===================================================================
--- scummvm/trunk/engines/made/screenfx.h 2009-01-11 06:51:17 UTC (rev 35821)
+++ scummvm/trunk/engines/made/screenfx.h 2009-01-11 11:15:16 UTC (rev 35822)
@@ -54,6 +54,7 @@
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,
int xd = -1, int yd = -1);
+ void reposition(int16 x1, int16 y1, int16 x2, int16 y2, int xd, int yd);
void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
void vfx01(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list