UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.15k stars 223 forks source link

Rounding errors when reassembling #53

Closed krzys-h closed 3 years ago

krzys-h commented 5 years ago

Not sure there is much that can be done about it, but I'll mention this here anyway since the goal of this project was to never do unintended modifications on the bytecode level This instruction (from Deltarune, if you want to check yourself):

003C9904 00048: push.d 31.4159265358979

Originally is encoded as:

00 00 00 C0  5E 38 55 29 7A 6A 3F 40

but after disassembling and reassembling turns into:

00 00 00 C0  55 38 55 29 7A 6A 3F 40
Kneesnap commented 5 years ago

What script is this in?

Kneesnap commented 5 years ago

scr_selectionmatrix

Kneesnap commented 5 years ago

Interesting. v1.00 PC. Code: scr_selectionmatrix.

When decompiled and recompiled, it produces the proper bytes. When re-assembled as-is, it produces the improper bytes.

Kneesnap commented 5 years ago

Oddly, upon loading the win after saving, it loads the proper assembly.

colinator27 commented 3 years ago

This was fixed at some point it seems. Tested on scr_selectionmatrix, it seems it has an extra digit of precision now.