aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/verb.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/verb.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/verb.cpp')
-rw-r--r--engines/agos/verb.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/agos/verb.cpp b/engines/agos/verb.cpp
index 8c898cfaeb..f99d6db591 100644
--- a/engines/agos/verb.cpp
+++ b/engines/agos/verb.cpp
@@ -26,6 +26,10 @@
// Verb and hitarea handling
#include "common/stdafx.h"
+#include "common/system.h"
+
+#include "graphics/surface.h"
+
#include "agos/agos.h"
#include "agos/intern.h"
@@ -832,7 +836,9 @@ void AGOSEngine::invertBox(HitArea * ha, byte a, byte b, byte c, byte d) {
int w, h, i;
_lockWord |= 0x8000;
- src = getFrontBuf() + ha->y * _dxSurfacePitch + ha->x;
+
+ Graphics::Surface *screen = _system->lockScreen();
+ src = (byte *)screen->pixels + ha->y * _dxSurfacePitch + ha->x;
// WORKAROUND: Hitareas for saved game names aren't adjusted for scrolling locations
if (getGameType() == GType_SIMON2 && ha->id >= 208 && ha->id <= 213) {
@@ -875,6 +881,8 @@ void AGOSEngine::invertBox(HitArea * ha, byte a, byte b, byte c, byte d) {
src += _dxSurfacePitch;
} while (--h);
+ _system->unlockScreen();
+
_lockWord &= ~0x8000;
}