aboutsummaryrefslogtreecommitdiff
path: root/engines/made/screenfx.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2009-03-14 15:43:37 +0000
committerFilippos Karapetis2009-03-14 15:43:37 +0000
commit68520809162c8e0212a4ae10fb178a21339fb87f (patch)
tree47718fb370a0d5e4fbfd2e8c8ba16a8355320f25 /engines/made/screenfx.cpp
parent14ced31851d3136bba55c57e58abef93502b1a4f (diff)
downloadscummvm-rg350-68520809162c8e0212a4ae10fb178a21339fb87f.tar.gz
scummvm-rg350-68520809162c8e0212a4ae10fb178a21339fb87f.tar.bz2
scummvm-rg350-68520809162c8e0212a4ae10fb178a21339fb87f.zip
Merged loadRGBPalette() inside setRGBPalette() (that's the only place it's used and where the screen palette is set). Added a wrapper for copyRectToScreen(), to remove some duplicated code inside the ScreenEffects() class
svn-id: r39396
Diffstat (limited to 'engines/made/screenfx.cpp')
-rw-r--r--engines/made/screenfx.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index 02a74374ab..1473d89c7b 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -268,15 +268,7 @@ void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int
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(xd, yd);
- for (int y = 0; y < y2 - y1; y++) {
- memcpy(dest, source, x2 - x1);
- dest += 320;
- source += 320;
- }
- _screen->unlockScreen();
+ _screen->copyRectToScreen((const byte*)surface->pixels, surface->pitch, xd, yd, surface->w, surface->h);
}
void ScreenEffects::reposition(int16 x1, int16 y1, int16 x2, int16 y2, int xd, int yd) {