From 1ff19e19e760fa610150b1a5b68011f9833580ce Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 28 Dec 2011 02:49:27 +0000 Subject: DREAMWEB: Move checkCoords templated implementation to Dreambase header. The PSP (MIPS) toolchain generates differing symbols for this template and thus fails to link. By moving the implementation to the defining header, this should fix this. --- engines/dreamweb/dreambase.h | 16 +++++++++++++++- engines/dreamweb/stubs.cpp | 14 -------------- 2 files changed, 15 insertions(+), 15 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 void checkCoords(const RectWithCallback *rectWithCallbacks); + + template + void checkCoords(const RectWithCallback *rectWithCallbacks) { + if (_newLocation != 0xff) + return; + + const RectWithCallback *r; + for (r = rectWithCallbacks; r->_xMin != 0xffff; ++r) { + if (r->contains(_mouseX, _mouseY)) { + (((T *)this)->*(r->_callback))(); + return; + } + } + } + void newGame(); void deleteTaken(); void autoAppear(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 10f8ea18cc..6eaf8fb23a 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -1527,20 +1527,6 @@ void DreamBase::dumpPointer() { multiDump(_oldPointerX, _oldPointerY, _pointerXS, _pointerYS); } -template -void DreamBase::checkCoords(const RectWithCallback *rectWithCallbacks) { - if (_newLocation != 0xff) - return; - - const RectWithCallback *r; - for (r = rectWithCallbacks; r->_xMin != 0xffff; ++r) { - if (r->contains(_mouseX, _mouseY)) { - (((T *)this)->*(r->_callback))(); - return; - } - } -} - void DreamBase::showPointer() { showBlink(); uint16 x = _mouseX; -- cgit v1.2.3