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_pn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/agos/vga_pn.cpp') diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp index 1e7b2ba060..dc364cd99b 100644 --- a/engines/agos/vga_pn.cpp +++ b/engines/agos/vga_pn.cpp @@ -155,7 +155,7 @@ void AGOSEngine::vc48_specialEffect() { if (getPlatform() == Common::kPlatformDOS) { if (num == 1) { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->pixels; + byte *dst = (byte *)screen->getBasePtr(0, 0); for (uint h = 0; h < _screenHeight; h++) { for (uint w = 0; w < _screenWidth; w++) { @@ -205,7 +205,7 @@ void AGOSEngine_PN::clearVideoWindow(uint16 num, uint16 color) { uint16 yoffs = vlut[1]; Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->pixels + xoffs + yoffs * screen->pitch; + byte *dst = (byte *)screen->getBasePtr(xoffs, yoffs); for (uint h = 0; h < vlut[3]; h++) { memset(dst, color, vlut[2] * 16); dst += screen->pitch; -- cgit v1.2.3 From 01daff0f1d5f222e7b892f3068e7ef6880b40346 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Aug 2013 02:36:55 +0200 Subject: AGOS: Take advantage of Surface::getPixels. --- engines/agos/vga_pn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agos/vga_pn.cpp') diff --git a/engines/agos/vga_pn.cpp b/engines/agos/vga_pn.cpp index dc364cd99b..b7f80ebf91 100644 --- a/engines/agos/vga_pn.cpp +++ b/engines/agos/vga_pn.cpp @@ -155,7 +155,7 @@ void AGOSEngine::vc48_specialEffect() { if (getPlatform() == Common::kPlatformDOS) { if (num == 1) { Graphics::Surface *screen = _system->lockScreen(); - byte *dst = (byte *)screen->getBasePtr(0, 0); + byte *dst = (byte *)screen->getPixels(); for (uint h = 0; h < _screenHeight; h++) { for (uint w = 0; w < _screenWidth; w++) { -- cgit v1.2.3