[Scummvm-cvs-logs] SF.net SVN: scummvm:[40095] scummvm/trunk/engines/sci

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Apr 23 22:37:42 CEST 2009


Revision: 40095
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40095&view=rev
Author:   thebluegr
Date:     2009-04-23 20:37:41 +0000 (Thu, 23 Apr 2009)

Log Message:
-----------
The mouse cursor is now working in Eco Quest 1, though the hotspot is still wrong. Many thanks to waltervn for his findings on this.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-23 19:11:01 UTC (rev 40094)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-23 20:37:41 UTC (rev 40095)
@@ -289,7 +289,7 @@
 	return retval;
 }
 
-reg_t kSetCursor_SCI11(EngineState *s, int funct_nr, int argc, reg_t *argv) {
+reg_t kSetCursorNew(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	switch (argc) {
 	case 1 :
 		if (UKPV(0) == 0) {
@@ -334,8 +334,9 @@
 
 reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	if (s->version >= SCI_VERSION(1, 001, 000) ||
+		s->_gameName.equalsIgnoreCase("eco") ||    // Eco Quest 1 needs kSetCursorNew
 	        has_kernel_function(s, "MoveCursor")) {
-		return kSetCursor_SCI11(s, funct_nr, argc, argv);
+		return kSetCursorNew(s, funct_nr, argc, argv);
 	}
 
 	if (SKPV_OR_ALT(1, 1)) {

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-04-23 19:11:01 UTC (rev 40094)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-04-23 20:37:41 UTC (rev 40095)
@@ -1225,6 +1225,11 @@
 		new_pointer->yoffset = hotspot->y;
 	}
 
+	// Special case for Eco Quest 1: The game is trying to hide the mouse cursor by clipping it, which is rejected
+	// by our graphics scaler. Hide the cursor when that happens instead.
+	if (new_pointer->width < 2 || new_pointer->height < 2)
+		return _gfxop_set_pointer(state, NULL);
+
 	if (!new_pointer) {
 		GFXWARN("Attempt to set invalid pointer #%d\n", nr);
 		return GFX_ERROR;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list