From f80550e5246d4cef4e7b36cf4f52977219c972f8 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 22 Jun 2019 05:49:57 +0530 Subject: HDB: Add AutoAction struct and _autoActions array --- engines/hdb/ai-init.cpp | 3 +++ engines/hdb/ai.h | 13 +++++++++++++ 2 files changed, 16 insertions(+) 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 _cine; -- cgit v1.2.3