Nasty results from decompilers? From "Hungry Goblin":
define game <Hungry Goblin>
asl-version <350>
gametype singleplayer
start <den>
game author <Boze>
game version <1>
game copyright <� Dave Aldridge 2006>
game info <Created with QDK 3.53>
default fontname <Papyrus>
default fontsize <24>
background <black>
foreground <green>
startscript set numeric <trolltimer; 10>
afterturn {
if flag <trollhere> then {
give <troll>
lose <troll>
}
if is <%trolltimer%;lt=;0> then {
msg <You didn't get away from the big troll. He bashes you on the head and wanders off. Ouch! >
inc <tummy; 10>
flag off <trollhere>
move <troll; swamp 2>
set numeric <trolltimer; 10>
}
if here <troll> then {
dec <trolltimer>
msg <You really must get away from that big ugly troll or he is liable to gobble you. Hurry little goblin, run!>
flag on <trollhere>
}
inc <tummy; 1>
if is <%tummy%;gt=;100> then playerlose
if is <%tummy%;lt=;0> then playerwin
}
command <eat #@food#> if got <#@food#> and action <#@food#; eat> then doaction <#@food#; eat> else msg <You are holding nothing edible.>
command <eat> msg <What would you like to eat?>
command <hide in #@hidingplace#> if here <#@hidingplace#> and action <#@hidingplace#; hides> then doaction <#@hidingplace#; hides> else msg <You need to find a better hiding place.>
command <hide> msg <You need to find a better hiding place.>
command <wear #@clothing#> if got <#@clothing#> and action <#@clothing#; wear> then doaction <#@clothing#; wear> else msg <You don't have a thing to wear.>
command <wear> msg <What do you want to wear, little goblin?>
error <badcommand; Please use commands a little goblin can understand. Type HELP for a list.>
error <badthing; You can't see that here.>
error <noitem; Silly Goblin. You don't have that.>
error <badgo; I don't understand your use of 'GO' - you must either GO in some direction, or GO TO a place.>
error <baditem; You can't see that anywhere.>
error <defaultexamine; Can you eat it? That's all that matters.>
error <defaultlook; Can you eat it? That's all that matters.>
...
Qcompile doesn't do that much; roughly:
1) Remove comments (irreversible)
2) Remove parened comparisons: convert "( %a% < 100 )" to "is <%a%; lt; 100>" (not reversed, but I could easily do so).
3) Deinline braces: convert "if A then { // X // Y // }" to "if A then do <!intproc1> ... define procedure <!intproc1> // X // Y // end define" (reversed by uncas)
4) Obfuscate the final result. (reversed).