diff options
author | D G Turner | 2019-08-25 08:12:31 +0100 |
---|---|---|
committer | D G Turner | 2019-08-25 08:12:31 +0100 |
commit | 69452ccbe91514c7f3f34ee980813ba45bc75435 (patch) | |
tree | 4966399ea9dc47bc0fb056c588abde873946151c | |
parent | 50c5177eb002da0d809f16941643a53677ec324c (diff) | |
download | scummvm-rg350-69452ccbe91514c7f3f34ee980813ba45bc75435.tar.gz scummvm-rg350-69452ccbe91514c7f3f34ee980813ba45bc75435.tar.bz2 scummvm-rg350-69452ccbe91514c7f3f34ee980813ba45bc75435.zip |
ZVISION: Fix GCC Compiler Warnings
These were from memset usage on non-trivial structures, but were fixed
by directly clearing the Common::Point array.
-rw-r--r-- | engines/zvision/graphics/render_table.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/zvision/graphics/render_table.cpp b/engines/zvision/graphics/render_table.cpp index 815a1b0f9d..b0c0b92423 100644 --- a/engines/zvision/graphics/render_table.cpp +++ b/engines/zvision/graphics/render_table.cpp @@ -141,7 +141,13 @@ void RenderTable::generateRenderTable() { } void RenderTable::generatePanoramaLookupTable() { - memset(_internalBuffer, 0, _numRows * _numColumns * sizeof(uint16)); + for (uint y = 0; y < _numRows; y++) { + for (uint x = 0; x < _numColumns; x++) { + uint32 index = y * _numColumns + x; + _internalBuffer[index].x = 0; + _internalBuffer[index].y = 0; + } + } float halfWidth = (float)_numColumns / 2.0f; float halfHeight = (float)_numRows / 2.0f; |