From b8637848931a2e88cc5dfc73e70823e255ab1d09 Mon Sep 17 00:00:00 2001 From: Liam Nobel Date: Sat, 27 Mar 2021 16:14:38 -0400 Subject: [PATCH] EnMu OK (#722) * Commit Before Draw Decomp * Closer EnMu_Draw * Matched draw function * EnMu Matching with OK * Removed ASM * EnMu OK * Implemented pull request changes as of 2020/03/16 * Reverted header * Split increment and switched 0s to NULLs --- .../overlays/actors/ovl_En_Mu/EnMu_Destroy.s | 9 - .../overlays/actors/ovl_En_Mu/EnMu_Draw.s | 124 ---------- .../overlays/actors/ovl_En_Mu/EnMu_Init.s | 59 ----- .../overlays/actors/ovl_En_Mu/EnMu_Update.s | 85 ------- .../overlays/actors/ovl_En_Mu/func_80AB0420.s | 3 - .../overlays/actors/ovl_En_Mu/func_80AB0428.s | 93 -------- .../overlays/actors/ovl_En_Mu/func_80AB0584.s | 19 -- .../overlays/actors/ovl_En_Mu/func_80AB05C4.s | 46 ---- .../overlays/actors/ovl_En_Mu/func_80AB0724.s | 15 -- .../overlays/actors/ovl_En_Mu/func_80AB08A4.s | 65 ------ .../overlays/actors/ovl_En_Mu/func_80AB0994.s | 6 - .../overlays/actors/ovl_En_Mu/func_80AB09A8.s | 29 --- data/overlays/actors/z_en_mu.data.s | 30 --- data/overlays/actors/z_en_mu.reloc.s | 13 -- spec | 3 +- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 216 +++++++++++++++--- src/overlays/actors/ovl_En_Mu/z_en_mu.h | 10 +- 17 files changed, 191 insertions(+), 634 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0420.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0428.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0584.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB05C4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0724.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB08A4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0994.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB09A8.s delete mode 100644 data/overlays/actors/z_en_mu.data.s delete mode 100644 data/overlays/actors/z_en_mu.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Destroy.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Destroy.s deleted file mode 100644 index 495dee13cf..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Destroy.s +++ /dev/null @@ -1,9 +0,0 @@ -glabel EnMu_Destroy -/* 002E4 80AB0704 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 002E8 80AB0708 AFBF0014 */ sw $ra, 0x0014($sp) -/* 002EC 80AB070C 0C0295BC */ jal SkelAnime_Free -/* 002F0 80AB0710 2484014C */ addiu $a0, $a0, 0x014C ## $a0 = 0000014C -/* 002F4 80AB0714 8FBF0014 */ lw $ra, 0x0014($sp) -/* 002F8 80AB0718 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 002FC 80AB071C 03E00008 */ jr $ra -/* 00300 80AB0720 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Draw.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Draw.s deleted file mode 100644 index 8a18705862..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Draw.s +++ /dev/null @@ -1,124 +0,0 @@ -.rdata -glabel D_80AB0C70 - .asciz "../z_en_mu.c" - .balign 4 - -glabel D_80AB0C80 - .asciz "../z_en_mu.c" - .balign 4 - -.text -glabel EnMu_Draw -/* 005F4 80AB0A14 27BDFF50 */ addiu $sp, $sp, 0xFF50 ## $sp = FFFFFF50 -/* 005F8 80AB0A18 AFB70044 */ sw $s7, 0x0044($sp) -/* 005FC 80AB0A1C 3C0E80AB */ lui $t6, %hi(D_80AB0C38) ## $t6 = 80AB0000 -/* 00600 80AB0A20 27B70084 */ addiu $s7, $sp, 0x0084 ## $s7 = FFFFFFD4 -/* 00604 80AB0A24 AFBE0048 */ sw $s8, 0x0048($sp) -/* 00608 80AB0A28 AFB60040 */ sw $s6, 0x0040($sp) -/* 0060C 80AB0A2C 25CE0C38 */ addiu $t6, $t6, %lo(D_80AB0C38) ## $t6 = 80AB0C38 -/* 00610 80AB0A30 0080B025 */ or $s6, $a0, $zero ## $s6 = 00000000 -/* 00614 80AB0A34 00A0F025 */ or $s8, $a1, $zero ## $s8 = 00000000 -/* 00618 80AB0A38 AFBF004C */ sw $ra, 0x004C($sp) -/* 0061C 80AB0A3C AFB5003C */ sw $s5, 0x003C($sp) -/* 00620 80AB0A40 AFB40038 */ sw $s4, 0x0038($sp) -/* 00624 80AB0A44 AFB30034 */ sw $s3, 0x0034($sp) -/* 00628 80AB0A48 AFB20030 */ sw $s2, 0x0030($sp) -/* 0062C 80AB0A4C AFB1002C */ sw $s1, 0x002C($sp) -/* 00630 80AB0A50 AFB00028 */ sw $s0, 0x0028($sp) -/* 00634 80AB0A54 25C80024 */ addiu $t0, $t6, 0x0024 ## $t0 = 80AB0C5C -/* 00638 80AB0A58 02E0C825 */ or $t9, $s7, $zero ## $t9 = FFFFFFD4 -.L80AB0A5C: -/* 0063C 80AB0A5C 8DD80000 */ lw $t8, 0x0000($t6) ## 80AB0C38 -/* 00640 80AB0A60 25CE000C */ addiu $t6, $t6, 0x000C ## $t6 = 80AB0C44 -/* 00644 80AB0A64 2739000C */ addiu $t9, $t9, 0x000C ## $t9 = FFFFFFE0 -/* 00648 80AB0A68 AF38FFF4 */ sw $t8, -0x000C($t9) ## FFFFFFD4 -/* 0064C 80AB0A6C 8DCFFFF8 */ lw $t7, -0x0008($t6) ## 80AB0C3C -/* 00650 80AB0A70 AF2FFFF8 */ sw $t7, -0x0008($t9) ## FFFFFFD8 -/* 00654 80AB0A74 8DD8FFFC */ lw $t8, -0x0004($t6) ## 80AB0C40 -/* 00658 80AB0A78 15C8FFF8 */ bne $t6, $t0, .L80AB0A5C -/* 0065C 80AB0A7C AF38FFFC */ sw $t8, -0x0004($t9) ## FFFFFFDC -/* 00660 80AB0A80 8DD80000 */ lw $t8, 0x0000($t6) ## 80AB0C44 -/* 00664 80AB0A84 3C0A80AB */ lui $t2, %hi(D_80AB0C60) ## $t2 = 80AB0000 -/* 00668 80AB0A88 254A0C60 */ addiu $t2, $t2, %lo(D_80AB0C60) ## $t2 = 80AB0C60 -/* 0066C 80AB0A8C AF380000 */ sw $t8, 0x0000($t9) ## FFFFFFE0 -/* 00670 80AB0A90 8D4C0000 */ lw $t4, 0x0000($t2) ## 80AB0C60 -/* 00674 80AB0A94 27A9007C */ addiu $t1, $sp, 0x007C ## $t1 = FFFFFFCC -/* 00678 80AB0A98 3C0680AB */ lui $a2, %hi(D_80AB0C70) ## $a2 = 80AB0000 -/* 0067C 80AB0A9C AD2C0000 */ sw $t4, 0x0000($t1) ## FFFFFFCC -/* 00680 80AB0AA0 914C0004 */ lbu $t4, 0x0004($t2) ## 80AB0C64 -/* 00684 80AB0AA4 24C60C70 */ addiu $a2, $a2, %lo(D_80AB0C70) ## $a2 = 80AB0C70 -/* 00688 80AB0AA8 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFB4 -/* 0068C 80AB0AAC A12C0004 */ sb $t4, 0x0004($t1) ## FFFFFFD0 -/* 00690 80AB0AB0 8FC50000 */ lw $a1, 0x0000($s8) ## 00000000 -/* 00694 80AB0AB4 24070202 */ addiu $a3, $zero, 0x0202 ## $a3 = 00000202 -/* 00698 80AB0AB8 0C031AB1 */ jal Graph_OpenDisps -/* 0069C 80AB0ABC 00A09825 */ or $s3, $a1, $zero ## $s3 = 00000000 -/* 006A0 80AB0AC0 3C01C496 */ lui $at, 0xC496 ## $at = C4960000 -/* 006A4 80AB0AC4 44816000 */ mtc1 $at, $f12 ## $f12 = -1200.00 -/* 006A8 80AB0AC8 44807000 */ mtc1 $zero, $f14 ## $f14 = 0.00 -/* 006AC 80AB0ACC 3C06C4AF */ lui $a2, 0xC4AF ## $a2 = C4AF0000 -/* 006B0 80AB0AD0 0C034261 */ jal Matrix_Translate -/* 006B4 80AB0AD4 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 006B8 80AB0AD8 27B1007C */ addiu $s1, $sp, 0x007C ## $s1 = FFFFFFCC -/* 006BC 80AB0ADC 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -/* 006C0 80AB0AE0 24150014 */ addiu $s5, $zero, 0x0014 ## $s5 = 00000014 -/* 006C4 80AB0AE4 3C14DB06 */ lui $s4, 0xDB06 ## $s4 = DB060000 -.L80AB0AE8: -/* 006C8 80AB0AE8 8E7202C0 */ lw $s2, 0x02C0($s3) ## 000002C0 -/* 006CC 80AB0AEC 264D0008 */ addiu $t5, $s2, 0x0008 ## $t5 = 00000008 -/* 006D0 80AB0AF0 AE6D02C0 */ sw $t5, 0x02C0($s3) ## 000002C0 -/* 006D4 80AB0AF4 92280000 */ lbu $t0, 0x0000($s1) ## FFFFFFCC -/* 006D8 80AB0AF8 00087080 */ sll $t6, $t0, 2 -/* 006DC 80AB0AFC 31D9FFFF */ andi $t9, $t6, 0xFFFF ## $t9 = 00000000 -/* 006E0 80AB0B00 03347825 */ or $t7, $t9, $s4 ## $t7 = DB060000 -/* 006E4 80AB0B04 AE4F0000 */ sw $t7, 0x0000($s2) ## 00000000 -/* 006E8 80AB0B08 86D8001C */ lh $t8, 0x001C($s6) ## 0000001C -/* 006EC 80AB0B0C 8FC40000 */ lw $a0, 0x0000($s8) ## 00000000 -/* 006F0 80AB0B10 00184880 */ sll $t1, $t8, 2 -/* 006F4 80AB0B14 01384821 */ addu $t1, $t1, $t8 -/* 006F8 80AB0B18 00094880 */ sll $t1, $t1, 2 -/* 006FC 80AB0B1C 02E95021 */ addu $t2, $s7, $t1 -/* 00700 80AB0B20 01501021 */ addu $v0, $t2, $s0 -/* 00704 80AB0B24 904B0003 */ lbu $t3, 0x0003($v0) ## 00000003 -/* 00708 80AB0B28 90450000 */ lbu $a1, 0x0000($v0) ## 00000000 -/* 0070C 80AB0B2C 90460001 */ lbu $a2, 0x0001($v0) ## 00000001 -/* 00710 80AB0B30 90470002 */ lbu $a3, 0x0002($v0) ## 00000002 -/* 00714 80AB0B34 0C2AC26A */ jal func_80AB09A8 -/* 00718 80AB0B38 AFAB0010 */ sw $t3, 0x0010($sp) -/* 0071C 80AB0B3C 26100004 */ addiu $s0, $s0, 0x0004 ## $s0 = 00000004 -/* 00720 80AB0B40 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = FFFFFFCD -/* 00724 80AB0B44 1615FFE8 */ bne $s0, $s5, .L80AB0AE8 -/* 00728 80AB0B48 AE420004 */ sw $v0, 0x0004($s2) ## 00000004 -/* 0072C 80AB0B4C 8EC50150 */ lw $a1, 0x0150($s6) ## 00000150 -/* 00730 80AB0B50 8EC6016C */ lw $a2, 0x016C($s6) ## 0000016C -/* 00734 80AB0B54 92C7014E */ lbu $a3, 0x014E($s6) ## 0000014E -/* 00738 80AB0B58 3C0C80AB */ lui $t4, %hi(func_80AB08A4) ## $t4 = 80AB0000 -/* 0073C 80AB0B5C 3C0D80AB */ lui $t5, %hi(func_80AB0994) ## $t5 = 80AB0000 -/* 00740 80AB0B60 25AD0994 */ addiu $t5, $t5, %lo(func_80AB0994) ## $t5 = 80AB0994 -/* 00744 80AB0B64 258C08A4 */ addiu $t4, $t4, %lo(func_80AB08A4) ## $t4 = 80AB08A4 -/* 00748 80AB0B68 AFAC0010 */ sw $t4, 0x0010($sp) -/* 0074C 80AB0B6C AFAD0014 */ sw $t5, 0x0014($sp) -/* 00750 80AB0B70 AFB60018 */ sw $s6, 0x0018($sp) -/* 00754 80AB0B74 0C0286B2 */ jal SkelAnime_DrawFlexOpa -/* 00758 80AB0B78 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000 -/* 0075C 80AB0B7C 3C0680AB */ lui $a2, %hi(D_80AB0C80) ## $a2 = 80AB0000 -/* 00760 80AB0B80 24C60C80 */ addiu $a2, $a2, %lo(D_80AB0C80) ## $a2 = 80AB0C80 -/* 00764 80AB0B84 27A40064 */ addiu $a0, $sp, 0x0064 ## $a0 = FFFFFFB4 -/* 00768 80AB0B88 8FC50000 */ lw $a1, 0x0000($s8) ## 00000000 -/* 0076C 80AB0B8C 0C031AD5 */ jal Graph_CloseDisps -/* 00770 80AB0B90 24070216 */ addiu $a3, $zero, 0x0216 ## $a3 = 00000216 -/* 00774 80AB0B94 8FBF004C */ lw $ra, 0x004C($sp) -/* 00778 80AB0B98 8FB00028 */ lw $s0, 0x0028($sp) -/* 0077C 80AB0B9C 8FB1002C */ lw $s1, 0x002C($sp) -/* 00780 80AB0BA0 8FB20030 */ lw $s2, 0x0030($sp) -/* 00784 80AB0BA4 8FB30034 */ lw $s3, 0x0034($sp) -/* 00788 80AB0BA8 8FB40038 */ lw $s4, 0x0038($sp) -/* 0078C 80AB0BAC 8FB5003C */ lw $s5, 0x003C($sp) -/* 00790 80AB0BB0 8FB60040 */ lw $s6, 0x0040($sp) -/* 00794 80AB0BB4 8FB70044 */ lw $s7, 0x0044($sp) -/* 00798 80AB0BB8 8FBE0048 */ lw $s8, 0x0048($sp) -/* 0079C 80AB0BBC 03E00008 */ jr $ra -/* 007A0 80AB0BC0 27BD00B0 */ addiu $sp, $sp, 0x00B0 ## $sp = 00000000 -/* 007A4 80AB0BC4 00000000 */ nop -/* 007A8 80AB0BC8 00000000 */ nop -/* 007AC 80AB0BCC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Init.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Init.s deleted file mode 100644 index a8350f6f97..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Init.s +++ /dev/null @@ -1,59 +0,0 @@ -glabel EnMu_Init -/* 0020C 80AB062C 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 00210 80AB0630 AFB00028 */ sw $s0, 0x0028($sp) -/* 00214 80AB0634 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00218 80AB0638 AFBF002C */ sw $ra, 0x002C($sp) -/* 0021C 80AB063C AFA50044 */ sw $a1, 0x0044($sp) -/* 00220 80AB0640 3C068003 */ lui $a2, %hi(ActorShadow_DrawCircle) -/* 00224 80AB0644 24C6B5EC */ addiu $a2, %lo(ActorShadow_DrawCircle) -/* 00228 80AB0648 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 0022C 80AB064C 248400B4 */ addiu $a0, $a0, 0x00B4 ## $a0 = 000000B4 -/* 00230 80AB0650 0C00AC78 */ jal ActorShape_Init - -/* 00234 80AB0654 3C074320 */ lui $a3, 0x4320 ## $a3 = 43200000 -/* 00238 80AB0658 3C060600 */ lui $a2, %hi(D_06004F70) ## $a2 = 06000000 -/* 0023C 80AB065C 3C070600 */ lui $a3, %hi(D_060003F4) ## $a3 = 06000000 -/* 00240 80AB0660 24E703F4 */ addiu $a3, $a3, %lo(D_060003F4) ## $a3 = 060003F4 -/* 00244 80AB0664 24C64F70 */ addiu $a2, $a2, %lo(D_06004F70) ## $a2 = 06004F70 -/* 00248 80AB0668 8FA40044 */ lw $a0, 0x0044($sp) -/* 0024C 80AB066C 2605014C */ addiu $a1, $s0, 0x014C ## $a1 = 0000014C -/* 00250 80AB0670 AFA00010 */ sw $zero, 0x0010($sp) -/* 00254 80AB0674 AFA00014 */ sw $zero, 0x0014($sp) -/* 00258 80AB0678 0C0291BE */ jal SkelAnime_InitFlex -/* 0025C 80AB067C AFA00018 */ sw $zero, 0x0018($sp) -/* 00260 80AB0680 26050194 */ addiu $a1, $s0, 0x0194 ## $a1 = 00000194 -/* 00264 80AB0684 AFA50034 */ sw $a1, 0x0034($sp) -/* 00268 80AB0688 0C0170D9 */ jal Collider_InitCylinder - -/* 0026C 80AB068C 8FA40044 */ lw $a0, 0x0044($sp) -/* 00270 80AB0690 3C0780AB */ lui $a3, %hi(D_80AB0BD0) ## $a3 = 80AB0000 -/* 00274 80AB0694 8FA50034 */ lw $a1, 0x0034($sp) -/* 00278 80AB0698 24E70BD0 */ addiu $a3, $a3, %lo(D_80AB0BD0) ## $a3 = 80AB0BD0 -/* 0027C 80AB069C 8FA40044 */ lw $a0, 0x0044($sp) -/* 00280 80AB06A0 0C01712B */ jal Collider_SetCylinder - -/* 00284 80AB06A4 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00288 80AB06A8 3C0680AB */ lui $a2, %hi(D_80AB0BFC) ## $a2 = 80AB0000 -/* 0028C 80AB06AC 24C60BFC */ addiu $a2, $a2, %lo(D_80AB0BFC) ## $a2 = 80AB0BFC -/* 00290 80AB06B0 26040098 */ addiu $a0, $s0, 0x0098 ## $a0 = 00000098 -/* 00294 80AB06B4 0C0187BF */ jal CollisionCheck_SetInfo2 -/* 00298 80AB06B8 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 0029C 80AB06BC 240E0006 */ addiu $t6, $zero, 0x0006 ## $t6 = 00000006 -/* 002A0 80AB06C0 3C053C23 */ lui $a1, 0x3C23 ## $a1 = 3C230000 -/* 002A4 80AB06C4 A20E001F */ sb $t6, 0x001F($s0) ## 0000001F -/* 002A8 80AB06C8 34A5D70A */ ori $a1, $a1, 0xD70A ## $a1 = 3C23D70A -/* 002AC 80AB06CC 0C00B58B */ jal Actor_SetScale - -/* 002B0 80AB06D0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002B4 80AB06D4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002B8 80AB06D8 0C2AC10A */ jal func_80AB0428 -/* 002BC 80AB06DC 8FA50044 */ lw $a1, 0x0044($sp) -/* 002C0 80AB06E0 3C0580AB */ lui $a1, %hi(func_80AB0724) ## $a1 = 80AB0000 -/* 002C4 80AB06E4 24A50724 */ addiu $a1, $a1, %lo(func_80AB0724) ## $a1 = 80AB0724 -/* 002C8 80AB06E8 0C2AC108 */ jal func_80AB0420 -/* 002CC 80AB06EC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002D0 80AB06F0 8FBF002C */ lw $ra, 0x002C($sp) -/* 002D4 80AB06F4 8FB00028 */ lw $s0, 0x0028($sp) -/* 002D8 80AB06F8 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 002DC 80AB06FC 03E00008 */ jr $ra -/* 002E0 80AB0700 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Update.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Update.s deleted file mode 100644 index ea45eb6a94..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Update.s +++ /dev/null @@ -1,85 +0,0 @@ -glabel EnMu_Update -/* 0033C 80AB075C 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 00340 80AB0760 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00344 80AB0764 AFB10020 */ sw $s1, 0x0020($sp) -/* 00348 80AB0768 AFB0001C */ sw $s0, 0x001C($sp) -/* 0034C 80AB076C C4840024 */ lwc1 $f4, 0x0024($a0) ## 00000024 -/* 00350 80AB0770 27AA002C */ addiu $t2, $sp, 0x002C ## $t2 = FFFFFFEC -/* 00354 80AB0774 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00358 80AB0778 4600218D */ trunc.w.s $f6, $f4 -/* 0035C 80AB077C 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00360 80AB0780 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00364 80AB0784 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00368 80AB0788 440F3000 */ mfc1 $t7, $f6 -/* 0036C 80AB078C 26060194 */ addiu $a2, $s0, 0x0194 ## $a2 = 00000194 -/* 00370 80AB0790 A7AF002C */ sh $t7, 0x002C($sp) -/* 00374 80AB0794 C4880028 */ lwc1 $f8, 0x0028($a0) ## 00000028 -/* 00378 80AB0798 4600428D */ trunc.w.s $f10, $f8 -/* 0037C 80AB079C 44195000 */ mfc1 $t9, $f10 -/* 00380 80AB07A0 00000000 */ nop -/* 00384 80AB07A4 A7B9002E */ sh $t9, 0x002E($sp) -/* 00388 80AB07A8 C490002C */ lwc1 $f16, 0x002C($a0) ## 0000002C -/* 0038C 80AB07AC 4600848D */ trunc.w.s $f18, $f16 -/* 00390 80AB07B0 44099000 */ mfc1 $t1, $f18 -/* 00394 80AB07B4 00000000 */ nop -/* 00398 80AB07B8 A7A90030 */ sh $t1, 0x0030($sp) -/* 0039C 80AB07BC 8D4C0000 */ lw $t4, 0x0000($t2) ## FFFFFFEC -/* 003A0 80AB07C0 A88C01DA */ swl $t4, 0x01DA($a0) ## 000001DA -/* 003A4 80AB07C4 B88C01DD */ swr $t4, 0x01DD($a0) ## 000001DD -/* 003A8 80AB07C8 954C0004 */ lhu $t4, 0x0004($t2) ## FFFFFFF0 -/* 003AC 80AB07CC A48C01DE */ sh $t4, 0x01DE($a0) ## 000001DE -/* 003B0 80AB07D0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 003B4 80AB07D4 0C017713 */ jal CollisionCheck_SetOC - ## CollisionCheck_setOC -/* 003B8 80AB07D8 00A12821 */ addu $a1, $a1, $at -/* 003BC 80AB07DC 0C02927F */ jal SkelAnime_Update - -/* 003C0 80AB07E0 2604014C */ addiu $a0, $s0, 0x014C ## $a0 = 0000014C -/* 003C4 80AB07E4 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 003C8 80AB07E8 240D0004 */ addiu $t5, $zero, 0x0004 ## $t5 = 00000004 -/* 003CC 80AB07EC AFAD0014 */ sw $t5, 0x0014($sp) -/* 003D0 80AB07F0 44060000 */ mfc1 $a2, $f0 -/* 003D4 80AB07F4 44070000 */ mfc1 $a3, $f0 -/* 003D8 80AB07F8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 003DC 80AB07FC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 003E0 80AB0800 0C00B92D */ jal Actor_UpdateBgCheckInfo -/* 003E4 80AB0804 E7A00010 */ swc1 $f0, 0x0010($sp) -/* 003E8 80AB0808 8E190190 */ lw $t9, 0x0190($s0) ## 00000190 -/* 003EC 80AB080C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003F0 80AB0810 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 003F4 80AB0814 0320F809 */ jalr $ra, $t9 -/* 003F8 80AB0818 00000000 */ nop -/* 003FC 80AB081C 860E01D4 */ lh $t6, 0x01D4($s0) ## 000001D4 -/* 00400 80AB0820 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00404 80AB0824 44814000 */ mtc1 $at, $f8 ## $f8 = 30.00 -/* 00408 80AB0828 448E2000 */ mtc1 $t6, $f4 ## $f4 = 0.00 -/* 0040C 80AB082C 3C0F80AB */ lui $t7, %hi(func_80AB0584) ## $t7 = 80AB0000 -/* 00410 80AB0830 3C1880AB */ lui $t8, %hi(func_80AB05C4) ## $t8 = 80AB0000 -/* 00414 80AB0834 468021A0 */ cvt.s.w $f6, $f4 -/* 00418 80AB0838 271805C4 */ addiu $t8, $t8, %lo(func_80AB05C4) ## $t8 = 80AB05C4 -/* 0041C 80AB083C 25EF0584 */ addiu $t7, $t7, %lo(func_80AB0584) ## $t7 = 80AB0584 -/* 00420 80AB0840 AFAF0010 */ sw $t7, 0x0010($sp) -/* 00424 80AB0844 AFB80014 */ sw $t8, 0x0014($sp) -/* 00428 80AB0848 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0042C 80AB084C 46083000 */ add.s $f0, $f6, $f8 -/* 00430 80AB0850 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00434 80AB0854 260601E0 */ addiu $a2, $s0, 0x01E0 ## $a2 = 000001E0 -/* 00438 80AB0858 44070000 */ mfc1 $a3, $f0 -/* 0043C 80AB085C 0C00D0F3 */ jal func_800343CC -/* 00440 80AB0860 00000000 */ nop -/* 00444 80AB0864 8E080028 */ lw $t0, 0x0028($s0) ## 00000028 -/* 00448 80AB0868 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 0044C 80AB086C 8E090024 */ lw $t1, 0x0024($s0) ## 00000024 -/* 00450 80AB0870 AE08003C */ sw $t0, 0x003C($s0) ## 0000003C -/* 00454 80AB0874 C60A003C */ lwc1 $f10, 0x003C($s0) ## 0000003C -/* 00458 80AB0878 44818000 */ mtc1 $at, $f16 ## $f16 = 60.00 -/* 0045C 80AB087C AE090038 */ sw $t1, 0x0038($s0) ## 00000038 -/* 00460 80AB0880 8E09002C */ lw $t1, 0x002C($s0) ## 0000002C -/* 00464 80AB0884 46105480 */ add.s $f18, $f10, $f16 -/* 00468 80AB0888 AE090040 */ sw $t1, 0x0040($s0) ## 00000040 -/* 0046C 80AB088C E612003C */ swc1 $f18, 0x003C($s0) ## 0000003C -/* 00470 80AB0890 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00474 80AB0894 8FB10020 */ lw $s1, 0x0020($sp) -/* 00478 80AB0898 8FB0001C */ lw $s0, 0x001C($sp) -/* 0047C 80AB089C 03E00008 */ jr $ra -/* 00480 80AB08A0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0420.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0420.s deleted file mode 100644 index 79974c7b98..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0420.s +++ /dev/null @@ -1,3 +0,0 @@ -glabel func_80AB0420 -/* 00000 80AB0420 03E00008 */ jr $ra -/* 00004 80AB0424 AC850190 */ sw $a1, 0x0190($a0) ## 00000190 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0428.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0428.s deleted file mode 100644 index 413a32b98a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0428.s +++ /dev/null @@ -1,93 +0,0 @@ -glabel func_80AB0428 -/* 00008 80AB0428 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 -/* 0000C 80AB042C 3C0F80AB */ lui $t7, %hi(D_80AB0C28) ## $t7 = 80AB0000 -/* 00010 80AB0430 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00014 80AB0434 AFA40038 */ sw $a0, 0x0038($sp) -/* 00018 80AB0438 AFA5003C */ sw $a1, 0x003C($sp) -/* 0001C 80AB043C 25EF0C28 */ addiu $t7, $t7, %lo(D_80AB0C28) ## $t7 = 80AB0C28 -/* 00020 80AB0440 8DF90000 */ lw $t9, 0x0000($t7) ## 80AB0C28 -/* 00024 80AB0444 27AE0030 */ addiu $t6, $sp, 0x0030 ## $t6 = FFFFFFF8 -/* 00028 80AB0448 3C0B80AB */ lui $t3, %hi(D_80AB0C30) ## $t3 = 80AB0000 -/* 0002C 80AB044C ADD90000 */ sw $t9, 0x0000($t6) ## FFFFFFF8 -/* 00030 80AB0450 91F90004 */ lbu $t9, 0x0004($t7) ## 80AB0C2C -/* 00034 80AB0454 256B0C30 */ addiu $t3, $t3, %lo(D_80AB0C30) ## $t3 = 80AB0C30 -/* 00038 80AB0458 3C088016 */ lui $t0, %hi(gSaveContext) -/* 0003C 80AB045C A1D90004 */ sb $t9, 0x0004($t6) ## FFFFFFFC -/* 00040 80AB0460 8D6D0000 */ lw $t5, 0x0000($t3) ## 80AB0C30 -/* 00044 80AB0464 2508E660 */ addiu $t0, %lo(gSaveContext) -/* 00048 80AB0468 27A70028 */ addiu $a3, $sp, 0x0028 ## $a3 = FFFFFFF0 -/* 0004C 80AB046C 950213FE */ lhu $v0, 0x13FE($t0) ## 8015FA5E -/* 00050 80AB0470 ACED0000 */ sw $t5, 0x0000($a3) ## FFFFFFF0 -/* 00054 80AB0474 916D0004 */ lbu $t5, 0x0004($t3) ## 80AB0C34 -/* 00058 80AB0478 3046001F */ andi $a2, $v0, 0x001F ## $a2 = 00000000 -/* 0005C 80AB047C 304EFFE0 */ andi $t6, $v0, 0xFFE0 ## $t6 = 00000000 -/* 00060 80AB0480 A0ED0004 */ sb $t5, 0x0004($a3) ## FFFFFFF4 -/* 00064 80AB0484 A50E13FE */ sh $t6, 0x13FE($t0) ## 8015FA5E -/* 00068 80AB0488 0C03F66B */ jal Rand_ZeroOne - ## Rand.Next() float -/* 0006C 80AB048C A3A60027 */ sb $a2, 0x0027($sp) -/* 00070 80AB0490 3C0140A0 */ lui $at, 0x40A0 ## $at = 40A00000 -/* 00074 80AB0494 44812000 */ mtc1 $at, $f4 ## $f4 = 5.00 -/* 00078 80AB0498 8FB9003C */ lw $t9, 0x003C($sp) -/* 0007C 80AB049C 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 00080 80AB04A0 46040182 */ mul.s $f6, $f0, $f4 -/* 00084 80AB04A4 8F2B009C */ lw $t3, 0x009C($t9) ## 0000009C -/* 00088 80AB04A8 3C088016 */ lui $t0, %hi(gSaveContext) -/* 0008C 80AB04AC 2508E660 */ addiu $t0, %lo(gSaveContext) -/* 00090 80AB04B0 93A50027 */ lbu $a1, 0x0027($sp) -/* 00094 80AB04B4 27A70028 */ addiu $a3, $sp, 0x0028 ## $a3 = FFFFFFF0 -/* 00098 80AB04B8 8FA90038 */ lw $t1, 0x0038($sp) -/* 0009C 80AB04BC 4600320D */ trunc.w.s $f8, $f6 -/* 000A0 80AB04C0 27AA0030 */ addiu $t2, $sp, 0x0030 ## $t2 = FFFFFFF8 -/* 000A4 80AB04C4 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -/* 000A8 80AB04C8 24040005 */ addiu $a0, $zero, 0x0005 ## $a0 = 00000005 -/* 000AC 80AB04CC 44184000 */ mfc1 $t8, $f8 -/* 000B0 80AB04D0 00000000 */ nop -/* 000B4 80AB04D4 030B1021 */ addu $v0, $t8, $t3 -/* 000B8 80AB04D8 0041001B */ divu $zero, $v0, $at -/* 000BC 80AB04DC 00001010 */ mfhi $v0 -/* 000C0 80AB04E0 00000000 */ nop -/* 000C4 80AB04E4 00000000 */ nop -/* 000C8 80AB04E8 00E26021 */ addu $t4, $a3, $v0 -.L80AB04EC: -/* 000CC 80AB04EC 918D0000 */ lbu $t5, 0x0000($t4) ## 00000000 -/* 000D0 80AB04F0 01A57024 */ and $t6, $t5, $a1 -/* 000D4 80AB04F4 11C00008 */ beq $t6, $zero, .L80AB0518 -/* 000D8 80AB04F8 00000000 */ nop -/* 000DC 80AB04FC 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001 -/* 000E0 80AB0500 28410005 */ slti $at, $v0, 0x0005 -/* 000E4 80AB0504 14200002 */ bne $at, $zero, .L80AB0510 -/* 000E8 80AB0508 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000001 -/* 000EC 80AB050C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80AB0510: -/* 000F0 80AB0510 5464FFF6 */ bnel $v1, $a0, .L80AB04EC -/* 000F4 80AB0514 00E26021 */ addu $t4, $a3, $v0 -.L80AB0518: -/* 000F8 80AB0518 1464000C */ bne $v1, $a0, .L80AB054C -/* 000FC 80AB051C 0142C821 */ addu $t9, $t2, $v0 -/* 00100 80AB0520 93380000 */ lbu $t8, 0x0000($t9) ## 00000000 -/* 00104 80AB0524 952F0208 */ lhu $t7, 0x0208($t1) ## 00000208 -/* 00108 80AB0528 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 0010C 80AB052C 370B7000 */ ori $t3, $t8, 0x7000 ## $t3 = 00007000 -/* 00110 80AB0530 15EB0006 */ bne $t7, $t3, .L80AB054C -/* 00114 80AB0534 00000000 */ nop -/* 00118 80AB0538 24420001 */ addiu $v0, $v0, 0x0001 ## $v0 = 00000001 -/* 0011C 80AB053C 28410005 */ slti $at, $v0, 0x0005 -/* 00120 80AB0540 14200002 */ bne $at, $zero, .L80AB054C -/* 00124 80AB0544 00000000 */ nop -/* 00128 80AB0548 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80AB054C: -/* 0012C 80AB054C 01427021 */ addu $t6, $t2, $v0 -/* 00130 80AB0550 91D90000 */ lbu $t9, 0x0000($t6) ## 00000000 -/* 00134 80AB0554 00E26021 */ addu $t4, $a3, $v0 -/* 00138 80AB0558 918D0000 */ lbu $t5, 0x0000($t4) ## 00000000 -/* 0013C 80AB055C 37387000 */ ori $t8, $t9, 0x7000 ## $t8 = 00007000 -/* 00140 80AB0560 A5380208 */ sh $t8, 0x0208($t1) ## 00000208 -/* 00144 80AB0564 950F13FE */ lhu $t7, 0x13FE($t0) ## 8015FA5E -/* 00148 80AB0568 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0014C 80AB056C 00AD3025 */ or $a2, $a1, $t5 ## $a2 = 00000000 -/* 00150 80AB0570 30C600FF */ andi $a2, $a2, 0x00FF ## $a2 = 00000000 -/* 00154 80AB0574 01E65825 */ or $t3, $t7, $a2 ## $t3 = 00000000 -/* 00158 80AB0578 A50B13FE */ sh $t3, 0x13FE($t0) ## 8015FA5E -/* 0015C 80AB057C 03E00008 */ jr $ra -/* 00160 80AB0580 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0584.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0584.s deleted file mode 100644 index 659c4b34e3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0584.s +++ /dev/null @@ -1,19 +0,0 @@ -glabel func_80AB0584 -/* 00164 80AB0584 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00168 80AB0588 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0016C 80AB058C AFA5001C */ sw $a1, 0x001C($sp) -/* 00170 80AB0590 84A5001C */ lh $a1, 0x001C($a1) ## 0000001C -/* 00174 80AB0594 0C01B0D8 */ jal Text_GetFaceReaction -/* 00178 80AB0598 24A5003A */ addiu $a1, $a1, 0x003A ## $a1 = 0000003A -/* 0017C 80AB059C 10400003 */ beq $v0, $zero, .L80AB05AC -/* 00180 80AB05A0 3043FFFF */ andi $v1, $v0, 0xFFFF ## $v1 = 00000000 -/* 00184 80AB05A4 10000003 */ beq $zero, $zero, .L80AB05B4 -/* 00188 80AB05A8 00601025 */ or $v0, $v1, $zero ## $v0 = 00000000 -.L80AB05AC: -/* 0018C 80AB05AC 8FAF001C */ lw $t7, 0x001C($sp) -/* 00190 80AB05B0 95E20208 */ lhu $v0, 0x0208($t7) ## 00000208 -.L80AB05B4: -/* 00194 80AB05B4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00198 80AB05B8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0019C 80AB05BC 03E00008 */ jr $ra -/* 001A0 80AB05C0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB05C4.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB05C4.s deleted file mode 100644 index 8ef991db25..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB05C4.s +++ /dev/null @@ -1,46 +0,0 @@ -.late_rodata -.late_rodata_alignment 8 -glabel jtbl_80AB0C90 -.word L80AB05FC -.word L80AB05FC -.word L80AB0604 -.word L80AB05FC -.word L80AB05FC -.word L80AB05FC -.word L80AB05FC -.word L80AB05FC -.word L80AB05FC -.word L80AB05FC - -.text -glabel func_80AB05C4 -/* 001A4 80AB05C4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 001A8 80AB05C8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 001AC 80AB05CC AFA40018 */ sw $a0, 0x0018($sp) -/* 001B0 80AB05D0 AFA5001C */ sw $a1, 0x001C($sp) -/* 001B4 80AB05D4 0C042F6F */ jal func_8010BDBC -/* 001B8 80AB05D8 248420D8 */ addiu $a0, $a0, 0x20D8 ## $a0 = 000020D8 -/* 001BC 80AB05DC 2C41000A */ sltiu $at, $v0, 0x000A -/* 001C0 80AB05E0 1020000D */ beq $at, $zero, .L80AB0618 -/* 001C4 80AB05E4 00027080 */ sll $t6, $v0, 2 -/* 001C8 80AB05E8 3C0180AB */ lui $at, %hi(jtbl_80AB0C90) ## $at = 80AB0000 -/* 001CC 80AB05EC 002E0821 */ addu $at, $at, $t6 -/* 001D0 80AB05F0 8C2E0C90 */ lw $t6, %lo(jtbl_80AB0C90)($at) -/* 001D4 80AB05F4 01C00008 */ jr $t6 -/* 001D8 80AB05F8 00000000 */ nop -glabel L80AB05FC -/* 001DC 80AB05FC 10000007 */ beq $zero, $zero, .L80AB061C -/* 001E0 80AB0600 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -glabel L80AB0604 -/* 001E4 80AB0604 8FA4001C */ lw $a0, 0x001C($sp) -/* 001E8 80AB0608 0C2AC10A */ jal func_80AB0428 -/* 001EC 80AB060C 8FA50018 */ lw $a1, 0x0018($sp) -/* 001F0 80AB0610 10000002 */ beq $zero, $zero, .L80AB061C -/* 001F4 80AB0614 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80AB0618: -/* 001F8 80AB0618 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L80AB061C: -/* 001FC 80AB061C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00200 80AB0620 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00204 80AB0624 03E00008 */ jr $ra -/* 00208 80AB0628 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0724.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0724.s deleted file mode 100644 index 77633208f6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0724.s +++ /dev/null @@ -1,15 +0,0 @@ -glabel func_80AB0724 -/* 00304 80AB0724 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00308 80AB0728 AFA40018 */ sw $a0, 0x0018($sp) -/* 0030C 80AB072C 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00310 80AB0730 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00314 80AB0734 AFA5001C */ sw $a1, 0x001C($sp) -/* 00318 80AB0738 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 0031C 80AB073C 24070010 */ addiu $a3, $zero, 0x0010 ## $a3 = 00000010 -/* 00320 80AB0740 25C5020A */ addiu $a1, $t6, 0x020A ## $a1 = 0000020A -/* 00324 80AB0744 0C00D3D5 */ jal func_80034F54 -/* 00328 80AB0748 25C6022A */ addiu $a2, $t6, 0x022A ## $a2 = 0000022A -/* 0032C 80AB074C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00330 80AB0750 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00334 80AB0754 03E00008 */ jr $ra -/* 00338 80AB0758 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB08A4.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB08A4.s deleted file mode 100644 index 90a87dadf7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB08A4.s +++ /dev/null @@ -1,65 +0,0 @@ -glabel func_80AB08A4 -/* 00484 80AB08A4 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00488 80AB08A8 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 0048C 80AB08AC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00490 80AB08B0 AFA40028 */ sw $a0, 0x0028($sp) -/* 00494 80AB08B4 AFA60030 */ sw $a2, 0x0030($sp) -/* 00498 80AB08B8 10A1000E */ beq $a1, $at, .L80AB08F4 -/* 0049C 80AB08BC AFA70034 */ sw $a3, 0x0034($sp) -/* 004A0 80AB08C0 24010006 */ addiu $at, $zero, 0x0006 ## $at = 00000006 -/* 004A4 80AB08C4 10A1000B */ beq $a1, $at, .L80AB08F4 -/* 004A8 80AB08C8 24010007 */ addiu $at, $zero, 0x0007 ## $at = 00000007 -/* 004AC 80AB08CC 10A10009 */ beq $a1, $at, .L80AB08F4 -/* 004B0 80AB08D0 2401000B */ addiu $at, $zero, 0x000B ## $at = 0000000B -/* 004B4 80AB08D4 10A10007 */ beq $a1, $at, .L80AB08F4 -/* 004B8 80AB08D8 2401000C */ addiu $at, $zero, 0x000C ## $at = 0000000C -/* 004BC 80AB08DC 10A10005 */ beq $a1, $at, .L80AB08F4 -/* 004C0 80AB08E0 2401000D */ addiu $at, $zero, 0x000D ## $at = 0000000D -/* 004C4 80AB08E4 10A10003 */ beq $a1, $at, .L80AB08F4 -/* 004C8 80AB08E8 2401000E */ addiu $at, $zero, 0x000E ## $at = 0000000E -/* 004CC 80AB08EC 54A10025 */ bnel $a1, $at, .L80AB0984 -/* 004D0 80AB08F0 8FBF0014 */ lw $ra, 0x0014($sp) -.L80AB08F4: -/* 004D4 80AB08F4 8FAE003C */ lw $t6, 0x003C($sp) -/* 004D8 80AB08F8 00057840 */ sll $t7, $a1, 1 -/* 004DC 80AB08FC 01CF1821 */ addu $v1, $t6, $t7 -/* 004E0 80AB0900 8464020A */ lh $a0, 0x020A($v1) ## 0000020A -/* 004E4 80AB0904 0C01DE1C */ jal Math_SinS - ## sins? -/* 004E8 80AB0908 AFA3001C */ sw $v1, 0x001C($sp) -/* 004EC 80AB090C 8FA20038 */ lw $v0, 0x0038($sp) -/* 004F0 80AB0910 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 004F4 80AB0914 44814000 */ mtc1 $at, $f8 ## $f8 = 200.00 -/* 004F8 80AB0918 84580002 */ lh $t8, 0x0002($v0) ## 00000002 -/* 004FC 80AB091C 8FA3001C */ lw $v1, 0x001C($sp) -/* 00500 80AB0920 46080282 */ mul.s $f10, $f0, $f8 -/* 00504 80AB0924 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00 -/* 00508 80AB0928 00000000 */ nop -/* 0050C 80AB092C 468021A0 */ cvt.s.w $f6, $f4 -/* 00510 80AB0930 460A3400 */ add.s $f16, $f6, $f10 -/* 00514 80AB0934 4600848D */ trunc.w.s $f18, $f16 -/* 00518 80AB0938 44089000 */ mfc1 $t0, $f18 -/* 0051C 80AB093C 00000000 */ nop -/* 00520 80AB0940 A4480002 */ sh $t0, 0x0002($v0) ## 00000002 -/* 00524 80AB0944 0C01DE0D */ jal Math_CosS - ## coss? -/* 00528 80AB0948 8464022A */ lh $a0, 0x022A($v1) ## 0000022A -/* 0052C 80AB094C 8FA20038 */ lw $v0, 0x0038($sp) -/* 00530 80AB0950 3C014348 */ lui $at, 0x4348 ## $at = 43480000 -/* 00534 80AB0954 44813000 */ mtc1 $at, $f6 ## $f6 = 200.00 -/* 00538 80AB0958 84490004 */ lh $t1, 0x0004($v0) ## 00000004 -/* 0053C 80AB095C 46060282 */ mul.s $f10, $f0, $f6 -/* 00540 80AB0960 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00 -/* 00544 80AB0964 00000000 */ nop -/* 00548 80AB0968 46802220 */ cvt.s.w $f8, $f4 -/* 0054C 80AB096C 460A4400 */ add.s $f16, $f8, $f10 -/* 00550 80AB0970 4600848D */ trunc.w.s $f18, $f16 -/* 00554 80AB0974 440B9000 */ mfc1 $t3, $f18 -/* 00558 80AB0978 00000000 */ nop -/* 0055C 80AB097C A44B0004 */ sh $t3, 0x0004($v0) ## 00000004 -/* 00560 80AB0980 8FBF0014 */ lw $ra, 0x0014($sp) -.L80AB0984: -/* 00564 80AB0984 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00568 80AB0988 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 0056C 80AB098C 03E00008 */ jr $ra -/* 00570 80AB0990 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0994.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0994.s deleted file mode 100644 index 87ecce9188..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0994.s +++ /dev/null @@ -1,6 +0,0 @@ -glabel func_80AB0994 -/* 00574 80AB0994 AFA40000 */ sw $a0, 0x0000($sp) -/* 00578 80AB0998 AFA50004 */ sw $a1, 0x0004($sp) -/* 0057C 80AB099C AFA60008 */ sw $a2, 0x0008($sp) -/* 00580 80AB09A0 03E00008 */ jr $ra -/* 00584 80AB09A4 AFA7000C */ sw $a3, 0x000C($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB09A8.s b/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB09A8.s deleted file mode 100644 index 783a41938c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB09A8.s +++ /dev/null @@ -1,29 +0,0 @@ -glabel func_80AB09A8 -/* 00588 80AB09A8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0058C 80AB09AC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00590 80AB09B0 AFA5001C */ sw $a1, 0x001C($sp) -/* 00594 80AB09B4 AFA60020 */ sw $a2, 0x0020($sp) -/* 00598 80AB09B8 AFA70024 */ sw $a3, 0x0024($sp) -/* 0059C 80AB09BC 0C031A73 */ jal Graph_Alloc - -/* 005A0 80AB09C0 24050010 */ addiu $a1, $zero, 0x0010 ## $a1 = 00000010 -/* 005A4 80AB09C4 3C0EFB00 */ lui $t6, 0xFB00 ## $t6 = FB000000 -/* 005A8 80AB09C8 AC4E0000 */ sw $t6, 0x0000($v0) ## 00000000 -/* 005AC 80AB09CC 93A90023 */ lbu $t1, 0x0023($sp) -/* 005B0 80AB09D0 93B8001F */ lbu $t8, 0x001F($sp) -/* 005B4 80AB09D4 93AD0027 */ lbu $t5, 0x0027($sp) -/* 005B8 80AB09D8 93A8002B */ lbu $t0, 0x002B($sp) -/* 005BC 80AB09DC 00095400 */ sll $t2, $t1, 16 -/* 005C0 80AB09E0 0018CE00 */ sll $t9, $t8, 24 -/* 005C4 80AB09E4 032A5825 */ or $t3, $t9, $t2 ## $t3 = 00000000 -/* 005C8 80AB09E8 000D7200 */ sll $t6, $t5, 8 -/* 005CC 80AB09EC 016E7825 */ or $t7, $t3, $t6 ## $t7 = FB000000 -/* 005D0 80AB09F0 3C19DF00 */ lui $t9, 0xDF00 ## $t9 = DF000000 -/* 005D4 80AB09F4 01E84825 */ or $t1, $t7, $t0 ## $t1 = FB000000 -/* 005D8 80AB09F8 AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 005DC 80AB09FC AC590008 */ sw $t9, 0x0008($v0) ## 00000008 -/* 005E0 80AB0A00 AC40000C */ sw $zero, 0x000C($v0) ## 0000000C -/* 005E4 80AB0A04 8FBF0014 */ lw $ra, 0x0014($sp) -/* 005E8 80AB0A08 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 005EC 80AB0A0C 03E00008 */ jr $ra -/* 005F0 80AB0A10 00000000 */ nop diff --git a/data/overlays/actors/z_en_mu.data.s b/data/overlays/actors/z_en_mu.data.s deleted file mode 100644 index 3aa16920df..0000000000 --- a/data/overlays/actors/z_en_mu.data.s +++ /dev/null @@ -1,30 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel D_80AB0BD0 - .word 0x0A000039, 0x20010000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000100, 0x00640046, 0x00000000, 0x00000000 -glabel D_80AB0BFC - .word 0x00000000, 0x00000000, 0xFF000000 -glabel En_Mu_InitVars - .word 0x01AD0400, 0x00000009, 0x01820000, 0x0000024C -.word EnMu_Init -.word EnMu_Destroy -.word EnMu_Update -.word EnMu_Draw -glabel D_80AB0C28 - .word 0x42433F41, 0x3E000000 -glabel D_80AB0C30 - .word 0x01020408, 0x10000000 -glabel D_80AB0C38 - .word 0x6482EB00, 0xA0FA3C00, 0x5A3C1400, 0x1EF0C800, 0x8C461400, 0x8C461400, 0x1EF0C800, 0x5A3C1400, 0xA0FA3C00, 0x6482EB00 -glabel D_80AB0C60 - .word 0x08090A0B, 0x0C000000, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_en_mu.reloc.s b/data/overlays/actors/z_en_mu.reloc.s deleted file mode 100644 index a88ae1770a..0000000000 --- a/data/overlays/actors/z_en_mu.reloc.s +++ /dev/null @@ -1,13 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .rodata - -.balign 16 - -glabel D_80AB0CC0 - .incbin "baserom/ovl_En_Mu", 0x8A0, 0x000000D0 diff --git a/spec b/spec index 59f3314f92..fba783df16 100644 --- a/spec +++ b/spec @@ -2668,8 +2668,7 @@ endseg beginseg name "ovl_En_Mu" include "build/src/overlays/actors/ovl_En_Mu/z_en_mu.o" - include "build/data/overlays/actors/z_en_mu.data.o" - include "build/data/overlays/actors/z_en_mu.reloc.o" + include "build/src/overlays/actors/ovl_En_Mu/ovl_En_Mu_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c index fec3a81f3c..49b1f46b50 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -9,21 +9,11 @@ void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMu_Update(Actor* thisx, GlobalContext* globalCtx); void EnMu_Draw(Actor* thisx, GlobalContext* globalCtx); -extern UNK_TYPE D_060003F4; -extern UNK_TYPE D_06004F70; +void EnMu_Pose(Actor* this, GlobalContext* globalCtx); +s32 EnMu_CheckDialogState(GlobalContext* globalCtx, EnMu* this); -/* -const ActorInit En_Mu_InitVars = { - ACTOR_EN_MU, - ACTORCAT_NPC, - FLAGS, - OBJECT_MU, - sizeof(EnMu), - (ActorFunc)EnMu_Init, - (ActorFunc)EnMu_Destroy, - (ActorFunc)EnMu_Update, - (ActorFunc)EnMu_Draw, -}; +extern AnimationHeader D_060003F4; +extern FlexSkeletonHeader D_06004F70; static ColliderCylinderInit D_80AB0BD0 = { { @@ -44,27 +34,183 @@ static ColliderCylinderInit D_80AB0BD0 = { }, { 100, 70, 0, { 0, 0, 0 } }, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0420.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0428.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0584.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB05C4.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Destroy.s") +CollisionCheckInfoInit2 D_80AB0BFC = { 0, 0, 0, 0, MASS_IMMOVABLE }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0724.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Update.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB08A4.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB0994.s") - -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/func_80AB09A8.s") +const ActorInit En_Mu_InitVars = { + ACTOR_EN_MU, + ACTORCAT_NPC, + FLAGS, + OBJECT_MU, + sizeof(EnMu), + (ActorFunc)EnMu_Init, + (ActorFunc)EnMu_Destroy, + (ActorFunc)EnMu_Update, + (ActorFunc)EnMu_Draw, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Mu/EnMu_Draw.s") +void EnMu_SetupAction(EnMu* this, EnMuActionFunc actionFunc) { + this->actionFunc = actionFunc; +} + +void EnMu_Interact(EnMu* this, GlobalContext* globalCtx) { + u8 textIdOffset[] = { 0x42, 0x43, 0x3F, 0x41, 0x3E }; + u8 bitmask[] = { 0x01, 0x02, 0x04, 0x08, 0x10 }; + u8 textFlags; + s32 randomIndex; + s32 i; + + textFlags = gSaveContext.eventInf[2] & 0x1F; + gSaveContext.eventInf[2] &= ~0x1F; + randomIndex = (globalCtx->state.frames + (s32)(Rand_ZeroOne() * 5.0f)) % 5; + + for (i = 0; i < 5; i++) { + + if (!(textFlags & bitmask[randomIndex])) { + break; + } + + randomIndex++; + if (randomIndex >= 5) { + randomIndex = 0; + } + } + + if (i == 5) { + if (this->defFaceReaction == (textIdOffset[randomIndex] | 0x7000)) { + randomIndex++; + if (randomIndex >= 5) { + randomIndex = 0; + } + } + textFlags = 0; + } + + textFlags |= bitmask[randomIndex]; + this->defFaceReaction = textIdOffset[randomIndex] | 0x7000; + textFlags &= 0xFF; + gSaveContext.eventInf[2] |= textFlags; +} + +u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) { + EnMu* this = THIS; + u16 faceReaction = Text_GetFaceReaction(globalCtx, this->actor.params + 0x3A); + + if (faceReaction != 0) { + return faceReaction; + } + return this->defFaceReaction; +} + +s32 EnMu_CheckDialogState(GlobalContext* globalCtx, EnMu* this) { + switch (func_8010BDBC(&globalCtx->msgCtx)) { + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + return 1; + case 2: + EnMu_Interact(this, globalCtx); + return 0; + default: + return 1; + } +} + +void EnMu_Init(Actor* thisx, GlobalContext* globalCtx) { + s32 pad; + EnMu* this = THIS; + + ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 160.0f); + SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06004F70, &D_060003F4, NULL, NULL, 0); + Collider_InitCylinder(globalCtx, &this->collider); + Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &D_80AB0BD0); + CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &D_80AB0BFC); + this->actor.targetMode = 6; + Actor_SetScale(&this->actor, 0.01f); + EnMu_Interact(this, globalCtx); + EnMu_SetupAction(this, EnMu_Pose); +} + +void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx) { + EnMu* this = THIS; + SkelAnime_Free(&this->skelAnime, globalCtx); +} + +void EnMu_Pose(Actor* thisx, GlobalContext* globalCtx) { + EnMu* this = THIS; + func_80034F54(globalCtx, &this->unk_20A, &this->unk_22A, 16); +} + +void EnMu_Update(Actor* thisx, GlobalContext* globalCtx) { + EnMu* this = THIS; + s32 pad; + f32 talkDist; + Vec3s pos; + + pos.x = this->actor.world.pos.x; + pos.y = this->actor.world.pos.y; + pos.z = this->actor.world.pos.z; + + this->collider.dim.pos = pos; + + CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider); + SkelAnime_Update(&this->skelAnime); + Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4); + this->actionFunc(this, globalCtx); + talkDist = this->collider.dim.radius + 30.0f; + func_800343CC(globalCtx, this, &this->dialogState, talkDist, EnMu_GetFaceReaction, EnMu_CheckDialogState); + + this->actor.focus.pos = this->actor.world.pos; + this->actor.focus.pos.y += 60.0f; +} + +s32 EnMu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { + EnMu* this = THIS; + if ((limbIndex == 5) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 11) || (limbIndex == 12) || + (limbIndex == 13) || (limbIndex == 14)) { + rot->y += Math_SinS(this->unk_20A[limbIndex]) * 200.0f; + rot->z += Math_CosS(this->unk_22A[limbIndex]) * 200.0f; + } + return false; +} + +void EnMu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { +} + +Gfx* EnMu_DisplayListSetColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) { + Gfx* dlist; + dlist = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx)); + gDPSetEnvColor(dlist, r, g, b, a); + gSPEndDisplayList(dlist + 1); + return dlist; +} + +void EnMu_Draw(Actor* thisx, GlobalContext* globalCtx) { + EnMu* this = THIS; + + // 2 sets of 5 colors for each actor in town with different colors + Color_RGBA8 colors[2][5] = { + { { 100, 130, 235, 0 }, { 160, 250, 60, 0 }, { 90, 60, 20, 0 }, { 30, 240, 200, 0 }, { 140, 70, 20, 0 } }, + { { 140, 70, 20, 0 }, { 30, 240, 200, 0 }, { 90, 60, 20, 0 }, { 160, 250, 60, 0 }, { 100, 130, 235, 0 } } + }; + u8 segmentId[] = { 0x08, 0x09, 0x0A, 0x0B, 0x0C }; + s32 i; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mu.c", 514); + Matrix_Translate(-1200.0f, 0.0f, -1400.0f, MTXMODE_APPLY); + for (i = 0; i < 5; i++) { + gSPSegment(POLY_OPA_DISP++, segmentId[i], + EnMu_DisplayListSetColor(globalCtx->state.gfxCtx, colors[this->actor.params][i].r, + colors[this->actor.params][i].g, colors[this->actor.params][i].b, + colors[this->actor.params][i].a)); + } + SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, + EnMu_OverrideLimbDraw, EnMu_PostLimbDraw, this); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_mu.c", 534); +} diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.h b/src/overlays/actors/ovl_En_Mu/z_en_mu.h index 4ddf949bb4..b50574a255 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.h +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.h @@ -6,9 +6,17 @@ struct EnMu; +typedef void (*EnMuActionFunc)(struct EnMu*, struct GlobalContext*); + typedef struct EnMu { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x100]; + /* 0x014C */ SkelAnime skelAnime; + /* 0x0190 */ EnMuActionFunc actionFunc; + /* 0x0194 */ ColliderCylinder collider; + /* 0x01E0 */ struct_80034A14_arg1 dialogState; + /* 0x0208 */ u16 defFaceReaction; + /* 0x020A */ s16 unk_20A[16]; + /* 0x022A */ s16 unk_22A[17]; } EnMu; // size = 0x024C extern const ActorInit En_Mu_InitVars;