[Scummvm-cvs-logs] CVS: tools descumm6.cpp,1.14,1.15

James Brown ender at users.sourceforge.net
Fri Nov 1 09:11:18 CET 2002


Update of /cvsroot/scummvm/tools
In directory usw-pr-cvs1:/tmp/cvs-serv13847

Modified Files:
	descumm6.cpp 
Log Message:
Fix for V7 scripts


Index: descumm6.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm6.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- descumm6.cpp	28 Oct 2002 08:03:29 -0000	1.14
+++ descumm6.cpp	1 Nov 2002 17:07:06 -0000	1.15
@@ -262,15 +262,6 @@
 	stack[num_stack++] = se;
 }
 
-StackEnt *pop()
-{
-	if (num_stack == 0) {
-		printf("No items on stack to pop!\n");
-		exit(1);
-	}
-	return stack[--num_stack];
-}
-
 void invalidop(const char *cmd, int op)
 {
 	if (cmd)
@@ -467,6 +458,19 @@
 	return where;
 }
 
+StackEnt *pop()
+{
+	if (num_stack == 0) {
+		printf("No items on stack to pop!\n");
+
+		if (!haltOnError)
+			return se_complex("**** INVALID DATA ****");
+ 		exit(1);
+	}
+	return stack[--num_stack];
+}
+
+
 void kill(StackEnt * se)
 {
 	if (se->type != seDup) {
@@ -1142,23 +1146,18 @@
 		ext("|createBoxMatrix");
 		break;
 	case 0x9B:
-		ext("x" "resourceRoutines\0"
-				"\x64p|loadScript,"
-				"\x65p|loadSound,"
-				"\x66p|loadCostume,"
-				"\x67p|loadRoom,"
-				"\x68p|nukeScript,"
-				"\x69p|nukeSound,"
-				"\x6Ap|nukeCostume,"
-				"\x6Bp|nukeRoom,"
-				"\x6Cp|lockScript,"
-				"\x6Dp|lockSound,"
-				"\x6Ep|lockCostume,"
-				"\x6Fp|lockRoom,"
-				"\x70p|unlockScript,"
-				"\x71p|unlockSound,"
-				"\x72p|unlockCostume,"
+		if (scriptVersion < 7)
+			ext("x" "resourceRoutines\0" "\x64p|loadScript," "\x65p|loadSound," "\x66p|loadCostume," 
+				"\x67p|loadRoom," "\x68p|nukeScript," "\x69p|nukeSound," "\x6Ap|nukeCostume,"
+				"\x6Bp|nukeRoom," "\x6Cp|lockScript," "\x6Dp|lockSound," "\x6Ep|lockCostume,"
+ 				"\x6Fp|lockRoom," "\x70p|unlockScript," "\x71p|unlockSound," "\x72p|unlockCostume,"
 				"\x73p|unlockRoom," "\x75p|loadCharset," "\x76p|nukeCharset," "\x77pp|unkResProc");
+		else
+			ext("x" "resourceRoutines\0" "\x64p|loadScript," "\x65p|loadSound," "\x66p|loadCostume," 
+				"\x67p|loadRoom," "\x68p|nukeScript," "\x69p|nukeSound," "\x6Ap|nukeCostume,"
+				"\x6Bp|nukeRoom," "\x6Cp|lockScript," "\x6Dp|lockSound," "\x6Ep|lockCostume,"
+ 				"\x6Fp|lockRoom," "\x70p|unlockScript," "\x71p|unlockSound," "\x72p|unlockCostume,"
+				"\x73p|unlockRoom," "\x75p|loadCharset," "\x76p|nukeCharset," "\x77p|unkResProc");
 		break;
 	case 0x9C:
 		ext("x" "roomOps\0"





More information about the Scummvm-git-logs mailing list