aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichiesams2013-08-03 17:24:44 -0500
committerrichiesams2013-08-04 13:33:11 -0500
commit3fd5a8ab5a626998a358282e3af7668f3bdd9403 (patch)
tree4e0fd8cfdf05ef72dfbe8fed3e4d6d08779c6e94
parentd89a55d3deb703c23c6bb111c256a11ba17c5faf (diff)
downloadscummvm-rg350-3fd5a8ab5a626998a358282e3af7668f3bdd9403.tar.gz
scummvm-rg350-3fd5a8ab5a626998a358282e3af7668f3bdd9403.tar.bz2
scummvm-rg350-3fd5a8ab5a626998a358282e3af7668f3bdd9403.zip
ZVISION: Offset the RenderTable index by the normalized coords, not the subRect coords
-rw-r--r--engines/zvision/render_table.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/zvision/render_table.cpp b/engines/zvision/render_table.cpp
index 531114cdbe..55c11ec4ba 100644
--- a/engines/zvision/render_table.cpp
+++ b/engines/zvision/render_table.cpp
@@ -90,7 +90,7 @@ void RenderTable::mutateImage(uint16 *sourceBuffer, uint16* destBuffer, uint32 i
for (int x = subRectangle.left; x < subRectangle.right; x++) {
uint normalizedX = x - subRectangle.left;
- uint32 index = (y + destRectangle.top) * _numColumns + (x + destRectangle.left);
+ uint32 index = (normalizedY + destRectangle.top) * _numColumns + (normalizedX + destRectangle.left);
// RenderTable only stores offsets from the original coordinates
uint32 sourceYIndex = y + _internalBuffer[index].y;