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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Thu Jun 25 02:14:07 CEST 2009


Revision: 41841
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41841&view=rev
Author:   mthreepwood
Date:     2009-06-25 00:14:07 +0000 (Thu, 25 Jun 2009)

Log Message:
-----------
After discussing with waltervn, committing my fix for the King's Quest I Demo (original from Patch #2795916). I'm also fixing the full game as well :)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/detection.cpp
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/sci.h

Modified: scummvm/trunk/engines/sci/detection.cpp
===================================================================
--- scummvm/trunk/engines/sci/detection.cpp	2009-06-24 23:58:30 UTC (rev 41840)
+++ scummvm/trunk/engines/sci/detection.cpp	2009-06-25 00:14:07 UTC (rev 41841)
@@ -953,9 +953,9 @@
 		{"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954},
 		{"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555},
 		{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
-		0,
+		GF_SCI0_SCI1VOCAB,
 		SCI_VERSION_AUTODETECT,
-		SCI_VERSION_01
+		SCI_VERSION_0
 	},
 
 	// King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection)
@@ -969,7 +969,7 @@
 		{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
 		0,
 		SCI_VERSION_AUTODETECT,
-		SCI_VERSION_01
+		SCI_VERSION_0
 	},
 
 	// King's Quest 4 - English Amiga (from www.back2roots.org)

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2009-06-24 23:58:30 UTC (rev 41840)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-06-25 00:14:07 UTC (rev 41841)
@@ -945,7 +945,11 @@
 	switch (_resmgr->_sciVersion) {
 	case SCI_VERSION_0:
 	case SCI_VERSION_01:
-		vocab_get_knames0(_resmgr, _kernelNames);
+		// HACK: The KQ1 demo requires the SCI1 vocabulary.
+		if (((SciEngine*)g_engine)->getFlags() & GF_SCI0_SCI1VOCAB)
+			vocab_get_knames1(_resmgr, _kernelNames);
+		else
+			vocab_get_knames0(_resmgr, _kernelNames);
 		break;
 	case SCI_VERSION_01_VGA:
 	case SCI_VERSION_01_VGA_ODD:

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-06-24 23:58:30 UTC (rev 41840)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-06-25 00:14:07 UTC (rev 41841)
@@ -158,7 +158,8 @@
 
 		if (flags & GF_SCI0_OLD ||
 			flags & GF_SCI0_OLDGFXFUNCS ||
-			flags & GF_SCI0_OLDGETTIME) {
+			flags & GF_SCI0_OLDGETTIME ||
+			flags & GF_SCI0_SCI1VOCAB) {
 			error("This game entry is erroneous. It's marked as SCI1, but it has SCI0 flags set");
 		}
 	} else if (version == SCI_VERSION_1_1 || version == SCI_VERSION_32) {
@@ -170,7 +171,8 @@
 
 		if (flags & GF_SCI0_OLD ||
 			flags & GF_SCI0_OLDGFXFUNCS ||
-			flags & GF_SCI0_OLDGETTIME) {
+			flags & GF_SCI0_OLDGETTIME ||
+			flags & GF_SCI0_SCI1VOCAB) {
 			error("This game entry is erroneous. It's marked as SCI1.1/SCI32, but it has SCI0 flags set");
 		}
 

Modified: scummvm/trunk/engines/sci/sci.h
===================================================================
--- scummvm/trunk/engines/sci/sci.h	2009-06-24 23:58:30 UTC (rev 41840)
+++ scummvm/trunk/engines/sci/sci.h	2009-06-25 00:14:07 UTC (rev 41841)
@@ -108,6 +108,11 @@
 	** Older SCI versions had simpler code for GetTime()
 	*/
 	GF_SCI0_OLDGETTIME		= (1 << 2),
+	
+	/* Applies to any game that requires the SCI1 kernel vocab
+	** Some games (such as the King's Quest I demo) require the default kernel vocab table.
+	*/
+	GF_SCI0_SCI1VOCAB       = (1 << 3),
 
 	// ----------------------------------------------------------------------------
 
@@ -118,18 +123,18 @@
 	/*
 	** Used to distinguish SCI1 EGA games
 	*/
-	GF_SCI1_EGA				= (1 << 3),
+	GF_SCI1_EGA				= (1 << 4),
 
 	/* Applies to all SCI1 versions after 1.000.200
     ** In late SCI1 versions, the argument of lofs[as] instructions
 	** is absolute rather than relative.
 	*/
-	GF_SCI1_LOFSABSOLUTE	= (1 << 4),
+	GF_SCI1_LOFSABSOLUTE	= (1 << 5),
 
 	/* Applies to all versions from 1.000.510 onwards
 	** kDoSound() is different than in earlier SCI1 versions.
 	*/
-	GF_SCI1_NEWDOSOUND		= (1 << 5)
+	GF_SCI1_NEWDOSOUND		= (1 << 6)
 };
 
 class SciEngine : public Engine {


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