From dfb37fb2f0f38b489d15df56ae71b261d0c0229c Mon Sep 17 00:00:00 2001 From: RichieSams Date: Tue, 24 Sep 2013 17:32:58 -0500 Subject: 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. --- engines/zvision/render_table.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'engines') 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(sourceYIndex, 0, _numRows - 1); - - // Clamp the xIndex to the size of the image - sourceXIndex = CLIP(sourceXIndex, 0, _numColumns - 1); destBuffer[destOffset + normalizedX] = sourceBuffer[sourceYIndex * _numColumns + sourceXIndex]; } -- cgit v1.2.3