[Scummvm-cvs-logs] SF.net SVN: scummvm: [24934] tools/trunk/descumm6.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Wed Dec 27 14:27:12 CET 2006
Revision: 24934
http://scummvm.svn.sourceforge.net/scummvm/?rev=24934&view=rev
Author: fingolfin
Date: 2006-12-27 05:27:11 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
cleanup
Modified Paths:
--------------
tools/trunk/descumm6.cpp
Modified: tools/trunk/descumm6.cpp
===================================================================
--- tools/trunk/descumm6.cpp 2006-12-27 00:47:57 UTC (rev 24933)
+++ tools/trunk/descumm6.cpp 2006-12-27 13:27:11 UTC (rev 24934)
@@ -885,31 +885,22 @@
}
break;
case seArray:
+ if(g_options.scriptVersion == 8 && !(se->data & 0xF0000000) &&
+ (s = getVarName(se->data & 0xFFFFFFF)) != NULL)
+ where += sprintf(where, "%s[",s);
+ else if(g_options.scriptVersion < 8 && !(se->data & 0xF000) &&
+ (s = getVarName(se->data & 0xFFF)) != NULL)
+ where += sprintf(where, "%s[",s);
+ else
+ where += sprintf(where, "array%ld[", se->data);
+
if (se->left) {
- if(g_options.scriptVersion == 8 && !(se->data & 0xF0000000) &&
- (s = getVarName(se->data & 0xFFFFFFF)) != NULL)
- where += sprintf(where, "%s[",s);
- else if(g_options.scriptVersion < 8 && !(se->data & 0xF000) &&
- (s = getVarName(se->data & 0xFFF)) != NULL)
- where += sprintf(where, "%s[",s);
- else
- where += sprintf(where, "array%ld[", se->data);
where = se_astext(se->left, where);
where = strecpy(where, "][");
- where = se_astext(se->right, where);
- where = strecpy(where, "]");
- } else {
- if(g_options.scriptVersion == 8 && !(se->data & 0xF0000000) &&
- (s = getVarName(se->data & 0xFFFFFFF)) != NULL)
- where += sprintf(where, "%s[",s);
- else if(g_options.scriptVersion < 8 && !(se->data & 0xF000) &&
- (s = getVarName(se->data & 0xFFF)) != NULL)
- where += sprintf(where, "%s[",s);
- else
- where += sprintf(where, "array%ld[", se->data);
- where = se_astext(se->right, where);
- where = strecpy(where, "]");
}
+
+ where = se_astext(se->right, where);
+ where = strecpy(where, "]");
break;
case seUnary:
where += sprintf(where, "%s", oper_list[se->data]);
@@ -970,6 +961,10 @@
strcpy(e, ")");
se_free(se);
} else {
+ // FIXME: Evil hack: We re-push DUPs, instead of killing
+ // them. We do this to support switch-case constructs
+ // (see comment at the start of this file) w/o applying a full
+ // flow analysis (which would normally be required).
push(se);
}
}
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