From a25b53a8a1ba75a4c5cf6233e9023a845500efff Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 15 Aug 2020 05:25:36 +0100 Subject: [PATCH] name and match resolve_npc --- .../GetSelfAnimationFromTable.s | 2 +- .../ClearPartnerMoveHistory.s | 2 +- .../code_f2470_len_27f0/EnableNpcBlur.s | 2 +- .../code_f2470_len_27f0/EnableNpcShadow.s | 2 +- .../code_f2470_len_27f0/GetCurrentPartnerID.s | 10 ++-- .../code_f2470_len_27f0/GetNpcAnimation.s | 4 +- .../code_f2470_len_27f0/GetNpcPos.s | 6 +-- .../code_f2470_len_27f0/GetNpcYaw.s | 2 +- .../code_f2470_len_27f0/InterpNpcYaw.s | 2 +- .../code_f2470_len_27f0/NpcFaceNpc.s | 4 +- .../code_f2470_len_27f0/NpcFacePlayer.s | 2 +- .../code_f2470_len_27f0/NpcFlyTo.s | 2 +- .../code_f2470_len_27f0/NpcMoveTo.s | 2 +- .../NpcSetHomePosToCurrent.s | 2 +- .../code_f2470_len_27f0/PlaySoundAtNpc.s | 4 +- .../code_f2470_len_27f0/SetNpcAnimation.s | 2 +- .../code_f2470_len_27f0/SetNpcCollisionSize.s | 2 +- .../code_f2470_len_27f0/SetNpcEffect.s | 2 +- .../code_f2470_len_27f0/SetNpcFlagBits.s | 2 +- .../code_f2470_len_27f0/SetNpcJumpscale.s | 2 +- .../code_f2470_len_27f0/SetNpcPos.s | 2 +- .../code_f2470_len_27f0/SetNpcRotation.s | 4 +- .../code_f2470_len_27f0/SetNpcScale.s | 2 +- .../code_f2470_len_27f0/SetNpcSpeed.s | 2 +- .../code_f2470_len_27f0/SetNpcYaw.s | 2 +- .../code_f2470_len_27f0/_npc_jump_to.s | 2 +- .../{func_802CDAC0.s => resolve_npc.s} | 2 +- .../code_f4c60_len_4300/_show_message.s | 4 +- .../code_f8f60_len_1560/GetAngleBetweenNPCs.s | 4 +- .../code_f8f60_len_1560/GetAngleToNPC.s | 2 +- .../code_f8f60_len_1560/GetAngleToPlayer.s | 2 +- .../code_fa4c0_len_3bf0/RemoveEffect.s | 2 +- .../code_fa4c0_len_3bf0/ShowEmote.s | 2 +- .../code_fa4c0_len_3bf0/ShowSleepBubble.s | 2 +- include/common_structs.h | 50 ++++++++++++++++--- include/enums.h | 2 +- src/code_13870_len_6980.c | 4 +- src/code_f2470_len_27f0.c | 10 +++- tools/n64split.yaml | 2 +- tools/starrod_structs_to_h.py | 1 + 40 files changed, 103 insertions(+), 58 deletions(-) rename asm/nonmatchings/code_f2470_len_27f0/{func_802CDAC0.s => resolve_npc.s} (98%) diff --git a/asm/nonmatchings/code_1f580_len_1940/GetSelfAnimationFromTable.s b/asm/nonmatchings/code_1f580_len_1940/GetSelfAnimationFromTable.s index 44127b6de8..daa2c7deb8 100644 --- a/asm/nonmatchings/code_1f580_len_1940/GetSelfAnimationFromTable.s +++ b/asm/nonmatchings/code_1f580_len_1940/GetSelfAnimationFromTable.s @@ -95,7 +95,7 @@ glabel GetSelfAnimationFromTable /* 020C84 80045884 0040982D */ daddu $s3, $v0, $zero /* 020C88 80045888 0220202D */ daddu $a0, $s1, $zero /* 020C8C 8004588C 0240282D */ daddu $a1, $s2, $zero -/* 020C90 80045890 0C0B36B0 */ jal func_802CDAC0 +/* 020C90 80045890 0C0B36B0 */ jal resolve_npc /* 020C94 80045894 0040802D */ daddu $s0, $v0, $zero /* 020C98 80045898 10400004 */ beqz $v0, .L800458AC /* 020C9C 8004589C 0040202D */ daddu $a0, $v0, $zero diff --git a/asm/nonmatchings/code_f2470_len_27f0/ClearPartnerMoveHistory.s b/asm/nonmatchings/code_f2470_len_27f0/ClearPartnerMoveHistory.s index c3ca802313..0df55d3a6f 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/ClearPartnerMoveHistory.s +++ b/asm/nonmatchings/code_f2470_len_27f0/ClearPartnerMoveHistory.s @@ -11,7 +11,7 @@ glabel ClearPartnerMoveHistory /* 0F3D34 802CF384 0C0B1EAF */ jal get_variable /* 0F3D38 802CF388 8C450000 */ lw $a1, ($v0) /* 0F3D3C 802CF38C 0200202D */ daddu $a0, $s0, $zero -/* 0F3D40 802CF390 0C0B36B0 */ jal func_802CDAC0 +/* 0F3D40 802CF390 0C0B36B0 */ jal resolve_npc /* 0F3D44 802CF394 0040282D */ daddu $a1, $v0, $zero /* 0F3D48 802CF398 50400004 */ beql $v0, $zero, .L802CF3AC /* 0F3D4C 802CF39C 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_f2470_len_27f0/EnableNpcBlur.s b/asm/nonmatchings/code_f2470_len_27f0/EnableNpcBlur.s index cb73f3e671..f9afaf4111 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/EnableNpcBlur.s +++ b/asm/nonmatchings/code_f2470_len_27f0/EnableNpcBlur.s @@ -18,7 +18,7 @@ glabel EnableNpcBlur /* 0F3CCC 802CF31C 0040802D */ daddu $s0, $v0, $zero /* 0F3CD0 802CF320 0220202D */ daddu $a0, $s1, $zero /* 0F3CD4 802CF324 0200282D */ daddu $a1, $s0, $zero -/* 0F3CD8 802CF328 0C0B36B0 */ jal func_802CDAC0 +/* 0F3CD8 802CF328 0C0B36B0 */ jal resolve_npc /* 0F3CDC 802CF32C 0040802D */ daddu $s0, $v0, $zero /* 0F3CE0 802CF330 5040000A */ beql $v0, $zero, .L802CF35C /* 0F3CE4 802CF334 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_f2470_len_27f0/EnableNpcShadow.s b/asm/nonmatchings/code_f2470_len_27f0/EnableNpcShadow.s index 0586c50ccc..6fd53b6e0a 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/EnableNpcShadow.s +++ b/asm/nonmatchings/code_f2470_len_27f0/EnableNpcShadow.s @@ -18,7 +18,7 @@ glabel EnableNpcShadow /* 0F3C48 802CF298 0040802D */ daddu $s0, $v0, $zero /* 0F3C4C 802CF29C 0220202D */ daddu $a0, $s1, $zero /* 0F3C50 802CF2A0 0200282D */ daddu $a1, $s0, $zero -/* 0F3C54 802CF2A4 0C0B36B0 */ jal func_802CDAC0 +/* 0F3C54 802CF2A4 0C0B36B0 */ jal resolve_npc /* 0F3C58 802CF2A8 0040802D */ daddu $s0, $v0, $zero /* 0F3C5C 802CF2AC 5040000A */ beql $v0, $zero, .L802CF2D8 /* 0F3C60 802CF2B0 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_f2470_len_27f0/GetCurrentPartnerID.s b/asm/nonmatchings/code_f2470_len_27f0/GetCurrentPartnerID.s index 9405067605..72338098cb 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/GetCurrentPartnerID.s +++ b/asm/nonmatchings/code_f2470_len_27f0/GetCurrentPartnerID.s @@ -93,7 +93,7 @@ glabel GetCurrentPartnerID /* 0F4774 802CFDC4 0040982D */ daddu $s3, $v0, $zero /* 0F4778 802CFDC8 0220202D */ daddu $a0, $s1, $zero /* 0F477C 802CFDCC 0240282D */ daddu $a1, $s2, $zero -/* 0F4780 802CFDD0 0C0B36B0 */ jal func_802CDAC0 +/* 0F4780 802CFDD0 0C0B36B0 */ jal resolve_npc /* 0F4784 802CFDD4 0040802D */ daddu $s0, $v0, $zero /* 0F4788 802CFDD8 10400009 */ beqz $v0, .L802CFE00 /* 0F478C 802CFDDC 0040202D */ daddu $a0, $v0, $zero @@ -129,7 +129,7 @@ glabel GetCurrentPartnerID /* 0F47FC 802CFE4C 26310004 */ addiu $s1, $s1, 4 /* 0F4800 802CFE50 0200202D */ daddu $a0, $s0, $zero /* 0F4804 802CFE54 8E310000 */ lw $s1, ($s1) -/* 0F4808 802CFE58 0C0B36B0 */ jal func_802CDAC0 +/* 0F4808 802CFE58 0C0B36B0 */ jal resolve_npc /* 0F480C 802CFE5C 0040282D */ daddu $a1, $v0, $zero /* 0F4810 802CFE60 54400001 */ bnel $v0, $zero, .L802CFE68 /* 0F4814 802CFE64 A45100A2 */ sh $s1, 0xa2($v0) @@ -156,7 +156,7 @@ glabel GetCurrentPartnerID /* 0F4860 802CFEB0 0040802D */ daddu $s0, $v0, $zero /* 0F4864 802CFEB4 0220202D */ daddu $a0, $s1, $zero /* 0F4868 802CFEB8 0200282D */ daddu $a1, $s0, $zero -/* 0F486C 802CFEBC 0C0B36B0 */ jal func_802CDAC0 +/* 0F486C 802CFEBC 0C0B36B0 */ jal resolve_npc /* 0F4870 802CFEC0 0040802D */ daddu $s0, $v0, $zero /* 0F4874 802CFEC4 10400003 */ beqz $v0, .L802CFED4 /* 0F4878 802CFEC8 0040202D */ daddu $a0, $v0, $zero @@ -204,7 +204,7 @@ glabel GetCurrentPartnerID /* 0F4918 802CFF68 0040982D */ daddu $s3, $v0, $zero /* 0F491C 802CFF6C 0220202D */ daddu $a0, $s1, $zero /* 0F4920 802CFF70 0240282D */ daddu $a1, $s2, $zero -/* 0F4924 802CFF74 0C0B36B0 */ jal func_802CDAC0 +/* 0F4924 802CFF74 0C0B36B0 */ jal resolve_npc /* 0F4928 802CFF78 0040802D */ daddu $s0, $v0, $zero /* 0F492C 802CFF7C 10400006 */ beqz $v0, .L802CFF98 /* 0F4930 802CFF80 0040202D */ daddu $a0, $v0, $zero @@ -282,7 +282,7 @@ glabel GetCurrentPartnerID /* 0F4A48 802D0098 0040982D */ daddu $s3, $v0, $zero /* 0F4A4C 802D009C 0220202D */ daddu $a0, $s1, $zero /* 0F4A50 802D00A0 0240282D */ daddu $a1, $s2, $zero -/* 0F4A54 802D00A4 0C0B36B0 */ jal func_802CDAC0 +/* 0F4A54 802D00A4 0C0B36B0 */ jal resolve_npc /* 0F4A58 802D00A8 0040882D */ daddu $s1, $v0, $zero /* 0F4A5C 802D00AC 0040802D */ daddu $s0, $v0, $zero /* 0F4A60 802D00B0 1200000C */ beqz $s0, .L802D00E4 diff --git a/asm/nonmatchings/code_f2470_len_27f0/GetNpcAnimation.s b/asm/nonmatchings/code_f2470_len_27f0/GetNpcAnimation.s index 9469b7b053..903a0fc206 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/GetNpcAnimation.s +++ b/asm/nonmatchings/code_f2470_len_27f0/GetNpcAnimation.s @@ -14,7 +14,7 @@ glabel GetNpcAnimation /* 0F2B30 802CE180 26100004 */ addiu $s0, $s0, 4 /* 0F2B34 802CE184 0220202D */ daddu $a0, $s1, $zero /* 0F2B38 802CE188 8E100000 */ lw $s0, ($s0) -/* 0F2B3C 802CE18C 0C0B36B0 */ jal func_802CDAC0 +/* 0F2B3C 802CE18C 0C0B36B0 */ jal resolve_npc /* 0F2B40 802CE190 0040282D */ daddu $a1, $v0, $zero /* 0F2B44 802CE194 10400004 */ beqz $v0, .L802CE1A8 /* 0F2B48 802CE198 0220202D */ daddu $a0, $s1, $zero @@ -45,7 +45,7 @@ glabel GetNpcAnimation /* 0F2BA4 802CE1F4 0040802D */ daddu $s0, $v0, $zero /* 0F2BA8 802CE1F8 0220202D */ daddu $a0, $s1, $zero /* 0F2BAC 802CE1FC 0200282D */ daddu $a1, $s0, $zero -/* 0F2BB0 802CE200 0C0B36B0 */ jal func_802CDAC0 +/* 0F2BB0 802CE200 0C0B36B0 */ jal resolve_npc /* 0F2BB4 802CE204 46000506 */ mov.s $f20, $f0 /* 0F2BB8 802CE208 54400001 */ bnel $v0, $zero, .L802CE210 /* 0F2BBC 802CE20C E4540030 */ swc1 $f20, 0x30($v0) diff --git a/asm/nonmatchings/code_f2470_len_27f0/GetNpcPos.s b/asm/nonmatchings/code_f2470_len_27f0/GetNpcPos.s index ed64f85213..02abc282ec 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/GetNpcPos.s +++ b/asm/nonmatchings/code_f2470_len_27f0/GetNpcPos.s @@ -20,7 +20,7 @@ glabel GetNpcPos /* 0F3ADC 802CF12C 0220202D */ daddu $a0, $s1, $zero /* 0F3AE0 802CF130 8E130000 */ lw $s3, ($s0) /* 0F3AE4 802CF134 8E140004 */ lw $s4, 4($s0) -/* 0F3AE8 802CF138 0C0B36B0 */ jal func_802CDAC0 +/* 0F3AE8 802CF138 0C0B36B0 */ jal resolve_npc /* 0F3AEC 802CF13C 0040282D */ daddu $a1, $v0, $zero /* 0F3AF0 802CF140 0040802D */ daddu $s0, $v0, $zero /* 0F3AF4 802CF144 12000012 */ beqz $s0, .L802CF190 @@ -64,7 +64,7 @@ glabel GetNpcPos /* 0F3B84 802CF1D4 26310004 */ addiu $s1, $s1, 4 /* 0F3B88 802CF1D8 0200202D */ daddu $a0, $s0, $zero /* 0F3B8C 802CF1DC 8E310000 */ lw $s1, ($s1) -/* 0F3B90 802CF1E0 0C0B36B0 */ jal func_802CDAC0 +/* 0F3B90 802CF1E0 0C0B36B0 */ jal resolve_npc /* 0F3B94 802CF1E4 0040282D */ daddu $a1, $v0, $zero /* 0F3B98 802CF1E8 54400001 */ bnel $v0, $zero, .L802CF1F0 /* 0F3B9C 802CF1EC AC510080 */ sw $s1, 0x80($v0) @@ -87,7 +87,7 @@ glabel GetNpcPos /* 0F3BD8 802CF228 26310004 */ addiu $s1, $s1, 4 /* 0F3BDC 802CF22C 0200202D */ daddu $a0, $s0, $zero /* 0F3BE0 802CF230 8E310000 */ lw $s1, ($s1) -/* 0F3BE4 802CF234 0C0B36B0 */ jal func_802CDAC0 +/* 0F3BE4 802CF234 0C0B36B0 */ jal resolve_npc /* 0F3BE8 802CF238 0040282D */ daddu $a1, $v0, $zero /* 0F3BEC 802CF23C 10400004 */ beqz $v0, .L802CF250 /* 0F3BF0 802CF240 0040202D */ daddu $a0, $v0, $zero diff --git a/asm/nonmatchings/code_f2470_len_27f0/GetNpcYaw.s b/asm/nonmatchings/code_f2470_len_27f0/GetNpcYaw.s index db0711c48e..87129f245b 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/GetNpcYaw.s +++ b/asm/nonmatchings/code_f2470_len_27f0/GetNpcYaw.s @@ -14,7 +14,7 @@ glabel GetNpcYaw /* 0F33E0 802CEA30 26100004 */ addiu $s0, $s0, 4 /* 0F33E4 802CEA34 0220202D */ daddu $a0, $s1, $zero /* 0F33E8 802CEA38 8E100000 */ lw $s0, ($s0) -/* 0F33EC 802CEA3C 0C0B36B0 */ jal func_802CDAC0 +/* 0F33EC 802CEA3C 0C0B36B0 */ jal resolve_npc /* 0F33F0 802CEA40 0040282D */ daddu $a1, $v0, $zero /* 0F33F4 802CEA44 5040000A */ beql $v0, $zero, .L802CEA70 /* 0F33F8 802CEA48 24020002 */ addiu $v0, $zero, 2 diff --git a/asm/nonmatchings/code_f2470_len_27f0/InterpNpcYaw.s b/asm/nonmatchings/code_f2470_len_27f0/InterpNpcYaw.s index d4b13e23a5..5d50dfd10b 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/InterpNpcYaw.s +++ b/asm/nonmatchings/code_f2470_len_27f0/InterpNpcYaw.s @@ -21,7 +21,7 @@ glabel InterpNpcYaw /* 0F34F0 802CEB40 0C0B1EAF */ jal get_variable /* 0F34F4 802CEB44 26310004 */ addiu $s1, $s1, 4 /* 0F34F8 802CEB48 0240202D */ daddu $a0, $s2, $zero -/* 0F34FC 802CEB4C 0C0B36B0 */ jal func_802CDAC0 +/* 0F34FC 802CEB4C 0C0B36B0 */ jal resolve_npc /* 0F3500 802CEB50 0040282D */ daddu $a1, $v0, $zero /* 0F3504 802CEB54 0040802D */ daddu $s0, $v0, $zero /* 0F3508 802CEB58 12000052 */ beqz $s0, .L802CECA4 diff --git a/asm/nonmatchings/code_f2470_len_27f0/NpcFaceNpc.s b/asm/nonmatchings/code_f2470_len_27f0/NpcFaceNpc.s index 35aeac28d5..6012a48b36 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/NpcFaceNpc.s +++ b/asm/nonmatchings/code_f2470_len_27f0/NpcFaceNpc.s @@ -27,12 +27,12 @@ glabel NpcFaceNpc /* 0F3884 802CEED4 0C0B1EAF */ jal get_variable /* 0F3888 802CEED8 0040802D */ daddu $s0, $v0, $zero /* 0F388C 802CEEDC 0220202D */ daddu $a0, $s1, $zero -/* 0F3890 802CEEE0 0C0B36B0 */ jal func_802CDAC0 +/* 0F3890 802CEEE0 0C0B36B0 */ jal resolve_npc /* 0F3894 802CEEE4 0040282D */ daddu $a1, $v0, $zero /* 0F3898 802CEEE8 0040982D */ daddu $s3, $v0, $zero /* 0F389C 802CEEEC 12600006 */ beqz $s3, .L802CEF08 /* 0F38A0 802CEEF0 0220202D */ daddu $a0, $s1, $zero -/* 0F38A4 802CEEF4 0C0B36B0 */ jal func_802CDAC0 +/* 0F38A4 802CEEF4 0C0B36B0 */ jal resolve_npc /* 0F38A8 802CEEF8 0200282D */ daddu $a1, $s0, $zero /* 0F38AC 802CEEFC 0040802D */ daddu $s0, $v0, $zero /* 0F38B0 802CEF00 16000003 */ bnez $s0, .L802CEF10 diff --git a/asm/nonmatchings/code_f2470_len_27f0/NpcFacePlayer.s b/asm/nonmatchings/code_f2470_len_27f0/NpcFacePlayer.s index c490c16148..aac23d7674 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/NpcFacePlayer.s +++ b/asm/nonmatchings/code_f2470_len_27f0/NpcFacePlayer.s @@ -24,7 +24,7 @@ glabel NpcFacePlayer /* 0F36C0 802CED10 0C0B1EAF */ jal get_variable /* 0F36C4 802CED14 26520004 */ addiu $s2, $s2, 4 /* 0F36C8 802CED18 0220202D */ daddu $a0, $s1, $zero -/* 0F36CC 802CED1C 0C0B36B0 */ jal func_802CDAC0 +/* 0F36CC 802CED1C 0C0B36B0 */ jal resolve_npc /* 0F36D0 802CED20 0040282D */ daddu $a1, $v0, $zero /* 0F36D4 802CED24 0040802D */ daddu $s0, $v0, $zero /* 0F36D8 802CED28 1200004B */ beqz $s0, .L802CEE58 diff --git a/asm/nonmatchings/code_f2470_len_27f0/NpcFlyTo.s b/asm/nonmatchings/code_f2470_len_27f0/NpcFlyTo.s index 195963b9a2..e530fc6220 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/NpcFlyTo.s +++ b/asm/nonmatchings/code_f2470_len_27f0/NpcFlyTo.s @@ -22,7 +22,7 @@ glabel NpcFlyTo /* 0F30EC 802CE73C 0C0B1EAF */ jal get_variable /* 0F30F0 802CE740 26100004 */ addiu $s0, $s0, 4 /* 0F30F4 802CE744 0240202D */ daddu $a0, $s2, $zero -/* 0F30F8 802CE748 0C0B36B0 */ jal func_802CDAC0 +/* 0F30F8 802CE748 0C0B36B0 */ jal resolve_npc /* 0F30FC 802CE74C 0040282D */ daddu $a1, $v0, $zero /* 0F3100 802CE750 0040882D */ daddu $s1, $v0, $zero /* 0F3104 802CE754 56200003 */ bnel $s1, $zero, .L802CE764 diff --git a/asm/nonmatchings/code_f2470_len_27f0/NpcMoveTo.s b/asm/nonmatchings/code_f2470_len_27f0/NpcMoveTo.s index 6568ec2374..3c3b9db999 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/NpcMoveTo.s +++ b/asm/nonmatchings/code_f2470_len_27f0/NpcMoveTo.s @@ -42,7 +42,7 @@ glabel NpcMoveTo /* 0F2C68 802CE2B8 0240202D */ daddu $a0, $s2, $zero /* 0F2C6C 802CE2BC 0240202D */ daddu $a0, $s2, $zero /* 0F2C70 802CE2C0 0200282D */ daddu $a1, $s0, $zero -/* 0F2C74 802CE2C4 0C0B36B0 */ jal func_802CDAC0 +/* 0F2C74 802CE2C4 0C0B36B0 */ jal resolve_npc /* 0F2C78 802CE2C8 0040882D */ daddu $s1, $v0, $zero /* 0F2C7C 802CE2CC 0040802D */ daddu $s0, $v0, $zero /* 0F2C80 802CE2D0 56000003 */ bnel $s0, $zero, .L802CE2E0 diff --git a/asm/nonmatchings/code_f2470_len_27f0/NpcSetHomePosToCurrent.s b/asm/nonmatchings/code_f2470_len_27f0/NpcSetHomePosToCurrent.s index 815e163a82..f8ed157552 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/NpcSetHomePosToCurrent.s +++ b/asm/nonmatchings/code_f2470_len_27f0/NpcSetHomePosToCurrent.s @@ -11,7 +11,7 @@ glabel NpcSetHomePosToCurrent /* 0F3D80 802CF3D0 0C0B1EAF */ jal get_variable /* 0F3D84 802CF3D4 8C450000 */ lw $a1, ($v0) /* 0F3D88 802CF3D8 0200202D */ daddu $a0, $s0, $zero -/* 0F3D8C 802CF3DC 0C0B36B0 */ jal func_802CDAC0 +/* 0F3D8C 802CF3DC 0C0B36B0 */ jal resolve_npc /* 0F3D90 802CF3E0 0040282D */ daddu $a1, $v0, $zero /* 0F3D94 802CF3E4 0040202D */ daddu $a0, $v0, $zero /* 0F3D98 802CF3E8 1080000F */ beqz $a0, .L802CF428 diff --git a/asm/nonmatchings/code_f2470_len_27f0/PlaySoundAtNpc.s b/asm/nonmatchings/code_f2470_len_27f0/PlaySoundAtNpc.s index 8739b69946..a2e2e23dd7 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/PlaySoundAtNpc.s +++ b/asm/nonmatchings/code_f2470_len_27f0/PlaySoundAtNpc.s @@ -24,7 +24,7 @@ glabel PlaySoundAtNpc /* 0F4BA4 802D01F4 0040802D */ daddu $s0, $v0, $zero /* 0F4BA8 802D01F8 0220202D */ daddu $a0, $s1, $zero /* 0F4BAC 802D01FC 0240282D */ daddu $a1, $s2, $zero -/* 0F4BB0 802D0200 0C0B36B0 */ jal func_802CDAC0 +/* 0F4BB0 802D0200 0C0B36B0 */ jal resolve_npc /* 0F4BB4 802D0204 0040882D */ daddu $s1, $v0, $zero /* 0F4BB8 802D0208 10400007 */ beqz $v0, .L802D0228 /* 0F4BBC 802D020C 0200202D */ daddu $a0, $s0, $zero @@ -58,7 +58,7 @@ glabel PlaySoundAtNpc /* 0F4C24 802D0274 0040802D */ daddu $s0, $v0, $zero /* 0F4C28 802D0278 0220202D */ daddu $a0, $s1, $zero /* 0F4C2C 802D027C 0200282D */ daddu $a1, $s0, $zero -/* 0F4C30 802D0280 0C0B36B0 */ jal func_802CDAC0 +/* 0F4C30 802D0280 0C0B36B0 */ jal resolve_npc /* 0F4C34 802D0284 0040802D */ daddu $s0, $v0, $zero /* 0F4C38 802D0288 A05000AA */ sb $s0, 0xaa($v0) /* 0F4C3C 802D028C 8FBF0018 */ lw $ra, 0x18($sp) diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcAnimation.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcAnimation.s index 740359ce79..d431726f57 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcAnimation.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcAnimation.s @@ -18,7 +18,7 @@ glabel SetNpcAnimation /* 0F2AD4 802CE124 0040802D */ daddu $s0, $v0, $zero /* 0F2AD8 802CE128 0220202D */ daddu $a0, $s1, $zero /* 0F2ADC 802CE12C 0200282D */ daddu $a1, $s0, $zero -/* 0F2AE0 802CE130 0C0B36B0 */ jal func_802CDAC0 +/* 0F2AE0 802CE130 0C0B36B0 */ jal resolve_npc /* 0F2AE4 802CE134 0040802D */ daddu $s0, $v0, $zero /* 0F2AE8 802CE138 10400003 */ beqz $v0, .L802CE148 /* 0F2AEC 802CE13C 0040202D */ daddu $a0, $v0, $zero diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcCollisionSize.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcCollisionSize.s index 0cd8f14c11..e3286cfde6 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcCollisionSize.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcCollisionSize.s @@ -25,7 +25,7 @@ glabel SetNpcCollisionSize /* 0F2988 802CDFD8 0040982D */ daddu $s3, $v0, $zero /* 0F298C 802CDFDC 0220202D */ daddu $a0, $s1, $zero /* 0F2990 802CDFE0 0240282D */ daddu $a1, $s2, $zero -/* 0F2994 802CDFE4 0C0B36B0 */ jal func_802CDAC0 +/* 0F2994 802CDFE4 0C0B36B0 */ jal resolve_npc /* 0F2998 802CDFE8 0040802D */ daddu $s0, $v0, $zero /* 0F299C 802CDFEC 0040182D */ daddu $v1, $v0, $zero /* 0F29A0 802CDFF0 10600003 */ beqz $v1, .L802CE000 diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcEffect.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcEffect.s index a27ed45d84..bb0ea8d8aa 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcEffect.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcEffect.s @@ -25,7 +25,7 @@ glabel SetNpcEffect /* 0F4B14 802D0164 0040982D */ daddu $s3, $v0, $zero /* 0F4B18 802D0168 0220202D */ daddu $a0, $s1, $zero /* 0F4B1C 802D016C 0240282D */ daddu $a1, $s2, $zero -/* 0F4B20 802D0170 0C0B36B0 */ jal func_802CDAC0 +/* 0F4B20 802D0170 0C0B36B0 */ jal resolve_npc /* 0F4B24 802D0174 0040802D */ daddu $s0, $v0, $zero /* 0F4B28 802D0178 10400004 */ beqz $v0, .L802D018C /* 0F4B2C 802D017C 0040202D */ daddu $a0, $v0, $zero diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcFlagBits.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcFlagBits.s index edc991ed15..fdb9f7ce81 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcFlagBits.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcFlagBits.s @@ -20,7 +20,7 @@ glabel SetNpcFlagBits /* 0F3A48 802CF098 0040902D */ daddu $s2, $v0, $zero /* 0F3A4C 802CF09C 0220202D */ daddu $a0, $s1, $zero /* 0F3A50 802CF0A0 0240282D */ daddu $a1, $s2, $zero -/* 0F3A54 802CF0A4 0C0B36B0 */ jal func_802CDAC0 +/* 0F3A54 802CF0A4 0C0B36B0 */ jal resolve_npc /* 0F3A58 802CF0A8 0040882D */ daddu $s1, $v0, $zero /* 0F3A5C 802CF0AC 0040202D */ daddu $a0, $v0, $zero /* 0F3A60 802CF0B0 5080000A */ beql $a0, $zero, .L802CF0DC diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcJumpscale.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcJumpscale.s index 33f8a9db39..6e3fc9f082 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcJumpscale.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcJumpscale.s @@ -19,7 +19,7 @@ glabel SetNpcJumpscale /* 0F2A6C 802CE0BC 0040802D */ daddu $s0, $v0, $zero /* 0F2A70 802CE0C0 0220202D */ daddu $a0, $s1, $zero /* 0F2A74 802CE0C4 0200282D */ daddu $a1, $s0, $zero -/* 0F2A78 802CE0C8 0C0B36B0 */ jal func_802CDAC0 +/* 0F2A78 802CE0C8 0C0B36B0 */ jal resolve_npc /* 0F2A7C 802CE0CC 46000506 */ mov.s $f20, $f0 /* 0F2A80 802CE0D0 54400001 */ bnel $v0, $zero, .L802CE0D8 /* 0F2A84 802CE0D4 E4540014 */ swc1 $f20, 0x14($v0) diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s index b71e6d24cc..4d82215963 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcPos.s @@ -38,7 +38,7 @@ glabel SetNpcPos /* 0F26E0 802CDD30 4482A000 */ mtc1 $v0, $f20 /* 0F26E4 802CDD34 00000000 */ nop /* 0F26E8 802CDD38 4680A520 */ cvt.s.w $f20, $f20 -/* 0F26EC 802CDD3C 0C0B36B0 */ jal func_802CDAC0 +/* 0F26EC 802CDD3C 0C0B36B0 */ jal resolve_npc /* 0F26F0 802CDD40 0240282D */ daddu $a1, $s2, $zero /* 0F26F4 802CDD44 0040282D */ daddu $a1, $v0, $zero /* 0F26F8 802CDD48 10A0000F */ beqz $a1, .L802CDD88 diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcRotation.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcRotation.s index f74fbdaf78..3dc2f46dce 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcRotation.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcRotation.s @@ -32,7 +32,7 @@ glabel SetNpcRotation /* 0F27C8 802CDE18 46000586 */ mov.s $f22, $f0 /* 0F27CC 802CDE1C 0220202D */ daddu $a0, $s1, $zero /* 0F27D0 802CDE20 0240282D */ daddu $a1, $s2, $zero -/* 0F27D4 802CDE24 0C0B36B0 */ jal func_802CDAC0 +/* 0F27D4 802CDE24 0C0B36B0 */ jal resolve_npc /* 0F27D8 802CDE28 46000506 */ mov.s $f20, $f0 /* 0F27DC 802CDE2C 0040182D */ daddu $v1, $v0, $zero /* 0F27E0 802CDE30 10600004 */ beqz $v1, .L802CDE44 @@ -67,7 +67,7 @@ glabel SetNpcRotation /* 0F284C 802CDE9C 0040802D */ daddu $s0, $v0, $zero /* 0F2850 802CDEA0 0220202D */ daddu $a0, $s1, $zero /* 0F2854 802CDEA4 0200282D */ daddu $a1, $s0, $zero -/* 0F2858 802CDEA8 0C0B36B0 */ jal func_802CDAC0 +/* 0F2858 802CDEA8 0C0B36B0 */ jal resolve_npc /* 0F285C 802CDEAC 46000506 */ mov.s $f20, $f0 /* 0F2860 802CDEB0 54400001 */ bnel $v0, $zero, .L802CDEB8 /* 0F2864 802CDEB4 E4540050 */ swc1 $f20, 0x50($v0) diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcScale.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcScale.s index 7286149372..6c7965f07a 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcScale.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcScale.s @@ -32,7 +32,7 @@ glabel SetNpcScale /* 0F28EC 802CDF3C 46000586 */ mov.s $f22, $f0 /* 0F28F0 802CDF40 0220202D */ daddu $a0, $s1, $zero /* 0F28F4 802CDF44 0240282D */ daddu $a1, $s2, $zero -/* 0F28F8 802CDF48 0C0B36B0 */ jal func_802CDAC0 +/* 0F28F8 802CDF48 0C0B36B0 */ jal resolve_npc /* 0F28FC 802CDF4C 46000506 */ mov.s $f20, $f0 /* 0F2900 802CDF50 0040182D */ daddu $v1, $v0, $zero /* 0F2904 802CDF54 10600004 */ beqz $v1, .L802CDF68 diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcSpeed.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcSpeed.s index dc139b1257..3d9bd78dce 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcSpeed.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcSpeed.s @@ -19,7 +19,7 @@ glabel SetNpcSpeed /* 0F2A00 802CE050 0040802D */ daddu $s0, $v0, $zero /* 0F2A04 802CE054 0220202D */ daddu $a0, $s1, $zero /* 0F2A08 802CE058 0200282D */ daddu $a1, $s0, $zero -/* 0F2A0C 802CE05C 0C0B36B0 */ jal func_802CDAC0 +/* 0F2A0C 802CE05C 0C0B36B0 */ jal resolve_npc /* 0F2A10 802CE060 46000506 */ mov.s $f20, $f0 /* 0F2A14 802CE064 54400001 */ bnel $v0, $zero, .L802CE06C /* 0F2A18 802CE068 E4540018 */ swc1 $f20, 0x18($v0) diff --git a/asm/nonmatchings/code_f2470_len_27f0/SetNpcYaw.s b/asm/nonmatchings/code_f2470_len_27f0/SetNpcYaw.s index 92f6e46890..293c1c3504 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/SetNpcYaw.s +++ b/asm/nonmatchings/code_f2470_len_27f0/SetNpcYaw.s @@ -14,7 +14,7 @@ glabel SetNpcYaw /* 0F3454 802CEAA4 0C0B1EAF */ jal get_variable /* 0F3458 802CEAA8 26100004 */ addiu $s0, $s0, 4 /* 0F345C 802CEAAC 0240202D */ daddu $a0, $s2, $zero -/* 0F3460 802CEAB0 0C0B36B0 */ jal func_802CDAC0 +/* 0F3460 802CEAB0 0C0B36B0 */ jal resolve_npc /* 0F3464 802CEAB4 0040282D */ daddu $a1, $v0, $zero /* 0F3468 802CEAB8 0040882D */ daddu $s1, $v0, $zero /* 0F346C 802CEABC 1220000B */ beqz $s1, .L802CEAEC diff --git a/asm/nonmatchings/code_f2470_len_27f0/_npc_jump_to.s b/asm/nonmatchings/code_f2470_len_27f0/_npc_jump_to.s index 049a30b871..32a348b6a1 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/_npc_jump_to.s +++ b/asm/nonmatchings/code_f2470_len_27f0/_npc_jump_to.s @@ -54,7 +54,7 @@ glabel _npc_jump_to /* 0F2EA0 802CE4F0 0240202D */ daddu $a0, $s2, $zero /* 0F2EA4 802CE4F4 0240202D */ daddu $a0, $s2, $zero /* 0F2EA8 802CE4F8 0200282D */ daddu $a1, $s0, $zero -/* 0F2EAC 802CE4FC 0C0B36B0 */ jal func_802CDAC0 +/* 0F2EAC 802CE4FC 0C0B36B0 */ jal resolve_npc /* 0F2EB0 802CE500 0040882D */ daddu $s1, $v0, $zero /* 0F2EB4 802CE504 0040802D */ daddu $s0, $v0, $zero /* 0F2EB8 802CE508 56000003 */ bnel $s0, $zero, .L802CE518 diff --git a/asm/nonmatchings/code_f2470_len_27f0/func_802CDAC0.s b/asm/nonmatchings/code_f2470_len_27f0/resolve_npc.s similarity index 98% rename from asm/nonmatchings/code_f2470_len_27f0/func_802CDAC0.s rename to asm/nonmatchings/code_f2470_len_27f0/resolve_npc.s index 487d3087ba..1cb94127e4 100644 --- a/asm/nonmatchings/code_f2470_len_27f0/func_802CDAC0.s +++ b/asm/nonmatchings/code_f2470_len_27f0/resolve_npc.s @@ -2,7 +2,7 @@ .set noreorder # don't insert nops after branches -glabel func_802CDAC0 +glabel resolve_npc /* 0F2470 802CDAC0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0F2474 802CDAC4 0080182D */ daddu $v1, $a0, $zero /* 0F2478 802CDAC8 00A0202D */ daddu $a0, $a1, $zero diff --git a/asm/nonmatchings/code_f4c60_len_4300/_show_message.s b/asm/nonmatchings/code_f4c60_len_4300/_show_message.s index f6335d8623..75ec49807a 100644 --- a/asm/nonmatchings/code_f4c60_len_4300/_show_message.s +++ b/asm/nonmatchings/code_f4c60_len_4300/_show_message.s @@ -119,7 +119,7 @@ glabel _show_message /* 0F4E68 802D04B8 0040802D */ daddu $s0, $v0, $zero /* 0F4E6C 802D04BC 0240202D */ daddu $a0, $s2, $zero /* 0F4E70 802D04C0 0200282D */ daddu $a1, $s0, $zero -/* 0F4E74 802D04C4 0C0B36B0 */ jal func_802CDAC0 +/* 0F4E74 802D04C4 0C0B36B0 */ jal resolve_npc /* 0F4E78 802D04C8 0040802D */ daddu $s0, $v0, $zero /* 0F4E7C 802D04CC 0040A82D */ daddu $s5, $v0, $zero /* 0F4E80 802D04D0 0200202D */ daddu $a0, $s0, $zero @@ -157,7 +157,7 @@ glabel _show_message /* 0F4EF8 802D0548 2410FFFE */ addiu $s0, $zero, -2 .L802D054C: -/* 0F4EFC 802D054C 0C0B36B0 */ jal func_802CDAC0 +/* 0F4EFC 802D054C 0C0B36B0 */ jal resolve_npc /* 0F4F00 802D0550 03C0282D */ daddu $a1, $fp, $zero /* 0F4F04 802D0554 0040802D */ daddu $s0, $v0, $zero /* 0F4F08 802D0558 3C048007 */ lui $a0, 0x8007 diff --git a/asm/nonmatchings/code_f8f60_len_1560/GetAngleBetweenNPCs.s b/asm/nonmatchings/code_f8f60_len_1560/GetAngleBetweenNPCs.s index 7c53799337..29f7b7a346 100644 --- a/asm/nonmatchings/code_f8f60_len_1560/GetAngleBetweenNPCs.s +++ b/asm/nonmatchings/code_f8f60_len_1560/GetAngleBetweenNPCs.s @@ -22,11 +22,11 @@ glabel GetAngleBetweenNPCs /* 0F90F8 802D4748 0240202D */ daddu $a0, $s2, $zero /* 0F90FC 802D474C 0220282D */ daddu $a1, $s1, $zero /* 0F9100 802D4750 8E130000 */ lw $s3, ($s0) -/* 0F9104 802D4754 0C0B36B0 */ jal func_802CDAC0 +/* 0F9104 802D4754 0C0B36B0 */ jal resolve_npc /* 0F9108 802D4758 0040882D */ daddu $s1, $v0, $zero /* 0F910C 802D475C 0240202D */ daddu $a0, $s2, $zero /* 0F9110 802D4760 0220282D */ daddu $a1, $s1, $zero -/* 0F9114 802D4764 0C0B36B0 */ jal func_802CDAC0 +/* 0F9114 802D4764 0C0B36B0 */ jal resolve_npc /* 0F9118 802D4768 0040802D */ daddu $s0, $v0, $zero /* 0F911C 802D476C 8C460038 */ lw $a2, 0x38($v0) /* 0F9120 802D4770 C60C0038 */ lwc1 $f12, 0x38($s0) diff --git a/asm/nonmatchings/code_f8f60_len_1560/GetAngleToNPC.s b/asm/nonmatchings/code_f8f60_len_1560/GetAngleToNPC.s index 62a42c7105..00fb00e28b 100644 --- a/asm/nonmatchings/code_f8f60_len_1560/GetAngleToNPC.s +++ b/asm/nonmatchings/code_f8f60_len_1560/GetAngleToNPC.s @@ -14,7 +14,7 @@ glabel GetAngleToNPC /* 0F9184 802D47D4 26100004 */ addiu $s0, $s0, 4 /* 0F9188 802D47D8 0220202D */ daddu $a0, $s1, $zero /* 0F918C 802D47DC 8E100000 */ lw $s0, ($s0) -/* 0F9190 802D47E0 0C0B36B0 */ jal func_802CDAC0 +/* 0F9190 802D47E0 0C0B36B0 */ jal resolve_npc /* 0F9194 802D47E4 0040282D */ daddu $a1, $v0, $zero /* 0F9198 802D47E8 3C038011 */ lui $v1, 0x8011 /* 0F919C 802D47EC 2463EFC8 */ addiu $v1, $v1, -0x1038 diff --git a/asm/nonmatchings/code_f8f60_len_1560/GetAngleToPlayer.s b/asm/nonmatchings/code_f8f60_len_1560/GetAngleToPlayer.s index 61d3f3dcc1..1816ebfc07 100644 --- a/asm/nonmatchings/code_f8f60_len_1560/GetAngleToPlayer.s +++ b/asm/nonmatchings/code_f8f60_len_1560/GetAngleToPlayer.s @@ -14,7 +14,7 @@ glabel GetAngleToPlayer /* 0F9200 802D4850 26100004 */ addiu $s0, $s0, 4 /* 0F9204 802D4854 0220202D */ daddu $a0, $s1, $zero /* 0F9208 802D4858 8E100000 */ lw $s0, ($s0) -/* 0F920C 802D485C 0C0B36B0 */ jal func_802CDAC0 +/* 0F920C 802D485C 0C0B36B0 */ jal resolve_npc /* 0F9210 802D4860 0040282D */ daddu $a1, $v0, $zero /* 0F9214 802D4864 3C038011 */ lui $v1, 0x8011 /* 0F9218 802D4868 2463EFC8 */ addiu $v1, $v1, -0x1038 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s b/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s index 31e5833d24..e76be941da 100644 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s +++ b/asm/nonmatchings/code_fa4c0_len_3bf0/RemoveEffect.s @@ -307,7 +307,7 @@ glabel func_802D7E08 .L802D7F48: /* 0FC8F8 802D7F48 0220202D */ daddu $a0, $s1, $zero -/* 0FC8FC 802D7F4C 0C0B36B0 */ jal func_802CDAC0 +/* 0FC8FC 802D7F4C 0C0B36B0 */ jal resolve_npc /* 0FC900 802D7F50 0260282D */ daddu $a1, $s3, $zero /* 0FC904 802D7F54 0040282D */ daddu $a1, $v0, $zero /* 0FC908 802D7F58 10A00025 */ beqz $a1, .L802D7FF0 diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowEmote.s b/asm/nonmatchings/code_fa4c0_len_3bf0/ShowEmote.s index 446912c092..c36d81d5da 100644 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowEmote.s +++ b/asm/nonmatchings/code_fa4c0_len_3bf0/ShowEmote.s @@ -92,7 +92,7 @@ glabel ShowEmote .L802D79F0: /* 0FC3A0 802D79F0 0220202D */ daddu $a0, $s1, $zero -/* 0FC3A4 802D79F4 0C0B36B0 */ jal func_802CDAC0 +/* 0FC3A4 802D79F4 0C0B36B0 */ jal resolve_npc /* 0FC3A8 802D79F8 0260282D */ daddu $a1, $s3, $zero /* 0FC3AC 802D79FC 0040382D */ daddu $a3, $v0, $zero /* 0FC3B0 802D7A00 10E0002A */ beqz $a3, .L802D7AAC diff --git a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowSleepBubble.s b/asm/nonmatchings/code_fa4c0_len_3bf0/ShowSleepBubble.s index 09b6bbf347..0e1e0d0dea 100644 --- a/asm/nonmatchings/code_fa4c0_len_3bf0/ShowSleepBubble.s +++ b/asm/nonmatchings/code_fa4c0_len_3bf0/ShowSleepBubble.s @@ -84,7 +84,7 @@ glabel ShowSleepBubble .L802D8158: /* 0FCB08 802D8158 0220202D */ daddu $a0, $s1, $zero -/* 0FCB0C 802D815C 0C0B36B0 */ jal func_802CDAC0 +/* 0FCB0C 802D815C 0C0B36B0 */ jal resolve_npc /* 0FCB10 802D8160 0260282D */ daddu $a1, $s3, $zero /* 0FCB14 802D8164 0040282D */ daddu $a1, $v0, $zero /* 0FCB18 802D8168 10A0002A */ beqz $a1, .L802D8214 diff --git a/include/common_structs.h b/include/common_structs.h index 0892675e8e..686c170b72 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -35,6 +35,49 @@ typedef struct heap_node { /* 0x0C */ s32 capacity; } heap_node; // size = 0x10 +typedef struct npc_blur_data { + /* 0x00 */ char unk_00[4]; + /* 0x04 */ f32 xpos[20]; + /* 0x54 */ f32 ypos[20]; + /* 0xA4 */ f32 zpos[20]; +} npc_blur_data; // size = 0xF4 + +typedef struct npc { + /* 0x000 */ s32 flags; + /* 0x004 */ UNK_PTR onUpdate; /* run before anything else for this npc in the npc update step */ + /* 0x008 */ UNK_PTR onRender; /* run after the display list for this npc is built */ + /* 0x00C */ f32 yaw; + /* 0x010 */ f32 planarFlyDist; /* also used for speech, temp0? */ + /* 0x014 */ f32 jumpScale; /* also used for speech, temp1? */ + /* 0x018 */ f32 moveSpeed; + /* 0x01C */ f32 jumpVelocity; + /* 0x020 */ struct npc_blur_data* blurData; /* related to movement somehow... */ + /* 0x024 */ char unk_24[4]; + /* 0x028 */ u32 currentAnim; + /* 0x02C */ char unk_2C[12]; + /* 0x038 */ f32 pos[3]; + /* 0x044 */ f32 rotation[3]; + /* 0x050 */ char unk_50[4]; + /* 0x054 */ f32 scale[3]; + /* 0x060 */ f32 moveToPos[3]; + /* 0x06C */ f32 colliderPos[3]; /* used during collision with player */ + /* 0x078 */ s32 shadowIndex; + /* 0x07C */ f32 shadowScale; + /* 0x080 */ char unk_80[8]; + /* 0x088 */ s16 isFacingAway; + /* 0x08A */ s16 yawCamOffset; + /* 0x08C */ char unk_8C[2]; + /* 0x08E */ s16 duration; /* formerly interp_counter */ + /* 0x090 */ s16 homePos[3]; + /* 0x096 */ char unk_96[14]; + /* 0x0A4 */ u8 npcID; + /* 0x0A5 */ char unk_A5; + /* 0x0A6 */ s16 collisionRadius; + /* 0x0A8 */ s16 collisionHeight; + /* 0x0AA */ u8 renderMode; + /* 0x0AB */ char unk_AB[661]; +} npc; // size = 0x340 + typedef struct player_data { /* 0x000 */ u8 bootsLevel; /* 0x001 */ s8 hammerLevel; @@ -664,13 +707,6 @@ typedef struct other_print { /* 0x44 */ char unk_44[16]; } other_print; // size = 0x54 -typedef struct npc_blur_data { - /* 0x00 */ char unk_00[4]; - /* 0x04 */ f32 xpos[20]; - /* 0x54 */ f32 ypos[20]; - /* 0xA4 */ f32 zpos[20]; -} npc_blur_data; // size = 0xF4 - typedef struct collider_aabb { /* 0x00 */ f32 min[3]; /* 0x0C */ f32 max[3]; diff --git a/include/enums.h b/include/enums.h index 1809b1bd01..519092dd23 100644 --- a/include/enums.h +++ b/include/enums.h @@ -1343,7 +1343,7 @@ typedef UNK_TYPE ACTION_STATE; #define ACTION_STATE_STEP_UP 0x00000022 #define ACTION_STATE_USE_SPRING 0x00000026 -typedef UNK_TYPE NPC; +typedef s32 NPC; #define NPC_SELF 0xFFFFFFFF #define NPC_PLAYER 0xFFFFFFFE #define NPC_PARTNER 0xFFFFFFFC diff --git a/src/code_13870_len_6980.c b/src/code_13870_len_6980.c index 4f118e548b..501c48ca79 100644 --- a/src/code_13870_len_6980.c +++ b/src/code_13870_len_6980.c @@ -42,9 +42,9 @@ INCLUDE_ASM(code_13870_len_6980, render_npcs); INCLUDE_ASM(code_13870_len_6980, npc_move_heading); -INCLUDE_ASM(code_13870_len_6980, get_npc_unsafe); +npc* INCLUDE_ASM(code_13870_len_6980, get_npc_unsafe, NPC npcID); -INCLUDE_ASM(code_13870_len_6980, get_npc_safe); +npc* INCLUDE_ASM(code_13870_len_6980, get_npc_safe, NPC npcID); INCLUDE_ASM(code_13870_len_6980, enable_npc_shadow); diff --git a/src/code_f2470_len_27f0.c b/src/code_f2470_len_27f0.c index 50d684a384..f350200329 100644 --- a/src/code_f2470_len_27f0.c +++ b/src/code_f2470_len_27f0.c @@ -1,6 +1,14 @@ #include "common.h" -INCLUDE_ASM(code_f2470_len_27f0, func_802CDAC0); +npc* resolve_npc(script_context* script, NPC npcID) { + if (npcID == NPC_SELF) { + return get_npc_safe(script->ownerID); + } else if (npcID >= -270000000) { + return get_npc_safe(npcID); + } else { + return npcID; + } +} INCLUDE_ASM(code_f2470_len_27f0, set_npc_animation); diff --git a/tools/n64split.yaml b/tools/n64split.yaml index 379f930a68..616d64a8a4 100644 --- a/tools/n64split.yaml +++ b/tools/n64split.yaml @@ -2833,7 +2833,7 @@ labels: - [0x802C3EE4, "func_802C3EE4"] - [0x802CD4B4, "func_802CD4B4"] - [0x802CD57C, "func_802CD57C"] - - [0x802CDAC0, "func_802CDAC0"] + - [0x802CDAC0, "resolve_npc"] - [0x802D4488, "func_802D4488"] - [0x802D4560, "func_802D4560"] - [0x802DD8F8, "func_802DD8F8"] diff --git a/tools/starrod_structs_to_h.py b/tools/starrod_structs_to_h.py index 48902e47cc..b205396040 100755 --- a/tools/starrod_structs_to_h.py +++ b/tools/starrod_structs_to_h.py @@ -18,6 +18,7 @@ STRUCT_FILES = ( glob(path.join(SR_DATABASE, f"structs/**/matrix4s.struct")) + glob(path.join(SR_DATABASE, f"structs/**/cam_pos_settings.struct")) + glob(path.join(SR_DATABASE, f"structs/**/partner_data.struct")) + + glob(path.join(SR_DATABASE, f"structs/**/npc_blur_data.struct")) + # other structs glob(path.join(SR_DATABASE, f"structs/**/*.struct"))