Comment by groundzeros2015
3 hours ago
I opened a file at random. This looks more like emulating the behavior in compilable C syntax rather than recovering the game's programming
void Em1eWeaponSet(cEm10* em) { Em10Work* w = EM10_WK(em);
w->mot[41] = 0;
w->mot[42] = 0;
…
w->mot[62] = 0;
w->mot[63] = ARC(0x26C);
w->mot[64] = ARC(0x26D);
w->mot[65] = ARC(0x276);
w->mot[66] = ARC(0x277);
w->mot[67] = 0;
w->mot[68] = 0;
w->mot[69] = ARC(0x26A);
w->mot[70] = ARC(0x26B);
w->mot[71] = ARC(0x270);
w->mot[72] = ARC(0x271);
w->mot[73] = ARC(0x272);
w->mot[74] = ARC(0x273);
w->mot[75] = ARC(0x274);
w->mot[76] = ARC(0x275);
w->mot[77] = 0;
w->mot[78] = 0;
}
There is more normal looking code in other files. It sounds like the original game had animation data (or similar) embedded in the C code.
I just checked a few more. It looks it can sometimes tell the intent of a stack variable and give it a name. But anything working with data looks like above.
Not a surprise. Now the fun works starts: Deriving semantics from psuedo-assembly.