diff options
author | Johannes Schickel | 2013-08-03 02:40:37 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 04:02:51 +0200 |
commit | 0c0f99eb96e9c7d13ae1430604a1d7569ec776cc (patch) | |
tree | 1c885e8bf3056d275de341b4df1f614a42406f16 | |
parent | 575cfca013dadfbd8d0dc5dbe5b4d693f2315413 (diff) | |
download | scummvm-rg350-0c0f99eb96e9c7d13ae1430604a1d7569ec776cc.tar.gz scummvm-rg350-0c0f99eb96e9c7d13ae1430604a1d7569ec776cc.tar.bz2 scummvm-rg350-0c0f99eb96e9c7d13ae1430604a1d7569ec776cc.zip |
MORTEVIELLE: Take advantage of Surface::getPixels.
-rw-r--r-- | engines/mortevielle/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/menu.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/saveload.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index 535dd6ddaa..dd0710655c 100644 --- a/engines/mortevielle/graphics.cpp +++ b/engines/mortevielle/graphics.cpp @@ -1067,7 +1067,7 @@ void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) { assert((pt.x >= 0) && (pt.y >= 0) && (pt.x <= SCREEN_WIDTH) && (pt.y <= SCREEN_ORIG_HEIGHT)); Graphics::Surface destSurface = lockArea(Common::Rect(pt.x, pt.y * 2, pt.x + 1, (pt.y + 1) * 2)); - byte *destP = (byte *)destSurface.getBasePtr(0, 0); + byte *destP = (byte *)destSurface.getPixels(); *destP = palIndex; *(destP + SCREEN_WIDTH) = palIndex; } diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp index f86fd208c1..0eaaf79f77 100644 --- a/engines/mortevielle/menu.cpp +++ b/engines/mortevielle/menu.cpp @@ -393,7 +393,7 @@ void Menu::menuUp(int msgId) { // Get a pointer to the source and destination of the area to restore const byte *pSrc = (const byte *)_vm->_backgroundSurface.getBasePtr(0, 10); Graphics::Surface destArea = _vm->_screenSurface.lockArea(Common::Rect(0, 10, SCREEN_WIDTH, SCREEN_HEIGHT)); - byte *pDest = (byte *)destArea.getBasePtr(0, 0); + byte *pDest = (byte *)destArea.getPixels(); // Copy the data Common::copy(pSrc, pSrc + (400 - 10) * SCREEN_WIDTH, pDest); diff --git a/engines/mortevielle/saveload.cpp b/engines/mortevielle/saveload.cpp index d46383a6fc..651ed07b65 100644 --- a/engines/mortevielle/saveload.cpp +++ b/engines/mortevielle/saveload.cpp @@ -189,7 +189,7 @@ void SavegameManager::writeSavegameHeader(Common::OutSaveFile *out, const Common Graphics::Surface *thumb = new Graphics::Surface(); Graphics::Surface s = g_vm->_screenSurface.lockArea(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)); - ::createThumbnail(thumb, (const byte *)s.getBasePtr(0, 0), SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette); + ::createThumbnail(thumb, (const byte *)s.getPixels(), SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette); Graphics::saveThumbnail(*out, *thumb); thumb->free(); delete thumb; |