HDB: Add tileDistance() and waypointsLeft()

This commit is contained in:
Nipun Garg 2019-06-28 22:01:09 +05:30 committed by Eugene Sandulenko
parent 14d83c9667
commit 6a6f0e99d8

View File

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