[Scummvm-cvs-logs] CVS: scummvm/saga script.h,1.66,1.67 sfuncs.cpp,1.90,1.91 sthread.cpp,1.72,1.73

Eugene Sandulenko sev at users.sourceforge.net
Thu Jan 27 19:48:32 CET 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16795

Modified Files:
	script.h sfuncs.cpp sthread.cpp 
Log Message:
Let IHNM run again. It has 105 script functions.


Index: script.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/script.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- script.h	22 Jan 2005 21:40:54 -0000	1.66
+++ script.h	28 Jan 2005 03:47:12 -0000	1.67
@@ -46,7 +46,7 @@
 #define S_ERROR_PREFIX "SError: "
 #define S_WARN_PREFIX "SWarning: "
 
-#define SCRIPT_FUNCTION_MAX 78
+#define SCRIPT_FUNCTION_MAX 104
 #define DEFAULT_THREAD_STACK_SIZE 256
 
 enum AddressTypes {
@@ -534,6 +534,7 @@
 	void sfRand(SCRIPTFUNC_PARAMS);
 	void SF_fadeMusic(SCRIPTFUNC_PARAMS);
 	void SF_playVoice(SCRIPTFUNC_PARAMS);
+	void SF_stub(SCRIPTFUNC_PARAMS);
 };
 
 } // End of namespace Saga

Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- sfuncs.cpp	27 Jan 2005 20:07:02 -0000	1.90
+++ sfuncs.cpp	28 Jan 2005 03:47:12 -0000	1.91
@@ -126,7 +126,33 @@
 		OPCODE(SF_protectResult),
 		OPCODE(sfRand),
 		OPCODE(SF_fadeMusic),
-		OPCODE(SF_playVoice)
+		OPCODE(SF_playVoice),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub),
+		OPCODE(SF_stub)
 	};
 	_scriptFunctionsList = scriptFunctionsList;
 }
@@ -1561,4 +1587,11 @@
 	wakeUpThreads(kWaitTypeDialogBegin);
 }
 
+void Script::SF_stub(SCRIPTFUNC_PARAMS) {
+	for (int i = 0; i < nArgs; i++)
+		thread->pop();
+
+	debug(1, "stub: SF_stub(), %d args", nArgs);
+}
+
 } // End of namespace Saga

Index: sthread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sthread.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- sthread.cpp	22 Jan 2005 19:21:38 -0000	1.72
+++ sthread.cpp	28 Jan 2005 03:47:12 -0000	1.73
@@ -313,7 +313,7 @@
 			argumentsCount = scriptS.readByte();
 			functionNumber = scriptS.readUint16LE();
 			if (functionNumber >= SCRIPT_FUNCTION_MAX) {
-				error("Script::runThread() Invalid script function number");
+				error("Script::runThread() Invalid script function number (%d)", functionNumber);
 			}
 
 			debug(8, "Calling 0x%X %s", functionNumber, _scriptFunctionsList[functionNumber].scriptFunctionName);





More information about the Scummvm-git-logs mailing list