diff options
author | Johannes Schickel | 2013-08-03 00:06:19 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:33 +0200 |
commit | 2117feaeec980b06b996ad6d154e12761fcc9d5b (patch) | |
tree | 5cefba69b3bf98cc0005a0f2a92bb5fe783b0125 /engines | |
parent | 82b96d33ad4f6ca623aa84df3e14a95e5cc2a091 (diff) | |
download | scummvm-rg350-2117feaeec980b06b996ad6d154e12761fcc9d5b.tar.gz scummvm-rg350-2117feaeec980b06b996ad6d154e12761fcc9d5b.tar.bz2 scummvm-rg350-2117feaeec980b06b996ad6d154e12761fcc9d5b.zip |
MORTEVIELLE: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mortevielle/graphics.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/saveload.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index c066114e8d..535dd6ddaa 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.pixels; + byte *destP = (byte *)destSurface.getBasePtr(0, 0); *destP = palIndex; *(destP + SCREEN_WIDTH) = palIndex; } diff --git a/engines/mortevielle/saveload.cpp b/engines/mortevielle/saveload.cpp index 77c242c9e7..d46383a6fc 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.pixels, SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette); + ::createThumbnail(thumb, (const byte *)s.getBasePtr(0, 0), SCREEN_WIDTH, SCREEN_HEIGHT, thumbPalette); Graphics::saveThumbnail(*out, *thumb); thumb->free(); delete thumb; |