aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/graphics.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-01-23 22:31:36 +1100
committerStrangerke2012-04-06 08:20:46 +0200
commit82381d6a19038800f85e4a10d6ab232c48555baa (patch)
tree269c03eac897717407972fce55b88b71df5b881f /engines/mortevielle/graphics.cpp
parent08b3b91f0f47c5a51e2cec4d3f7ede5a0152563a (diff)
downloadscummvm-rg350-82381d6a19038800f85e4a10d6ab232c48555baa.tar.gz
scummvm-rg350-82381d6a19038800f85e4a10d6ab232c48555baa.tar.bz2
scummvm-rg350-82381d6a19038800f85e4a10d6ab232c48555baa.zip
MORTEVIELLE: Fix for erasing alert dialogs when done
Diffstat (limited to 'engines/mortevielle/graphics.cpp')
-rw-r--r--engines/mortevielle/graphics.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index 3683afc57b..3450d41cf5 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -935,6 +935,23 @@ void ScreenSurface::drawPicture(GfxSurface &surface, int x, int y) {
}
/**
+ * Copys a given surface to the given position
+ */
+void ScreenSurface::copyFrom(Graphics::Surface &src, int x, int y) {
+ Graphics::Surface destSurface = lockArea(Common::Rect(x, y, x + src.w, y + src.h));
+
+ // Loop through writing
+ for (int yp = 0; yp < src.h; ++yp) {
+ if (((y + yp) < 0) || ((y + yp) >= SCREEN_HEIGHT))
+ continue;
+
+ const byte *pSrc = (const byte *)src.getBasePtr(0, yp);
+ byte *pDest = (byte *)getBasePtr(0, yp);
+ Common::copy(pSrc, pSrc + src.w, pDest);
+ }
+}
+
+/**
* Draws a character at the specified co-ordinates
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled