HDB: Add AutoAction struct and _autoActions array

This commit is contained in:
Nipun Garg 2019-06-22 05:49:57 +05:30 committed by Eugene Sandulenko
parent 4965fecadc
commit f80550e524
2 changed files with 16 additions and 0 deletions
engines/hdb

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

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