From 8a730123b6c6a309619dcb524c427a821fb483c3 Mon Sep 17 00:00:00 2001 From: AdamKiddle <54328813+AdamKiddle@users.noreply.github.com> Date: Sun, 14 Mar 2021 15:21:15 +0000 Subject: [PATCH] DoorKiller OK (#631) * Init done * slight tweak * Destroy done * func_80995020 * func_809951C4 done * started func_80995A84 * func_80995A84, func_80995284, func_809952B8 done * started the mess that is func_80995368 * most functions done except for 3 trouble cases * func_80995368 done * func_809958E4 done * fully matching. Documentation and cleanup to come * fixed fake matches * documentation progress * More documentation * getting close on tidying up everything * Finalised documentation and made some comments and name changes in player and other door files * formatting and final touches to comments * pr stuff * merge master * merge * format * remove unused asm after merge * review * \n Co-authored-by: fig02 --- .../ovl_Door_Killer/DoorKiller_Destroy.s | 22 - .../actors/ovl_Door_Killer/DoorKiller_Init.s | 270 ---------- .../ovl_Door_Killer/DoorKiller_Update.s | 10 - .../actors/ovl_Door_Killer/func_80995020.s | 125 ----- .../actors/ovl_Door_Killer/func_809951C4.s | 58 --- .../actors/ovl_Door_Killer/func_80995284.s | 15 - .../actors/ovl_Door_Killer/func_809952B8.s | 28 -- .../actors/ovl_Door_Killer/func_80995318.s | 24 - .../actors/ovl_Door_Killer/func_80995368.s | 121 ----- .../actors/ovl_Door_Killer/func_80995518.s | 272 ---------- .../actors/ovl_Door_Killer/func_809958E4.s | 102 ---- .../actors/ovl_Door_Killer/func_80995A50.s | 15 - .../actors/ovl_Door_Killer/func_80995A84.s | 164 ------ .../actors/ovl_Door_Killer/func_80995CDC.s | 37 -- .../actors/ovl_Door_Killer/func_80995D6C.s | 59 --- .../actors/ovl_Door_Killer/func_80995E40.s | 44 -- .../actors/ovl_Door_Killer/func_80995EC4.s | 23 - .../actors/ovl_Door_Killer/func_80995F1C.s | 33 -- data/overlays/actors/z_door_killer.data.s | 35 -- data/overlays/actors/z_door_killer.reloc.s | 13 - include/z64player.h | 9 + spec | 3 +- .../actors/ovl_Door_Gerudo/z_door_gerudo.c | 2 +- .../actors/ovl_Door_Killer/z_door_killer.c | 465 +++++++++++++++++- .../actors/ovl_Door_Killer/z_door_killer.h | 26 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 2 +- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 2 +- src/overlays/actors/ovl_En_Brob/z_en_brob.c | 14 +- src/overlays/actors/ovl_En_Door/z_en_door.c | 23 +- src/overlays/actors/ovl_En_Door/z_en_door.h | 4 +- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 1 - src/overlays/actors/ovl_En_Go2/z_en_go2.c | 1 - src/overlays/actors/ovl_En_Md/z_en_md.c | 1 - src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 1 - .../actors/ovl_Item_Shield/z_item_shield.c | 5 +- .../actors/ovl_player_actor/z_player.c | 69 +-- 36 files changed, 544 insertions(+), 1554 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995020.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809951C4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995284.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809952B8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995318.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995368.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995518.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809958E4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A50.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995CDC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995D6C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995E40.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995EC4.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995F1C.s delete mode 100644 data/overlays/actors/z_door_killer.data.s delete mode 100644 data/overlays/actors/z_door_killer.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Destroy.s deleted file mode 100644 index aa90ffd74f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Destroy.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel DoorKiller_Destroy -/* 00384 80994FD4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00388 80994FD8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0038C 80994FDC AFA5001C */ sw $a1, 0x001C($sp) -/* 00390 80994FE0 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 00394 80994FE4 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00398 80994FE8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 0039C 80994FEC 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000 -/* 003A0 80994FF0 15E00007 */ bne $t7, $zero, .L80995010 -/* 003A4 80994FF4 24C501C8 */ addiu $a1, $a2, 0x01C8 ## $a1 = 000001C8 -/* 003A8 80994FF8 0C0170EB */ jal Collider_DestroyCylinder - -/* 003AC 80994FFC AFA60018 */ sw $a2, 0x0018($sp) -/* 003B0 80995000 8FA60018 */ lw $a2, 0x0018($sp) -/* 003B4 80995004 8FA4001C */ lw $a0, 0x001C($sp) -/* 003B8 80995008 0C016F32 */ jal Collider_DestroyJntSph -/* 003BC 8099500C 24C50220 */ addiu $a1, $a2, 0x0220 ## $a1 = 00000220 -.L80995010: -/* 003C0 80995010 8FBF0014 */ lw $ra, 0x0014($sp) -/* 003C4 80995014 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 003C8 80995018 03E00008 */ jr $ra -/* 003CC 8099501C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Init.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Init.s deleted file mode 100644 index 681d81b9c3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Init.s +++ /dev/null @@ -1,270 +0,0 @@ -.rdata -glabel D_80996060 - .asciz "bank_ID = %d\n" - .balign 4 - -glabel D_80996070 - .asciz "status = %d\n" - .balign 4 - -.late_rodata -glabel jtbl_809960A8 -.word L80994D4C -.word L80994E88 -.word L80994E88 -.word L80994E88 -.word L80994E88 -glabel D_809960BC - .word 0xBF19999A - -.text -glabel DoorKiller_Init -/* 00000 80994C50 27BDFFA8 */ addiu $sp, $sp, 0xFFA8 ## $sp = FFFFFFA8 -/* 00004 80994C54 AFB10028 */ sw $s1, 0x0028($sp) -/* 00008 80994C58 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0000C 80994C5C AFB50038 */ sw $s5, 0x0038($sp) -/* 00010 80994C60 AFB40034 */ sw $s4, 0x0034($sp) -/* 00014 80994C64 AFB2002C */ sw $s2, 0x002C($sp) -/* 00018 80994C68 AFB00024 */ sw $s0, 0x0024($sp) -/* 0001C 80994C6C 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4 -/* 00020 80994C70 3C118099 */ lui $s1, %hi(D_80996010) ## $s1 = 80990000 -/* 00024 80994C74 00809025 */ or $s2, $a0, $zero ## $s2 = 00000000 -/* 00028 80994C78 00A0A825 */ or $s5, $a1, $zero ## $s5 = 00000000 -/* 0002C 80994C7C AFBF003C */ sw $ra, 0x003C($sp) -/* 00030 80994C80 AFB30030 */ sw $s3, 0x0030($sp) -/* 00034 80994C84 26316010 */ addiu $s1, $s1, %lo(D_80996010) ## $s1 = 80996010 -/* 00038 80994C88 00A1A021 */ addu $s4, $a1, $at -/* 0003C 80994C8C 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -.L80994C90: -/* 00040 80994C90 02802025 */ or $a0, $s4, $zero ## $a0 = 00000000 -/* 00044 80994C94 0C02604B */ jal Object_GetIndex - ## ObjectIndex -/* 00048 80994C98 86250000 */ lh $a1, 0x0000($s1) ## 80996010 -/* 0004C 80994C9C A250021D */ sb $s0, 0x021D($s2) ## 0000021D -/* 00050 80994CA0 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 -/* 00054 80994CA4 26310008 */ addiu $s1, $s1, 0x0008 ## $s1 = 80996018 -/* 00058 80994CA8 0440FFF9 */ bltz $v0, .L80994C90 -/* 0005C 80994CAC 00409825 */ or $s3, $v0, $zero ## $s3 = 00000000 -/* 00060 80994CB0 3C048099 */ lui $a0, %hi(D_80996060) ## $a0 = 80990000 -/* 00064 80994CB4 24846060 */ addiu $a0, $a0, %lo(D_80996060) ## $a0 = 80996060 -/* 00068 80994CB8 0C00084C */ jal osSyncPrintf - -/* 0006C 80994CBC 00402825 */ or $a1, $v0, $zero ## $a1 = 00000000 -/* 00070 80994CC0 3C048099 */ lui $a0, %hi(D_80996070) ## $a0 = 80990000 -/* 00074 80994CC4 24846070 */ addiu $a0, $a0, %lo(D_80996070) ## $a0 = 80996070 -/* 00078 80994CC8 0C00084C */ jal osSyncPrintf - -/* 0007C 80994CCC 9245021D */ lbu $a1, 0x021D($s2) ## 0000021D -/* 00080 80994CD0 924E021D */ lbu $t6, 0x021D($s2) ## 0000021D -/* 00084 80994CD4 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 00088 80994CD8 3C188099 */ lui $t8, %hi(D_80996014) ## $t8 = 80990000 -/* 0008C 80994CDC 000E78C0 */ sll $t7, $t6, 3 -/* 00090 80994CE0 A253021C */ sb $s3, 0x021C($s2) ## 0000021C -/* 00094 80994CE4 030FC021 */ addu $t8, $t8, $t7 -/* 00098 80994CE8 8F186014 */ lw $t8, %lo(D_80996014)($t8) -/* 0009C 80994CEC 44050000 */ mfc1 $a1, $f0 -/* 000A0 80994CF0 44070000 */ mfc1 $a3, $f0 -/* 000A4 80994CF4 264400B4 */ addiu $a0, $s2, 0x00B4 ## $a0 = 000000B4 -/* 000A8 80994CF8 00003025 */ or $a2, $zero, $zero ## $a2 = 00000000 -/* 000AC 80994CFC 0C00AC78 */ jal ActorShape_Init - -/* 000B0 80994D00 AE580214 */ sw $t8, 0x0214($s2) ## 00000214 -/* 000B4 80994D04 3C053C23 */ lui $a1, 0x3C23 ## $a1 = 3C230000 -/* 000B8 80994D08 34A5D70A */ ori $a1, $a1, 0xD70A ## $a1 = 3C23D70A -/* 000BC 80994D0C 0C00B58B */ jal Actor_SetScale - -/* 000C0 80994D10 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000 -/* 000C4 80994D14 8648001C */ lh $t0, 0x001C($s2) ## 0000001C -/* 000C8 80994D18 A640021A */ sh $zero, 0x021A($s2) ## 0000021A -/* 000CC 80994D1C A6400218 */ sh $zero, 0x0218($s2) ## 00000218 -/* 000D0 80994D20 310900FF */ andi $t1, $t0, 0x00FF ## $t1 = 00000000 -/* 000D4 80994D24 2D210005 */ sltiu $at, $t1, 0x0005 -/* 000D8 80994D28 A2400190 */ sb $zero, 0x0190($s2) ## 00000190 -/* 000DC 80994D2C 102000A0 */ beq $at, $zero, .L80994FB0 -/* 000E0 80994D30 A2400191 */ sb $zero, 0x0191($s2) ## 00000191 -/* 000E4 80994D34 00094880 */ sll $t1, $t1, 2 -/* 000E8 80994D38 3C018099 */ lui $at, %hi(jtbl_809960A8) ## $at = 80990000 -/* 000EC 80994D3C 00290821 */ addu $at, $at, $t1 -/* 000F0 80994D40 8C2960A8 */ lw $t1, %lo(jtbl_809960A8)($at) -/* 000F4 80994D44 01200008 */ jr $t1 -/* 000F8 80994D48 00000000 */ nop -glabel L80994D4C -/* 000FC 80994D4C 3C060600 */ lui $a2, %hi(D_06001BC8) ## $a2 = 06000000 -/* 00100 80994D50 26420192 */ addiu $v0, $s2, 0x0192 ## $v0 = 00000192 -/* 00104 80994D54 240A0009 */ addiu $t2, $zero, 0x0009 ## $t2 = 00000009 -/* 00108 80994D58 AFAA0018 */ sw $t2, 0x0018($sp) -/* 0010C 80994D5C AFA20010 */ sw $v0, 0x0010($sp) -/* 00110 80994D60 AFA20014 */ sw $v0, 0x0014($sp) -/* 00114 80994D64 24C61BC8 */ addiu $a2, $a2, %lo(D_06001BC8) ## $a2 = 06001BC8 -/* 00118 80994D68 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 0011C 80994D6C 2645014C */ addiu $a1, $s2, 0x014C ## $a1 = 0000014C -/* 00120 80994D70 0C0291BE */ jal SkelAnime_InitFlex -/* 00124 80994D74 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 00128 80994D78 3C0B8099 */ lui $t3, %hi(func_80995D6C) ## $t3 = 80990000 -/* 0012C 80994D7C 256B5D6C */ addiu $t3, $t3, %lo(func_80995D6C) ## $t3 = 80995D6C -/* 00130 80994D80 AE4B0280 */ sw $t3, 0x0280($s2) ## 00000280 -/* 00134 80994D84 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000 -/* 00138 80994D88 0C26575B */ jal func_80995D6C -/* 0013C 80994D8C 02A02825 */ or $a1, $s5, $zero ## $a1 = 00000000 -/* 00140 80994D90 240C4000 */ addiu $t4, $zero, 0x4000 ## $t4 = 00004000 -/* 00144 80994D94 A64C019C */ sh $t4, 0x019C($s2) ## 0000019C -/* 00148 80994D98 864D019C */ lh $t5, 0x019C($s2) ## 0000019C -/* 0014C 80994D9C 265001C8 */ addiu $s0, $s2, 0x01C8 ## $s0 = 000001C8 -/* 00150 80994DA0 02002825 */ or $a1, $s0, $zero ## $a1 = 000001C8 -/* 00154 80994DA4 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 00158 80994DA8 0C0170D9 */ jal Collider_InitCylinder - -/* 0015C 80994DAC A64D0198 */ sh $t5, 0x0198($s2) ## 00000198 -/* 00160 80994DB0 3C078099 */ lui $a3, %hi(D_80995FB0) ## $a3 = 80990000 -/* 00164 80994DB4 24E75FB0 */ addiu $a3, $a3, %lo(D_80995FB0) ## $a3 = 80995FB0 -/* 00168 80994DB8 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 0016C 80994DBC 02002825 */ or $a1, $s0, $zero ## $a1 = 000001C8 -/* 00170 80994DC0 0C01712B */ jal Collider_SetCylinder - -/* 00174 80994DC4 02403025 */ or $a2, $s2, $zero ## $a2 = 00000000 -/* 00178 80994DC8 26500220 */ addiu $s0, $s2, 0x0220 ## $s0 = 00000220 -/* 0017C 80994DCC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000220 -/* 00180 80994DD0 0C016EFE */ jal Collider_InitJntSph -/* 00184 80994DD4 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 00188 80994DD8 3C078099 */ lui $a3, %hi(D_80996000) ## $a3 = 80990000 -/* 0018C 80994DDC 264E0240 */ addiu $t6, $s2, 0x0240 ## $t6 = 00000240 -/* 00190 80994DE0 AFAE0010 */ sw $t6, 0x0010($sp) -/* 00194 80994DE4 24E76000 */ addiu $a3, $a3, %lo(D_80996000) ## $a3 = 80996000 -/* 00198 80994DE8 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 0019C 80994DEC 02002825 */ or $a1, $s0, $zero ## $a1 = 00000220 -/* 001A0 80994DF0 0C017014 */ jal Collider_SetJntSph -/* 001A4 80994DF4 02403025 */ or $a2, $s2, $zero ## $a2 = 00000000 -/* 001A8 80994DF8 8E58023C */ lw $t8, 0x023C($s2) ## 0000023C -/* 001AC 80994DFC 240F0050 */ addiu $t7, $zero, 0x0050 ## $t7 = 00000050 -/* 001B0 80994E00 2401003F */ addiu $at, $zero, 0x003F ## $at = 0000003F -/* 001B4 80994E04 A70F0036 */ sh $t7, 0x0036($t8) ## 00000036 -/* 001B8 80994E08 C6440024 */ lwc1 $f4, 0x0024($s2) ## 00000024 -/* 001BC 80994E0C 8E49023C */ lw $t1, 0x023C($s2) ## 0000023C -/* 001C0 80994E10 4600218D */ trunc.w.s $f6, $f4 -/* 001C4 80994E14 44083000 */ mfc1 $t0, $f6 -/* 001C8 80994E18 00000000 */ nop -/* 001CC 80994E1C A5280030 */ sh $t0, 0x0030($t1) ## 00000030 -/* 001D0 80994E20 C6480028 */ lwc1 $f8, 0x0028($s2) ## 00000028 -/* 001D4 80994E24 8E4F023C */ lw $t7, 0x023C($s2) ## 0000023C -/* 001D8 80994E28 4600428D */ trunc.w.s $f10, $f8 -/* 001DC 80994E2C 440D5000 */ mfc1 $t5, $f10 -/* 001E0 80994E30 00000000 */ nop -/* 001E4 80994E34 25AE0032 */ addiu $t6, $t5, 0x0032 ## $t6 = 00000032 -/* 001E8 80994E38 A5EE0032 */ sh $t6, 0x0032($t7) ## 00000082 -/* 001EC 80994E3C C650002C */ lwc1 $f16, 0x002C($s2) ## 0000002C -/* 001F0 80994E40 8E48023C */ lw $t0, 0x023C($s2) ## 0000023C -/* 001F4 80994E44 4600848D */ trunc.w.s $f18, $f16 -/* 001F8 80994E48 44199000 */ mfc1 $t9, $f18 -/* 001FC 80994E4C 00000000 */ nop -/* 00200 80994E50 A5190034 */ sh $t9, 0x0034($t0) ## 00000034 -/* 00204 80994E54 8645001C */ lh $a1, 0x001C($s2) ## 0000001C -/* 00208 80994E58 00052A03 */ sra $a1, $a1, 8 -/* 0020C 80994E5C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00210 80994E60 50A10054 */ beql $a1, $at, .L80994FB4 -/* 00214 80994E64 8FBF003C */ lw $ra, 0x003C($sp) -/* 00218 80994E68 0C00B2D0 */ jal Flags_GetSwitch - -/* 0021C 80994E6C 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000000 -/* 00220 80994E70 50400050 */ beql $v0, $zero, .L80994FB4 -/* 00224 80994E74 8FBF003C */ lw $ra, 0x003C($sp) -/* 00228 80994E78 0C00B55C */ jal Actor_Kill - -/* 0022C 80994E7C 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000 -/* 00230 80994E80 1000004C */ beq $zero, $zero, .L80994FB4 -/* 00234 80994E84 8FBF003C */ lw $ra, 0x003C($sp) -glabel L80994E88 -/* 00238 80994E88 3C098099 */ lui $t1, %hi(func_80995D6C) ## $t1 = 80990000 -/* 0023C 80994E8C 25295D6C */ addiu $t1, $t1, %lo(func_80995D6C) ## $t1 = 80995D6C -/* 00240 80994E90 AE490280 */ sw $t1, 0x0280($s2) ## 00000280 -/* 00244 80994E94 02402025 */ or $a0, $s2, $zero ## $a0 = 00000000 -/* 00248 80994E98 0C26575B */ jal func_80995D6C -/* 0024C 80994E9C 02A02825 */ or $a1, $s5, $zero ## $a1 = 00000000 -/* 00250 80994EA0 3C018099 */ lui $at, %hi(D_809960BC) ## $at = 80990000 -/* 00254 80994EA4 C42460BC */ lwc1 $f4, %lo(D_809960BC)($at) -/* 00258 80994EA8 3C01C0C0 */ lui $at, 0xC0C0 ## $at = C0C00000 -/* 0025C 80994EAC 44813000 */ mtc1 $at, $f6 ## $f6 = -6.00 -/* 00260 80994EB0 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 00264 80994EB4 44816000 */ mtc1 $at, $f12 ## $f12 = 8.00 -/* 00268 80994EB8 E644006C */ swc1 $f4, 0x006C($s2) ## 0000006C -/* 0026C 80994EBC 0C00CFC8 */ jal Rand_CenteredFloat - -/* 00270 80994EC0 E6460070 */ swc1 $f6, 0x0070($s2) ## 00000070 -/* 00274 80994EC4 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 00278 80994EC8 44816000 */ mtc1 $at, $f12 ## $f12 = 8.00 -/* 0027C 80994ECC 0C00CFBE */ jal Rand_ZeroFloat - -/* 00280 80994ED0 E7A00050 */ swc1 $f0, 0x0050($sp) -/* 00284 80994ED4 E6400064 */ swc1 $f0, 0x0064($s2) ## 00000064 -/* 00288 80994ED8 0C01DE0D */ jal Math_CosS - ## coss? -/* 0028C 80994EDC 86440032 */ lh $a0, 0x0032($s2) ## 00000032 -/* 00290 80994EE0 E7A00040 */ swc1 $f0, 0x0040($sp) -/* 00294 80994EE4 0C01DE1C */ jal Math_SinS - ## sins? -/* 00298 80994EE8 86440032 */ lh $a0, 0x0032($s2) ## 00000032 -/* 0029C 80994EEC C7A80040 */ lwc1 $f8, 0x0040($sp) -/* 002A0 80994EF0 C7AA0050 */ lwc1 $f10, 0x0050($sp) -/* 002A4 80994EF4 C6520064 */ lwc1 $f18, 0x0064($s2) ## 00000064 -/* 002A8 80994EF8 86440032 */ lh $a0, 0x0032($s2) ## 00000032 -/* 002AC 80994EFC 460A4402 */ mul.s $f16, $f8, $f10 -/* 002B0 80994F00 00000000 */ nop -/* 002B4 80994F04 46120102 */ mul.s $f4, $f0, $f18 -/* 002B8 80994F08 46102180 */ add.s $f6, $f4, $f16 -/* 002BC 80994F0C 0C01DE1C */ jal Math_SinS - ## sins? -/* 002C0 80994F10 E646005C */ swc1 $f6, 0x005C($s2) ## 0000005C -/* 002C4 80994F14 E7A00040 */ swc1 $f0, 0x0040($sp) -/* 002C8 80994F18 0C01DE0D */ jal Math_CosS - ## coss? -/* 002CC 80994F1C 86440032 */ lh $a0, 0x0032($s2) ## 00000032 -/* 002D0 80994F20 C7A80040 */ lwc1 $f8, 0x0040($sp) -/* 002D4 80994F24 C7B20050 */ lwc1 $f18, 0x0050($sp) -/* 002D8 80994F28 C6500064 */ lwc1 $f16, 0x0064($s2) ## 00000064 -/* 002DC 80994F2C 46004287 */ neg.s $f10, $f8 -/* 002E0 80994F30 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 002E4 80994F34 46125102 */ mul.s $f4, $f10, $f18 -/* 002E8 80994F38 44816000 */ mtc1 $at, $f12 ## $f12 = 4.00 -/* 002EC 80994F3C 46100182 */ mul.s $f6, $f0, $f16 -/* 002F0 80994F40 46043200 */ add.s $f8, $f6, $f4 -/* 002F4 80994F44 0C00CFBE */ jal Rand_ZeroFloat - -/* 002F8 80994F48 E6480064 */ swc1 $f8, 0x0064($s2) ## 00000064 -/* 002FC 80994F4C 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 00300 80994F50 44815000 */ mtc1 $at, $f10 ## $f10 = 4.00 -/* 00304 80994F54 3C014580 */ lui $at, 0x4580 ## $at = 45800000 -/* 00308 80994F58 44816000 */ mtc1 $at, $f12 ## $f12 = 4096.00 -/* 0030C 80994F5C 460A0480 */ add.s $f18, $f0, $f10 -/* 00310 80994F60 0C00CFC8 */ jal Rand_CenteredFloat - -/* 00314 80994F64 E6520060 */ swc1 $f18, 0x0060($s2) ## 00000060 -/* 00318 80994F68 4600040D */ trunc.w.s $f16, $f0 -/* 0031C 80994F6C 3C014580 */ lui $at, 0x4580 ## $at = 45800000 -/* 00320 80994F70 44816000 */ mtc1 $at, $f12 ## $f12 = 4096.00 -/* 00324 80994F74 440B8000 */ mfc1 $t3, $f16 -/* 00328 80994F78 0C00CFC8 */ jal Rand_CenteredFloat - -/* 0032C 80994F7C A64B0030 */ sh $t3, 0x0030($s2) ## 00000030 -/* 00330 80994F80 4600018D */ trunc.w.s $f6, $f0 -/* 00334 80994F84 3C014580 */ lui $at, 0x4580 ## $at = 45800000 -/* 00338 80994F88 44816000 */ mtc1 $at, $f12 ## $f12 = 4096.00 -/* 0033C 80994F8C 440D3000 */ mfc1 $t5, $f6 -/* 00340 80994F90 0C00CFC8 */ jal Rand_CenteredFloat - -/* 00344 80994F94 A64D0032 */ sh $t5, 0x0032($s2) ## 00000032 -/* 00348 80994F98 4600010D */ trunc.w.s $f4, $f0 -/* 0034C 80994F9C 24180050 */ addiu $t8, $zero, 0x0050 ## $t8 = 00000050 -/* 00350 80994FA0 A658021A */ sh $t8, 0x021A($s2) ## 0000021A -/* 00354 80994FA4 440F2000 */ mfc1 $t7, $f4 -/* 00358 80994FA8 00000000 */ nop -/* 0035C 80994FAC A64F0034 */ sh $t7, 0x0034($s2) ## 00000034 -.L80994FB0: -/* 00360 80994FB0 8FBF003C */ lw $ra, 0x003C($sp) -.L80994FB4: -/* 00364 80994FB4 8FB00024 */ lw $s0, 0x0024($sp) -/* 00368 80994FB8 8FB10028 */ lw $s1, 0x0028($sp) -/* 0036C 80994FBC 8FB2002C */ lw $s2, 0x002C($sp) -/* 00370 80994FC0 8FB30030 */ lw $s3, 0x0030($sp) -/* 00374 80994FC4 8FB40034 */ lw $s4, 0x0034($sp) -/* 00378 80994FC8 8FB50038 */ lw $s5, 0x0038($sp) -/* 0037C 80994FCC 03E00008 */ jr $ra -/* 00380 80994FD0 27BD0058 */ addiu $sp, $sp, 0x0058 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Update.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Update.s deleted file mode 100644 index 69732e42a1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel DoorKiller_Update -/* 011CC 80995E1C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 011D0 80995E20 AFBF0014 */ sw $ra, 0x0014($sp) -/* 011D4 80995E24 8C990280 */ lw $t9, 0x0280($a0) ## 00000280 -/* 011D8 80995E28 0320F809 */ jalr $ra, $t9 -/* 011DC 80995E2C 00000000 */ nop -/* 011E0 80995E30 8FBF0014 */ lw $ra, 0x0014($sp) -/* 011E4 80995E34 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 011E8 80995E38 03E00008 */ jr $ra -/* 011EC 80995E3C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995020.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995020.s deleted file mode 100644 index abfaec62c8..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995020.s +++ /dev/null @@ -1,125 +0,0 @@ -.late_rodata -glabel D_809960C0 - .word 0x40FC28F6 -glabel D_809960C4 - .word 0x421F3333 -glabel D_809960C8 - .word 0x417DC28F -glabel D_809960CC - .word 0x4277EB85 -glabel D_809960D0 - .word 0x406E147B -glabel D_809960D4 - .word 0x42AA3333 - -.text -glabel func_80995020 -/* 003D0 80995020 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 003D4 80995024 AFB00030 */ sw $s0, 0x0030($sp) -/* 003D8 80995028 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003DC 8099502C AFBF003C */ sw $ra, 0x003C($sp) -/* 003E0 80995030 AFB20038 */ sw $s2, 0x0038($sp) -/* 003E4 80995034 AFB10034 */ sw $s1, 0x0034($sp) -/* 003E8 80995038 3C014110 */ lui $at, 0x4110 ## $at = 41100000 -/* 003EC 8099503C 44813000 */ mtc1 $at, $f6 ## $f6 = 9.00 -/* 003F0 80995040 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028 -/* 003F4 80995044 8E070024 */ lw $a3, 0x0024($s0) ## 00000024 -/* 003F8 80995048 24B21C24 */ addiu $s2, $a1, 0x1C24 ## $s2 = 00001C24 -/* 003FC 8099504C 46062200 */ add.s $f8, $f4, $f6 -/* 00400 80995050 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 00404 80995054 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00408 80995058 02402025 */ or $a0, $s2, $zero ## $a0 = 00001C24 -/* 0040C 8099505C E7A80010 */ swc1 $f8, 0x0010($sp) -/* 00410 80995060 C60A002C */ lwc1 $f10, 0x002C($s0) ## 0000002C -/* 00414 80995064 240601C1 */ addiu $a2, $zero, 0x01C1 ## $a2 = 000001C1 -/* 00418 80995068 E7AA0014 */ swc1 $f10, 0x0014($sp) -/* 0041C 8099506C 860E00B4 */ lh $t6, 0x00B4($s0) ## 000000B4 -/* 00420 80995070 AFAE0018 */ sw $t6, 0x0018($sp) -/* 00424 80995074 860F00B6 */ lh $t7, 0x00B6($s0) ## 000000B6 -/* 00428 80995078 AFAF001C */ sw $t7, 0x001C($sp) -/* 0042C 8099507C 861800B8 */ lh $t8, 0x00B8($s0) ## 000000B8 -/* 00430 80995080 AFB90024 */ sw $t9, 0x0024($sp) -/* 00434 80995084 0C00C7D4 */ jal Actor_Spawn - ## ActorSpawn -/* 00438 80995088 AFB80020 */ sw $t8, 0x0020($sp) -/* 0043C 8099508C 3C018099 */ lui $at, %hi(D_809960C0) ## $at = 80990000 -/* 00440 80995090 C43260C0 */ lwc1 $f18, %lo(D_809960C0)($at) -/* 00444 80995094 3C018099 */ lui $at, %hi(D_809960C4) ## $at = 80990000 -/* 00448 80995098 C42860C4 */ lwc1 $f8, %lo(D_809960C4)($at) -/* 0044C 8099509C C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028 -/* 00450 809950A0 C6100024 */ lwc1 $f16, 0x0024($s0) ## 00000024 -/* 00454 809950A4 240B0002 */ addiu $t3, $zero, 0x0002 ## $t3 = 00000002 -/* 00458 809950A8 46083280 */ add.s $f10, $f6, $f8 -/* 0045C 809950AC 02402025 */ or $a0, $s2, $zero ## $a0 = 00001C24 -/* 00460 809950B0 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00464 809950B4 46128100 */ add.s $f4, $f16, $f18 -/* 00468 809950B8 E7AA0010 */ swc1 $f10, 0x0010($sp) -/* 0046C 809950BC C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C -/* 00470 809950C0 240601C1 */ addiu $a2, $zero, 0x01C1 ## $a2 = 000001C1 -/* 00474 809950C4 44072000 */ mfc1 $a3, $f4 -/* 00478 809950C8 E7B00014 */ swc1 $f16, 0x0014($sp) -/* 0047C 809950CC 860800B4 */ lh $t0, 0x00B4($s0) ## 000000B4 -/* 00480 809950D0 AFA80018 */ sw $t0, 0x0018($sp) -/* 00484 809950D4 860900B6 */ lh $t1, 0x00B6($s0) ## 000000B6 -/* 00488 809950D8 AFA9001C */ sw $t1, 0x001C($sp) -/* 0048C 809950DC 860A00B8 */ lh $t2, 0x00B8($s0) ## 000000B8 -/* 00490 809950E0 AFAB0024 */ sw $t3, 0x0024($sp) -/* 00494 809950E4 0C00C7D4 */ jal Actor_Spawn - ## ActorSpawn -/* 00498 809950E8 AFAA0020 */ sw $t2, 0x0020($sp) -/* 0049C 809950EC 3C018099 */ lui $at, %hi(D_809960C8) ## $at = 80990000 -/* 004A0 809950F0 C42460C8 */ lwc1 $f4, %lo(D_809960C8)($at) -/* 004A4 809950F4 3C018099 */ lui $at, %hi(D_809960CC) ## $at = 80990000 -/* 004A8 809950F8 C42A60CC */ lwc1 $f10, %lo(D_809960CC)($at) -/* 004AC 809950FC C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028 -/* 004B0 80995100 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -/* 004B4 80995104 240F0003 */ addiu $t7, $zero, 0x0003 ## $t7 = 00000003 -/* 004B8 80995108 460A4400 */ add.s $f16, $f8, $f10 -/* 004BC 8099510C 02402025 */ or $a0, $s2, $zero ## $a0 = 00001C24 -/* 004C0 80995110 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 004C4 80995114 46049181 */ sub.s $f6, $f18, $f4 -/* 004C8 80995118 E7B00010 */ swc1 $f16, 0x0010($sp) -/* 004CC 8099511C C612002C */ lwc1 $f18, 0x002C($s0) ## 0000002C -/* 004D0 80995120 240601C1 */ addiu $a2, $zero, 0x01C1 ## $a2 = 000001C1 -/* 004D4 80995124 44073000 */ mfc1 $a3, $f6 -/* 004D8 80995128 E7B20014 */ swc1 $f18, 0x0014($sp) -/* 004DC 8099512C 860C00B4 */ lh $t4, 0x00B4($s0) ## 000000B4 -/* 004E0 80995130 AFAC0018 */ sw $t4, 0x0018($sp) -/* 004E4 80995134 860D00B6 */ lh $t5, 0x00B6($s0) ## 000000B6 -/* 004E8 80995138 AFAD001C */ sw $t5, 0x001C($sp) -/* 004EC 8099513C 860E00B8 */ lh $t6, 0x00B8($s0) ## 000000B8 -/* 004F0 80995140 AFAF0024 */ sw $t7, 0x0024($sp) -/* 004F4 80995144 0C00C7D4 */ jal Actor_Spawn - ## ActorSpawn -/* 004F8 80995148 AFAE0020 */ sw $t6, 0x0020($sp) -/* 004FC 8099514C 3C018099 */ lui $at, %hi(D_809960D0) ## $at = 80990000 -/* 00500 80995150 C42660D0 */ lwc1 $f6, %lo(D_809960D0)($at) -/* 00504 80995154 3C018099 */ lui $at, %hi(D_809960D4) ## $at = 80990000 -/* 00508 80995158 C43060D4 */ lwc1 $f16, %lo(D_809960D4)($at) -/* 0050C 8099515C C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028 -/* 00510 80995160 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 -/* 00514 80995164 24090004 */ addiu $t1, $zero, 0x0004 ## $t1 = 00000004 -/* 00518 80995168 46105480 */ add.s $f18, $f10, $f16 -/* 0051C 8099516C 02402025 */ or $a0, $s2, $zero ## $a0 = 00001C24 -/* 00520 80995170 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00524 80995174 46062200 */ add.s $f8, $f4, $f6 -/* 00528 80995178 E7B20010 */ swc1 $f18, 0x0010($sp) -/* 0052C 8099517C C604002C */ lwc1 $f4, 0x002C($s0) ## 0000002C -/* 00530 80995180 240601C1 */ addiu $a2, $zero, 0x01C1 ## $a2 = 000001C1 -/* 00534 80995184 44074000 */ mfc1 $a3, $f8 -/* 00538 80995188 E7A40014 */ swc1 $f4, 0x0014($sp) -/* 0053C 8099518C 861800B4 */ lh $t8, 0x00B4($s0) ## 000000B4 -/* 00540 80995190 AFB80018 */ sw $t8, 0x0018($sp) -/* 00544 80995194 861900B6 */ lh $t9, 0x00B6($s0) ## 000000B6 -/* 00548 80995198 AFB9001C */ sw $t9, 0x001C($sp) -/* 0054C 8099519C 860800B8 */ lh $t0, 0x00B8($s0) ## 000000B8 -/* 00550 809951A0 AFA90024 */ sw $t1, 0x0024($sp) -/* 00554 809951A4 0C00C7D4 */ jal Actor_Spawn - ## ActorSpawn -/* 00558 809951A8 AFA80020 */ sw $t0, 0x0020($sp) -/* 0055C 809951AC 8FBF003C */ lw $ra, 0x003C($sp) -/* 00560 809951B0 8FB00030 */ lw $s0, 0x0030($sp) -/* 00564 809951B4 8FB10034 */ lw $s1, 0x0034($sp) -/* 00568 809951B8 8FB20038 */ lw $s2, 0x0038($sp) -/* 0056C 809951BC 03E00008 */ jr $ra -/* 00570 809951C0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809951C4.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809951C4.s deleted file mode 100644 index eeca8ac017..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809951C4.s +++ /dev/null @@ -1,58 +0,0 @@ -.late_rodata -glabel D_809960D8 - .word 0x3F7AE148 - -.text -glabel func_809951C4 -/* 00574 809951C4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00578 809951C8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0057C 809951CC AFA5001C */ sw $a1, 0x001C($sp) -/* 00580 809951D0 C4840060 */ lwc1 $f4, 0x0060($a0) ## 00000060 -/* 00584 809951D4 C486006C */ lwc1 $f6, 0x006C($a0) ## 0000006C -/* 00588 809951D8 C4800070 */ lwc1 $f0, 0x0070($a0) ## 00000070 -/* 0058C 809951DC 3C018099 */ lui $at, %hi(D_809960D8) ## $at = 80990000 -/* 00590 809951E0 46062200 */ add.s $f8, $f4, $f6 -/* 00594 809951E4 E4880060 */ swc1 $f8, 0x0060($a0) ## 00000060 -/* 00598 809951E8 C48A0060 */ lwc1 $f10, 0x0060($a0) ## 00000060 -/* 0059C 809951EC 4600503C */ c.lt.s $f10, $f0 -/* 005A0 809951F0 00000000 */ nop -/* 005A4 809951F4 45000002 */ bc1f .L80995200 -/* 005A8 809951F8 00000000 */ nop -/* 005AC 809951FC E4800060 */ swc1 $f0, 0x0060($a0) ## 00000060 -.L80995200: -/* 005B0 80995200 C42060D8 */ lwc1 $f0, %lo(D_809960D8)($at) -/* 005B4 80995204 C490005C */ lwc1 $f16, 0x005C($a0) ## 0000005C -/* 005B8 80995208 C4840064 */ lwc1 $f4, 0x0064($a0) ## 00000064 -/* 005BC 8099520C 848E00B4 */ lh $t6, 0x00B4($a0) ## 000000B4 -/* 005C0 80995210 46008482 */ mul.s $f18, $f16, $f0 -/* 005C4 80995214 848F0030 */ lh $t7, 0x0030($a0) ## 00000030 -/* 005C8 80995218 849900B6 */ lh $t9, 0x00B6($a0) ## 000000B6 -/* 005CC 8099521C 46002182 */ mul.s $f6, $f4, $f0 -/* 005D0 80995220 84880032 */ lh $t0, 0x0032($a0) ## 00000032 -/* 005D4 80995224 848A00B8 */ lh $t2, 0x00B8($a0) ## 000000B8 -/* 005D8 80995228 848B0034 */ lh $t3, 0x0034($a0) ## 00000034 -/* 005DC 8099522C 9482021A */ lhu $v0, 0x021A($a0) ## 0000021A -/* 005E0 80995230 01CFC021 */ addu $t8, $t6, $t7 -/* 005E4 80995234 03284821 */ addu $t1, $t9, $t0 -/* 005E8 80995238 014B6021 */ addu $t4, $t2, $t3 -/* 005EC 8099523C E492005C */ swc1 $f18, 0x005C($a0) ## 0000005C -/* 005F0 80995240 E4860064 */ swc1 $f6, 0x0064($a0) ## 00000064 -/* 005F4 80995244 A49800B4 */ sh $t8, 0x00B4($a0) ## 000000B4 -/* 005F8 80995248 A48900B6 */ sh $t1, 0x00B6($a0) ## 000000B6 -/* 005FC 8099524C 10400004 */ beq $v0, $zero, .L80995260 -/* 00600 80995250 A48C00B8 */ sh $t4, 0x00B8($a0) ## 000000B8 -/* 00604 80995254 244DFFFF */ addiu $t5, $v0, 0xFFFF ## $t5 = FFFFFFFF -/* 00608 80995258 10000004 */ beq $zero, $zero, .L8099526C -/* 0060C 8099525C A48D021A */ sh $t5, 0x021A($a0) ## 0000021A -.L80995260: -/* 00610 80995260 0C00B55C */ jal Actor_Kill - -/* 00614 80995264 AFA40018 */ sw $a0, 0x0018($sp) -/* 00618 80995268 8FA40018 */ lw $a0, 0x0018($sp) -.L8099526C: -/* 0061C 8099526C 0C00B5FB */ jal func_8002D7EC -/* 00620 80995270 00000000 */ nop -/* 00624 80995274 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00628 80995278 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0062C 8099527C 03E00008 */ jr $ra -/* 00630 80995280 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995284.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995284.s deleted file mode 100644 index ca51157f9b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995284.s +++ /dev/null @@ -1,15 +0,0 @@ -glabel func_80995284 -/* 00634 80995284 AFA50004 */ sw $a1, 0x0004($sp) -/* 00638 80995288 908E01D9 */ lbu $t6, 0x01D9($a0) ## 000001D9 -/* 0063C 8099528C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 00640 80995290 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000 -/* 00644 80995294 11E00006 */ beq $t7, $zero, .L809952B0 -/* 00648 80995298 00000000 */ nop -/* 0064C 8099529C 8C980204 */ lw $t8, 0x0204($a0) ## 00000204 -/* 00650 809952A0 13000003 */ beq $t8, $zero, .L809952B0 -/* 00654 809952A4 00000000 */ nop -/* 00658 809952A8 03E00008 */ jr $ra -/* 0065C 809952AC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L809952B0: -/* 00660 809952B0 03E00008 */ jr $ra -/* 00664 809952B4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809952B8.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809952B8.s deleted file mode 100644 index 91d86301b6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809952B8.s +++ /dev/null @@ -1,28 +0,0 @@ -glabel func_809952B8 -/* 00668 809952B8 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 0066C 809952BC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00670 809952C0 AFA50024 */ sw $a1, 0x0024($sp) -/* 00674 809952C4 248601C8 */ addiu $a2, $a0, 0x01C8 ## $a2 = 000001C8 -/* 00678 809952C8 00C02825 */ or $a1, $a2, $zero ## $a1 = 000001C8 -/* 0067C 809952CC AFA6001C */ sw $a2, 0x001C($sp) -/* 00680 809952D0 0C0189B7 */ jal Collider_UpdateCylinder - -/* 00684 809952D4 AFA40020 */ sw $a0, 0x0020($sp) -/* 00688 809952D8 8FA40024 */ lw $a0, 0x0024($sp) -/* 0068C 809952DC 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00690 809952E0 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00694 809952E4 00812821 */ addu $a1, $a0, $at -/* 00698 809952E8 8FA6001C */ lw $a2, 0x001C($sp) -/* 0069C 809952EC 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 006A0 809952F0 AFA50018 */ sw $a1, 0x0018($sp) -/* 006A4 809952F4 8FA60020 */ lw $a2, 0x0020($sp) -/* 006A8 809952F8 8FA50018 */ lw $a1, 0x0018($sp) -/* 006AC 809952FC 8FA40024 */ lw $a0, 0x0024($sp) -/* 006B0 80995300 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 006B4 80995304 24C60220 */ addiu $a2, $a2, 0x0220 ## $a2 = 00000220 -/* 006B8 80995308 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006BC 8099530C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 006C0 80995310 03E00008 */ jr $ra -/* 006C4 80995314 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995318.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995318.s deleted file mode 100644 index 5d7a5e2619..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995318.s +++ /dev/null @@ -1,24 +0,0 @@ -glabel func_80995318 -/* 006C8 80995318 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 006CC 8099531C AFBF0014 */ sw $ra, 0x0014($sp) -/* 006D0 80995320 AFA5001C */ sw $a1, 0x001C($sp) -/* 006D4 80995324 8486001C */ lh $a2, 0x001C($a0) ## 0000001C -/* 006D8 80995328 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 006DC 8099532C 2401003F */ addiu $at, $zero, 0x003F ## $at = 0000003F -/* 006E0 80995330 00063203 */ sra $a2, $a2, 8 -/* 006E4 80995334 30C6003F */ andi $a2, $a2, 0x003F ## $a2 = 00000000 -/* 006E8 80995338 10C10005 */ beq $a2, $at, .L80995350 -/* 006EC 8099533C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 006F0 80995340 00C02825 */ or $a1, $a2, $zero ## $a1 = 00000000 -/* 006F4 80995344 0C00B2DD */ jal Flags_SetSwitch - -/* 006F8 80995348 AFA70018 */ sw $a3, 0x0018($sp) -/* 006FC 8099534C 8FA70018 */ lw $a3, 0x0018($sp) -.L80995350: -/* 00700 80995350 0C00B55C */ jal Actor_Kill - -/* 00704 80995354 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00708 80995358 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0070C 8099535C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00710 80995360 03E00008 */ jr $ra -/* 00714 80995364 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995368.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995368.s deleted file mode 100644 index e696a94dc4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995368.s +++ /dev/null @@ -1,121 +0,0 @@ -glabel func_80995368 -/* 00718 80995368 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0071C 8099536C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00720 80995370 9482021A */ lhu $v0, 0x021A($a0) ## 0000021A -/* 00724 80995374 3C0F8099 */ lui $t7, %hi(func_80995A84) ## $t7 = 80990000 -/* 00728 80995378 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 0072C 8099537C 18400004 */ blez $v0, .L80995390 -/* 00730 80995380 25EF5A84 */ addiu $t7, $t7, %lo(func_80995A84) ## $t7 = 80995A84 -/* 00734 80995384 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00738 80995388 10000008 */ beq $zero, $zero, .L809953AC -/* 0073C 8099538C A48E021A */ sh $t6, 0x021A($a0) ## 0000021A -.L80995390: -/* 00740 80995390 24180010 */ addiu $t8, $zero, 0x0010 ## $t8 = 00000010 -/* 00744 80995394 ACCF0280 */ sw $t7, 0x0280($a2) ## 00000280 -/* 00748 80995398 A4D8021A */ sh $t8, 0x021A($a2) ## 0000021A -/* 0074C 8099539C 0C2654AE */ jal func_809952B8 -/* 00750 809953A0 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00754 809953A4 10000059 */ beq $zero, $zero, .L8099550C -/* 00758 809953A8 8FBF0014 */ lw $ra, 0x0014($sp) -.L809953AC: -/* 0075C 809953AC 94C2021A */ lhu $v0, 0x021A($a2) ## 0000021A -/* 00760 809953B0 24030002 */ addiu $v1, $zero, 0x0002 ## $v1 = 00000002 -/* 00764 809953B4 28410008 */ slti $at, $v0, 0x0008 -/* 00768 809953B8 14200004 */ bne $at, $zero, .L809953CC -/* 0076C 809953BC 0002CAC0 */ sll $t9, $v0, 11 -/* 00770 809953C0 2728C000 */ addiu $t0, $t9, 0xC000 ## $t0 = FFFFC000 -/* 00774 809953C4 10000003 */ beq $zero, $zero, .L809953D4 -/* 00778 809953C8 A4C800B4 */ sh $t0, 0x00B4($a2) ## 000000B4 -.L809953CC: -/* 0077C 809953CC A4C000B4 */ sh $zero, 0x00B4($a2) ## 000000B4 -/* 00780 809953D0 94C2021A */ lhu $v0, 0x021A($a2) ## 0000021A -.L809953D4: -/* 00784 809953D4 2841000C */ slti $at, $v0, 0x000C -/* 00788 809953D8 1420000B */ bne $at, $zero, .L80995408 -/* 0078C 809953DC 00022023 */ subu $a0, $zero, $v0 -/* 00790 809953E0 00040823 */ subu $at, $zero, $a0 -/* 00794 809953E4 00012140 */ sll $a0, $at, 5 -/* 00798 809953E8 00812023 */ subu $a0, $a0, $at -/* 0079C 809953EC 00042080 */ sll $a0, $a0, 2 -/* 007A0 809953F0 00812021 */ addu $a0, $a0, $at -/* 007A4 809953F4 00042080 */ sll $a0, $a0, 2 -/* 007A8 809953F8 2484E0C0 */ addiu $a0, $a0, 0xE0C0 ## $a0 = FFFFE0C0 -/* 007AC 809953FC 00042400 */ sll $a0, $a0, 16 -/* 007B0 80995400 10000013 */ beq $zero, $zero, .L80995450 -/* 007B4 80995404 00042403 */ sra $a0, $a0, 16 -.L80995408: -/* 007B8 80995408 28410008 */ slti $at, $v0, 0x0008 -/* 007BC 8099540C 54200004 */ bnel $at, $zero, .L80995420 -/* 007C0 80995410 28410005 */ slti $at, $v0, 0x0005 -/* 007C4 80995414 1000000E */ beq $zero, $zero, .L80995450 -/* 007C8 80995418 2404F830 */ addiu $a0, $zero, 0xF830 ## $a0 = FFFFF830 -/* 007CC 8099541C 28410005 */ slti $at, $v0, 0x0005 -.L80995420: -/* 007D0 80995420 1420000B */ bne $at, $zero, .L80995450 -/* 007D4 80995424 00002025 */ or $a0, $zero, $zero ## $a0 = 00000000 -/* 007D8 80995428 00020823 */ subu $at, $zero, $v0 -/* 007DC 8099542C 00012140 */ sll $a0, $at, 5 -/* 007E0 80995430 00812023 */ subu $a0, $a0, $at -/* 007E4 80995434 00042080 */ sll $a0, $a0, 2 -/* 007E8 80995438 00812021 */ addu $a0, $a0, $at -/* 007EC 8099543C 00042080 */ sll $a0, $a0, 2 -/* 007F0 80995440 248407D0 */ addiu $a0, $a0, 0x07D0 ## $a0 = 000007D0 -/* 007F4 80995444 00042400 */ sll $a0, $a0, 16 -/* 007F8 80995448 10000001 */ beq $zero, $zero, .L80995450 -/* 007FC 8099544C 00042403 */ sra $a0, $a0, 16 -.L80995450: -/* 00800 80995450 24C2000C */ addiu $v0, $a2, 0x000C ## $v0 = 0000000C -/* 00804 80995454 00042823 */ subu $a1, $zero, $a0 -.L80995458: -/* 00808 80995458 24630001 */ addiu $v1, $v1, 0x0001 ## $v1 = 00000003 -/* 0080C 8099545C 28610009 */ slti $at, $v1, 0x0009 -/* 00810 80995460 24420006 */ addiu $v0, $v0, 0x0006 ## $v0 = 00000012 -/* 00814 80995464 1420FFFC */ bne $at, $zero, .L80995458 -/* 00818 80995468 A4450190 */ sh $a1, 0x0190($v0) ## 000001A2 -/* 0081C 8099546C 94C2021A */ lhu $v0, 0x021A($a2) ## 0000021A -/* 00820 80995470 28410008 */ slti $at, $v0, 0x0008 -/* 00824 80995474 10200024 */ beq $at, $zero, .L80995508 -/* 00828 80995478 00402025 */ or $a0, $v0, $zero ## $a0 = 00000012 -/* 0082C 8099547C 00042740 */ sll $a0, $a0, 29 -/* 00830 80995480 00042403 */ sra $a0, $a0, 16 -/* 00834 80995484 0C01DE1C */ jal Math_SinS - ## sins? -/* 00838 80995488 AFA60018 */ sw $a2, 0x0018($sp) -/* 0083C 8099548C 8FA60018 */ lw $a2, 0x0018($sp) -/* 00840 80995490 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000 -/* 00844 80995494 94C9021A */ lhu $t1, 0x021A($a2) ## 0000021A -/* 00848 80995498 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00 -/* 0084C 8099549C 05210004 */ bgez $t1, .L809954B0 -/* 00850 809954A0 468021A0 */ cvt.s.w $f6, $f4 -/* 00854 809954A4 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00 -/* 00858 809954A8 00000000 */ nop -/* 0085C 809954AC 46083180 */ add.s $f6, $f6, $f8 -.L809954B0: -/* 00860 809954B0 46060282 */ mul.s $f10, $f0, $f6 -/* 00864 809954B4 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 00868 809954B8 44818000 */ mtc1 $at, $f16 ## $f16 = 100.00 -/* 0086C 809954BC 24C2000C */ addiu $v0, $a2, 0x000C ## $v0 = 0000000C -/* 00870 809954C0 24030005 */ addiu $v1, $zero, 0x0005 ## $v1 = 00000005 -/* 00874 809954C4 00035880 */ sll $t3, $v1, 2 -/* 00878 809954C8 01635823 */ subu $t3, $t3, $v1 -/* 0087C 809954CC 46105482 */ mul.s $f18, $f10, $f16 -/* 00880 809954D0 000B5840 */ sll $t3, $t3, 1 -/* 00884 809954D4 4600910D */ trunc.w.s $f4, $f18 -/* 00888 809954D8 44042000 */ mfc1 $a0, $f4 -/* 0088C 809954DC 00000000 */ nop -/* 00890 809954E0 00042400 */ sll $a0, $a0, 16 -/* 00894 809954E4 00042403 */ sra $a0, $a0, 16 -/* 00898 809954E8 A4440194 */ sh $a0, 0x0194($v0) ## 000001A0 -/* 0089C 809954EC A444019A */ sh $a0, 0x019A($v0) ## 000001A6 -/* 008A0 809954F0 A44401A0 */ sh $a0, 0x01A0($v0) ## 000001AC -/* 008A4 809954F4 00CB1021 */ addu $v0, $a2, $t3 -/* 008A8 809954F8 A444019A */ sh $a0, 0x019A($v0) ## 000001A6 -/* 008AC 809954FC A44401A0 */ sh $a0, 0x01A0($v0) ## 000001AC -/* 008B0 80995500 A44401A6 */ sh $a0, 0x01A6($v0) ## 000001B2 -/* 008B4 80995504 A4440194 */ sh $a0, 0x0194($v0) ## 000001A0 -.L80995508: -/* 008B8 80995508 8FBF0014 */ lw $ra, 0x0014($sp) -.L8099550C: -/* 008BC 8099550C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 008C0 80995510 03E00008 */ jr $ra -/* 008C4 80995514 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995518.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995518.s deleted file mode 100644 index e3ae17ecd4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995518.s +++ /dev/null @@ -1,272 +0,0 @@ -.late_rodata -glabel D_809960DC - .float 0.1 - -glabel D_809960E0 - .float 0.2 - -.text -glabel func_80995518 -/* 008C8 80995518 27BDFF68 */ addiu $sp, $sp, 0xFF68 ## $sp = FFFFFF68 -/* 008CC 8099551C AFBF0044 */ sw $ra, 0x0044($sp) -/* 008D0 80995520 AFB10040 */ sw $s1, 0x0040($sp) -/* 008D4 80995524 AFB0003C */ sw $s0, 0x003C($sp) -/* 008D8 80995528 F7BA0030 */ sdc1 $f26, 0x0030($sp) -/* 008DC 8099552C F7B80028 */ sdc1 $f24, 0x0028($sp) -/* 008E0 80995530 F7B60020 */ sdc1 $f22, 0x0020($sp) -/* 008E4 80995534 F7B40018 */ sdc1 $f20, 0x0018($sp) -/* 008E8 80995538 AFA5009C */ sw $a1, 0x009C($sp) -/* 008EC 8099553C 9482021A */ lhu $v0, 0x021A($a0) ## 0000021A -/* 008F0 80995540 3C0F8099 */ lui $t7, %hi(func_80995368) ## $t7 = 80990000 -/* 008F4 80995544 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 008F8 80995548 18400004 */ blez $v0, .L8099555C -/* 008FC 8099554C 25EF5368 */ addiu $t7, $t7, %lo(func_80995368) ## $t7 = 80995368 -/* 00900 80995550 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00904 80995554 10000005 */ beq $zero, $zero, .L8099556C -/* 00908 80995558 A48E021A */ sh $t6, 0x021A($a0) ## 0000021A -.L8099555C: -/* 0090C 8099555C 24180010 */ addiu $t8, $zero, 0x0010 ## $t8 = 00000010 -/* 00910 80995560 AE2F0280 */ sw $t7, 0x0280($s1) ## 00000280 -/* 00914 80995564 100000D6 */ beq $zero, $zero, .L809958C0 -/* 00918 80995568 A638021A */ sh $t8, 0x021A($s1) ## 0000021A -.L8099556C: -/* 0091C 8099556C 9622021A */ lhu $v0, 0x021A($s1) ## 0000021A -/* 00920 80995570 24040005 */ addiu $a0, $zero, 0x0005 ## $a0 = 00000005 -/* 00924 80995574 00045880 */ sll $t3, $a0, 2 -/* 00928 80995578 28410004 */ slti $at, $v0, 0x0004 -/* 0092C 8099557C 14200007 */ bne $at, $zero, .L8099559C -/* 00930 80995580 01645823 */ subu $t3, $t3, $a0 -/* 00934 80995584 0002C823 */ subu $t9, $zero, $v0 -/* 00938 80995588 00194300 */ sll $t0, $t9, 12 -/* 0093C 8099558C 34018000 */ ori $at, $zero, 0x8000 ## $at = 00008000 -/* 00940 80995590 01014821 */ addu $t1, $t0, $at -/* 00944 80995594 10000004 */ beq $zero, $zero, .L809955A8 -/* 00948 80995598 A62900B4 */ sh $t1, 0x00B4($s1) ## 000000B4 -.L8099559C: -/* 0094C 8099559C 240A4000 */ addiu $t2, $zero, 0x4000 ## $t2 = 00004000 -/* 00950 809955A0 A62A00B4 */ sh $t2, 0x00B4($s1) ## 000000B4 -/* 00954 809955A4 9622021A */ lhu $v0, 0x021A($s1) ## 0000021A -.L809955A8: -/* 00958 809955A8 28410006 */ slti $at, $v0, 0x0006 -/* 0095C 809955AC 1420000C */ bne $at, $zero, .L809955E0 -/* 00960 809955B0 000B5840 */ sll $t3, $t3, 1 -/* 00964 809955B4 00021823 */ subu $v1, $zero, $v0 -/* 00968 809955B8 00030823 */ subu $at, $zero, $v1 -/* 0096C 809955BC 00011940 */ sll $v1, $at, 5 -/* 00970 809955C0 00611823 */ subu $v1, $v1, $at -/* 00974 809955C4 00031880 */ sll $v1, $v1, 2 -/* 00978 809955C8 00611821 */ addu $v1, $v1, $at -/* 0097C 809955CC 00031880 */ sll $v1, $v1, 2 -/* 00980 809955D0 2463F060 */ addiu $v1, $v1, 0xF060 ## $v1 = FFFFF060 -/* 00984 809955D4 00031C00 */ sll $v1, $v1, 16 -/* 00988 809955D8 10000013 */ beq $zero, $zero, .L80995628 -/* 0098C 809955DC 00031C03 */ sra $v1, $v1, 16 -.L809955E0: -/* 00990 809955E0 28410004 */ slti $at, $v0, 0x0004 -/* 00994 809955E4 54200004 */ bnel $at, $zero, .L809955F8 -/* 00998 809955E8 28410003 */ slti $at, $v0, 0x0003 -/* 0099C 809955EC 1000000E */ beq $zero, $zero, .L80995628 -/* 009A0 809955F0 2403FC18 */ addiu $v1, $zero, 0xFC18 ## $v1 = FFFFFC18 -/* 009A4 809955F4 28410003 */ slti $at, $v0, 0x0003 -.L809955F8: -/* 009A8 809955F8 1420000B */ bne $at, $zero, .L80995628 -/* 009AC 809955FC 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -/* 009B0 80995600 00020823 */ subu $at, $zero, $v0 -/* 009B4 80995604 00011940 */ sll $v1, $at, 5 -/* 009B8 80995608 00611823 */ subu $v1, $v1, $at -/* 009BC 8099560C 00031880 */ sll $v1, $v1, 2 -/* 009C0 80995610 00611821 */ addu $v1, $v1, $at -/* 009C4 80995614 00031880 */ sll $v1, $v1, 2 -/* 009C8 80995618 246303E8 */ addiu $v1, $v1, 0x03E8 ## $v1 = 000003E8 -/* 009CC 8099561C 00031C00 */ sll $v1, $v1, 16 -/* 009D0 80995620 10000001 */ beq $zero, $zero, .L80995628 -/* 009D4 80995624 00031C03 */ sra $v1, $v1, 16 -.L80995628: -/* 009D8 80995628 2622000C */ addiu $v0, $s1, 0x000C ## $v0 = 0000000C -/* 009DC 8099562C A4430196 */ sh $v1, 0x0196($v0) ## 000001A2 -/* 009E0 80995630 A443019C */ sh $v1, 0x019C($v0) ## 000001A8 -/* 009E4 80995634 A44301A2 */ sh $v1, 0x01A2($v0) ## 000001AE -/* 009E8 80995638 022B1021 */ addu $v0, $s1, $t3 -/* 009EC 8099563C A443019C */ sh $v1, 0x019C($v0) ## 000001A8 -/* 009F0 80995640 A44301A2 */ sh $v1, 0x01A2($v0) ## 000001AE -/* 009F4 80995644 A44301A8 */ sh $v1, 0x01A8($v0) ## 000001B4 -/* 009F8 80995648 A4430196 */ sh $v1, 0x0196($v0) ## 000001A2 -/* 009FC 8099564C 962C021A */ lhu $t4, 0x021A($s1) ## 0000021A -/* 00A00 80995650 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 00A04 80995654 27AD0084 */ addiu $t5, $sp, 0x0084 ## $t5 = FFFFFFEC -/* 00A08 80995658 15810058 */ bne $t4, $at, .L809957BC -/* 00A0C 8099565C 3C0E8099 */ lui $t6, %hi(D_80996030) ## $t6 = 80990000 -/* 00A10 80995660 25CE6030 */ addiu $t6, $t6, %lo(D_80996030) ## $t6 = 80996030 -/* 00A14 80995664 8DD80000 */ lw $t8, 0x0000($t6) ## 80996030 -/* 00A18 80995668 8DCF0004 */ lw $t7, 0x0004($t6) ## 80996034 -/* 00A1C 8099566C 3C088099 */ lui $t0, %hi(D_8099603C) ## $t0 = 80990000 -/* 00A20 80995670 ADB80000 */ sw $t8, 0x0000($t5) ## FFFFFFEC -/* 00A24 80995674 8DD80008 */ lw $t8, 0x0008($t6) ## 80996038 -/* 00A28 80995678 2508603C */ addiu $t0, $t0, %lo(D_8099603C) ## $t0 = 8099603C -/* 00A2C 8099567C ADAF0004 */ sw $t7, 0x0004($t5) ## FFFFFFF0 -/* 00A30 80995680 ADB80008 */ sw $t8, 0x0008($t5) ## FFFFFFF4 -/* 00A34 80995684 8D0A0000 */ lw $t2, 0x0000($t0) ## 8099603C -/* 00A38 80995688 27B90078 */ addiu $t9, $sp, 0x0078 ## $t9 = FFFFFFE0 -/* 00A3C 8099568C 8D090004 */ lw $t1, 0x0004($t0) ## 80996040 -/* 00A40 80995690 AF2A0000 */ sw $t2, 0x0000($t9) ## FFFFFFE0 -/* 00A44 80995694 8D0A0008 */ lw $t2, 0x0008($t0) ## 80996044 -/* 00A48 80995698 3C018099 */ lui $at, %hi(D_809960DC) ## $at = 80990000 -/* 00A4C 8099569C AF290004 */ sw $t1, 0x0004($t9) ## FFFFFFE4 -/* 00A50 809956A0 AF2A0008 */ sw $t2, 0x0008($t9) ## FFFFFFE8 -/* 00A54 809956A4 C43A60DC */ lwc1 $f26, %lo(D_809960DC)($at) -/* 00A58 809956A8 3C018099 */ lui $at, %hi(D_809960E0) ## $at = 80990000 -/* 00A5C 809956AC C43860E0 */ lwc1 $f24, %lo(D_809960E0)($at) -/* 00A60 809956B0 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -/* 00A64 809956B4 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -.L809956B8: -/* 00A68 809956B8 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 00A6C 809956BC 44816000 */ mtc1 $at, $f12 ## $f12 = 40.00 -/* 00A70 809956C0 0C00CFC8 */ jal Rand_CenteredFloat - -/* 00A74 809956C4 E7A40070 */ swc1 $f4, 0x0070($sp) -/* 00A78 809956C8 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 00A7C 809956CC 44816000 */ mtc1 $at, $f12 ## $f12 = 100.00 -/* 00A80 809956D0 0C00CFBE */ jal Rand_ZeroFloat - -/* 00A84 809956D4 46000586 */ mov.s $f22, $f0 -/* 00A88 809956D8 E7A00074 */ swc1 $f0, 0x0074($sp) -/* 00A8C 809956DC 0C01DE0D */ jal Math_CosS - ## coss? -/* 00A90 809956E0 86240032 */ lh $a0, 0x0032($s1) ## 00000032 -/* 00A94 809956E4 46000506 */ mov.s $f20, $f0 -/* 00A98 809956E8 0C01DE1C */ jal Math_SinS - ## sins? -/* 00A9C 809956EC 86240032 */ lh $a0, 0x0032($s1) ## 00000032 -/* 00AA0 809956F0 C7A60074 */ lwc1 $f6, 0x0074($sp) -/* 00AA4 809956F4 46060202 */ mul.s $f8, $f0, $f6 -/* 00AA8 809956F8 00000000 */ nop -/* 00AAC 809956FC 4616A282 */ mul.s $f10, $f20, $f22 -/* 00AB0 80995700 460A4400 */ add.s $f16, $f8, $f10 -/* 00AB4 80995704 E7B0006C */ swc1 $f16, 0x006C($sp) -/* 00AB8 80995708 0C01DE1C */ jal Math_SinS - ## sins? -/* 00ABC 8099570C 86240032 */ lh $a0, 0x0032($s1) ## 00000032 -/* 00AC0 80995710 46000506 */ mov.s $f20, $f0 -/* 00AC4 80995714 0C01DE0D */ jal Math_CosS - ## coss? -/* 00AC8 80995718 86240032 */ lh $a0, 0x0032($s1) ## 00000032 -/* 00ACC 8099571C C7B20074 */ lwc1 $f18, 0x0074($sp) -/* 00AD0 80995720 4600A187 */ neg.s $f6, $f20 -/* 00AD4 80995724 C7B0006C */ lwc1 $f16, 0x006C($sp) -/* 00AD8 80995728 46120102 */ mul.s $f4, $f0, $f18 -/* 00ADC 8099572C 240B012C */ addiu $t3, $zero, 0x012C ## $t3 = 0000012C -/* 00AE0 80995730 240C001E */ addiu $t4, $zero, 0x001E ## $t4 = 0000001E -/* 00AE4 80995734 46163202 */ mul.s $f8, $f6, $f22 -/* 00AE8 80995738 8FA4009C */ lw $a0, 0x009C($sp) -/* 00AEC 8099573C 27A5006C */ addiu $a1, $sp, 0x006C ## $a1 = FFFFFFD4 -/* 00AF0 80995740 46188482 */ mul.s $f18, $f16, $f24 -/* 00AF4 80995744 27A60084 */ addiu $a2, $sp, 0x0084 ## $a2 = FFFFFFEC -/* 00AF8 80995748 27A70078 */ addiu $a3, $sp, 0x0078 ## $a3 = FFFFFFE0 -/* 00AFC 8099574C 46082280 */ add.s $f10, $f4, $f8 -/* 00B00 80995750 E7B20084 */ swc1 $f18, 0x0084($sp) -/* 00B04 80995754 46009107 */ neg.s $f4, $f18 -/* 00B08 80995758 46185182 */ mul.s $f6, $f10, $f24 -/* 00B0C 8099575C E7AA0074 */ swc1 $f10, 0x0074($sp) -/* 00B10 80995760 461A2202 */ mul.s $f8, $f4, $f26 -/* 00B14 80995764 46003487 */ neg.s $f18, $f6 -/* 00B18 80995768 E7A6008C */ swc1 $f6, 0x008C($sp) -/* 00B1C 8099576C 461A9102 */ mul.s $f4, $f18, $f26 -/* 00B20 80995770 E7A80078 */ swc1 $f8, 0x0078($sp) -/* 00B24 80995774 C7B20070 */ lwc1 $f18, 0x0070($sp) -/* 00B28 80995778 E7A40080 */ swc1 $f4, 0x0080($sp) -/* 00B2C 8099577C C6280024 */ lwc1 $f8, 0x0024($s1) ## 00000024 -/* 00B30 80995780 46088180 */ add.s $f6, $f16, $f8 -/* 00B34 80995784 E7A6006C */ swc1 $f6, 0x006C($sp) -/* 00B38 80995788 C6240028 */ lwc1 $f4, 0x0028($s1) ## 00000028 -/* 00B3C 8099578C 46049400 */ add.s $f16, $f18, $f4 -/* 00B40 80995790 E7B00070 */ swc1 $f16, 0x0070($sp) -/* 00B44 80995794 C628002C */ lwc1 $f8, 0x002C($s1) ## 0000002C -/* 00B48 80995798 AFAC0014 */ sw $t4, 0x0014($sp) -/* 00B4C 8099579C AFAB0010 */ sw $t3, 0x0010($sp) -/* 00B50 809957A0 46085180 */ add.s $f6, $f10, $f8 -/* 00B54 809957A4 0C00A197 */ jal func_8002865C -/* 00B58 809957A8 E7A60074 */ swc1 $f6, 0x0074($sp) -/* 00B5C 809957AC 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 -/* 00B60 809957B0 24010014 */ addiu $at, $zero, 0x0014 ## $at = 00000014 -/* 00B64 809957B4 5601FFC0 */ bnel $s0, $at, .L809956B8 -/* 00B68 809957B8 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -.L809957BC: -/* 00B6C 809957BC 962D0218 */ lhu $t5, 0x0218($s1) ## 00000218 -/* 00B70 809957C0 8FAF009C */ lw $t7, 0x009C($sp) -/* 00B74 809957C4 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00B78 809957C8 31AE0001 */ andi $t6, $t5, 0x0001 ## $t6 = 00000000 -/* 00B7C 809957CC 55C00031 */ bnel $t6, $zero, .L80995894 -/* 00B80 809957D0 96220218 */ lhu $v0, 0x0218($s1) ## 00000218 -/* 00B84 809957D4 8DF01C44 */ lw $s0, 0x1C44($t7) ## 00001C44 -/* 00B88 809957D8 27A50058 */ addiu $a1, $sp, 0x0058 ## $a1 = FFFFFFC0 -/* 00B8C 809957DC 0C00B6F4 */ jal func_8002DBD0 -/* 00B90 809957E0 26060024 */ addiu $a2, $s0, 0x0024 ## $a2 = 00000025 -/* 00B94 809957E4 C7A0005C */ lwc1 $f0, 0x005C($sp) -/* 00B98 809957E8 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 00B9C 809957EC 44811000 */ mtc1 $at, $f2 ## $f2 = 20.00 -/* 00BA0 809957F0 46000005 */ abs.s $f0, $f0 -/* 00BA4 809957F4 4602003C */ c.lt.s $f0, $f2 -/* 00BA8 809957F8 C7A00058 */ lwc1 $f0, 0x0058($sp) -/* 00BAC 809957FC 45020025 */ bc1fl .L80995894 -/* 00BB0 80995800 96220218 */ lhu $v0, 0x0218($s1) ## 00000218 -/* 00BB4 80995804 46000005 */ abs.s $f0, $f0 -/* 00BB8 80995808 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 00BBC 8099580C 4602003C */ c.lt.s $f0, $f2 -/* 00BC0 80995810 C7A00060 */ lwc1 $f0, 0x0060($sp) -/* 00BC4 80995814 4502001F */ bc1fl .L80995894 -/* 00BC8 80995818 96220218 */ lhu $v0, 0x0218($s1) ## 00000218 -/* 00BCC 8099581C 44819000 */ mtc1 $at, $f18 ## $f18 = 100.00 -/* 00BD0 80995820 00000000 */ nop -/* 00BD4 80995824 4612003C */ c.lt.s $f0, $f18 -/* 00BD8 80995828 00000000 */ nop -/* 00BDC 8099582C 45020019 */ bc1fl .L80995894 -/* 00BE0 80995830 96220218 */ lhu $v0, 0x0218($s1) ## 00000218 -/* 00BE4 80995834 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00BE8 80995838 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 00BEC 8099583C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00BF0 80995840 4600203C */ c.lt.s $f4, $f0 -/* 00BF4 80995844 24080010 */ addiu $t0, $zero, 0x0010 ## $t0 = 00000010 -/* 00BF8 80995848 45020012 */ bc1fl .L80995894 -/* 00BFC 8099584C 96220218 */ lhu $v0, 0x0218($s1) ## 00000218 -/* 00C00 80995850 96380218 */ lhu $t8, 0x0218($s1) ## 00000218 -/* 00C04 80995854 44810000 */ mtc1 $at, $f0 ## $f0 = 6.00 -/* 00C08 80995858 8627008A */ lh $a3, 0x008A($s1) ## 0000008A -/* 00C0C 8099585C 37190001 */ ori $t9, $t8, 0x0001 ## $t9 = 00000001 -/* 00C10 80995860 A6390218 */ sh $t9, 0x0218($s1) ## 00000218 -/* 00C14 80995864 44060000 */ mfc1 $a2, $f0 -/* 00C18 80995868 AFA80014 */ sw $t0, 0x0014($sp) -/* 00C1C 8099586C 8FA4009C */ lw $a0, 0x009C($sp) -/* 00C20 80995870 0C00BDB5 */ jal func_8002F6D4 -/* 00C24 80995874 E7A00010 */ swc1 $f0, 0x0010($sp) -/* 00C28 80995878 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00C2C 8099587C 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00C30 80995880 240539DC */ addiu $a1, $zero, 0x39DC ## $a1 = 000039DC -/* 00C34 80995884 02002025 */ or $a0, $s0, $zero ## $a0 = 00000001 -/* 00C38 80995888 0C00BDF7 */ jal func_8002F7DC -/* 00C3C 8099588C 2405083E */ addiu $a1, $zero, 0x083E ## $a1 = 0000083E -/* 00C40 80995890 96220218 */ lhu $v0, 0x0218($s1) ## 00000218 -.L80995894: -/* 00C44 80995894 30490001 */ andi $t1, $v0, 0x0001 ## $t1 = 00000000 -/* 00C48 80995898 5520000A */ bnel $t1, $zero, .L809958C4 -/* 00C4C 8099589C 8FBF0044 */ lw $ra, 0x0044($sp) -/* 00C50 809958A0 962A021A */ lhu $t2, 0x021A($s1) ## 0000021A -/* 00C54 809958A4 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00C58 809958A8 344B0001 */ ori $t3, $v0, 0x0001 ## $t3 = 00000001 -/* 00C5C 809958AC 15410004 */ bne $t2, $at, .L809958C0 -/* 00C60 809958B0 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00C64 809958B4 A62B0218 */ sh $t3, 0x0218($s1) ## 00000218 -/* 00C68 809958B8 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00C6C 809958BC 240539DE */ addiu $a1, $zero, 0x39DE ## $a1 = 000039DE -.L809958C0: -/* 00C70 809958C0 8FBF0044 */ lw $ra, 0x0044($sp) -.L809958C4: -/* 00C74 809958C4 D7B40018 */ ldc1 $f20, 0x0018($sp) -/* 00C78 809958C8 D7B60020 */ ldc1 $f22, 0x0020($sp) -/* 00C7C 809958CC D7B80028 */ ldc1 $f24, 0x0028($sp) -/* 00C80 809958D0 D7BA0030 */ ldc1 $f26, 0x0030($sp) -/* 00C84 809958D4 8FB0003C */ lw $s0, 0x003C($sp) -/* 00C88 809958D8 8FB10040 */ lw $s1, 0x0040($sp) -/* 00C8C 809958DC 03E00008 */ jr $ra -/* 00C90 809958E0 27BD0098 */ addiu $sp, $sp, 0x0098 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809958E4.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809958E4.s deleted file mode 100644 index 1bd5092c46..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809958E4.s +++ /dev/null @@ -1,102 +0,0 @@ -glabel func_809958E4 -/* 00C94 809958E4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00C98 809958E8 AFBF001C */ sw $ra, 0x001C($sp) -/* 00C9C 809958EC AFB00018 */ sw $s0, 0x0018($sp) -/* 00CA0 809958F0 AFA50024 */ sw $a1, 0x0024($sp) -/* 00CA4 809958F4 9482021A */ lhu $v0, 0x021A($a0) ## 0000021A -/* 00CA8 809958F8 24010010 */ addiu $at, $zero, 0x0010 ## $at = 00000010 -/* 00CAC 809958FC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00CB0 80995900 10410003 */ beq $v0, $at, .L80995910 -/* 00CB4 80995904 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000 -/* 00CB8 80995908 24010008 */ addiu $at, $zero, 0x0008 ## $at = 00000008 -/* 00CBC 8099590C 14410005 */ bne $v0, $at, .L80995924 -.L80995910: -/* 00CC0 80995910 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00CC4 80995914 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00CC8 80995918 240539DB */ addiu $a1, $zero, 0x39DB ## $a1 = 000039DB -/* 00CCC 8099591C 9602021A */ lhu $v0, 0x021A($s0) ## 0000021A -/* 00CD0 80995920 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000 -.L80995924: -/* 00CD4 80995924 18600004 */ blez $v1, .L80995938 -/* 00CD8 80995928 3C0F8099 */ lui $t7, %hi(func_80995518) ## $t7 = 80990000 -/* 00CDC 8099592C 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00CE0 80995930 10000009 */ beq $zero, $zero, .L80995958 -/* 00CE4 80995934 A60E021A */ sh $t6, 0x021A($s0) ## 0000021A -.L80995938: -/* 00CE8 80995938 96190218 */ lhu $t9, 0x0218($s0) ## 00000218 -/* 00CEC 8099593C 25EF5518 */ addiu $t7, $t7, %lo(func_80995518) ## $t7 = 80995518 -/* 00CF0 80995940 24180008 */ addiu $t8, $zero, 0x0008 ## $t8 = 00000008 -/* 00CF4 80995944 3328FFFE */ andi $t0, $t9, 0xFFFE ## $t0 = 00000000 -/* 00CF8 80995948 AE0F0280 */ sw $t7, 0x0280($s0) ## 00000280 -/* 00CFC 8099594C A618021A */ sh $t8, 0x021A($s0) ## 0000021A -/* 00D00 80995950 1000003A */ beq $zero, $zero, .L80995A3C -/* 00D04 80995954 A6080218 */ sh $t0, 0x0218($s0) ## 00000218 -.L80995958: -/* 00D08 80995958 9604021A */ lhu $a0, 0x021A($s0) ## 0000021A -/* 00D0C 8099595C 00042340 */ sll $a0, $a0, 13 -/* 00D10 80995960 00042400 */ sll $a0, $a0, 16 -/* 00D14 80995964 0C01DE1C */ jal Math_SinS - ## sins? -/* 00D18 80995968 00042403 */ sra $a0, $a0, 16 -/* 00D1C 8099596C 9609021A */ lhu $t1, 0x021A($s0) ## 0000021A -/* 00D20 80995970 3C014F80 */ lui $at, 0x4F80 ## $at = 4F800000 -/* 00D24 80995974 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00 -/* 00D28 80995978 05210004 */ bgez $t1, .L8099598C -/* 00D2C 8099597C 468021A0 */ cvt.s.w $f6, $f4 -/* 00D30 80995980 44814000 */ mtc1 $at, $f8 ## $f8 = 4294967296.00 -/* 00D34 80995984 00000000 */ nop -/* 00D38 80995988 46083180 */ add.s $f6, $f6, $f8 -.L8099598C: -/* 00D3C 8099598C 46060282 */ mul.s $f10, $f0, $f6 -/* 00D40 80995990 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 00D44 80995994 44818000 */ mtc1 $at, $f16 ## $f16 = 100.00 -/* 00D48 80995998 24040002 */ addiu $a0, $zero, 0x0002 ## $a0 = 00000002 -/* 00D4C 8099599C 2602000C */ addiu $v0, $s0, 0x000C ## $v0 = 0000000C -/* 00D50 809959A0 46105482 */ mul.s $f18, $f10, $f16 -/* 00D54 809959A4 4600910D */ trunc.w.s $f4, $f18 -/* 00D58 809959A8 44032000 */ mfc1 $v1, $f4 -/* 00D5C 809959AC 00000000 */ nop -/* 00D60 809959B0 00031C00 */ sll $v1, $v1, 16 -/* 00D64 809959B4 00031C03 */ sra $v1, $v1, 16 -.L809959B8: -/* 00D68 809959B8 24840001 */ addiu $a0, $a0, 0x0001 ## $a0 = 00000003 -/* 00D6C 809959BC 28810009 */ slti $at, $a0, 0x0009 -/* 00D70 809959C0 24420006 */ addiu $v0, $v0, 0x0006 ## $v0 = 00000012 -/* 00D74 809959C4 1420FFFC */ bne $at, $zero, .L809959B8 -/* 00D78 809959C8 A443018E */ sh $v1, 0x018E($v0) ## 000001A0 -/* 00D7C 809959CC 9604021A */ lhu $a0, 0x021A($s0) ## 0000021A -/* 00D80 809959D0 00042300 */ sll $a0, $a0, 12 -/* 00D84 809959D4 00042400 */ sll $a0, $a0, 16 -/* 00D88 809959D8 0C01DE0D */ jal Math_CosS - ## coss? -/* 00D8C 809959DC 00042403 */ sra $a0, $a0, 16 -/* 00D90 809959E0 3C01447A */ lui $at, 0x447A ## $at = 447A0000 -/* 00D94 809959E4 44813000 */ mtc1 $at, $f6 ## $f6 = 1000.00 -/* 00D98 809959E8 46000207 */ neg.s $f8, $f0 -/* 00D9C 809959EC 2602000C */ addiu $v0, $s0, 0x000C ## $v0 = 0000000C -/* 00DA0 809959F0 46064282 */ mul.s $f10, $f8, $f6 -/* 00DA4 809959F4 24040005 */ addiu $a0, $zero, 0x0005 ## $a0 = 00000005 -/* 00DA8 809959F8 00046080 */ sll $t4, $a0, 2 -/* 00DAC 809959FC 01846023 */ subu $t4, $t4, $a0 -/* 00DB0 80995A00 000C6040 */ sll $t4, $t4, 1 -/* 00DB4 80995A04 4600540D */ trunc.w.s $f16, $f10 -/* 00DB8 80995A08 44038000 */ mfc1 $v1, $f16 -/* 00DBC 80995A0C 00000000 */ nop -/* 00DC0 80995A10 246303E8 */ addiu $v1, $v1, 0x03E8 ## $v1 = 000003E8 -/* 00DC4 80995A14 00031C00 */ sll $v1, $v1, 16 -/* 00DC8 80995A18 00031C03 */ sra $v1, $v1, 16 -/* 00DCC 80995A1C A4430196 */ sh $v1, 0x0196($v0) ## 000001A2 -/* 00DD0 80995A20 A443019C */ sh $v1, 0x019C($v0) ## 000001A8 -/* 00DD4 80995A24 A44301A2 */ sh $v1, 0x01A2($v0) ## 000001AE -/* 00DD8 80995A28 020C1021 */ addu $v0, $s0, $t4 -/* 00DDC 80995A2C A443019C */ sh $v1, 0x019C($v0) ## 000001A8 -/* 00DE0 80995A30 A44301A2 */ sh $v1, 0x01A2($v0) ## 000001AE -/* 00DE4 80995A34 A44301A8 */ sh $v1, 0x01A8($v0) ## 000001B4 -/* 00DE8 80995A38 A4430196 */ sh $v1, 0x0196($v0) ## 000001A2 -.L80995A3C: -/* 00DEC 80995A3C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00DF0 80995A40 8FB00018 */ lw $s0, 0x0018($sp) -/* 00DF4 80995A44 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00DF8 80995A48 03E00008 */ jr $ra -/* 00DFC 80995A4C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A50.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A50.s deleted file mode 100644 index 7fb42fc9fd..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A50.s +++ /dev/null @@ -1,15 +0,0 @@ -glabel func_80995A50 -/* 00E00 80995A50 AFA50004 */ sw $a1, 0x0004($sp) -/* 00E04 80995A54 9482021A */ lhu $v0, 0x021A($a0) ## 0000021A -/* 00E08 80995A58 3C188099 */ lui $t8, %hi(func_809958E4) ## $t8 = 80990000 -/* 00E0C 80995A5C 240F0010 */ addiu $t7, $zero, 0x0010 ## $t7 = 00000010 -/* 00E10 80995A60 18400004 */ blez $v0, .L80995A74 -/* 00E14 80995A64 271858E4 */ addiu $t8, $t8, %lo(func_809958E4) ## $t8 = 809958E4 -/* 00E18 80995A68 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00E1C 80995A6C 03E00008 */ jr $ra -/* 00E20 80995A70 A48E021A */ sh $t6, 0x021A($a0) ## 0000021A -.L80995A74: -/* 00E24 80995A74 A48F021A */ sh $t7, 0x021A($a0) ## 0000021A -/* 00E28 80995A78 AC980280 */ sw $t8, 0x0280($a0) ## 00000280 -/* 00E2C 80995A7C 03E00008 */ jr $ra -/* 00E30 80995A80 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s deleted file mode 100644 index d2545a8c6f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s +++ /dev/null @@ -1,164 +0,0 @@ -glabel func_80995A84 -/* 00E34 80995A84 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 00E38 80995A88 AFBF001C */ sw $ra, 0x001C($sp) -/* 00E3C 80995A8C AFB00018 */ sw $s0, 0x0018($sp) -/* 00E40 80995A90 AFA50044 */ sw $a1, 0x0044($sp) -/* 00E44 80995A94 8CA71C44 */ lw $a3, 0x1C44($a1) ## 00001C44 -/* 00E48 80995A98 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00E4C 80995A9C 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF0 -/* 00E50 80995AA0 24E60024 */ addiu $a2, $a3, 0x0024 ## $a2 = 00000024 -/* 00E54 80995AA4 0C00B6F4 */ jal func_8002DBD0 -/* 00E58 80995AA8 AFA7003C */ sw $a3, 0x003C($sp) -/* 00E5C 80995AAC 920F0191 */ lbu $t7, 0x0191($s0) ## 00000191 -/* 00E60 80995AB0 8FA7003C */ lw $a3, 0x003C($sp) -/* 00E64 80995AB4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00E68 80995AB8 11E00008 */ beq $t7, $zero, .L80995ADC -/* 00E6C 80995ABC 8FA50044 */ lw $a1, 0x0044($sp) -/* 00E70 80995AC0 3C188099 */ lui $t8, %hi(func_80995A50) ## $t8 = 80990000 -/* 00E74 80995AC4 27185A50 */ addiu $t8, $t8, %lo(func_80995A50) ## $t8 = 80995A50 -/* 00E78 80995AC8 2419000A */ addiu $t9, $zero, 0x000A ## $t9 = 0000000A -/* 00E7C 80995ACC AE180280 */ sw $t8, 0x0280($s0) ## 00000280 -/* 00E80 80995AD0 A619021A */ sh $t9, 0x021A($s0) ## 0000021A -/* 00E84 80995AD4 1000007C */ beq $zero, $zero, .L80995CC8 -/* 00E88 80995AD8 A2000191 */ sb $zero, 0x0191($s0) ## 00000191 -.L80995ADC: -/* 00E8C 80995ADC 0C2654A1 */ jal func_80995284 -/* 00E90 80995AE0 AFA7003C */ sw $a3, 0x003C($sp) -/* 00E94 80995AE4 1040001C */ beq $v0, $zero, .L80995B58 -/* 00E98 80995AE8 8FA7003C */ lw $a3, 0x003C($sp) -/* 00E9C 80995AEC 8E080204 */ lw $t0, 0x0204($s0) ## 00000204 -/* 00EA0 80995AF0 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00EA4 80995AF4 3421FFA6 */ ori $at, $at, 0xFFA6 ## $at = 0001FFA6 -/* 00EA8 80995AF8 8D020000 */ lw $v0, 0x0000($t0) ## 00000000 -/* 00EAC 80995AFC 240A0010 */ addiu $t2, $zero, 0x0010 ## $t2 = 00000010 -/* 00EB0 80995B00 3C0B8099 */ lui $t3, %hi(func_809958E4) ## $t3 = 80990000 -/* 00EB4 80995B04 00414824 */ and $t1, $v0, $at -/* 00EB8 80995B08 11200005 */ beq $t1, $zero, .L80995B20 -/* 00EBC 80995B0C 304C0048 */ andi $t4, $v0, 0x0048 ## $t4 = 00000000 -/* 00EC0 80995B10 256B58E4 */ addiu $t3, $t3, %lo(func_809958E4) ## $t3 = 809958E4 -/* 00EC4 80995B14 A60A021A */ sh $t2, 0x021A($s0) ## 0000021A -/* 00EC8 80995B18 10000068 */ beq $zero, $zero, .L80995CBC -/* 00ECC 80995B1C AE0B0280 */ sw $t3, 0x0280($s0) ## 00000280 -.L80995B20: -/* 00ED0 80995B20 11800066 */ beq $t4, $zero, .L80995CBC -/* 00ED4 80995B24 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00ED8 80995B28 0C265408 */ jal func_80995020 -/* 00EDC 80995B2C 8FA50044 */ lw $a1, 0x0044($sp) -/* 00EE0 80995B30 3C0D8099 */ lui $t5, %hi(func_80995318) ## $t5 = 80990000 -/* 00EE4 80995B34 25AD5318 */ addiu $t5, $t5, %lo(func_80995318) ## $t5 = 80995318 -/* 00EE8 80995B38 AE0D0280 */ sw $t5, 0x0280($s0) ## 00000280 -/* 00EEC 80995B3C 8FA40044 */ lw $a0, 0x0044($sp) -/* 00EF0 80995B40 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00EF4 80995B44 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014 -/* 00EF8 80995B48 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 00EFC 80995B4C 240739DD */ addiu $a3, $zero, 0x39DD ## $a3 = 000039DD -/* 00F00 80995B50 1000005B */ beq $zero, $zero, .L80995CC0 -/* 00F04 80995B54 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80995B58: -/* 00F08 80995B58 8FA40044 */ lw $a0, 0x0044($sp) -/* 00F0C 80995B5C 26050220 */ addiu $a1, $s0, 0x0220 ## $a1 = 00000220 -/* 00F10 80995B60 0C00CD90 */ jal Actor_GetCollidedExplosive -/* 00F14 80995B64 AFA7003C */ sw $a3, 0x003C($sp) -/* 00F18 80995B68 1040000E */ beq $v0, $zero, .L80995BA4 -/* 00F1C 80995B6C 8FA7003C */ lw $a3, 0x003C($sp) -/* 00F20 80995B70 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00F24 80995B74 0C265408 */ jal func_80995020 -/* 00F28 80995B78 8FA50044 */ lw $a1, 0x0044($sp) -/* 00F2C 80995B7C 3C0E8099 */ lui $t6, %hi(func_80995318) ## $t6 = 80990000 -/* 00F30 80995B80 25CE5318 */ addiu $t6, $t6, %lo(func_80995318) ## $t6 = 80995318 -/* 00F34 80995B84 AE0E0280 */ sw $t6, 0x0280($s0) ## 00000280 -/* 00F38 80995B88 8FA40044 */ lw $a0, 0x0044($sp) -/* 00F3C 80995B8C 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00F40 80995B90 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014 -/* 00F44 80995B94 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 00F48 80995B98 240739DD */ addiu $a3, $zero, 0x39DD ## $a3 = 000039DD -/* 00F4C 80995B9C 10000048 */ beq $zero, $zero, .L80995CC0 -/* 00F50 80995BA0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80995BA4: -/* 00F54 80995BA4 8FA40044 */ lw $a0, 0x0044($sp) -/* 00F58 80995BA8 0C023A62 */ jal Player_InCsMode -/* 00F5C 80995BAC AFA7003C */ sw $a3, 0x003C($sp) -/* 00F60 80995BB0 14400042 */ bne $v0, $zero, .L80995CBC -/* 00F64 80995BB4 8FA7003C */ lw $a3, 0x003C($sp) -/* 00F68 80995BB8 C7A00034 */ lwc1 $f0, 0x0034($sp) -/* 00F6C 80995BBC 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 00F70 80995BC0 44811000 */ mtc1 $at, $f2 ## $f2 = 20.00 -/* 00F74 80995BC4 46000005 */ abs.s $f0, $f0 -/* 00F78 80995BC8 4602003C */ c.lt.s $f0, $f2 -/* 00F7C 80995BCC C7A00030 */ lwc1 $f0, 0x0030($sp) -/* 00F80 80995BD0 4502003B */ bc1fl .L80995CC0 -/* 00F84 80995BD4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00F88 80995BD8 46000005 */ abs.s $f0, $f0 -/* 00F8C 80995BDC C7A40038 */ lwc1 $f4, 0x0038($sp) -/* 00F90 80995BE0 4602003C */ c.lt.s $f0, $f2 -/* 00F94 80995BE4 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 00F98 80995BE8 45020035 */ bc1fl .L80995CC0 -/* 00F9C 80995BEC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00FA0 80995BF0 44813000 */ mtc1 $at, $f6 ## $f6 = 50.00 -/* 00FA4 80995BF4 00000000 */ nop -/* 00FA8 80995BF8 4606203C */ c.lt.s $f4, $f6 -/* 00FAC 80995BFC 00000000 */ nop -/* 00FB0 80995C00 4502002F */ bc1fl .L80995CC0 -/* 00FB4 80995C04 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00FB8 80995C08 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 00FBC 80995C0C 00000000 */ nop -/* 00FC0 80995C10 4604003C */ c.lt.s $f0, $f4 -/* 00FC4 80995C14 00000000 */ nop -/* 00FC8 80995C18 45020029 */ bc1fl .L80995CC0 -/* 00FCC 80995C1C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00FD0 80995C20 84EF00B6 */ lh $t7, 0x00B6($a3) ## 000000B6 -/* 00FD4 80995C24 861800B6 */ lh $t8, 0x00B6($s0) ## 000000B6 -/* 00FD8 80995C28 4604003C */ c.lt.s $f0, $f4 -/* 00FDC 80995C2C 34198000 */ ori $t9, $zero, 0x8000 ## $t9 = 00008000 -/* 00FE0 80995C30 01F81023 */ subu $v0, $t7, $t8 -/* 00FE4 80995C34 00021400 */ sll $v0, $v0, 16 -/* 00FE8 80995C38 45000004 */ bc1f .L80995C4C -/* 00FEC 80995C3C 00021403 */ sra $v0, $v0, 16 -/* 00FF0 80995C40 03221023 */ subu $v0, $t9, $v0 -/* 00FF4 80995C44 00021400 */ sll $v0, $v0, 16 -/* 00FF8 80995C48 00021403 */ sra $v0, $v0, 16 -.L80995C4C: -/* 00FFC 80995C4C 04400003 */ bltz $v0, .L80995C5C -/* 01000 80995C50 00021823 */ subu $v1, $zero, $v0 -/* 01004 80995C54 10000001 */ beq $zero, $zero, .L80995C5C -/* 01008 80995C58 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000 -.L80995C5C: -/* 0100C 80995C5C 28613000 */ slti $at, $v1, 0x3000 -/* 01010 80995C60 10200016 */ beq $at, $zero, .L80995CBC -/* 01014 80995C64 24080003 */ addiu $t0, $zero, 0x0003 ## $t0 = 00000003 -/* 01018 80995C68 A0E8042C */ sb $t0, 0x042C($a3) ## 0000042C -/* 0101C 80995C6C C7A80038 */ lwc1 $f8, 0x0038($sp) -/* 01020 80995C70 3C01BF80 */ lui $at, 0xBF80 ## $at = BF800000 -/* 01024 80995C74 4608003E */ c.le.s $f0, $f8 -/* 01028 80995C78 00000000 */ nop -/* 0102C 80995C7C 45020009 */ bc1fl .L80995CA4 -/* 01030 80995C80 44819000 */ mtc1 $at, $f18 ## $f18 = -1.00 -/* 01034 80995C84 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 01038 80995C88 44815000 */ mtc1 $at, $f10 ## $f10 = 1.00 -/* 0103C 80995C8C 00000000 */ nop -/* 01040 80995C90 4600540D */ trunc.w.s $f16, $f10 -/* 01044 80995C94 440A8000 */ mfc1 $t2, $f16 -/* 01048 80995C98 10000007 */ beq $zero, $zero, .L80995CB8 -/* 0104C 80995C9C A0EA042D */ sb $t2, 0x042D($a3) ## 0000042D -/* 01050 80995CA0 44819000 */ mtc1 $at, $f18 ## $f18 = 1.00 -.L80995CA4: -/* 01054 80995CA4 00000000 */ nop -/* 01058 80995CA8 4600918D */ trunc.w.s $f6, $f18 -/* 0105C 80995CAC 440C3000 */ mfc1 $t4, $f6 -/* 01060 80995CB0 00000000 */ nop -/* 01064 80995CB4 A0EC042D */ sb $t4, 0x042D($a3) ## 0000042D -.L80995CB8: -/* 01068 80995CB8 ACF00430 */ sw $s0, 0x0430($a3) ## 00000430 -.L80995CBC: -/* 0106C 80995CBC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80995CC0: -/* 01070 80995CC0 0C2654AE */ jal func_809952B8 -/* 01074 80995CC4 8FA50044 */ lw $a1, 0x0044($sp) -.L80995CC8: -/* 01078 80995CC8 8FBF001C */ lw $ra, 0x001C($sp) -/* 0107C 80995CCC 8FB00018 */ lw $s0, 0x0018($sp) -/* 01080 80995CD0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 01084 80995CD4 03E00008 */ jr $ra -/* 01088 80995CD8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995CDC.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995CDC.s deleted file mode 100644 index 32217c267d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995CDC.s +++ /dev/null @@ -1,37 +0,0 @@ -glabel func_80995CDC -/* 0108C 80995CDC 908E021C */ lbu $t6, 0x021C($a0) ## 0000021C -/* 01090 80995CE0 3C060001 */ lui $a2, 0x0001 ## $a2 = 00010000 -/* 01094 80995CE4 3C038016 */ lui $v1, %hi(gSegments) -/* 01098 80995CE8 000E7900 */ sll $t7, $t6, 4 -/* 0109C 80995CEC 01EE7821 */ addu $t7, $t7, $t6 -/* 010A0 80995CF0 000F7880 */ sll $t7, $t7, 2 -/* 010A4 80995CF4 00AFC021 */ addu $t8, $a1, $t7 -/* 010A8 80995CF8 0306C821 */ addu $t9, $t8, $a2 -/* 010AC 80995CFC 8F2817B4 */ lw $t0, 0x17B4($t9) ## 000017B4 -/* 010B0 80995D00 3C078000 */ lui $a3, 0x8000 ## $a3 = 80000000 -/* 010B4 80995D04 24636FA8 */ addiu $v1, %lo(gSegments) -/* 010B8 80995D08 01074821 */ addu $t1, $t0, $a3 -/* 010BC 80995D0C AC690018 */ sw $t1, 0x0018($v1) ## 80166FC0 -/* 010C0 80995D10 8C820214 */ lw $v0, 0x0214($a0) ## 00000214 -/* 010C4 80995D14 8088001E */ lb $t0, 0x001E($a0) ## 0000001E -/* 010C8 80995D18 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 010CC 80995D1C 00025100 */ sll $t2, $v0, 4 -/* 010D0 80995D20 000A5F02 */ srl $t3, $t2, 28 -/* 010D4 80995D24 000B6080 */ sll $t4, $t3, 2 -/* 010D8 80995D28 006C6821 */ addu $t5, $v1, $t4 -/* 010DC 80995D2C 8DAE0000 */ lw $t6, 0x0000($t5) ## 00000000 -/* 010E0 80995D30 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 010E4 80995D34 00417824 */ and $t7, $v0, $at -/* 010E8 80995D38 00084900 */ sll $t1, $t0, 4 -/* 010EC 80995D3C 01284821 */ addu $t1, $t1, $t0 -/* 010F0 80995D40 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 010F4 80995D44 00094880 */ sll $t1, $t1, 2 -/* 010F8 80995D48 01CFC021 */ addu $t8, $t6, $t7 -/* 010FC 80995D4C 0301C821 */ addu $t9, $t8, $at -/* 01100 80995D50 00A95021 */ addu $t2, $a1, $t1 -/* 01104 80995D54 AC990214 */ sw $t9, 0x0214($a0) ## 00000214 -/* 01108 80995D58 01465821 */ addu $t3, $t2, $a2 -/* 0110C 80995D5C 8D6C17B4 */ lw $t4, 0x17B4($t3) ## 000017B4 -/* 01110 80995D60 01876821 */ addu $t5, $t4, $a3 -/* 01114 80995D64 03E00008 */ jr $ra -/* 01118 80995D68 AC6D0018 */ sw $t5, 0x0018($v1) ## 80166FC0 diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995D6C.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995D6C.s deleted file mode 100644 index 59acecc560..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995D6C.s +++ /dev/null @@ -1,59 +0,0 @@ -.late_rodata -glabel jtbl_809960E4 -.word L80995DD8 -.word L80995DF4 -.word L80995DF4 -.word L80995DF4 -.word L80995DF4 -.word 0x00000000, 0x00000000 - -.text -glabel func_80995D6C -/* 0111C 80995D6C 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 01120 80995D70 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 01124 80995D74 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 01128 80995D78 342117A4 */ ori $at, $at, 0x17A4 ## $at = 000117A4 -/* 0112C 80995D7C AFBF0014 */ sw $ra, 0x0014($sp) -/* 01130 80995D80 AFA5001C */ sw $a1, 0x001C($sp) -/* 01134 80995D84 00A12021 */ addu $a0, $a1, $at -/* 01138 80995D88 90C5021C */ lbu $a1, 0x021C($a2) ## 0000021C -/* 0113C 80995D8C 0C026062 */ jal Object_IsLoaded - -/* 01140 80995D90 AFA60018 */ sw $a2, 0x0018($sp) -/* 01144 80995D94 1040001D */ beq $v0, $zero, .L80995E0C -/* 01148 80995D98 8FA60018 */ lw $a2, 0x0018($sp) -/* 0114C 80995D9C 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 01150 80995DA0 8FA5001C */ lw $a1, 0x001C($sp) -/* 01154 80995DA4 0C265737 */ jal func_80995CDC -/* 01158 80995DA8 AFA60018 */ sw $a2, 0x0018($sp) -/* 0115C 80995DAC 8FA60018 */ lw $a2, 0x0018($sp) -/* 01160 80995DB0 84CE001C */ lh $t6, 0x001C($a2) ## 0000001C -/* 01164 80995DB4 31CF00FF */ andi $t7, $t6, 0x00FF ## $t7 = 00000000 -/* 01168 80995DB8 2DE10005 */ sltiu $at, $t7, 0x0005 -/* 0116C 80995DBC 10200013 */ beq $at, $zero, .L80995E0C -/* 01170 80995DC0 000F7880 */ sll $t7, $t7, 2 -/* 01174 80995DC4 3C018099 */ lui $at, %hi(jtbl_809960E4) ## $at = 80990000 -/* 01178 80995DC8 002F0821 */ addu $at, $at, $t7 -/* 0117C 80995DCC 8C2F60E4 */ lw $t7, %lo(jtbl_809960E4)($at) -/* 01180 80995DD0 01E00008 */ jr $t7 -/* 01184 80995DD4 00000000 */ nop -glabel L80995DD8 -/* 01188 80995DD8 3C188099 */ lui $t8, %hi(func_80995A84) ## $t8 = 80990000 -/* 0118C 80995DDC 3C198099 */ lui $t9, %hi(func_80995EC4) ## $t9 = 80990000 -/* 01190 80995DE0 27185A84 */ addiu $t8, $t8, %lo(func_80995A84) ## $t8 = 80995A84 -/* 01194 80995DE4 27395EC4 */ addiu $t9, $t9, %lo(func_80995EC4) ## $t9 = 80995EC4 -/* 01198 80995DE8 ACD80280 */ sw $t8, 0x0280($a2) ## 00000280 -/* 0119C 80995DEC 10000007 */ beq $zero, $zero, .L80995E0C -/* 011A0 80995DF0 ACD90134 */ sw $t9, 0x0134($a2) ## 00000134 -glabel L80995DF4 -/* 011A4 80995DF4 3C088099 */ lui $t0, %hi(func_809951C4) ## $t0 = 80990000 -/* 011A8 80995DF8 3C098099 */ lui $t1, %hi(func_80995F1C) ## $t1 = 80990000 -/* 011AC 80995DFC 250851C4 */ addiu $t0, $t0, %lo(func_809951C4) ## $t0 = 809951C4 -/* 011B0 80995E00 25295F1C */ addiu $t1, $t1, %lo(func_80995F1C) ## $t1 = 80995F1C -/* 011B4 80995E04 ACC80280 */ sw $t0, 0x0280($a2) ## 00000280 -/* 011B8 80995E08 ACC90134 */ sw $t1, 0x0134($a2) ## 00000134 -.L80995E0C: -/* 011BC 80995E0C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 011C0 80995E10 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 011C4 80995E14 03E00008 */ jr $ra -/* 011C8 80995E18 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995E40.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995E40.s deleted file mode 100644 index c39e3cc036..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995E40.s +++ /dev/null @@ -1,44 +0,0 @@ -.rdata -glabel D_80996080 - .asciz "../z_door_killer.c" - .balign 4 - -glabel D_80996094 - .asciz "../z_door_killer.c" - .balign 4 - -.text -glabel func_80995E40 -/* 011F0 80995E40 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 011F4 80995E44 AFBF0014 */ sw $ra, 0x0014($sp) -/* 011F8 80995E48 AFA40040 */ sw $a0, 0x0040($sp) -/* 011FC 80995E4C AFA50044 */ sw $a1, 0x0044($sp) -/* 01200 80995E50 8C8F0214 */ lw $t7, 0x0214($a0) ## 00000214 -/* 01204 80995E54 3C068099 */ lui $a2, %hi(D_80996080) ## $a2 = 80990000 -/* 01208 80995E58 24C66080 */ addiu $a2, $a2, %lo(D_80996080) ## $a2 = 80996080 -/* 0120C 80995E5C AFAF0038 */ sw $t7, 0x0038($sp) -/* 01210 80995E60 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 01214 80995E64 27A40024 */ addiu $a0, $sp, 0x0024 ## $a0 = FFFFFFE4 -/* 01218 80995E68 24070373 */ addiu $a3, $zero, 0x0373 ## $a3 = 00000373 -/* 0121C 80995E6C 0C031AB1 */ jal Graph_OpenDisps -/* 01220 80995E70 AFA50034 */ sw $a1, 0x0034($sp) -/* 01224 80995E74 8FA80034 */ lw $t0, 0x0034($sp) -/* 01228 80995E78 3C09DB06 */ lui $t1, 0xDB06 ## $t1 = DB060000 -/* 0122C 80995E7C 35290020 */ ori $t1, $t1, 0x0020 ## $t1 = DB060020 -/* 01230 80995E80 8D0302C0 */ lw $v1, 0x02C0($t0) ## 000002C0 -/* 01234 80995E84 3C068099 */ lui $a2, %hi(D_80996094) ## $a2 = 80990000 -/* 01238 80995E88 24C66094 */ addiu $a2, $a2, %lo(D_80996094) ## $a2 = 80996094 -/* 0123C 80995E8C 24790008 */ addiu $t9, $v1, 0x0008 ## $t9 = 00000008 -/* 01240 80995E90 AD1902C0 */ sw $t9, 0x02C0($t0) ## 000002C0 -/* 01244 80995E94 AC690000 */ sw $t1, 0x0000($v1) ## 00000000 -/* 01248 80995E98 8FAA0038 */ lw $t2, 0x0038($sp) -/* 0124C 80995E9C 27A40024 */ addiu $a0, $sp, 0x0024 ## $a0 = FFFFFFE4 -/* 01250 80995EA0 24070375 */ addiu $a3, $zero, 0x0375 ## $a3 = 00000375 -/* 01254 80995EA4 AC6A0004 */ sw $t2, 0x0004($v1) ## 00000004 -/* 01258 80995EA8 8FAB0044 */ lw $t3, 0x0044($sp) -/* 0125C 80995EAC 0C031AD5 */ jal Graph_CloseDisps -/* 01260 80995EB0 8D650000 */ lw $a1, 0x0000($t3) ## 00000000 -/* 01264 80995EB4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 01268 80995EB8 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 0126C 80995EBC 03E00008 */ jr $ra -/* 01270 80995EC0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995EC4.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995EC4.s deleted file mode 100644 index 88d7c886db..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995EC4.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_80995EC4 -/* 01274 80995EC4 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 01278 80995EC8 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0127C 80995ECC AFA40028 */ sw $a0, 0x0028($sp) -/* 01280 80995ED0 AFA5002C */ sw $a1, 0x002C($sp) -/* 01284 80995ED4 0C0250F2 */ jal func_800943C8 -/* 01288 80995ED8 8CA40000 */ lw $a0, 0x0000($a1) ## 00000000 -/* 0128C 80995EDC 8FA40028 */ lw $a0, 0x0028($sp) -/* 01290 80995EE0 0C265790 */ jal func_80995E40 -/* 01294 80995EE4 8FA5002C */ lw $a1, 0x002C($sp) -/* 01298 80995EE8 8FA20028 */ lw $v0, 0x0028($sp) -/* 0129C 80995EEC 8FA4002C */ lw $a0, 0x002C($sp) -/* 012A0 80995EF0 8C450150 */ lw $a1, 0x0150($v0) ## 00000150 -/* 012A4 80995EF4 8C46016C */ lw $a2, 0x016C($v0) ## 0000016C -/* 012A8 80995EF8 9047014E */ lbu $a3, 0x014E($v0) ## 0000014E -/* 012AC 80995EFC AFA00018 */ sw $zero, 0x0018($sp) -/* 012B0 80995F00 AFA00014 */ sw $zero, 0x0014($sp) -/* 012B4 80995F04 0C0286B2 */ jal SkelAnime_DrawFlexOpa -/* 012B8 80995F08 AFA00010 */ sw $zero, 0x0010($sp) -/* 012BC 80995F0C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 012C0 80995F10 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 012C4 80995F14 03E00008 */ jr $ra -/* 012C8 80995F18 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995F1C.s b/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995F1C.s deleted file mode 100644 index e967a2ee89..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995F1C.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel func_80995F1C -/* 012CC 80995F1C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 012D0 80995F20 AFBF0014 */ sw $ra, 0x0014($sp) -/* 012D4 80995F24 AFA50024 */ sw $a1, 0x0024($sp) -/* 012D8 80995F28 8483001C */ lh $v1, 0x001C($a0) ## 0000001C -/* 012DC 80995F2C 9482021A */ lhu $v0, 0x021A($a0) ## 0000021A -/* 012E0 80995F30 8FA50024 */ lw $a1, 0x0024($sp) -/* 012E4 80995F34 306300FF */ andi $v1, $v1, 0x00FF ## $v1 = 00000000 -/* 012E8 80995F38 28410014 */ slti $at, $v0, 0x0014 -/* 012EC 80995F3C 10200004 */ beq $at, $zero, .L80995F50 -/* 012F0 80995F40 2463FFFF */ addiu $v1, $v1, 0xFFFF ## $v1 = FFFFFFFF -/* 012F4 80995F44 304E0001 */ andi $t6, $v0, 0x0001 ## $t6 = 00000000 -/* 012F8 80995F48 55C0000B */ bnel $t6, $zero, .L80995F78 -/* 012FC 80995F4C 8FBF0014 */ lw $ra, 0x0014($sp) -.L80995F50: -/* 01300 80995F50 0C265790 */ jal func_80995E40 -/* 01304 80995F54 AFA3001C */ sw $v1, 0x001C($sp) -/* 01308 80995F58 8FA3001C */ lw $v1, 0x001C($sp) -/* 0130C 80995F5C 3C058099 */ lui $a1, %hi(D_80996048) ## $a1 = 80990000 -/* 01310 80995F60 8FA40024 */ lw $a0, 0x0024($sp) -/* 01314 80995F64 00037880 */ sll $t7, $v1, 2 -/* 01318 80995F68 00AF2821 */ addu $a1, $a1, $t7 -/* 0131C 80995F6C 0C00D498 */ jal Gfx_DrawDListOpa - -/* 01320 80995F70 8CA56048 */ lw $a1, %lo(D_80996048)($a1) -/* 01324 80995F74 8FBF0014 */ lw $ra, 0x0014($sp) -.L80995F78: -/* 01328 80995F78 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 0132C 80995F7C 03E00008 */ jr $ra -/* 01330 80995F80 00000000 */ nop -/* 01334 80995F84 00000000 */ nop -/* 01338 80995F88 00000000 */ nop -/* 0133C 80995F8C 00000000 */ nop diff --git a/data/overlays/actors/z_door_killer.data.s b/data/overlays/actors/z_door_killer.data.s deleted file mode 100644 index a4b748efa2..0000000000 --- a/data/overlays/actors/z_door_killer.data.s +++ /dev/null @@ -1,35 +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 Door_Killer_InitVars - .word 0x01C10100, 0x00000010, 0x018E0000, 0x00000284 -.word DoorKiller_Init -.word DoorKiller_Destroy -.word DoorKiller_Update -.word 0x00000000 -glabel D_80995FB0 - .word 0x09110900, 0x10010000, 0x00000000, 0xFFCFFFFF, 0x00100000, 0x0001FFEE, 0x00000000, 0x01010000, 0x00140064, 0x00000000, 0x00000000 -glabel D_80995FDC - .word 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000000, 0x00010000, 0x00000000, 0x00000000, 0x00640064 -glabel D_80996000 - .word 0x0A000900, 0x00000000, 0x00000001 -.word D_80995FDC -glabel D_80996010 - .word 0x002C0000 -glabel D_80996014 - .word 0x0600E5A0, 0x00590000, 0x060035C0, 0x01870000, 0x06000000, 0x00010000, gWoodenDoorTex -glabel D_80996030 - .word 0x00000000, 0x00000000, 0x00000000 -glabel D_8099603C - .word 0x00000000, 0x3F800000, 0x00000000 -glabel D_80996048 - .word 0x06001250, 0x06001550, 0x060017B8, 0x06001A58, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_door_killer.reloc.s b/data/overlays/actors/z_door_killer.reloc.s deleted file mode 100644 index 59e6c6eebc..0000000000 --- a/data/overlays/actors/z_door_killer.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_80996100 - .incbin "baserom/ovl_Door_Killer", 0x14B0, 0x000001A0 diff --git a/include/z64player.h b/include/z64player.h index a6106f47c4..0e43daf1b9 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -149,6 +149,15 @@ typedef enum { /* 0x16 */ PLAYER_LIMB_MAX } PlayerLimb; +typedef enum { + /* -1 */ PLAYER_DOORTYPE_AJAR = -1, + /* 0 */ PLAYER_DOORTYPE_NONE, + /* 1 */ PLAYER_DOORTYPE_HANDLE, + /* 2 */ PLAYER_DOORTYPE_SLIDING, + /* 3 */ PLAYER_DOORTYPE_FAKE +} PlayerDoorType; + + #define PLAYER_LIMB_BUF_COUNT PLAYER_LIMB_MAX + 2 // 2 extra entries in limb buffers? typedef struct { diff --git a/spec b/spec index b288ab0f05..4333fd6d59 100644 --- a/spec +++ b/spec @@ -1575,8 +1575,7 @@ endseg beginseg name "ovl_Door_Killer" include "build/src/overlays/actors/ovl_Door_Killer/z_door_killer.o" - include "build/data/overlays/actors/z_door_killer.data.o" - include "build/data/overlays/actors/z_door_killer.reloc.o" + include "build/src/overlays/actors/ovl_Door_Killer/ovl_Door_Killer_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index 49c7cef99c..791b4fa39a 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -118,7 +118,7 @@ void func_8099485C(DoorGerudo* this, GlobalContext* globalCtx) { } else if (!Flags_GetCollectible(globalCtx, (this->dyna.actor.params >> 8) & 0x1F)) { player->naviTextId = -0x225; } else { - player->doorType = 2; + player->doorType = PLAYER_DOORTYPE_SLIDING; player->doorDirection = direction; player->doorActor = &this->dyna.actor; player->doorTimer = 10; diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index a178242cb0..43f6d32464 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -1,3 +1,9 @@ +/* + * File: z_door_killer.c + * Overlay: ovl_Door_Killer + * Description: Fake doors which attack player + */ + #include "z_door_killer.h" #include "objects/gameplay_keep/gameplay_keep.h" @@ -5,13 +11,24 @@ #define THIS ((DoorKiller*)thisx) +typedef enum { + /* 0 */ DOOR_KILLER_DOOR, + /* 1 */ DOOR_KILLER_RUBBLE_PIECE_1, + /* 2 */ DOOR_KILLER_RUBBLE_PIECE_2, + /* 3 */ DOOR_KILLER_RUBBLE_PIECE_3, + /* 4 */ DOOR_KILLER_RUBBLE_PIECE_4 +} DoorKillerBehaviour; + void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx); void DoorKiller_Destroy(Actor* thisx, GlobalContext* globalCtx); void DoorKiller_Update(Actor* thisx, GlobalContext* globalCtx); +void DoorKiller_Wait(DoorKiller* this, GlobalContext* globalCtx); +void DoorKiller_SetProperties(DoorKiller* this, GlobalContext* globalCtx); +void DoorKiller_DrawDoor(Actor* thisx, GlobalContext* globalCtx); +void DoorKiller_DrawRubble(Actor* thisx, GlobalContext* globalCtx); -extern UNK_TYPE D_06001BC8; +extern FlexSkeletonHeader D_06001BC8; -/* const ActorInit Door_Killer_InitVars = { ACTOR_DOOR_KILLER, ACTORCAT_BG, @@ -24,7 +41,7 @@ const ActorInit Door_Killer_InitVars = { NULL, }; -static ColliderCylinderInit D_80995FB0 = { +static ColliderCylinderInit sCylinderInit = { { COLTYPE_METAL, AT_ON | AT_TYPE_ENEMY, @@ -44,7 +61,7 @@ static ColliderCylinderInit D_80995FB0 = { { 20, 100, 0, { 0, 0, 0 } }, }; -static ColliderJntSphElementInit D_80995FDC[1] = { +static ColliderJntSphElementInit sJntSphItemsInit[1] = { { { ELEMTYPE_UNK0, @@ -58,7 +75,7 @@ static ColliderJntSphElementInit D_80995FDC[1] = { }, }; -static ColliderJntSphInit D_80996000 = { +static ColliderJntSphInit sJntSphInit = { { COLTYPE_NONE, AT_NONE, @@ -68,41 +85,439 @@ static ColliderJntSphInit D_80996000 = { COLSHAPE_JNTSPH, }, 1, - D_80995FDC, + sJntSphItemsInit, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Destroy.s") +static DoorKillerTextureEntry sDoorTextures[4] = { + { OBJECT_HIDAN_OBJECTS, 0x0600E5A0 }, + { OBJECT_MIZU_OBJECTS, 0x060035C0 }, + { OBJECT_HAKA_DOOR, 0x06000000 }, + { OBJECT_GAMEPLAY_KEEP, 0x0400EF38 }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995020.s") +void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx) { + GlobalContext* globalCtx2 = globalCtx; + f32 randF; + DoorKiller* this = THIS; + s32 bankIndex; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809951C4.s") + // Look in the object bank for one of the four objects containing door textures + bankIndex = -1; + for (i = 0; bankIndex < 0; i++) { + bankIndex = Object_GetIndex(&globalCtx2->objectCtx, sDoorTextures[i].objectId); + this->textureEntryIndex = i; + } + osSyncPrintf("bank_ID = %d\n", bankIndex); + osSyncPrintf("status = %d\n", this->textureEntryIndex); + this->doorObjBankIndex = bankIndex; + this->texture = sDoorTextures[this->textureEntryIndex].texture; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995284.s") + ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); + Actor_SetScale(&this->actor, 0.01f); + this->timer = 0; + this->hasHitPlayerOrGround = 0; + this->animStyle = 0; + this->playerIsOpening = 0; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809952B8.s") + switch ((u8)(this->actor.params & 0xFF)) { + case DOOR_KILLER_DOOR: + // `jointTable` is used for both the `jointTable` and `morphTable` args here. Because this actor doesn't + // play any animations it does not cause problems, but it would need to be changed otherwise. + SkelAnime_InitFlex(globalCtx2, &this->skelAnime, &D_06001BC8, NULL, this->jointTable, this->jointTable, 9); + this->actionFunc = DoorKiller_SetProperties; + DoorKiller_SetProperties(this, globalCtx2); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995318.s") + // manually set the overall rotation of the door + this->jointTable[1].x = this->jointTable[1].z = 0x4000; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995368.s") + // Set a cylinder collider to detect link attacks and larger sphere collider to detect explosions + Collider_InitCylinder(globalCtx2, &this->colliderCylinder); + Collider_SetCylinder(globalCtx2, &this->colliderCylinder, &this->actor, &sCylinderInit); + Collider_InitJntSph(globalCtx2, &this->colliderJntSph); + Collider_SetJntSph(globalCtx2, &this->colliderJntSph, &this->actor, &sJntSphInit, + this->colliderJntSphItems); + this->colliderJntSph.elements[0].dim.worldSphere.radius = 80; + this->colliderJntSph.elements[0].dim.worldSphere.center.x = (s16)this->actor.world.pos.x; + this->colliderJntSph.elements[0].dim.worldSphere.center.y = (s16)this->actor.world.pos.y + 50; + this->colliderJntSph.elements[0].dim.worldSphere.center.z = (s16)this->actor.world.pos.z; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995518.s") + // If tied to a switch flag and that switch flag is already set, kill the actor. + if ((((this->actor.params >> 8) & 0x3F) != 0x3F) && + Flags_GetSwitch(globalCtx2, ((this->actor.params >> 8) & 0x3F))) { + Actor_Kill(&this->actor); + } + break; + case DOOR_KILLER_RUBBLE_PIECE_1: + case DOOR_KILLER_RUBBLE_PIECE_2: + case DOOR_KILLER_RUBBLE_PIECE_3: + case DOOR_KILLER_RUBBLE_PIECE_4: + this->actionFunc = DoorKiller_SetProperties; + DoorKiller_SetProperties(this, globalCtx2); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_809958E4.s") + this->actor.gravity = -0.6f; + this->actor.minVelocityY = -6.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A50.s") + // Random trajectories for rubble pieces + randF = Rand_CenteredFloat(8.0f); + this->actor.velocity.z = Rand_ZeroFloat(8.0f); + this->actor.velocity.x = (Math_CosS(this->actor.world.rot.y) * randF) + + (Math_SinS(this->actor.world.rot.y) * this->actor.velocity.z); + this->actor.velocity.z = (-Math_SinS(this->actor.world.rot.y) * randF) + + (Math_CosS(this->actor.world.rot.y) * this->actor.velocity.z); + this->actor.velocity.y = Rand_ZeroFloat(4.0f) + 4.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995A84.s") + // These are used as the x,y,z rotational velocities in DoorKiller_FallAsRubble + this->actor.world.rot.x = Rand_CenteredFloat(0x1000); + this->actor.world.rot.y = Rand_CenteredFloat(0x1000); + this->actor.world.rot.z = Rand_CenteredFloat(0x1000); + this->timer = 80; + break; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995CDC.s") +void DoorKiller_Destroy(Actor* thisx, GlobalContext* globalCtx) { + DoorKiller* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995D6C.s") + if ((thisx->params & 0xFF) == DOOR_KILLER_DOOR) { + Collider_DestroyCylinder(globalCtx, &this->colliderCylinder); + Collider_DestroyJntSph(globalCtx, &this->colliderJntSph); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/DoorKiller_Update.s") +void DoorKiller_SpawnRubble(Actor* thisx, GlobalContext* globalCtx) { + Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_KILLER, thisx->world.pos.x, thisx->world.pos.y + 9.0f, + thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, thisx->shape.rot.z, + DOOR_KILLER_RUBBLE_PIECE_1); + Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_KILLER, thisx->world.pos.x + 7.88f, + thisx->world.pos.y + 39.8f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, + thisx->shape.rot.z, DOOR_KILLER_RUBBLE_PIECE_2); + Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_KILLER, thisx->world.pos.x - 15.86f, + thisx->world.pos.y + 61.98f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, + thisx->shape.rot.z, DOOR_KILLER_RUBBLE_PIECE_3); + Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_KILLER, thisx->world.pos.x + 3.72f, + thisx->world.pos.y + 85.1f, thisx->world.pos.z, thisx->shape.rot.x, thisx->shape.rot.y, + thisx->shape.rot.z, DOOR_KILLER_RUBBLE_PIECE_4); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995E40.s") +/** + * action function for the individual door pieces that spawn and fall down when the door is destroyed + */ +void DoorKiller_FallAsRubble(DoorKiller* this, GlobalContext* globalCtx) { + this->actor.velocity.y += this->actor.gravity; + if (this->actor.velocity.y < this->actor.minVelocityY) { + this->actor.velocity.y = this->actor.minVelocityY; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995EC4.s") + this->actor.velocity.x *= 0.98f; + this->actor.velocity.z *= 0.98f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Door_Killer/func_80995F1C.s") + // world.rot is repurposed to be the rotation velocity for the rubble pieces + this->actor.shape.rot.x += this->actor.world.rot.x; + this->actor.shape.rot.y += this->actor.world.rot.y; + this->actor.shape.rot.z += this->actor.world.rot.z; + + if (this->timer != 0) { + this->timer--; + } else { + Actor_Kill(&this->actor); + } + func_8002D7EC(&this->actor); +} + +s32 DoorKiller_IsHit(Actor* thisx, GlobalContext* globalCtx) { + DoorKiller* this = THIS; + if ((this->colliderCylinder.base.acFlags & 2) && (this->colliderCylinder.info.acHitInfo != NULL)) { + return true; + } + return false; +} + +void DoorKiller_SetAC(DoorKiller* this, GlobalContext* globalCtx) { + Collider_UpdateCylinder(&this->actor, &this->colliderCylinder); + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderCylinder.base); + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colliderJntSph.base); +} + +void DoorKiller_Die(DoorKiller* this, GlobalContext* globalCtx) { + s32 switchFlag = (this->actor.params >> 8) & 0x3F; + + // Can set a switch flag on death based on params + if (switchFlag != 0x3F) { + Flags_SetSwitch(globalCtx, switchFlag); + } + Actor_Kill(&this->actor); +} + +/** + * After slamming on the floor, rise back upright + */ +void DoorKiller_RiseBackUp(DoorKiller* this, GlobalContext* globalCtx) { + s32 i; + s16 rotation; + + if (this->timer > 0) { + this->timer--; + } else { + this->actionFunc = DoorKiller_Wait; + this->timer = 16; + DoorKiller_SetAC(this, globalCtx); + return; + } + + this->actor.shape.rot.x = (this->timer >= 8) ? (this->timer * 0x800) - 0x4000 : 0; + + if (this->timer >= 12) { + rotation = (-this->timer * -500) - 8000; + } else if (this->timer >= 8) { + rotation = -2000; + } else if (this->timer >= 5) { + rotation = (this->timer * -500) + 2000; + } else { + rotation = 0; + } + + for (i = 2; i < 9; i++) { + this->jointTable[i].z = -rotation; + } + + if (this->timer < 8) { + rotation = Math_SinS(this->timer * 0x2000) * this->timer * 100.0f; + for (i = 2; i < 9; i++) { + this->jointTable[i].y = rotation; + } + } +} + +/** + * After wobbling, fall over and slam onto the floor, damaging the player if they are in the way. Uses manual distance + * check for damaging player, not AT system. + */ +void DoorKiller_FallOver(DoorKiller* this, GlobalContext* globalCtx) { + s32 i; + s16 rotation; + + if (this->timer > 0) { + this->timer--; + } else { + this->actionFunc = DoorKiller_RiseBackUp; + this->timer = 16; + return; + } + + this->actor.shape.rot.x = (this->timer >= 4) ? 0x8000 + (-this->timer * 0x1000) : 0x4000; + + if (this->timer >= 6) { + rotation = (-this->timer * -500) - 4000; + } else if (this->timer >= 4) { + rotation = -1000; + } else if (this->timer >= 3) { + rotation = (this->timer * -500) + 1000; + } else { + rotation = 0; + } + + for (i = 2; i < 9; i++) { + this->jointTable[i].z = rotation; + } + + if (this->timer == 4) { + // spawn 20 random dust particles just before slamming down + Vec3f velocity = { 0.0f, 0.0f, 0.0f }; + Vec3f accel = { 0.0f, 1.0f, 0.0f }; + Vec3f pos; + s32 j; + f32 randF; + + for (j = 0; j != 20; j++) { + pos.y = 0.0f; + randF = Rand_CenteredFloat(40.0f); + pos.z = Rand_ZeroFloat(100.0f); + pos.x = (Math_CosS(this->actor.world.rot.y) * randF) + (Math_SinS(this->actor.world.rot.y) * pos.z); + pos.z = (-Math_SinS(this->actor.world.rot.y) * randF) + (Math_CosS(this->actor.world.rot.y) * pos.z); + velocity.x = pos.x * 0.2f; + velocity.z = pos.z * 0.2f; + accel.x = -(velocity.x) * 0.1f; + accel.z = -(velocity.z) * 0.1f; + pos.x += this->actor.world.pos.x; + pos.y += this->actor.world.pos.y; + pos.z += this->actor.world.pos.z; + func_8002865C(globalCtx, &pos, &velocity, &accel, 300, 30); + } + } + if (!(this->hasHitPlayerOrGround & 1)) { + Vec3f playerPosRelToDoor; + Player* player = PLAYER; + func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos); + if ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) && + (playerPosRelToDoor.z < 100.0f) && (playerPosRelToDoor.z > 0.0f)) { + this->hasHitPlayerOrGround |= 1; + func_8002F6D4(globalCtx, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 16); + Audio_PlayActorSound2(&this->actor, NA_SE_EN_KDOOR_HIT); + func_8002F7DC(&player->actor, NA_SE_PL_BODY_HIT); + } + } + if (!(this->hasHitPlayerOrGround & 1) && (this->timer == 2)) { + this->hasHitPlayerOrGround |= 1; + Audio_PlayActorSound2(&this->actor, NA_SE_EN_KDOOR_HIT_GND); + } +} + +/** + * Wobble around, signifying the door is about to fall over. Does not set AC and so cannot be destroyed during this. + */ +void DoorKiller_Wobble(DoorKiller* this, GlobalContext* globalCtx) { + s16 rotation; + s32 i; + + if ((this->timer == 16) || (this->timer == 8)) { + Audio_PlayActorSound2(&this->actor, NA_SE_EN_KDOOR_WAVE); + } + + if (this->timer > 0) { + this->timer--; + } else { + this->actionFunc = DoorKiller_FallOver; + this->timer = 8; + this->hasHitPlayerOrGround &= ~1; + return; + } + + rotation = Math_SinS(this->timer * 0x2000) * this->timer * 100.0f; + for (i = 2; i < 9; i++) { + this->jointTable[i].y = rotation; + } + rotation = (u16)(s32)(-Math_CosS(this->timer * 0x1000) * 1000.0f) + 1000; + for (i = 2; i < 9; i++) { + this->jointTable[i].z = rotation; + } +} + +/** + * Idle while the player attempts to open the door and then begin to wobble + */ +void DoorKiller_WaitBeforeWobble(DoorKiller* this, GlobalContext* globalCtx) { + if (this->timer > 0) { + this->timer--; + } else { + this->timer = 16; + this->actionFunc = DoorKiller_Wobble; + } +} + +void DoorKiller_Wait(DoorKiller* this, GlobalContext* globalCtx) { + Player* player = PLAYER; + Vec3f playerPosRelToDoor; + s16 angleToFacingPlayer; + + func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos); + + // playerIsOpening is set by player + if (this->playerIsOpening) { + this->actionFunc = DoorKiller_WaitBeforeWobble; + this->timer = 10; + this->playerIsOpening = 0; + return; + } + + if (DoorKiller_IsHit(&this->actor, globalCtx)) { + // AC cylinder: wobble if hit by most weapons, die if hit by explosives or hammer + if ((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x1FFA6) != 0) { + this->timer = 16; + this->actionFunc = DoorKiller_Wobble; + } else if ((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x48) != 0) { + DoorKiller_SpawnRubble(&this->actor, globalCtx); + this->actionFunc = DoorKiller_Die; + Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK); + } + } else if (Actor_GetCollidedExplosive(globalCtx, &this->colliderJntSph.base) != NULL) { + // AC sphere: die if hit by explosive + DoorKiller_SpawnRubble(&this->actor, globalCtx); + this->actionFunc = DoorKiller_Die; + Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK); + } else if (!Player_InCsMode(globalCtx) && (fabsf(playerPosRelToDoor.y) < 20.0f) && + (fabsf(playerPosRelToDoor.x) < 20.0f) && (playerPosRelToDoor.z < 50.0f) && + (playerPosRelToDoor.z > 0.0f)) { + // Set player properties to make the door openable if within range + angleToFacingPlayer = player->actor.shape.rot.y - this->actor.shape.rot.y; + if (playerPosRelToDoor.z > 0.0f) { + angleToFacingPlayer = 0x8000 - angleToFacingPlayer; + } + if (ABS(angleToFacingPlayer) < 0x3000) { + player->doorType = PLAYER_DOORTYPE_FAKE; + player->doorDirection = (playerPosRelToDoor.z >= 0.0f) ? 1.0f : -1.0f; + player->doorActor = &this->actor; + } + } + + DoorKiller_SetAC(this, globalCtx); +} + +/** + * Grabs the virtual address of the texture from the relevant door object + */ +void DoorKiller_UpdateTexture(Actor* thisx, GlobalContext* globalCtx) { + DoorKiller* this = THIS; + + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->doorObjBankIndex].segment); + this->texture = SEGMENTED_TO_VIRTUAL(this->texture); + gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[thisx->objBankIndex].segment); +} + +/** + * Gets the correct door texture, defines the appropriate draw fucntion and action function based on type behaviour + * (door or rubble). + */ +void DoorKiller_SetProperties(DoorKiller* this, GlobalContext* globalCtx) { + if (Object_IsLoaded(&globalCtx->objectCtx, this->doorObjBankIndex)) { + DoorKiller_UpdateTexture(&this->actor, globalCtx); + switch (this->actor.params & 0xFF) { + case DOOR_KILLER_DOOR: + this->actionFunc = DoorKiller_Wait; + this->actor.draw = DoorKiller_DrawDoor; + break; + case DOOR_KILLER_RUBBLE_PIECE_1: + case DOOR_KILLER_RUBBLE_PIECE_2: + case DOOR_KILLER_RUBBLE_PIECE_3: + case DOOR_KILLER_RUBBLE_PIECE_4: + this->actionFunc = DoorKiller_FallAsRubble; + this->actor.draw = DoorKiller_DrawRubble; + break; + } + } +} + +void DoorKiller_Update(Actor* thisx, GlobalContext* globalCtx) { + DoorKiller* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void DoorKiller_SetTexture(Actor* thisx, GlobalContext* globalCtx) { + DoorKiller* this = THIS; + u64* doorTexture = this->texture; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_killer.c", 883); + gSPSegment(POLY_OPA_DISP++, 0x08, doorTexture); + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_door_killer.c", 885); +} + +void DoorKiller_DrawDoor(Actor* thisx, GlobalContext* globalCtx) { + DoorKiller* this = THIS; + + func_800943C8(globalCtx->state.gfxCtx); + DoorKiller_SetTexture(&this->actor, globalCtx); + SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, + NULL, NULL, NULL); +} + +void DoorKiller_DrawRubble(Actor* thisx, GlobalContext* globalCtx) { + static Gfx* dLists[] = { 0x06001250, 0x06001550, 0x060017B8, 0x06001A58 }; + s32 rubblePieceIndex = (thisx->params & 0xFF) - 1; + DoorKiller* this = THIS; + + if ((this->timer >= 20) || ((this->timer & 1) == 0)) { + DoorKiller_SetTexture(thisx, globalCtx); + Gfx_DrawDListOpa(globalCtx, dLists[rubblePieceIndex]); + } +} diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h index d2223e4e25..db673b8277 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.h +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.h @@ -4,11 +4,35 @@ #include "ultra64.h" #include "global.h" +/* + * Associated switch flag: (params >> 8) & 0x3F + * ((params >> 8) & 0x3F) == 0x3F means no switch flag is checked / set +*/ + +typedef struct { + /* 0x00 */ s16 objectId; + /* 0x04 */ u64* texture; +} DoorKillerTextureEntry; // size 0x8 + struct DoorKiller; +typedef void (*DoorKillerActionFunc)(struct DoorKiller*, GlobalContext*); + typedef struct DoorKiller { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x138]; + /* 0x014C */ SkelAnime skelAnime; + /* 0x0190 */ u8 animStyle; // Must be at same offset as animStyle in EnDoor due to the cast in func_80839800 + /* 0x0191 */ u8 playerIsOpening; // Must be at same offset as playerIsOpening in EnDoor + /* 0x0192 */ Vec3s jointTable[9]; + /* 0x01C8 */ ColliderCylinder colliderCylinder; + /* 0x0214 */ u64* texture; + /* 0x0218 */ u16 hasHitPlayerOrGround; + /* 0x021A */ u16 timer; + /* 0x021C */ u8 doorObjBankIndex; + /* 0x021D */ u8 textureEntryIndex; + /* 0x0220 */ ColliderJntSph colliderJntSph; + /* 0x0240 */ ColliderJntSphElement colliderJntSphItems[1]; + /* 0x0280 */ DoorKillerActionFunc actionFunc; } DoorKiller; // size = 0x0284 extern const ActorInit Door_Killer_InitVars; diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index 9cbdcfc159..e22a901ac2 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -385,7 +385,7 @@ void func_80996B0C(DoorShutter* this, GlobalContext* globalCtx) { } player->doorTimer = 10; } - player->doorType = 2; + player->doorType = PLAYER_DOORTYPE_SLIDING; player->doorDirection = doorDirection; player->doorActor = &this->dyna.actor; } diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 4d98505b21..d0d9e5aa91 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -358,7 +358,7 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) { } else { Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &this->hitActor->world.pos); } - + if (this->touchedPoly && (this->hitActor != NULL)) { this->hitActor->flags &= ~0x8000; this->hitActor = NULL; diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index b3c1c9c14e..69b819c982 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -140,7 +140,8 @@ void func_809CAEF4(EnBrob* this) { } void func_809CAF88(EnBrob* this) { - Animation_Change(&this->skelAnime, &D_06001750, -1.0f, Animation_GetLastFrame(&D_06001750), 0.0f, ANIMMODE_ONCE, -5.0f); + Animation_Change(&this->skelAnime, &D_06001750, -1.0f, Animation_GetLastFrame(&D_06001750), 0.0f, ANIMMODE_ONCE, + -5.0f); this->unk_1AE = 8250; this->actionFunc = func_809CB354; } @@ -251,8 +252,8 @@ void func_809CB458(EnBrob* this, GlobalContext* globalCtx) { dist2 = -dist2; } pos.y = (((Rand_ZeroOne() * 15000.0f) + 1000.0f) * this->dyna.actor.scale.y) + this->dyna.actor.world.pos.y; - EffectSsLightning_Spawn(globalCtx, &pos, &primColor, &envColor, - this->dyna.actor.scale.y * 8000.0f, Rand_ZeroOne() * 65536.0f, 4, 1); + EffectSsLightning_Spawn(globalCtx, &pos, &primColor, &envColor, this->dyna.actor.scale.y * 8000.0f, + Rand_ZeroOne() * 65536.0f, 4, 1); } if (this->timer == 0) { @@ -278,10 +279,11 @@ void EnBrob_Update(Actor* thisx, GlobalContext* globalCtx2) { func_809CAEF4(this); } else if ((this->colliders[0].base.atFlags & AT_HIT) || (this->colliders[1].base.atFlags & AT_HIT) || - (acHits[0] && (this->colliders[0].info.acHitInfo->toucher.dmgFlags & 0x100)) || - (acHits[1] && (this->colliders[1].info.acHitInfo->toucher.dmgFlags & 0x100))) { + (acHits[0] && (this->colliders[0].info.acHitInfo->toucher.dmgFlags & 0x100)) || + (acHits[1] && (this->colliders[1].info.acHitInfo->toucher.dmgFlags & 0x100))) { - if (this->actionFunc == func_809CB114 && !(this->colliders[0].base.atFlags & AT_BOUNCED) && !(this->colliders[1].base.atFlags & AT_BOUNCED)) { + if (this->actionFunc == func_809CB114 && !(this->colliders[0].base.atFlags & AT_BOUNCED) && + !(this->colliders[1].base.atFlags & AT_BOUNCED)) { func_8002F71C(globalCtx, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 1.0f); } else if (this->actionFunc != func_809CB114) { func_809CB008(this); diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 896a34b1cc..e6b2152850 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -179,14 +179,14 @@ void EnDoor_SetupType(EnDoor* this, GlobalContext* globalCtx) { void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) { Player* player = PLAYER; s32 doorType; - Vec3f sp2C; + Vec3f playerPosRelToDoor; s16 phi_v0; doorType = this->actor.params >> 7 & 7; - func_8002DBD0(&this->actor, &sp2C, &player->actor.world.pos); - if (this->unk_191 != 0) { + func_8002DBD0(&this->actor, &playerPosRelToDoor, &player->actor.world.pos); + if (this->playerIsOpening != 0) { this->actionFunc = EnDoor_Open; - Animation_PlayOnceSetSpeed(&this->skelAnime, D_809FCECC[this->unk_190], + Animation_PlayOnceSetSpeed(&this->skelAnime, D_809FCECC[this->animStyle], (player->stateFlags1 & 0x8000000) ? 0.75f : 1.5f); if (this->lockTimer != 0) { gSaveContext.inventory.dungeonKeys[gSaveContext.mapIndex]--; @@ -194,9 +194,10 @@ void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHAIN_KEY_UNLOCK); } } else if (!Player_InCsMode(globalCtx)) { - if (fabsf(sp2C.y) < 20.0f && fabsf(sp2C.x) < 20.0f && fabsf(sp2C.z) < 50.0f) { + if (fabsf(playerPosRelToDoor.y) < 20.0f && fabsf(playerPosRelToDoor.x) < 20.0f && + fabsf(playerPosRelToDoor.z) < 50.0f) { phi_v0 = player->actor.shape.rot.y - this->actor.shape.rot.y; - if (sp2C.z > 0.0f) { + if (playerPosRelToDoor.z > 0.0f) { phi_v0 = 0x8000 - phi_v0; } if (ABS(phi_v0) < 0x3000) { @@ -210,8 +211,8 @@ void EnDoor_Idle(EnDoor* this, GlobalContext* globalCtx) { player->doorTimer = 10; } } - player->doorType = (doorType == DOOR_AJAR) ? -1 : 1; - player->doorDirection = (sp2C.z >= 0.0f) ? 1.0f : -1.0f; + player->doorType = (doorType == DOOR_AJAR) ? PLAYER_DOORTYPE_AJAR : PLAYER_DOORTYPE_HANDLE; + player->doorDirection = (playerPosRelToDoor.z >= 0.0f) ? 1.0f : -1.0f; player->doorActor = &this->actor; } } else if (doorType == DOOR_AJAR && this->actor.xzDistToPlayer > DOOR_AJAR_OPEN_RANGE) { @@ -261,8 +262,8 @@ void EnDoor_Open(EnDoor* this, GlobalContext* globalCtx) { if (DECR(this->lockTimer) == 0) { if (SkelAnime_Update(&this->skelAnime)) { this->actionFunc = EnDoor_Idle; - this->unk_191 = 0; - } else if (Animation_OnFrame(&this->skelAnime, sDoorAnimOpenFrames[this->unk_190])) { + this->playerIsOpening = 0; + } else if (Animation_OnFrame(&this->skelAnime, sDoorAnimOpenFrames[this->animStyle])) { Audio_PlayActorSound2(&this->actor, (globalCtx->sceneNum == SCENE_HAKADAN || globalCtx->sceneNum == SCENE_HAKADANCH || globalCtx->sceneNum == SCENE_HIDAN) @@ -274,7 +275,7 @@ void EnDoor_Open(EnDoor* this, GlobalContext* globalCtx) { EffectSsBubble_Spawn(globalCtx, &this->actor.world.pos, 60.0f, 100.0f, 50.0f, 0.15f); } } - } else if (Animation_OnFrame(&this->skelAnime, sDoorAnimCloseFrames[this->unk_190])) { + } else if (Animation_OnFrame(&this->skelAnime, sDoorAnimCloseFrames[this->animStyle])) { Audio_PlayActorSound2(&this->actor, (globalCtx->sceneNum == SCENE_HAKADAN || globalCtx->sceneNum == SCENE_HAKADANCH || globalCtx->sceneNum == SCENE_HIDAN) diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.h b/src/overlays/actors/ovl_En_Door/z_en_door.h index 59e6a51803..ed333bcdd0 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.h +++ b/src/overlays/actors/ovl_En_Door/z_en_door.h @@ -46,8 +46,8 @@ typedef void (*EnDoorActionFunc)(struct EnDoor*, GlobalContext*); typedef struct EnDoor { /* 0x0000 */ Actor actor; /* 0x014C */ SkelAnime skelAnime; - /* 0x0190 */ u8 unk_190; - /* 0x0191 */ u8 unk_191; + /* 0x0190 */ u8 animStyle; // Must be at same offset as animStyle in DoorKiller due to the cast in func_80839800 + /* 0x0191 */ u8 playerIsOpening; // Must be at same offset as playerIsOpening in DoorKiller due to the cast in func_80839800 /* 0x0192 */ u8 unk_192; /* 0x0193 */ s8 requiredObjBankIndex; /* 0x0194 */ s8 dListIndex; diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index cc208301d3..294c3fee1b 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -111,7 +111,6 @@ void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) { void EnFu_Destroy(Actor* thisx, GlobalContext* globalCtx) { EnFu* this = THIS; - Collider_DestroyCylinder(globalCtx, &this->collider); } diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index dc954ebbc2..7bd0819665 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -775,7 +775,6 @@ u16 EnGo2_GetTextId(GlobalContext* globalCtx, Actor* thisx) { s16 EnGo2_GetState(GlobalContext* globalCtx, Actor* thisx) { EnGo2* this = THIS; - switch (this->actor.params & 0x1F) { case GORON_CITY_ROLLING_BIG: return EnGo2_GetStateGoronCityRollingBig(globalCtx, this); diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index 104b59a19d..ea87d669cc 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -419,7 +419,6 @@ u16 EnMd_GetText(GlobalContext* globalCtx, Actor* thisx) { s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) { EnMd* this = THIS; - switch (func_80AAAC78(this, globalCtx)) { case 0: case 1: diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 6b3662539c..530abbc9ff 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -569,7 +569,6 @@ void func_80AEBA2C(EnRu1* this, GlobalContext* globalCtx) { f32 temp_ret_2; CsCmdActorAction* csCmdNPCAction = func_80AEB438(globalCtx); s32 pad2; - if (csCmdNPCAction != NULL) { temp_ret_2 = func_80AEB7E0(csCmdNPCAction, globalCtx); thisPos = &this->actor.world.pos; diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index d76a5d22a0..fb46b84f8b 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -143,7 +143,7 @@ void func_80B86BC8(ItemShield* this, GlobalContext* globalCtx) { void func_80B86CA8(ItemShield* this, GlobalContext* globalCtx) { static Vec3f D_80B871F4 = { 0.0f, 0.0f, 0.0f }; - static f32 D_80B87200[] = { 0.3f, 0.6f, 0.9f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, + static f32 D_80B87200[] = { 0.3f, 0.6f, 0.9f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.85f, 0.7f, 0.55f, 0.4f, 0.25f, 0.1f, 0.0f }; static f32 D_80B87240[] = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.8f, 0.6f, 0.4f, 0.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; @@ -159,7 +159,8 @@ void func_80B86CA8(ItemShield* this, GlobalContext* globalCtx) { D_80B871F4.x = this->unk_1A8[i].x; D_80B871F4.y = this->unk_1A8[i].y + (this->actor.shape.yOffset * 0.01f) + (D_80B87200[temp] * -10.0f * 0.2f); D_80B871F4.z = this->unk_1A8[i].z; - EffectSsFireTail_SpawnFlame(globalCtx, &this->actor, &D_80B871F4, D_80B87200[temp] * 0.2f, -1, D_80B87240[temp]); + EffectSsFireTail_SpawnFlame(globalCtx, &this->actor, &D_80B871F4, D_80B87200[temp] * 0.2f, -1, + D_80B87240[temp]); if (this->unk_19E[i] != 0) { this->unk_19E[i]--; } else if (this->timer > 16) { diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index cc8d9d93b6..bf32134561 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -37,6 +37,13 @@ typedef struct { #define GET_ITEM_NONE \ { ITEM_NONE, 0, 0, 0, 0 } +typedef enum { + /* 0x00 */ KNOB_ANIM_ADULT_L, + /* 0x01 */ KNOB_ANIM_CHILD_L, + /* 0x02 */ KNOB_ANIM_ADULT_R, + /* 0x03 */ KNOB_ANIM_CHILD_R +} KnobDoorAnim; + typedef struct { /* 0x00 */ u8 itemId; /* 0x02 */ s16 actorId; @@ -2218,7 +2225,7 @@ s32 func_80834EB8(Player* this, GlobalContext* globalCtx) { } s32 func_80834F2C(Player* this, GlobalContext* globalCtx) { - if ((this->doorType == 0) && !(this->stateFlags1 & 0x2000000)) { + if ((this->doorType == PLAYER_DOORTYPE_NONE) && !(this->stateFlags1 & 0x2000000)) { if (D_80853614 || func_80834E44(globalCtx)) { if (func_80834D2C(this, globalCtx)) { return func_80834EB8(this, globalCtx); @@ -4033,8 +4040,8 @@ s32 func_80839768(GlobalContext* globalCtx, Player* this, Vec3f* arg2, Collision s32 func_80839800(Player* this, GlobalContext* globalCtx) { DoorShutter* doorShutter; - EnDoor* enDoor; - s32 sp7C; + EnDoor* door; // Can also be DoorKiller* + s32 doorDirection; f32 sp78; f32 sp74; Actor* doorActor; @@ -4046,26 +4053,26 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { CollisionPoly* sp58; Vec3f sp4C; - if ((this->doorType != 0) && + if ((this->doorType != PLAYER_DOORTYPE_NONE) && (!(this->stateFlags1 & 0x800) || ((this->heldActor != NULL) && (this->heldActor->id == ACTOR_EN_RU1)))) { if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (func_8084F9A0 == this->func_674)) { doorActor = this->doorActor; - if (this->doorType < 0) { + if (this->doorType <= PLAYER_DOORTYPE_AJAR) { doorActor->textId = 0xD0; // "It won't open!" func_80853148(globalCtx, doorActor); return 0; } - sp7C = this->doorDirection; + doorDirection = this->doorDirection; sp78 = Math_CosS(doorActor->shape.rot.y); sp74 = Math_SinS(doorActor->shape.rot.y); - if (this->doorType == 2) { + if (this->doorType == PLAYER_DOORTYPE_SLIDING) { doorShutter = (DoorShutter*)doorActor; this->currentYaw = doorShutter->dyna.actor.home.rot.y; - if (sp7C > 0) { + if (doorDirection > 0) { this->currentYaw -= 0x8000; } this->actor.shape.rot.y = this->currentYaw; @@ -4080,10 +4087,10 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { this->unk_447 = this->doorType; this->stateFlags1 |= 0x20000000; - this->unk_450.x = this->actor.world.pos.x + ((sp7C * 20.0f) * sp74); - this->unk_450.z = this->actor.world.pos.z + ((sp7C * 20.0f) * sp78); - this->unk_45C.x = this->actor.world.pos.x + ((sp7C * -120.0f) * sp74); - this->unk_45C.z = this->actor.world.pos.z + ((sp7C * -120.0f) * sp78); + this->unk_450.x = this->actor.world.pos.x + ((doorDirection * 20.0f) * sp74); + this->unk_450.z = this->actor.world.pos.z + ((doorDirection * 20.0f) * sp78); + this->unk_45C.x = this->actor.world.pos.x + ((doorDirection * -120.0f) * sp74); + this->unk_45C.z = this->actor.world.pos.z + ((doorDirection * -120.0f) * sp78); doorShutter->unk_164 = 1; func_80832224(this); @@ -4098,21 +4105,25 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { if (doorShutter->dyna.actor.category == ACTORCAT_DOOR) { this->unk_46A = globalCtx->transitionActorList[(u16)doorShutter->dyna.actor.params >> 10] - .sides[(sp7C > 0) ? 0 : 1] + .sides[(doorDirection > 0) ? 0 : 1] .effects; func_800304B0(globalCtx); } } else { - enDoor = (EnDoor*)doorActor; + // This actor can be either EnDoor or DoorKiller. + // Don't try to access any struct vars other than `animStyle` and `playerIsOpening`! These two variables + // are common across the two actors' structs however most other variables are not! + door = (EnDoor*)doorActor; - enDoor->unk_190 = (sp7C < 0.0f) ? ((LINK_IS_ADULT) ? 0 : 1) : ((LINK_IS_ADULT) ? 2 : 3); + door->animStyle = (doorDirection < 0.0f) ? ((LINK_IS_ADULT) ? KNOB_ANIM_ADULT_L : KNOB_ANIM_CHILD_L) + : ((LINK_IS_ADULT) ? KNOB_ANIM_ADULT_R : KNOB_ANIM_CHILD_R); - if (enDoor->unk_190 == 0) { + if (door->animStyle == KNOB_ANIM_ADULT_L) { sp5C = D_808539EC[this->modelAnimType]; - } else if (enDoor->unk_190 == 1) { + } else if (door->animStyle == KNOB_ANIM_CHILD_L) { sp5C = D_80853A04[this->modelAnimType]; - } else if (enDoor->unk_190 == 2) { + } else if (door->animStyle == KNOB_ANIM_ADULT_R) { sp5C = D_80853A1C[this->modelAnimType]; } else { sp5C = D_80853A34[this->modelAnimType]; @@ -4121,7 +4132,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { func_80835C58(globalCtx, this, func_80845EF8, 0); func_80832528(globalCtx, this); - if (sp7C < 0) { + if (doorDirection < 0) { this->actor.shape.rot.y = doorActor->shape.rot.y; } else { this->actor.shape.rot.y = doorActor->shape.rot.y - 0x8000; @@ -4129,7 +4140,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { this->currentYaw = this->actor.shape.rot.y; - sp6C = (sp7C * 22.0f); + sp6C = (doorDirection * 22.0f); this->actor.world.pos.x = doorActor->world.pos.x + sp6C * sp74; this->actor.world.pos.z = doorActor->world.pos.z + sp6C * sp78; @@ -4143,12 +4154,12 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { func_80832F54(globalCtx, this, 0x28F); if (doorActor->parent != NULL) { - sp7C = -sp7C; + doorDirection = -doorDirection; } - enDoor->unk_191 = 1; + door->playerIsOpening = 1; - if (this->doorType != 3) { + if (this->doorType != PLAYER_DOORTYPE_FAKE) { this->stateFlags1 |= 0x20000000; func_800304B0(globalCtx); @@ -4166,15 +4177,17 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) { } else { Camera_ChangeDoorCam(Gameplay_GetCamera(globalCtx, 0), doorActor, globalCtx->transitionActorList[(u16)doorActor->params >> 10] - .sides[(sp7C > 0) ? 0 : 1] + .sides[(doorDirection > 0) ? 0 : 1] .effects, 0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC); } } } - if ((this->doorType != 3) && (doorActor->category == ACTORCAT_DOOR)) { - frontRoom = globalCtx->transitionActorList[(u16)doorActor->params >> 10].sides[(sp7C > 0) ? 0 : 1].room; + if ((this->doorType != PLAYER_DOORTYPE_FAKE) && (doorActor->category == ACTORCAT_DOOR)) { + frontRoom = globalCtx->transitionActorList[(u16)doorActor->params >> 10] + .sides[(doorDirection > 0) ? 0 : 1] + .room; if ((frontRoom >= 0) && (frontRoom != globalCtx->roomCtx.curRoom.num)) { func_8009728C(globalCtx, &globalCtx->roomCtx, frontRoom); @@ -9168,7 +9181,7 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) { doAction = 0x14; } } else if ((func_8084E3C4 != this->func_674) && !(this->stateFlags2 & 0x40000)) { - if ((this->doorType != 0) && + if ((this->doorType != PLAYER_DOORTYPE_NONE) && (!(this->stateFlags1 & 0x800) || ((heldActor != NULL) && (heldActor->id == ACTOR_EN_RU1)))) { doAction = 4; } else if ((!(this->stateFlags1 & 0x800) || (heldActor == NULL)) && (interactRangeActor != NULL) && @@ -10121,7 +10134,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) { temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y; - this->doorType = 0; + this->doorType = PLAYER_DOORTYPE_NONE; this->unk_8A1 = 0; this->unk_684 = NULL;