aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/ai-lists.cpp16
-rw-r--r--engines/hdb/ai.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp
index d47bae7eab..e2961029a4 100644
--- a/engines/hdb/ai-lists.cpp
+++ b/engines/hdb/ai-lists.cpp
@@ -223,6 +223,22 @@ bool AI::checkActionList(AIEntity *e, int x, int y, bool lookAndGrab) {
return false;
}
+void AI::addToHereList(const char *entName, int x, int y) {
+ HereT *h = new HereT;
+ strcpy(h->entName, entName);
+ h->x = x;
+ h->y = y;
+ _hereList->push_back(h);
+}
+
+HereT *AI::findHere(int x, int y) {
+ for (Common::Array<HereT *>::iterator it = _hereList->begin(); it != _hereList->end(); it++) {
+ if ((*it)->x == x && (*it)->y == y)
+ return *it;
+ }
+ return NULL;
+}
+
void AI::addToAutoList(int x, int y, const char *luaFuncInit, const char *luaFuncUse) {
const char *get;
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index 4c59ac69a6..7a3038b834 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -673,6 +673,8 @@ public:
// List functions
void addToActionList(int actionIndex, int x, int y, char *funcLuaInit, char *funcLuaUse);
bool checkActionList(AIEntity *e, int x, int y, bool lookAndGrab);
+ void addToHereList(const char *entName, int x, int y);
+ HereT *findHere(int x, int y);
void addToAutoList(int x, int y, const char *luaFuncInt, const char *luaFuncUse);
void autoDeactivate(int x, int y);
bool activateAction(AIEntity *e, int x, int y, int targetX, int targetY);