aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorRichieSams2013-09-24 17:32:58 -0500
committerRichieSams2013-09-24 17:34:34 -0500
commitdfb37fb2f0f38b489d15df56ae71b261d0c0229c (patch)
treeee8d02e8da6041252ddba1dd02656e69759cd7c0 /engines
parent29db14c7ddac3ba0afbe9f40c3f9219392c86f53 (diff)
downloadscummvm-rg350-dfb37fb2f0f38b489d15df56ae71b261d0c0229c.tar.gz
scummvm-rg350-dfb37fb2f0f38b489d15df56ae71b261d0c0229c.tar.bz2
scummvm-rg350-dfb37fb2f0f38b489d15df56ae71b261d0c0229c.zip
ZVISION: Remove CLIPs from mutateImage
Due to the math of the Panorama/Tilt, all pixel offsets are going to be closer to the center of the image. Also, mutateImage is now being called on a finished buffer, rather than an image at a time. Therefore, it no longer has to handle image wrapping. Thus, there is no case in which a pixel offset would be outside the image bounds.
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/render_table.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/engines/zvision/render_table.cpp b/engines/zvision/render_table.cpp
index dc5ebdb791..19f95a5d8f 100644
--- a/engines/zvision/render_table.cpp
+++ b/engines/zvision/render_table.cpp
@@ -113,12 +113,6 @@ void RenderTable::mutateImage(uint16 *sourceBuffer, uint16* destBuffer, uint32 d
// RenderTable only stores offsets from the original coordinates
uint32 sourceYIndex = y + _internalBuffer[index].y;
uint32 sourceXIndex = x + _internalBuffer[index].x;
-
- // Clamp the yIndex to the size of the image
- sourceYIndex = CLIP<uint32>(sourceYIndex, 0, _numRows - 1);
-
- // Clamp the xIndex to the size of the image
- sourceXIndex = CLIP<uint32>(sourceXIndex, 0, _numColumns - 1);
destBuffer[destOffset + normalizedX] = sourceBuffer[sourceYIndex * _numColumns + sourceXIndex];
}