diff options
Diffstat (limited to 'engines/mads/screen.cpp')
-rw-r--r-- | engines/mads/screen.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index 91aa3abdb0..7e8710db56 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -364,6 +364,17 @@ void ScreenObjects::check(bool scanFlag) { } } +int ScreenObjects::scan(const Common::Point &pt, int layer) { + for (uint i = 1; i <= size(); ++i) { + ScreenObject &sObj = (*this)[i]; + if (sObj._active && sObj._bounds.contains(pt) && sObj._layer == layer) + return i; + } + + // Entry not found + return 0; +} + int ScreenObjects::scanBackwards(const Common::Point &pt, int layer) { for (int i = (int)size(); i >= 1; --i) { ScreenObject &sObj = (*this)[i]; |