diff options
author | Nipun Garg | 2019-07-03 22:41:07 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:10 +0200 |
commit | ffe05e989b04f0d11e034e84a47cbbfe8d1597c6 (patch) | |
tree | 0a56c8d20ba42075bd32c00730265c2e1b7adae2 | |
parent | 1cd0a8d9368965eb77666a8d17ede2097a43655c (diff) | |
download | scummvm-rg350-ffe05e989b04f0d11e034e84a47cbbfe8d1597c6.tar.gz scummvm-rg350-ffe05e989b04f0d11e034e84a47cbbfe8d1597c6.tar.bz2 scummvm-rg350-ffe05e989b04f0d11e034e84a47cbbfe8d1597c6.zip |
HDB: Add checkForTouchplate()
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 7 | ||||
-rw-r--r-- | engines/hdb/ai.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index f16c1f05b6..bc1e9924ce 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -661,6 +661,13 @@ void AI::setLuaAnimFrame(const char *initName, AIState st, int frame) { } } +int AI::checkForTouchplate(int x, int y) { + int tileIndex = g_hdb->_map->getMapBGTileIndex(x, y); + if (tileIndex == _touchplateOff || tileIndex == _templeTouchpOff) + return tileIndex; + return 0; +} + void AI::removeEntity(AIEntity *e) { _ents->erase(&e); } diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 14495b3c8b..22032f2f33 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -787,6 +787,7 @@ public: void removeLuaEntity(const char *initName); void animLuaEntity(const char *initName, AIState st); void setLuaAnimFrame(const char *initName, AIState st, int frame); + int checkForTouchplate(int x, int y); void removeEntity(AIEntity *e); void setEntityGoal(AIEntity *e, int x, int y); void initAllEnts(); |