diff options
author | Nipun Garg | 2019-06-20 17:34:22 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:51 +0200 |
commit | d6852227e8bf0b028883929718174ecc9d04e9a0 (patch) | |
tree | c707ad133b1576d348378a9e73246f45c390be4c | |
parent | e7c72d05808bc8276797e6b580592ab8c2ae00c9 (diff) | |
download | scummvm-rg350-d6852227e8bf0b028883929718174ecc9d04e9a0.tar.gz scummvm-rg350-d6852227e8bf0b028883929718174ecc9d04e9a0.tar.bz2 scummvm-rg350-d6852227e8bf0b028883929718174ecc9d04e9a0.zip |
HDB: Add Waypoint data
Addition includes constants, structs and member
variables
-rw-r--r-- | engines/hdb/ai-init.cpp | 4 | ||||
-rw-r--r-- | engines/hdb/ai.h | 9 |
2 files changed, 13 insertions, 0 deletions
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; |