diff options
author | Paul Gilbert | 2012-01-23 22:31:36 +1100 |
---|---|---|
committer | Strangerke | 2012-04-06 08:20:46 +0200 |
commit | 82381d6a19038800f85e4a10d6ab232c48555baa (patch) | |
tree | 269c03eac897717407972fce55b88b71df5b881f /engines/mortevielle/graphics.cpp | |
parent | 08b3b91f0f47c5a51e2cec4d3f7ede5a0152563a (diff) | |
download | scummvm-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.cpp | 17 |
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 |