aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-06-25 09:22:56 +0530
committerEugene Sandulenko2019-09-03 17:17:00 +0200
commita65936283d8fd6a8f6cfedf122d0f0c41d5f9e59 (patch)
tree202a90b597994b744d03596bd2672c803dce8197 /engines
parent43e738ec1798b1f7a3ded8feb6b9108f636e1c1d (diff)
downloadscummvm-rg350-a65936283d8fd6a8f6cfedf122d0f0c41d5f9e59.tar.gz
scummvm-rg350-a65936283d8fd6a8f6cfedf122d0f0c41d5f9e59.tar.bz2
scummvm-rg350-a65936283d8fd6a8f6cfedf122d0f0c41d5f9e59.zip
HDB: Add _hereList functions
Diffstat (limited to 'engines')
-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);