aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-28 22:01:09 +0530
committerEugene Sandulenko2019-09-03 17:17:04 +0200
commit6a6f0e99d8810975b2a539589564a1ec5ea6fdd0 (patch)
treef01c931063b678278774ebd45de91e4206216a87 /engines/hdb
parent14d83c9667b3a05b57d8738f0d3eee413ed71797 (diff)
downloadscummvm-rg350-6a6f0e99d8810975b2a539589564a1ec5ea6fdd0.tar.gz
scummvm-rg350-6a6f0e99d8810975b2a539589564a1ec5ea6fdd0.tar.bz2
scummvm-rg350-6a6f0e99d8810975b2a539589564a1ec5ea6fdd0.zip
HDB: Add tileDistance() and waypointsLeft()
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/ai.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 0d3de9cfef..b164161bd1 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -45,7 +45,8 @@ enum {
kEnemyMoveSpeed = 2,
kPushMoveSpeed = (kPlayerMoveSpeed >> 1),
kPlayerTouchPWait = 16,
- kMaxCineGfx = 10
+ kMaxCineGfx = 10,
+ kRunToggleDelay = 2
};
enum AIType {
@@ -729,6 +730,9 @@ public:
void initAllEnts();
void killPlayer(Death method);
void stunEnemy(AIEntity *e, int time);
+ int tileDistance(AIEntity *e1, AIEntity *e2) {
+ return abs(e1->tileX - e2->tileX) + abs(e1->tileY - e2->tileY);
+ }
void animateEntity(AIEntity *e);
void animEntFrames(AIEntity *e);
@@ -885,6 +889,9 @@ public:
void clearWaypoints();
Tile *getStandFrameDir(AIEntity *e);
void drawWayPoints();
+ int waypointsLeft() {
+ return _numWaypoints;
+ }
// Inventory Functions
bool addToInventory(AIEntity *e);