From c05cb7f3bbcf4d64d4a938e0eb42065d8f3d3038 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 2 Aug 2013 22:23:00 +0200 Subject: SCUMM: Prefer getBasePtr over direct Surface::pixels access. --- engines/scumm/he/animation_he.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/scumm/he') diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index be17a3b305..7ae5547702 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -90,7 +90,7 @@ void MoviePlayer::copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint if (!surface) return; - byte *src = (byte *)surface->pixels; + const byte *src = (const byte *)surface->getBasePtr(0, 0); if (_video->hasDirtyPalette()) _vm->setPaletteFromPtr(_video->getPalette(), 256); @@ -119,7 +119,7 @@ void MoviePlayer::copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint dst += y * pitch + x * 2; do { for (uint i = 0; i < w; i++) { - uint16 color = *((uint16 *)src + i); + uint16 color = *((const uint16 *)src + i); switch (dstType) { case kDstScreen: WRITE_UINT16(dst + i * 2, color); -- cgit v1.2.3