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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Jul 21 16:54:07 CEST 2010


Revision: 51090
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51090&view=rev
Author:   fingolfin
Date:     2010-07-21 14:54:06 +0000 (Wed, 21 Jul 2010)

Log Message:
-----------
SCI: More rest of the workaround defs to workarounds.h

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

Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h	2010-07-21 14:50:31 UTC (rev 51089)
+++ scummvm/trunk/engines/sci/engine/kernel.h	2010-07-21 14:54:06 UTC (rev 51090)
@@ -40,6 +40,7 @@
 struct Node;	// from segment.h
 struct List;	// from segment.h
 struct SelectorCache;	// from selector.h
+struct SciWorkaroundEntry;	// from workarounds.h
 
 /**
  * @defgroup VocabularyResources	Vocabulary resources in SCI
@@ -120,32 +121,6 @@
 /* Generic description: */
 typedef reg_t KernelFunctionCall(EngineState *s, int argc, reg_t *argv);
 
-enum SciWorkaroundType {
-	WORKAROUND_NONE,      // only used by terminator or when no workaround was found
-	WORKAROUND_IGNORE,    // ignore kernel call
-	WORKAROUND_STILLCALL, // still do kernel call
-	WORKAROUND_FAKE       // fake kernel call / replace temp value / fake opcode
-};
-
-struct SciWorkaroundSolution {
-	SciWorkaroundType type;
-	uint16 value;
-};
-
-struct SciWorkaroundEntry {
-	SciGameId gameId;
-	int roomNr;
-	int scriptNr;
-	int16 inheritanceLevel;
-	const char *objectName;
-	const char *methodName;
-	int localCallOffset;
-	int index;
-	SciWorkaroundSolution newValue;
-};
-
-#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, -1, 0, NULL, NULL, -1, 0, { WORKAROUND_NONE, 0 } }
-
 struct KernelSubFunction {
 	KernelFunctionCall *function;
 	const char *name;

Modified: scummvm/trunk/engines/sci/engine/workarounds.h
===================================================================
--- scummvm/trunk/engines/sci/engine/workarounds.h	2010-07-21 14:50:31 UTC (rev 51089)
+++ scummvm/trunk/engines/sci/engine/workarounds.h	2010-07-21 14:54:06 UTC (rev 51090)
@@ -26,8 +26,37 @@
 #ifndef SCI_ENGINE_WORKAROUNDS_H
 #define SCI_ENGINE_WORKAROUNDS_H
 
+#include "sci/engine/vm_types.h"
+#include "sci/sci.h"
+
 namespace Sci {
 
+enum SciWorkaroundType {
+	WORKAROUND_NONE,      // only used by terminator or when no workaround was found
+	WORKAROUND_IGNORE,    // ignore kernel call
+	WORKAROUND_STILLCALL, // still do kernel call
+	WORKAROUND_FAKE       // fake kernel call / replace temp value / fake opcode
+};
+
+struct SciWorkaroundSolution {
+	SciWorkaroundType type;
+	uint16 value;
+};
+
+struct SciWorkaroundEntry {
+	SciGameId gameId;
+	int roomNr;
+	int scriptNr;
+	int16 inheritanceLevel;
+	const char *objectName;
+	const char *methodName;
+	int localCallOffset;
+	int index;
+	SciWorkaroundSolution newValue;
+};
+
+#define SCI_WORKAROUNDENTRY_TERMINATOR { (SciGameId)0, -1, -1, 0, NULL, NULL, -1, 0, { WORKAROUND_NONE, 0 } }
+
 //    gameID,           room,script,lvl,          object-name, method-name,    call,index,             workaround
 static const SciWorkaroundEntry opcodeDivWorkarounds[] = {
     { GID_QFG1VGA,       301,   928,  0,              "Blink", "init",           -1,    0, { WORKAROUND_FAKE,   0 } }, // when entering inn, gets called with 1 parameter, but 2nd parameter is used for div which happens to be an object
@@ -159,6 +188,8 @@
     SCI_WORKAROUNDENTRY_TERMINATOR
 };
 
+#undef FAKE
+
 } // End of namespace Sci
 
 #endif // SCI_ENGINE_WORKAROUNDS_H


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