From d6852227e8bf0b028883929718174ecc9d04e9a0 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Thu, 20 Jun 2019 17:34:22 +0530 Subject: HDB: Add Waypoint data Addition includes constants, structs and member variables --- engines/hdb/ai-init.cpp | 4 ++++ engines/hdb/ai.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index b7f7a485f8..812b51043f 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -704,5 +704,9 @@ void AI::restartSystem() { // Clear Cinematic System _cineActive = _cameraLock = _playerLock = _cineAborted = false; + + // Clear waypoints + memset(&_waypoints[0], 0, sizeof(_waypoints)); + _numWaypoints = 0; } } // End of Namespace diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 1c6de5ff24..9d0a428709 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -32,6 +32,7 @@ enum { kMaxDeathFrames = 12, kMaxInventory = 10, kMaxDeliveries = 5, + kMaxWaypoints = 10, kPlayerMoveSpeed = 4, kEnemyMoveSpeed = 2, kPushMoveSpeed = (kPlayerMoveSpeed >> 1) @@ -423,6 +424,10 @@ struct InvEnt { AIEntity ent; }; +struct Waypoint { + int x, y, level; +}; + struct CineCommand { CineType cmdType; double x, y; @@ -622,6 +627,10 @@ private: InvEnt _inventory[kMaxInventory]; int _numInventory; + Waypoint _waypoints[kMaxWaypoints]; + int _numWaypoints; + Tile *_waypointGfx[4]; // Animating waypoint gfx + // Cinematics Variables bool _cineAbortable; bool _cineAborted; -- cgit v1.2.3