aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/menus.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-06-21 03:14:20 +0000
committerTravis Howell2007-06-21 03:14:20 +0000
commit89b2cf75e22fd76b48e9e27d70ba617d5b2468b6 (patch)
tree2acc580f2cac44a4524003665387a9f0b5484185 /engines/agos/menus.cpp
parent3f5eb0f976e3e6cf0d8e4306ffd3767759eb707f (diff)
downloadscummvm-rg350-89b2cf75e22fd76b48e9e27d70ba617d5b2468b6.tar.gz
scummvm-rg350-89b2cf75e22fd76b48e9e27d70ba617d5b2468b6.tar.bz2
scummvm-rg350-89b2cf75e22fd76b48e9e27d70ba617d5b2468b6.zip
Use frameBuffer directly, in order to drop extra buffer (frontBuffer) and cleanup code.
svn-id: r27577
Diffstat (limited to 'engines/agos/menus.cpp')
-rw-r--r--engines/agos/menus.cpp13
1 files changed, 11 insertions, 2 deletions
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();
}