aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-21 19:45:36 +0530
committerEugene Sandulenko2019-09-03 17:16:54 +0200
commit76b589c9018b4a19cb636d404285594dbe3b3698 (patch)
tree60a29e3bd95d40d0e6c3d6c495029cde5ac7cd62
parentb6520708a5d1303fecf8b12ab7e21c15d6be0265 (diff)
downloadscummvm-rg350-76b589c9018b4a19cb636d404285594dbe3b3698.tar.gz
scummvm-rg350-76b589c9018b4a19cb636d404285594dbe3b3698.tar.bz2
scummvm-rg350-76b589c9018b4a19cb636d404285594dbe3b3698.zip
HDB: Add checkFloating()
-rw-r--r--engines/hdb/ai-funcs.cpp8
-rw-r--r--engines/hdb/ai.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp
index 9bbcf9d329..1c25198e37 100644
--- a/engines/hdb/ai-funcs.cpp
+++ b/engines/hdb/ai-funcs.cpp
@@ -1015,6 +1015,14 @@ void AI::drawEnts(int x, int y, int w, int h) {
}
}
+bool AI::checkFloating(int x, int y) {
+ for (Common::Array<AIEntity *>::iterator it = _floats->begin(); it != _floats->end(); it++) {
+ if ((*it)->tileX == x && (*it)->tileY == y)
+ return true;
+ }
+ return false;
+}
+
// Check to see if we can get this entity
bool AI::getTableEnt(AIType type) {
switch (type) {
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index c29f1c8ad8..b6b9b4a612 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -565,6 +565,8 @@ public:
void animLuaEntity(const char *initName, AIState st);
void drawEnts(int x, int y, int w, int h);
+ bool checkFloating(int x, int y);
+
bool getTableEnt(AIType type);
bool walkThroughEnt(AIType type);
void getItemSound(AIType type);