[Scummvm-cvs-logs] CVS: tools descumm.h,1.10,1.11 descumm6.cpp,1.126,1.127 descumm-tool.cpp,1.4,1.5

Max Horn fingolfin at users.sourceforge.net
Tue Jan 27 23:46:21 CET 2004


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

Modified Files:
	descumm.h descumm6.cpp descumm-tool.cpp 
Log Message:
remove global variable 'output' (first step towards more flexible output code)

Index: descumm.h
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- descumm.h	6 Jan 2004 12:44:02 -0000	1.10
+++ descumm.h	26 Jan 2004 22:38:40 -0000	1.11
@@ -104,9 +104,8 @@
 //
 extern void next_line_V12(char *buf);	// For V1 and V2
 extern void next_line_V345(char *buf);	// For V3, V4, V5
-extern void next_line_V67();
-extern void next_line_V8();
-extern char *output;
+extern void next_line_V67(char *buf);
+extern void next_line_V8(char *buf);
 extern bool HumongousFlag;
 extern bool ZakFlag;
 extern bool IndyFlag;

Index: descumm6.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm6.cpp,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- descumm6.cpp	19 Jan 2004 19:46:46 -0000	1.126
+++ descumm6.cpp	26 Jan 2004 22:38:40 -0000	1.127
@@ -62,6 +62,7 @@
  which they can't decode correctly, leading to completely wrong output. An example
  can be seen by looking at script 52 of Sam&Max. It gets descummed to this:
  
+	[002E] (43)   localvar1 = 6
 	[0037] (5D)   while (localvar1 <= 80) {
 	[0041] (5D)     if (array-178[localvar1] == 0) {
 	[004E] (47)       array-178[localvar0] = localvar1
@@ -71,8 +72,11 @@
 	[0060] (73)       jump 37
 	[0063] (**)     }
 	[0063] (**)   }
[...1421 lines suppressed...]
 		break;
 	case 0xEC:
-		ext("rp|getActorLayer");
+		ext(output, "rp|getActorLayer");
 		break;
 	case 0xED:
-		ext("rp|getObjectNewDir");
+		ext(output, "rp|getObjectNewDir");
 		break;
 	case 0xF3:
-		ext("rsp|readINI");
+		ext(output, "rsp|readINI");
 		break;
 	case 0xFA:
 		get_byte();
-		ext("s|unknownFA");
+		ext(output, "s|unknownFA");
 		break;
 	default:
 		invalidop(NULL, code);

Index: descumm-tool.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm-tool.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- descumm-tool.cpp	6 Jan 2004 12:44:02 -0000	1.4
+++ descumm-tool.cpp	26 Jan 2004 22:38:40 -0000	1.5
@@ -244,7 +244,7 @@
 	fclose(in);
 	size_of_code = len;
 
-	output = buf = (char *)malloc(8192);
+	buf = (char *)malloc(8192);
 
 	offs_of_line = 0;
 
@@ -349,10 +349,10 @@
 			break;
 		case 6:
 		case 7:
-			next_line_V67();
+			next_line_V67(buf);
 			break;
 		case 8:
-			next_line_V8();
+			next_line_V8(buf);
 			break;
 		}
 		if (buf[0]) {





More information about the Scummvm-git-logs mailing list