diff options
author | Nipun Garg | 2019-06-22 05:49:57 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:54 +0200 |
commit | f80550e5246d4cef4e7b36cf4f52977219c972f8 (patch) | |
tree | 4a5842d182c9873d14af367565cd711fa206c6d5 | |
parent | 4965fecadc612b5e55a3fb2e6b6690764dd86d16 (diff) | |
download | scummvm-rg350-f80550e5246d4cef4e7b36cf4f52977219c972f8.tar.gz scummvm-rg350-f80550e5246d4cef4e7b36cf4f52977219c972f8.tar.bz2 scummvm-rg350-f80550e5246d4cef4e7b36cf4f52977219c972f8.zip |
HDB: Add AutoAction struct and _autoActions array
-rw-r--r-- | engines/hdb/ai-init.cpp | 3 | ||||
-rw-r--r-- | engines/hdb/ai.h | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index 76c794457f..65240d1d19 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -820,6 +820,9 @@ void AI::restartSystem() { memset(_clubLeftGfx, NULL, kMaxAnimFrames * sizeof(Tile *)); memset(_clubRightGfx, NULL, kMaxAnimFrames * sizeof(Tile *)); + // Clear the Auto-Action list + memset(_autoActions, 0, sizeof(_autoActions)); + // Clear the Entity List _ents->clear(); diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index b6a7094450..9327bae3e8 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -34,6 +34,7 @@ enum { kMaxInventory = 10, kMaxDeliveries = 5, kMaxWaypoints = 10, + kMaxAutoActions = 30, kPlayerMoveSpeed = 4, kEnemyMoveSpeed = 2, kPushMoveSpeed = (kPlayerMoveSpeed >> 1) @@ -536,6 +537,16 @@ struct Waypoint { Waypoint() : x(0), y(0), level(0) {} }; +struct AutoAction { + uint16 x, y; + bool activated; + char luaFuncInit[32]; + char luaFuncUse[32]; + char entityName[32]; + + AutoAction() : x(0), y(0), activated(false), luaFuncInit(""), luaFuncUse(""), entityName("") {} +}; + struct CineCommand { CineType cmdType; double x, y; @@ -829,6 +840,8 @@ public: int _numWaypoints; Tile *_waypointGfx[4]; // Animating waypoint gfx + AutoAction *_autoActions[kMaxAutoActions]; + // Cinematic Variables Common::Array<CineCommand *> _cine; |