ZVISION: Offset the RenderTable index by the normalized coords, not the subRect coords

This commit is contained in:
richiesams 2013-08-03 17:24:44 -05:00
parent d89a55d3de
commit 3fd5a8ab5a

View File

@ -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;