aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/verb.cpp
diff options
context:
space:
mode:
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;
}