diff options
author | Nipun Garg | 2019-06-25 00:34:08 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:59 +0200 |
commit | 1bfa1c1d0e82dec80177e39aed0f7c2885ecaac4 (patch) | |
tree | 3a7810d2173afbdbe8c98b9234ec67abc29c039e /engines/hdb/ai-lists.cpp | |
parent | ace7d2754616ce0df48bd1314095d0e8907d729a (diff) | |
download | scummvm-rg350-1bfa1c1d0e82dec80177e39aed0f7c2885ecaac4.tar.gz scummvm-rg350-1bfa1c1d0e82dec80177e39aed0f7c2885ecaac4.tar.bz2 scummvm-rg350-1bfa1c1d0e82dec80177e39aed0f7c2885ecaac4.zip |
HDB: Add addToPathList() and findArrowPath()
Diffstat (limited to 'engines/hdb/ai-lists.cpp')
-rw-r--r-- | engines/hdb/ai-lists.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index 174729bf66..d47bae7eab 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -418,4 +418,23 @@ bool AI::autoActive(int x, int y) { return false; } +void AI::addToPathList(int x, int y, int type, AIDir dir) { + ArrowPath *arrowPath = new ArrowPath; + + arrowPath->type = type; + arrowPath->tileX = x; + arrowPath->tileX = y; + arrowPath->dir = dir; + + _arrowPaths->push_back(arrowPath); +} + +ArrowPath *AI::findArrowPath(int x, int y) { + for (Common::Array<ArrowPath *>::iterator it = _arrowPaths->begin(); it != _arrowPaths->end(); it++) { + if ((*it)->tileX == x && (*it)->tileY == y) + return *it; + } + return NULL; +} + } // End of Namespace |