diff options
author | Nipun Garg | 2019-06-22 08:55:27 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:55 +0200 |
commit | 43f6a0a475dfd403db80c3645029f8f20e14ca2b (patch) | |
tree | 2021b0e50f5432487a296a8cc5d7fb4ce7dc5250 | |
parent | 2cdf2a62decddc21cbb2c5a4d10f74c55ff32c17 (diff) | |
download | scummvm-rg350-43f6a0a475dfd403db80c3645029f8f20e14ca2b.tar.gz scummvm-rg350-43f6a0a475dfd403db80c3645029f8f20e14ca2b.tar.bz2 scummvm-rg350-43f6a0a475dfd403db80c3645029f8f20e14ca2b.zip |
HDB: Add checkForTouchplate()
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 7 | ||||
-rw-r--r-- | engines/hdb/ai.h | 2 |
2 files changed, 9 insertions, 0 deletions
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<AIEntity *>::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(); |