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/vga_e2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/agos/vga_e2.cpp') diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index d4aafd3d7b..b335c6b18a 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -76,7 +76,7 @@ void AGOSEngine::vc45_setWindowPalette() { uint8 height = vlut[3]; if (num == 4) { - byte *dst = (byte *)_window4BackScn->pixels; + byte *dst = (byte *)_window4BackScn->getBasePtr(0, 0); for (uint8 h = 0; h < height; h++) { for (uint8 w = 0; w < width; w++) { @@ -223,11 +223,11 @@ void AGOSEngine::vc53_dissolveIn() { uint16 count = dissolveCheck * 2; while (count--) { Graphics::Surface *screen = _system->lockScreen(); - byte *dstPtr = (byte *)screen->pixels + x + y * screen->pitch; + byte *dstPtr = (byte *)screen->getBasePtr(x, y); yoffs = _rnd.getRandomNumber(dissolveY); dst = dstPtr + yoffs * screen->pitch; - src = (byte *)_window4BackScn->pixels + yoffs * _window4BackScn->pitch; + src = (byte *)_window4BackScn->getBasePtr(0, yoffs); xoffs = _rnd.getRandomNumber(dissolveX); dst += xoffs; @@ -296,7 +296,7 @@ void AGOSEngine::vc54_dissolveOut() { uint16 count = dissolveCheck * 2; while (count--) { Graphics::Surface *screen = _system->lockScreen(); - byte *dstPtr = (byte *)screen->pixels + x + y * screen->pitch; + byte *dstPtr = (byte *)screen->getBasePtr(x, y); color |= dstPtr[0] & 0xF0; yoffs = _rnd.getRandomNumber(dissolveY); @@ -378,7 +378,7 @@ void AGOSEngine::fullFade() { void AGOSEngine::vc56_fullScreen() { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->pixels; + byte *dst = (byte *)screen->getBasePtr(0, 0); byte *src = _curVgaFile2 + 800; for (int i = 0; i < _screenHeight; i++) { -- cgit v1.2.3