[Scummvm-cvs-logs] scummvm master -> 1ff19e19e760fa610150b1a5b68011f9833580ce

digitall digitall at scummvm.org
Wed Dec 28 03:53:35 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1ff19e19e7 DREAMWEB: Move checkCoords templated implementation to Dreambase header.


Commit: 1ff19e19e760fa610150b1a5b68011f9833580ce
    https://github.com/scummvm/scummvm/commit/1ff19e19e760fa610150b1a5b68011f9833580ce
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-27T18:49:27-08:00

Commit Message:
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.

Changed paths:
    engines/dreamweb/dreambase.h
    engines/dreamweb/stubs.cpp



diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 9d59c3f..671664c 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();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 10f8ea1..6eaf8fb 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1527,20 +1527,6 @@ void DreamBase::dumpPointer() {
 		multiDump(_oldPointerX, _oldPointerY, _pointerXS, _pointerYS);
 }
 
-template <class T>
-void DreamBase::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 DreamBase::showPointer() {
 	showBlink();
 	uint16 x = _mouseX;






More information about the Scummvm-git-logs mailing list