[ scummvm-Patches-1037397 ] Descumm misdecompilation fix
SourceForge.net
noreply at sourceforge.net
Thu Sep 30 02:32:05 CEST 2004
Patches item #1037397, was opened at 2004-09-30 02:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1037397&group_id=37116
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Fach-Pedersen (madm00se)
Assigned to: Nobody/Anonymous (nobody)
Summary: Descumm misdecompilation fix
Initial Comment:
This patch does a few things all-in-one. I can split it
up if anybody wants me to.
Most importantly, it fixes the misdecompilation of the
case from sam&max script 52 mentioned in the comment at
the top of descumm.cpp (The "while" and "else"
detection code interference.)
Other than that it:
* Makes us output "arrayXXX[...]" instead of
"array-XXX[...]" because that's what we do with all
other types of variables and it's easier to compile.
* Makes us output "else if" in places we didn't before.
* Makes us output "var++" and "var--" instead of "var
+= 1" and "var += -1", since SCUMM doesn't support
values other than +/- 1.
* Makes us output "unless (condition)" instead of "if
(!(condition))" and "until (condition)" instead of
"while (!(condition))" because it's prettier.
* And finally (and most controversially), makes us
output the "break" keyword where needed (with it's
usual c meaning for breaking out of loops) and turns
the current "break()" into "breakHere()" to avoid
conflicts with the keyword. It's already called
breakHere() in v8, which is why I chose it, but maybe
we should change it to "yield()" or something to make
the keyword and the function more distinct?
I've got testcases if anybody wants to them.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1037397&group_id=37116
More information about the Scummvm-tracker
mailing list