aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/ai-lists.cpp
diff options
context:
space:
mode:
authorNipun Garg2019-06-25 00:34:08 +0530
committerEugene Sandulenko2019-09-03 17:16:59 +0200
commit1bfa1c1d0e82dec80177e39aed0f7c2885ecaac4 (patch)
tree3a7810d2173afbdbe8c98b9234ec67abc29c039e /engines/hdb/ai-lists.cpp
parentace7d2754616ce0df48bd1314095d0e8907d729a (diff)
downloadscummvm-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.cpp19
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