diff options
author | richiesams | 2013-07-26 14:28:08 -0500 |
---|---|---|
committer | richiesams | 2013-08-04 13:32:41 -0500 |
commit | 34b3a788981a94830023946dcc45bc6a1e028805 (patch) | |
tree | 766bcf9b84d0e3cbb3272981d60a5eee6fc0ea79 | |
parent | c8359ad56ca4bf84ac1110ef1ceccbc9d4dc97dd (diff) | |
download | scummvm-rg350-34b3a788981a94830023946dcc45bc6a1e028805.tar.gz scummvm-rg350-34b3a788981a94830023946dcc45bc6a1e028805.tar.bz2 scummvm-rg350-34b3a788981a94830023946dcc45bc6a1e028805.zip |
ZVISION: Fix error causing image discontinutities
The width and height were swapped when passed to the class constructor.
-rw-r--r-- | engines/zvision/render_table.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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 } |