aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/hotspots.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads/hotspots.cpp')
-rw-r--r--engines/mads/hotspots.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp
index 365f30985b..d75d7ae13e 100644
--- a/engines/mads/hotspots.cpp
+++ b/engines/mads/hotspots.cpp
@@ -150,6 +150,15 @@ void DynamicHotspots::refresh() {
_changed = false;
}
+DynamicHotspot &DynamicHotspots::get(int index) {
+ for (uint i = 0; i < _entries.size(); ++i) {
+ if (_entries[i]._active && index-- == 0)
+ return _entries[i];
+ }
+
+ error("Could not find dynamic hotspot");
+}
+
void DynamicHotspots::synchronize(Common::Serializer &s) {
int count = _entries.size();
s.syncAsSint16LE(count);