aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga_s2.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-07 12:24:59 -0700
committerJohannes Schickel2013-08-07 12:24:59 -0700
commit7f8308e0eb50c4e13ec0684619b5474983a93a66 (patch)
tree0a057f01385a11d99add1e294f70891a8e8bf6c9 /engines/agos/vga_s2.cpp
parent6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c (diff)
parente5f0c42a65f38611272542a144228753e0496493 (diff)
downloadscummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.tar.gz
scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.tar.bz2
scummvm-rg350-7f8308e0eb50c4e13ec0684619b5474983a93a66.zip
Merge pull request #365 from lordhoto/protected-pixels
Make Graphics::Surface::pixels protected.
Diffstat (limited to 'engines/agos/vga_s2.cpp')
-rw-r--r--engines/agos/vga_s2.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/agos/vga_s2.cpp b/engines/agos/vga_s2.cpp
index 9b9ed4e297..e0780b491a 100644
--- a/engines/agos/vga_s2.cpp
+++ b/engines/agos/vga_s2.cpp
@@ -213,7 +213,10 @@ void AGOSEngine_Simon2::clearVideoWindow(uint16 num, uint16 color) {
uint16 xoffs = vlut[0] * 16;
uint16 yoffs = vlut[1];
uint16 dstWidth = _videoWindows[18] * 16;
- byte *dst = (byte *)_window4BackScn->pixels + xoffs + yoffs * dstWidth;
+ // TODO: Is there any known connection between dstWidth and the pitch
+ // of the _window4BackScn Surface? If so, we might be able to pass
+ // yoffs as proper y parameter to getBasePtr.
+ byte *dst = (byte *)_window4BackScn->getBasePtr(xoffs, 0) + yoffs * dstWidth;
setMoveRect(0, 0, vlut[2] * 16, vlut[3]);