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 /engines/hdb/ai-funcs.cpp | |
parent | 2cdf2a62decddc21cbb2c5a4d10f74c55ff32c17 (diff) | |
download | scummvm-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.cpp | 7 |
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) |