From ee3c05977928c596e11700f9c57c8f04bfce241f Mon Sep 17 00:00:00 2001 From: JoshDuMan Date: Mon, 2 Nov 2020 02:07:02 -0500 Subject: [PATCH] Work on world functions. --- .../isk_04/97B670/func_80240040_97B670.s | 35 ----------------- .../isk_04/97B670/func_80240354_97B984.s | 38 ------------------- .../isk_04/97B670/func_802403D4_97BA04.s | 4 +- .../isk_04/97B670/func_80240814_97BE44.s | 22 ----------- .../isk_04/97B670/func_802408B4_97BEE4.s | 37 ------------------ .../isk_08/984E30/func_80240000_984E30.s | 35 ----------------- .../isk_08/984E30/func_80240314_985144.s | 38 ------------------- .../isk_08/984E30/func_80240394_9851C4.s | 4 +- .../isk_08/984E30/func_802407D4_985604.s | 22 ----------- .../isk_08/984E30/func_80240874_9856A4.s | 37 ------------------ .../isk_18/997F70/func_80240000_997F70.s | 35 ----------------- .../isk_18/997F70/func_80240314_998284.s | 38 ------------------- .../isk_18/997F70/func_80240394_998304.s | 4 +- .../isk_18/997F70/func_802407D4_998744.s | 22 ----------- .../isk_18/997F70/func_80240874_9987E4.s | 37 ------------------ .../kpa_01/A470C0/func_80240160_A470C0.s | 35 ----------------- .../kpa_01/A470C0/func_80240474_A473D4.s | 38 ------------------- .../kpa_01/A470C0/func_802404F4_A47454.s | 4 +- .../kpa_01/A470C0/func_80240934_A47894.s | 22 ----------- .../kpa_01/A470C0/func_802409D4_A47934.s | 37 ------------------ .../kpa_03/A48720/func_80240160_A48720.s | 35 ----------------- .../kpa_03/A48720/func_80240474_A48A34.s | 38 ------------------- .../kpa_03/A48720/func_802404F4_A48AB4.s | 4 +- .../kpa_03/A48720/func_80240934_A48EF4.s | 22 ----------- .../kpa_03/A48720/func_802409D4_A48F94.s | 35 ----------------- .../kpa_113/A9CC70/func_802401B0_A9CDE0.s | 35 ----------------- .../kpa_113/A9CC70/func_802404C4_A9D0F4.s | 38 ------------------- .../kpa_113/A9CC70/func_80240544_A9D174.s | 4 +- .../kpa_113/A9CC70/func_80240984_A9D5B4.s | 22 ----------- .../kpa_113/A9CC70/func_80240A24_A9D654.s | 37 ------------------ .../kzn_03/C61020/func_80240310_C61020.s | 35 ----------------- .../kzn_03/C61020/func_80240624_C61334.s | 38 ------------------- .../kzn_03/C61020/func_802406A4_C613B4.s | 4 +- .../kzn_03/C61020/func_80240AE4_C617F4.s | 22 ----------- .../kzn_03/C61020/func_80240B84_C61894.s | 35 ----------------- .../kzn_09/C77D00/func_802429C4_C796A4.s | 35 ----------------- .../kzn_09/C77D00/func_80242CD8_C799B8.s | 38 ------------------- .../kzn_09/C77D00/func_80242D58_C79A38.s | 4 +- .../kzn_09/C77D00/func_80243198_C79E78.s | 22 ----------- .../kzn_09/C77D00/func_80243238_C79F18.s | 35 ----------------- .../kzn_17/C85DC0/func_80241CB4_C87764.s | 35 ----------------- .../kzn_17/C85DC0/func_80241FC8_C87A78.s | 38 ------------------- .../kzn_17/C85DC0/func_80242048_C87AF8.s | 4 +- .../kzn_17/C85DC0/func_80242488_C87F38.s | 22 ----------- .../kzn_17/C85DC0/func_80242528_C87FD8.s | 35 ----------------- .../tik_12/88A530/func_80241960_88A530.s | 35 ----------------- .../tik_12/88A530/func_80241C74_88A844.s | 38 ------------------- .../tik_12/88A530/func_80241CF4_88A8C4.s | 4 +- .../tik_12/88A530/func_80242134_88AD04.s | 22 ----------- .../tik_12/88A530/func_802421D4_88ADA4.s | 37 ------------------ include/common_structs.h | 3 +- include/map.h | 2 +- src/world/area_isk/isk_04/97B670.c | 8 +--- src/world/area_isk/isk_08/984E30.c | 8 +--- src/world/area_isk/isk_18/997F70.c | 8 +--- src/world/area_kpa/kpa_01/A470C0.c | 8 +--- src/world/area_kpa/kpa_03/A48720.c | 8 +--- src/world/area_kpa/kpa_113/A9CC70.c | 8 +--- src/world/area_kzn/kzn_03/C61020.c | 8 +--- src/world/area_kzn/kzn_09/C77D00.c | 8 +--- src/world/area_kzn/kzn_17/C85DC0.c | 8 +--- src/world/area_tik/tik_12/88A530.c | 8 +--- src/world/common/AwaitPlayerNearNpc.inc.c | 27 +++++++++++++ src/world/common/SetNpcAnim.inc.c | 11 ++++++ src/world/common/SetNpcColHeight.inc.c | 17 +++++++++ 65 files changed, 97 insertions(+), 1395 deletions(-) delete mode 100644 asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240040_97B670.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240354_97B984.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240814_97BE44.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_04/97B670/func_802408B4_97BEE4.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240000_984E30.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240314_985144.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_08/984E30/func_802407D4_985604.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240874_9856A4.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240000_997F70.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240314_998284.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_18/997F70/func_802407D4_998744.s delete mode 100644 asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240874_9987E4.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240160_A470C0.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240474_A473D4.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240934_A47894.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802409D4_A47934.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240160_A48720.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240474_A48A34.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240934_A48EF4.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802409D4_A48F94.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802401B0_A9CDE0.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802404C4_A9D0F4.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240984_A9D5B4.s delete mode 100644 asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240A24_A9D654.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240310_C61020.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240624_C61334.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240AE4_C617F4.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240B84_C61894.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_802429C4_C796A4.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242CD8_C799B8.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243198_C79E78.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243238_C79F18.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241CB4_C87764.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241FC8_C87A78.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242488_C87F38.s delete mode 100644 asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242528_C87FD8.s delete mode 100644 asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241960_88A530.s delete mode 100644 asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241C74_88A844.s delete mode 100644 asm/nonmatchings/world/area_tik/tik_12/88A530/func_80242134_88AD04.s delete mode 100644 asm/nonmatchings/world/area_tik/tik_12/88A530/func_802421D4_88ADA4.s create mode 100644 src/world/common/SetNpcAnim.inc.c create mode 100644 src/world/common/SetNpcColHeight.inc.c diff --git a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240040_97B670.s b/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240040_97B670.s deleted file mode 100644 index b86738b5b0..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240040_97B670.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240040_97B670 -/* 97B670 80240040 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 97B674 80240044 AFB20018 */ sw $s2, 0x18($sp) -/* 97B678 80240048 0080902D */ daddu $s2, $a0, $zero -/* 97B67C 8024004C AFBF001C */ sw $ra, 0x1c($sp) -/* 97B680 80240050 AFB10014 */ sw $s1, 0x14($sp) -/* 97B684 80240054 AFB00010 */ sw $s0, 0x10($sp) -/* 97B688 80240058 8E510148 */ lw $s1, 0x148($s2) -/* 97B68C 8024005C 0C00EABB */ jal get_npc_unsafe -/* 97B690 80240060 86240008 */ lh $a0, 8($s1) -/* 97B694 80240064 0040802D */ daddu $s0, $v0, $zero -/* 97B698 80240068 8E2300CC */ lw $v1, 0xcc($s1) -/* 97B69C 8024006C C60C0038 */ lwc1 $f12, 0x38($s0) -/* 97B6A0 80240070 8C630020 */ lw $v1, 0x20($v1) -/* 97B6A4 80240074 AE030028 */ sw $v1, 0x28($s0) -/* 97B6A8 80240078 96220076 */ lhu $v0, 0x76($s1) -/* 97B6AC 8024007C A602008E */ sh $v0, 0x8e($s0) -/* 97B6B0 80240080 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* 97B6B4 80240084 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* 97B6B8 80240088 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 97B6BC 8024008C 8C460028 */ lw $a2, 0x28($v0) -/* 97B6C0 80240090 0C00A720 */ jal atan2 -/* 97B6C4 80240094 8C470030 */ lw $a3, 0x30($v0) -/* 97B6C8 80240098 2402000D */ addiu $v0, $zero, 0xd -/* 97B6CC 8024009C E600000C */ swc1 $f0, 0xc($s0) -/* 97B6D0 802400A0 AE420070 */ sw $v0, 0x70($s2) -/* 97B6D4 802400A4 8FBF001C */ lw $ra, 0x1c($sp) -/* 97B6D8 802400A8 8FB20018 */ lw $s2, 0x18($sp) -/* 97B6DC 802400AC 8FB10014 */ lw $s1, 0x14($sp) -/* 97B6E0 802400B0 8FB00010 */ lw $s0, 0x10($sp) -/* 97B6E4 802400B4 03E00008 */ jr $ra -/* 97B6E8 802400B8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240354_97B984.s b/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240354_97B984.s deleted file mode 100644 index beb0524a2d..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240354_97B984.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240354_97B984 -/* 97B984 80240354 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 97B988 80240358 AFB10014 */ sw $s1, 0x14($sp) -/* 97B98C 8024035C 0080882D */ daddu $s1, $a0, $zero -/* 97B990 80240360 AFBF0018 */ sw $ra, 0x18($sp) -/* 97B994 80240364 AFB00010 */ sw $s0, 0x10($sp) -/* 97B998 80240368 8E300148 */ lw $s0, 0x148($s1) -/* 97B99C 8024036C 0C00EABB */ jal get_npc_unsafe -/* 97B9A0 80240370 86040008 */ lh $a0, 8($s0) -/* 97B9A4 80240374 0040202D */ daddu $a0, $v0, $zero -/* 97B9A8 80240378 9482008E */ lhu $v0, 0x8e($a0) -/* 97B9AC 8024037C 24030003 */ addiu $v1, $zero, 3 -/* 97B9B0 80240380 24420001 */ addiu $v0, $v0, 1 -/* 97B9B4 80240384 A482008E */ sh $v0, 0x8e($a0) -/* 97B9B8 80240388 00021400 */ sll $v0, $v0, 0x10 -/* 97B9BC 8024038C 00021403 */ sra $v0, $v0, 0x10 -/* 97B9C0 80240390 14430003 */ bne $v0, $v1, .L802403A0 -/* 97B9C4 80240394 00000000 */ nop -/* 97B9C8 80240398 96020086 */ lhu $v0, 0x86($s0) -/* 97B9CC 8024039C A48200A8 */ sh $v0, 0xa8($a0) -.L802403A0: -/* 97B9D0 802403A0 8482008E */ lh $v0, 0x8e($a0) -/* 97B9D4 802403A4 8E030080 */ lw $v1, 0x80($s0) -/* 97B9D8 802403A8 0043102A */ slt $v0, $v0, $v1 -/* 97B9DC 802403AC 14400004 */ bnez $v0, .L802403C0 -/* 97B9E0 802403B0 00000000 */ nop -/* 97B9E4 802403B4 96020086 */ lhu $v0, 0x86($s0) -/* 97B9E8 802403B8 A48200A8 */ sh $v0, 0xa8($a0) -/* 97B9EC 802403BC AE200070 */ sw $zero, 0x70($s1) -.L802403C0: -/* 97B9F0 802403C0 8FBF0018 */ lw $ra, 0x18($sp) -/* 97B9F4 802403C4 8FB10014 */ lw $s1, 0x14($sp) -/* 97B9F8 802403C8 8FB00010 */ lw $s0, 0x10($sp) -/* 97B9FC 802403CC 03E00008 */ jr $ra -/* 97BA00 802403D0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802403D4_97BA04.s b/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802403D4_97BA04.s index 7f4532a629..2e06889776 100644 --- a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802403D4_97BA04.s +++ b/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802403D4_97BA04.s @@ -232,7 +232,7 @@ glabel func_802403D4_97BA04 .L80240724: /* 97BD54 80240724 0260202D */ daddu $a0, $s3, $zero /* 97BD58 80240728 0280282D */ daddu $a1, $s4, $zero -/* 97BD5C 8024072C 0C090010 */ jal func_80240040_97B670 +/* 97BD5C 8024072C 0C090010 */ jal SetNpcAnim /* 97BD60 80240730 02A0302D */ daddu $a2, $s5, $zero /* 97BD64 80240734 0260202D */ daddu $a0, $s3, $zero .L80240738: @@ -250,7 +250,7 @@ glabel func_802403D4_97BA04 /* 97BD90 80240760 00000000 */ nop .L80240764: /* 97BD94 80240764 0280282D */ daddu $a1, $s4, $zero -/* 97BD98 80240768 0C0900D5 */ jal func_80240354_97B984 +/* 97BD98 80240768 0C0900D5 */ jal SetNpcColHeight /* 97BD9C 8024076C 02A0302D */ daddu $a2, $s5, $zero /* 97BDA0 80240770 080901E0 */ j .L80240780 /* 97BDA4 80240774 00000000 */ nop diff --git a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240814_97BE44.s b/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240814_97BE44.s deleted file mode 100644 index 5f469060ef..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_80240814_97BE44.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240814_97BE44 -/* 97BE44 80240814 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 97BE48 80240818 AFBF0010 */ sw $ra, 0x10($sp) -/* 97BE4C 8024081C 0C00EAD2 */ jal get_npc_safe -/* 97BE50 80240820 8C84014C */ lw $a0, 0x14c($a0) -/* 97BE54 80240824 0040182D */ daddu $v1, $v0, $zero -/* 97BE58 80240828 846200A8 */ lh $v0, 0xa8($v1) -/* 97BE5C 8024082C C462003C */ lwc1 $f2, 0x3c($v1) -/* 97BE60 80240830 906400A9 */ lbu $a0, 0xa9($v1) -/* 97BE64 80240834 44820000 */ mtc1 $v0, $f0 -/* 97BE68 80240838 00000000 */ nop -/* 97BE6C 8024083C 46800020 */ cvt.s.w $f0, $f0 -/* 97BE70 80240840 46001081 */ sub.s $f2, $f2, $f0 -/* 97BE74 80240844 A06400AB */ sb $a0, 0xab($v1) -/* 97BE78 80240848 E462003C */ swc1 $f2, 0x3c($v1) -/* 97BE7C 8024084C 8FBF0010 */ lw $ra, 0x10($sp) -/* 97BE80 80240850 24020002 */ addiu $v0, $zero, 2 -/* 97BE84 80240854 03E00008 */ jr $ra -/* 97BE88 80240858 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802408B4_97BEE4.s b/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802408B4_97BEE4.s deleted file mode 100644 index 08239ce470..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_04/97B670/func_802408B4_97BEE4.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802408B4_97BEE4 -/* 97BEE4 802408B4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 97BEE8 802408B8 0080102D */ daddu $v0, $a0, $zero -/* 97BEEC 802408BC AFB00010 */ sw $s0, 0x10($sp) -/* 97BEF0 802408C0 AFBF0018 */ sw $ra, 0x18($sp) -/* 97BEF4 802408C4 AFB10014 */ sw $s1, 0x14($sp) -/* 97BEF8 802408C8 8C44014C */ lw $a0, 0x14c($v0) -/* 97BEFC 802408CC 8C510148 */ lw $s1, 0x148($v0) -/* 97BF00 802408D0 0C00EAD2 */ jal get_npc_safe -/* 97BF04 802408D4 00A0802D */ daddu $s0, $a1, $zero -/* 97BF08 802408D8 56000001 */ bnel $s0, $zero, .L802408E0 -/* 97BF0C 802408DC A04000AB */ sb $zero, 0xab($v0) -.L802408E0: -/* 97BF10 802408E0 8C420000 */ lw $v0, ($v0) -/* 97BF14 802408E4 30421000 */ andi $v0, $v0, 0x1000 -/* 97BF18 802408E8 1040000A */ beqz $v0, .L80240914 -/* 97BF1C 802408EC 0000102D */ daddu $v0, $zero, $zero -/* 97BF20 802408F0 82220004 */ lb $v0, 4($s1) -/* 97BF24 802408F4 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* 97BF28 802408F8 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* 97BF2C 802408FC 00021080 */ sll $v0, $v0, 2 -/* 97BF30 80240900 00431021 */ addu $v0, $v0, $v1 -/* 97BF34 80240904 8C440028 */ lw $a0, 0x28($v0) -/* 97BF38 80240908 9623006E */ lhu $v1, 0x6e($s1) -/* 97BF3C 8024090C 24020002 */ addiu $v0, $zero, 2 -/* 97BF40 80240910 A4830044 */ sh $v1, 0x44($a0) -.L80240914: -/* 97BF44 80240914 8FBF0018 */ lw $ra, 0x18($sp) -/* 97BF48 80240918 8FB10014 */ lw $s1, 0x14($sp) -/* 97BF4C 8024091C 8FB00010 */ lw $s0, 0x10($sp) -/* 97BF50 80240920 03E00008 */ jr $ra -/* 97BF54 80240924 27BD0020 */ addiu $sp, $sp, 0x20 -/* 97BF58 80240928 00000000 */ nop -/* 97BF5C 8024092C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240000_984E30.s b/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240000_984E30.s deleted file mode 100644 index f526911881..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240000_984E30.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_984E30 -/* 984E30 80240000 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 984E34 80240004 AFB20018 */ sw $s2, 0x18($sp) -/* 984E38 80240008 0080902D */ daddu $s2, $a0, $zero -/* 984E3C 8024000C AFBF001C */ sw $ra, 0x1c($sp) -/* 984E40 80240010 AFB10014 */ sw $s1, 0x14($sp) -/* 984E44 80240014 AFB00010 */ sw $s0, 0x10($sp) -/* 984E48 80240018 8E510148 */ lw $s1, 0x148($s2) -/* 984E4C 8024001C 0C00EABB */ jal get_npc_unsafe -/* 984E50 80240020 86240008 */ lh $a0, 8($s1) -/* 984E54 80240024 0040802D */ daddu $s0, $v0, $zero -/* 984E58 80240028 8E2300CC */ lw $v1, 0xcc($s1) -/* 984E5C 8024002C C60C0038 */ lwc1 $f12, 0x38($s0) -/* 984E60 80240030 8C630020 */ lw $v1, 0x20($v1) -/* 984E64 80240034 AE030028 */ sw $v1, 0x28($s0) -/* 984E68 80240038 96220076 */ lhu $v0, 0x76($s1) -/* 984E6C 8024003C A602008E */ sh $v0, 0x8e($s0) -/* 984E70 80240040 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* 984E74 80240044 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* 984E78 80240048 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 984E7C 8024004C 8C460028 */ lw $a2, 0x28($v0) -/* 984E80 80240050 0C00A720 */ jal atan2 -/* 984E84 80240054 8C470030 */ lw $a3, 0x30($v0) -/* 984E88 80240058 2402000D */ addiu $v0, $zero, 0xd -/* 984E8C 8024005C E600000C */ swc1 $f0, 0xc($s0) -/* 984E90 80240060 AE420070 */ sw $v0, 0x70($s2) -/* 984E94 80240064 8FBF001C */ lw $ra, 0x1c($sp) -/* 984E98 80240068 8FB20018 */ lw $s2, 0x18($sp) -/* 984E9C 8024006C 8FB10014 */ lw $s1, 0x14($sp) -/* 984EA0 80240070 8FB00010 */ lw $s0, 0x10($sp) -/* 984EA4 80240074 03E00008 */ jr $ra -/* 984EA8 80240078 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240314_985144.s b/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240314_985144.s deleted file mode 100644 index dc32c6c79b..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240314_985144.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240314_985144 -/* 985144 80240314 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 985148 80240318 AFB10014 */ sw $s1, 0x14($sp) -/* 98514C 8024031C 0080882D */ daddu $s1, $a0, $zero -/* 985150 80240320 AFBF0018 */ sw $ra, 0x18($sp) -/* 985154 80240324 AFB00010 */ sw $s0, 0x10($sp) -/* 985158 80240328 8E300148 */ lw $s0, 0x148($s1) -/* 98515C 8024032C 0C00EABB */ jal get_npc_unsafe -/* 985160 80240330 86040008 */ lh $a0, 8($s0) -/* 985164 80240334 0040202D */ daddu $a0, $v0, $zero -/* 985168 80240338 9482008E */ lhu $v0, 0x8e($a0) -/* 98516C 8024033C 24030003 */ addiu $v1, $zero, 3 -/* 985170 80240340 24420001 */ addiu $v0, $v0, 1 -/* 985174 80240344 A482008E */ sh $v0, 0x8e($a0) -/* 985178 80240348 00021400 */ sll $v0, $v0, 0x10 -/* 98517C 8024034C 00021403 */ sra $v0, $v0, 0x10 -/* 985180 80240350 14430003 */ bne $v0, $v1, .L80240360 -/* 985184 80240354 00000000 */ nop -/* 985188 80240358 96020086 */ lhu $v0, 0x86($s0) -/* 98518C 8024035C A48200A8 */ sh $v0, 0xa8($a0) -.L80240360: -/* 985190 80240360 8482008E */ lh $v0, 0x8e($a0) -/* 985194 80240364 8E030080 */ lw $v1, 0x80($s0) -/* 985198 80240368 0043102A */ slt $v0, $v0, $v1 -/* 98519C 8024036C 14400004 */ bnez $v0, .L80240380 -/* 9851A0 80240370 00000000 */ nop -/* 9851A4 80240374 96020086 */ lhu $v0, 0x86($s0) -/* 9851A8 80240378 A48200A8 */ sh $v0, 0xa8($a0) -/* 9851AC 8024037C AE200070 */ sw $zero, 0x70($s1) -.L80240380: -/* 9851B0 80240380 8FBF0018 */ lw $ra, 0x18($sp) -/* 9851B4 80240384 8FB10014 */ lw $s1, 0x14($sp) -/* 9851B8 80240388 8FB00010 */ lw $s0, 0x10($sp) -/* 9851BC 8024038C 03E00008 */ jr $ra -/* 9851C0 80240390 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240394_9851C4.s b/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240394_9851C4.s index 9adc79c06e..acb22617e3 100644 --- a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240394_9851C4.s +++ b/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240394_9851C4.s @@ -232,7 +232,7 @@ glabel func_80240394_9851C4 .L802406E4: /* 985514 802406E4 0260202D */ daddu $a0, $s3, $zero /* 985518 802406E8 0280282D */ daddu $a1, $s4, $zero -/* 98551C 802406EC 0C090000 */ jal func_80240000_984E30 +/* 98551C 802406EC 0C090000 */ jal SetNpcAnim /* 985520 802406F0 02A0302D */ daddu $a2, $s5, $zero /* 985524 802406F4 0260202D */ daddu $a0, $s3, $zero .L802406F8: @@ -250,7 +250,7 @@ glabel func_80240394_9851C4 /* 985550 80240720 00000000 */ nop .L80240724: /* 985554 80240724 0280282D */ daddu $a1, $s4, $zero -/* 985558 80240728 0C0900C5 */ jal func_80240314_985144 +/* 985558 80240728 0C0900C5 */ jal SetNpcColHeight /* 98555C 8024072C 02A0302D */ daddu $a2, $s5, $zero /* 985560 80240730 080901D0 */ j .L80240740 /* 985564 80240734 00000000 */ nop diff --git a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_802407D4_985604.s b/asm/nonmatchings/world/area_isk/isk_08/984E30/func_802407D4_985604.s deleted file mode 100644 index 4442359106..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_802407D4_985604.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802407D4_985604 -/* 985604 802407D4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 985608 802407D8 AFBF0010 */ sw $ra, 0x10($sp) -/* 98560C 802407DC 0C00EAD2 */ jal get_npc_safe -/* 985610 802407E0 8C84014C */ lw $a0, 0x14c($a0) -/* 985614 802407E4 0040182D */ daddu $v1, $v0, $zero -/* 985618 802407E8 846200A8 */ lh $v0, 0xa8($v1) -/* 98561C 802407EC C462003C */ lwc1 $f2, 0x3c($v1) -/* 985620 802407F0 906400A9 */ lbu $a0, 0xa9($v1) -/* 985624 802407F4 44820000 */ mtc1 $v0, $f0 -/* 985628 802407F8 00000000 */ nop -/* 98562C 802407FC 46800020 */ cvt.s.w $f0, $f0 -/* 985630 80240800 46001081 */ sub.s $f2, $f2, $f0 -/* 985634 80240804 A06400AB */ sb $a0, 0xab($v1) -/* 985638 80240808 E462003C */ swc1 $f2, 0x3c($v1) -/* 98563C 8024080C 8FBF0010 */ lw $ra, 0x10($sp) -/* 985640 80240810 24020002 */ addiu $v0, $zero, 2 -/* 985644 80240814 03E00008 */ jr $ra -/* 985648 80240818 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240874_9856A4.s b/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240874_9856A4.s deleted file mode 100644 index d320679692..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_08/984E30/func_80240874_9856A4.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240874_9856A4 -/* 9856A4 80240874 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9856A8 80240878 0080102D */ daddu $v0, $a0, $zero -/* 9856AC 8024087C AFB00010 */ sw $s0, 0x10($sp) -/* 9856B0 80240880 AFBF0018 */ sw $ra, 0x18($sp) -/* 9856B4 80240884 AFB10014 */ sw $s1, 0x14($sp) -/* 9856B8 80240888 8C44014C */ lw $a0, 0x14c($v0) -/* 9856BC 8024088C 8C510148 */ lw $s1, 0x148($v0) -/* 9856C0 80240890 0C00EAD2 */ jal get_npc_safe -/* 9856C4 80240894 00A0802D */ daddu $s0, $a1, $zero -/* 9856C8 80240898 56000001 */ bnel $s0, $zero, .L802408A0 -/* 9856CC 8024089C A04000AB */ sb $zero, 0xab($v0) -.L802408A0: -/* 9856D0 802408A0 8C420000 */ lw $v0, ($v0) -/* 9856D4 802408A4 30421000 */ andi $v0, $v0, 0x1000 -/* 9856D8 802408A8 1040000A */ beqz $v0, .L802408D4 -/* 9856DC 802408AC 0000102D */ daddu $v0, $zero, $zero -/* 9856E0 802408B0 82220004 */ lb $v0, 4($s1) -/* 9856E4 802408B4 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* 9856E8 802408B8 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* 9856EC 802408BC 00021080 */ sll $v0, $v0, 2 -/* 9856F0 802408C0 00431021 */ addu $v0, $v0, $v1 -/* 9856F4 802408C4 8C440028 */ lw $a0, 0x28($v0) -/* 9856F8 802408C8 9623006E */ lhu $v1, 0x6e($s1) -/* 9856FC 802408CC 24020002 */ addiu $v0, $zero, 2 -/* 985700 802408D0 A4830044 */ sh $v1, 0x44($a0) -.L802408D4: -/* 985704 802408D4 8FBF0018 */ lw $ra, 0x18($sp) -/* 985708 802408D8 8FB10014 */ lw $s1, 0x14($sp) -/* 98570C 802408DC 8FB00010 */ lw $s0, 0x10($sp) -/* 985710 802408E0 03E00008 */ jr $ra -/* 985714 802408E4 27BD0020 */ addiu $sp, $sp, 0x20 -/* 985718 802408E8 00000000 */ nop -/* 98571C 802408EC 00000000 */ nop diff --git a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240000_997F70.s b/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240000_997F70.s deleted file mode 100644 index fed1a7364f..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240000_997F70.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240000_997F70 -/* 997F70 80240000 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 997F74 80240004 AFB20018 */ sw $s2, 0x18($sp) -/* 997F78 80240008 0080902D */ daddu $s2, $a0, $zero -/* 997F7C 8024000C AFBF001C */ sw $ra, 0x1c($sp) -/* 997F80 80240010 AFB10014 */ sw $s1, 0x14($sp) -/* 997F84 80240014 AFB00010 */ sw $s0, 0x10($sp) -/* 997F88 80240018 8E510148 */ lw $s1, 0x148($s2) -/* 997F8C 8024001C 0C00EABB */ jal get_npc_unsafe -/* 997F90 80240020 86240008 */ lh $a0, 8($s1) -/* 997F94 80240024 0040802D */ daddu $s0, $v0, $zero -/* 997F98 80240028 8E2300CC */ lw $v1, 0xcc($s1) -/* 997F9C 8024002C C60C0038 */ lwc1 $f12, 0x38($s0) -/* 997FA0 80240030 8C630020 */ lw $v1, 0x20($v1) -/* 997FA4 80240034 AE030028 */ sw $v1, 0x28($s0) -/* 997FA8 80240038 96220076 */ lhu $v0, 0x76($s1) -/* 997FAC 8024003C A602008E */ sh $v0, 0x8e($s0) -/* 997FB0 80240040 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* 997FB4 80240044 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* 997FB8 80240048 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 997FBC 8024004C 8C460028 */ lw $a2, 0x28($v0) -/* 997FC0 80240050 0C00A720 */ jal atan2 -/* 997FC4 80240054 8C470030 */ lw $a3, 0x30($v0) -/* 997FC8 80240058 2402000D */ addiu $v0, $zero, 0xd -/* 997FCC 8024005C E600000C */ swc1 $f0, 0xc($s0) -/* 997FD0 80240060 AE420070 */ sw $v0, 0x70($s2) -/* 997FD4 80240064 8FBF001C */ lw $ra, 0x1c($sp) -/* 997FD8 80240068 8FB20018 */ lw $s2, 0x18($sp) -/* 997FDC 8024006C 8FB10014 */ lw $s1, 0x14($sp) -/* 997FE0 80240070 8FB00010 */ lw $s0, 0x10($sp) -/* 997FE4 80240074 03E00008 */ jr $ra -/* 997FE8 80240078 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240314_998284.s b/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240314_998284.s deleted file mode 100644 index 86b358d17c..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240314_998284.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240314_998284 -/* 998284 80240314 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 998288 80240318 AFB10014 */ sw $s1, 0x14($sp) -/* 99828C 8024031C 0080882D */ daddu $s1, $a0, $zero -/* 998290 80240320 AFBF0018 */ sw $ra, 0x18($sp) -/* 998294 80240324 AFB00010 */ sw $s0, 0x10($sp) -/* 998298 80240328 8E300148 */ lw $s0, 0x148($s1) -/* 99829C 8024032C 0C00EABB */ jal get_npc_unsafe -/* 9982A0 80240330 86040008 */ lh $a0, 8($s0) -/* 9982A4 80240334 0040202D */ daddu $a0, $v0, $zero -/* 9982A8 80240338 9482008E */ lhu $v0, 0x8e($a0) -/* 9982AC 8024033C 24030003 */ addiu $v1, $zero, 3 -/* 9982B0 80240340 24420001 */ addiu $v0, $v0, 1 -/* 9982B4 80240344 A482008E */ sh $v0, 0x8e($a0) -/* 9982B8 80240348 00021400 */ sll $v0, $v0, 0x10 -/* 9982BC 8024034C 00021403 */ sra $v0, $v0, 0x10 -/* 9982C0 80240350 14430003 */ bne $v0, $v1, .L80240360 -/* 9982C4 80240354 00000000 */ nop -/* 9982C8 80240358 96020086 */ lhu $v0, 0x86($s0) -/* 9982CC 8024035C A48200A8 */ sh $v0, 0xa8($a0) -.L80240360: -/* 9982D0 80240360 8482008E */ lh $v0, 0x8e($a0) -/* 9982D4 80240364 8E030080 */ lw $v1, 0x80($s0) -/* 9982D8 80240368 0043102A */ slt $v0, $v0, $v1 -/* 9982DC 8024036C 14400004 */ bnez $v0, .L80240380 -/* 9982E0 80240370 00000000 */ nop -/* 9982E4 80240374 96020086 */ lhu $v0, 0x86($s0) -/* 9982E8 80240378 A48200A8 */ sh $v0, 0xa8($a0) -/* 9982EC 8024037C AE200070 */ sw $zero, 0x70($s1) -.L80240380: -/* 9982F0 80240380 8FBF0018 */ lw $ra, 0x18($sp) -/* 9982F4 80240384 8FB10014 */ lw $s1, 0x14($sp) -/* 9982F8 80240388 8FB00010 */ lw $s0, 0x10($sp) -/* 9982FC 8024038C 03E00008 */ jr $ra -/* 998300 80240390 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240394_998304.s b/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240394_998304.s index 4a394c7ccf..ca75687e53 100644 --- a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240394_998304.s +++ b/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240394_998304.s @@ -232,7 +232,7 @@ glabel func_80240394_998304 .L802406E4: /* 998654 802406E4 0260202D */ daddu $a0, $s3, $zero /* 998658 802406E8 0280282D */ daddu $a1, $s4, $zero -/* 99865C 802406EC 0C090000 */ jal func_80240000_997F70 +/* 99865C 802406EC 0C090000 */ jal SetNpcAnim /* 998660 802406F0 02A0302D */ daddu $a2, $s5, $zero /* 998664 802406F4 0260202D */ daddu $a0, $s3, $zero .L802406F8: @@ -250,7 +250,7 @@ glabel func_80240394_998304 /* 998690 80240720 00000000 */ nop .L80240724: /* 998694 80240724 0280282D */ daddu $a1, $s4, $zero -/* 998698 80240728 0C0900C5 */ jal func_80240314_998284 +/* 998698 80240728 0C0900C5 */ jal SetNpcColHeight /* 99869C 8024072C 02A0302D */ daddu $a2, $s5, $zero /* 9986A0 80240730 080901D0 */ j .L80240740 /* 9986A4 80240734 00000000 */ nop diff --git a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_802407D4_998744.s b/asm/nonmatchings/world/area_isk/isk_18/997F70/func_802407D4_998744.s deleted file mode 100644 index f9e5c50207..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_802407D4_998744.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802407D4_998744 -/* 998744 802407D4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 998748 802407D8 AFBF0010 */ sw $ra, 0x10($sp) -/* 99874C 802407DC 0C00EAD2 */ jal get_npc_safe -/* 998750 802407E0 8C84014C */ lw $a0, 0x14c($a0) -/* 998754 802407E4 0040182D */ daddu $v1, $v0, $zero -/* 998758 802407E8 846200A8 */ lh $v0, 0xa8($v1) -/* 99875C 802407EC C462003C */ lwc1 $f2, 0x3c($v1) -/* 998760 802407F0 906400A9 */ lbu $a0, 0xa9($v1) -/* 998764 802407F4 44820000 */ mtc1 $v0, $f0 -/* 998768 802407F8 00000000 */ nop -/* 99876C 802407FC 46800020 */ cvt.s.w $f0, $f0 -/* 998770 80240800 46001081 */ sub.s $f2, $f2, $f0 -/* 998774 80240804 A06400AB */ sb $a0, 0xab($v1) -/* 998778 80240808 E462003C */ swc1 $f2, 0x3c($v1) -/* 99877C 8024080C 8FBF0010 */ lw $ra, 0x10($sp) -/* 998780 80240810 24020002 */ addiu $v0, $zero, 2 -/* 998784 80240814 03E00008 */ jr $ra -/* 998788 80240818 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240874_9987E4.s b/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240874_9987E4.s deleted file mode 100644 index 21aa509255..0000000000 --- a/asm/nonmatchings/world/area_isk/isk_18/997F70/func_80240874_9987E4.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240874_9987E4 -/* 9987E4 80240874 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 9987E8 80240878 0080102D */ daddu $v0, $a0, $zero -/* 9987EC 8024087C AFB00010 */ sw $s0, 0x10($sp) -/* 9987F0 80240880 AFBF0018 */ sw $ra, 0x18($sp) -/* 9987F4 80240884 AFB10014 */ sw $s1, 0x14($sp) -/* 9987F8 80240888 8C44014C */ lw $a0, 0x14c($v0) -/* 9987FC 8024088C 8C510148 */ lw $s1, 0x148($v0) -/* 998800 80240890 0C00EAD2 */ jal get_npc_safe -/* 998804 80240894 00A0802D */ daddu $s0, $a1, $zero -/* 998808 80240898 56000001 */ bnel $s0, $zero, .L802408A0 -/* 99880C 8024089C A04000AB */ sb $zero, 0xab($v0) -.L802408A0: -/* 998810 802408A0 8C420000 */ lw $v0, ($v0) -/* 998814 802408A4 30421000 */ andi $v0, $v0, 0x1000 -/* 998818 802408A8 1040000A */ beqz $v0, .L802408D4 -/* 99881C 802408AC 0000102D */ daddu $v0, $zero, $zero -/* 998820 802408B0 82220004 */ lb $v0, 4($s1) -/* 998824 802408B4 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* 998828 802408B8 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* 99882C 802408BC 00021080 */ sll $v0, $v0, 2 -/* 998830 802408C0 00431021 */ addu $v0, $v0, $v1 -/* 998834 802408C4 8C440028 */ lw $a0, 0x28($v0) -/* 998838 802408C8 9623006E */ lhu $v1, 0x6e($s1) -/* 99883C 802408CC 24020002 */ addiu $v0, $zero, 2 -/* 998840 802408D0 A4830044 */ sh $v1, 0x44($a0) -.L802408D4: -/* 998844 802408D4 8FBF0018 */ lw $ra, 0x18($sp) -/* 998848 802408D8 8FB10014 */ lw $s1, 0x14($sp) -/* 99884C 802408DC 8FB00010 */ lw $s0, 0x10($sp) -/* 998850 802408E0 03E00008 */ jr $ra -/* 998854 802408E4 27BD0020 */ addiu $sp, $sp, 0x20 -/* 998858 802408E8 00000000 */ nop -/* 99885C 802408EC 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240160_A470C0.s b/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240160_A470C0.s deleted file mode 100644 index eb0e32be75..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240160_A470C0.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240160_A470C0 -/* A470C0 80240160 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A470C4 80240164 AFB20018 */ sw $s2, 0x18($sp) -/* A470C8 80240168 0080902D */ daddu $s2, $a0, $zero -/* A470CC 8024016C AFBF001C */ sw $ra, 0x1c($sp) -/* A470D0 80240170 AFB10014 */ sw $s1, 0x14($sp) -/* A470D4 80240174 AFB00010 */ sw $s0, 0x10($sp) -/* A470D8 80240178 8E510148 */ lw $s1, 0x148($s2) -/* A470DC 8024017C 0C00EABB */ jal get_npc_unsafe -/* A470E0 80240180 86240008 */ lh $a0, 8($s1) -/* A470E4 80240184 0040802D */ daddu $s0, $v0, $zero -/* A470E8 80240188 8E2300CC */ lw $v1, 0xcc($s1) -/* A470EC 8024018C C60C0038 */ lwc1 $f12, 0x38($s0) -/* A470F0 80240190 8C630020 */ lw $v1, 0x20($v1) -/* A470F4 80240194 AE030028 */ sw $v1, 0x28($s0) -/* A470F8 80240198 96220076 */ lhu $v0, 0x76($s1) -/* A470FC 8024019C A602008E */ sh $v0, 0x8e($s0) -/* A47100 802401A0 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* A47104 802401A4 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* A47108 802401A8 C60E0040 */ lwc1 $f14, 0x40($s0) -/* A4710C 802401AC 8C460028 */ lw $a2, 0x28($v0) -/* A47110 802401B0 0C00A720 */ jal atan2 -/* A47114 802401B4 8C470030 */ lw $a3, 0x30($v0) -/* A47118 802401B8 2402000D */ addiu $v0, $zero, 0xd -/* A4711C 802401BC E600000C */ swc1 $f0, 0xc($s0) -/* A47120 802401C0 AE420070 */ sw $v0, 0x70($s2) -/* A47124 802401C4 8FBF001C */ lw $ra, 0x1c($sp) -/* A47128 802401C8 8FB20018 */ lw $s2, 0x18($sp) -/* A4712C 802401CC 8FB10014 */ lw $s1, 0x14($sp) -/* A47130 802401D0 8FB00010 */ lw $s0, 0x10($sp) -/* A47134 802401D4 03E00008 */ jr $ra -/* A47138 802401D8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240474_A473D4.s b/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240474_A473D4.s deleted file mode 100644 index 2e1d8b8d4b..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240474_A473D4.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240474_A473D4 -/* A473D4 80240474 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A473D8 80240478 AFB10014 */ sw $s1, 0x14($sp) -/* A473DC 8024047C 0080882D */ daddu $s1, $a0, $zero -/* A473E0 80240480 AFBF0018 */ sw $ra, 0x18($sp) -/* A473E4 80240484 AFB00010 */ sw $s0, 0x10($sp) -/* A473E8 80240488 8E300148 */ lw $s0, 0x148($s1) -/* A473EC 8024048C 0C00EABB */ jal get_npc_unsafe -/* A473F0 80240490 86040008 */ lh $a0, 8($s0) -/* A473F4 80240494 0040202D */ daddu $a0, $v0, $zero -/* A473F8 80240498 9482008E */ lhu $v0, 0x8e($a0) -/* A473FC 8024049C 24030003 */ addiu $v1, $zero, 3 -/* A47400 802404A0 24420001 */ addiu $v0, $v0, 1 -/* A47404 802404A4 A482008E */ sh $v0, 0x8e($a0) -/* A47408 802404A8 00021400 */ sll $v0, $v0, 0x10 -/* A4740C 802404AC 00021403 */ sra $v0, $v0, 0x10 -/* A47410 802404B0 14430003 */ bne $v0, $v1, .L802404C0 -/* A47414 802404B4 00000000 */ nop -/* A47418 802404B8 96020086 */ lhu $v0, 0x86($s0) -/* A4741C 802404BC A48200A8 */ sh $v0, 0xa8($a0) -.L802404C0: -/* A47420 802404C0 8482008E */ lh $v0, 0x8e($a0) -/* A47424 802404C4 8E030080 */ lw $v1, 0x80($s0) -/* A47428 802404C8 0043102A */ slt $v0, $v0, $v1 -/* A4742C 802404CC 14400004 */ bnez $v0, .L802404E0 -/* A47430 802404D0 00000000 */ nop -/* A47434 802404D4 96020086 */ lhu $v0, 0x86($s0) -/* A47438 802404D8 A48200A8 */ sh $v0, 0xa8($a0) -/* A4743C 802404DC AE200070 */ sw $zero, 0x70($s1) -.L802404E0: -/* A47440 802404E0 8FBF0018 */ lw $ra, 0x18($sp) -/* A47444 802404E4 8FB10014 */ lw $s1, 0x14($sp) -/* A47448 802404E8 8FB00010 */ lw $s0, 0x10($sp) -/* A4744C 802404EC 03E00008 */ jr $ra -/* A47450 802404F0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802404F4_A47454.s b/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802404F4_A47454.s index 06b0ba288e..2875be5d29 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802404F4_A47454.s +++ b/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802404F4_A47454.s @@ -232,7 +232,7 @@ glabel func_802404F4_A47454 .L80240844: /* A477A4 80240844 0260202D */ daddu $a0, $s3, $zero /* A477A8 80240848 0280282D */ daddu $a1, $s4, $zero -/* A477AC 8024084C 0C090058 */ jal func_80240160_A470C0 +/* A477AC 8024084C 0C090058 */ jal SetNpcAnim /* A477B0 80240850 02A0302D */ daddu $a2, $s5, $zero /* A477B4 80240854 0260202D */ daddu $a0, $s3, $zero .L80240858: @@ -250,7 +250,7 @@ glabel func_802404F4_A47454 /* A477E0 80240880 00000000 */ nop .L80240884: /* A477E4 80240884 0280282D */ daddu $a1, $s4, $zero -/* A477E8 80240888 0C09011D */ jal func_80240474_A473D4 +/* A477E8 80240888 0C09011D */ jal SetNpcColHeight /* A477EC 8024088C 02A0302D */ daddu $a2, $s5, $zero /* A477F0 80240890 08090228 */ j .L802408A0 /* A477F4 80240894 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240934_A47894.s b/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240934_A47894.s deleted file mode 100644 index 475fccba7a..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_80240934_A47894.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240934_A47894 -/* A47894 80240934 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A47898 80240938 AFBF0010 */ sw $ra, 0x10($sp) -/* A4789C 8024093C 0C00EAD2 */ jal get_npc_safe -/* A478A0 80240940 8C84014C */ lw $a0, 0x14c($a0) -/* A478A4 80240944 0040182D */ daddu $v1, $v0, $zero -/* A478A8 80240948 846200A8 */ lh $v0, 0xa8($v1) -/* A478AC 8024094C C462003C */ lwc1 $f2, 0x3c($v1) -/* A478B0 80240950 906400A9 */ lbu $a0, 0xa9($v1) -/* A478B4 80240954 44820000 */ mtc1 $v0, $f0 -/* A478B8 80240958 00000000 */ nop -/* A478BC 8024095C 46800020 */ cvt.s.w $f0, $f0 -/* A478C0 80240960 46001081 */ sub.s $f2, $f2, $f0 -/* A478C4 80240964 A06400AB */ sb $a0, 0xab($v1) -/* A478C8 80240968 E462003C */ swc1 $f2, 0x3c($v1) -/* A478CC 8024096C 8FBF0010 */ lw $ra, 0x10($sp) -/* A478D0 80240970 24020002 */ addiu $v0, $zero, 2 -/* A478D4 80240974 03E00008 */ jr $ra -/* A478D8 80240978 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802409D4_A47934.s b/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802409D4_A47934.s deleted file mode 100644 index 6cc8cc7362..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_01/A470C0/func_802409D4_A47934.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802409D4_A47934 -/* A47934 802409D4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A47938 802409D8 0080102D */ daddu $v0, $a0, $zero -/* A4793C 802409DC AFB00010 */ sw $s0, 0x10($sp) -/* A47940 802409E0 AFBF0018 */ sw $ra, 0x18($sp) -/* A47944 802409E4 AFB10014 */ sw $s1, 0x14($sp) -/* A47948 802409E8 8C44014C */ lw $a0, 0x14c($v0) -/* A4794C 802409EC 8C510148 */ lw $s1, 0x148($v0) -/* A47950 802409F0 0C00EAD2 */ jal get_npc_safe -/* A47954 802409F4 00A0802D */ daddu $s0, $a1, $zero -/* A47958 802409F8 56000001 */ bnel $s0, $zero, .L80240A00 -/* A4795C 802409FC A04000AB */ sb $zero, 0xab($v0) -.L80240A00: -/* A47960 80240A00 8C420000 */ lw $v0, ($v0) -/* A47964 80240A04 30421000 */ andi $v0, $v0, 0x1000 -/* A47968 80240A08 1040000A */ beqz $v0, .L80240A34 -/* A4796C 80240A0C 0000102D */ daddu $v0, $zero, $zero -/* A47970 80240A10 82220004 */ lb $v0, 4($s1) -/* A47974 80240A14 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* A47978 80240A18 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* A4797C 80240A1C 00021080 */ sll $v0, $v0, 2 -/* A47980 80240A20 00431021 */ addu $v0, $v0, $v1 -/* A47984 80240A24 8C440028 */ lw $a0, 0x28($v0) -/* A47988 80240A28 9623006E */ lhu $v1, 0x6e($s1) -/* A4798C 80240A2C 24020002 */ addiu $v0, $zero, 2 -/* A47990 80240A30 A4830044 */ sh $v1, 0x44($a0) -.L80240A34: -/* A47994 80240A34 8FBF0018 */ lw $ra, 0x18($sp) -/* A47998 80240A38 8FB10014 */ lw $s1, 0x14($sp) -/* A4799C 80240A3C 8FB00010 */ lw $s0, 0x10($sp) -/* A479A0 80240A40 03E00008 */ jr $ra -/* A479A4 80240A44 27BD0020 */ addiu $sp, $sp, 0x20 -/* A479A8 80240A48 00000000 */ nop -/* A479AC 80240A4C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240160_A48720.s b/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240160_A48720.s deleted file mode 100644 index 0942f221f3..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240160_A48720.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240160_A48720 -/* A48720 80240160 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A48724 80240164 AFB20018 */ sw $s2, 0x18($sp) -/* A48728 80240168 0080902D */ daddu $s2, $a0, $zero -/* A4872C 8024016C AFBF001C */ sw $ra, 0x1c($sp) -/* A48730 80240170 AFB10014 */ sw $s1, 0x14($sp) -/* A48734 80240174 AFB00010 */ sw $s0, 0x10($sp) -/* A48738 80240178 8E510148 */ lw $s1, 0x148($s2) -/* A4873C 8024017C 0C00EABB */ jal get_npc_unsafe -/* A48740 80240180 86240008 */ lh $a0, 8($s1) -/* A48744 80240184 0040802D */ daddu $s0, $v0, $zero -/* A48748 80240188 8E2300CC */ lw $v1, 0xcc($s1) -/* A4874C 8024018C C60C0038 */ lwc1 $f12, 0x38($s0) -/* A48750 80240190 8C630020 */ lw $v1, 0x20($v1) -/* A48754 80240194 AE030028 */ sw $v1, 0x28($s0) -/* A48758 80240198 96220076 */ lhu $v0, 0x76($s1) -/* A4875C 8024019C A602008E */ sh $v0, 0x8e($s0) -/* A48760 802401A0 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* A48764 802401A4 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* A48768 802401A8 C60E0040 */ lwc1 $f14, 0x40($s0) -/* A4876C 802401AC 8C460028 */ lw $a2, 0x28($v0) -/* A48770 802401B0 0C00A720 */ jal atan2 -/* A48774 802401B4 8C470030 */ lw $a3, 0x30($v0) -/* A48778 802401B8 2402000D */ addiu $v0, $zero, 0xd -/* A4877C 802401BC E600000C */ swc1 $f0, 0xc($s0) -/* A48780 802401C0 AE420070 */ sw $v0, 0x70($s2) -/* A48784 802401C4 8FBF001C */ lw $ra, 0x1c($sp) -/* A48788 802401C8 8FB20018 */ lw $s2, 0x18($sp) -/* A4878C 802401CC 8FB10014 */ lw $s1, 0x14($sp) -/* A48790 802401D0 8FB00010 */ lw $s0, 0x10($sp) -/* A48794 802401D4 03E00008 */ jr $ra -/* A48798 802401D8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240474_A48A34.s b/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240474_A48A34.s deleted file mode 100644 index f71d6c43b9..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240474_A48A34.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240474_A48A34 -/* A48A34 80240474 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A48A38 80240478 AFB10014 */ sw $s1, 0x14($sp) -/* A48A3C 8024047C 0080882D */ daddu $s1, $a0, $zero -/* A48A40 80240480 AFBF0018 */ sw $ra, 0x18($sp) -/* A48A44 80240484 AFB00010 */ sw $s0, 0x10($sp) -/* A48A48 80240488 8E300148 */ lw $s0, 0x148($s1) -/* A48A4C 8024048C 0C00EABB */ jal get_npc_unsafe -/* A48A50 80240490 86040008 */ lh $a0, 8($s0) -/* A48A54 80240494 0040202D */ daddu $a0, $v0, $zero -/* A48A58 80240498 9482008E */ lhu $v0, 0x8e($a0) -/* A48A5C 8024049C 24030003 */ addiu $v1, $zero, 3 -/* A48A60 802404A0 24420001 */ addiu $v0, $v0, 1 -/* A48A64 802404A4 A482008E */ sh $v0, 0x8e($a0) -/* A48A68 802404A8 00021400 */ sll $v0, $v0, 0x10 -/* A48A6C 802404AC 00021403 */ sra $v0, $v0, 0x10 -/* A48A70 802404B0 14430003 */ bne $v0, $v1, .L802404C0 -/* A48A74 802404B4 00000000 */ nop -/* A48A78 802404B8 96020086 */ lhu $v0, 0x86($s0) -/* A48A7C 802404BC A48200A8 */ sh $v0, 0xa8($a0) -.L802404C0: -/* A48A80 802404C0 8482008E */ lh $v0, 0x8e($a0) -/* A48A84 802404C4 8E030080 */ lw $v1, 0x80($s0) -/* A48A88 802404C8 0043102A */ slt $v0, $v0, $v1 -/* A48A8C 802404CC 14400004 */ bnez $v0, .L802404E0 -/* A48A90 802404D0 00000000 */ nop -/* A48A94 802404D4 96020086 */ lhu $v0, 0x86($s0) -/* A48A98 802404D8 A48200A8 */ sh $v0, 0xa8($a0) -/* A48A9C 802404DC AE200070 */ sw $zero, 0x70($s1) -.L802404E0: -/* A48AA0 802404E0 8FBF0018 */ lw $ra, 0x18($sp) -/* A48AA4 802404E4 8FB10014 */ lw $s1, 0x14($sp) -/* A48AA8 802404E8 8FB00010 */ lw $s0, 0x10($sp) -/* A48AAC 802404EC 03E00008 */ jr $ra -/* A48AB0 802404F0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802404F4_A48AB4.s b/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802404F4_A48AB4.s index f02fbed3fd..9e823e1849 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802404F4_A48AB4.s +++ b/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802404F4_A48AB4.s @@ -232,7 +232,7 @@ glabel func_802404F4_A48AB4 .L80240844: /* A48E04 80240844 0260202D */ daddu $a0, $s3, $zero /* A48E08 80240848 0280282D */ daddu $a1, $s4, $zero -/* A48E0C 8024084C 0C090058 */ jal func_80240160_A48720 +/* A48E0C 8024084C 0C090058 */ jal SetNpcAnim /* A48E10 80240850 02A0302D */ daddu $a2, $s5, $zero /* A48E14 80240854 0260202D */ daddu $a0, $s3, $zero .L80240858: @@ -250,7 +250,7 @@ glabel func_802404F4_A48AB4 /* A48E40 80240880 00000000 */ nop .L80240884: /* A48E44 80240884 0280282D */ daddu $a1, $s4, $zero -/* A48E48 80240888 0C09011D */ jal func_80240474_A48A34 +/* A48E48 80240888 0C09011D */ jal SetNpcColHeight /* A48E4C 8024088C 02A0302D */ daddu $a2, $s5, $zero /* A48E50 80240890 08090228 */ j .L802408A0 /* A48E54 80240894 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240934_A48EF4.s b/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240934_A48EF4.s deleted file mode 100644 index 171918683a..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_80240934_A48EF4.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240934_A48EF4 -/* A48EF4 80240934 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A48EF8 80240938 AFBF0010 */ sw $ra, 0x10($sp) -/* A48EFC 8024093C 0C00EAD2 */ jal get_npc_safe -/* A48F00 80240940 8C84014C */ lw $a0, 0x14c($a0) -/* A48F04 80240944 0040182D */ daddu $v1, $v0, $zero -/* A48F08 80240948 846200A8 */ lh $v0, 0xa8($v1) -/* A48F0C 8024094C C462003C */ lwc1 $f2, 0x3c($v1) -/* A48F10 80240950 906400A9 */ lbu $a0, 0xa9($v1) -/* A48F14 80240954 44820000 */ mtc1 $v0, $f0 -/* A48F18 80240958 00000000 */ nop -/* A48F1C 8024095C 46800020 */ cvt.s.w $f0, $f0 -/* A48F20 80240960 46001081 */ sub.s $f2, $f2, $f0 -/* A48F24 80240964 A06400AB */ sb $a0, 0xab($v1) -/* A48F28 80240968 E462003C */ swc1 $f2, 0x3c($v1) -/* A48F2C 8024096C 8FBF0010 */ lw $ra, 0x10($sp) -/* A48F30 80240970 24020002 */ addiu $v0, $zero, 2 -/* A48F34 80240974 03E00008 */ jr $ra -/* A48F38 80240978 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802409D4_A48F94.s b/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802409D4_A48F94.s deleted file mode 100644 index 10fd46eed5..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_03/A48720/func_802409D4_A48F94.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802409D4_A48F94 -/* A48F94 802409D4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A48F98 802409D8 0080102D */ daddu $v0, $a0, $zero -/* A48F9C 802409DC AFB00010 */ sw $s0, 0x10($sp) -/* A48FA0 802409E0 AFBF0018 */ sw $ra, 0x18($sp) -/* A48FA4 802409E4 AFB10014 */ sw $s1, 0x14($sp) -/* A48FA8 802409E8 8C44014C */ lw $a0, 0x14c($v0) -/* A48FAC 802409EC 8C510148 */ lw $s1, 0x148($v0) -/* A48FB0 802409F0 0C00EAD2 */ jal get_npc_safe -/* A48FB4 802409F4 00A0802D */ daddu $s0, $a1, $zero -/* A48FB8 802409F8 56000001 */ bnel $s0, $zero, .L80240A00 -/* A48FBC 802409FC A04000AB */ sb $zero, 0xab($v0) -.L80240A00: -/* A48FC0 80240A00 8C420000 */ lw $v0, ($v0) -/* A48FC4 80240A04 30421000 */ andi $v0, $v0, 0x1000 -/* A48FC8 80240A08 1040000A */ beqz $v0, .L80240A34 -/* A48FCC 80240A0C 0000102D */ daddu $v0, $zero, $zero -/* A48FD0 80240A10 82220004 */ lb $v0, 4($s1) -/* A48FD4 80240A14 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* A48FD8 80240A18 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* A48FDC 80240A1C 00021080 */ sll $v0, $v0, 2 -/* A48FE0 80240A20 00431021 */ addu $v0, $v0, $v1 -/* A48FE4 80240A24 8C440028 */ lw $a0, 0x28($v0) -/* A48FE8 80240A28 9623006E */ lhu $v1, 0x6e($s1) -/* A48FEC 80240A2C 24020002 */ addiu $v0, $zero, 2 -/* A48FF0 80240A30 A4830044 */ sh $v1, 0x44($a0) -.L80240A34: -/* A48FF4 80240A34 8FBF0018 */ lw $ra, 0x18($sp) -/* A48FF8 80240A38 8FB10014 */ lw $s1, 0x14($sp) -/* A48FFC 80240A3C 8FB00010 */ lw $s0, 0x10($sp) -/* A49000 80240A40 03E00008 */ jr $ra -/* A49004 80240A44 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802401B0_A9CDE0.s b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802401B0_A9CDE0.s deleted file mode 100644 index 3c05bb704a..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802401B0_A9CDE0.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802401B0_A9CDE0 -/* A9CDE0 802401B0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A9CDE4 802401B4 AFB20018 */ sw $s2, 0x18($sp) -/* A9CDE8 802401B8 0080902D */ daddu $s2, $a0, $zero -/* A9CDEC 802401BC AFBF001C */ sw $ra, 0x1c($sp) -/* A9CDF0 802401C0 AFB10014 */ sw $s1, 0x14($sp) -/* A9CDF4 802401C4 AFB00010 */ sw $s0, 0x10($sp) -/* A9CDF8 802401C8 8E510148 */ lw $s1, 0x148($s2) -/* A9CDFC 802401CC 0C00EABB */ jal get_npc_unsafe -/* A9CE00 802401D0 86240008 */ lh $a0, 8($s1) -/* A9CE04 802401D4 0040802D */ daddu $s0, $v0, $zero -/* A9CE08 802401D8 8E2300CC */ lw $v1, 0xcc($s1) -/* A9CE0C 802401DC C60C0038 */ lwc1 $f12, 0x38($s0) -/* A9CE10 802401E0 8C630020 */ lw $v1, 0x20($v1) -/* A9CE14 802401E4 AE030028 */ sw $v1, 0x28($s0) -/* A9CE18 802401E8 96220076 */ lhu $v0, 0x76($s1) -/* A9CE1C 802401EC A602008E */ sh $v0, 0x8e($s0) -/* A9CE20 802401F0 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* A9CE24 802401F4 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* A9CE28 802401F8 C60E0040 */ lwc1 $f14, 0x40($s0) -/* A9CE2C 802401FC 8C460028 */ lw $a2, 0x28($v0) -/* A9CE30 80240200 0C00A720 */ jal atan2 -/* A9CE34 80240204 8C470030 */ lw $a3, 0x30($v0) -/* A9CE38 80240208 2402000D */ addiu $v0, $zero, 0xd -/* A9CE3C 8024020C E600000C */ swc1 $f0, 0xc($s0) -/* A9CE40 80240210 AE420070 */ sw $v0, 0x70($s2) -/* A9CE44 80240214 8FBF001C */ lw $ra, 0x1c($sp) -/* A9CE48 80240218 8FB20018 */ lw $s2, 0x18($sp) -/* A9CE4C 8024021C 8FB10014 */ lw $s1, 0x14($sp) -/* A9CE50 80240220 8FB00010 */ lw $s0, 0x10($sp) -/* A9CE54 80240224 03E00008 */ jr $ra -/* A9CE58 80240228 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802404C4_A9D0F4.s b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802404C4_A9D0F4.s deleted file mode 100644 index 55270c7b2a..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_802404C4_A9D0F4.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802404C4_A9D0F4 -/* A9D0F4 802404C4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A9D0F8 802404C8 AFB10014 */ sw $s1, 0x14($sp) -/* A9D0FC 802404CC 0080882D */ daddu $s1, $a0, $zero -/* A9D100 802404D0 AFBF0018 */ sw $ra, 0x18($sp) -/* A9D104 802404D4 AFB00010 */ sw $s0, 0x10($sp) -/* A9D108 802404D8 8E300148 */ lw $s0, 0x148($s1) -/* A9D10C 802404DC 0C00EABB */ jal get_npc_unsafe -/* A9D110 802404E0 86040008 */ lh $a0, 8($s0) -/* A9D114 802404E4 0040202D */ daddu $a0, $v0, $zero -/* A9D118 802404E8 9482008E */ lhu $v0, 0x8e($a0) -/* A9D11C 802404EC 24030003 */ addiu $v1, $zero, 3 -/* A9D120 802404F0 24420001 */ addiu $v0, $v0, 1 -/* A9D124 802404F4 A482008E */ sh $v0, 0x8e($a0) -/* A9D128 802404F8 00021400 */ sll $v0, $v0, 0x10 -/* A9D12C 802404FC 00021403 */ sra $v0, $v0, 0x10 -/* A9D130 80240500 14430003 */ bne $v0, $v1, .L80240510 -/* A9D134 80240504 00000000 */ nop -/* A9D138 80240508 96020086 */ lhu $v0, 0x86($s0) -/* A9D13C 8024050C A48200A8 */ sh $v0, 0xa8($a0) -.L80240510: -/* A9D140 80240510 8482008E */ lh $v0, 0x8e($a0) -/* A9D144 80240514 8E030080 */ lw $v1, 0x80($s0) -/* A9D148 80240518 0043102A */ slt $v0, $v0, $v1 -/* A9D14C 8024051C 14400004 */ bnez $v0, .L80240530 -/* A9D150 80240520 00000000 */ nop -/* A9D154 80240524 96020086 */ lhu $v0, 0x86($s0) -/* A9D158 80240528 A48200A8 */ sh $v0, 0xa8($a0) -/* A9D15C 8024052C AE200070 */ sw $zero, 0x70($s1) -.L80240530: -/* A9D160 80240530 8FBF0018 */ lw $ra, 0x18($sp) -/* A9D164 80240534 8FB10014 */ lw $s1, 0x14($sp) -/* A9D168 80240538 8FB00010 */ lw $s0, 0x10($sp) -/* A9D16C 8024053C 03E00008 */ jr $ra -/* A9D170 80240540 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240544_A9D174.s b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240544_A9D174.s index 5fb2d26b5a..c8a9f9fb81 100644 --- a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240544_A9D174.s +++ b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240544_A9D174.s @@ -232,7 +232,7 @@ glabel func_80240544_A9D174 .L80240894: /* A9D4C4 80240894 0260202D */ daddu $a0, $s3, $zero /* A9D4C8 80240898 0280282D */ daddu $a1, $s4, $zero -/* A9D4CC 8024089C 0C09006C */ jal func_802401B0_A9CDE0 +/* A9D4CC 8024089C 0C09006C */ jal SetNpcAnim /* A9D4D0 802408A0 02A0302D */ daddu $a2, $s5, $zero /* A9D4D4 802408A4 0260202D */ daddu $a0, $s3, $zero .L802408A8: @@ -250,7 +250,7 @@ glabel func_80240544_A9D174 /* A9D500 802408D0 00000000 */ nop .L802408D4: /* A9D504 802408D4 0280282D */ daddu $a1, $s4, $zero -/* A9D508 802408D8 0C090131 */ jal func_802404C4_A9D0F4 +/* A9D508 802408D8 0C090131 */ jal SetNpcColHeight /* A9D50C 802408DC 02A0302D */ daddu $a2, $s5, $zero /* A9D510 802408E0 0809023C */ j .L802408F0 /* A9D514 802408E4 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240984_A9D5B4.s b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240984_A9D5B4.s deleted file mode 100644 index a34ab8813b..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240984_A9D5B4.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240984_A9D5B4 -/* A9D5B4 80240984 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* A9D5B8 80240988 AFBF0010 */ sw $ra, 0x10($sp) -/* A9D5BC 8024098C 0C00EAD2 */ jal get_npc_safe -/* A9D5C0 80240990 8C84014C */ lw $a0, 0x14c($a0) -/* A9D5C4 80240994 0040182D */ daddu $v1, $v0, $zero -/* A9D5C8 80240998 846200A8 */ lh $v0, 0xa8($v1) -/* A9D5CC 8024099C C462003C */ lwc1 $f2, 0x3c($v1) -/* A9D5D0 802409A0 906400A9 */ lbu $a0, 0xa9($v1) -/* A9D5D4 802409A4 44820000 */ mtc1 $v0, $f0 -/* A9D5D8 802409A8 00000000 */ nop -/* A9D5DC 802409AC 46800020 */ cvt.s.w $f0, $f0 -/* A9D5E0 802409B0 46001081 */ sub.s $f2, $f2, $f0 -/* A9D5E4 802409B4 A06400AB */ sb $a0, 0xab($v1) -/* A9D5E8 802409B8 E462003C */ swc1 $f2, 0x3c($v1) -/* A9D5EC 802409BC 8FBF0010 */ lw $ra, 0x10($sp) -/* A9D5F0 802409C0 24020002 */ addiu $v0, $zero, 2 -/* A9D5F4 802409C4 03E00008 */ jr $ra -/* A9D5F8 802409C8 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240A24_A9D654.s b/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240A24_A9D654.s deleted file mode 100644 index 64045de3e7..0000000000 --- a/asm/nonmatchings/world/area_kpa/kpa_113/A9CC70/func_80240A24_A9D654.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240A24_A9D654 -/* A9D654 80240A24 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* A9D658 80240A28 0080102D */ daddu $v0, $a0, $zero -/* A9D65C 80240A2C AFB00010 */ sw $s0, 0x10($sp) -/* A9D660 80240A30 AFBF0018 */ sw $ra, 0x18($sp) -/* A9D664 80240A34 AFB10014 */ sw $s1, 0x14($sp) -/* A9D668 80240A38 8C44014C */ lw $a0, 0x14c($v0) -/* A9D66C 80240A3C 8C510148 */ lw $s1, 0x148($v0) -/* A9D670 80240A40 0C00EAD2 */ jal get_npc_safe -/* A9D674 80240A44 00A0802D */ daddu $s0, $a1, $zero -/* A9D678 80240A48 56000001 */ bnel $s0, $zero, .L80240A50 -/* A9D67C 80240A4C A04000AB */ sb $zero, 0xab($v0) -.L80240A50: -/* A9D680 80240A50 8C420000 */ lw $v0, ($v0) -/* A9D684 80240A54 30421000 */ andi $v0, $v0, 0x1000 -/* A9D688 80240A58 1040000A */ beqz $v0, .L80240A84 -/* A9D68C 80240A5C 0000102D */ daddu $v0, $zero, $zero -/* A9D690 80240A60 82220004 */ lb $v0, 4($s1) -/* A9D694 80240A64 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* A9D698 80240A68 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* A9D69C 80240A6C 00021080 */ sll $v0, $v0, 2 -/* A9D6A0 80240A70 00431021 */ addu $v0, $v0, $v1 -/* A9D6A4 80240A74 8C440028 */ lw $a0, 0x28($v0) -/* A9D6A8 80240A78 9623006E */ lhu $v1, 0x6e($s1) -/* A9D6AC 80240A7C 24020002 */ addiu $v0, $zero, 2 -/* A9D6B0 80240A80 A4830044 */ sh $v1, 0x44($a0) -.L80240A84: -/* A9D6B4 80240A84 8FBF0018 */ lw $ra, 0x18($sp) -/* A9D6B8 80240A88 8FB10014 */ lw $s1, 0x14($sp) -/* A9D6BC 80240A8C 8FB00010 */ lw $s0, 0x10($sp) -/* A9D6C0 80240A90 03E00008 */ jr $ra -/* A9D6C4 80240A94 27BD0020 */ addiu $sp, $sp, 0x20 -/* A9D6C8 80240A98 00000000 */ nop -/* A9D6CC 80240A9C 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240310_C61020.s b/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240310_C61020.s deleted file mode 100644 index 533f7dfabf..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240310_C61020.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240310_C61020 -/* C61020 80240310 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C61024 80240314 AFB20018 */ sw $s2, 0x18($sp) -/* C61028 80240318 0080902D */ daddu $s2, $a0, $zero -/* C6102C 8024031C AFBF001C */ sw $ra, 0x1c($sp) -/* C61030 80240320 AFB10014 */ sw $s1, 0x14($sp) -/* C61034 80240324 AFB00010 */ sw $s0, 0x10($sp) -/* C61038 80240328 8E510148 */ lw $s1, 0x148($s2) -/* C6103C 8024032C 0C00EABB */ jal get_npc_unsafe -/* C61040 80240330 86240008 */ lh $a0, 8($s1) -/* C61044 80240334 0040802D */ daddu $s0, $v0, $zero -/* C61048 80240338 8E2300CC */ lw $v1, 0xcc($s1) -/* C6104C 8024033C C60C0038 */ lwc1 $f12, 0x38($s0) -/* C61050 80240340 8C630020 */ lw $v1, 0x20($v1) -/* C61054 80240344 AE030028 */ sw $v1, 0x28($s0) -/* C61058 80240348 96220076 */ lhu $v0, 0x76($s1) -/* C6105C 8024034C A602008E */ sh $v0, 0x8e($s0) -/* C61060 80240350 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* C61064 80240354 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* C61068 80240358 C60E0040 */ lwc1 $f14, 0x40($s0) -/* C6106C 8024035C 8C460028 */ lw $a2, 0x28($v0) -/* C61070 80240360 0C00A720 */ jal atan2 -/* C61074 80240364 8C470030 */ lw $a3, 0x30($v0) -/* C61078 80240368 2402000D */ addiu $v0, $zero, 0xd -/* C6107C 8024036C E600000C */ swc1 $f0, 0xc($s0) -/* C61080 80240370 AE420070 */ sw $v0, 0x70($s2) -/* C61084 80240374 8FBF001C */ lw $ra, 0x1c($sp) -/* C61088 80240378 8FB20018 */ lw $s2, 0x18($sp) -/* C6108C 8024037C 8FB10014 */ lw $s1, 0x14($sp) -/* C61090 80240380 8FB00010 */ lw $s0, 0x10($sp) -/* C61094 80240384 03E00008 */ jr $ra -/* C61098 80240388 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240624_C61334.s b/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240624_C61334.s deleted file mode 100644 index 27e1fb0274..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240624_C61334.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240624_C61334 -/* C61334 80240624 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C61338 80240628 AFB10014 */ sw $s1, 0x14($sp) -/* C6133C 8024062C 0080882D */ daddu $s1, $a0, $zero -/* C61340 80240630 AFBF0018 */ sw $ra, 0x18($sp) -/* C61344 80240634 AFB00010 */ sw $s0, 0x10($sp) -/* C61348 80240638 8E300148 */ lw $s0, 0x148($s1) -/* C6134C 8024063C 0C00EABB */ jal get_npc_unsafe -/* C61350 80240640 86040008 */ lh $a0, 8($s0) -/* C61354 80240644 0040202D */ daddu $a0, $v0, $zero -/* C61358 80240648 9482008E */ lhu $v0, 0x8e($a0) -/* C6135C 8024064C 24030003 */ addiu $v1, $zero, 3 -/* C61360 80240650 24420001 */ addiu $v0, $v0, 1 -/* C61364 80240654 A482008E */ sh $v0, 0x8e($a0) -/* C61368 80240658 00021400 */ sll $v0, $v0, 0x10 -/* C6136C 8024065C 00021403 */ sra $v0, $v0, 0x10 -/* C61370 80240660 14430003 */ bne $v0, $v1, .L80240670 -/* C61374 80240664 00000000 */ nop -/* C61378 80240668 96020086 */ lhu $v0, 0x86($s0) -/* C6137C 8024066C A48200A8 */ sh $v0, 0xa8($a0) -.L80240670: -/* C61380 80240670 8482008E */ lh $v0, 0x8e($a0) -/* C61384 80240674 8E030080 */ lw $v1, 0x80($s0) -/* C61388 80240678 0043102A */ slt $v0, $v0, $v1 -/* C6138C 8024067C 14400004 */ bnez $v0, .L80240690 -/* C61390 80240680 00000000 */ nop -/* C61394 80240684 96020086 */ lhu $v0, 0x86($s0) -/* C61398 80240688 A48200A8 */ sh $v0, 0xa8($a0) -/* C6139C 8024068C AE200070 */ sw $zero, 0x70($s1) -.L80240690: -/* C613A0 80240690 8FBF0018 */ lw $ra, 0x18($sp) -/* C613A4 80240694 8FB10014 */ lw $s1, 0x14($sp) -/* C613A8 80240698 8FB00010 */ lw $s0, 0x10($sp) -/* C613AC 8024069C 03E00008 */ jr $ra -/* C613B0 802406A0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_802406A4_C613B4.s b/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_802406A4_C613B4.s index f332aaa226..0cba0d9dec 100644 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_802406A4_C613B4.s +++ b/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_802406A4_C613B4.s @@ -232,7 +232,7 @@ glabel func_802406A4_C613B4 .L802409F4: /* C61704 802409F4 0260202D */ daddu $a0, $s3, $zero /* C61708 802409F8 0280282D */ daddu $a1, $s4, $zero -/* C6170C 802409FC 0C0900C4 */ jal func_80240310_C61020 +/* C6170C 802409FC 0C0900C4 */ jal SetNpcAnim /* C61710 80240A00 02A0302D */ daddu $a2, $s5, $zero /* C61714 80240A04 0260202D */ daddu $a0, $s3, $zero .L80240A08: @@ -250,7 +250,7 @@ glabel func_802406A4_C613B4 /* C61740 80240A30 00000000 */ nop .L80240A34: /* C61744 80240A34 0280282D */ daddu $a1, $s4, $zero -/* C61748 80240A38 0C090189 */ jal func_80240624_C61334 +/* C61748 80240A38 0C090189 */ jal SetNpcColHeight /* C6174C 80240A3C 02A0302D */ daddu $a2, $s5, $zero /* C61750 80240A40 08090294 */ j .L80240A50 /* C61754 80240A44 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240AE4_C617F4.s b/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240AE4_C617F4.s deleted file mode 100644 index d15e86e2c8..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240AE4_C617F4.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240AE4_C617F4 -/* C617F4 80240AE4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* C617F8 80240AE8 AFBF0010 */ sw $ra, 0x10($sp) -/* C617FC 80240AEC 0C00EAD2 */ jal get_npc_safe -/* C61800 80240AF0 8C84014C */ lw $a0, 0x14c($a0) -/* C61804 80240AF4 0040182D */ daddu $v1, $v0, $zero -/* C61808 80240AF8 846200A8 */ lh $v0, 0xa8($v1) -/* C6180C 80240AFC C462003C */ lwc1 $f2, 0x3c($v1) -/* C61810 80240B00 906400A9 */ lbu $a0, 0xa9($v1) -/* C61814 80240B04 44820000 */ mtc1 $v0, $f0 -/* C61818 80240B08 00000000 */ nop -/* C6181C 80240B0C 46800020 */ cvt.s.w $f0, $f0 -/* C61820 80240B10 46001081 */ sub.s $f2, $f2, $f0 -/* C61824 80240B14 A06400AB */ sb $a0, 0xab($v1) -/* C61828 80240B18 E462003C */ swc1 $f2, 0x3c($v1) -/* C6182C 80240B1C 8FBF0010 */ lw $ra, 0x10($sp) -/* C61830 80240B20 24020002 */ addiu $v0, $zero, 2 -/* C61834 80240B24 03E00008 */ jr $ra -/* C61838 80240B28 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240B84_C61894.s b/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240B84_C61894.s deleted file mode 100644 index 68899a70ef..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_03/C61020/func_80240B84_C61894.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80240B84_C61894 -/* C61894 80240B84 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C61898 80240B88 0080102D */ daddu $v0, $a0, $zero -/* C6189C 80240B8C AFB00010 */ sw $s0, 0x10($sp) -/* C618A0 80240B90 AFBF0018 */ sw $ra, 0x18($sp) -/* C618A4 80240B94 AFB10014 */ sw $s1, 0x14($sp) -/* C618A8 80240B98 8C44014C */ lw $a0, 0x14c($v0) -/* C618AC 80240B9C 8C510148 */ lw $s1, 0x148($v0) -/* C618B0 80240BA0 0C00EAD2 */ jal get_npc_safe -/* C618B4 80240BA4 00A0802D */ daddu $s0, $a1, $zero -/* C618B8 80240BA8 56000001 */ bnel $s0, $zero, .L80240BB0 -/* C618BC 80240BAC A04000AB */ sb $zero, 0xab($v0) -.L80240BB0: -/* C618C0 80240BB0 8C420000 */ lw $v0, ($v0) -/* C618C4 80240BB4 30421000 */ andi $v0, $v0, 0x1000 -/* C618C8 80240BB8 1040000A */ beqz $v0, .L80240BE4 -/* C618CC 80240BBC 0000102D */ daddu $v0, $zero, $zero -/* C618D0 80240BC0 82220004 */ lb $v0, 4($s1) -/* C618D4 80240BC4 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* C618D8 80240BC8 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* C618DC 80240BCC 00021080 */ sll $v0, $v0, 2 -/* C618E0 80240BD0 00431021 */ addu $v0, $v0, $v1 -/* C618E4 80240BD4 8C440028 */ lw $a0, 0x28($v0) -/* C618E8 80240BD8 9623006E */ lhu $v1, 0x6e($s1) -/* C618EC 80240BDC 24020002 */ addiu $v0, $zero, 2 -/* C618F0 80240BE0 A4830044 */ sh $v1, 0x44($a0) -.L80240BE4: -/* C618F4 80240BE4 8FBF0018 */ lw $ra, 0x18($sp) -/* C618F8 80240BE8 8FB10014 */ lw $s1, 0x14($sp) -/* C618FC 80240BEC 8FB00010 */ lw $s0, 0x10($sp) -/* C61900 80240BF0 03E00008 */ jr $ra -/* C61904 80240BF4 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_802429C4_C796A4.s b/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_802429C4_C796A4.s deleted file mode 100644 index fbdd788d8d..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_802429C4_C796A4.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802429C4_C796A4 -/* C796A4 802429C4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C796A8 802429C8 AFB20018 */ sw $s2, 0x18($sp) -/* C796AC 802429CC 0080902D */ daddu $s2, $a0, $zero -/* C796B0 802429D0 AFBF001C */ sw $ra, 0x1c($sp) -/* C796B4 802429D4 AFB10014 */ sw $s1, 0x14($sp) -/* C796B8 802429D8 AFB00010 */ sw $s0, 0x10($sp) -/* C796BC 802429DC 8E510148 */ lw $s1, 0x148($s2) -/* C796C0 802429E0 0C00EABB */ jal get_npc_unsafe -/* C796C4 802429E4 86240008 */ lh $a0, 8($s1) -/* C796C8 802429E8 0040802D */ daddu $s0, $v0, $zero -/* C796CC 802429EC 8E2300CC */ lw $v1, 0xcc($s1) -/* C796D0 802429F0 C60C0038 */ lwc1 $f12, 0x38($s0) -/* C796D4 802429F4 8C630020 */ lw $v1, 0x20($v1) -/* C796D8 802429F8 AE030028 */ sw $v1, 0x28($s0) -/* C796DC 802429FC 96220076 */ lhu $v0, 0x76($s1) -/* C796E0 80242A00 A602008E */ sh $v0, 0x8e($s0) -/* C796E4 80242A04 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* C796E8 80242A08 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* C796EC 80242A0C C60E0040 */ lwc1 $f14, 0x40($s0) -/* C796F0 80242A10 8C460028 */ lw $a2, 0x28($v0) -/* C796F4 80242A14 0C00A720 */ jal atan2 -/* C796F8 80242A18 8C470030 */ lw $a3, 0x30($v0) -/* C796FC 80242A1C 2402000D */ addiu $v0, $zero, 0xd -/* C79700 80242A20 E600000C */ swc1 $f0, 0xc($s0) -/* C79704 80242A24 AE420070 */ sw $v0, 0x70($s2) -/* C79708 80242A28 8FBF001C */ lw $ra, 0x1c($sp) -/* C7970C 80242A2C 8FB20018 */ lw $s2, 0x18($sp) -/* C79710 80242A30 8FB10014 */ lw $s1, 0x14($sp) -/* C79714 80242A34 8FB00010 */ lw $s0, 0x10($sp) -/* C79718 80242A38 03E00008 */ jr $ra -/* C7971C 80242A3C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242CD8_C799B8.s b/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242CD8_C799B8.s deleted file mode 100644 index f6caa0ac94..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242CD8_C799B8.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242CD8_C799B8 -/* C799B8 80242CD8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C799BC 80242CDC AFB10014 */ sw $s1, 0x14($sp) -/* C799C0 80242CE0 0080882D */ daddu $s1, $a0, $zero -/* C799C4 80242CE4 AFBF0018 */ sw $ra, 0x18($sp) -/* C799C8 80242CE8 AFB00010 */ sw $s0, 0x10($sp) -/* C799CC 80242CEC 8E300148 */ lw $s0, 0x148($s1) -/* C799D0 80242CF0 0C00EABB */ jal get_npc_unsafe -/* C799D4 80242CF4 86040008 */ lh $a0, 8($s0) -/* C799D8 80242CF8 0040202D */ daddu $a0, $v0, $zero -/* C799DC 80242CFC 9482008E */ lhu $v0, 0x8e($a0) -/* C799E0 80242D00 24030003 */ addiu $v1, $zero, 3 -/* C799E4 80242D04 24420001 */ addiu $v0, $v0, 1 -/* C799E8 80242D08 A482008E */ sh $v0, 0x8e($a0) -/* C799EC 80242D0C 00021400 */ sll $v0, $v0, 0x10 -/* C799F0 80242D10 00021403 */ sra $v0, $v0, 0x10 -/* C799F4 80242D14 14430003 */ bne $v0, $v1, .L80242D24 -/* C799F8 80242D18 00000000 */ nop -/* C799FC 80242D1C 96020086 */ lhu $v0, 0x86($s0) -/* C79A00 80242D20 A48200A8 */ sh $v0, 0xa8($a0) -.L80242D24: -/* C79A04 80242D24 8482008E */ lh $v0, 0x8e($a0) -/* C79A08 80242D28 8E030080 */ lw $v1, 0x80($s0) -/* C79A0C 80242D2C 0043102A */ slt $v0, $v0, $v1 -/* C79A10 80242D30 14400004 */ bnez $v0, .L80242D44 -/* C79A14 80242D34 00000000 */ nop -/* C79A18 80242D38 96020086 */ lhu $v0, 0x86($s0) -/* C79A1C 80242D3C A48200A8 */ sh $v0, 0xa8($a0) -/* C79A20 80242D40 AE200070 */ sw $zero, 0x70($s1) -.L80242D44: -/* C79A24 80242D44 8FBF0018 */ lw $ra, 0x18($sp) -/* C79A28 80242D48 8FB10014 */ lw $s1, 0x14($sp) -/* C79A2C 80242D4C 8FB00010 */ lw $s0, 0x10($sp) -/* C79A30 80242D50 03E00008 */ jr $ra -/* C79A34 80242D54 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242D58_C79A38.s b/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242D58_C79A38.s index d58462a2fb..c2ff35611c 100644 --- a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242D58_C79A38.s +++ b/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80242D58_C79A38.s @@ -232,7 +232,7 @@ glabel func_80242D58_C79A38 .L802430A8: /* C79D88 802430A8 0260202D */ daddu $a0, $s3, $zero /* C79D8C 802430AC 0280282D */ daddu $a1, $s4, $zero -/* C79D90 802430B0 0C090A71 */ jal func_802429C4_C796A4 +/* C79D90 802430B0 0C090A71 */ jal SetNpcAnim /* C79D94 802430B4 02A0302D */ daddu $a2, $s5, $zero /* C79D98 802430B8 0260202D */ daddu $a0, $s3, $zero .L802430BC: @@ -250,7 +250,7 @@ glabel func_80242D58_C79A38 /* C79DC4 802430E4 00000000 */ nop .L802430E8: /* C79DC8 802430E8 0280282D */ daddu $a1, $s4, $zero -/* C79DCC 802430EC 0C090B36 */ jal func_80242CD8_C799B8 +/* C79DCC 802430EC 0C090B36 */ jal SetNpcColHeight /* C79DD0 802430F0 02A0302D */ daddu $a2, $s5, $zero /* C79DD4 802430F4 08090C41 */ j .L80243104 /* C79DD8 802430F8 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243198_C79E78.s b/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243198_C79E78.s deleted file mode 100644 index 069fb5dc2c..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243198_C79E78.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243198_C79E78 -/* C79E78 80243198 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* C79E7C 8024319C AFBF0010 */ sw $ra, 0x10($sp) -/* C79E80 802431A0 0C00EAD2 */ jal get_npc_safe -/* C79E84 802431A4 8C84014C */ lw $a0, 0x14c($a0) -/* C79E88 802431A8 0040182D */ daddu $v1, $v0, $zero -/* C79E8C 802431AC 846200A8 */ lh $v0, 0xa8($v1) -/* C79E90 802431B0 C462003C */ lwc1 $f2, 0x3c($v1) -/* C79E94 802431B4 906400A9 */ lbu $a0, 0xa9($v1) -/* C79E98 802431B8 44820000 */ mtc1 $v0, $f0 -/* C79E9C 802431BC 00000000 */ nop -/* C79EA0 802431C0 46800020 */ cvt.s.w $f0, $f0 -/* C79EA4 802431C4 46001081 */ sub.s $f2, $f2, $f0 -/* C79EA8 802431C8 A06400AB */ sb $a0, 0xab($v1) -/* C79EAC 802431CC E462003C */ swc1 $f2, 0x3c($v1) -/* C79EB0 802431D0 8FBF0010 */ lw $ra, 0x10($sp) -/* C79EB4 802431D4 24020002 */ addiu $v0, $zero, 2 -/* C79EB8 802431D8 03E00008 */ jr $ra -/* C79EBC 802431DC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243238_C79F18.s b/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243238_C79F18.s deleted file mode 100644 index 958e75b4ea..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_09/C77D00/func_80243238_C79F18.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80243238_C79F18 -/* C79F18 80243238 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C79F1C 8024323C 0080102D */ daddu $v0, $a0, $zero -/* C79F20 80243240 AFB00010 */ sw $s0, 0x10($sp) -/* C79F24 80243244 AFBF0018 */ sw $ra, 0x18($sp) -/* C79F28 80243248 AFB10014 */ sw $s1, 0x14($sp) -/* C79F2C 8024324C 8C44014C */ lw $a0, 0x14c($v0) -/* C79F30 80243250 8C510148 */ lw $s1, 0x148($v0) -/* C79F34 80243254 0C00EAD2 */ jal get_npc_safe -/* C79F38 80243258 00A0802D */ daddu $s0, $a1, $zero -/* C79F3C 8024325C 56000001 */ bnel $s0, $zero, .L80243264 -/* C79F40 80243260 A04000AB */ sb $zero, 0xab($v0) -.L80243264: -/* C79F44 80243264 8C420000 */ lw $v0, ($v0) -/* C79F48 80243268 30421000 */ andi $v0, $v0, 0x1000 -/* C79F4C 8024326C 1040000A */ beqz $v0, .L80243298 -/* C79F50 80243270 0000102D */ daddu $v0, $zero, $zero -/* C79F54 80243274 82220004 */ lb $v0, 4($s1) -/* C79F58 80243278 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* C79F5C 8024327C 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* C79F60 80243280 00021080 */ sll $v0, $v0, 2 -/* C79F64 80243284 00431021 */ addu $v0, $v0, $v1 -/* C79F68 80243288 8C440028 */ lw $a0, 0x28($v0) -/* C79F6C 8024328C 9623006E */ lhu $v1, 0x6e($s1) -/* C79F70 80243290 24020002 */ addiu $v0, $zero, 2 -/* C79F74 80243294 A4830044 */ sh $v1, 0x44($a0) -.L80243298: -/* C79F78 80243298 8FBF0018 */ lw $ra, 0x18($sp) -/* C79F7C 8024329C 8FB10014 */ lw $s1, 0x14($sp) -/* C79F80 802432A0 8FB00010 */ lw $s0, 0x10($sp) -/* C79F84 802432A4 03E00008 */ jr $ra -/* C79F88 802432A8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241CB4_C87764.s b/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241CB4_C87764.s deleted file mode 100644 index 2dc6ad0da2..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241CB4_C87764.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241CB4_C87764 -/* C87764 80241CB4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C87768 80241CB8 AFB20018 */ sw $s2, 0x18($sp) -/* C8776C 80241CBC 0080902D */ daddu $s2, $a0, $zero -/* C87770 80241CC0 AFBF001C */ sw $ra, 0x1c($sp) -/* C87774 80241CC4 AFB10014 */ sw $s1, 0x14($sp) -/* C87778 80241CC8 AFB00010 */ sw $s0, 0x10($sp) -/* C8777C 80241CCC 8E510148 */ lw $s1, 0x148($s2) -/* C87780 80241CD0 0C00EABB */ jal get_npc_unsafe -/* C87784 80241CD4 86240008 */ lh $a0, 8($s1) -/* C87788 80241CD8 0040802D */ daddu $s0, $v0, $zero -/* C8778C 80241CDC 8E2300CC */ lw $v1, 0xcc($s1) -/* C87790 80241CE0 C60C0038 */ lwc1 $f12, 0x38($s0) -/* C87794 80241CE4 8C630020 */ lw $v1, 0x20($v1) -/* C87798 80241CE8 AE030028 */ sw $v1, 0x28($s0) -/* C8779C 80241CEC 96220076 */ lhu $v0, 0x76($s1) -/* C877A0 80241CF0 A602008E */ sh $v0, 0x8e($s0) -/* C877A4 80241CF4 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* C877A8 80241CF8 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* C877AC 80241CFC C60E0040 */ lwc1 $f14, 0x40($s0) -/* C877B0 80241D00 8C460028 */ lw $a2, 0x28($v0) -/* C877B4 80241D04 0C00A720 */ jal atan2 -/* C877B8 80241D08 8C470030 */ lw $a3, 0x30($v0) -/* C877BC 80241D0C 2402000D */ addiu $v0, $zero, 0xd -/* C877C0 80241D10 E600000C */ swc1 $f0, 0xc($s0) -/* C877C4 80241D14 AE420070 */ sw $v0, 0x70($s2) -/* C877C8 80241D18 8FBF001C */ lw $ra, 0x1c($sp) -/* C877CC 80241D1C 8FB20018 */ lw $s2, 0x18($sp) -/* C877D0 80241D20 8FB10014 */ lw $s1, 0x14($sp) -/* C877D4 80241D24 8FB00010 */ lw $s0, 0x10($sp) -/* C877D8 80241D28 03E00008 */ jr $ra -/* C877DC 80241D2C 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241FC8_C87A78.s b/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241FC8_C87A78.s deleted file mode 100644 index 53c1234703..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80241FC8_C87A78.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241FC8_C87A78 -/* C87A78 80241FC8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C87A7C 80241FCC AFB10014 */ sw $s1, 0x14($sp) -/* C87A80 80241FD0 0080882D */ daddu $s1, $a0, $zero -/* C87A84 80241FD4 AFBF0018 */ sw $ra, 0x18($sp) -/* C87A88 80241FD8 AFB00010 */ sw $s0, 0x10($sp) -/* C87A8C 80241FDC 8E300148 */ lw $s0, 0x148($s1) -/* C87A90 80241FE0 0C00EABB */ jal get_npc_unsafe -/* C87A94 80241FE4 86040008 */ lh $a0, 8($s0) -/* C87A98 80241FE8 0040202D */ daddu $a0, $v0, $zero -/* C87A9C 80241FEC 9482008E */ lhu $v0, 0x8e($a0) -/* C87AA0 80241FF0 24030003 */ addiu $v1, $zero, 3 -/* C87AA4 80241FF4 24420001 */ addiu $v0, $v0, 1 -/* C87AA8 80241FF8 A482008E */ sh $v0, 0x8e($a0) -/* C87AAC 80241FFC 00021400 */ sll $v0, $v0, 0x10 -/* C87AB0 80242000 00021403 */ sra $v0, $v0, 0x10 -/* C87AB4 80242004 14430003 */ bne $v0, $v1, .L80242014 -/* C87AB8 80242008 00000000 */ nop -/* C87ABC 8024200C 96020086 */ lhu $v0, 0x86($s0) -/* C87AC0 80242010 A48200A8 */ sh $v0, 0xa8($a0) -.L80242014: -/* C87AC4 80242014 8482008E */ lh $v0, 0x8e($a0) -/* C87AC8 80242018 8E030080 */ lw $v1, 0x80($s0) -/* C87ACC 8024201C 0043102A */ slt $v0, $v0, $v1 -/* C87AD0 80242020 14400004 */ bnez $v0, .L80242034 -/* C87AD4 80242024 00000000 */ nop -/* C87AD8 80242028 96020086 */ lhu $v0, 0x86($s0) -/* C87ADC 8024202C A48200A8 */ sh $v0, 0xa8($a0) -/* C87AE0 80242030 AE200070 */ sw $zero, 0x70($s1) -.L80242034: -/* C87AE4 80242034 8FBF0018 */ lw $ra, 0x18($sp) -/* C87AE8 80242038 8FB10014 */ lw $s1, 0x14($sp) -/* C87AEC 8024203C 8FB00010 */ lw $s0, 0x10($sp) -/* C87AF0 80242040 03E00008 */ jr $ra -/* C87AF4 80242044 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242048_C87AF8.s b/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242048_C87AF8.s index 865fdb1614..ff0ad8a540 100644 --- a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242048_C87AF8.s +++ b/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242048_C87AF8.s @@ -232,7 +232,7 @@ glabel func_80242048_C87AF8 .L80242398: /* C87E48 80242398 0260202D */ daddu $a0, $s3, $zero /* C87E4C 8024239C 0280282D */ daddu $a1, $s4, $zero -/* C87E50 802423A0 0C09072D */ jal func_80241CB4_C87764 +/* C87E50 802423A0 0C09072D */ jal SetNpcAnim /* C87E54 802423A4 02A0302D */ daddu $a2, $s5, $zero /* C87E58 802423A8 0260202D */ daddu $a0, $s3, $zero .L802423AC: @@ -250,7 +250,7 @@ glabel func_80242048_C87AF8 /* C87E84 802423D4 00000000 */ nop .L802423D8: /* C87E88 802423D8 0280282D */ daddu $a1, $s4, $zero -/* C87E8C 802423DC 0C0907F2 */ jal func_80241FC8_C87A78 +/* C87E8C 802423DC 0C0907F2 */ jal SetNpcColHeight /* C87E90 802423E0 02A0302D */ daddu $a2, $s5, $zero /* C87E94 802423E4 080908FD */ j .L802423F4 /* C87E98 802423E8 00000000 */ nop diff --git a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242488_C87F38.s b/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242488_C87F38.s deleted file mode 100644 index 10b027a330..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242488_C87F38.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242488_C87F38 -/* C87F38 80242488 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* C87F3C 8024248C AFBF0010 */ sw $ra, 0x10($sp) -/* C87F40 80242490 0C00EAD2 */ jal get_npc_safe -/* C87F44 80242494 8C84014C */ lw $a0, 0x14c($a0) -/* C87F48 80242498 0040182D */ daddu $v1, $v0, $zero -/* C87F4C 8024249C 846200A8 */ lh $v0, 0xa8($v1) -/* C87F50 802424A0 C462003C */ lwc1 $f2, 0x3c($v1) -/* C87F54 802424A4 906400A9 */ lbu $a0, 0xa9($v1) -/* C87F58 802424A8 44820000 */ mtc1 $v0, $f0 -/* C87F5C 802424AC 00000000 */ nop -/* C87F60 802424B0 46800020 */ cvt.s.w $f0, $f0 -/* C87F64 802424B4 46001081 */ sub.s $f2, $f2, $f0 -/* C87F68 802424B8 A06400AB */ sb $a0, 0xab($v1) -/* C87F6C 802424BC E462003C */ swc1 $f2, 0x3c($v1) -/* C87F70 802424C0 8FBF0010 */ lw $ra, 0x10($sp) -/* C87F74 802424C4 24020002 */ addiu $v0, $zero, 2 -/* C87F78 802424C8 03E00008 */ jr $ra -/* C87F7C 802424CC 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242528_C87FD8.s b/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242528_C87FD8.s deleted file mode 100644 index 023c8ab5d1..0000000000 --- a/asm/nonmatchings/world/area_kzn/kzn_17/C85DC0/func_80242528_C87FD8.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242528_C87FD8 -/* C87FD8 80242528 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* C87FDC 8024252C 0080102D */ daddu $v0, $a0, $zero -/* C87FE0 80242530 AFB00010 */ sw $s0, 0x10($sp) -/* C87FE4 80242534 AFBF0018 */ sw $ra, 0x18($sp) -/* C87FE8 80242538 AFB10014 */ sw $s1, 0x14($sp) -/* C87FEC 8024253C 8C44014C */ lw $a0, 0x14c($v0) -/* C87FF0 80242540 8C510148 */ lw $s1, 0x148($v0) -/* C87FF4 80242544 0C00EAD2 */ jal get_npc_safe -/* C87FF8 80242548 00A0802D */ daddu $s0, $a1, $zero -/* C87FFC 8024254C 56000001 */ bnel $s0, $zero, .L80242554 -/* C88000 80242550 A04000AB */ sb $zero, 0xab($v0) -.L80242554: -/* C88004 80242554 8C420000 */ lw $v0, ($v0) -/* C88008 80242558 30421000 */ andi $v0, $v0, 0x1000 -/* C8800C 8024255C 1040000A */ beqz $v0, .L80242588 -/* C88010 80242560 0000102D */ daddu $v0, $zero, $zero -/* C88014 80242564 82220004 */ lb $v0, 4($s1) -/* C88018 80242568 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* C8801C 8024256C 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* C88020 80242570 00021080 */ sll $v0, $v0, 2 -/* C88024 80242574 00431021 */ addu $v0, $v0, $v1 -/* C88028 80242578 8C440028 */ lw $a0, 0x28($v0) -/* C8802C 8024257C 9623006E */ lhu $v1, 0x6e($s1) -/* C88030 80242580 24020002 */ addiu $v0, $zero, 2 -/* C88034 80242584 A4830044 */ sh $v1, 0x44($a0) -.L80242588: -/* C88038 80242588 8FBF0018 */ lw $ra, 0x18($sp) -/* C8803C 8024258C 8FB10014 */ lw $s1, 0x14($sp) -/* C88040 80242590 8FB00010 */ lw $s0, 0x10($sp) -/* C88044 80242594 03E00008 */ jr $ra -/* C88048 80242598 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241960_88A530.s b/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241960_88A530.s deleted file mode 100644 index 491ffcf614..0000000000 --- a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241960_88A530.s +++ /dev/null @@ -1,35 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241960_88A530 -/* 88A530 80241960 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 88A534 80241964 AFB20018 */ sw $s2, 0x18($sp) -/* 88A538 80241968 0080902D */ daddu $s2, $a0, $zero -/* 88A53C 8024196C AFBF001C */ sw $ra, 0x1c($sp) -/* 88A540 80241970 AFB10014 */ sw $s1, 0x14($sp) -/* 88A544 80241974 AFB00010 */ sw $s0, 0x10($sp) -/* 88A548 80241978 8E510148 */ lw $s1, 0x148($s2) -/* 88A54C 8024197C 0C00EABB */ jal get_npc_unsafe -/* 88A550 80241980 86240008 */ lh $a0, 8($s1) -/* 88A554 80241984 0040802D */ daddu $s0, $v0, $zero -/* 88A558 80241988 8E2300CC */ lw $v1, 0xcc($s1) -/* 88A55C 8024198C C60C0038 */ lwc1 $f12, 0x38($s0) -/* 88A560 80241990 8C630020 */ lw $v1, 0x20($v1) -/* 88A564 80241994 AE030028 */ sw $v1, 0x28($s0) -/* 88A568 80241998 96220076 */ lhu $v0, 0x76($s1) -/* 88A56C 8024199C A602008E */ sh $v0, 0x8e($s0) -/* 88A570 802419A0 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) -/* 88A574 802419A4 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) -/* 88A578 802419A8 C60E0040 */ lwc1 $f14, 0x40($s0) -/* 88A57C 802419AC 8C460028 */ lw $a2, 0x28($v0) -/* 88A580 802419B0 0C00A720 */ jal atan2 -/* 88A584 802419B4 8C470030 */ lw $a3, 0x30($v0) -/* 88A588 802419B8 2402000D */ addiu $v0, $zero, 0xd -/* 88A58C 802419BC E600000C */ swc1 $f0, 0xc($s0) -/* 88A590 802419C0 AE420070 */ sw $v0, 0x70($s2) -/* 88A594 802419C4 8FBF001C */ lw $ra, 0x1c($sp) -/* 88A598 802419C8 8FB20018 */ lw $s2, 0x18($sp) -/* 88A59C 802419CC 8FB10014 */ lw $s1, 0x14($sp) -/* 88A5A0 802419D0 8FB00010 */ lw $s0, 0x10($sp) -/* 88A5A4 802419D4 03E00008 */ jr $ra -/* 88A5A8 802419D8 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241C74_88A844.s b/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241C74_88A844.s deleted file mode 100644 index c47a0500e0..0000000000 --- a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241C74_88A844.s +++ /dev/null @@ -1,38 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80241C74_88A844 -/* 88A844 80241C74 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 88A848 80241C78 AFB10014 */ sw $s1, 0x14($sp) -/* 88A84C 80241C7C 0080882D */ daddu $s1, $a0, $zero -/* 88A850 80241C80 AFBF0018 */ sw $ra, 0x18($sp) -/* 88A854 80241C84 AFB00010 */ sw $s0, 0x10($sp) -/* 88A858 80241C88 8E300148 */ lw $s0, 0x148($s1) -/* 88A85C 80241C8C 0C00EABB */ jal get_npc_unsafe -/* 88A860 80241C90 86040008 */ lh $a0, 8($s0) -/* 88A864 80241C94 0040202D */ daddu $a0, $v0, $zero -/* 88A868 80241C98 9482008E */ lhu $v0, 0x8e($a0) -/* 88A86C 80241C9C 24030003 */ addiu $v1, $zero, 3 -/* 88A870 80241CA0 24420001 */ addiu $v0, $v0, 1 -/* 88A874 80241CA4 A482008E */ sh $v0, 0x8e($a0) -/* 88A878 80241CA8 00021400 */ sll $v0, $v0, 0x10 -/* 88A87C 80241CAC 00021403 */ sra $v0, $v0, 0x10 -/* 88A880 80241CB0 14430003 */ bne $v0, $v1, .L80241CC0 -/* 88A884 80241CB4 00000000 */ nop -/* 88A888 80241CB8 96020086 */ lhu $v0, 0x86($s0) -/* 88A88C 80241CBC A48200A8 */ sh $v0, 0xa8($a0) -.L80241CC0: -/* 88A890 80241CC0 8482008E */ lh $v0, 0x8e($a0) -/* 88A894 80241CC4 8E030080 */ lw $v1, 0x80($s0) -/* 88A898 80241CC8 0043102A */ slt $v0, $v0, $v1 -/* 88A89C 80241CCC 14400004 */ bnez $v0, .L80241CE0 -/* 88A8A0 80241CD0 00000000 */ nop -/* 88A8A4 80241CD4 96020086 */ lhu $v0, 0x86($s0) -/* 88A8A8 80241CD8 A48200A8 */ sh $v0, 0xa8($a0) -/* 88A8AC 80241CDC AE200070 */ sw $zero, 0x70($s1) -.L80241CE0: -/* 88A8B0 80241CE0 8FBF0018 */ lw $ra, 0x18($sp) -/* 88A8B4 80241CE4 8FB10014 */ lw $s1, 0x14($sp) -/* 88A8B8 80241CE8 8FB00010 */ lw $s0, 0x10($sp) -/* 88A8BC 80241CEC 03E00008 */ jr $ra -/* 88A8C0 80241CF0 27BD0020 */ addiu $sp, $sp, 0x20 diff --git a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241CF4_88A8C4.s b/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241CF4_88A8C4.s index c46d3e9321..c5784d6642 100644 --- a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241CF4_88A8C4.s +++ b/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80241CF4_88A8C4.s @@ -232,7 +232,7 @@ glabel func_80241CF4_88A8C4 .L80242044: /* 88AC14 80242044 0260202D */ daddu $a0, $s3, $zero /* 88AC18 80242048 0280282D */ daddu $a1, $s4, $zero -/* 88AC1C 8024204C 0C090658 */ jal func_80241960_88A530 +/* 88AC1C 8024204C 0C090658 */ jal SetNpcAnim /* 88AC20 80242050 02A0302D */ daddu $a2, $s5, $zero /* 88AC24 80242054 0260202D */ daddu $a0, $s3, $zero .L80242058: @@ -250,7 +250,7 @@ glabel func_80241CF4_88A8C4 /* 88AC50 80242080 00000000 */ nop .L80242084: /* 88AC54 80242084 0280282D */ daddu $a1, $s4, $zero -/* 88AC58 80242088 0C09071D */ jal func_80241C74_88A844 +/* 88AC58 80242088 0C09071D */ jal SetNpcColHeight /* 88AC5C 8024208C 02A0302D */ daddu $a2, $s5, $zero /* 88AC60 80242090 08090828 */ j .L802420A0 /* 88AC64 80242094 00000000 */ nop diff --git a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80242134_88AD04.s b/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80242134_88AD04.s deleted file mode 100644 index 8bf176aa29..0000000000 --- a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_80242134_88AD04.s +++ /dev/null @@ -1,22 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_80242134_88AD04 -/* 88AD04 80242134 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 88AD08 80242138 AFBF0010 */ sw $ra, 0x10($sp) -/* 88AD0C 8024213C 0C00EAD2 */ jal get_npc_safe -/* 88AD10 80242140 8C84014C */ lw $a0, 0x14c($a0) -/* 88AD14 80242144 0040182D */ daddu $v1, $v0, $zero -/* 88AD18 80242148 846200A8 */ lh $v0, 0xa8($v1) -/* 88AD1C 8024214C C462003C */ lwc1 $f2, 0x3c($v1) -/* 88AD20 80242150 906400A9 */ lbu $a0, 0xa9($v1) -/* 88AD24 80242154 44820000 */ mtc1 $v0, $f0 -/* 88AD28 80242158 00000000 */ nop -/* 88AD2C 8024215C 46800020 */ cvt.s.w $f0, $f0 -/* 88AD30 80242160 46001081 */ sub.s $f2, $f2, $f0 -/* 88AD34 80242164 A06400AB */ sb $a0, 0xab($v1) -/* 88AD38 80242168 E462003C */ swc1 $f2, 0x3c($v1) -/* 88AD3C 8024216C 8FBF0010 */ lw $ra, 0x10($sp) -/* 88AD40 80242170 24020002 */ addiu $v0, $zero, 2 -/* 88AD44 80242174 03E00008 */ jr $ra -/* 88AD48 80242178 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_802421D4_88ADA4.s b/asm/nonmatchings/world/area_tik/tik_12/88A530/func_802421D4_88ADA4.s deleted file mode 100644 index 70c4561bb1..0000000000 --- a/asm/nonmatchings/world/area_tik/tik_12/88A530/func_802421D4_88ADA4.s +++ /dev/null @@ -1,37 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802421D4_88ADA4 -/* 88ADA4 802421D4 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 88ADA8 802421D8 0080102D */ daddu $v0, $a0, $zero -/* 88ADAC 802421DC AFB00010 */ sw $s0, 0x10($sp) -/* 88ADB0 802421E0 AFBF0018 */ sw $ra, 0x18($sp) -/* 88ADB4 802421E4 AFB10014 */ sw $s1, 0x14($sp) -/* 88ADB8 802421E8 8C44014C */ lw $a0, 0x14c($v0) -/* 88ADBC 802421EC 8C510148 */ lw $s1, 0x148($v0) -/* 88ADC0 802421F0 0C00EAD2 */ jal get_npc_safe -/* 88ADC4 802421F4 00A0802D */ daddu $s0, $a1, $zero -/* 88ADC8 802421F8 56000001 */ bnel $s0, $zero, .L80242200 -/* 88ADCC 802421FC A04000AB */ sb $zero, 0xab($v0) -.L80242200: -/* 88ADD0 80242200 8C420000 */ lw $v0, ($v0) -/* 88ADD4 80242204 30421000 */ andi $v0, $v0, 0x1000 -/* 88ADD8 80242208 1040000A */ beqz $v0, .L80242234 -/* 88ADDC 8024220C 0000102D */ daddu $v0, $zero, $zero -/* 88ADE0 80242210 82220004 */ lb $v0, 4($s1) -/* 88ADE4 80242214 3C03800B */ lui $v1, %hi(gCurrentEncounter) -/* 88ADE8 80242218 24630F10 */ addiu $v1, $v1, %lo(gCurrentEncounter) -/* 88ADEC 8024221C 00021080 */ sll $v0, $v0, 2 -/* 88ADF0 80242220 00431021 */ addu $v0, $v0, $v1 -/* 88ADF4 80242224 8C440028 */ lw $a0, 0x28($v0) -/* 88ADF8 80242228 9623006E */ lhu $v1, 0x6e($s1) -/* 88ADFC 8024222C 24020002 */ addiu $v0, $zero, 2 -/* 88AE00 80242230 A4830044 */ sh $v1, 0x44($a0) -.L80242234: -/* 88AE04 80242234 8FBF0018 */ lw $ra, 0x18($sp) -/* 88AE08 80242238 8FB10014 */ lw $s1, 0x14($sp) -/* 88AE0C 8024223C 8FB00010 */ lw $s0, 0x10($sp) -/* 88AE10 80242240 03E00008 */ jr $ra -/* 88AE14 80242244 27BD0020 */ addiu $sp, $sp, 0x20 -/* 88AE18 80242248 00000000 */ nop -/* 88AE1C 8024224C 00000000 */ nop diff --git a/include/common_structs.h b/include/common_structs.h index 56eb064d23..cd48b04654 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -112,7 +112,7 @@ typedef struct Npc { /* 0x0A6 */ s16 collisionRadius; /* 0x0A8 */ s16 collisionHeight; /* 0x0AA */ u8 renderMode; - /* 0x0AB */ char unk_AB; + /* 0x0AB */ u8 unk_AB; /* 0x0AC */ u8 unk_AC; /* 0x0AD */ char unk_AD[659]; } Npc; // size = 0x340 @@ -1133,7 +1133,6 @@ typedef struct Shop { typedef struct Encounter { /* 0x00 */ s32 count; /* 0x04 */ struct Enemy* enemy[16]; - /* 0x08 */ char unk_08[60]; /* 0x44 */ s16 battle; /* 0x46 */ s16 stage; /* 0x48 */ s16 encounterID; diff --git a/include/map.h b/include/map.h index 594850b6f6..c3c7a748b7 100644 --- a/include/map.h +++ b/include/map.h @@ -164,7 +164,7 @@ typedef struct StaticNPC { typedef struct Enemy { /* 0x00 */ s32 flags; - /* 0x04 */ u8 encounterIndex; + /* 0x04 */ s8 encounterIndex; /* 0x05 */ s8 encountered; /* 0x06 */ u8 scriptGroup; /* scripts launched for this npc controller will be assigned this group */ /* 0x07 */ s8 unk_07; diff --git a/src/world/area_isk/isk_04/97B670.c b/src/world/area_isk/isk_04/97B670.c index 1ccd3dc443..f84c4e0852 100644 --- a/src/world/area_isk/isk_04/97B670.c +++ b/src/world/area_isk/isk_04/97B670.c @@ -1,17 +1,13 @@ #include "isk_04.h" -INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_80240040_97B670); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_802400BC_97B6EC); INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_802401F0_97B820); -INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_80240354_97B984); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_802403D4_97BA04); -INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_80240814_97BE44); - #include "world/common/AwaitPlayerNearNpc.inc.c" - -INCLUDE_ASM(s32, "world/area_isk/isk_04/97B670", func_802408B4_97BEE4); diff --git a/src/world/area_isk/isk_08/984E30.c b/src/world/area_isk/isk_08/984E30.c index 0dea0b2b9d..3b53b11670 100644 --- a/src/world/area_isk/isk_08/984E30.c +++ b/src/world/area_isk/isk_08/984E30.c @@ -1,17 +1,13 @@ #include "isk_08.h" -INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_80240000_984E30); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_8024007C_984EAC); INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_802401B0_984FE0); -INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_80240314_985144); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_80240394_9851C4); -INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_802407D4_985604); - #include "world/common/AwaitPlayerNearNpc.inc.c" - -INCLUDE_ASM(s32, "world/area_isk/isk_08/984E30", func_80240874_9856A4); diff --git a/src/world/area_isk/isk_18/997F70.c b/src/world/area_isk/isk_18/997F70.c index 03ef180f32..34044c86db 100644 --- a/src/world/area_isk/isk_18/997F70.c +++ b/src/world/area_isk/isk_18/997F70.c @@ -1,17 +1,13 @@ #include "isk_18.h" -INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_80240000_997F70); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_8024007C_997FEC); INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_802401B0_998120); -INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_80240314_998284); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_80240394_998304); -INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_802407D4_998744); - #include "world/common/AwaitPlayerNearNpc.inc.c" - -INCLUDE_ASM(s32, "world/area_isk/isk_18/997F70", func_80240874_9987E4); diff --git a/src/world/area_kpa/kpa_01/A470C0.c b/src/world/area_kpa/kpa_01/A470C0.c index a691a0598e..f69868e5cb 100644 --- a/src/world/area_kpa/kpa_01/A470C0.c +++ b/src/world/area_kpa/kpa_01/A470C0.c @@ -1,17 +1,13 @@ #include "kpa_01.h" -INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_80240160_A470C0); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_802401DC_A4713C); INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_80240310_A47270); -INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_80240474_A473D4); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_802404F4_A47454); -INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_80240934_A47894); - #include "world/common/AwaitPlayerNearNpc.inc.c" - -INCLUDE_ASM(s32, "world/area_kpa/kpa_01/A470C0", func_802409D4_A47934); diff --git a/src/world/area_kpa/kpa_03/A48720.c b/src/world/area_kpa/kpa_03/A48720.c index 2ab59a2946..5c3747a354 100644 --- a/src/world/area_kpa/kpa_03/A48720.c +++ b/src/world/area_kpa/kpa_03/A48720.c @@ -1,21 +1,17 @@ #include "kpa_03.h" -INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_80240160_A48720); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_802401DC_A4879C); INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_80240310_A488D0); -INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_80240474_A48A34); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_802404F4_A48AB4); -INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_80240934_A48EF4); - #include "world/common/AwaitPlayerNearNpc.inc.c" -INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_802409D4_A48F94); - INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_80240A48_A49008); INCLUDE_ASM(s32, "world/area_kpa/kpa_03/A48720", func_80240C18_A491D8); diff --git a/src/world/area_kpa/kpa_113/A9CC70.c b/src/world/area_kpa/kpa_113/A9CC70.c index c2a044a1a6..4a7659245e 100644 --- a/src/world/area_kpa/kpa_113/A9CC70.c +++ b/src/world/area_kpa/kpa_113/A9CC70.c @@ -4,18 +4,14 @@ INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_80240040_A9CC70); INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_802400FC_A9CD2C); -INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_802401B0_A9CDE0); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_8024022C_A9CE5C); INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_80240360_A9CF90); -INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_802404C4_A9D0F4); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_80240544_A9D174); -INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_80240984_A9D5B4); - #include "world/common/AwaitPlayerNearNpc.inc.c" - -INCLUDE_ASM(s32, "world/area_kpa/kpa_113/A9CC70", func_80240A24_A9D654); diff --git a/src/world/area_kzn/kzn_03/C61020.c b/src/world/area_kzn/kzn_03/C61020.c index 9432e9365e..78069a256b 100644 --- a/src/world/area_kzn/kzn_03/C61020.c +++ b/src/world/area_kzn/kzn_03/C61020.c @@ -1,21 +1,17 @@ #include "kzn_03.h" -INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80240310_C61020); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024038C_C6109C); INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_802404C0_C611D0); -INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80240624_C61334); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_802406A4_C613B4); -INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80240AE4_C617F4); - #include "world/common/AwaitPlayerNearNpc.inc.c" -INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80240B84_C61894); - INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80240BF8_C61908); INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80240C64_C61974); diff --git a/src/world/area_kzn/kzn_09/C77D00.c b/src/world/area_kzn/kzn_09/C77D00.c index ad7d3c35b7..abde17040d 100644 --- a/src/world/area_kzn/kzn_09/C77D00.c +++ b/src/world/area_kzn/kzn_09/C77D00.c @@ -30,22 +30,18 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242688_C79368); INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242774_C79454); -INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802429C4_C796A4); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242A40_C79720); INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242B74_C79854); -INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242CD8_C799B8); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242D58_C79A38); -INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243198_C79E78); - #include "world/common/AwaitPlayerNearNpc.inc.c" -INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243238_C79F18); - INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802432AC_C79F8C); #include "world/common/GetItemName.inc.c" diff --git a/src/world/area_kzn/kzn_17/C85DC0.c b/src/world/area_kzn/kzn_17/C85DC0.c index e0ab3349c5..bc00789bf8 100644 --- a/src/world/area_kzn/kzn_17/C85DC0.c +++ b/src/world/area_kzn/kzn_17/C85DC0.c @@ -30,22 +30,18 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241978_C87428); INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241A64_C87514); -INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241CB4_C87764); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241D30_C877E0); INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241E64_C87914); -INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241FC8_C87A78); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242048_C87AF8); -INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242488_C87F38); - #include "world/common/AwaitPlayerNearNpc.inc.c" -INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242528_C87FD8); - INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024259C_C8804C); #include "world/common/GetItemName.inc.c" diff --git a/src/world/area_tik/tik_12/88A530.c b/src/world/area_tik/tik_12/88A530.c index 29ae2fe4d7..fb58f2626d 100644 --- a/src/world/area_tik/tik_12/88A530.c +++ b/src/world/area_tik/tik_12/88A530.c @@ -1,17 +1,13 @@ #include "tik_12.h" -INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_80241960_88A530); +#include "world/common/SetNpcAnim.inc.c" INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_802419DC_88A5AC); INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_80241B10_88A6E0); -INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_80241C74_88A844); +#include "world/common/SetNpcColHeight.inc.c" INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_80241CF4_88A8C4); -INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_80242134_88AD04); - #include "world/common/AwaitPlayerNearNpc.inc.c" - -INCLUDE_ASM(s32, "world/area_tik/tik_12/88A530", func_802421D4_88ADA4); diff --git a/src/world/common/AwaitPlayerNearNpc.inc.c b/src/world/common/AwaitPlayerNearNpc.inc.c index 4e238f36b6..a6fcc89b31 100644 --- a/src/world/common/AwaitPlayerNearNpc.inc.c +++ b/src/world/common/AwaitPlayerNearNpc.inc.c @@ -1,5 +1,14 @@ #include "common.h" +static ApiStatus func_80240814_97BE44(ScriptInstance* script, s32 isInitialCall) { + Npc* npc = get_npc_safe(script->owner2.npcID); + + npc->unk_AB = npc->collisionHeight; + npc->pos.y -= (f32) npc->collisionHeight; + + return ApiStatus_DONE2; +} + static ApiStatus AwaitPlayerNearNpc(ScriptInstance* script, s32 isInitialCall) { PlayerStatus* playerStatus = PLAYER_STATUS; Npc* npc = get_npc_safe(script->owner2.npcID); @@ -7,5 +16,23 @@ static ApiStatus AwaitPlayerNearNpc(ScriptInstance* script, s32 isInitialCall) { if (dist2D(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) < 50.0f) { return ApiStatus_DONE2; } + + return ApiStatus_BLOCK; +} + +static ApiStatus func_802408B4_97BEE4(ScriptInstance* script, s32 isInitialCall) { + EncounterStatus* currentEncounter = &gCurrentEncounter; + Enemy* enemy = script->owner1.enemy; + Npc* npc = get_npc_safe(script->owner2.npcID); + + if (isInitialCall != 0) { + npc->unk_AB = 0; + } + + if (npc->flags & 0x1000) { + currentEncounter->enounterList[enemy->encounterIndex]->battle = (u16) enemy->varTable[0]; + return ApiStatus_DONE2; + } + return ApiStatus_BLOCK; } diff --git a/src/world/common/SetNpcAnim.inc.c b/src/world/common/SetNpcAnim.inc.c new file mode 100644 index 0000000000..43bf9dd06d --- /dev/null +++ b/src/world/common/SetNpcAnim.inc.c @@ -0,0 +1,11 @@ +#include "common.h" + +static void SetNpcAnim(ScriptInstance* script) { + Enemy* enemy = script->owner1.enemy; + Npc* npc = get_npc_unsafe(enemy->npcID); + + npc->currentAnim = enemy->animList[8]; + npc->duration = enemy->varTable[2]; + npc->yaw = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); + script->functionTemp[0].s = 13; +} diff --git a/src/world/common/SetNpcColHeight.inc.c b/src/world/common/SetNpcColHeight.inc.c new file mode 100644 index 0000000000..672c0bc88f --- /dev/null +++ b/src/world/common/SetNpcColHeight.inc.c @@ -0,0 +1,17 @@ +#include "common.h" + +static void SetNpcColHeight(ScriptInstance* script) { + Enemy* enemy = script->owner1.enemy; + Npc* npc = get_npc_unsafe(enemy->npcID); + + if (npc->duration++ == 2) { + npc->collisionHeight = enemy->varTable[6]; + } + + if (npc->duration < enemy->varTable[5]) { + return; + } + + npc->collisionHeight = enemy->varTable[6]; + script->functionTemp[0].s = 0; +}