HDB: Add _actions list and related data

This commit is contained in:
Nipun Garg 2019-06-22 06:44:22 +05:30 committed by Eugene Sandulenko
parent 5cba8ae09c
commit 154fc3c7f3
2 changed files with 16 additions and 0 deletions

View File

@ -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));

View File

@ -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