aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/graphics.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-02 23:37:51 +0200
committerJohannes Schickel2013-08-03 02:52:32 +0200
commit8b763977a38b366e0360a7fef861bd53f6aa6299 (patch)
tree49b2e33b2be193cae32f8bbede4530f064dad77d /engines/hopkins/graphics.cpp
parent690d55d763ed0c771dde7ff025fbe0c9f3d26228 (diff)
downloadscummvm-rg350-8b763977a38b366e0360a7fef861bd53f6aa6299.tar.gz
scummvm-rg350-8b763977a38b366e0360a7fef861bd53f6aa6299.tar.bz2
scummvm-rg350-8b763977a38b366e0360a7fef861bd53f6aa6299.zip
HOPKINS: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r--engines/hopkins/graphics.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index b83371d65f..7fe9943dbb 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -325,7 +325,7 @@ void GraphicsManager::loadPCX640(byte *surface, const Common::String &file, byte
// Copy out the dimensions and pixels of the decoded surface
_largeScreenFl = s->w > SCREEN_WIDTH;
- Common::copy((byte *)s->pixels, (byte *)s->pixels + (s->pitch * s->h), surface);
+ Common::copy((const byte *)s->getBasePtr(0, 0), (const byte *)s->getBasePtr(0, s->h), surface);
// Copy out the palette
const byte *palSrc = pcxDecoder.getPalette();
@@ -1202,7 +1202,7 @@ void GraphicsManager::displayZones() {
void GraphicsManager::displayLines() {
Graphics::Surface *screenSurface = g_system->lockScreen();
- uint16* pixels = (uint16*)screenSurface->pixels;
+ uint16 *pixels = (uint16 *)screenSurface->getBasePtr(0, 0);
for (int lineIndex = 0; lineIndex < _vm->_linesMan->_linesNumb; lineIndex++) {
int i = 0;