aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/dreambase.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dreamweb/dreambase.h')
-rw-r--r--engines/dreamweb/dreambase.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 9d59c3fc6f..671664c05b 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -778,7 +778,21 @@ public:
void setAllChanges();
void restoreAll();
void redrawMainScrn();
- template <class T> void checkCoords(const RectWithCallback<T> *rectWithCallbacks);
+
+ template <class T>
+ void checkCoords(const RectWithCallback<T> *rectWithCallbacks) {
+ if (_newLocation != 0xff)
+ return;
+
+ const RectWithCallback<T> *r;
+ for (r = rectWithCallbacks; r->_xMin != 0xffff; ++r) {
+ if (r->contains(_mouseX, _mouseY)) {
+ (((T *)this)->*(r->_callback))();
+ return;
+ }
+ }
+ }
+
void newGame();
void deleteTaken();
void autoAppear();