aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/ai-lists.cpp19
-rw-r--r--engines/hdb/ai.h2
2 files changed, 21 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
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index fec57834a6..b5cf719fd0 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -672,6 +672,8 @@ public:
bool activateAction(AIEntity *e, int x, int y, int targetX, int targetY);
bool checkAutoList(AIEntity *e, int x, int y);
bool autoActive(int x, int y);
+ void addToPathList(int x, int y, int type, AIDir dir);
+ ArrowPath *findArrowPath(int x, int y);
bool checkFloating(int x, int y);