aboutsummaryrefslogtreecommitdiff
path: root/engines/wage/entities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wage/entities.cpp')
-rw-r--r--engines/wage/entities.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index 49e2592949..d0a838f1e7 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -202,6 +202,22 @@ const char *Scene::getFontName() {
return "Unknown";
}
+Designed *Scene::lookUpEntity(int x, int y) {
+ for (ObjList::const_iterator it = _objs.end(); it != _objs.begin(); ) {
+ it--;
+ if ((*it)->_design->isPointOpaque(x, y))
+ return *it;
+ }
+
+ for (ChrList::const_iterator it = _chrs.end(); it != _chrs.begin(); ) {
+ it--;
+ if ((*it)->_design->isPointOpaque(x, y))
+ return *it;
+ }
+
+ return nullptr;
+}
+
Obj::Obj() : _currentOwner(NULL), _currentScene(NULL) {
_index = 0;
_namePlural = false;