[Scummvm-cvs-logs] CVS: tools descumm.cpp,1.103,1.104

kirben kirben at users.sourceforge.net
Fri Sep 23 23:09:42 CEST 2005


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

Modified Files:
	descumm.cpp 
Log Message:

Add SCUMM vars for C64 maniac.


Index: descumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/tools/descumm.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- descumm.cpp	24 Sep 2005 05:23:45 -0000	1.103
+++ descumm.cpp	24 Sep 2005 06:07:51 -0000	1.104
@@ -95,6 +95,24 @@
 void emit_if(char *buf, char *condition);
 
 
+const char *var_names0[] = {
+	/* 0 */
+	"VAR_EGO",
+	NULL,
+	"VAR_CAMERA_POS_X",
+	"VAR_HAVE_MSG",
+	/* 4 */
+	"VAR_ROOM",
+	"VAR_5",
+	"VAR_OVERRIDE",
+	"",
+	/* 8 */
+	"VAR_8",
+	"VAR_9",
+	"VAR_CHARCOUNT",
+	NULL
+};
+
 const char *var_names2[] = {
 	/* 0 */
 	"VAR_EGO",
@@ -457,7 +475,11 @@
 		
 	assert(i >= 0);
 
-	if (scriptVersion <= 2 &&
+	if (scriptVersion == 0 &&
+			i < ARRAYSIZE(var_names0) && var_names0[i]) {
+		buf += sprintf(buf, var_names0[i]);
+		return buf;
+	} else if (scriptVersion <= 2 &&
 			i < ARRAYSIZE(var_names2) && var_names2[i]) {
 		buf += sprintf(buf, var_names2[i]);
 		return buf;
@@ -1709,7 +1731,8 @@
 	int state = 0;
 
 	var[0] = 0;
-	get_var_or_word(var, opcode & 0x80);
+	if (scriptVersion > 0)
+		get_var_or_word(var, opcode & 0x80);
 
 	if (scriptVersion > 2) {
 		switch (opcode & 0x2F) {





More information about the Scummvm-git-logs mailing list