[Scummvm-git-logs] scummvm master -> 69452ccbe91514c7f3f34ee980813ba45bc75435

digitall dgturner at iee.org
Sun Aug 25 09:15:03 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
69452ccbe9 ZVISION: Fix GCC Compiler Warnings


Commit: 69452ccbe91514c7f3f34ee980813ba45bc75435
    https://github.com/scummvm/scummvm/commit/69452ccbe91514c7f3f34ee980813ba45bc75435
Author: D G Turner (digitall at scummvm.org)
Date: 2019-08-25T08:12:31+01:00

Commit Message:
ZVISION: Fix GCC Compiler Warnings

These were from memset usage on non-trivial structures, but were fixed
by directly clearing the Common::Point array.

Changed paths:
    engines/zvision/graphics/render_table.cpp


diff --git a/engines/zvision/graphics/render_table.cpp b/engines/zvision/graphics/render_table.cpp
index 815a1b0..b0c0b92 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;





More information about the Scummvm-git-logs mailing list