papermario
papermario copied to clipboard
Handle dead symbols with dark magic
See also: #432
A few functions, such as func_80242EC4_EA37C4, use a dead version of the libultra sqrtf, but codegen does not match with the typical macro magic we do with dead.h currently. I believe this is because sqrtf is an intrinsic function and gets optimised differently.
If this is the case, there is no way for us to tell the compiler to treat "dead_sqrtf" as if it were the real sqrtf. These functions cannot be matched right now.
My proposed solution is:
- Use sqrtf in the source code
- Remove
dead.h, compile 'dead' maps normally - Perform objcopy dark magic to reroute function X to dead_X