aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/gfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/gfx.h')
-rw-r--r--engines/scumm/gfx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index e4c1054450..88852c8388 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -155,11 +155,11 @@ struct VirtScreen : Graphics::Surface {
}
byte *getPixels(int x, int y) const {
- return (byte *)pixels + xstart + y * pitch + x;
+ return (byte *)pixels + y * pitch + (xstart * 2 + x) * bytesPerPixel;
}
byte *getBackPixels(int x, int y) const {
- return (byte *)backBuf + xstart + y * pitch + x;
+ return (byte *)backBuf + y * pitch + (xstart * 2 + x) * bytesPerPixel;
}
};