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

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Tue Jul 20 13:45:07 CEST 2010


Revision: 51060
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51060&view=rev
Author:   m_kiewitz
Date:     2010-07-20 11:45:06 +0000 (Tue, 20 Jul 2010)

Log Message:
-----------
SCI: change the workaround-types

0 is now don't call
1 is do call
2 is don't call and fake acc

makes more sense

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.cpp
    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 11:29:56 UTC (rev 51059)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-20 11:45:06 UTC (rev 51060)
@@ -231,56 +231,56 @@
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kDisposeScript_workarounds[] = {
-    { GID_QFG1,           64,    64,  0,               "rm64", "dispose",        -1,    0, { 1,    0 } }, // when leaving graveyard, parameter 0 is an object
+    { GID_QFG1,           64,    64,  0,               "rm64", "dispose",        -1,    0, { 0,    0 } }, // when leaving graveyard, parameter 0 is an object
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kDoSoundFade_workarounds[] = {
-    { GID_KQ1,            -1,   989,  0,          "gameSound", "fade",           -1,    0, { 1,    0 } }, // gets called in several scenes (e.g. graham cracker) with 0:0
-    { GID_KQ6,           105,   989,  0,        "globalSound", "fade",           -1,    0, { 0,    0 } }, // floppy: during intro, parameter 4 is an object
+    { GID_KQ1,            -1,   989,  0,          "gameSound", "fade",           -1,    0, { 0,    0 } }, // gets called in several scenes (e.g. graham cracker) with 0:0
+    { GID_KQ6,           105,   989,  0,        "globalSound", "fade",           -1,    0, { 1,    0 } }, // floppy: during intro, parameter 4 is an object
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kGraphRestoreBox_workarounds[] = {
-    { GID_LSL6,           -1,    85,  0,          "rScroller", "hide",           -1,    0, { 0,    0 } }, // happens when restoring (sometimes), same as the one below
-    { GID_LSL6,           -1,    85,  0,          "lScroller", "hide",           -1,    0, { 0,    0 } }, // happens when restoring (sometimes), same as the one below
-    { GID_LSL6,           -1,    86,  0,             "LL6Inv", "show",           -1,    0, { 0,    0 } }, // happens when restoring, is called with hunk segment, but hunk is not allocated at that time
+    { GID_LSL6,           -1,    85,  0,          "rScroller", "hide",           -1,    0, { 1,    0 } }, // happens when restoring (sometimes), same as the one below
+    { GID_LSL6,           -1,    85,  0,          "lScroller", "hide",           -1,    0, { 1,    0 } }, // happens when restoring (sometimes), same as the one below
+    { GID_LSL6,           -1,    86,  0,             "LL6Inv", "show",           -1,    0, { 1,    0 } }, // happens when restoring, is called with hunk segment, but hunk is not allocated at that time
     // ^^ TODO: check, if this is really a script error or an issue with our restore code
-    { GID_LSL6,           -1,    86,  0,             "LL6Inv", "hide",           -1,    0, { 0,    0 } }, // happens during the game, gets called with 1 extra parameter
+    { GID_LSL6,           -1,    86,  0,             "LL6Inv", "hide",           -1,    0, { 1,    0 } }, // happens during the game, gets called with 1 extra parameter
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kGraphFillBoxForeground_workarounds[] = {
-    { GID_LSL6,           -1,     0,  0,               "LSL6", "hideControls",   -1,    0, { 0,    0 } }, // happens when giving the bungee key to merrily (room 240) and at least in room 650 too - gets called with additional 5th parameter
+    { GID_LSL6,           -1,     0,  0,               "LSL6", "hideControls",   -1,    0, { 1,    0 } }, // happens when giving the bungee key to merrily (room 240) and at least in room 650 too - gets called with additional 5th parameter
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kGraphFillBoxAny_workarounds[] = {
-    { GID_SQ4,            -1,   818,  0,     "iconTextSwitch", "show",           -1,    0, { 0,    0 } }, // game menu "text/speech" display - parameter 5 is missing, but the right color number is on the stack
+    { GID_SQ4,            -1,   818,  0,     "iconTextSwitch", "show",           -1,    0, { 1,    0 } }, // game menu "text/speech" display - parameter 5 is missing, but the right color number is on the stack
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kSetPort_workarounds[] = {
-    { GID_LSL6,          740,   740,  0,              "rm740", "drawPic",        -1,    0, { 1,    0 } }, // ending scene, is called with additional 3 (!) parameters
+    { GID_LSL6,          740,   740,  0,              "rm740", "drawPic",        -1,    0, { 0,    0 } }, // ending scene, is called with additional 3 (!) parameters
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kUnLoad_workarounds[] = {
-    { GID_LSL6,          130,   130,  0,    "recruitLarryScr", "changeState",    -1,    0, { 1,    0 } }, // during intro, a 3rd parameter is passed by accident
-    { GID_LSL6,          740,   740,  0,        "showCartoon", "changeState",    -1,    0, { 1,    0 } }, // during ending, 4 additional parameters are passed by accident
-    { GID_SQ1,            43,   303,  0,            "slotGuy", "dispose",        -1,    0, { 1,    0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error
+    { GID_LSL6,          130,   130,  0,    "recruitLarryScr", "changeState",    -1,    0, { 0,    0 } }, // during intro, a 3rd parameter is passed by accident
+    { GID_LSL6,          740,   740,  0,        "showCartoon", "changeState",    -1,    0, { 0,    0 } }, // during ending, 4 additional parameters are passed by accident
+    { GID_SQ1,            43,   303,  0,            "slotGuy", "dispose",        -1,    0, { 0,    0 } }, // when leaving ulence flats bar, parameter 1 is not passed - script error
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
 //    gameID,           room,script,lvl,          object-name, method-name,    call, index,   replace
 static const SciWorkaroundEntry kStrCpy_workarounds[] = {
-    { GID_ISLANDBRAIN,   260,    45,  0,        "aWord", "addOn",                -1,    0, { 0,    0 } }, // Hominy Homonym puzzle
+    { GID_ISLANDBRAIN,   260,    45,  0,        "aWord", "addOn",                -1,    0, { 1,    0 } }, // Hominy Homonym puzzle
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-07-20 11:29:56 UTC (rev 51059)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-07-20 11:45:06 UTC (rev 51060)
@@ -882,10 +882,17 @@
 			error("[VM] k%s[%x]: signature mismatch via method %s::%s (script %d, localCall %x)", kernelCall.name, kernelCallNr, originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset);
 		}
 		// FIXME: implement some real workaround type logic - ignore call, still do call etc.
-		if (workaround.segment == 2)
+		switch (workaround.segment) {
+		case 0: // don't do kernel call, leave acc alone
+			return;
+		case 1: // call kernel anyway
+			break;
+		case 2: // don't do kernel call, fake acc
 			s->r_acc = make_reg(0, workaround.offset);
-		if (workaround.segment)
 			return;
+		default:
+			error("unknown workaround type");
+		}
 	}
 
 


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