aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-22 06:44:22 +0530
committerEugene Sandulenko2019-09-03 17:16:55 +0200
commit154fc3c7f3241f75c2d601e097c692f1b084fa3c (patch)
tree1acb83272e476910df51cbcfd143b92961c821ef
parent5cba8ae09c14b49ebfd2c060f7cae67b9def749a (diff)
downloadscummvm-rg350-154fc3c7f3241f75c2d601e097c692f1b084fa3c.tar.gz
scummvm-rg350-154fc3c7f3241f75c2d601e097c692f1b084fa3c.tar.bz2
scummvm-rg350-154fc3c7f3241f75c2d601e097c692f1b084fa3c.zip
HDB: Add _actions list and related data
-rw-r--r--engines/hdb/ai-init.cpp3
-rw-r--r--engines/hdb/ai.h13
2 files changed, 16 insertions, 0 deletions
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