From 8617edea04cfb2439de54d3ce4e64f92e5bd0416 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 00:33:42 +0200 Subject: SAGA: Prefer getBasePtr over direct Surface::pixels access. --- engines/saga/scene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/saga/scene.cpp') diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 75876b1c90..23d3015afd 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -468,7 +468,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy pal = decoder.getPalette(); rect.setWidth(decoder.getSurface()->w); rect.setHeight(decoder.getSurface()->h); - _vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->pixels); + _vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->getBasePtr(0, 0)); for (int j = 0; j < PAL_ENTRIES; j++) { cPal[j].red = *pal++; cPal[j].green = *pal++; @@ -1120,9 +1120,9 @@ void Scene::draw() { _vm->_render->getBackGroundSurface()->getRect(rect); rect.bottom = (_sceneClip.bottom < rect.bottom) ? getHeight() : rect.bottom; if (_vm->_render->isFullRefresh()) - _vm->_gfx->drawRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->pixels); + _vm->_gfx->drawRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0)); else - _vm->_gfx->drawBgRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->pixels); + _vm->_gfx->drawBgRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0)); } } -- cgit v1.2.3 From e30cb842101a6259633de46a9517ea46a2ba9860 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 02:41:27 +0200 Subject: SAGA: Take advantage of Sufrace::getPixels. --- engines/saga/scene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/saga/scene.cpp') diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 23d3015afd..eff31cf98b 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -468,7 +468,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy pal = decoder.getPalette(); rect.setWidth(decoder.getSurface()->w); rect.setHeight(decoder.getSurface()->h); - _vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->getBasePtr(0, 0)); + _vm->_gfx->drawRegion(rect, (const byte *)decoder.getSurface()->getPixels()); for (int j = 0; j < PAL_ENTRIES; j++) { cPal[j].red = *pal++; cPal[j].green = *pal++; @@ -1120,9 +1120,9 @@ void Scene::draw() { _vm->_render->getBackGroundSurface()->getRect(rect); rect.bottom = (_sceneClip.bottom < rect.bottom) ? getHeight() : rect.bottom; if (_vm->_render->isFullRefresh()) - _vm->_gfx->drawRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0)); + _vm->_gfx->drawRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getPixels()); else - _vm->_gfx->drawBgRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0)); + _vm->_gfx->drawBgRegion(rect, (const byte *)_vm->_render->getBackGroundSurface()->getPixels()); } } -- cgit v1.2.3