[Scummvm-git-logs] scummvm master -> cb88db65cdff4302dd5952a0ed2a048ba5ef489a

digitall dgturner at iee.org
Wed Sep 4 20:49:25 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:
cb88db65cd HDB: Fix Some GCC Compiler Warnings


Commit: cb88db65cdff4302dd5952a0ed2a048ba5ef489a
    https://github.com/scummvm/scummvm/commit/cb88db65cdff4302dd5952a0ed2a048ba5ef489a
Author: D G Turner (digitall at scummvm.org)
Date: 2019-09-04T19:47:15+01:00

Commit Message:
HDB: Fix Some GCC Compiler Warnings

Changed paths:
    engines/hdb/ai-funcs.cpp
    engines/hdb/ai-init.cpp
    engines/hdb/ai-lists.cpp


diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 255e058..e13fcc6 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -1100,7 +1100,7 @@ void AI::animateEntity(AIEntity *e) {
 			if ((e->tileX + xOff == _waypoints[_numWaypoints - 1].x &&
 				 e->tileY + yOff == _waypoints[_numWaypoints - 1].y) &&
 				 e->level == _waypoints[_numWaypoints - 1].level) {
-				memset(&_waypoints[0], 0, sizeof(_waypoints));
+				clearWaypoints();
 				_numWaypoints = 1;
 				_waypoints[0].x = e->tileX + xOff;
 				_waypoints[0].y = e->tileY + yOff;
@@ -1795,7 +1795,7 @@ void AI::drawEnts(int x, int y, int w, int h) {
 			e->onScreen = 0;
 			debugN(5, "not on screen");
 		}
-		debug(5, ""); // newline
+		debug(5, "%s", ""); // newline
 	}
 
 	if (stunTimer < g_hdb->getTimeSlice()) {
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index 32229d9..0a03d57 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -1190,8 +1190,7 @@ void AI::restartSystem() {
 	_numBridges = 0;
 
 	// Clear waypoints
-	memset(&_waypoints[0], 0, sizeof(_waypoints));
-	_numWaypoints = 0;
+	clearWaypoints();
 
 	// Clean up Player Graphics Storage
 	memset(_horrible1Gfx, 0, sizeof(_horrible1Gfx));
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp
index fd6a0fd..27dbc7a 100644
--- a/engines/hdb/ai-lists.cpp
+++ b/engines/hdb/ai-lists.cpp
@@ -730,8 +730,7 @@ bool AI::checkTeleportList(AIEntity *e, int x, int y) {
 
 			e->draw = e->standdownGfx[0];
 			if (e == _player) {
-				memset(&_waypoints[0], 0, sizeof(_waypoints));
-				_numWaypoints = 0;
+				clearWaypoints();
 			}
 
 			switch (e->dir) {





More information about the Scummvm-git-logs mailing list