aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/ai-funcs.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-06-22 08:55:27 +0530
committerEugene Sandulenko2019-09-03 17:16:55 +0200
commit43f6a0a475dfd403db80c3645029f8f20e14ca2b (patch)
tree2021b0e50f5432487a296a8cc5d7fb4ce7dc5250 /engines/hdb/ai-funcs.cpp
parent2cdf2a62decddc21cbb2c5a4d10f74c55ff32c17 (diff)
downloadscummvm-rg350-43f6a0a475dfd403db80c3645029f8f20e14ca2b.tar.gz
scummvm-rg350-43f6a0a475dfd403db80c3645029f8f20e14ca2b.tar.bz2
scummvm-rg350-43f6a0a475dfd403db80c3645029f8f20e14ca2b.zip
HDB: Add checkForTouchplate()
Diffstat (limited to 'engines/hdb/ai-funcs.cpp')
-rw-r--r--engines/hdb/ai-funcs.cpp7
1 files changed, 7 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)