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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu May 14 13:11:56 CEST 2009


Revision: 40554
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40554&view=rev
Author:   thebluegr
Date:     2009-05-14 11:11:56 +0000 (Thu, 14 May 2009)

Log Message:
-----------
Added a feature flag for the SCI1.1 behavior of kSetCursor() in Eco 1 and KQ5 CD. Some cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/sci/detection.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/sci.h
    scummvm/trunk/engines/sci/scicore/versions.h

Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp	2009-05-14 10:24:39 UTC (rev 40553)
+++ scummvm/trunk/engines/sci/detection.cpp	2009-05-14 11:11:56 UTC (rev 40554)
@@ -452,7 +452,7 @@
 		{"resource.002", 0, "28fe9b4f0567e71feb198bc9f3a2c605", 1241816},
 		{"resource.003", 0, "f3146df0ad4297f5ce35aa8c4753bf6c", 586832},
 		{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
-		0,
+		GF_SCI1_NEWSETCURSOR,
 		SCI_VERSION_AUTODETECT,
 		SCI_VERSION(1, 0, 510)
 	},
@@ -465,7 +465,7 @@
 		{"resource.002", 0, "323b3b12f43d53f27d259beb225f0aa7", 1129316},
 		{"resource.003", 0, "83ac03e4bddb2c1ac2d36d2a587d0536", 1145616},
 		{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
-		0,
+		GF_SCI1_NEWSETCURSOR,
 		SCI_VERSION_AUTODETECT,
 		SCI_VERSION(1, 0, 510)
 	},
@@ -478,7 +478,7 @@
 		{"resource.002", 0, "02d7d0411f7903aacb3bc8b0f8ca8a9a", 1202581},
 		{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1175835},
 		{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0},
-		0,
+		GF_SCI1_NEWSETCURSOR,
 		SCI_VERSION_AUTODETECT,
 		SCI_VERSION(1, 0, 510)
 	},
@@ -492,7 +492,7 @@
 		{"resource.002", 0, "2d21a1d2dcbffa551552e3e0725d2284", 1186033},
 		{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1174993},
 		{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0},
-		0,
+		GF_SCI1_NEWSETCURSOR,
 		SCI_VERSION_AUTODETECT,
 		SCI_VERSION(1, 0, 510)
 	},
@@ -958,7 +958,7 @@
 		{"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368},
 		{"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210},
 		{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0},
-		0,
+		GF_SCI1_NEWSETCURSOR,
 		SCI_VERSION_AUTODETECT,
 		SCI_VERSION(1, 000, 784)
 	},

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-14 10:24:39 UTC (rev 40553)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-05-14 11:11:56 UTC (rev 40554)
@@ -309,10 +309,7 @@
 		}
 	case 2 : 
 	case 4 :
-		if (s->version >= SCI_VERSION(1, 1, 0) ||
-			s->_gameName.equalsIgnoreCase("eco") ||
-			(s->_gameName.equalsIgnoreCase("KQ5") && s->version == SCI_VERSION(1, 000, 784))	// KQ5 CD
-			) {
+		if (s->version >= SCI_VERSION(1, 1, 0) || (s->flags & GF_SCI1_NEWSETCURSOR)) {
 			GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state, Common::Point(UKPV(0), UKPV(1))));
 		} else {
 			if (SKPV_OR_ALT(1, 1)) {

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-05-14 10:24:39 UTC (rev 40553)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-05-14 11:11:56 UTC (rev 40554)
@@ -136,7 +136,7 @@
 	song_handle_t handle;
 	int cue;
 
-	if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_1)
+	if (s->version >= SCI_VERSION(1,000,000))
 		return;
 	/* SCI01 and later explicitly poll for everything */
 
@@ -984,7 +984,7 @@
 reg_t kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_2)
 		return kDoSound_SCI1(s, funct_nr, argc, argv);
-	else if (s->version >= SCI_VERSION_FTU_DOSOUND_VARIANT_1)
+	else if (s->version >= SCI_VERSION(1,000,000))
 		return kDoSound_SCI01(s, funct_nr, argc, argv);
 	else
 		return kDoSound_SCI0(s, funct_nr, argc, argv);

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2009-05-14 10:24:39 UTC (rev 40553)
+++ scummvm/trunk/engines/sci/sci.h	2009-05-14 11:11:56 UTC (rev 40554)
@@ -88,7 +88,7 @@
 	** Also, old SCI versions assign 120 degrees to left & right, and 60 to up
 	** and down. Later versions use an even 90 degree distribution.
 	*/
-	GF_SCI0_OLD			= (1 << 0),
+	GF_SCI0_OLD				= (1 << 0),
 
 	/* Applies to all versions before 0.000.502
 	** Old SCI versions used to interpret the third DrawPic() parameter inversely,
@@ -96,12 +96,12 @@
 	** Also, they used 15 priority zones from 42 to 200 instead of 14 priority
 	** zones from 42 to 190.
 	*/
-	GF_SCI0_OLDGFXFUNCS	= (1 << 1),
+	GF_SCI0_OLDGFXFUNCS		= (1 << 1),
 
 	/* Applies to all versions before 0.000.629
 	** Older SCI versions had simpler code for GetTime()
 	*/
-	GF_SCI0_OLDGETTIME	= (1 << 2),
+	GF_SCI0_OLDGETTIME		= (1 << 2),
 
 	// ----------------------------------------------------------------------------
 
@@ -113,12 +113,18 @@
     ** In later SCI1 versions, the argument of lofs[as]
 	** instructions is absolute rather than relative.
 	*/
-	GF_LOFSABSOLUTE		= (1 << 3),
+	GF_LOFSABSOLUTE			= (1 << 3),
 
 	/* Applies to all versions from 1.000.510 onwards
 	** kDoSound() is different than in earlier SCI1 versions.
 	*/
-	GF_NEWDOSOUND		= (1 << 4)
+	GF_NEWDOSOUND			= (1 << 4),
+
+	/*
+	** Newer SCI1 games (like KQ5 CD and EcoQuest 1) use
+	** different semantics in kSetCursor(), like SCI1.1 games
+	*/
+	GF_SCI1_NEWSETCURSOR	= (1 << 5)
 };
 
 // The 4 SCI0 engine generations (pre-395, pre-502, pre-629 and post-629)

Modified: scummvm/trunk/engines/sci/scicore/versions.h
===================================================================
--- scummvm/trunk/engines/sci/scicore/versions.h	2009-05-14 10:24:39 UTC (rev 40553)
+++ scummvm/trunk/engines/sci/scicore/versions.h	2009-05-14 11:11:56 UTC (rev 40554)
@@ -46,11 +46,6 @@
 ** - "FTU" means "First To Use"
 */
 
-#define SCI_VERSION_FTU_NEW_GETTIME SCI_VERSION(0,000,629)
-/* These versions of SCI has a different set of subfunctions in GetTime() */
-
-#define SCI_VERSION_FTU_DOSOUND_VARIANT_1 SCI_VERSION(1,000,000)
-
 #define SCI_VERSION_FTU_LOFS_ABSOLUTE SCI_VERSION(1,000,200)
 /* First version known to do this: ?
    In later versions (SCI1 and beyond), the argument of lofs[as]


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