From 2117feaeec980b06b996ad6d154e12761fcc9d5b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 00:06:19 +0200 Subject: MORTEVIELLE: Prefer getBasePtr over direct Surface::pixels access. --- engines/mortevielle/graphics.cpp | 2 +- engines/mortevielle/saveload.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3