From 89b2cf75e22fd76b48e9e27d70ba617d5b2468b6 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 21 Jun 2007 03:14:20 +0000 Subject: Use frameBuffer directly, in order to drop extra buffer (frontBuffer) and cleanup code. svn-id: r27577 --- engines/agos/menus.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'engines/agos/menus.cpp') diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp index 802752fad9..6dd1a356d8 100644 --- a/engines/agos/menus.cpp +++ b/engines/agos/menus.cpp @@ -26,6 +26,9 @@ #include "common/stdafx.h" #include "common/file.h" +#include "common/system.h" + +#include "graphics/surface.h" #include "agos/agos.h" #include "agos/intern.h" @@ -145,7 +148,8 @@ void AGOSEngine::unlightMenuStrip() { mouseOff(); - src = getFrontBuf() + 2832; + Graphics::Surface *screen = _system->lockScreen(); + src = (byte *)screen->pixels + 2832; w = 48; h = 82; @@ -160,6 +164,8 @@ void AGOSEngine::unlightMenuStrip() { for (i = 120; i != 130; i++) disableBox(i); + _system->unlockScreen(); + mouseOn(); } @@ -170,7 +176,8 @@ void AGOSEngine::lightMenuBox(uint hitarea) { mouseOff(); - src = getFrontBuf() + ha->y * _dxSurfacePitch + ha->x; + Graphics::Surface *screen = _system->lockScreen(); + src = (byte *)screen->pixels + ha->y * _dxSurfacePitch + ha->x; w = ha->width; h = ha->height; @@ -182,6 +189,8 @@ void AGOSEngine::lightMenuBox(uint hitarea) { src += _dxSurfacePitch; } while (--h); + _system->unlockScreen(); + mouseOn(); } -- cgit v1.2.3