From 3fd5a8ab5a626998a358282e3af7668f3bdd9403 Mon Sep 17 00:00:00 2001 From: richiesams Date: Sat, 3 Aug 2013 17:24:44 -0500 Subject: ZVISION: Offset the RenderTable index by the normalized coords, not the subRect coords --- engines/zvision/render_table.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') 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; -- cgit v1.2.3