diff options
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 4 | ||||
-rw-r--r-- | engines/hdb/ai-init.cpp | 3 | ||||
-rw-r--r-- | engines/hdb/ai-lists.cpp | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 255e0581c5..e13fcc6879 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 32229d9908..0a03d579c7 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 fd6a0fd9c9..27dbc7aff7 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) { |