From 34b3a788981a94830023946dcc45bc6a1e028805 Mon Sep 17 00:00:00 2001 From: richiesams Date: Fri, 26 Jul 2013 14:28:08 -0500 Subject: ZVISION: Fix error causing image discontinutities The width and height were swapped when passed to the class constructor. --- engines/zvision/render_table.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/zvision/render_table.cpp b/engines/zvision/render_table.cpp index 3743c42d27..388dc85bcb 100644 --- a/engines/zvision/render_table.cpp +++ b/engines/zvision/render_table.cpp @@ -27,7 +27,7 @@ namespace ZVision { -RenderTable::RenderTable(uint32 numRows, uint32 numColumns) +RenderTable::RenderTable(uint32 numColumns, uint32 numRows) : _numRows(numRows), _numColumns(numColumns), _renderState(RenderState::FLAT) { @@ -97,10 +97,10 @@ void RenderTable::generatePanoramaLookupTable() { for (uint32 y = 0; y < _numRows; y++) { int32 newY = floor(halfHeight + (y - halfHeight) * cosX); - // Panorama images are transposed. Rather than trying to transpose the source, we know - // they will be mutated by this table. Therefore we can swap the axes here uint32 index = y * _numColumns + x; + // Panorama images are transposed. Rather than trying to transpose the source, we know + // they will be mutated by this table. Therefore we can swap the axes here _internalBuffer[index].x = newY; //pixel index _internalBuffer[index].y = newX; //pixel index } -- cgit v1.2.3