papermario
papermario copied to clipboard
Fix symbol resolution
https://github.com/pmret/papermario/pull/271/commits/3d9662113b147dcebffdcae01ce342992e7b01b3
Bad references to world data outside of world:
func_80242014_8B2084 = 0x80242014;
func_8024206C_83386C = 0x8024206C;
D_8024C098_C09918 = 0x8024C098;
D_8024C100_C09980 = 0x8024C100;
func_80241FE8_D3C5B8 = 0x80241FE8;
arn_03_802429D4 = 0x802429D4;
dgb_18_idle_80242A24 = 0x80242A24;
flo_00_npcAISettings_8024286C = 0x8024286C;
flo_00_npcSettings_802428BC = 0x802428BC;
func_80242AD4_825D94 = 0x80242AD4;
func_80241FBC_A1D0BC = 0x80241FBC;
D_8024253C_AB46AC = 0x8024253C;
dgb_16_npcGroup_802425EC = 0x802425EC;
flo_14_updateTexturePan_80242460 = 0x80242460;
dgb_00_init_80241F70 = 0x80241F70;
D_802465C8_915C78 = 0x802465C8;
kzn_09_UnkNpcAIFunc12 = 0x80242B74;
D_80242510_D95450 = 0x80242510;
D_80242568_A4EF88 = 0x80242568;
D_80242618_9800E8 = 0x80242618;
func_80242358_DCF028 = 0x80242358;
D_802423B0_9EDBA0 = 0x802423B0;
func_80242384_833B84 = 0x80242384;
mac_02_SetCamVfov = 0x8024232C;
sam_06_PartnerSuspendAbilityScript = 0x802420C4;
mac_05_UnkYawFunc = 0x80242894;
func_802426A0_8B2710 = 0x802426A0;
func_80242434_9D9454 = 0x80242434;
jan_02_TransformFoliage = 0x80242750;
Would be cool to link each overlay separately to prevent this issue entirely at compile-time. Tangentially related to https://github.com/ethteck/splat/issues/71 and https://github.com/Mr-Wiseguy/libmario
What issue do you mean? The reason the wrong symbols are sometimes chosen is because during disassembly, splat doesn't know exactly, for each overlay, each specific other overlay that's loaded in at runtime
We could make symbols besides main and config in maps overlays, for example, totally invisible to other objects. This would theoretically get rid of the need for N() and also make referencing overlay symbols outside of the overlay as we currently do a hard link-time error (meaning the problems are found for us).