From 43f6a0a475dfd403db80c3645029f8f20e14ca2b Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 22 Jun 2019 08:55:27 +0530 Subject: HDB: Add checkForTouchplate() --- engines/hdb/ai-funcs.cpp | 7 +++++++ engines/hdb/ai.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'engines') diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 6eadc92942..9faafe1bf6 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1220,6 +1220,13 @@ void AI::animGrabbing() { _player->animFrame = 5; } +int AI::checkForTouchplate(int x, int y) { + int tileIndex = g_hdb->_map->getMapBGTileIndex(x, y); + if (tileIndex == _touchplateOff || tileIndex == _templeTouchpOff) + return tileIndex; + return 0; +} + bool AI::checkFloating(int x, int y) { for (Common::Array::iterator it = _floats->begin(); it != _floats->end(); it++) { if ((*it)->tileX == x && (*it)->tileY == y) diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index f67fbd7849..632a9559b3 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -626,6 +626,8 @@ public: void drawEnts(int x, int y, int w, int h); void animGrabbing(); + int checkForTouchplate(int x, int y); + void addAnimateTarget(int x, int y, int start, int end, AnimSpeed speed, bool killAuto, bool inMap, const char *tileName); void animateTargets(); -- cgit v1.2.3