diff options
author | Johannes Schickel | 2013-08-03 00:33:42 +0200 |
---|---|---|
committer | Johannes Schickel | 2013-08-03 02:52:33 +0200 |
commit | 8617edea04cfb2439de54d3ce4e64f92e5bd0416 (patch) | |
tree | 1d8f04a305152fe5d027b601c5415e4782ab1a16 /engines | |
parent | e59995b0b26c06a92a4ae3a78dd069e75010e74b (diff) | |
download | scummvm-rg350-8617edea04cfb2439de54d3ce4e64f92e5bd0416.tar.gz scummvm-rg350-8617edea04cfb2439de54d3ce4e64f92e5bd0416.tar.bz2 scummvm-rg350-8617edea04cfb2439de54d3ce4e64f92e5bd0416.zip |
SAGA: Prefer getBasePtr over direct Surface::pixels access.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/animation.cpp | 2 | ||||
-rw-r--r-- | engines/saga/gfx.h | 2 | ||||
-rw-r--r-- | engines/saga/introproc_ihnm.cpp | 8 | ||||
-rw-r--r-- | engines/saga/introproc_saga2.cpp | 2 | ||||
-rw-r--r-- | engines/saga/scene.cpp | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index a99bd66e5e..85f2579138 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -501,7 +501,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) { } anim = getAnimation(animId); - displayBuffer = (byte *)_vm->_render->getBackGroundSurface()->pixels; + displayBuffer = (byte *)_vm->_render->getBackGroundSurface()->getBasePtr(0, 0); if (playing) { anim->state = ANIM_PLAYING; diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h index c677b76324..f3c871e55d 100644 --- a/engines/saga/gfx.h +++ b/engines/saga/gfx.h @@ -201,7 +201,7 @@ public: // Whenever it gets called, the corresponding caller must take care // to add the corresponding dirty rectangle itself byte *getBackBufferPixels() { - return (byte *)_backBuffer.pixels; + return (byte *)_backBuffer.getBasePtr(0, 0); } uint16 getBackBufferWidth() { diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp index 6015e6757a..c21652da7c 100644 --- a/engines/saga/introproc_ihnm.cpp +++ b/engines/saga/introproc_ihnm.cpp @@ -212,7 +212,7 @@ bool Scene::playTitle(int title, int time, int mode) { break; case 2: // display background - _vm->_system->copyRectToScreen(backBufferSurface->pixels, backBufferSurface->w, 0, 0, + _vm->_system->copyRectToScreen(backBufferSurface->getBasePtr(0, 0), backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); phase++; startTime = curTime; @@ -247,7 +247,7 @@ bool Scene::playTitle(int title, int time, int mode) { frameTime = curTime; - _vm->_system->copyRectToScreen(backBufferSurface->pixels, backBufferSurface->w, 0, 0, + _vm->_system->copyRectToScreen(backBufferSurface->getBasePtr(0, 0), backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); } @@ -273,8 +273,8 @@ bool Scene::playTitle(int title, int time, int mode) { _vm->_anim->endVideo(); - memset((byte *)backBufferSurface->pixels, 0, backBufferSurface->w * backBufferSurface->h); - _vm->_system->copyRectToScreen(backBufferSurface->pixels, backBufferSurface->w, 0, 0, + memset((byte *)backBufferSurface->getBasePtr(0, 0), 0, backBufferSurface->w * backBufferSurface->h); + _vm->_system->copyRectToScreen(backBufferSurface->getBasePtr(0, 0), backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); return interrupted; diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index 260eca98e6..9d8295b6de 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -108,7 +108,7 @@ void Scene::playMovie(const char *filename) { if (smkDecoder->needsUpdate()) { const Graphics::Surface *frame = smkDecoder->decodeNextFrame(); if (frame) { - _vm->_system->copyRectToScreen(frame->pixels, frame->pitch, x, y, frame->w, frame->h); + _vm->_system->copyRectToScreen(frame->getBasePtr(0, 0), frame->pitch, x, y, frame->w, frame->h); if (smkDecoder->hasDirtyPalette()) _vm->_system->getPaletteManager()->setPalette(smkDecoder->getPalette(), 0, 256); 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)); } } |