aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/draw.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index 9be0691853..876f523121 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -323,7 +323,8 @@ restart:
h = 1;
if (vsp->image != 0) {
- const byte *ptr = _curVgaFile2 + vsp->image * 8;
+ VgaPointersEntry *vpe = &_vgaBufferPointers[vsp->zoneNum];
+ const byte *ptr = vpe->vgaFile2 + vsp->image * 8;
w = READ_BE_UINT16(ptr + 6) / 8;
h = ptr[5];
}
@@ -362,7 +363,8 @@ void AGOSEngine::dirtyClipCheck(int16 x, int16 y, int16 w, int16 h) {
if (vsp->image == 0)
continue;
- const byte *ptr = _curVgaFile2 + vsp->image * 8;
+ VgaPointersEntry *vpe = &_vgaBufferPointers[vsp->zoneNum];
+ const byte *ptr = vpe->vgaFile2 + vsp->image * 8;
width = READ_BE_UINT16(ptr + 6) / 8;
height = ptr[5];