From 28b74b14ec5444d9f2558c05cea67f3567322b51 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 2 Aug 2013 23:12:09 +0200 Subject: AGOS: Prefer getBasePtr over direct Surface::pixels access. --- engines/agos/animation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/agos/animation.cpp') diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 9176412e0e..214a383680 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -272,7 +272,7 @@ void MoviePlayerDXA::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { if (!surface) return; - byte *src = (byte *)surface->pixels; + const byte *src = (const byte *)surface->getBasePtr(0, 0); dst += y * pitch + x; do { @@ -344,7 +344,7 @@ void MoviePlayerDXA::handleNextFrame() { bool MoviePlayerDXA::processFrame() { Graphics::Surface *screen = _vm->_system->lockScreen(); - copyFrameToBuffer((byte *)screen->pixels, (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); + copyFrameToBuffer((byte *)screen->getBasePtr(0, 0), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); _vm->_system->unlockScreen(); uint32 soundTime = _mixer->getSoundElapsedTime(_bgSound); @@ -443,7 +443,7 @@ void MoviePlayerSMK::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { if (!surface) return; - byte *src = (byte *)surface->pixels; + const byte *src = (const byte *)surface->getBasePtr(0, 0); dst += y * pitch + x; do { @@ -495,7 +495,7 @@ void MoviePlayerSMK::nextFrame() { bool MoviePlayerSMK::processFrame() { Graphics::Surface *screen = _vm->_system->lockScreen(); - copyFrameToBuffer((byte *)screen->pixels, (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); + copyFrameToBuffer((byte *)screen->getBasePtr(0, 0), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, screen->pitch); _vm->_system->unlockScreen(); uint32 waitTime = getTimeToNextFrame(); -- cgit v1.2.3