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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jul 20 16:27:31 CEST 2010


Revision: 51063
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51063&view=rev
Author:   m_kiewitz
Date:     2010-07-20 14:27:30 +0000 (Tue, 20 Jul 2010)

Log Message:
-----------
SCI: adding uninit workarounds for cnick games

longbow and king's quest
KQ has the same issues as hoyle 3

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

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-20 12:50:13 UTC (rev 51062)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-20 14:27:30 UTC (rev 51063)
@@ -744,9 +744,17 @@
 	return _selectorNames.size();
 }
 
-const Common::String &Kernel::getSelectorName(uint selector) const {
-	if (selector >= _selectorNames.size())
-		return _invalid;
+const Common::String &Kernel::getSelectorName(uint selector) {
+	if (selector >= _selectorNames.size()) {
+		// This should only occur in games w/o a selector-table
+		//  We need this for proper workaround tables
+		// TODO: maybe check, if there is a fixed selector-table and error() out in that case
+		for (uint loopSelector = _selectorNames.size(); loopSelector <= selector; loopSelector++) {
+			Common::String newSelectorName;
+			newSelectorName = newSelectorName.printf("<noname %d>", loopSelector);
+			_selectorNames.push_back(newSelectorName);
+		}
+	}
 	return _selectorNames[selector];
 }
 

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-07-20 12:50:13 UTC (rev 51062)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-07-20 14:27:30 UTC (rev 51063)
@@ -160,7 +160,7 @@
 	~Kernel();
 
 	uint getSelectorNamesSize() const;
-	const Common::String &getSelectorName(uint selector) const;
+	const Common::String &getSelectorName(uint selector);
 
 	uint getKernelNamesSize() const;
 	const Common::String &getKernelName(uint number) const;

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-07-20 12:50:13 UTC (rev 51062)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-07-20 14:27:30 UTC (rev 51063)
@@ -378,6 +378,10 @@
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
+    { GID_CNICK_KQ,      200,     0,  1,          "Character", "<noname 446>",   -1,  504, { 0,   0 } }, // checkers, like in hoyle 3
+    { GID_CNICK_KQ,      200,     0,  1,          "Character", "<noname 446>",   -1,  505, { 0,   0 } }, // checkers, like in hoyle 3
+    { GID_CNICK_KQ,       -1,   700,  0,           "gcWindow", "<noname 183>",   -1,   -1, { 0,   0 } }, // when entering control menu, like in hoyle 3
+    { GID_CNICK_LONGBOW,   0,     0,  0,          "RH Budget", "<noname 110>",   -1,    1, { 0,   0 } }, // when starting the game
     { GID_FREDDYPHARKAS,  -1,    24,  0,              "gcWin", "open",           -1,    5, { 0, 0xf } }, // is used as priority for game menu
     { GID_FREDDYPHARKAS,  -1,    31,  0,            "quitWin", "open",           -1,    5, { 0, 0xf } }, // is used as priority for game menu
     { GID_GK1,            -1, 64950,  1,            "Feature", "handleEvent",    -1,    0, { 0,   0 } }, // sometimes when walk-clicking


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