From 154fc3c7f3241f75c2d601e097c692f1b084fa3c Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 22 Jun 2019 06:44:22 +0530 Subject: HDB: Add _actions list and related data --- 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 b40b7ff170..18196b8d4a 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -823,6 +823,9 @@ void AI::restartSystem() { memset(_clubLeftGfx, NULL, kMaxAnimFrames * sizeof(Tile *)); memset(_clubRightGfx, NULL, kMaxAnimFrames * sizeof(Tile *)); + // Clear the Action list + memset(_actions, 0, sizeof(_actions)); + // Clear the Auto-Action list memset(_autoActions, 0, sizeof(_autoActions)); diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index aff84760bc..d11442bc07 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -35,6 +35,7 @@ enum { kMaxInventory = 10, kMaxDeliveries = 5, kMaxWaypoints = 10, + kMaxActions = 20, kMaxAutoActions = 30, kPlayerMoveSpeed = 4, kEnemyMoveSpeed = 2, @@ -561,6 +562,16 @@ struct Waypoint { Waypoint() : x(0), y(0), level(0) {} }; +struct ActionInfo { + uint16 x1, y1; + uint16 x2, y2; + char luaFuncInit[32]; + char luaFuncUse[32]; + char entityName[32]; + + ActionInfo() : x1(0), y1(0), x2(0), y2(0), luaFuncInit(""), luaFuncUse(""), entityName("") {} +}; + struct AutoAction { uint16 x, y; bool activated; @@ -875,6 +886,8 @@ public: int _numWaypoints; Tile *_waypointGfx[4]; // Animating waypoint gfx + ActionInfo *_actions[kMaxActions]; + AutoAction *_autoActions[kMaxAutoActions]; // Virtual Player -- cgit v1.2.3