diff --git a/.vscode/settings.json b/.vscode/settings.json index 869206fe21..a9f885c65d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,4 +11,5 @@ "-Isrc", "-D_LANGUAGE_C", ], + "python.pythonPath": "/usr/bin/python3", } diff --git a/asm/nonmatchings/code_1f580_len_1940/GetOwnerEncounterTrigger.s b/asm/nonmatchings/code_1f580_len_1940/GetOwnerEncounterTrigger.s deleted file mode 100644 index e8ac70d521..0000000000 --- a/asm/nonmatchings/code_1f580_len_1940/GetOwnerEncounterTrigger.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel GetOwnerEncounterTrigger -/* 1FA00 80044600 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 1FA04 80044604 AFBF0010 */ sw $ra, 0x10($sp) -/* 1FA08 80044608 8C82000C */ lw $v0, 0xc($a0) -/* 1FA0C 8004460C 8C830148 */ lw $v1, 0x148($a0) -/* 1FA10 80044610 8C450000 */ lw $a1, ($v0) -/* 1FA14 80044614 0C0B2026 */ jal set_variable -/* 1FA18 80044618 80660005 */ lb $a2, 5($v1) -/* 1FA1C 8004461C 8FBF0010 */ lw $ra, 0x10($sp) -/* 1FA20 80044620 24020002 */ addiu $v0, $zero, 2 -/* 1FA24 80044624 03E00008 */ jr $ra -/* 1FA28 80044628 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_f4c60_len_4300/Disable8bitMario.s b/asm/nonmatchings/code_F5750/Disable8bitMario.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/Disable8bitMario.s rename to asm/nonmatchings/code_F5750/Disable8bitMario.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/DisablePartner.s b/asm/nonmatchings/code_F5750/DisablePartner.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/DisablePartner.s rename to asm/nonmatchings/code_F5750/DisablePartner.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/DisablePulseStone.s b/asm/nonmatchings/code_F5750/DisablePulseStone.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/DisablePulseStone.s rename to asm/nonmatchings/code_F5750/DisablePulseStone.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/EnablePartner.s b/asm/nonmatchings/code_F5750/EnablePartner.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/EnablePartner.s rename to asm/nonmatchings/code_F5750/EnablePartner.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/FullyRestoreSP.s b/asm/nonmatchings/code_F5750/FullyRestoreSP.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/FullyRestoreSP.s rename to asm/nonmatchings/code_F5750/FullyRestoreSP.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/GetCurrentPartner.s b/asm/nonmatchings/code_F5750/GetCurrentPartner.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/GetCurrentPartner.s rename to asm/nonmatchings/code_F5750/GetCurrentPartner.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/GetPlayerTargetYaw.s b/asm/nonmatchings/code_F5750/GetPlayerTargetYaw.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/GetPlayerTargetYaw.s rename to asm/nonmatchings/code_F5750/GetPlayerTargetYaw.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/InterpPlayerYaw.s b/asm/nonmatchings/code_F5750/InterpPlayerYaw.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/InterpPlayerYaw.s rename to asm/nonmatchings/code_F5750/InterpPlayerYaw.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/PlaySoundAtPlayer.s b/asm/nonmatchings/code_F5750/PlaySoundAtPlayer.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/PlaySoundAtPlayer.s rename to asm/nonmatchings/code_F5750/PlaySoundAtPlayer.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/PlayerFaceNpc.s b/asm/nonmatchings/code_F5750/PlayerFaceNpc.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/PlayerFaceNpc.s rename to asm/nonmatchings/code_F5750/PlayerFaceNpc.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/PlayerMoveTo.s b/asm/nonmatchings/code_F5750/PlayerMoveTo.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/PlayerMoveTo.s rename to asm/nonmatchings/code_F5750/PlayerMoveTo.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerActionState.s b/asm/nonmatchings/code_F5750/SetPlayerActionState.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerActionState.s rename to asm/nonmatchings/code_F5750/SetPlayerActionState.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerAnimation.s b/asm/nonmatchings/code_F5750/SetPlayerAnimation.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerAnimation.s rename to asm/nonmatchings/code_F5750/SetPlayerAnimation.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerAnimationSpeed.s b/asm/nonmatchings/code_F5750/SetPlayerAnimationSpeed.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerAnimationSpeed.s rename to asm/nonmatchings/code_F5750/SetPlayerAnimationSpeed.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerCollisionSize.s b/asm/nonmatchings/code_F5750/SetPlayerCollisionSize.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerCollisionSize.s rename to asm/nonmatchings/code_F5750/SetPlayerCollisionSize.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerFlagBits.s b/asm/nonmatchings/code_F5750/SetPlayerFlagBits.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerFlagBits.s rename to asm/nonmatchings/code_F5750/SetPlayerFlagBits.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerJumpscale.s b/asm/nonmatchings/code_F5750/SetPlayerJumpscale.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerJumpscale.s rename to asm/nonmatchings/code_F5750/SetPlayerJumpscale.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerPos.s b/asm/nonmatchings/code_F5750/SetPlayerPos.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerPos.s rename to asm/nonmatchings/code_F5750/SetPlayerPos.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetPlayerSpeed.s b/asm/nonmatchings/code_F5750/SetPlayerSpeed.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/SetPlayerSpeed.s rename to asm/nonmatchings/code_F5750/SetPlayerSpeed.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/UseEntryHeading.s b/asm/nonmatchings/code_F5750/UseEntryHeading.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/UseEntryHeading.s rename to asm/nonmatchings/code_F5750/UseEntryHeading.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/UseExitHeading.s b/asm/nonmatchings/code_F5750/UseExitHeading.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/UseExitHeading.s rename to asm/nonmatchings/code_F5750/UseExitHeading.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D1270.s b/asm/nonmatchings/code_F5750/func_802D1270.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D1270.s rename to asm/nonmatchings/code_F5750/func_802D1270.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D1380.s b/asm/nonmatchings/code_F5750/func_802D1380.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D1380.s rename to asm/nonmatchings/code_F5750/func_802D1380.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2148.s b/asm/nonmatchings/code_F5750/func_802D2148.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2148.s rename to asm/nonmatchings/code_F5750/func_802D2148.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D23F8.s b/asm/nonmatchings/code_F5750/func_802D23F8.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D23F8.s rename to asm/nonmatchings/code_F5750/func_802D23F8.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D244C.s b/asm/nonmatchings/code_F5750/func_802D244C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D244C.s rename to asm/nonmatchings/code_F5750/func_802D244C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2484.s b/asm/nonmatchings/code_F5750/func_802D2484.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2484.s rename to asm/nonmatchings/code_F5750/func_802D2484.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D249C.s b/asm/nonmatchings/code_F5750/func_802D249C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D249C.s rename to asm/nonmatchings/code_F5750/func_802D249C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D24F4.s b/asm/nonmatchings/code_F5750/func_802D24F4.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D24F4.s rename to asm/nonmatchings/code_F5750/func_802D24F4.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2508.s b/asm/nonmatchings/code_F5750/func_802D2508.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2508.s rename to asm/nonmatchings/code_F5750/func_802D2508.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2520.s b/asm/nonmatchings/code_F5750/func_802D2520.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2520.s rename to asm/nonmatchings/code_F5750/func_802D2520.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D286C.s b/asm/nonmatchings/code_F5750/func_802D286C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D286C.s rename to asm/nonmatchings/code_F5750/func_802D286C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2884.s b/asm/nonmatchings/code_F5750/func_802D2884.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2884.s rename to asm/nonmatchings/code_F5750/func_802D2884.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2B50.s b/asm/nonmatchings/code_F5750/func_802D2B50.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2B50.s rename to asm/nonmatchings/code_F5750/func_802D2B50.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2B6C.s b/asm/nonmatchings/code_F5750/func_802D2B6C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2B6C.s rename to asm/nonmatchings/code_F5750/func_802D2B6C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2C14.s b/asm/nonmatchings/code_F5750/func_802D2C14.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2C14.s rename to asm/nonmatchings/code_F5750/func_802D2C14.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2C40.s b/asm/nonmatchings/code_F5750/func_802D2C40.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2C40.s rename to asm/nonmatchings/code_F5750/func_802D2C40.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2D30.s b/asm/nonmatchings/code_F5750/func_802D2D30.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2D30.s rename to asm/nonmatchings/code_F5750/func_802D2D30.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2ED4.s b/asm/nonmatchings/code_F5750/func_802D2ED4.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2ED4.s rename to asm/nonmatchings/code_F5750/func_802D2ED4.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2F34.s b/asm/nonmatchings/code_F5750/func_802D2F34.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2F34.s rename to asm/nonmatchings/code_F5750/func_802D2F34.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D2FCC.s b/asm/nonmatchings/code_F5750/func_802D2FCC.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D2FCC.s rename to asm/nonmatchings/code_F5750/func_802D2FCC.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3028.s b/asm/nonmatchings/code_F5750/func_802D3028.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3028.s rename to asm/nonmatchings/code_F5750/func_802D3028.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D31E0.s b/asm/nonmatchings/code_F5750/func_802D31E0.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D31E0.s rename to asm/nonmatchings/code_F5750/func_802D31E0.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3398.s b/asm/nonmatchings/code_F5750/func_802D3398.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3398.s rename to asm/nonmatchings/code_F5750/func_802D3398.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D33D4.s b/asm/nonmatchings/code_F5750/func_802D33D4.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D33D4.s rename to asm/nonmatchings/code_F5750/func_802D33D4.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3474.s b/asm/nonmatchings/code_F5750/func_802D3474.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3474.s rename to asm/nonmatchings/code_F5750/func_802D3474.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D354C.s b/asm/nonmatchings/code_F5750/func_802D354C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D354C.s rename to asm/nonmatchings/code_F5750/func_802D354C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3624.s b/asm/nonmatchings/code_F5750/func_802D3624.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3624.s rename to asm/nonmatchings/code_F5750/func_802D3624.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3674.s b/asm/nonmatchings/code_F5750/func_802D3674.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3674.s rename to asm/nonmatchings/code_F5750/func_802D3674.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D36E0.s b/asm/nonmatchings/code_F5750/func_802D36E0.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D36E0.s rename to asm/nonmatchings/code_F5750/func_802D36E0.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D378C.s b/asm/nonmatchings/code_F5750/func_802D378C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D378C.s rename to asm/nonmatchings/code_F5750/func_802D378C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3840.s b/asm/nonmatchings/code_F5750/func_802D3840.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3840.s rename to asm/nonmatchings/code_F5750/func_802D3840.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D38EC.s b/asm/nonmatchings/code_F5750/func_802D38EC.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D38EC.s rename to asm/nonmatchings/code_F5750/func_802D38EC.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3998.s b/asm/nonmatchings/code_F5750/func_802D3998.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3998.s rename to asm/nonmatchings/code_F5750/func_802D3998.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D39FC.s b/asm/nonmatchings/code_F5750/func_802D39FC.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D39FC.s rename to asm/nonmatchings/code_F5750/func_802D39FC.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3A60.s b/asm/nonmatchings/code_F5750/func_802D3A60.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3A60.s rename to asm/nonmatchings/code_F5750/func_802D3A60.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3C58.s b/asm/nonmatchings/code_F5750/func_802D3C58.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3C58.s rename to asm/nonmatchings/code_F5750/func_802D3C58.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3EB8.s b/asm/nonmatchings/code_F5750/func_802D3EB8.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3EB8.s rename to asm/nonmatchings/code_F5750/func_802D3EB8.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3F74.s b/asm/nonmatchings/code_F5750/func_802D3F74.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3F74.s rename to asm/nonmatchings/code_F5750/func_802D3F74.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D3FC8.s b/asm/nonmatchings/code_F5750/func_802D3FC8.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D3FC8.s rename to asm/nonmatchings/code_F5750/func_802D3FC8.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D4050.s b/asm/nonmatchings/code_F5750/func_802D4050.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D4050.s rename to asm/nonmatchings/code_F5750/func_802D4050.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D4164.s b/asm/nonmatchings/code_F5750/func_802D4164.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D4164.s rename to asm/nonmatchings/code_F5750/func_802D4164.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D417C.s b/asm/nonmatchings/code_F5750/func_802D417C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D417C.s rename to asm/nonmatchings/code_F5750/func_802D417C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D420C.s b/asm/nonmatchings/code_F5750/func_802D420C.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D420C.s rename to asm/nonmatchings/code_F5750/func_802D420C.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D42AC.s b/asm/nonmatchings/code_F5750/func_802D42AC.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D42AC.s rename to asm/nonmatchings/code_F5750/func_802D42AC.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D4364.s b/asm/nonmatchings/code_F5750/func_802D4364.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D4364.s rename to asm/nonmatchings/code_F5750/func_802D4364.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D43AC.s b/asm/nonmatchings/code_F5750/func_802D43AC.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D43AC.s rename to asm/nonmatchings/code_F5750/func_802D43AC.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D43D0.s b/asm/nonmatchings/code_F5750/func_802D43D0.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D43D0.s rename to asm/nonmatchings/code_F5750/func_802D43D0.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D43F4.s b/asm/nonmatchings/code_F5750/func_802D43F4.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D43F4.s rename to asm/nonmatchings/code_F5750/func_802D43F4.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D4434.s b/asm/nonmatchings/code_F5750/func_802D4434.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D4434.s rename to asm/nonmatchings/code_F5750/func_802D4434.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D4488.s b/asm/nonmatchings/code_F5750/func_802D4488.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D4488.s rename to asm/nonmatchings/code_F5750/func_802D4488.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/func_802D4560.s b/asm/nonmatchings/code_F5750/func_802D4560.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/func_802D4560.s rename to asm/nonmatchings/code_F5750/func_802D4560.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/player_jump.s b/asm/nonmatchings/code_F5750/player_jump.s similarity index 100% rename from asm/nonmatchings/code_f4c60_len_4300/player_jump.s rename to asm/nonmatchings/code_F5750/player_jump.s diff --git a/asm/nonmatchings/code_f4c60_len_4300/SetMessageValue.s b/asm/nonmatchings/code_f4c60_len_4300/SetMessageValue.s deleted file mode 100644 index c5ecb2358a..0000000000 --- a/asm/nonmatchings/code_f4c60_len_4300/SetMessageValue.s +++ /dev/null @@ -1,27 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel SetMessageValue -/* F56F4 802D0D44 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* F56F8 802D0D48 AFB10014 */ sw $s1, 0x14($sp) -/* F56FC 802D0D4C 0080882D */ daddu $s1, $a0, $zero -/* F5700 802D0D50 AFBF0018 */ sw $ra, 0x18($sp) -/* F5704 802D0D54 AFB00010 */ sw $s0, 0x10($sp) -/* F5708 802D0D58 8E30000C */ lw $s0, 0xc($s1) -/* F570C 802D0D5C 8E050000 */ lw $a1, ($s0) -/* F5710 802D0D60 0C0B1EAF */ jal get_variable -/* F5714 802D0D64 26100004 */ addiu $s0, $s0, 4 -/* F5718 802D0D68 0220202D */ daddu $a0, $s1, $zero -/* F571C 802D0D6C 8E050000 */ lw $a1, ($s0) -/* F5720 802D0D70 0C0B1EAF */ jal get_variable -/* F5724 802D0D74 0040802D */ daddu $s0, $v0, $zero -/* F5728 802D0D78 0200202D */ daddu $a0, $s0, $zero -/* F572C 802D0D7C 0C0496FA */ jal set_message_value -/* F5730 802D0D80 0040282D */ daddu $a1, $v0, $zero -/* F5734 802D0D84 8FBF0018 */ lw $ra, 0x18($sp) -/* F5738 802D0D88 8FB10014 */ lw $s1, 0x14($sp) -/* F573C 802D0D8C 8FB00010 */ lw $s0, 0x10($sp) -/* F5740 802D0D90 24020002 */ addiu $v0, $zero, 2 -/* F5744 802D0D94 03E00008 */ jr $ra -/* F5748 802D0D98 27BD0020 */ addiu $sp, $sp, 0x20 -/* F574C 802D0D9C 00000000 */ nop diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s b/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s deleted file mode 100644 index 6d1f2a7956..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s +++ /dev/null @@ -1,15 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel RemoveEffect -/* FC494 802D7AE4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FC498 802D7AE8 AFBF0010 */ sw $ra, 0x10($sp) -/* FC49C 802D7AEC 8C82000C */ lw $v0, 0xc($a0) -/* FC4A0 802D7AF0 0C0B1EAF */ jal get_variable -/* FC4A4 802D7AF4 8C450000 */ lw $a1, ($v0) -/* FC4A8 802D7AF8 0C016914 */ jal remove_effect -/* FC4AC 802D7AFC 0040202D */ daddu $a0, $v0, $zero -/* FC4B0 802D7B00 8FBF0010 */ lw $ra, 0x10($sp) -/* FC4B4 802D7B04 24020002 */ addiu $v0, $zero, 2 -/* FC4B8 802D7B08 03E00008 */ jr $ra -/* FC4BC 802D7B0C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B10.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B10.s deleted file mode 100644 index 7f957d38e0..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B10.s +++ /dev/null @@ -1,17 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D7B10 -/* FC4C0 802D7B10 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FC4C4 802D7B14 AFBF0010 */ sw $ra, 0x10($sp) -/* FC4C8 802D7B18 8C82000C */ lw $v0, 0xc($a0) -/* FC4CC 802D7B1C 0C0B1EAF */ jal get_variable -/* FC4D0 802D7B20 8C450000 */ lw $a1, ($v0) -/* FC4D4 802D7B24 0040202D */ daddu $a0, $v0, $zero -/* FC4D8 802D7B28 8C830000 */ lw $v1, ($a0) -/* FC4DC 802D7B2C 34630010 */ ori $v1, $v1, 0x10 -/* FC4E0 802D7B30 AC830000 */ sw $v1, ($a0) -/* FC4E4 802D7B34 8FBF0010 */ lw $ra, 0x10($sp) -/* FC4E8 802D7B38 24020002 */ addiu $v0, $zero, 2 -/* FC4EC 802D7B3C 03E00008 */ jr $ra -/* FC4F0 802D7B40 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B44.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B44.s deleted file mode 100644 index 2f2416dfee..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B44.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D7B44 -/* FC4F4 802D7B44 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FC4F8 802D7B48 AFBF0010 */ sw $ra, 0x10($sp) -/* FC4FC 802D7B4C 8C82000C */ lw $v0, 0xc($a0) -/* FC500 802D7B50 0C0B1EAF */ jal get_variable -/* FC504 802D7B54 8C450000 */ lw $a1, ($v0) -/* FC508 802D7B58 8C44000C */ lw $a0, 0xc($v0) -/* FC50C 802D7B5C 2403000A */ addiu $v1, $zero, 0xa -/* FC510 802D7B60 AC830014 */ sw $v1, 0x14($a0) -/* FC514 802D7B64 8FBF0010 */ lw $ra, 0x10($sp) -/* FC518 802D7B68 24020002 */ addiu $v0, $zero, 2 -/* FC51C 802D7B6C 03E00008 */ jr $ra -/* FC520 802D7B70 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B74.s b/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B74.s deleted file mode 100644 index e7a55d001f..0000000000 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/func_802D7B74.s +++ /dev/null @@ -1,16 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802D7B74 -/* FC524 802D7B74 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* FC528 802D7B78 AFBF0010 */ sw $ra, 0x10($sp) -/* FC52C 802D7B7C 8C82000C */ lw $v0, 0xc($a0) -/* FC530 802D7B80 0C0B1EAF */ jal get_variable -/* FC534 802D7B84 8C450000 */ lw $a1, ($v0) -/* FC538 802D7B88 8C44000C */ lw $a0, 0xc($v0) -/* FC53C 802D7B8C 24030005 */ addiu $v1, $zero, 5 -/* FC540 802D7B90 AC830030 */ sw $v1, 0x30($a0) -/* FC544 802D7B94 8FBF0010 */ lw $ra, 0x10($sp) -/* FC548 802D7B98 24020002 */ addiu $v0, $zero, 2 -/* FC54C 802D7B9C 03E00008 */ jr $ra -/* FC550 802D7BA0 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/os/code_45df0_len_970/func_8006AA34.s b/asm/nonmatchings/os/code_45df0_len_970/func_8006AA34.s deleted file mode 100644 index e191a259ea..0000000000 --- a/asm/nonmatchings/os/code_45df0_len_970/func_8006AA34.s +++ /dev/null @@ -1,68 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_8006AA34 -/* 45E34 8006AA34 03404021 */ addu $t0, $k0, $zero -/* 45E38 8006AA38 3C1A8009 */ lui $k0, 0x8009 -/* 45E3C 8006AA3C 8F5A4660 */ lw $k0, 0x4660($k0) -/* 45E40 8006AA40 DD090020 */ ld $t1, 0x20($t0) -/* 45E44 8006AA44 FF490020 */ sd $t1, 0x20($k0) -/* 45E48 8006AA48 DD090118 */ ld $t1, 0x118($t0) -/* 45E4C 8006AA4C FF490118 */ sd $t1, 0x118($k0) -/* 45E50 8006AA50 DD090058 */ ld $t1, 0x58($t0) -/* 45E54 8006AA54 FF490058 */ sd $t1, 0x58($k0) -/* 45E58 8006AA58 DD090060 */ ld $t1, 0x60($t0) -/* 45E5C 8006AA5C FF490060 */ sd $t1, 0x60($k0) -/* 45E60 8006AA60 DD090068 */ ld $t1, 0x68($t0) -/* 45E64 8006AA64 FF490068 */ sd $t1, 0x68($k0) -/* 45E68 8006AA68 FF420028 */ sd $v0, 0x28($k0) -/* 45E6C 8006AA6C FF430030 */ sd $v1, 0x30($k0) -/* 45E70 8006AA70 FF440038 */ sd $a0, 0x38($k0) -/* 45E74 8006AA74 FF450040 */ sd $a1, 0x40($k0) -/* 45E78 8006AA78 FF460048 */ sd $a2, 0x48($k0) -/* 45E7C 8006AA7C FF470050 */ sd $a3, 0x50($k0) -/* 45E80 8006AA80 FF4B0070 */ sd $t3, 0x70($k0) -/* 45E84 8006AA84 FF4C0078 */ sd $t4, 0x78($k0) -/* 45E88 8006AA88 FF4D0080 */ sd $t5, 0x80($k0) -/* 45E8C 8006AA8C FF4E0088 */ sd $t6, 0x88($k0) -/* 45E90 8006AA90 FF4F0090 */ sd $t7, 0x90($k0) -/* 45E94 8006AA94 FF500098 */ sd $s0, 0x98($k0) -/* 45E98 8006AA98 FF5100A0 */ sd $s1, 0xa0($k0) -/* 45E9C 8006AA9C FF5200A8 */ sd $s2, 0xa8($k0) -/* 45EA0 8006AAA0 FF5300B0 */ sd $s3, 0xb0($k0) -/* 45EA4 8006AAA4 FF5400B8 */ sd $s4, 0xb8($k0) -/* 45EA8 8006AAA8 FF5500C0 */ sd $s5, 0xc0($k0) -/* 45EAC 8006AAAC FF5600C8 */ sd $s6, 0xc8($k0) -/* 45EB0 8006AAB0 FF5700D0 */ sd $s7, 0xd0($k0) -/* 45EB4 8006AAB4 FF5800D8 */ sd $t8, 0xd8($k0) -/* 45EB8 8006AAB8 FF5900E0 */ sd $t9, 0xe0($k0) -/* 45EBC 8006AABC FF5C00E8 */ sd $gp, 0xe8($k0) -/* 45EC0 8006AAC0 FF5D00F0 */ sd $sp, 0xf0($k0) -/* 45EC4 8006AAC4 FF5E00F8 */ sd $fp, 0xf8($k0) -/* 45EC8 8006AAC8 FF5F0100 */ sd $ra, 0x100($k0) -/* 45ECC 8006AACC 00004012 */ mflo $t0 -/* 45ED0 8006AAD0 FF480108 */ sd $t0, 0x108($k0) -/* 45ED4 8006AAD4 00004010 */ mfhi $t0 -/* 45ED8 8006AAD8 FF480110 */ sd $t0, 0x110($k0) -/* 45EDC 8006AADC 8F5B0118 */ lw $k1, 0x118($k0) -/* 45EE0 8006AAE0 3369FF00 */ andi $t1, $k1, 0xff00 -/* 45EE4 8006AAE4 11200013 */ beqz $t1, savercp -/* 45EE8 8006AAE8 00000000 */ nop -/* 45EEC 8006AAEC 3C088009 */ lui $t0, 0x8009 -/* 45EF0 8006AAF0 25085900 */ addiu $t0, $t0, 0x5900 -/* 45EF4 8006AAF4 8D080000 */ lw $t0, ($t0) -/* 45EF8 8006AAF8 2401FFFF */ addiu $at, $zero, -1 -/* 45EFC 8006AAFC 01015026 */ xor $t2, $t0, $at -/* 45F00 8006AB00 314AFF00 */ andi $t2, $t2, 0xff00 -/* 45F04 8006AB04 012A6025 */ or $t4, $t1, $t2 -/* 45F08 8006AB08 3C01FFFF */ lui $at, 0xffff -/* 45F0C 8006AB0C 342100FF */ ori $at, $at, 0xff -/* 45F10 8006AB10 03615824 */ and $t3, $k1, $at -/* 45F14 8006AB14 016C5825 */ or $t3, $t3, $t4 -/* 45F18 8006AB18 AF4B0118 */ sw $t3, 0x118($k0) -/* 45F1C 8006AB1C 3108FF00 */ andi $t0, $t0, 0xff00 -/* 45F20 8006AB20 01284824 */ and $t1, $t1, $t0 -/* 45F24 8006AB24 3C01FFFF */ lui $at, 0xffff -/* 45F28 8006AB28 342100FF */ ori $at, $at, 0xff -/* 45F2C 8006AB2C 0361D824 */ and $k1, $k1, $at -/* 45F30 8006AB30 0369D825 */ or $k1, $k1, $t1 diff --git a/coverage.py b/coverage.py index 61b9949fb8..31027187bf 100755 --- a/coverage.py +++ b/coverage.py @@ -34,7 +34,7 @@ def funcs_in_c(text): return (match.group(1) for match in c_func_pattern.finditer(text)) asm_func_pattern = re.compile( - r"INCLUDE_(?:API_)?ASM\([^,]+, ([^,)]+)", + r"INCLUDE_ASM\([^,]+, [^,]+, ([^,)]+)", re.MULTILINE ) def include_asms_in_c(text): diff --git a/include/common_structs.h b/include/common_structs.h index f7f7b244ab..f290e68a32 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -730,8 +730,8 @@ typedef struct StaticItem { /* 0x14 */ s32 itemString; /* 0x18 */ s16 typeFlags; /* 0x1A */ u8 moveID; - /* 0x1B */ u8 potencyA; - /* 0x1C */ u8 potencyB; + /* 0x1B */ s8 potencyA; + /* 0x1C */ s8 potencyB; /* 0x1D */ char unk_1D[3]; } StaticItem; // size = 0x20 @@ -804,7 +804,9 @@ typedef struct PrintContext { /* 0x45A */ char unk_45A[45]; /* 0x487 */ u8 unkArraySize; /* 0x488 */ s16 unkArrayunkLength[4]; - /* 0x490 */ char unk_490[108]; + /* 0x490 */ char unk_490[0x58]; + /* 0x4E8 */ u8 unk_4E8; + /* 0x4E9 */ char unk_4E9[19]; /* 0x4FC */ s32 stateFlags; /* 0x500 */ char unk_500[9]; /* 0x509 */ u8 lerpElpasedTime; diff --git a/include/si.h b/include/si.h index d44c845ae4..efb6b05ca1 100644 --- a/include/si.h +++ b/include/si.h @@ -22,10 +22,4 @@ typedef s32 ApiStatus; #define API_FUN(NAME) ApiStatus (*NAME)(struct ScriptInstance* script, s32 isInitialCall) -#ifndef SPLAT -#define INCLUDE_API_ASM(FOLDER, NAME) INCLUDE_ASM(ApiStatus, FOLDER, NAME, struct ScriptInstance* script, s32 isInitialCall) -#else -#define INCLUDE_API_ASM(FOLDER, NAME) -#endif - #endif diff --git a/include/variables.h b/include/variables.h index 6d9d81015d..f9f7cc8d55 100644 --- a/include/variables.h +++ b/include/variables.h @@ -74,6 +74,7 @@ extern BackgroundHeader gBackgroundImage; extern s8 D_8014F12F; extern PrintContext* gCurrentPrintContext; +extern s32 D_802DB264; extern PrintContext* D_802DB268; // Triggers diff --git a/papermario.ld b/papermario.ld index 7f99335930..1252064ba6 100644 --- a/papermario.ld +++ b/papermario.ld @@ -221,6 +221,7 @@ SECTIONS build/src/code_ef070_len_3400.o(.text); build/src/code_f2470_len_27f0.o(.text); build/src/code_f4c60_len_4300.o(.text); + build/src/code_F5750.o(.text); build/src/code_f8f60_len_1560.o(.text); build/src/code_fa4c0_len_3bf0.o(.text); build/src/code_fe0b0_len_5a0.o(.text); diff --git a/src/code_1a1f0_len_5390.c b/src/code_1a1f0_len_5390.c index c52544e8c3..2628482242 100644 --- a/src/code_1a1f0_len_5390.c +++ b/src/code_1a1f0_len_5390.c @@ -56,7 +56,7 @@ INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003F414); INCLUDE_ASM(s32, "code_1a1f0_len_5390", func_8003F4CC); -INCLUDE_API_ASM("code_1a1f0_len_5390", OnDefeatEnemy); +INCLUDE_ASM(s32, "code_1a1f0_len_5390", OnDefeatEnemy, ScriptInstance* script, s32 isInitialCall); ApiStatus OnFleeBattleDrops(ScriptInstance* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; diff --git a/src/code_1f580_len_1940.c b/src/code_1f580_len_1940.c index 00b9c3e03f..e667936ec5 100644 --- a/src/code_1f580_len_1940.c +++ b/src/code_1f580_len_1940.c @@ -1,6 +1,6 @@ #include "common.h" -INCLUDE_API_ASM("code_1f580_len_1940", SetEncounterStatusFlags); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetEncounterStatusFlags, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_1f580_len_1940", func_800441F0); @@ -16,24 +16,24 @@ ApiStatus func_80044290(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_1f580_len_1940", MakeNpcs); +INCLUDE_ASM(s32, "code_1f580_len_1940", MakeNpcs, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", RemoveNpc); +INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveNpc, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", RemoveEncounter); +INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveEncounter, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", GetBattleOutcome); +INCLUDE_ASM(s32, "code_1f580_len_1940", GetBattleOutcome, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_1f580_len_1940", func_800445A8); INCLUDE_ASM(s32, "code_1f580_len_1940", func_800445D4); -ApiStatus GetOwnerEncountered(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GetOwnerEncounterTrigger(ScriptInstance* script, s32 isInitialCall) { set_variable(script, *script->ptrReadPos, script->ownerActorID->encountered); return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_1f580_len_1940", DoNpcDefeat); +INCLUDE_ASM(s32, "code_1f580_len_1940", DoNpcDefeat, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_1f580_len_1940", start_battle); @@ -47,7 +47,7 @@ ApiStatus StartBattleWith(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE1; } -INCLUDE_API_ASM("code_1f580_len_1940", StartBossBattle); +INCLUDE_ASM(s32, "code_1f580_len_1940", StartBossBattle, ScriptInstance* script, s32 isInitialCall); ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) { Bytecode songID = get_variable(script, *script->ptrReadPos); @@ -59,44 +59,44 @@ ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_1f580_len_1940", BindNpcAI); +INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", BindNpcIdle); +INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcIdle, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", RestartNpcAI); +INCLUDE_ASM(s32, "code_1f580_len_1940", RestartNpcAI, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", EnableNpcAI); +INCLUDE_ASM(s32, "code_1f580_len_1940", EnableNpcAI, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", SetNpcAux); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", BindNpcAux); +INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAux, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", RestartNpcAux); +INCLUDE_ASM(s32, "code_1f580_len_1940", RestartNpcAux, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", EnableNpcAux); +INCLUDE_ASM(s32, "code_1f580_len_1940", EnableNpcAux, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", BindNpcInteract); +INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcInteract, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", BindNpcHit); +INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcHit, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", BindNpcDefeat); +INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcDefeat, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", SetSelfVar); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfVar, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", GetSelfVar); +INCLUDE_ASM(s32, "code_1f580_len_1940", GetSelfVar, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", SetNpcVar); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcVar, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", GetNpcVar); +INCLUDE_ASM(s32, "code_1f580_len_1940", GetNpcVar, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", SetSelfRotation); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfRotation, ScriptInstance* script, s32 isInitialCall); ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall) { script->ownerActorID->flags = *script->ptrReadPos; return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_1f580_len_1940", SetSelfEnemyFlagBits); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfEnemyFlagBits, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045580); @@ -105,13 +105,13 @@ ApiStatus GetSelfNpcID(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_1f580_len_1940", ClearDefeatedEnemies); +INCLUDE_ASM(s32, "code_1f580_len_1940", ClearDefeatedEnemies, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_1f580_len_1940", SetEnemyFlagBits); +INCLUDE_ASM(s32, "code_1f580_len_1940", SetEnemyFlagBits, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_1f580_len_1940", func_8004572C); -INCLUDE_API_ASM("code_1f580_len_1940", GetSelfAnimationFromTable); +INCLUDE_ASM(s32, "code_1f580_len_1940", GetSelfAnimationFromTable, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045798); diff --git a/src/code_42e0_len_1f60.c b/src/code_42e0_len_1f60.c index 4d3726e758..e2d578e7de 100644 --- a/src/code_42e0_len_1f60.c +++ b/src/code_42e0_len_1f60.c @@ -26,7 +26,7 @@ INCLUDE_ASM(s32, "code_42e0_len_1f60", _heap_free); INCLUDE_ASM(s32, "code_42e0_len_1f60", _heap_realloc); -INCLUDE_API_ASM("code_42e0_len_1f60", cosine); +INCLUDE_ASM(s32, "code_42e0_len_1f60", cosine); s32 sign(s32 val) { s32 sign = -1; @@ -88,7 +88,7 @@ f32 signF(f32 val) { return sign; } -INCLUDE_API_ASM("code_42e0_len_1f60", round); +INCLUDE_ASM(s32, "code_42e0_len_1f60", round); INCLUDE_ASM(f32, "code_42e0_len_1f60", clamp_angle, f32 theta); diff --git a/src/code_80850_len_3060.c b/src/code_80850_len_3060.c index 9fb4ca8b98..083ab8bfae 100644 --- a/src/code_80850_len_3060.c +++ b/src/code_80850_len_3060.c @@ -717,6 +717,7 @@ void reset_status_menu(void) { #ifdef NON_MATCHING // uses a jumptable, which we need .rodata support for. // Somewhat close. Needs work. +/* s32 is_ability_active(s32 arg0) { s32 iVar2; u32 uVar3; @@ -964,6 +965,7 @@ s32 is_ability_active(s32 arg0) { return iVar7; } } +*/ #else INCLUDE_ASM(s32, "code_80850_len_3060", is_ability_active, s32 arg0); #endif diff --git a/src/code_8230_len_1ae0.c b/src/code_8230_len_1ae0.c index a7eca5948f..1d7ee1c65d 100644 --- a/src/code_8230_len_1ae0.c +++ b/src/code_8230_len_1ae0.c @@ -1,14 +1,14 @@ #include "common.h" -INCLUDE_API_ASM("code_8230_len_1ae0", nuSiMgrInit); +INCLUDE_ASM(s32, "code_8230_len_1ae0", nuSiMgrInit); -INCLUDE_API_ASM("code_8230_len_1ae0", nuSiSendMesg); +INCLUDE_ASM(s32, "code_8230_len_1ae0", nuSiSendMesg); -INCLUDE_API_ASM("code_8230_len_1ae0", nuSiMgrStop); +INCLUDE_ASM(s32, "code_8230_len_1ae0", nuSiMgrStop); -INCLUDE_API_ASM("code_8230_len_1ae0", nuSiMgrRestart); +INCLUDE_ASM(s32, "code_8230_len_1ae0", nuSiMgrRestart); -INCLUDE_API_ASM("code_8230_len_1ae0", nuSiMgrThread); +INCLUDE_ASM(s32, "code_8230_len_1ae0", nuSiMgrThread); INCLUDE_ASM(s32, "code_8230_len_1ae0", func_8002D160); diff --git a/src/code_F5750.c b/src/code_F5750.c new file mode 100644 index 0000000000..4c04da0ebb --- /dev/null +++ b/src/code_F5750.c @@ -0,0 +1,260 @@ +#include "common.h" + +ApiStatus HidePlayerShadow(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 hideShadow = get_variable(script, *args++); + + if (hideShadow) { + disable_player_shadow(); + } else { + enable_player_shadow(); + } + return ApiStatus_DONE2; +} + +ApiStatus DisablePlayerPhysics(ScriptInstance* script, s32 isInitialCall) { + Bytecode* args = script->ptrReadPos; + s32 disable = get_variable(script, *args++); + + if (disable) { + disable_player_static_collisions(); + } else { + enable_player_static_collisions(); + } + return ApiStatus_DONE2; +} + +ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* args = script->ptrReadPos; + s32 enable = get_variable(script, *args++); + + if (enable) { + disable_player_input(); + func_800EF628(); + func_800E97B8(); + func_800E984C(); + if (playerStatus->actionState == ActionState_SPIN) { + playerStatus->animFlags |= 0x40000; + } + D_8009A650[0] |= 0x40; + } else { + enable_player_input(); + func_800EF600(); + func_800E01DC(); + D_8009A650[0] &= ~0x40; + func_800E983C(); + } + return ApiStatus_DONE2; +} + +INCLUDE_ASM(s32, "code_F5750", SetPlayerPos, ScriptInstance* script, s32 isInitialCall); +/* +ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* args = script->ptrReadPos; + f32 x = get_variable(script, *args++); + f32 y = get_variable(script, *args++); + f32 z = get_variable(script, *args++); + Npc* playerNpc = gPlayerNpc; + + playerNpc->pos.x = x; + playerNpc->pos.z = z; + playerNpc->pos.y = y; + + playerStatus->position.x = x; + playerStatus->position.y = y; + playerStatus->position.z = z; + return ApiStatus_DONE2; +} +*/ + +INCLUDE_ASM(s32, "code_F5750", SetPlayerCollisionSize, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", SetPlayerSpeed, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", SetPlayerJumpscale, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", SetPlayerAnimation, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", SetPlayerActionState, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", SetPlayerAnimationSpeed, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", PlayerMoveTo, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", func_802D1270); + +INCLUDE_ASM(s32, "code_F5750", func_802D1380); + +INCLUDE_ASM(s32, "code_F5750", player_jump); + +void PlayerJump(ScriptInstance* script, s32 isInitialCall) { + player_jump(script, isInitialCall, 0); +} + +void PlayerJump1(ScriptInstance* script, s32 isInitialCall) { + player_jump(script, isInitialCall, 1); +} + +void PlayerJump2(ScriptInstance* script, s32 isInitialCall) { + player_jump(script, isInitialCall, 2); +} + +INCLUDE_ASM(s32, "code_F5750", InterpPlayerYaw, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", PlayerFaceNpc, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", GetPlayerTargetYaw, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", SetPlayerFlagBits, ScriptInstance* script, s32 isInitialCall); + +ApiStatus GetPlayerActionState(ScriptInstance* script, s32 isInitialCall) { + Bytecode outVar = *script->ptrReadPos; + set_variable(script, outVar, gPlayerActionState); + return ApiStatus_DONE2; +} + +ApiStatus GetPlayerPos(ScriptInstance* script, s32 isInitialCall) { + PlayerStatus* playerStatus = &gPlayerStatus; + Bytecode* args = script->ptrReadPos; + Bytecode outVar1 = *args++; + Bytecode outVar2 = *args++; + Bytecode outVar3 = *args++; + + set_variable(script, outVar1, playerStatus->position.x); + set_variable(script, outVar2, playerStatus->position.y); + set_variable(script, outVar3, playerStatus->position.z); + return ApiStatus_DONE2; +} + +ApiStatus GetPlayerAnimation(ScriptInstance* script, s32 isInitialCall) { + Bytecode outVar = *script->ptrReadPos; + + set_variable(script, outVar, gPlayerAnimation); + return ApiStatus_DONE2; +} + +ApiStatus FullyRestoreHPandFP(ScriptInstance* script, s32 isInitialCall) { + PlayerData* playerData = &gPlayerData; + + playerData->curHP = playerData->curMaxHP; + playerData->curFP = playerData->curMaxFP; + return ApiStatus_DONE2; +} + +INCLUDE_ASM(s32, "code_F5750", FullyRestoreSP); + +INCLUDE_ASM(s32, "code_F5750", EnablePartner); + +INCLUDE_ASM(s32, "code_F5750", DisablePartner); + +INCLUDE_ASM(s32, "code_F5750", UseEntryHeading); + +INCLUDE_ASM(s32, "code_F5750", func_802D2148); + +INCLUDE_ASM(s32, "code_F5750", UseExitHeading); + +INCLUDE_ASM(s32, "code_F5750", func_802D23F8); + +INCLUDE_ASM(s32, "code_F5750", func_802D244C); + +INCLUDE_ASM(s32, "code_F5750", func_802D2484); + +INCLUDE_ASM(s32, "code_F5750", func_802D249C); + +INCLUDE_ASM(s32, "code_F5750", func_802D24F4); + +INCLUDE_ASM(s32, "code_F5750", func_802D2508); + +INCLUDE_ASM(s32, "code_F5750", func_802D2520); + +INCLUDE_ASM(s32, "code_F5750", func_802D286C); + +INCLUDE_ASM(s32, "code_F5750", func_802D2884); + +INCLUDE_ASM(s32, "code_F5750", DisablePulseStone); + +INCLUDE_ASM(s32, "code_F5750", GetCurrentPartner, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", func_802D2B50); + +INCLUDE_ASM(s32, "code_F5750", func_802D2B6C); + +INCLUDE_ASM(s32, "code_F5750", Disable8bitMario, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", func_802D2C14); + +INCLUDE_ASM(s32, "code_F5750", func_802D2C40); + +INCLUDE_ASM(s32, "code_F5750", PlaySoundAtPlayer, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_F5750", func_802D2D30); + +INCLUDE_ASM(s32, "code_F5750", func_802D2ED4); + +INCLUDE_ASM(s32, "code_F5750", func_802D2F34); + +INCLUDE_ASM(s32, "code_F5750", func_802D2FCC); + +INCLUDE_ASM(s32, "code_F5750", func_802D3028); + +INCLUDE_ASM(s32, "code_F5750", func_802D31E0); + +INCLUDE_ASM(s32, "code_F5750", func_802D3398); + +INCLUDE_ASM(s32, "code_F5750", func_802D33D4); + +INCLUDE_ASM(s32, "code_F5750", func_802D3474); + +INCLUDE_ASM(s32, "code_F5750", func_802D354C); + +INCLUDE_ASM(s32, "code_F5750", func_802D3624); + +INCLUDE_ASM(s32, "code_F5750", func_802D3674); + +INCLUDE_ASM(s32, "code_F5750", func_802D36E0); + +INCLUDE_ASM(s32, "code_F5750", func_802D378C); + +INCLUDE_ASM(s32, "code_F5750", func_802D3840); + +INCLUDE_ASM(s32, "code_F5750", func_802D38EC); + +INCLUDE_ASM(s32, "code_F5750", func_802D3998); + +INCLUDE_ASM(s32, "code_F5750", func_802D39FC); + +INCLUDE_ASM(s32, "code_F5750", func_802D3A60); + +INCLUDE_ASM(s32, "code_F5750", func_802D3C58); + +INCLUDE_ASM(s32, "code_F5750", func_802D3EB8); + +INCLUDE_ASM(s32, "code_F5750", func_802D3F74); + +INCLUDE_ASM(s32, "code_F5750", func_802D3FC8); + +INCLUDE_ASM(s32, "code_F5750", func_802D4050); + +INCLUDE_ASM(s32, "code_F5750", func_802D4164); + +INCLUDE_ASM(s32, "code_F5750", func_802D417C); + +INCLUDE_ASM(s32, "code_F5750", func_802D420C); + +INCLUDE_ASM(s32, "code_F5750", func_802D42AC); + +INCLUDE_ASM(s32, "code_F5750", func_802D4364); + +INCLUDE_ASM(s32, "code_F5750", func_802D43AC); + +INCLUDE_ASM(s32, "code_F5750", func_802D43D0); + +INCLUDE_ASM(s32, "code_F5750", func_802D43F4); + +INCLUDE_ASM(s32, "code_F5750", func_802D4434); + +INCLUDE_ASM(s32, "code_F5750", func_802D4488); + +INCLUDE_ASM(s32, "code_F5750", func_802D4560); diff --git a/src/code_a5dd0_len_114e0.c b/src/code_a5dd0_len_114e0.c index 9ed0e0da3c..3b6d535855 100644 --- a/src/code_a5dd0_len_114e0.c +++ b/src/code_a5dd0_len_114e0.c @@ -104,23 +104,23 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_shadow_from_data); -INCLUDE_API_ASM("code_a5dd0_len_114e0", MakeEntity); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", MakeEntity, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80111E9C); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80111F2C); -INCLUDE_API_ASM("code_a5dd0_len_114e0", AssignScript); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignScript, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_a5dd0_len_114e0", AssignAreaFlag); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignAreaFlag, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_a5dd0_len_114e0", AssignBlockFlag); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignBlockFlag, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_a5dd0_len_114e0", AssignFlag); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignFlag, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_a5dd0_len_114e0", AssignPanelFlag); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignPanelFlag, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_a5dd0_len_114e0", AssignCrateFlag); +INCLUDE_ASM(s32, "code_a5dd0_len_114e0", AssignCrateFlag, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", create_entity_shadow); diff --git a/src/code_e92d0_len_5da0.c b/src/code_e92d0_len_5da0.c index de97de8648..39713c276e 100644 --- a/src/code_e92d0_len_5da0.c +++ b/src/code_e92d0_len_5da0.c @@ -702,16 +702,16 @@ ApiStatus si_handle_does_script_exist(ScriptInstance* script) { INCLUDE_ASM(s32, "code_e92d0_len_5da0", func_802C6AD0); -INCLUDE_API_ASM("code_e92d0_len_5da0", si_handle_bind_lock); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_bind_lock, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", si_handle_thread); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_thread, ScriptInstance* script, s32 isInitialCall); ApiStatus si_handle_end_thread(ScriptInstance* script) { kill_script(script); return ApiStatus_FINISH; } -INCLUDE_API_ASM("code_e92d0_len_5da0", si_handle_child_thread); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_child_thread, ScriptInstance* script, s32 isInitialCall); ApiStatus si_handle_end_child_thread(ScriptInstance* script) { kill_script(script); @@ -722,7 +722,7 @@ ApiStatus func_802C6E14(ScriptInstance* script) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_e92d0_len_5da0", si_handle_print_debug_var); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_handle_print_debug_var, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802C739C(ScriptInstance* script) { script->ptrSavedPosition = (Bytecode*)*script->ptrReadPos; @@ -749,6 +749,7 @@ INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_execute_next_command); // TODO: consider renaming to si_get_variable #ifdef NON_MATCHING +/* s32 get_variable(ScriptInstance* script, Bytecode var) { s32 wordIdx; s32 bitIdx; @@ -802,6 +803,7 @@ s32 get_variable(ScriptInstance* script, Bytecode var) { return var; } } +*/ #else INCLUDE_ASM(s32, "code_e92d0_len_5da0", get_variable, ScriptInstance* script, Bytecode var); #endif @@ -901,11 +903,11 @@ INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_goto_next_case, ScriptInstance* scrip INCLUDE_ASM(s32, "code_e92d0_len_5da0", si_goto_end_loop, ScriptInstance* script); // Ethan: I think this is the start of a new file -//INCLUDE_API_ASM("code_e92d0_len_5da0", TranslateModel); +//INCLUDE_ASM(s32, "code_e92d0_len_5da0", TranslateModel, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", RotateModel); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", RotateModel, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", ScaleModel); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", ScaleModel, ScriptInstance* script, s32 isInitialCall); ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall) { Bytecode* thisPos = script->ptrReadPos; @@ -1040,7 +1042,7 @@ ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_e92d0_len_5da0", SetTexPanOffset); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", SetTexPanOffset, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802C9428(ScriptInstance* script, s32 isInitialCall) { Bytecode* thisPos = script->ptrReadPos; @@ -1062,7 +1064,7 @@ ApiStatus func_802C94A0(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_e92d0_len_5da0", SetModelFlags); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", SetModelFlags, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_e92d0_len_5da0", func_802C95A0); @@ -1084,11 +1086,11 @@ ApiStatus func_802C9748(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_e92d0_len_5da0", TranslateGroup); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", TranslateGroup, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", RotateGroup); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", RotateGroup, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", ScaleGroup); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", ScaleGroup, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802C9B40(ScriptInstance* script, s32 isInitialCall) { Bytecode* thisPos = script->ptrReadPos; @@ -1099,7 +1101,7 @@ ApiStatus func_802C9B40(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_e92d0_len_5da0", EnableGroup); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", EnableGroup, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802C9C70(ScriptInstance* script, s32 isInitialCall) { Bytecode* thisPos = script->ptrReadPos; @@ -1113,9 +1115,9 @@ ApiStatus func_802C9C70(ScriptInstance* script, s32 isInitialCall) { INCLUDE_ASM(s32, "code_e92d0_len_5da0", modify_collider_family_flags); -INCLUDE_API_ASM("code_e92d0_len_5da0", ModifyColliderFlags); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", ModifyColliderFlags, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", ResetFromLava); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", ResetFromLava, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_e92d0_len_5da0", func_802C9FD4); @@ -1194,6 +1196,6 @@ ApiStatus SetRenderMode(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_e92d0_len_5da0", PlaySoundAtModel); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", PlaySoundAtModel, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_e92d0_len_5da0", PlaySoundAtCollider); +INCLUDE_ASM(s32, "code_e92d0_len_5da0", PlaySoundAtCollider, ScriptInstance* script, s32 isInitialCall); diff --git a/src/code_ef070_len_3400.c b/src/code_ef070_len_3400.c index b272dd4c02..4d0a507eae 100644 --- a/src/code_ef070_len_3400.c +++ b/src/code_ef070_len_3400.c @@ -57,7 +57,7 @@ ApiStatus func_802CA90C(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_ef070_len_3400", func_802CA988); +INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CA988, ScriptInstance* script, s32 isInitialCall); /* ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; @@ -187,9 +187,9 @@ ApiStatus SetCamTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_ef070_len_3400", func_802CB008); +INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CB008, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_ef070_len_3400", ShakeCam); +INCLUDE_ASM(s32, "code_ef070_len_3400", ShakeCam, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_ef070_len_3400", exec_ShakeCam1); @@ -241,9 +241,9 @@ ApiStatus PanToTarget(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_ef070_len_3400", UseSettingsFrom); +INCLUDE_ASM(s32, "code_ef070_len_3400", UseSettingsFrom, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_ef070_len_3400", LoadSettings); +INCLUDE_ASM(s32, "code_ef070_len_3400", LoadSettings, ScriptInstance* script, s32 isInitialCall); ApiStatus SetCamType(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; @@ -452,11 +452,11 @@ ApiStatus WaitForCam(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_ef070_len_3400", SetCamProperties); +INCLUDE_ASM(s32, "code_ef070_len_3400", SetCamProperties, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_ef070_len_3400", AdjustCam); +INCLUDE_ASM(s32, "code_ef070_len_3400", AdjustCam, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_ef070_len_3400", ResetCam); +INCLUDE_ASM(s32, "code_ef070_len_3400", ResetCam, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_ef070_len_3400", func_802CCAC0); diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 9dc5a659e9..f90ac13b9e 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -34,11 +34,11 @@ ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcPos); +INCLUDE_ASM(s32, "code_f2470_len_27f0", SetNpcPos, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcRotation); +INCLUDE_ASM(s32, "code_f2470_len_27f0", SetNpcRotation, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f2470_len_27f0", func_802CDE68); +INCLUDE_ASM(s32, "code_f2470_len_27f0", func_802CDE68, ScriptInstance* script, s32 isInitialCall); ApiStatus SetNpcScale(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; @@ -143,7 +143,7 @@ ApiStatus SetNpcAnimationSpeed(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_f2470_len_27f0", NpcMoveTo); +INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcMoveTo, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_f2470_len_27f0", _npc_jump_to); @@ -155,7 +155,7 @@ void NpcJump1(ScriptInstance* script, s32 isInitialCall) { _npc_jump_to(script, isInitialCall, 1); } -INCLUDE_API_ASM("code_f2470_len_27f0", NpcFlyTo); +INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFlyTo, ScriptInstance* script, s32 isInitialCall); ApiStatus GetNpcYaw(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; @@ -185,15 +185,15 @@ ApiStatus SetNpcYaw(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_f2470_len_27f0", InterpNpcYaw); +INCLUDE_ASM(s32, "code_f2470_len_27f0", InterpNpcYaw, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f2470_len_27f0", NpcFacePlayer); +INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFacePlayer, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f2470_len_27f0", NpcFaceNpc); +INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcFaceNpc, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f2470_len_27f0", SetNpcFlagBits); +INCLUDE_ASM(s32, "code_f2470_len_27f0", SetNpcFlagBits, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f2470_len_27f0", GetNpcPos); +INCLUDE_ASM(s32, "code_f2470_len_27f0", GetNpcPos, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_f2470_len_27f0", func_802CF1B4); @@ -243,7 +243,7 @@ ApiStatus ClearPartnerMoveHistory(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_f2470_len_27f0", NpcSetHomePosToCurrent); +INCLUDE_ASM(s32, "code_f2470_len_27f0", NpcSetHomePosToCurrent, ScriptInstance* script, s32 isInitialCall); ApiStatus GetPartnerPos(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; diff --git a/src/code_f4c60_len_4300.c b/src/code_f4c60_len_4300.c index 17298f550e..64b40bb7ef 100644 --- a/src/code_f4c60_len_4300.c +++ b/src/code_f4c60_len_4300.c @@ -1,5 +1,7 @@ #include "common.h" +ApiStatus _show_message(ScriptInstance* script, s32 isInitialCall, s32 arg2); + ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall) { return _show_message(script, isInitialCall, 0); } @@ -16,17 +18,30 @@ ApiStatus SpeakToNpc(ScriptInstance* script, s32 isInitialCall) { return _show_message(script, isInitialCall, 3); } -INCLUDE_ASM(s32, "code_f4c60_len_4300", _show_message); +INCLUDE_ASM(ApiStatus, "code_f4c60_len_4300", _show_message, ScriptInstance* script, s32 isInitialCall, s32 arg2); -INCLUDE_API_ASM("code_f4c60_len_4300", ShowMessageAtScreenPos); +INCLUDE_ASM(s32, "code_f4c60_len_4300", ShowMessageAtScreenPos, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f4c60_len_4300", ShowMessageAtWorldPos); +INCLUDE_ASM(s32, "code_f4c60_len_4300", ShowMessageAtWorldPos, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f4c60_len_4300", CloseMessage); +INCLUDE_ASM(s32, "code_f4c60_len_4300", CloseMessage, ScriptInstance* script, s32 isInitialCall); +/*s32 CloseMessage(ScriptInstance* script, s32 isInitialCall) { + if (isInitialCall) { + close_message(gCurrentPrintContext); + } -INCLUDE_API_ASM("code_f4c60_len_4300", SwitchMessage); + if (!(gCurrentPrintContext->stateFlags & 0x40)) { + if (D_802DB264 == 1) { + script->varTable[0] = gCurrentPrintContext->unk_4E8; + } + return 0; + } + return 1; +}*/ -INCLUDE_API_ASM("code_f4c60_len_4300", ShowChoice); +INCLUDE_ASM(s32, "code_f4c60_len_4300", SwitchMessage, ScriptInstance* script, s32 isInitialCall); + +INCLUDE_ASM(s32, "code_f4c60_len_4300", ShowChoice, ScriptInstance* script, s32 isInitialCall); ApiStatus CloseChoice(ScriptInstance* script, s32 isInitialCall) { close_message(D_802DB268); @@ -59,283 +74,18 @@ ApiStatus func_802D0C94(ScriptInstance* script, s32 initialCall) { ApiStatus SetMessageString(ScriptInstance* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; - Bytecode string = get_variable(script, *args++); - Bytecode index = get_variable(script, *args++); + s32 string = get_variable(script, *args++); + s32 index = get_variable(script, *args++); set_message_string(string, index); return ApiStatus_DONE2; } -#ifdef NON_MATCHING -// TODO: Figure out why there's an extra NOP after this function -// It's probably because of a file split issue ApiStatus SetMessageValue(ScriptInstance* script, s32 initialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - Bytecode value = get_variable(script, *ptrReadPos++); - Bytecode index = get_variable(script, *ptrReadPos); + s32 value = get_variable(script, *ptrReadPos++); + s32 index = get_variable(script, *ptrReadPos); set_message_value(value, index); return ApiStatus_DONE2; } -#else -INCLUDE_API_ASM("code_f4c60_len_4300", SetMessageValue); -#endif - -ApiStatus HidePlayerShadow(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 hideShadow = get_variable(script, *args++); - - if (hideShadow) { - disable_player_shadow(); - } else { - enable_player_shadow(); - } - return ApiStatus_DONE2; -} - -ApiStatus DisablePlayerPhysics(ScriptInstance* script, s32 isInitialCall) { - Bytecode* args = script->ptrReadPos; - s32 disable = get_variable(script, *args++); - - if (disable) { - disable_player_static_collisions(); - } else { - enable_player_static_collisions(); - } - return ApiStatus_DONE2; -} - -ApiStatus DisablePlayerInput(ScriptInstance* script, s32 isInitialCall) { - PlayerStatus* playerStatus = &gPlayerStatus; - Bytecode* args = script->ptrReadPos; - s32 enable = get_variable(script, *args++); - - if (enable) { - disable_player_input(); - func_800EF628(); - func_800E97B8(); - func_800E984C(); - if (playerStatus->actionState == ActionState_SPIN) { - playerStatus->animFlags |= 0x40000; - } - D_8009A650[0] |= 0x40; - } else { - enable_player_input(); - func_800EF600(); - func_800E01DC(); - D_8009A650[0] &= ~0x40; - func_800E983C(); - } - return ApiStatus_DONE2; -} - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerPos); -/* -ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall) { - PlayerStatus* playerStatus = &gPlayerStatus; - Bytecode* args = script->ptrReadPos; - f32 x = get_variable(script, *args++); - f32 y = get_variable(script, *args++); - f32 z = get_variable(script, *args++); - Npc* playerNpc = gPlayerNpc; - - playerNpc->pos.x = x; - playerNpc->pos.z = z; - playerNpc->pos.y = y; - - playerStatus->position.x = x; - playerStatus->position.y = y; - playerStatus->position.z = z; - return ApiStatus_DONE2; -} -*/ - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerCollisionSize); - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerSpeed); - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerJumpscale); - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerAnimation); - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerActionState); - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerAnimationSpeed); - -INCLUDE_API_ASM("code_f4c60_len_4300", PlayerMoveTo); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D1270); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D1380); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", player_jump); - -void PlayerJump(ScriptInstance* script, s32 isInitialCall) { - player_jump(script, isInitialCall, 0); -} - -void PlayerJump1(ScriptInstance* script, s32 isInitialCall) { - player_jump(script, isInitialCall, 1); -} - -void PlayerJump2(ScriptInstance* script, s32 isInitialCall) { - player_jump(script, isInitialCall, 2); -} - -INCLUDE_API_ASM("code_f4c60_len_4300", InterpPlayerYaw); - -INCLUDE_API_ASM("code_f4c60_len_4300", PlayerFaceNpc); - -INCLUDE_API_ASM("code_f4c60_len_4300", GetPlayerTargetYaw); - -INCLUDE_API_ASM("code_f4c60_len_4300", SetPlayerFlagBits); - -ApiStatus GetPlayerActionState(ScriptInstance* script, s32 isInitialCall) { - Bytecode outVar = *script->ptrReadPos; - set_variable(script, outVar, gPlayerActionState); - return ApiStatus_DONE2; -} - -ApiStatus GetPlayerPos(ScriptInstance* script, s32 isInitialCall) { - PlayerStatus* playerStatus = &gPlayerStatus; - Bytecode* args = script->ptrReadPos; - Bytecode outVar1 = *args++; - Bytecode outVar2 = *args++; - Bytecode outVar3 = *args++; - - set_variable(script, outVar1, playerStatus->position.x); - set_variable(script, outVar2, playerStatus->position.y); - set_variable(script, outVar3, playerStatus->position.z); - return ApiStatus_DONE2; -} - -ApiStatus GetPlayerAnimation(ScriptInstance* script, s32 isInitialCall) { - Bytecode outVar = *script->ptrReadPos; - - set_variable(script, outVar, gPlayerAnimation); - return ApiStatus_DONE2; -} - -ApiStatus FullyRestoreHPandFP(ScriptInstance* script, s32 isInitialCall) { - PlayerData* playerData = &gPlayerData; - - playerData->curHP = playerData->curMaxHP; - playerData->curFP = playerData->curMaxFP; - return ApiStatus_DONE2; -} - -INCLUDE_ASM(s32, "code_f4c60_len_4300", FullyRestoreSP); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", EnablePartner); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", DisablePartner); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", UseEntryHeading); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2148); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", UseExitHeading); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D23F8); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D244C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2484); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D249C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D24F4); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2508); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2520); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D286C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2884); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", DisablePulseStone); - -INCLUDE_API_ASM("code_f4c60_len_4300", GetCurrentPartner); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2B50); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2B6C); - -INCLUDE_API_ASM("code_f4c60_len_4300", Disable8bitMario); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2C14); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2C40); - -INCLUDE_API_ASM("code_f4c60_len_4300", PlaySoundAtPlayer); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2D30); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2ED4); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2F34); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D2FCC); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3028); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D31E0); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3398); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D33D4); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3474); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D354C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3624); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3674); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D36E0); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D378C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3840); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D38EC); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3998); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D39FC); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3A60); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3C58); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3EB8); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3F74); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D3FC8); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D4050); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D4164); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D417C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D420C); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D42AC); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D4364); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D43AC); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D43D0); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D43F4); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D4434); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D4488); - -INCLUDE_ASM(s32, "code_f4c60_len_4300", func_802D4560); diff --git a/src/code_f8f60_len_1560.c b/src/code_f8f60_len_1560.c index d9d917c5f9..f4f292c777 100644 --- a/src/code_f8f60_len_1560.c +++ b/src/code_f8f60_len_1560.c @@ -188,7 +188,7 @@ ApiStatus AddVectorPolar(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_f8f60_len_1560", func_802D4BDC); +INCLUDE_ASM(s32, "code_f8f60_len_1560", func_802D4BDC, ScriptInstance* script, s32 isInitialCall); /* ApiStatus func_802D4BDC(ScriptInstance* script, s32 initialCall) { s32* t0 = &script->functionTemp[0]; @@ -220,7 +220,7 @@ ApiStatus func_802D4BDC(ScriptInstance* script, s32 initialCall) { */ // Very similar to func_802D4BDC -INCLUDE_API_ASM("code_f8f60_len_1560", func_802D4C4C); +INCLUDE_ASM(s32, "code_f8f60_len_1560", func_802D4C4C, ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D4CC4(ScriptInstance* script, s32 initialCall) { s32 value = get_variable(script, *script->ptrReadPos); @@ -252,9 +252,9 @@ INCLUDE_ASM(s32, "code_f8f60_len_1560", setup_path_data); INCLUDE_ASM(s32, "code_f8f60_len_1560", func_802D5270); -INCLUDE_API_ASM("code_f8f60_len_1560", LoadPath); +INCLUDE_ASM(s32, "code_f8f60_len_1560", LoadPath, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_f8f60_len_1560", GetNextPathPos); +INCLUDE_ASM(s32, "code_f8f60_len_1560", GetNextPathPos, ScriptInstance* script, s32 isInitialCall); ApiStatus GetDist2D(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; diff --git a/src/code_fa4c0_len_3bf0.c b/src/code_fa4c0_len_3bf0.c index 1d5165f7f8..14b6d105fb 100644 --- a/src/code_fa4c0_len_3bf0.c +++ b/src/code_fa4c0_len_3bf0.c @@ -22,7 +22,7 @@ ApiStatus SetMusicTrack(ScriptInstance* script, s32 isInitialCall) { return (set_music_track(musicPlayer, songID, variation, 0x1F4, volume) != 0) * 2; } -INCLUDE_API_ASM("code_fa4c0_len_3bf0", FadeInMusic); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", FadeInMusic, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D5EE0); @@ -106,7 +106,7 @@ ApiStatus func_802D6340(ScriptInstance* script, s32 initialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_fa4c0_len_3bf0", PlaySoundAtF); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", PlaySoundAtF, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D6420); @@ -283,11 +283,11 @@ ApiStatus RemoveFortressKeys(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_fa4c0_len_3bf0", MakeItemEntity); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", MakeItemEntity, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_fa4c0_len_3bf0", DropItemEntity); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", DropItemEntity, ScriptInstance* script, s32 isInitialCall); -INCLUDE_API_ASM("code_fa4c0_len_3bf0", DropItemEntityB); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", DropItemEntityB, ScriptInstance* script, s32 isInitialCall); /* // Close to working ApiStatus DropItemEntityB(ScriptInstance* script, s32 isInitialCall) { @@ -322,7 +322,7 @@ ApiStatus AddBadge(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_fa4c0_len_3bf0", RemoveBadge); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", RemoveBadge, ScriptInstance* script, s32 isInitialCall); ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; @@ -342,7 +342,7 @@ ApiStatus SetItemPos(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -INCLUDE_API_ASM("code_fa4c0_len_3bf0", SetItemFlags); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", SetItemFlags, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D721C); @@ -362,23 +362,22 @@ ApiStatus AddStarPieces(ScriptInstance* script, s32 isInitialCall) { } #ifdef NON_MATCHING -// Close to working +/* ApiStatus GetItemPower(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; - s32 itemID = get_variable(script, *ptrReadPos++); - s32* ptrNextPos = ptrReadPos++; - item_table_entry* item = &gItemTable[itemID]; + StaticItem* item = &gItemTable[get_variable(script, *ptrReadPos++)]; + Bytecode out1 = *ptrReadPos++; + Bytecode out2 = *ptrReadPos++; - - set_variable(script, ptrNextPos++, item->potencyA); - set_variable(script, ptrNextPos++, item->potencyB); + set_variable(script, out1, item->potencyA); + set_variable(script, out2, item->potencyB); return ApiStatus_DONE2; -} +}*/ #else -INCLUDE_API_ASM("code_fa4c0_len_3bf0", GetItemPower); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", GetItemPower, ScriptInstance* script, s32 isInitialCall); #endif -INCLUDE_API_ASM("code_fa4c0_len_3bf0", ShowGotItem); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowGotItem, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7460); @@ -390,10 +389,8 @@ INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D75D8); INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7690); -INCLUDE_API_ASM("code_fa4c0_len_3bf0", ShowEmote); +INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", ShowEmote, ScriptInstance* script, s32 isInitialCall); -#ifdef NON_MATCHING -// Works ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; @@ -401,7 +398,6 @@ ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -// Works ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32* ptrValue = get_variable(script, *ptrReadPos++); @@ -410,7 +406,6 @@ ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -// Works ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32* ptrValue = get_variable(script, *ptrReadPos++); @@ -420,27 +415,15 @@ ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -// Works ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) { Bytecode* ptrReadPos = script->ptrReadPos; s32* ptrValue = get_variable(script, *ptrReadPos++); s32* ptrTemp = ptrValue[3]; - ptrTemp[11] = 5; + ptrTemp[12] = 5; return ApiStatus_DONE2; } -// TODO: More functions still in RemoveEffect.s but the ones above are matching properly -#else -INCLUDE_API_ASM("code_fa4c0_len_3bf0", RemoveEffect); -#endif - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7B10); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7B44); - -INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7B74); - INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7BA4); INCLUDE_ASM(s32, "code_fa4c0_len_3bf0", func_802D7CF8); diff --git a/src/code_fe0b0_len_5a0.c b/src/code_fe0b0_len_5a0.c index dc355ce235..0fea8161c2 100644 --- a/src/code_fe0b0_len_5a0.c +++ b/src/code_fe0b0_len_5a0.c @@ -1,6 +1,6 @@ #include "common.h" -INCLUDE_API_ASM("code_fe0b0_len_5a0", SetSpriteShading); +INCLUDE_ASM(s32, "code_fe0b0_len_5a0", SetSpriteShading); ApiStatus EnableSpriteShading(ScriptInstance* script, s32 isInitialCall) { if (get_variable(script, *script->ptrReadPos) != 0) { diff --git a/src/os/code_39cb0_len_100.c b/src/os/code_39cb0_len_100.c index 9127581a96..32a49c67c6 100644 --- a/src/os/code_39cb0_len_100.c +++ b/src/os/code_39cb0_len_100.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_39cb0_len_100", nuBoot); +INCLUDE_ASM(s32, "os/code_39cb0_len_100", nuBoot); INCLUDE_ASM(s32, "os/code_39cb0_len_100", boot_idle); diff --git a/src/os/code_3a650_len_40.c b/src/os/code_3a650_len_40.c index 2486ea1587..b7f8f3b5c4 100644 --- a/src/os/code_3a650_len_40.c +++ b/src/os/code_3a650_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3a650_len_40", nuGfxFuncSet); +INCLUDE_ASM(s32, "os/code_3a650_len_40", nuGfxFuncSet); diff --git a/src/os/code_3a690_len_40.c b/src/os/code_3a690_len_40.c index 0e1bc88c23..9bff4185bb 100644 --- a/src/os/code_3a690_len_40.c +++ b/src/os/code_3a690_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3a690_len_40", nuGfxPreNMIFuncSet); +INCLUDE_ASM(s32, "os/code_3a690_len_40", nuGfxPreNMIFuncSet); diff --git a/src/os/code_3a6d0_len_20.c b/src/os/code_3a6d0_len_20.c index 2e14a9b684..8cf605b336 100644 --- a/src/os/code_3a6d0_len_20.c +++ b/src/os/code_3a6d0_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3a6d0_len_20", nuGfxTaskAllEndWait); +INCLUDE_ASM(s32, "os/code_3a6d0_len_20", nuGfxTaskAllEndWait); diff --git a/src/os/code_3a6f0_len_110.c b/src/os/code_3a6f0_len_110.c index 3a9d726716..09c7bb7b09 100644 --- a/src/os/code_3a6f0_len_110.c +++ b/src/os/code_3a6f0_len_110.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3a6f0_len_110", nuGfxSetCfb); +INCLUDE_ASM(s32, "os/code_3a6f0_len_110", nuGfxSetCfb); diff --git a/src/os/code_3a800_len_30.c b/src/os/code_3a800_len_30.c index ff23e22bd8..b396df9c1b 100644 --- a/src/os/code_3a800_len_30.c +++ b/src/os/code_3a800_len_30.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3a800_len_30", nuGfxDisplayOff); +INCLUDE_ASM(s32, "os/code_3a800_len_30", nuGfxDisplayOff); diff --git a/src/os/code_3a830_len_20.c b/src/os/code_3a830_len_20.c index 05a0ba4e21..865786c617 100644 --- a/src/os/code_3a830_len_20.c +++ b/src/os/code_3a830_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3a830_len_20", nuGfxDisplayOn); +INCLUDE_ASM(s32, "os/code_3a830_len_20", nuGfxDisplayOn); diff --git a/src/os/code_3b290_len_100.c b/src/os/code_3b290_len_100.c index 91b051486d..355f256e80 100644 --- a/src/os/code_3b290_len_100.c +++ b/src/os/code_3b290_len_100.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b290_len_100", nuContRmbStart); +INCLUDE_ASM(s32, "os/code_3b290_len_100", nuContRmbStart); -INCLUDE_API_ASM("os/code_3b290_len_100", nuContRmbCheck); +INCLUDE_ASM(s32, "os/code_3b290_len_100", nuContRmbCheck); diff --git a/src/os/code_3b390_len_110.c b/src/os/code_3b390_len_110.c index 2a660c5530..9163cf304c 100644 --- a/src/os/code_3b390_len_110.c +++ b/src/os/code_3b390_len_110.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b390_len_110", nuContRmbModeSet); +INCLUDE_ASM(s32, "os/code_3b390_len_110", nuContRmbModeSet); diff --git a/src/os/code_3b4a0_len_270.c b/src/os/code_3b4a0_len_270.c index 73987c99ca..9e8a0ae387 100644 --- a/src/os/code_3b4a0_len_270.c +++ b/src/os/code_3b4a0_len_270.c @@ -1,11 +1,11 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b4a0_len_270", nuContRmbForceStop); +INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuContRmbForceStop); -INCLUDE_API_ASM("os/code_3b4a0_len_270", nuContRmbForceStopEnd); +INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuContRmbForceStopEnd); -INCLUDE_API_ASM("os/code_3b4a0_len_270", nuPiReadRomOverlay); +INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuPiReadRomOverlay); -INCLUDE_API_ASM("os/code_3b4a0_len_270", nuGfxThreadStart); +INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuGfxThreadStart); -INCLUDE_API_ASM("os/code_3b4a0_len_270", nuGfxThread); +INCLUDE_ASM(s32, "os/code_3b4a0_len_270", nuGfxThread); diff --git a/src/os/code_3b710_len_40.c b/src/os/code_3b710_len_40.c index 4be09fb91a..7457687a0e 100644 --- a/src/os/code_3b710_len_40.c +++ b/src/os/code_3b710_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b710_len_40", nuGfxSwapCfbFuncSet); +INCLUDE_ASM(s32, "os/code_3b710_len_40", nuGfxSwapCfbFuncSet); diff --git a/src/os/code_3b770_len_80.c b/src/os/code_3b770_len_80.c index 54832add06..a3ab4f0783 100644 --- a/src/os/code_3b770_len_80.c +++ b/src/os/code_3b770_len_80.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b770_len_80", nuGfxRetraceWait); +INCLUDE_ASM(s32, "os/code_3b770_len_80", nuGfxRetraceWait); diff --git a/src/os/code_3b7f0_len_120.c b/src/os/code_3b7f0_len_120.c index dba2a42cb7..f42db094ee 100644 --- a/src/os/code_3b7f0_len_120.c +++ b/src/os/code_3b7f0_len_120.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b7f0_len_120", nuSiCallBackAdd); +INCLUDE_ASM(s32, "os/code_3b7f0_len_120", nuSiCallBackAdd); -INCLUDE_API_ASM("os/code_3b7f0_len_120", nuSiCallBackRemove); +INCLUDE_ASM(s32, "os/code_3b7f0_len_120", nuSiCallBackRemove); diff --git a/src/os/code_3b910_len_410.c b/src/os/code_3b910_len_410.c index 2bb1b53d58..62c9f65c25 100644 --- a/src/os/code_3b910_len_410.c +++ b/src/os/code_3b910_len_410.c @@ -1,21 +1,21 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3b910_len_410", nuContMgrInit); +INCLUDE_ASM(s32, "os/code_3b910_len_410", nuContMgrInit); -INCLUDE_API_ASM("os/code_3b910_len_410", nuContMgrRemove); +INCLUDE_ASM(s32, "os/code_3b910_len_410", nuContMgrRemove); -INCLUDE_API_ASM("os/code_3b910_len_410", nuContDataClose); +INCLUDE_ASM(s32, "os/code_3b910_len_410", nuContDataClose); -INCLUDE_API_ASM("os/code_3b910_len_410", nuContDataOpen); +INCLUDE_ASM(s32, "os/code_3b910_len_410", nuContDataOpen); -INCLUDE_API_ASM("os/code_3b910_len_410", contRetrace); +INCLUDE_ASM(s32, "os/code_3b910_len_410", contRetrace); -INCLUDE_API_ASM("os/code_3b910_len_410", contReadData); +INCLUDE_ASM(s32, "os/code_3b910_len_410", contReadData); -INCLUDE_API_ASM("os/code_3b910_len_410", contReadNW); +INCLUDE_ASM(s32, "os/code_3b910_len_410", contReadNW); -INCLUDE_API_ASM("os/code_3b910_len_410", contQuery); +INCLUDE_ASM(s32, "os/code_3b910_len_410", contQuery); -INCLUDE_API_ASM("os/code_3b910_len_410", nuContDataLock); +INCLUDE_ASM(s32, "os/code_3b910_len_410", nuContDataLock); -INCLUDE_API_ASM("os/code_3b910_len_410", nuContDataUnLock); +INCLUDE_ASM(s32, "os/code_3b910_len_410", nuContDataUnLock); diff --git a/src/os/code_3bd20_len_c0.c b/src/os/code_3bd20_len_c0.c index 08662b1911..aaccf25932 100644 --- a/src/os/code_3bd20_len_c0.c +++ b/src/os/code_3bd20_len_c0.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3bd20_len_c0", nuContQueryRead); +INCLUDE_ASM(s32, "os/code_3bd20_len_c0", nuContQueryRead); INCLUDE_ASM(OSIntMask, "os/code_3bd20_len_c0", osSetIntMask, OSIntMask mask); diff --git a/src/os/code_3bde0_len_3e0.c b/src/os/code_3bde0_len_3e0.c index 6599b92720..7f1ae70a31 100644 --- a/src/os/code_3bde0_len_3e0.c +++ b/src/os/code_3bde0_len_3e0.c @@ -2,6 +2,6 @@ INCLUDE_ASM(void, "os/code_3bde0_len_3e0", osCreatePiManager, OSPri prio, OSMesgQueue* queue, OSMesg* mesg, s32 unk); -INCLUDE_API_ASM("os/code_3bde0_len_3e0", osEPiRawStartDma); +INCLUDE_ASM(s32, "os/code_3bde0_len_3e0", osEPiRawStartDma); INCLUDE_ASM(s32, "os/code_3bde0_len_3e0", osEPiWriteIo, OSPiHandle* handle, u32 unk1, u32 unk2); diff --git a/src/os/code_3c490_len_3c0.c b/src/os/code_3c490_len_3c0.c index b096989966..952c392349 100644 --- a/src/os/code_3c490_len_3c0.c +++ b/src/os/code_3c490_len_3c0.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3c490_len_3c0", osDevMgrMain); +INCLUDE_ASM(s32, "os/code_3c490_len_3c0", osDevMgrMain); diff --git a/src/os/code_3c850_len_f0.c b/src/os/code_3c850_len_f0.c index 849ffe4866..59ae463b6c 100644 --- a/src/os/code_3c850_len_f0.c +++ b/src/os/code_3c850_len_f0.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3c850_len_f0", osPiCreateAccessQueue); +INCLUDE_ASM(s32, "os/code_3c850_len_f0", osPiCreateAccessQueue); -INCLUDE_API_ASM("os/code_3c850_len_f0", osPiGetAccess); +INCLUDE_ASM(s32, "os/code_3c850_len_f0", osPiGetAccess); -INCLUDE_API_ASM("os/code_3c850_len_f0", osPiRelAccess); +INCLUDE_ASM(s32, "os/code_3c850_len_f0", osPiRelAccess); diff --git a/src/os/code_3cd00_len_5f0.c b/src/os/code_3cd00_len_5f0.c index 4a91670456..abdaf89721 100644 --- a/src/os/code_3cd00_len_5f0.c +++ b/src/os/code_3cd00_len_5f0.c @@ -8,12 +8,12 @@ INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContStartReadData, OSMesgQueue* queu INCLUDE_ASM(void, "os/code_3cd00_len_5f0", osContGetReadData, OSContPad* pad); -INCLUDE_API_ASM("os/code_3cd00_len_5f0", osPackReadData); +INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osPackReadData); INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContInit, OSMesgQueue* queue, u8* unk, OSContStatus* status); -INCLUDE_API_ASM("os/code_3cd00_len_5f0", osContGetInitData); +INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osContGetInitData); -INCLUDE_API_ASM("os/code_3cd00_len_5f0", osPackRequestData); +INCLUDE_ASM(s32, "os/code_3cd00_len_5f0", osPackRequestData); INCLUDE_ASM(u32, "os/code_3cd00_len_5f0", osVirtualToPhysical, void* virt); diff --git a/src/os/code_3f6d0_len_320.c b/src/os/code_3f6d0_len_320.c index 9758ab39bf..2aa9002a5d 100644 --- a/src/os/code_3f6d0_len_320.c +++ b/src/os/code_3f6d0_len_320.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_3f6d0_len_320", guRotateAnglesF); +INCLUDE_ASM(s32, "os/code_3f6d0_len_320", guRotateAnglesF); -INCLUDE_API_ASM("os/code_3f6d0_len_320", guRotateAngles); +INCLUDE_ASM(s32, "os/code_3f6d0_len_320", guRotateAngles); diff --git a/src/os/code_3fa50_len_f60.c b/src/os/code_3fa50_len_f60.c index 68c549a72c..8758333659 100644 --- a/src/os/code_3fa50_len_f60.c +++ b/src/os/code_3fa50_len_f60.c @@ -4,11 +4,11 @@ INCLUDE_ASM(void, "os/code_3fa50_len_f60", bcopy, const void* src, void* dst, in INCLUDE_ASM(void, "os/code_3fa50_len_f60", bzero, void* buf, int size); -INCLUDE_API_ASM("os/code_3fa50_len_f60", strchr); +INCLUDE_ASM(s32, "os/code_3fa50_len_f60", strchr); -INCLUDE_API_ASM("os/code_3fa50_len_f60", strlen); +INCLUDE_ASM(s32, "os/code_3fa50_len_f60", strlen); -INCLUDE_API_ASM("os/code_3fa50_len_f60", memcpy); +INCLUDE_ASM(s32, "os/code_3fa50_len_f60", memcpy); INCLUDE_ASM(s32, "os/code_3fa50_len_f60", _Printf); @@ -16,6 +16,6 @@ INCLUDE_ASM(s32, "os/code_3fa50_len_f60", _Putfld); INCLUDE_ASM(int, "os/code_3fa50_len_f60", sprintf, char* s, const char* fmt, ...); -INCLUDE_API_ASM("os/code_3fa50_len_f60", proutSprintf); +INCLUDE_ASM(s32, "os/code_3fa50_len_f60", proutSprintf); INCLUDE_ASM(void, "os/code_3fa50_len_f60", osCreateMesgQueue, OSMesgQueue* queue, OSMesg* mesg, s32 unk); diff --git a/src/os/code_41050_len_120.c b/src/os/code_41050_len_120.c index 59587c5770..dd945c2990 100644 --- a/src/os/code_41050_len_120.c +++ b/src/os/code_41050_len_120.c @@ -4,4 +4,4 @@ INCLUDE_ASM(void, "os/code_41050_len_120", osSpTaskYield, void); INCLUDE_ASM(OSYieldResult, "os/code_41050_len_120", osSpTaskYielded, OSTask* tp); -INCLUDE_API_ASM("os/code_41050_len_120", osSiRawStartDma); +INCLUDE_ASM(s32, "os/code_41050_len_120", osSiRawStartDma); diff --git a/src/os/code_41170_len_f0.c b/src/os/code_41170_len_f0.c index 9eab96b0fa..03c9720289 100644 --- a/src/os/code_41170_len_f0.c +++ b/src/os/code_41170_len_f0.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_API_ASM("os/code_41170_len_f0", osSiCreateAccessQueue); +INCLUDE_ASM(s32, "os/code_41170_len_f0", osSiCreateAccessQueue); -INCLUDE_API_ASM("os/code_41170_len_f0", osSiGetAccess); +INCLUDE_ASM(s32, "os/code_41170_len_f0", osSiGetAccess); -INCLUDE_API_ASM("os/code_41170_len_f0", osSiRelAccess); +INCLUDE_ASM(s32, "os/code_41170_len_f0", osSiRelAccess); diff --git a/src/os/code_41600_len_40.c b/src/os/code_41600_len_40.c index ca9c03825c..66d0a9b32e 100644 --- a/src/os/code_41600_len_40.c +++ b/src/os/code_41600_len_40.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_41600_len_40", osDequeueThread); +INCLUDE_ASM(s32, "os/code_41600_len_40", osDequeueThread); diff --git a/src/os/code_41690_len_10.c b/src/os/code_41690_len_10.c index c49f599ecb..0b7cad2984 100644 --- a/src/os/code_41690_len_10.c +++ b/src/os/code_41690_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_41690_len_10", osGetActiveQueue); +INCLUDE_ASM(s32, "os/code_41690_len_10", osGetActiveQueue); diff --git a/src/os/code_41750_len_450.c b/src/os/code_41750_len_450.c index 7502a29074..973ffb04b7 100644 --- a/src/os/code_41750_len_450.c +++ b/src/os/code_41750_len_450.c @@ -3,10 +3,10 @@ INCLUDE_ASM(int, "os/code_41750_len_450", osSetTimer, OSTimer* timer, OSTime start, OSTime end, OSMesgQueue* queue, OSMesg mesg); -INCLUDE_API_ASM("os/code_41750_len_450", osTimerServicesInit); +INCLUDE_ASM(s32, "os/code_41750_len_450", osTimerServicesInit); -INCLUDE_API_ASM("os/code_41750_len_450", osTimerInterrupt); +INCLUDE_ASM(s32, "os/code_41750_len_450", osTimerInterrupt); -INCLUDE_API_ASM("os/code_41750_len_450", osSetTimerIntr); +INCLUDE_ASM(s32, "os/code_41750_len_450", osSetTimerIntr); -INCLUDE_API_ASM("os/code_41750_len_450", osInsertTimer); +INCLUDE_ASM(s32, "os/code_41750_len_450", osInsertTimer); diff --git a/src/os/code_41c60_len_c0.c b/src/os/code_41c60_len_c0.c index c77fb7ba7e..88c9db62d7 100644 --- a/src/os/code_41c60_len_c0.c +++ b/src/os/code_41c60_len_c0.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_41c60_len_c0", osProbeTLB); +INCLUDE_ASM(s32, "os/code_41c60_len_c0", osProbeTLB); diff --git a/src/os/code_41e70_len_340.c b/src/os/code_41e70_len_340.c index 6154c28fea..ecdbe871f8 100644 --- a/src/os/code_41e70_len_340.c +++ b/src/os/code_41e70_len_340.c @@ -2,4 +2,4 @@ INCLUDE_ASM(void, "os/code_41e70_len_340", osCreateViManager, OSPri pri); -INCLUDE_API_ASM("os/code_41e70_len_340", viMgrMain); +INCLUDE_ASM(s32, "os/code_41e70_len_340", viMgrMain); diff --git a/src/os/code_42470_len_310.c b/src/os/code_42470_len_310.c index 0cf982dc2b..d027ee1d2e 100644 --- a/src/os/code_42470_len_310.c +++ b/src/os/code_42470_len_310.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_42470_len_310", osViSwapContext); +INCLUDE_ASM(s32, "os/code_42470_len_310", osViSwapContext); diff --git a/src/os/code_42d60_len_80.c b/src/os/code_42d60_len_80.c index bd5924c1be..09232ddedf 100644 --- a/src/os/code_42d60_len_80.c +++ b/src/os/code_42d60_len_80.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_42d60_len_80", guMtxCat); +INCLUDE_ASM(s32, "os/code_42d60_len_80", guMtxCat); diff --git a/src/os/code_43200_len_7c0.c b/src/os/code_43200_len_7c0.c index 5957062714..a49ed67f5c 100644 --- a/src/os/code_43200_len_7c0.c +++ b/src/os/code_43200_len_7c0.c @@ -1,10 +1,10 @@ #include "common.h" -INCLUDE_API_ASM("os/code_43200_len_7c0", osMotorAccess); +INCLUDE_ASM(s32, "os/code_43200_len_7c0", osMotorAccess); INCLUDE_ASM(s32, "os/code_43200_len_7c0", osMotorInit, OSMesgQueue* queue, OSPfs* pfs, int unk); INCLUDE_ASM(s32, "os/code_43200_len_7c0", osPfsAllocateFile, OSPfs* pfs, u16 unk1, u32 unk2, u8* unk3, u8* unk4, int unk5, s32* unk6); -INCLUDE_API_ASM("os/code_43200_len_7c0", osPfsDeclearPage); +INCLUDE_ASM(s32, "os/code_43200_len_7c0", osPfsDeclearPage); diff --git a/src/os/code_439c0_len_220.c b/src/os/code_439c0_len_220.c index cfcf17632d..e380b0c72e 100644 --- a/src/os/code_439c0_len_220.c +++ b/src/os/code_439c0_len_220.c @@ -2,4 +2,4 @@ INCLUDE_ASM(s32, "os/code_439c0_len_220", osPfsDeleteFile, OSPfs* pfs, u16 unk1, u32 unk2, u8* unk3, u8* unk4); -INCLUDE_API_ASM("os/code_439c0_len_220", osPfsReleasePages); +INCLUDE_ASM(s32, "os/code_439c0_len_220", osPfsReleasePages); diff --git a/src/os/code_44380_len_4e0.c b/src/os/code_44380_len_4e0.c index 01c403162f..a95c787054 100644 --- a/src/os/code_44380_len_4e0.c +++ b/src/os/code_44380_len_4e0.c @@ -6,4 +6,4 @@ INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsNumFiles, OSPfs* pfs, s32* unk1, INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsInitPak, OSMesgQueue* queue, OSPfs* pfs, int unk1); -INCLUDE_API_ASM("os/code_44380_len_4e0", osPfsCheckRamArea); +INCLUDE_ASM(s32, "os/code_44380_len_4e0", osPfsCheckRamArea); diff --git a/src/os/code_448c0_len_210.c b/src/os/code_448c0_len_210.c index 0c550ec43f..7365b2fab3 100644 --- a/src/os/code_448c0_len_210.c +++ b/src/os/code_448c0_len_210.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_API_ASM("os/code_448c0_len_210", osPfsGetStatus); +INCLUDE_ASM(s32, "os/code_448c0_len_210", osPfsGetStatus); -INCLUDE_API_ASM("os/code_448c0_len_210", osPfsRequestOneChannel); +INCLUDE_ASM(s32, "os/code_448c0_len_210", osPfsRequestOneChannel); -INCLUDE_API_ASM("os/code_448c0_len_210", osPfsGetOneChannelData); +INCLUDE_ASM(s32, "os/code_448c0_len_210", osPfsGetOneChannelData); diff --git a/src/os/code_44ad0_len_70.c b/src/os/code_44ad0_len_70.c index 2743b18604..9deb292e4c 100644 --- a/src/os/code_44ad0_len_70.c +++ b/src/os/code_44ad0_len_70.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_44ad0_len_70", osPfsSelectBank); +INCLUDE_ASM(s32, "os/code_44ad0_len_70", osPfsSelectBank); diff --git a/src/os/code_44b40_len_a90.c b/src/os/code_44b40_len_a90.c index 58464b7e95..b19a0d9b1f 100644 --- a/src/os/code_44b40_len_a90.c +++ b/src/os/code_44b40_len_a90.c @@ -1,15 +1,15 @@ #include "common.h" -INCLUDE_API_ASM("os/code_44b40_len_a90", osSumcalc); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osSumcalc); -INCLUDE_API_ASM("os/code_44b40_len_a90", osIdCheckSum); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osIdCheckSum); -INCLUDE_API_ASM("os/code_44b40_len_a90", osRepairPackId); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osRepairPackId); -INCLUDE_API_ASM("os/code_44b40_len_a90", osCheckPackId); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osCheckPackId); -INCLUDE_API_ASM("os/code_44b40_len_a90", osGetId); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osGetId); -INCLUDE_API_ASM("os/code_44b40_len_a90", osCheckId); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osCheckId); -INCLUDE_API_ASM("os/code_44b40_len_a90", osPfsRWInode); +INCLUDE_ASM(s32, "os/code_44b40_len_a90", osPfsRWInode); diff --git a/src/os/code_455d0_len_1f0.c b/src/os/code_455d0_len_1f0.c index c47811af4e..b593590303 100644 --- a/src/os/code_455d0_len_1f0.c +++ b/src/os/code_455d0_len_1f0.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_455d0_len_1f0", osContRamRead); +INCLUDE_ASM(s32, "os/code_455d0_len_1f0", osContRamRead); diff --git a/src/os/code_457c0_len_270.c b/src/os/code_457c0_len_270.c index a751304406..9e8650f090 100644 --- a/src/os/code_457c0_len_270.c +++ b/src/os/code_457c0_len_270.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_457c0_len_270", osContRamWrite); +INCLUDE_ASM(s32, "os/code_457c0_len_270", osContRamWrite); diff --git a/src/os/code_45df0_len_970.c b/src/os/code_45df0_len_970.c index 8f98394452..f0a4ec3410 100644 --- a/src/os/code_45df0_len_970.c +++ b/src/os/code_45df0_len_970.c @@ -2,13 +2,13 @@ INCLUDE_ASM(s32, "os/code_45df0_len_970", func_8006A9F0); -INCLUDE_API_ASM("os/code_45df0_len_970", osExceptionPreamble); +INCLUDE_ASM(s32, "os/code_45df0_len_970", osExceptionPreamble); -INCLUDE_API_ASM("os/code_45df0_len_970", savecontext); +INCLUDE_ASM(s32, "os/code_45df0_len_970", savecontext); -INCLUDE_API_ASM("os/code_45df0_len_970", savercp); +INCLUDE_ASM(s32, "os/code_45df0_len_970", savercp); -INCLUDE_API_ASM("os/code_45df0_len_970", endrcp); +INCLUDE_ASM(s32, "os/code_45df0_len_970", endrcp); INCLUDE_ASM(s32, "os/code_45df0_len_970", handle_interrupt); @@ -18,41 +18,41 @@ INCLUDE_ASM(s32, "os/code_45df0_len_970", IP6_Hdlr); INCLUDE_ASM(s32, "os/code_45df0_len_970", IP7_Hdlr); -INCLUDE_API_ASM("os/code_45df0_len_970", counter); +INCLUDE_ASM(s32, "os/code_45df0_len_970", counter); -INCLUDE_API_ASM("os/code_45df0_len_970", cart); +INCLUDE_ASM(s32, "os/code_45df0_len_970", cart); -INCLUDE_API_ASM("os/code_45df0_len_970", rcp); +INCLUDE_ASM(s32, "os/code_45df0_len_970", rcp); INCLUDE_ASM(s32, "os/code_45df0_len_970", sp_other_break); -INCLUDE_API_ASM("os/code_45df0_len_970", vi); +INCLUDE_ASM(s32, "os/code_45df0_len_970", vi); -INCLUDE_API_ASM("os/code_45df0_len_970", ai); +INCLUDE_ASM(s32, "os/code_45df0_len_970", ai); -INCLUDE_API_ASM("os/code_45df0_len_970", si); +INCLUDE_ASM(s32, "os/code_45df0_len_970", si); -INCLUDE_API_ASM("os/code_45df0_len_970", pi); +INCLUDE_ASM(s32, "os/code_45df0_len_970", pi); -INCLUDE_API_ASM("os/code_45df0_len_970", dp); +INCLUDE_ASM(s32, "os/code_45df0_len_970", dp); -INCLUDE_API_ASM("os/code_45df0_len_970", NoMoreRcpInts); +INCLUDE_ASM(s32, "os/code_45df0_len_970", NoMoreRcpInts); -INCLUDE_API_ASM("os/code_45df0_len_970", prenmi); +INCLUDE_ASM(s32, "os/code_45df0_len_970", prenmi); -INCLUDE_API_ASM("os/code_45df0_len_970", firstnmi); +INCLUDE_ASM(s32, "os/code_45df0_len_970", firstnmi); -INCLUDE_API_ASM("os/code_45df0_len_970", sw2); +INCLUDE_ASM(s32, "os/code_45df0_len_970", sw2); -INCLUDE_API_ASM("os/code_45df0_len_970", sw1); +INCLUDE_ASM(s32, "os/code_45df0_len_970", sw1); INCLUDE_ASM(s32, "os/code_45df0_len_970", handle_break); -INCLUDE_API_ASM("os/code_45df0_len_970", redispatch); +INCLUDE_ASM(s32, "os/code_45df0_len_970", redispatch); -INCLUDE_API_ASM("os/code_45df0_len_970", enqueueRunning); +INCLUDE_ASM(s32, "os/code_45df0_len_970", enqueueRunning); -INCLUDE_API_ASM("os/code_45df0_len_970", panic); +INCLUDE_ASM(s32, "os/code_45df0_len_970", panic); INCLUDE_ASM(s32, "os/code_45df0_len_970", send_mesg); @@ -60,16 +60,16 @@ INCLUDE_ASM(s32, "os/code_45df0_len_970", send_done); INCLUDE_ASM(s32, "os/code_45df0_len_970", handle_CPU); -INCLUDE_API_ASM("os/code_45df0_len_970", osEnqueueAndYield); +INCLUDE_ASM(s32, "os/code_45df0_len_970", osEnqueueAndYield); -INCLUDE_API_ASM("os/code_45df0_len_970", noEnqueue); +INCLUDE_ASM(s32, "os/code_45df0_len_970", noEnqueue); -INCLUDE_API_ASM("os/code_45df0_len_970", osEnqueueThread); +INCLUDE_ASM(s32, "os/code_45df0_len_970", osEnqueueThread); -INCLUDE_API_ASM("os/code_45df0_len_970", osPopThread); +INCLUDE_ASM(s32, "os/code_45df0_len_970", osPopThread); -INCLUDE_API_ASM("os/code_45df0_len_970", osNop); +INCLUDE_ASM(s32, "os/code_45df0_len_970", osNop); -INCLUDE_API_ASM("os/code_45df0_len_970", osDispatchThread); +INCLUDE_ASM(s32, "os/code_45df0_len_970", osDispatchThread); INCLUDE_ASM(void, "os/code_45df0_len_970", osCleanupThread); diff --git a/src/os/code_467f0_len_90.c b/src/os/code_467f0_len_90.c index a912dcd27a..9a80fb50cd 100644 --- a/src/os/code_467f0_len_90.c +++ b/src/os/code_467f0_len_90.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_467f0_len_90", osSetGlobalIntMask); +INCLUDE_ASM(s32, "os/code_467f0_len_90", osSetGlobalIntMask); -INCLUDE_API_ASM("os/code_467f0_len_90", osResetGlobalIntMask); +INCLUDE_ASM(s32, "os/code_467f0_len_90", osResetGlobalIntMask); diff --git a/src/os/code_46880_len_260.c b/src/os/code_46880_len_260.c index 0df68af824..d69ff7fd83 100644 --- a/src/os/code_46880_len_260.c +++ b/src/os/code_46880_len_260.c @@ -1,7 +1,7 @@ #include "common.h" -INCLUDE_API_ASM("os/code_46880_len_260", osPiRawStartDma); +INCLUDE_ASM(s32, "os/code_46880_len_260", osPiRawStartDma); -INCLUDE_API_ASM("os/code_46880_len_260", osPiGetCmdQueue); +INCLUDE_ASM(s32, "os/code_46880_len_260", osPiGetCmdQueue); -INCLUDE_API_ASM("os/code_46880_len_260", osEPiRawReadIo); +INCLUDE_ASM(s32, "os/code_46880_len_260", osEPiRawReadIo); diff --git a/src/os/code_46ae0_len_170.c b/src/os/code_46ae0_len_170.c index 05b5613564..babc01689b 100644 --- a/src/os/code_46ae0_len_170.c +++ b/src/os/code_46ae0_len_170.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_46ae0_len_170", osEPiRawWriteIo); +INCLUDE_ASM(s32, "os/code_46ae0_len_170", osEPiRawWriteIo); diff --git a/src/os/code_46c50_len_20.c b/src/os/code_46c50_len_20.c index ab54bc36bb..f66ed3c48a 100644 --- a/src/os/code_46c50_len_20.c +++ b/src/os/code_46c50_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_46c50_len_20", osAiDeviceBusy); +INCLUDE_ASM(s32, "os/code_46c50_len_20", osAiDeviceBusy); diff --git a/src/os/code_46c70_len_e00.c b/src/os/code_46c70_len_e00.c index a14464d049..c3cc957ad0 100644 --- a/src/os/code_46c70_len_e00.c +++ b/src/os/code_46c70_len_e00.c @@ -10,4 +10,4 @@ INCLUDE_ASM(s32, "os/code_46c70_len_e00", _Ldunscale); INCLUDE_ASM(s32, "os/code_46c70_len_e00", _Genld); -INCLUDE_API_ASM("os/code_46c70_len_e00", osGetCause); +INCLUDE_ASM(s32, "os/code_46c70_len_e00", osGetCause); diff --git a/src/os/code_47a70_len_10.c b/src/os/code_47a70_len_10.c index 8b14905482..75b53a2f20 100644 --- a/src/os/code_47a70_len_10.c +++ b/src/os/code_47a70_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47a70_len_10", osGetSR); +INCLUDE_ASM(s32, "os/code_47a70_len_10", osGetSR); diff --git a/src/os/code_47a80_len_10.c b/src/os/code_47a80_len_10.c index 115e39a29e..a20dd8385c 100644 --- a/src/os/code_47a80_len_10.c +++ b/src/os/code_47a80_len_10.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47a80_len_10", osSetCompare); +INCLUDE_ASM(s32, "os/code_47a80_len_10", osSetCompare); diff --git a/src/os/code_47a90_len_50.c b/src/os/code_47a90_len_50.c index 67dfc7f3c5..4b1fd084fc 100644 --- a/src/os/code_47a90_len_50.c +++ b/src/os/code_47a90_len_50.c @@ -1,9 +1,9 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47a90_len_50", osSetFpcCsr); +INCLUDE_ASM(s32, "os/code_47a90_len_50", osSetFpcCsr); -INCLUDE_API_ASM("os/code_47a90_len_50", osSetSR); +INCLUDE_ASM(s32, "os/code_47a90_len_50", osSetSR); -INCLUDE_API_ASM("os/code_47a90_len_50", osSetWatchLo); +INCLUDE_ASM(s32, "os/code_47a90_len_50", osSetWatchLo); -INCLUDE_API_ASM("os/code_47a90_len_50", osSpDeviceBusy); +INCLUDE_ASM(s32, "os/code_47a90_len_50", osSpDeviceBusy); diff --git a/src/os/code_47ae0_len_e0.c b/src/os/code_47ae0_len_e0.c index 959dafefab..9480e91498 100644 --- a/src/os/code_47ae0_len_e0.c +++ b/src/os/code_47ae0_len_e0.c @@ -1,9 +1,9 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47ae0_len_e0", osSpGetStatus); +INCLUDE_ASM(s32, "os/code_47ae0_len_e0", osSpGetStatus); -INCLUDE_API_ASM("os/code_47ae0_len_e0", osSpSetStatus); +INCLUDE_ASM(s32, "os/code_47ae0_len_e0", osSpSetStatus); -INCLUDE_API_ASM("os/code_47ae0_len_e0", osSpSetPc); +INCLUDE_ASM(s32, "os/code_47ae0_len_e0", osSpSetPc); -INCLUDE_API_ASM("os/code_47ae0_len_e0", osSpRawStartDma); +INCLUDE_ASM(s32, "os/code_47ae0_len_e0", osSpRawStartDma); diff --git a/src/os/code_47bc0_len_50.c b/src/os/code_47bc0_len_50.c index 05c00bc98c..d64550095d 100644 --- a/src/os/code_47bc0_len_50.c +++ b/src/os/code_47bc0_len_50.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47bc0_len_50", osSiRawReadIo); +INCLUDE_ASM(s32, "os/code_47bc0_len_50", osSiRawReadIo); diff --git a/src/os/code_47c10_len_50.c b/src/os/code_47c10_len_50.c index 259cadb52f..fa7dd12a49 100644 --- a/src/os/code_47c10_len_50.c +++ b/src/os/code_47c10_len_50.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47c10_len_50", osSiRawWriteIo); +INCLUDE_ASM(s32, "os/code_47c10_len_50", osSiRawWriteIo); diff --git a/src/os/code_47c60_len_f0.c b/src/os/code_47c60_len_f0.c index 2666fbca89..152284fa40 100644 --- a/src/os/code_47c60_len_f0.c +++ b/src/os/code_47c60_len_f0.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47c60_len_f0", osContAddressCrc); +INCLUDE_ASM(s32, "os/code_47c60_len_f0", osContAddressCrc); -INCLUDE_API_ASM("os/code_47c60_len_f0", osContDataCrc); +INCLUDE_ASM(s32, "os/code_47c60_len_f0", osContDataCrc); diff --git a/src/os/code_47e90_len_110.c b/src/os/code_47e90_len_110.c index 266cf5bec1..2ce12fc5d3 100644 --- a/src/os/code_47e90_len_110.c +++ b/src/os/code_47e90_len_110.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47e90_len_110", osViInit); +INCLUDE_ASM(s32, "os/code_47e90_len_110", osViInit); diff --git a/src/os/code_47fa0_len_20.c b/src/os/code_47fa0_len_20.c index 3b346f6388..ceb29614fa 100644 --- a/src/os/code_47fa0_len_20.c +++ b/src/os/code_47fa0_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_47fa0_len_20", osViGetCurrentContext); +INCLUDE_ASM(s32, "os/code_47fa0_len_20", osViGetCurrentContext); diff --git a/src/os/code_48020_len_a00.c b/src/os/code_48020_len_a00.c index 2ee0df4088..f6cb6a7a58 100644 --- a/src/os/code_48020_len_a00.c +++ b/src/os/code_48020_len_a00.c @@ -4,10 +4,10 @@ INCLUDE_ASM(s32, "os/code_48020_len_a00", osPfsChecker, OSPfs* pfs); INCLUDE_ASM(s32, "os/code_48020_len_a00", corrupted_init); -INCLUDE_API_ASM("os/code_48020_len_a00", corrupted); +INCLUDE_ASM(s32, "os/code_48020_len_a00", corrupted); INCLUDE_ASM(s32, "os/code_48020_len_a00", osPfsIsPlug, OSMesgQueue* queue, u8* unk); -INCLUDE_API_ASM("os/code_48020_len_a00", osPfsRequestData); +INCLUDE_ASM(s32, "os/code_48020_len_a00", osPfsRequestData); -INCLUDE_API_ASM("os/code_48020_len_a00", osPfsGetInitData); +INCLUDE_ASM(s32, "os/code_48020_len_a00", osPfsGetInitData); diff --git a/src/os/code_48a20_len_1c0.c b/src/os/code_48a20_len_1c0.c index c4876996e4..9add8eb7a5 100644 --- a/src/os/code_48a20_len_1c0.c +++ b/src/os/code_48a20_len_1c0.c @@ -1,5 +1,5 @@ #include "common.h" -INCLUDE_API_ASM("os/code_48a20_len_1c0", ldiv); +INCLUDE_ASM(s32, "os/code_48a20_len_1c0", ldiv); -INCLUDE_API_ASM("os/code_48a20_len_1c0", lldiv); +INCLUDE_ASM(s32, "os/code_48a20_len_1c0", lldiv); diff --git a/src/os/code_48be0_len_20.c b/src/os/code_48be0_len_20.c index 50263cfa4b..b6ce1230a9 100644 --- a/src/os/code_48be0_len_20.c +++ b/src/os/code_48be0_len_20.c @@ -1,3 +1,3 @@ #include "common.h" -INCLUDE_API_ASM("os/code_48be0_len_20", osSiDeviceBusy); +INCLUDE_ASM(s32, "os/code_48be0_len_20", osSiDeviceBusy); diff --git a/src/os/code_4a360_len_930.c b/src/os/code_4a360_len_930.c index 6740f3c107..18a9013f0d 100644 --- a/src/os/code_4a360_len_930.c +++ b/src/os/code_4a360_len_930.c @@ -2,20 +2,20 @@ INCLUDE_ASM(s32, "os/code_4a360_len_930", func_8006EF60); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashInit); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashInit); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashReadStatus); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashReadStatus); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashReadId); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashReadId); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashClearStatus); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashClearStatus); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashAllErase); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashAllErase); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashSectorErase); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashSectorErase); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashWriteBuffer); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashWriteBuffer); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashWriteArray); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashWriteArray); -INCLUDE_API_ASM("os/code_4a360_len_930", osFlashReadArray); +INCLUDE_ASM(s32, "os/code_4a360_len_930", osFlashReadArray); diff --git a/tools/splat.yaml b/tools/splat.yaml index 0c8519cc49..e43964eacb 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -232,6 +232,7 @@ segments: - [0xef070, "c", "code_ef070_len_3400"] - [0xf2470, "c", "code_f2470_len_27f0"] - [0xf4c60, "c", "code_f4c60_len_4300"] + - [0xf5750, "c", "code_F5750"] - [0xf8f60, "c", "code_f8f60_len_1560"] - [0xfa4c0, "c", "code_fa4c0_len_3bf0"] - [0xfe0b0, "c", "code_fe0b0_len_5a0"] diff --git a/undefined_syms.txt b/undefined_syms.txt index d628dce52b..703f34610a 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -59,6 +59,7 @@ gBackgroundImage = 0x80200000; D_802C3000 = 0x802C3000; D_802DBD40 = 0x802DBD40; gCurrentPrintContext = 0x802DB260; +D_802DB264 = 0x802DB264; D_802DB268 = 0x802DB268; D_802E0D90 = 0x802E0D90; D_802EB3D0 = 0x802EB3D0;