From 80c803b9ec8855fa2571f657cabe2b6eb91e7756 Mon Sep 17 00:00:00 2001 From: Peppers1612 <71114652+Peppers1612@users.noreply.github.com> Date: Thu, 3 Dec 2020 16:52:26 -0500 Subject: [PATCH] ObjTimeblock OK (#421) * ObjTimeblock: move data in source file * ObjTimeblock: decomp Init() * ObjTimeblock: decomp Destroy() * ObjTimeblock: decomp func_80BA0058()/spawnDemoEffect() * ObjTimeblock: decomp func_80B9FFA0() * ObjTimeblock: decomp func_80BA040C()/mainActionFunc() * ObjTimeblock: decomp func_80BA032C() * ObjTimeblock: decomp func_80BA0480() * ObjTimeblock: decomp func_80BA0514() * ObjTimeblock: decomp func_80BA0524() * ObjTimeblock: decomp func_80BA00CC()/toggleSceneSwitch() * ObjTimeblock: decomp func_80BA04F8() * ObjTimeblock: decomp func_80BA0508()/doNothing() * ObjTimeblock: decomp func_80BA0758() * ObjTimeblock: decomp func_80BA0768() * ObjTimeblock: decomp func_80BA06AC() * ObjTimeblock: decomp func_80BA083C() * ObjTimeblock: decomp func_80BA084C() * ObjTimeblock: decomp ObjTimeblock_Update() * ObjTimeblock: decomp ObjTimeblock_Draw() * ObjTimeblock: document the most obvious * ObjTimeblock: use compiled reloc data * ObjTimeblock: apply suggestions from mzxrules * review Co-authored-by: fig --- .../ovl_Obj_Timeblock/ObjTimeblock_Destroy.s | 14 - .../ovl_Obj_Timeblock/ObjTimeblock_Draw.s | 94 ----- .../ovl_Obj_Timeblock/ObjTimeblock_Init.s | 146 -------- .../ovl_Obj_Timeblock/ObjTimeblock_Update.s | 35 -- .../actors/ovl_Obj_Timeblock/func_80B9FFA0.s | 54 --- .../actors/ovl_Obj_Timeblock/func_80BA0058.s | 31 -- .../actors/ovl_Obj_Timeblock/func_80BA00CC.s | 24 -- .../actors/ovl_Obj_Timeblock/func_80BA032C.s | 61 ---- .../actors/ovl_Obj_Timeblock/func_80BA040C.s | 32 -- .../actors/ovl_Obj_Timeblock/func_80BA0480.s | 34 -- .../actors/ovl_Obj_Timeblock/func_80BA04F8.s | 5 - .../actors/ovl_Obj_Timeblock/func_80BA0508.s | 4 - .../actors/ovl_Obj_Timeblock/func_80BA0514.s | 5 - .../actors/ovl_Obj_Timeblock/func_80BA0524.s | 116 ------- .../actors/ovl_Obj_Timeblock/func_80BA06AC.s | 50 --- .../actors/ovl_Obj_Timeblock/func_80BA0758.s | 5 - .../actors/ovl_Obj_Timeblock/func_80BA0768.s | 65 ---- .../actors/ovl_Obj_Timeblock/func_80BA083C.s | 5 - .../actors/ovl_Obj_Timeblock/func_80BA084C.s | 59 ---- data/overlays/actors/z_obj_timeblock.data.s | 30 -- data/overlays/actors/z_obj_timeblock.reloc.s | 13 - spec | 3 +- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 20 +- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 4 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 2 +- .../ovl_Obj_Timeblock/z_obj_timeblock.c | 321 ++++++++++++++++-- .../ovl_Obj_Timeblock/z_obj_timeblock.h | 15 +- undefined_syms.txt | 4 + 28 files changed, 330 insertions(+), 921 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80B9FFA0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0058.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA00CC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA032C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA040C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0480.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA04F8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0508.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0514.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0524.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA06AC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0758.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0768.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA083C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA084C.s delete mode 100644 data/overlays/actors/z_obj_timeblock.data.s delete mode 100644 data/overlays/actors/z_obj_timeblock.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Destroy.s deleted file mode 100644 index fc40771d58..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Destroy.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel ObjTimeblock_Destroy -/* 0035C 80BA02FC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00360 80BA0300 AFA40018 */ sw $a0, 0x0018($sp) -/* 00364 80BA0304 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00368 80BA0308 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0036C 80BA030C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00370 80BA0310 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 00374 80BA0314 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 00378 80BA0318 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 0037C 80BA031C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00380 80BA0320 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00384 80BA0324 03E00008 */ jr $ra -/* 00388 80BA0328 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Draw.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Draw.s deleted file mode 100644 index f7af37262a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Draw.s +++ /dev/null @@ -1,94 +0,0 @@ -.rdata -glabel D_80BA0C00 - .asciz "../z_obj_timeblock.c" - .balign 4 - -glabel D_80BA0C18 - .asciz "../z_obj_timeblock.c" - .balign 4 - -glabel D_80BA0C30 - .asciz "../z_obj_timeblock.c" - .balign 4 - -.text -glabel ObjTimeblock_Draw -/* 009F8 80BA0998 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 009FC 80BA099C AFBF001C */ sw $ra, 0x001C($sp) -/* 00A00 80BA09A0 AFB00018 */ sw $s0, 0x0018($sp) -/* 00A04 80BA09A4 AFA40048 */ sw $a0, 0x0048($sp) -/* 00A08 80BA09A8 AFA5004C */ sw $a1, 0x004C($sp) -/* 00A0C 80BA09AC 908F0178 */ lbu $t7, 0x0178($a0) ## 00000178 -/* 00A10 80BA09B0 3C0980BA */ lui $t1, %hi(D_80BA0B38) ## $t1 = 80BA0000 -/* 00A14 80BA09B4 25290B38 */ addiu $t1, $t1, %lo(D_80BA0B38) ## $t1 = 80BA0B38 -/* 00A18 80BA09B8 11E0003E */ beq $t7, $zero, .L80BA0AB4 -/* 00A1C 80BA09BC 3C0680BA */ lui $a2, %hi(D_80BA0C00) ## $a2 = 80BA0000 -/* 00A20 80BA09C0 84980018 */ lh $t8, 0x0018($a0) ## 00000018 -/* 00A24 80BA09C4 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8 -/* 00A28 80BA09C8 24C60C00 */ addiu $a2, $a2, %lo(D_80BA0C00) ## $a2 = 80BA0C00 -/* 00A2C 80BA09CC 33190007 */ andi $t9, $t8, 0x0007 ## $t9 = 00000000 -/* 00A30 80BA09D0 00194080 */ sll $t0, $t9, 2 -/* 00A34 80BA09D4 01194023 */ subu $t0, $t0, $t9 -/* 00A38 80BA09D8 01095021 */ addu $t2, $t0, $t1 -/* 00A3C 80BA09DC AFAA0044 */ sw $t2, 0x0044($sp) -/* 00A40 80BA09E0 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00A44 80BA09E4 240702FA */ addiu $a3, $zero, 0x02FA ## $a3 = 000002FA -/* 00A48 80BA09E8 0C031AB1 */ jal Graph_OpenDisps -/* 00A4C 80BA09EC 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00A50 80BA09F0 8FAC004C */ lw $t4, 0x004C($sp) -/* 00A54 80BA09F4 0C024F46 */ jal func_80093D18 -/* 00A58 80BA09F8 8D840000 */ lw $a0, 0x0000($t4) ## 00000000 -/* 00A5C 80BA09FC 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00A60 80BA0A00 3C0FDA38 */ lui $t7, 0xDA38 ## $t7 = DA380000 -/* 00A64 80BA0A04 35EF0003 */ ori $t7, $t7, 0x0003 ## $t7 = DA380003 -/* 00A68 80BA0A08 244D0008 */ addiu $t5, $v0, 0x0008 ## $t5 = 00000008 -/* 00A6C 80BA0A0C AE0D02C0 */ sw $t5, 0x02C0($s0) ## 000002C0 -/* 00A70 80BA0A10 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 00A74 80BA0A14 8FAE004C */ lw $t6, 0x004C($sp) -/* 00A78 80BA0A18 3C0580BA */ lui $a1, %hi(D_80BA0C18) ## $a1 = 80BA0000 -/* 00A7C 80BA0A1C 24A50C18 */ addiu $a1, $a1, %lo(D_80BA0C18) ## $a1 = 80BA0C18 -/* 00A80 80BA0A20 8DC40000 */ lw $a0, 0x0000($t6) ## 00000000 -/* 00A84 80BA0A24 240602FE */ addiu $a2, $zero, 0x02FE ## $a2 = 000002FE -/* 00A88 80BA0A28 0C0346A2 */ jal Matrix_NewMtx -/* 00A8C 80BA0A2C AFA2002C */ sw $v0, 0x002C($sp) -/* 00A90 80BA0A30 8FA3002C */ lw $v1, 0x002C($sp) -/* 00A94 80BA0A34 3C19FA00 */ lui $t9, 0xFA00 ## $t9 = FA000000 -/* 00A98 80BA0A38 3C0680BA */ lui $a2, %hi(D_80BA0C30) ## $a2 = 80BA0000 -/* 00A9C 80BA0A3C AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00AA0 80BA0A40 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00AA4 80BA0A44 8FA40044 */ lw $a0, 0x0044($sp) -/* 00AA8 80BA0A48 24C60C30 */ addiu $a2, $a2, %lo(D_80BA0C30) ## $a2 = 80BA0C30 -/* 00AAC 80BA0A4C 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00AB0 80BA0A50 AE1802C0 */ sw $t8, 0x02C0($s0) ## 000002C0 -/* 00AB4 80BA0A54 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 00AB8 80BA0A58 908C0001 */ lbu $t4, 0x0001($a0) ## 00000001 -/* 00ABC 80BA0A5C 90890000 */ lbu $t1, 0x0000($a0) ## 00000000 -/* 00AC0 80BA0A60 90980002 */ lbu $t8, 0x0002($a0) ## 00000002 -/* 00AC4 80BA0A64 000C6C00 */ sll $t5, $t4, 16 -/* 00AC8 80BA0A68 00095600 */ sll $t2, $t1, 24 -/* 00ACC 80BA0A6C 014D7825 */ or $t7, $t2, $t5 ## $t7 = 00000000 -/* 00AD0 80BA0A70 0018CA00 */ sll $t9, $t8, 8 -/* 00AD4 80BA0A74 01F94025 */ or $t0, $t7, $t9 ## $t0 = FA000000 -/* 00AD8 80BA0A78 350900FF */ ori $t1, $t0, 0x00FF ## $t1 = FA0000FF -/* 00ADC 80BA0A7C AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00AE0 80BA0A80 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00AE4 80BA0A84 3C0A0600 */ lui $t2, 0x0600 ## $t2 = 06000000 -/* 00AE8 80BA0A88 254A0980 */ addiu $t2, $t2, 0x0980 ## $t2 = 06000980 -/* 00AEC 80BA0A8C 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 00AF0 80BA0A90 AE0B02C0 */ sw $t3, 0x02C0($s0) ## 000002C0 -/* 00AF4 80BA0A94 3C0CDE00 */ lui $t4, 0xDE00 ## $t4 = DE000000 -/* 00AF8 80BA0A98 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -/* 00AFC 80BA0A9C AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004 -/* 00B00 80BA0AA0 8FAD004C */ lw $t5, 0x004C($sp) -/* 00B04 80BA0AA4 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8 -/* 00B08 80BA0AA8 24070304 */ addiu $a3, $zero, 0x0304 ## $a3 = 00000304 -/* 00B0C 80BA0AAC 0C031AD5 */ jal Graph_CloseDisps -/* 00B10 80BA0AB0 8DA50000 */ lw $a1, 0x0000($t5) ## 00000000 -.L80BA0AB4: -/* 00B14 80BA0AB4 8FBF001C */ lw $ra, 0x001C($sp) -/* 00B18 80BA0AB8 8FB00018 */ lw $s0, 0x0018($sp) -/* 00B1C 80BA0ABC 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 00B20 80BA0AC0 03E00008 */ jr $ra -/* 00B24 80BA0AC4 00000000 */ nop -/* 00B28 80BA0AC8 00000000 */ nop -/* 00B2C 80BA0ACC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Init.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Init.s deleted file mode 100644 index 671891eb25..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Init.s +++ /dev/null @@ -1,146 +0,0 @@ -.rdata -glabel D_80BA0B50 - .asciz "時のブロック ( %04xH save:%d color:%d range:%d move:%d)\n" - .balign 4 - -.text -glabel ObjTimeblock_Init -/* 00174 80BA0114 27BDFFC8 */ addiu $sp, $sp, 0xFFC8 ## $sp = FFFFFFC8 -/* 00178 80BA0118 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0017C 80BA011C AFB00020 */ sw $s0, 0x0020($sp) -/* 00180 80BA0120 AFA5003C */ sw $a1, 0x003C($sp) -/* 00184 80BA0124 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00188 80BA0128 AFA0002C */ sw $zero, 0x002C($sp) -/* 0018C 80BA012C 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 00190 80BA0130 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00194 80BA0134 A60000B8 */ sh $zero, 0x00B8($s0) ## 000000B8 -/* 00198 80BA0138 860E00B8 */ lh $t6, 0x00B8($s0) ## 000000B8 -/* 0019C 80BA013C 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 001A0 80BA0140 24840B30 */ addiu $a0, $a0, 0x0B30 ## $a0 = 06000B30 -/* 001A4 80BA0144 27A5002C */ addiu $a1, $sp, 0x002C ## $a1 = FFFFFFF4 -/* 001A8 80BA0148 0C010620 */ jal DynaPolyInfo_Alloc - -/* 001AC 80BA014C A60E0034 */ sh $t6, 0x0034($s0) ## 00000034 -/* 001B0 80BA0150 8FA4003C */ lw $a0, 0x003C($sp) -/* 001B4 80BA0154 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 001B8 80BA0158 8FA7002C */ lw $a3, 0x002C($sp) -/* 001BC 80BA015C 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 001C0 80BA0160 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 001C4 80BA0164 3C0580BA */ lui $a1, %hi(D_80BA0B28) ## $a1 = 80BA0000 -/* 001C8 80BA0168 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 001CC 80BA016C 24A50B28 */ addiu $a1, $a1, %lo(D_80BA0B28) ## $a1 = 80BA0B28 -/* 001D0 80BA0170 0C01E037 */ jal Actor_ProcessInitChain - -/* 001D4 80BA0174 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001D8 80BA0178 860F001C */ lh $t7, 0x001C($s0) ## 0000001C -/* 001DC 80BA017C 3C0580BA */ lui $a1, %hi(D_80BA0AF0) ## $a1 = 80BA0000 -/* 001E0 80BA0180 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 001E4 80BA0184 000FC203 */ sra $t8, $t7, 8 -/* 001E8 80BA0188 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000 -/* 001EC 80BA018C 00194080 */ sll $t0, $t9, 2 -/* 001F0 80BA0190 01194023 */ subu $t0, $t0, $t9 -/* 001F4 80BA0194 00084080 */ sll $t0, $t0, 2 -/* 001F8 80BA0198 00A82821 */ addu $a1, $a1, $t0 -/* 001FC 80BA019C 0C00B58B */ jal Actor_SetScale - -/* 00200 80BA01A0 8CA50AF0 */ lw $a1, %lo(D_80BA0AF0)($a1) -/* 00204 80BA01A4 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 00208 80BA01A8 3C0E80BA */ lui $t6, %hi(func_80BA040C) ## $t6 = 80BA0000 -/* 0020C 80BA01AC 25CE040C */ addiu $t6, $t6, %lo(func_80BA040C) ## $t6 = 80BA040C -/* 00210 80BA01B0 00024983 */ sra $t1, $v0, 6 -/* 00214 80BA01B4 312A0001 */ andi $t2, $t1, 0x0001 ## $t2 = 00000000 -/* 00218 80BA01B8 11400003 */ beq $t2, $zero, .L80BA01C8 -/* 0021C 80BA01BC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00220 80BA01C0 10000009 */ beq $zero, $zero, .L80BA01E8 -/* 00224 80BA01C4 A2000177 */ sb $zero, 0x0177($s0) ## 00000177 -.L80BA01C8: -/* 00228 80BA01C8 304B003F */ andi $t3, $v0, 0x003F ## $t3 = 00000000 -/* 0022C 80BA01CC 29610038 */ slti $at, $t3, 0x0038 -/* 00230 80BA01D0 10200004 */ beq $at, $zero, .L80BA01E4 -/* 00234 80BA01D4 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001 -/* 00238 80BA01D8 240C0002 */ addiu $t4, $zero, 0x0002 ## $t4 = 00000002 -/* 0023C 80BA01DC 10000002 */ beq $zero, $zero, .L80BA01E8 -/* 00240 80BA01E0 A20C0177 */ sb $t4, 0x0177($s0) ## 00000177 -.L80BA01E4: -/* 00244 80BA01E4 A20D0177 */ sb $t5, 0x0177($s0) ## 00000177 -.L80BA01E8: -/* 00248 80BA01E8 860F001C */ lh $t7, 0x001C($s0) ## 0000001C -/* 0024C 80BA01EC 3C0580BA */ lui $a1, %hi(D_80BA0AF4) ## $a1 = 80BA0000 -/* 00250 80BA01F0 AE0E0168 */ sw $t6, 0x0168($s0) ## 00000168 -/* 00254 80BA01F4 000FC203 */ sra $t8, $t7, 8 -/* 00258 80BA01F8 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000 -/* 0025C 80BA01FC 00194080 */ sll $t0, $t9, 2 -/* 00260 80BA0200 01194023 */ subu $t0, $t0, $t9 -/* 00264 80BA0204 00084080 */ sll $t0, $t0, 2 -/* 00268 80BA0208 00A82821 */ addu $a1, $a1, $t0 -/* 0026C 80BA020C 0C00B56E */ jal Actor_SetHeight - -/* 00270 80BA0210 8CA50AF4 */ lw $a1, %lo(D_80BA0AF4)($a1) -/* 00274 80BA0214 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00278 80BA0218 8FA4003C */ lw $a0, 0x003C($sp) -/* 0027C 80BA021C 0C00B2D0 */ jal Flags_GetSwitch - -/* 00280 80BA0220 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00284 80BA0224 10400003 */ beq $v0, $zero, .L80BA0234 -/* 00288 80BA0228 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001 -/* 0028C 80BA022C 10000002 */ beq $zero, $zero, .L80BA0238 -/* 00290 80BA0230 A2090174 */ sb $t1, 0x0174($s0) ## 00000174 -.L80BA0234: -/* 00294 80BA0234 A2000174 */ sb $zero, 0x0174($s0) ## 00000174 -.L80BA0238: -/* 00298 80BA0238 860A001C */ lh $t2, 0x001C($s0) ## 0000001C -/* 0029C 80BA023C 240D0001 */ addiu $t5, $zero, 0x0001 ## $t5 = 00000001 -/* 002A0 80BA0240 000A5BC3 */ sra $t3, $t2, 15 -/* 002A4 80BA0244 316C0001 */ andi $t4, $t3, 0x0001 ## $t4 = 00000000 -/* 002A8 80BA0248 51800004 */ beql $t4, $zero, .L80BA025C -/* 002AC 80BA024C A2000175 */ sb $zero, 0x0175($s0) ## 00000175 -/* 002B0 80BA0250 10000002 */ beq $zero, $zero, .L80BA025C -/* 002B4 80BA0254 A20D0175 */ sb $t5, 0x0175($s0) ## 00000175 -/* 002B8 80BA0258 A2000175 */ sb $zero, 0x0175($s0) ## 00000175 -.L80BA025C: -/* 002BC 80BA025C 0C2E7FE8 */ jal func_80B9FFA0 -/* 002C0 80BA0260 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002C4 80BA0264 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 002C8 80BA0268 A2020178 */ sb $v0, 0x0178($s0) ## 00000178 -/* 002CC 80BA026C 000E7A83 */ sra $t7, $t6, 10 -/* 002D0 80BA0270 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000 -/* 002D4 80BA0274 57000006 */ bnel $t8, $zero, .L80BA0290 -/* 002D8 80BA0278 92190178 */ lbu $t9, 0x0178($s0) ## 00000178 -/* 002DC 80BA027C 0C2E8145 */ jal func_80BA0514 -/* 002E0 80BA0280 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 002E4 80BA0284 1000000B */ beq $zero, $zero, .L80BA02B4 -/* 002E8 80BA0288 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 002EC 80BA028C 92190178 */ lbu $t9, 0x0178($s0) ## 00000178 -.L80BA0290: -/* 002F0 80BA0290 13200005 */ beq $t9, $zero, .L80BA02A8 -/* 002F4 80BA0294 00000000 */ nop -/* 002F8 80BA0298 0C2E81D6 */ jal func_80BA0758 -/* 002FC 80BA029C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00300 80BA02A0 10000004 */ beq $zero, $zero, .L80BA02B4 -/* 00304 80BA02A4 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L80BA02A8: -/* 00308 80BA02A8 0C2E820F */ jal func_80BA083C -/* 0030C 80BA02AC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00310 80BA02B0 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L80BA02B4: -/* 00314 80BA02B4 86070018 */ lh $a3, 0x0018($s0) ## 00000018 -/* 00318 80BA02B8 3C0480BA */ lui $a0, %hi(D_80BA0B50) ## $a0 = 80BA0000 -/* 0031C 80BA02BC 000242C3 */ sra $t0, $v0, 11 -/* 00320 80BA02C0 00025283 */ sra $t2, $v0, 10 -/* 00324 80BA02C4 314B0001 */ andi $t3, $t2, 0x0001 ## $t3 = 00000000 -/* 00328 80BA02C8 31090007 */ andi $t1, $t0, 0x0007 ## $t1 = 00000000 -/* 0032C 80BA02CC 92060177 */ lbu $a2, 0x0177($s0) ## 00000177 -/* 00330 80BA02D0 AFAB0014 */ sw $t3, 0x0014($sp) -/* 00334 80BA02D4 AFA90010 */ sw $t1, 0x0010($sp) -/* 00338 80BA02D8 24840B50 */ addiu $a0, $a0, %lo(D_80BA0B50) ## $a0 = 80BA0B50 -/* 0033C 80BA02DC 3045FFFF */ andi $a1, $v0, 0xFFFF ## $a1 = 00000000 -/* 00340 80BA02E0 0C00084C */ jal osSyncPrintf - -/* 00344 80BA02E4 30E70007 */ andi $a3, $a3, 0x0007 ## $a3 = 00000000 -/* 00348 80BA02E8 8FBF0024 */ lw $ra, 0x0024($sp) -/* 0034C 80BA02EC 8FB00020 */ lw $s0, 0x0020($sp) -/* 00350 80BA02F0 27BD0038 */ addiu $sp, $sp, 0x0038 ## $sp = 00000000 -/* 00354 80BA02F4 03E00008 */ jr $ra -/* 00358 80BA02F8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Update.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Update.s deleted file mode 100644 index 8b12209d28..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Update.s +++ /dev/null @@ -1,35 +0,0 @@ -glabel ObjTimeblock_Update -/* 0097C 80BA091C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00980 80BA0920 AFBF001C */ sw $ra, 0x001C($sp) -/* 00984 80BA0924 AFB00018 */ sw $s0, 0x0018($sp) -/* 00988 80BA0928 AFA40020 */ sw $a0, 0x0020($sp) -/* 0098C 80BA092C 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 00990 80BA0930 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00994 80BA0934 0320F809 */ jalr $ra, $t9 -/* 00998 80BA0938 00000000 */ nop -/* 0099C 80BA093C 8FA70020 */ lw $a3, 0x0020($sp) -/* 009A0 80BA0940 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 009A4 80BA0944 26050810 */ addiu $a1, $s0, 0x0810 ## $a1 = 00000810 -/* 009A8 80BA0948 84E2016C */ lh $v0, 0x016C($a3) ## 0000016C -/* 009AC 80BA094C 18400002 */ blez $v0, .L80BA0958 -/* 009B0 80BA0950 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 009B4 80BA0954 A4EE016C */ sh $t6, 0x016C($a3) ## 0000016C -.L80BA0958: -/* 009B8 80BA0958 90EF0178 */ lbu $t7, 0x0178($a3) ## 00000178 -/* 009BC 80BA095C 11E00007 */ beq $t7, $zero, .L80BA097C -/* 009C0 80BA0960 00000000 */ nop -/* 009C4 80BA0964 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 009C8 80BA0968 26050810 */ addiu $a1, $s0, 0x0810 ## $a1 = 00000810 -/* 009CC 80BA096C 0C00FB14 */ jal func_8003EC50 -/* 009D0 80BA0970 8CE6014C */ lw $a2, 0x014C($a3) ## 0000014C -/* 009D4 80BA0974 10000004 */ beq $zero, $zero, .L80BA0988 -/* 009D8 80BA0978 8FBF001C */ lw $ra, 0x001C($sp) -.L80BA097C: -/* 009DC 80BA097C 0C00FAFE */ jal func_8003EBF8 -/* 009E0 80BA0980 8CE6014C */ lw $a2, 0x014C($a3) ## 0000014C -/* 009E4 80BA0984 8FBF001C */ lw $ra, 0x001C($sp) -.L80BA0988: -/* 009E8 80BA0988 8FB00018 */ lw $s0, 0x0018($sp) -/* 009EC 80BA098C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 009F0 80BA0990 03E00008 */ jr $ra -/* 009F4 80BA0994 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80B9FFA0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80B9FFA0.s deleted file mode 100644 index 6ea2936b9a..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80B9FFA0.s +++ /dev/null @@ -1,54 +0,0 @@ -glabel func_80B9FFA0 -/* 00000 80B9FFA0 8482001C */ lh $v0, 0x001C($a0) ## 0000001C -/* 00004 80B9FFA4 00027283 */ sra $t6, $v0, 10 -/* 00008 80B9FFA8 31CF0001 */ andi $t7, $t6, 0x0001 ## $t7 = 00000000 -/* 0000C 80B9FFAC 15E00021 */ bne $t7, $zero, .L80BA0034 -/* 00010 80B9FFB0 000263C3 */ sra $t4, $v0, 15 -/* 00014 80B9FFB4 90830177 */ lbu $v1, 0x0177($a0) ## 00000177 -/* 00018 80B9FFB8 0002C3C3 */ sra $t8, $v0, 15 -/* 0001C 80B9FFBC 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000 -/* 00020 80B9FFC0 14600003 */ bne $v1, $zero, .L80B9FFD0 -/* 00024 80B9FFC4 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00028 80B9FFC8 03E00008 */ jr $ra -/* 0002C 80B9FFCC 90820175 */ lbu $v0, 0x0175($a0) ## 00000175 -.L80B9FFD0: -/* 00030 80B9FFD0 13200003 */ beq $t9, $zero, .L80B9FFE0 -/* 00034 80B9FFD4 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00038 80B9FFD8 10000001 */ beq $zero, $zero, .L80B9FFE0 -/* 0003C 80B9FFDC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -.L80B9FFE0: -/* 00040 80B9FFE0 14610004 */ bne $v1, $at, .L80B9FFF4 -/* 00044 80B9FFE4 3C098016 */ lui $t1, %hi(gSaveContext+4) -/* 00048 80B9FFE8 90880174 */ lbu $t0, 0x0174($a0) ## 00000174 -/* 0004C 80B9FFEC 03E00008 */ jr $ra -/* 00050 80B9FFF0 01051026 */ xor $v0, $t0, $a1 -.L80B9FFF4: -/* 00054 80B9FFF4 8D29E664 */ lw $t1, %lo(gSaveContext+4)($t1) -/* 00058 80B9FFF8 24010005 */ addiu $at, $zero, 0x0005 ## $at = 00000005 -/* 0005C 80B9FFFC 24030011 */ addiu $v1, $zero, 0x0011 ## $v1 = 00000011 -/* 00060 80BA0000 11200003 */ beq $t1, $zero, .L80BA0010 -/* 00064 80BA0004 00000000 */ nop -/* 00068 80BA0008 10000001 */ beq $zero, $zero, .L80BA0010 -/* 0006C 80BA000C 24030005 */ addiu $v1, $zero, 0x0005 ## $v1 = 00000005 -.L80BA0010: -/* 00070 80BA0010 54610004 */ bnel $v1, $at, .L80BA0024 -/* 00074 80BA0014 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -/* 00078 80BA0018 10000002 */ beq $zero, $zero, .L80BA0024 -/* 0007C 80BA001C 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 -/* 00080 80BA0020 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -.L80BA0024: -/* 00084 80BA0024 908A0174 */ lbu $t2, 0x0174($a0) ## 00000174 -/* 00088 80BA0028 01455826 */ xor $t3, $t2, $a1 -/* 0008C 80BA002C 03E00008 */ jr $ra -/* 00090 80BA0030 01631026 */ xor $v0, $t3, $v1 -.L80BA0034: -/* 00094 80BA0034 318D0001 */ andi $t5, $t4, 0x0001 ## $t5 = 00000000 -/* 00098 80BA0038 11A00003 */ beq $t5, $zero, .L80BA0048 -/* 0009C 80BA003C 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -/* 000A0 80BA0040 10000001 */ beq $zero, $zero, .L80BA0048 -/* 000A4 80BA0044 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 -.L80BA0048: -/* 000A8 80BA0048 908E0174 */ lbu $t6, 0x0174($a0) ## 00000174 -/* 000AC 80BA004C 006E1026 */ xor $v0, $v1, $t6 -/* 000B0 80BA0050 03E00008 */ jr $ra -/* 000B4 80BA0054 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0058.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0058.s deleted file mode 100644 index ccb3cdb66b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0058.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_80BA0058 -/* 000B8 80BA0058 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 000BC 80BA005C AFA40030 */ sw $a0, 0x0030($sp) -/* 000C0 80BA0060 8FAE0030 */ lw $t6, 0x0030($sp) -/* 000C4 80BA0064 AFBF002C */ sw $ra, 0x002C($sp) -/* 000C8 80BA0068 3C0980BA */ lui $t1, %hi(D_80BA0AF8) ## $t1 = 80BA0000 -/* 000CC 80BA006C C5C40028 */ lwc1 $f4, 0x0028($t6) ## 00000028 -/* 000D0 80BA0070 8DC70024 */ lw $a3, 0x0024($t6) ## 00000024 -/* 000D4 80BA0074 24A41C24 */ addiu $a0, $a1, 0x1C24 ## $a0 = 00001C24 -/* 000D8 80BA0078 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 000DC 80BA007C C5C6002C */ lwc1 $f6, 0x002C($t6) ## 0000002C -/* 000E0 80BA0080 AFA00020 */ sw $zero, 0x0020($sp) -/* 000E4 80BA0084 AFA0001C */ sw $zero, 0x001C($sp) -/* 000E8 80BA0088 AFA00018 */ sw $zero, 0x0018($sp) -/* 000EC 80BA008C E7A60014 */ swc1 $f6, 0x0014($sp) -/* 000F0 80BA0090 85CF001C */ lh $t7, 0x001C($t6) ## 0000001C -/* 000F4 80BA0094 2406008B */ addiu $a2, $zero, 0x008B ## $a2 = 0000008B -/* 000F8 80BA0098 000FC203 */ sra $t8, $t7, 8 -/* 000FC 80BA009C 33190001 */ andi $t9, $t8, 0x0001 ## $t9 = 00000000 -/* 00100 80BA00A0 00194080 */ sll $t0, $t9, 2 -/* 00104 80BA00A4 01194023 */ subu $t0, $t0, $t9 -/* 00108 80BA00A8 00084080 */ sll $t0, $t0, 2 -/* 0010C 80BA00AC 01284821 */ addu $t1, $t1, $t0 -/* 00110 80BA00B0 85290AF8 */ lh $t1, %lo(D_80BA0AF8)($t1) -/* 00114 80BA00B4 0C00C7D4 */ jal Actor_Spawn - ## ActorSpawn -/* 00118 80BA00B8 AFA90024 */ sw $t1, 0x0024($sp) -/* 0011C 80BA00BC 8FBF002C */ lw $ra, 0x002C($sp) -/* 00120 80BA00C0 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00124 80BA00C4 03E00008 */ jr $ra -/* 00128 80BA00C8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA00CC.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA00CC.s deleted file mode 100644 index d27bebc2d1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA00CC.s +++ /dev/null @@ -1,24 +0,0 @@ -glabel func_80BA00CC -/* 0012C 80BA00CC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00130 80BA00D0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00134 80BA00D4 AFA40018 */ sw $a0, 0x0018($sp) -/* 00138 80BA00D8 0C00B2D0 */ jal Flags_GetSwitch - -/* 0013C 80BA00DC AFA5001C */ sw $a1, 0x001C($sp) -/* 00140 80BA00E0 8FA40018 */ lw $a0, 0x0018($sp) -/* 00144 80BA00E4 10400005 */ beq $v0, $zero, .L80BA00FC -/* 00148 80BA00E8 8FA5001C */ lw $a1, 0x001C($sp) -/* 0014C 80BA00EC 0C00B2ED */ jal Flags_UnsetSwitch - -/* 00150 80BA00F0 00000000 */ nop -/* 00154 80BA00F4 10000004 */ beq $zero, $zero, .L80BA0108 -/* 00158 80BA00F8 8FBF0014 */ lw $ra, 0x0014($sp) -.L80BA00FC: -/* 0015C 80BA00FC 0C00B2DD */ jal Flags_SetSwitch - -/* 00160 80BA0100 00000000 */ nop -/* 00164 80BA0104 8FBF0014 */ lw $ra, 0x0014($sp) -.L80BA0108: -/* 00168 80BA0108 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0016C 80BA010C 03E00008 */ jr $ra -/* 00170 80BA0110 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA032C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA032C.s deleted file mode 100644 index a72b0868a1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA032C.s +++ /dev/null @@ -1,61 +0,0 @@ -glabel func_80BA032C -/* 0038C 80BA032C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00390 80BA0330 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00394 80BA0334 AFA5002C */ sw $a1, 0x002C($sp) -/* 00398 80BA0338 908E0178 */ lbu $t6, 0x0178($a0) ## 00000178 -/* 0039C 80BA033C 51C00008 */ beql $t6, $zero, .L80BA0360 -/* 003A0 80BA0340 848F001C */ lh $t7, 0x001C($a0) ## 0000001C -/* 003A4 80BA0344 0C010D64 */ jal func_80043590 -/* 003A8 80BA0348 AFA40028 */ sw $a0, 0x0028($sp) -/* 003AC 80BA034C 10400003 */ beq $v0, $zero, .L80BA035C -/* 003B0 80BA0350 8FA40028 */ lw $a0, 0x0028($sp) -/* 003B4 80BA0354 10000029 */ beq $zero, $zero, .L80BA03FC -/* 003B8 80BA0358 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80BA035C: -/* 003BC 80BA035C 848F001C */ lh $t7, 0x001C($a0) ## 0000001C -.L80BA0360: -/* 003C0 80BA0360 3C0180BA */ lui $at, %hi(D_80BA0B08) ## $at = 80BA0000 -/* 003C4 80BA0364 C4860090 */ lwc1 $f6, 0x0090($a0) ## 00000090 -/* 003C8 80BA0368 000FC2C3 */ sra $t8, $t7, 11 -/* 003CC 80BA036C 33190007 */ andi $t9, $t8, 0x0007 ## $t9 = 00000000 -/* 003D0 80BA0370 00194080 */ sll $t0, $t9, 2 -/* 003D4 80BA0374 00280821 */ addu $at, $at, $t0 -/* 003D8 80BA0378 C4240B08 */ lwc1 $f4, %lo(D_80BA0B08)($at) -/* 003DC 80BA037C 8FA9002C */ lw $t1, 0x002C($sp) -/* 003E0 80BA0380 4604303E */ c.le.s $f6, $f4 -/* 003E4 80BA0384 00000000 */ nop -/* 003E8 80BA0388 4502001C */ bc1fl .L80BA03FC -/* 003EC 80BA038C 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 003F0 80BA0390 8D261C44 */ lw $a2, 0x1C44($t1) ## 00001C44 -/* 003F4 80BA0394 AFA40028 */ sw $a0, 0x0028($sp) -/* 003F8 80BA0398 27A5001C */ addiu $a1, $sp, 0x001C ## $a1 = FFFFFFF4 -/* 003FC 80BA039C 0C00B6F4 */ jal func_8002DBD0 -/* 00400 80BA03A0 24C60024 */ addiu $a2, $a2, 0x0024 ## $a2 = 00000024 -/* 00404 80BA03A4 8FA40028 */ lw $a0, 0x0028($sp) -/* 00408 80BA03A8 3C014248 */ lui $at, 0x4248 ## $at = 42480000 -/* 0040C 80BA03AC 44815000 */ mtc1 $at, $f10 ## $f10 = 50.00 -/* 00410 80BA03B0 C4880050 */ lwc1 $f8, 0x0050($a0) ## 00000050 -/* 00414 80BA03B4 3C0140C0 */ lui $at, 0x40C0 ## $at = 40C00000 -/* 00418 80BA03B8 44819000 */ mtc1 $at, $f18 ## $f18 = 6.00 -/* 0041C 80BA03BC 460A4402 */ mul.s $f16, $f8, $f10 -/* 00420 80BA03C0 C7A0001C */ lwc1 $f0, 0x001C($sp) -/* 00424 80BA03C4 46000005 */ abs.s $f0, $f0 -/* 00428 80BA03C8 46128080 */ add.s $f2, $f16, $f18 -/* 0042C 80BA03CC 4600103C */ c.lt.s $f2, $f0 -/* 00430 80BA03D0 C7A00024 */ lwc1 $f0, 0x0024($sp) -/* 00434 80BA03D4 45010006 */ bc1t .L80BA03F0 -/* 00438 80BA03D8 00000000 */ nop -/* 0043C 80BA03DC 46000005 */ abs.s $f0, $f0 -/* 00440 80BA03E0 4600103C */ c.lt.s $f2, $f0 -/* 00444 80BA03E4 00000000 */ nop -/* 00448 80BA03E8 45020004 */ bc1fl .L80BA03FC -/* 0044C 80BA03EC 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80BA03F0: -/* 00450 80BA03F0 10000002 */ beq $zero, $zero, .L80BA03FC -/* 00454 80BA03F4 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 00458 80BA03F8 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -.L80BA03FC: -/* 0045C 80BA03FC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00460 80BA0400 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00464 80BA0404 03E00008 */ jr $ra -/* 00468 80BA0408 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA040C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA040C.s deleted file mode 100644 index 6322f837da..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA040C.s +++ /dev/null @@ -1,32 +0,0 @@ -glabel func_80BA040C -/* 0046C 80BA040C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00470 80BA0410 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00474 80BA0414 AFA40020 */ sw $a0, 0x0020($sp) -/* 00478 80BA0418 8CA31C44 */ lw $v1, 0x1C44($a1) ## 00001C44 -/* 0047C 80BA041C AFA50024 */ sw $a1, 0x0024($sp) -/* 00480 80BA0420 0C2E80CB */ jal func_80BA032C -/* 00484 80BA0424 AFA3001C */ sw $v1, 0x001C($sp) -/* 00488 80BA0428 8FA3001C */ lw $v1, 0x001C($sp) -/* 0048C 80BA042C 1040000F */ beq $v0, $zero, .L80BA046C -/* 00490 80BA0430 8FA60024 */ lw $a2, 0x0024($sp) -/* 00494 80BA0434 8C620680 */ lw $v0, 0x0680($v1) ## 00000680 -/* 00498 80BA0438 3C010080 */ lui $at, 0x0080 ## $at = 00800000 -/* 0049C 80BA043C 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 004A0 80BA0440 000271C0 */ sll $t6, $v0, 7 -/* 004A4 80BA0444 05C10008 */ bgez $t6, .L80BA0468 -/* 004A8 80BA0448 0041C825 */ or $t9, $v0, $at ## $t9 = 00800000 -/* 004AC 80BA044C 0C042F56 */ jal func_8010BD58 -/* 004B0 80BA0450 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 004B4 80BA0454 8FB80020 */ lw $t8, 0x0020($sp) -/* 004B8 80BA0458 3C0F80BA */ lui $t7, %hi(func_80BA0480) ## $t7 = 80BA0000 -/* 004BC 80BA045C 25EF0480 */ addiu $t7, $t7, %lo(func_80BA0480) ## $t7 = 80BA0480 -/* 004C0 80BA0460 10000002 */ beq $zero, $zero, .L80BA046C -/* 004C4 80BA0464 AF0F0168 */ sw $t7, 0x0168($t8) ## 00000168 -.L80BA0468: -/* 004C8 80BA0468 AC790680 */ sw $t9, 0x0680($v1) ## 00000680 -.L80BA046C: -/* 004CC 80BA046C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 004D0 80BA0470 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 004D4 80BA0474 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 004D8 80BA0478 03E00008 */ jr $ra -/* 004DC 80BA047C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0480.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0480.s deleted file mode 100644 index 9a0c2845c6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0480.s +++ /dev/null @@ -1,34 +0,0 @@ -glabel func_80BA0480 -/* 004E0 80BA0480 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 004E4 80BA0484 00A11021 */ addu $v0, $a1, $at -/* 004E8 80BA0488 944E04C6 */ lhu $t6, 0x04C6($v0) ## 000004C6 -/* 004EC 80BA048C 24010004 */ addiu $at, $zero, 0x0004 ## $at = 00000004 -/* 004F0 80BA0490 3C0F80BA */ lui $t7, %hi(func_80BA040C) ## $t7 = 80BA0000 -/* 004F4 80BA0494 15C10002 */ bne $t6, $at, .L80BA04A0 -/* 004F8 80BA0498 25EF040C */ addiu $t7, $t7, %lo(func_80BA040C) ## $t7 = 80BA040C -/* 004FC 80BA049C AC8F0168 */ sw $t7, 0x0168($a0) ## 00000168 -.L80BA04A0: -/* 00500 80BA04A0 945804C4 */ lhu $t8, 0x04C4($v0) ## 000004C4 -/* 00504 80BA04A4 2401000A */ addiu $at, $zero, 0x000A ## $at = 0000000A -/* 00508 80BA04A8 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 0050C 80BA04AC 17010010 */ bne $t8, $at, .L80BA04F0 -/* 00510 80BA04B0 00000000 */ nop -/* 00514 80BA04B4 94990172 */ lhu $t9, 0x0172($a0) ## 00000172 -/* 00518 80BA04B8 240100FE */ addiu $at, $zero, 0x00FE ## $at = 000000FE -/* 0051C 80BA04BC 2408006E */ addiu $t0, $zero, 0x006E ## $t0 = 0000006E -/* 00520 80BA04C0 57210004 */ bnel $t9, $at, .L80BA04D4 -/* 00524 80BA04C4 8489016E */ lh $t1, 0x016E($a0) ## 0000016E -/* 00528 80BA04C8 10000009 */ beq $zero, $zero, .L80BA04F0 -/* 0052C 80BA04CC A488016E */ sh $t0, 0x016E($a0) ## 0000016E -/* 00530 80BA04D0 8489016E */ lh $t1, 0x016E($a0) ## 0000016E -.L80BA04D4: -/* 00534 80BA04D4 252AFFFF */ addiu $t2, $t1, 0xFFFF ## $t2 = FFFFFFFF -/* 00538 80BA04D8 A48A016E */ sh $t2, 0x016E($a0) ## 0000016E -/* 0053C 80BA04DC 848B016E */ lh $t3, 0x016E($a0) ## 0000016E -/* 00540 80BA04E0 15600003 */ bne $t3, $zero, .L80BA04F0 -/* 00544 80BA04E4 00000000 */ nop -/* 00548 80BA04E8 03E00008 */ jr $ra -/* 0054C 80BA04EC 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L80BA04F0: -/* 00550 80BA04F0 03E00008 */ jr $ra -/* 00554 80BA04F4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA04F8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA04F8.s deleted file mode 100644 index 2ca872f2a4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA04F8.s +++ /dev/null @@ -1,5 +0,0 @@ -glabel func_80BA04F8 -/* 00558 80BA04F8 3C0E80BA */ lui $t6, %hi(func_80BA0508) ## $t6 = 80BA0000 -/* 0055C 80BA04FC 25CE0508 */ addiu $t6, $t6, %lo(func_80BA0508) ## $t6 = 80BA0508 -/* 00560 80BA0500 03E00008 */ jr $ra -/* 00564 80BA0504 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0508.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0508.s deleted file mode 100644 index d6d914962c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0508.s +++ /dev/null @@ -1,4 +0,0 @@ -glabel func_80BA0508 -/* 00568 80BA0508 AFA40000 */ sw $a0, 0x0000($sp) -/* 0056C 80BA050C 03E00008 */ jr $ra -/* 00570 80BA0510 AFA50004 */ sw $a1, 0x0004($sp) diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0514.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0514.s deleted file mode 100644 index eb014c8fdf..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0514.s +++ /dev/null @@ -1,5 +0,0 @@ -glabel func_80BA0514 -/* 00574 80BA0514 3C0E80BA */ lui $t6, %hi(func_80BA0524) ## $t6 = 80BA0000 -/* 00578 80BA0518 25CE0524 */ addiu $t6, $t6, %lo(func_80BA0524) ## $t6 = 80BA0524 -/* 0057C 80BA051C 03E00008 */ jr $ra -/* 00580 80BA0520 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0524.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0524.s deleted file mode 100644 index df152d6a87..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0524.s +++ /dev/null @@ -1,116 +0,0 @@ -.rdata -glabel D_80BA0B98 - .asciz "◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n" - .balign 4 - -.text -glabel func_80BA0524 -/* 00584 80BA0524 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00588 80BA0528 AFB00018 */ sw $s0, 0x0018($sp) -/* 0058C 80BA052C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00590 80BA0530 AFBF001C */ sw $ra, 0x001C($sp) -/* 00594 80BA0534 AFA5002C */ sw $a1, 0x002C($sp) -/* 00598 80BA0538 8E190168 */ lw $t9, 0x0168($s0) ## 00000168 -/* 0059C 80BA053C 0320F809 */ jalr $ra, $t9 -/* 005A0 80BA0540 00000000 */ nop -/* 005A4 80BA0544 5040001F */ beql $v0, $zero, .L80BA05C4 -/* 005A8 80BA0548 8FA4002C */ lw $a0, 0x002C($sp) -/* 005AC 80BA054C 860E016C */ lh $t6, 0x016C($s0) ## 0000016C -/* 005B0 80BA0550 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 005B4 80BA0554 5DC0001B */ bgtzl $t6, .L80BA05C4 -/* 005B8 80BA0558 8FA4002C */ lw $a0, 0x002C($sp) -/* 005BC 80BA055C 0C2E8016 */ jal func_80BA0058 -/* 005C0 80BA0560 8FA5002C */ lw $a1, 0x002C($sp) -/* 005C4 80BA0564 240F00A0 */ addiu $t7, $zero, 0x00A0 ## $t7 = 000000A0 -/* 005C8 80BA0568 A60F016C */ sh $t7, 0x016C($s0) ## 0000016C -/* 005CC 80BA056C 8FA4002C */ lw $a0, 0x002C($sp) -/* 005D0 80BA0570 0C020120 */ jal func_80080480 -/* 005D4 80BA0574 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 005D8 80BA0578 8FB8002C */ lw $t8, 0x002C($sp) -/* 005DC 80BA057C 3C0480BA */ lui $a0, %hi(D_80BA0B98) ## $a0 = 80BA0000 -/* 005E0 80BA0580 24840B98 */ addiu $a0, $a0, %lo(D_80BA0B98) ## $a0 = 80BA0B98 -/* 005E4 80BA0584 0C00084C */ jal osSyncPrintf - -/* 005E8 80BA0588 8F05009C */ lw $a1, 0x009C($t8) ## 0000009C -/* 005EC 80BA058C 92090177 */ lbu $t1, 0x0177($s0) ## 00000177 -/* 005F0 80BA0590 2408000C */ addiu $t0, $zero, 0x000C ## $t0 = 0000000C -/* 005F4 80BA0594 A6080170 */ sh $t0, 0x0170($s0) ## 00000170 -/* 005F8 80BA0598 55200006 */ bnel $t1, $zero, .L80BA05B4 -/* 005FC 80BA059C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00600 80BA05A0 860A001C */ lh $t2, 0x001C($s0) ## 0000001C -/* 00604 80BA05A4 394B8000 */ xori $t3, $t2, 0x8000 ## $t3 = FFFF8000 -/* 00608 80BA05A8 10000005 */ beq $zero, $zero, .L80BA05C0 -/* 0060C 80BA05AC A60B001C */ sh $t3, 0x001C($s0) ## 0000001C -/* 00610 80BA05B0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -.L80BA05B4: -/* 00614 80BA05B4 8FA4002C */ lw $a0, 0x002C($sp) -/* 00618 80BA05B8 0C2E8033 */ jal func_80BA00CC -/* 0061C 80BA05BC 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -.L80BA05C0: -/* 00620 80BA05C0 8FA4002C */ lw $a0, 0x002C($sp) -.L80BA05C4: -/* 00624 80BA05C4 3C0C0001 */ lui $t4, 0x0001 ## $t4 = 00010000 -/* 00628 80BA05C8 86020170 */ lh $v0, 0x0170($s0) ## 00000170 -/* 0062C 80BA05CC 01846021 */ addu $t4, $t4, $a0 -/* 00630 80BA05D0 958C04C4 */ lhu $t4, 0x04C4($t4) ## 000104C4 -/* 00634 80BA05D4 244DFFFF */ addiu $t5, $v0, 0xFFFF ## $t5 = FFFFFFFF -/* 00638 80BA05D8 1840001A */ blez $v0, .L80BA0644 -/* 0063C 80BA05DC A60C0172 */ sh $t4, 0x0172($s0) ## 00000172 -/* 00640 80BA05E0 A60D0170 */ sh $t5, 0x0170($s0) ## 00000170 -/* 00644 80BA05E4 86190170 */ lh $t9, 0x0170($s0) ## 00000170 -/* 00648 80BA05E8 17200016 */ bne $t9, $zero, .L80BA0644 -/* 0064C 80BA05EC 00000000 */ nop -/* 00650 80BA05F0 920E0177 */ lbu $t6, 0x0177($s0) ## 00000177 -/* 00654 80BA05F4 55C0000C */ bnel $t6, $zero, .L80BA0628 -/* 00658 80BA05F8 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 0065C 80BA05FC 860F001C */ lh $t7, 0x001C($s0) ## 0000001C -/* 00660 80BA0600 24090001 */ addiu $t1, $zero, 0x0001 ## $t1 = 00000001 -/* 00664 80BA0604 000FC3C3 */ sra $t8, $t7, 15 -/* 00668 80BA0608 33080001 */ andi $t0, $t8, 0x0001 ## $t0 = 00000000 -/* 0066C 80BA060C 11000003 */ beq $t0, $zero, .L80BA061C -/* 00670 80BA0610 00000000 */ nop -/* 00674 80BA0614 1000000B */ beq $zero, $zero, .L80BA0644 -/* 00678 80BA0618 A2090175 */ sb $t1, 0x0175($s0) ## 00000175 -.L80BA061C: -/* 0067C 80BA061C 10000009 */ beq $zero, $zero, .L80BA0644 -/* 00680 80BA0620 A2000175 */ sb $zero, 0x0175($s0) ## 00000175 -/* 00684 80BA0624 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -.L80BA0628: -/* 00688 80BA0628 0C00B2D0 */ jal Flags_GetSwitch - -/* 0068C 80BA062C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00690 80BA0630 10400003 */ beq $v0, $zero, .L80BA0640 -/* 00694 80BA0634 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00698 80BA0638 10000002 */ beq $zero, $zero, .L80BA0644 -/* 0069C 80BA063C A20A0174 */ sb $t2, 0x0174($s0) ## 00000174 -.L80BA0640: -/* 006A0 80BA0640 A2000174 */ sb $zero, 0x0174($s0) ## 00000174 -.L80BA0644: -/* 006A4 80BA0644 0C2E7FE8 */ jal func_80B9FFA0 -/* 006A8 80BA0648 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 006AC 80BA064C 920B0177 */ lbu $t3, 0x0177($s0) ## 00000177 -/* 006B0 80BA0650 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 006B4 80BA0654 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000 -/* 006B8 80BA0658 55610009 */ bnel $t3, $at, .L80BA0680 -/* 006BC 80BA065C 860D016C */ lh $t5, 0x016C($s0) ## 0000016C -/* 006C0 80BA0660 920C0178 */ lbu $t4, 0x0178($s0) ## 00000178 -/* 006C4 80BA0664 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 006C8 80BA0668 504C0005 */ beql $v0, $t4, .L80BA0680 -/* 006CC 80BA066C 860D016C */ lh $t5, 0x016C($s0) ## 0000016C -/* 006D0 80BA0670 0C2E813E */ jal func_80BA04F8 -/* 006D4 80BA0674 AFA20024 */ sw $v0, 0x0024($sp) -/* 006D8 80BA0678 8FA30024 */ lw $v1, 0x0024($sp) -/* 006DC 80BA067C 860D016C */ lh $t5, 0x016C($s0) ## 0000016C -.L80BA0680: -/* 006E0 80BA0680 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032 -/* 006E4 80BA0684 A2030178 */ sb $v1, 0x0178($s0) ## 00000178 -/* 006E8 80BA0688 55A10004 */ bnel $t5, $at, .L80BA069C -/* 006EC 80BA068C 8FBF001C */ lw $ra, 0x001C($sp) -/* 006F0 80BA0690 0C01E221 */ jal func_80078884 -/* 006F4 80BA0694 24044807 */ addiu $a0, $zero, 0x4807 ## $a0 = 00004807 -/* 006F8 80BA0698 8FBF001C */ lw $ra, 0x001C($sp) -.L80BA069C: -/* 006FC 80BA069C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00700 80BA06A0 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00704 80BA06A4 03E00008 */ jr $ra -/* 00708 80BA06A8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA06AC.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA06AC.s deleted file mode 100644 index ca0ebce906..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA06AC.s +++ /dev/null @@ -1,50 +0,0 @@ -glabel func_80BA06AC -/* 0070C 80BA06AC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00710 80BA06B0 AFBF001C */ sw $ra, 0x001C($sp) -/* 00714 80BA06B4 AFB00018 */ sw $s0, 0x0018($sp) -/* 00718 80BA06B8 AFA5002C */ sw $a1, 0x002C($sp) -/* 0071C 80BA06BC 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 00720 80BA06C0 3C190001 */ lui $t9, 0x0001 ## $t9 = 00010000 -/* 00724 80BA06C4 0325C821 */ addu $t9, $t9, $a1 -/* 00728 80BA06C8 31CF003F */ andi $t7, $t6, 0x003F ## $t7 = 00000000 -/* 0072C 80BA06CC AFAF0024 */ sw $t7, 0x0024($sp) -/* 00730 80BA06D0 84820170 */ lh $v0, 0x0170($a0) ## 00000170 -/* 00734 80BA06D4 973904C4 */ lhu $t9, 0x04C4($t9) ## 000104C4 -/* 00738 80BA06D8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0073C 80BA06DC 1840000E */ blez $v0, .L80BA0718 -/* 00740 80BA06E0 A4990172 */ sh $t9, 0x0172($a0) ## 00000172 -/* 00744 80BA06E4 2448FFFF */ addiu $t0, $v0, 0xFFFF ## $t0 = FFFFFFFF -/* 00748 80BA06E8 A4880170 */ sh $t0, 0x0170($a0) ## 00000170 -/* 0074C 80BA06EC 84890170 */ lh $t1, 0x0170($a0) ## 00000170 -/* 00750 80BA06F0 8FA4002C */ lw $a0, 0x002C($sp) -/* 00754 80BA06F4 15200008 */ bne $t1, $zero, .L80BA0718 -/* 00758 80BA06F8 00000000 */ nop -/* 0075C 80BA06FC 0C00B2D0 */ jal Flags_GetSwitch - -/* 00760 80BA0700 8FA50024 */ lw $a1, 0x0024($sp) -/* 00764 80BA0704 10400003 */ beq $v0, $zero, .L80BA0714 -/* 00768 80BA0708 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 0076C 80BA070C 10000002 */ beq $zero, $zero, .L80BA0718 -/* 00770 80BA0710 A20A0174 */ sb $t2, 0x0174($s0) ## 00000174 -.L80BA0714: -/* 00774 80BA0714 A2000174 */ sb $zero, 0x0174($s0) ## 00000174 -.L80BA0718: -/* 00778 80BA0718 0C2E7FE8 */ jal func_80B9FFA0 -/* 0077C 80BA071C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00780 80BA0720 A2020178 */ sb $v0, 0x0178($s0) ## 00000178 -/* 00784 80BA0724 8FA50024 */ lw $a1, 0x0024($sp) -/* 00788 80BA0728 0C00B2D0 */ jal Flags_GetSwitch - -/* 0078C 80BA072C 8FA4002C */ lw $a0, 0x002C($sp) -/* 00790 80BA0730 10400003 */ beq $v0, $zero, .L80BA0740 -/* 00794 80BA0734 240B0001 */ addiu $t3, $zero, 0x0001 ## $t3 = 00000001 -/* 00798 80BA0738 10000002 */ beq $zero, $zero, .L80BA0744 -/* 0079C 80BA073C A20B0176 */ sb $t3, 0x0176($s0) ## 00000176 -.L80BA0740: -/* 007A0 80BA0740 A2000176 */ sb $zero, 0x0176($s0) ## 00000176 -.L80BA0744: -/* 007A4 80BA0744 8FBF001C */ lw $ra, 0x001C($sp) -/* 007A8 80BA0748 8FB00018 */ lw $s0, 0x0018($sp) -/* 007AC 80BA074C 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 007B0 80BA0750 03E00008 */ jr $ra -/* 007B4 80BA0754 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0758.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0758.s deleted file mode 100644 index 72155e6b4b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0758.s +++ /dev/null @@ -1,5 +0,0 @@ -glabel func_80BA0758 -/* 007B8 80BA0758 3C0E80BA */ lui $t6, %hi(func_80BA0768) ## $t6 = 80BA0000 -/* 007BC 80BA075C 25CE0768 */ addiu $t6, $t6, %lo(func_80BA0768) ## $t6 = 80BA0768 -/* 007C0 80BA0760 03E00008 */ jr $ra -/* 007C4 80BA0764 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0768.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0768.s deleted file mode 100644 index bccec4adef..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0768.s +++ /dev/null @@ -1,65 +0,0 @@ -.rdata -glabel D_80BA0BCC - .asciz "◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n" - .balign 4 - -.text -glabel func_80BA0768 -/* 007C8 80BA0768 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 007CC 80BA076C AFB00014 */ sw $s0, 0x0014($sp) -/* 007D0 80BA0770 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 007D4 80BA0774 AFBF001C */ sw $ra, 0x001C($sp) -/* 007D8 80BA0778 AFB10018 */ sw $s1, 0x0018($sp) -/* 007DC 80BA077C 8E190168 */ lw $t9, 0x0168($s0) ## 00000168 -/* 007E0 80BA0780 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 007E4 80BA0784 0320F809 */ jalr $ra, $t9 -/* 007E8 80BA0788 00000000 */ nop -/* 007EC 80BA078C 50400016 */ beql $v0, $zero, .L80BA07E8 -/* 007F0 80BA0790 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 007F4 80BA0794 860E016C */ lh $t6, 0x016C($s0) ## 0000016C -/* 007F8 80BA0798 240F000C */ addiu $t7, $zero, 0x000C ## $t7 = 0000000C -/* 007FC 80BA079C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00800 80BA07A0 1DC00010 */ bgtz $t6, .L80BA07E4 -/* 00804 80BA07A4 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00808 80BA07A8 0C2E8016 */ jal func_80BA0058 -/* 0080C 80BA07AC A60F0170 */ sh $t7, 0x0170($s0) ## 00000170 -/* 00810 80BA07B0 241800A0 */ addiu $t8, $zero, 0x00A0 ## $t8 = 000000A0 -/* 00814 80BA07B4 A618016C */ sh $t8, 0x016C($s0) ## 0000016C -/* 00818 80BA07B8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0081C 80BA07BC 0C020120 */ jal func_80080480 -/* 00820 80BA07C0 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 00824 80BA07C4 3C0480BA */ lui $a0, %hi(D_80BA0BCC) ## $a0 = 80BA0000 -/* 00828 80BA07C8 24840BCC */ addiu $a0, $a0, %lo(D_80BA0BCC) ## $a0 = 80BA0BCC -/* 0082C 80BA07CC 0C00084C */ jal osSyncPrintf - -/* 00830 80BA07D0 8E25009C */ lw $a1, 0x009C($s1) ## 0000009C -/* 00834 80BA07D4 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00838 80BA07D8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0083C 80BA07DC 0C2E8033 */ jal func_80BA00CC -/* 00840 80BA07E0 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -.L80BA07E4: -/* 00844 80BA07E4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80BA07E8: -/* 00848 80BA07E8 0C2E81AB */ jal func_80BA06AC -/* 0084C 80BA07EC 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00850 80BA07F0 8608016C */ lh $t0, 0x016C($s0) ## 0000016C -/* 00854 80BA07F4 24010032 */ addiu $at, $zero, 0x0032 ## $at = 00000032 -/* 00858 80BA07F8 55010004 */ bnel $t0, $at, .L80BA080C -/* 0085C 80BA07FC 92090178 */ lbu $t1, 0x0178($s0) ## 00000178 -/* 00860 80BA0800 0C01E221 */ jal func_80078884 -/* 00864 80BA0804 24044807 */ addiu $a0, $zero, 0x4807 ## $a0 = 00004807 -/* 00868 80BA0808 92090178 */ lbu $t1, 0x0178($s0) ## 00000178 -.L80BA080C: -/* 0086C 80BA080C 55200007 */ bnel $t1, $zero, .L80BA082C -/* 00870 80BA0810 8FBF001C */ lw $ra, 0x001C($sp) -/* 00874 80BA0814 860A016C */ lh $t2, 0x016C($s0) ## 0000016C -/* 00878 80BA0818 5D400004 */ bgtzl $t2, .L80BA082C -/* 0087C 80BA081C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00880 80BA0820 0C2E820F */ jal func_80BA083C -/* 00884 80BA0824 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00888 80BA0828 8FBF001C */ lw $ra, 0x001C($sp) -.L80BA082C: -/* 0088C 80BA082C 8FB00014 */ lw $s0, 0x0014($sp) -/* 00890 80BA0830 8FB10018 */ lw $s1, 0x0018($sp) -/* 00894 80BA0834 03E00008 */ jr $ra -/* 00898 80BA0838 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA083C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA083C.s deleted file mode 100644 index 2dfb02d2c0..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA083C.s +++ /dev/null @@ -1,5 +0,0 @@ -glabel func_80BA083C -/* 0089C 80BA083C 3C0E80BA */ lui $t6, %hi(func_80BA084C) ## $t6 = 80BA0000 -/* 008A0 80BA0840 25CE084C */ addiu $t6, $t6, %lo(func_80BA084C) ## $t6 = 80BA084C -/* 008A4 80BA0844 03E00008 */ jr $ra -/* 008A8 80BA0848 AC8E0164 */ sw $t6, 0x0164($a0) ## 00000164 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA084C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA084C.s deleted file mode 100644 index 607e233f10..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA084C.s +++ /dev/null @@ -1,59 +0,0 @@ -glabel func_80BA084C -/* 008AC 80BA084C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 008B0 80BA0850 AFBF001C */ sw $ra, 0x001C($sp) -/* 008B4 80BA0854 AFB00018 */ sw $s0, 0x0018($sp) -/* 008B8 80BA0858 AFA50024 */ sw $a1, 0x0024($sp) -/* 008BC 80BA085C 8485001C */ lh $a1, 0x001C($a0) ## 0000001C -/* 008C0 80BA0860 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 008C4 80BA0864 8FA40024 */ lw $a0, 0x0024($sp) -/* 008C8 80BA0868 0C00B2D0 */ jal Flags_GetSwitch - -/* 008CC 80BA086C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 008D0 80BA0870 10400003 */ beq $v0, $zero, .L80BA0880 -/* 008D4 80BA0874 00001825 */ or $v1, $zero, $zero ## $v1 = 00000000 -/* 008D8 80BA0878 10000001 */ beq $zero, $zero, .L80BA0880 -/* 008DC 80BA087C 24030001 */ addiu $v1, $zero, 0x0001 ## $v1 = 00000001 -.L80BA0880: -/* 008E0 80BA0880 920E0176 */ lbu $t6, 0x0176($s0) ## 00000176 -/* 008E4 80BA0884 51C30016 */ beql $t6, $v1, .L80BA08E0 -/* 008E8 80BA0888 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 008EC 80BA088C 8618001C */ lh $t8, 0x001C($s0) ## 0000001C -/* 008F0 80BA0890 00001025 */ or $v0, $zero, $zero ## $v0 = 00000000 -/* 008F4 80BA0894 0018CBC3 */ sra $t9, $t8, 15 -/* 008F8 80BA0898 33280001 */ andi $t0, $t9, 0x0001 ## $t0 = 00000000 -/* 008FC 80BA089C 11000003 */ beq $t0, $zero, .L80BA08AC -/* 00900 80BA08A0 00000000 */ nop -/* 00904 80BA08A4 10000001 */ beq $zero, $zero, .L80BA08AC -/* 00908 80BA08A8 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -.L80BA08AC: -/* 0090C 80BA08AC 5043000C */ beql $v0, $v1, .L80BA08E0 -/* 00910 80BA08B0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00914 80BA08B4 860A016C */ lh $t2, 0x016C($s0) ## 0000016C -/* 00918 80BA08B8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0091C 80BA08BC 5D400006 */ bgtzl $t2, .L80BA08D8 -/* 00920 80BA08C0 240C000C */ addiu $t4, $zero, 0x000C ## $t4 = 0000000C -/* 00924 80BA08C4 0C2E8016 */ jal func_80BA0058 -/* 00928 80BA08C8 8FA50024 */ lw $a1, 0x0024($sp) -/* 0092C 80BA08CC 240B00A0 */ addiu $t3, $zero, 0x00A0 ## $t3 = 000000A0 -/* 00930 80BA08D0 A60B016C */ sh $t3, 0x016C($s0) ## 0000016C -/* 00934 80BA08D4 240C000C */ addiu $t4, $zero, 0x000C ## $t4 = 0000000C -.L80BA08D8: -/* 00938 80BA08D8 A60C0170 */ sh $t4, 0x0170($s0) ## 00000170 -/* 0093C 80BA08DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80BA08E0: -/* 00940 80BA08E0 0C2E81AB */ jal func_80BA06AC -/* 00944 80BA08E4 8FA50024 */ lw $a1, 0x0024($sp) -/* 00948 80BA08E8 920D0178 */ lbu $t5, 0x0178($s0) ## 00000178 -/* 0094C 80BA08EC 51A00007 */ beql $t5, $zero, .L80BA090C -/* 00950 80BA08F0 8FBF001C */ lw $ra, 0x001C($sp) -/* 00954 80BA08F4 860E016C */ lh $t6, 0x016C($s0) ## 0000016C -/* 00958 80BA08F8 5DC00004 */ bgtzl $t6, .L80BA090C -/* 0095C 80BA08FC 8FBF001C */ lw $ra, 0x001C($sp) -/* 00960 80BA0900 0C2E81D6 */ jal func_80BA0758 -/* 00964 80BA0904 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00968 80BA0908 8FBF001C */ lw $ra, 0x001C($sp) -.L80BA090C: -/* 0096C 80BA090C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00970 80BA0910 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00974 80BA0914 03E00008 */ jr $ra -/* 00978 80BA0918 00000000 */ nop diff --git a/data/overlays/actors/z_obj_timeblock.data.s b/data/overlays/actors/z_obj_timeblock.data.s deleted file mode 100644 index 45611cd49e..0000000000 --- a/data/overlays/actors/z_obj_timeblock.data.s +++ /dev/null @@ -1,30 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel Obj_Timeblock_InitVars - .word 0x01D10700, 0x0A000011, 0x01900000, 0x0000017C -.word ObjTimeblock_Init -.word ObjTimeblock_Destroy -.word ObjTimeblock_Update -.word ObjTimeblock_Draw -glabel D_80BA0AF0 - .word 0x3F800000 -glabel D_80BA0AF4 - .word 0x42700000 -glabel D_80BA0AF8 - .word 0x00180000, 0x3F19999A, 0x42200000, 0x00190000 -glabel D_80BA0B08 - .word 0x42700000, 0x42C80000, 0x430C0000, 0x43340000, 0x435C0000, 0x43820000, 0x43960000, 0x43960000 -glabel D_80BA0B28 - .word 0x801F0002, 0xB0F40708, 0xB0F8012C, 0x30FC05DC -glabel D_80BA0B38 - .word 0x64788C50, 0x8CC86496, 0xC864C8F0, 0x506E8C46, 0xA0E15064, 0x82646EBE - diff --git a/data/overlays/actors/z_obj_timeblock.reloc.s b/data/overlays/actors/z_obj_timeblock.reloc.s deleted file mode 100644 index 435a0c339a..0000000000 --- a/data/overlays/actors/z_obj_timeblock.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_80BA0C50 - .incbin "baserom/ovl_Obj_Timeblock", 0xCB0, 0x00000110 diff --git a/spec b/spec index 6fcdad76dd..8079dc756f 100644 --- a/spec +++ b/spec @@ -3534,8 +3534,7 @@ endseg beginseg name "ovl_Obj_Timeblock" include "build/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.o" - include "build/data/overlays/actors/z_obj_timeblock.data.o" - include "build/data/overlays/actors/z_obj_timeblock.reloc.o" + include "build/src/overlays/actors/ovl_Obj_Timeblock/ovl_Obj_Timeblock_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 4ec04ba3f9..2bd32ea639 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -5,13 +5,13 @@ #define THIS ((EnDh*)thisx) typedef enum { - DH_WAIT, - DH_RETREAT, - DH_BURROW, - DH_WALK, - DH_ATTACK, - DH_DEATH, - DH_DAMAGE + /* 0 */ DH_WAIT, + /* 1 */ DH_RETREAT, + /* 2 */ DH_BURROW, + /* 3 */ DH_WALK, + /* 4 */ DH_ATTACK, + /* 5 */ DH_DEATH, + /* 6 */ DH_DAMAGE } EnDhAction; void EnDh_Init(Actor* this, GlobalContext* globalCtx); @@ -96,7 +96,7 @@ void EnDh_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &D_809EC620; SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06007E88, &D_06005880, this->limbDrawTable, this->limbRotTable, - 16); + 16); ActorShape_Init(&this->actor.shape, 0.0f, &ActorShadow_DrawFunc_Circle, 64.0f); this->actor.params = ENDH_WAIT_UNDERGROUND; this->actor.colChkInfo.mass = 0xFE; @@ -502,13 +502,13 @@ void EnDh_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPSegment(POLY_OPA_DISP++, 0x08, &D_80116280[2]); POLY_OPA_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, - this->skelAnime.dListCount, NULL, EnDh_PostLimbDraw, &this->actor, POLY_OPA_DISP); + this->skelAnime.dListCount, NULL, EnDh_PostLimbDraw, &this->actor, POLY_OPA_DISP); } else { func_80093D84(globalCtx->state.gfxCtx); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); gSPSegment(POLY_XLU_DISP++, 0x08, &D_80116280[0]); POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, - this->skelAnime.dListCount, NULL, NULL, &this->actor, POLY_XLU_DISP); + this->skelAnime.dListCount, NULL, NULL, &this->actor, POLY_XLU_DISP); } if (this->drawDirtWave) { func_80093D84(globalCtx->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 13b6033d4a..09d8dd8456 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -255,7 +255,7 @@ void EnDha_Die(EnDha* this, GlobalContext* globalCtx) { Vec3f vector; Player* player = PLAYER; - if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) { + if ((player->stateFlags2 & 0x80) && (&this->actor == player->actor.parent)) { player->stateFlags2 &= ~0x80; player->actor.parent = NULL; player->unk_850 = 200; @@ -305,7 +305,7 @@ void EnDha_UpdateHealth(EnDha* this, GlobalContext* globalCtx) { } } } - if ((this->actor.parent != NULL) && (this->actor.parent->params == ENDH_DEATH)) { + if ((this->actor.parent != NULL) && (this->actor.parent->params == ENDH_DEATH)) { EnDha_SetupDeath(this); } } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 87a5a542fa..fb6f17c215 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -860,5 +860,5 @@ void EnSsh_Draw(Actor* thisx, GlobalContext* globalCtx) { gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->blinkState])); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ssh.c", 2336); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnSsh_OverrideLimbDraw, - EnSsh_PostLimbDraw, &this->actor); + EnSsh_PostLimbDraw, &this->actor); } diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index cb0c3b08a0..4ff7dc55c8 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -15,7 +15,20 @@ void ObjTimeblock_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjTimeblock_Update(Actor* thisx, GlobalContext* globalCtx); void ObjTimeblock_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void ObjTimeblock_SetupNormal(ObjTimeblock* this); +void ObjTimeblock_SetupAltBehaviorVisible(ObjTimeblock* this); +void ObjTimeblock_SetupAltBehaviourNotVisible(ObjTimeblock* this); + +s32 ObjTimeblock_WaitForOcarina(ObjTimeblock* this, GlobalContext* globalCtx); +s32 ObjTimeblock_WaitForSong(ObjTimeblock* this, GlobalContext* globalCtx); +void ObjTimeblock_DoNothing(ObjTimeblock* this, GlobalContext* globalCtx); +void ObjTimeblock_Normal(ObjTimeblock* this, GlobalContext* globalCtx); +void ObjTimeblock_AltBehaviorVisible(ObjTimeblock* this, GlobalContext* globalCtx); +void ObjTimeblock_AltBehaviourNotVisible(ObjTimeblock* this, GlobalContext* globalCtx); + +extern Gfx D_06000980[]; +extern CollisionHeader D_06000B30; + const ActorInit Obj_Timeblock_InitVars = { ACTOR_OBJ_TIMEBLOCK, ACTORTYPE_ITEMACTION, @@ -27,41 +40,307 @@ const ActorInit Obj_Timeblock_InitVars = { (ActorFunc)ObjTimeblock_Update, (ActorFunc)ObjTimeblock_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80B9FFA0.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0058.s") +typedef struct { + /* 0x00 */ f32 scale; + /* 0x04 */ f32 height; + /* 0x08 */ s16 demoEffectParams; +} ObjTimeblockSizeOptions; // size = 0x0C -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA00CC.s") +static ObjTimeblockSizeOptions sSizeOptions[] = { + { 1.0, 60.0, 0x0018 }, + { 0.60, 40.0, 0x0019 }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Init.s") +static f32 sRanges[] = { 60.0, 100.0, 140.0, 180.0, 220.0, 260.0, 300.0, 300.0 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Destroy.s") +static InitChainEntry sInitChain[] = { + ICHAIN_U8(unk_1F, 2, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 1800, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1500, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA032C.s") +static Color_RGB8 sPrimColors[] = { + { 100, 120, 140 }, { 80, 140, 200 }, { 100, 150, 200 }, { 100, 200, 240 }, + { 80, 110, 140 }, { 70, 160, 225 }, { 80, 100, 130 }, { 100, 110, 190 }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA040C.s") +u32 ObjTimeblock_CalculateIsVisible(ObjTimeblock* this) { + if (!((this->dyna.actor.params >> 10) & 1)) { + if (this->unk_177 == 0) { + return this->unk_175; + } else { + u8 temp = ((this->dyna.actor.params >> 15) & 1) ? true : false; + if (this->unk_177 == 1) { + return this->unk_174 ^ temp; + } else { + u8 linkIsYoung = (LINK_AGE_IN_YEARS == YEARS_CHILD) ? true : false; + return this->unk_174 ^ temp ^ linkIsYoung; + } + } + } else { + return (((this->dyna.actor.params >> 15) & 1) ? true : false) ^ this->unk_174; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0480.s") +void ObjTimeblock_SpawnDemoEffect(ObjTimeblock* this, GlobalContext* globalCtx) { + Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DEMO_EFFECT, this->dyna.actor.posRot.pos.x, + this->dyna.actor.posRot.pos.y, this->dyna.actor.posRot.pos.z, 0, 0, 0, + sSizeOptions[(this->dyna.actor.params >> 8) & 1].demoEffectParams); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA04F8.s") +void ObjTimeblock_ToggleSwitchFlag(GlobalContext* globalCtx, s32 flag) { + if (Flags_GetSwitch(globalCtx, flag)) { + Flags_UnsetSwitch(globalCtx, flag); + } else { + Flags_SetSwitch(globalCtx, flag); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0508.s") +void ObjTimeblock_Init(Actor* thisx, GlobalContext* globalCtx) { + ObjTimeblock* this = THIS; + s32 pad; + UNK_PTR colHeader = NULL; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0514.s") + DynaPolyInfo_SetActorMove(&this->dyna, DPM_UNK); + this->dyna.actor.posRot.rot.z = this->dyna.actor.shape.rot.z = 0; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0524.s") + DynaPolyInfo_Alloc(&D_06000B30, &colHeader); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA06AC.s") + this->dyna.dynaPolyId = + DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0758.s") + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); + Actor_SetScale(&this->dyna.actor, sSizeOptions[(this->dyna.actor.params >> 8) & 1].scale); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA0768.s") + if ((this->dyna.actor.params >> 6) & 1) { + this->unk_177 = 0; + } else { + this->unk_177 = ((this->dyna.actor.params & 0x3F) < 0x38) ? 2 : 1; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA083C.s") + this->songObserverFunc = ObjTimeblock_WaitForOcarina; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/func_80BA084C.s") + Actor_SetHeight(&this->dyna.actor, sSizeOptions[(this->dyna.actor.params >> 8) & 1].height); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Update.s") + this->unk_174 = (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) ? true : false; + this->unk_175 = ((this->dyna.actor.params >> 15) & 1) ? true : false; + this->isVisible = ObjTimeblock_CalculateIsVisible(this); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Timeblock/ObjTimeblock_Draw.s") + if (!((this->dyna.actor.params >> 10) & 1)) { + ObjTimeblock_SetupNormal(this); + } else if (this->isVisible) { + ObjTimeblock_SetupAltBehaviorVisible(this); + } else { + ObjTimeblock_SetupAltBehaviourNotVisible(this); + } + + // "Block of time" + osSyncPrintf("時のブロック ( %04xH save:%d color:%d range:%d move:%d)\n", (u16)this->dyna.actor.params, + this->unk_177, this->dyna.actor.initPosRot.rot.z & 7, (this->dyna.actor.params >> 11) & 7, + (this->dyna.actor.params >> 10) & 1); +} + +void ObjTimeblock_Destroy(Actor* thisx, GlobalContext* globalCtx) { + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, THIS->dyna.dynaPolyId); +} + +u8 ObjTimeblock_PlayerIsInRange(ObjTimeblock* this, GlobalContext* globalCtx) { + if (this->isVisible && func_80043590(&this->dyna)) { + return false; + } + + if (this->dyna.actor.xzDistFromLink <= sRanges[(this->dyna.actor.params >> 11) & 7]) { + Vec3f distance; + f32 blockSize; + + func_8002DBD0(&this->dyna.actor, &distance, &PLAYER->actor.posRot.pos); + blockSize = this->dyna.actor.scale.x * 50.0f + 6.0f; + // Return true if player's xz position is not inside the block + if (blockSize < fabsf(distance.x) || blockSize < fabsf(distance.z)) { + return true; + } + } + + return false; +} + +s32 ObjTimeblock_WaitForOcarina(ObjTimeblock* this, GlobalContext* globalCtx) { + Player* player = PLAYER; + + if (ObjTimeblock_PlayerIsInRange(this, globalCtx)) { + if (player->stateFlags2 & 0x1000000) { + func_8010BD58(globalCtx, 1); + this->songObserverFunc = ObjTimeblock_WaitForSong; + } else { + player->stateFlags2 |= 0x800000; + } + } + return false; +} + +s32 ObjTimeblock_WaitForSong(ObjTimeblock* this, GlobalContext* globalCtx) { + if (globalCtx->msgCtx.unk_E3EE == 4) { + this->songObserverFunc = ObjTimeblock_WaitForOcarina; + } + if (globalCtx->msgCtx.unk_E3EC == 10) { + if (this->unk_172 == 254) { + this->songEndTimer = 110; + } else { + this->songEndTimer--; + if (this->songEndTimer == 0) { + return true; + } + } + } + return false; +} + +void ObjTimeblock_SetupDoNothing(ObjTimeblock* this) { + this->actionFunc = ObjTimeblock_DoNothing; +} + +void ObjTimeblock_DoNothing(ObjTimeblock* this, GlobalContext* globalCtx) { +} + +void ObjTimeblock_SetupNormal(ObjTimeblock* this) { + this->actionFunc = ObjTimeblock_Normal; +} + +void ObjTimeblock_Normal(ObjTimeblock* this, GlobalContext* globalCtx) { + u32 newIsVisible; + + if (this->songObserverFunc(this, globalCtx) && this->demoEffectTimer <= 0) { + ObjTimeblock_SpawnDemoEffect(this, globalCtx); + this->demoEffectTimer = 160; + + // Possibly points the camera to this actor + func_80080480(globalCtx, &this->dyna.actor); + // "◯◯◯◯ Time Block Attention Camera (frame counter %d)\n" + osSyncPrintf("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n", globalCtx->state.frames); + + this->demoEffectFirstPartTimer = 12; + + if (this->unk_177 == 0) { + this->dyna.actor.params ^= 0x8000; + } else { + ObjTimeblock_ToggleSwitchFlag(globalCtx, this->dyna.actor.params & 0x3F); + } + } + + this->unk_172 = globalCtx->msgCtx.unk_E3EC; + if (this->demoEffectFirstPartTimer > 0) { + this->demoEffectFirstPartTimer--; + if (this->demoEffectFirstPartTimer == 0) { + if (this->unk_177 == 0) { + this->unk_175 = ((this->dyna.actor.params >> 15) & 1) ? true : false; + } else { + this->unk_174 = (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) ? true : false; + } + } + } + + newIsVisible = ObjTimeblock_CalculateIsVisible(this); + if (this->unk_177 == 1 && newIsVisible != this->isVisible) { + ObjTimeblock_SetupDoNothing(this); + } + this->isVisible = newIsVisible; + + if (this->demoEffectTimer == 50) { + func_80078884(NA_SE_SY_TRE_BOX_APPEAR); + } +} + +void func_80BA06AC(ObjTimeblock* this, GlobalContext* globalCtx) { + s32 switchFlag = this->dyna.actor.params & 0x3F; + this->unk_172 = globalCtx->msgCtx.unk_E3EC; + + if (this->demoEffectFirstPartTimer > 0 && --this->demoEffectFirstPartTimer == 0) { + this->unk_174 = (Flags_GetSwitch(globalCtx, switchFlag)) ? true : false; + } + + this->isVisible = ObjTimeblock_CalculateIsVisible(this); + this->unk_176 = (Flags_GetSwitch(globalCtx, switchFlag)) ? true : false; +} + +void ObjTimeblock_SetupAltBehaviorVisible(ObjTimeblock* this) { + this->actionFunc = ObjTimeblock_AltBehaviorVisible; +} + +void ObjTimeblock_AltBehaviorVisible(ObjTimeblock* this, GlobalContext* globalCtx) { + if (this->songObserverFunc(this, globalCtx) && this->demoEffectTimer <= 0) { + this->demoEffectFirstPartTimer = 12; + ObjTimeblock_SpawnDemoEffect(this, globalCtx); + this->demoEffectTimer = 160; + func_80080480(globalCtx, &this->dyna.actor); + // "Time Block Attention Camera (frame counter)" + osSyncPrintf("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n", globalCtx->state.frames); + ObjTimeblock_ToggleSwitchFlag(globalCtx, this->dyna.actor.params & 0x3F); + } + + func_80BA06AC(this, globalCtx); + + if (this->demoEffectTimer == 50) { + func_80078884(NA_SE_SY_TRE_BOX_APPEAR); + } + + if (!this->isVisible && this->demoEffectTimer <= 0) { + ObjTimeblock_SetupAltBehaviourNotVisible(this); + } +} + +void ObjTimeblock_SetupAltBehaviourNotVisible(ObjTimeblock* this) { + this->actionFunc = ObjTimeblock_AltBehaviourNotVisible; +} + +void ObjTimeblock_AltBehaviourNotVisible(ObjTimeblock* this, GlobalContext* globalCtx) { + s32 switchFlag = this->dyna.actor.params & 0x3F; + s8 switchFlagIsSet = (Flags_GetSwitch(globalCtx, switchFlag)) ? true : false; + + if (this->unk_176 ^ switchFlagIsSet && switchFlagIsSet ^ (((this->dyna.actor.params >> 15) & 1) ? true : false)) { + if (this->demoEffectTimer <= 0) { + ObjTimeblock_SpawnDemoEffect(this, globalCtx); + this->demoEffectTimer = 160; + } + this->demoEffectFirstPartTimer = 12; + } + + func_80BA06AC(this, globalCtx); + + if (this->isVisible && this->demoEffectTimer <= 0) { + ObjTimeblock_SetupAltBehaviorVisible(this); + } +} + +void ObjTimeblock_Update(Actor* thisx, GlobalContext* globalCtx) { + ObjTimeblock* this = THIS; + + this->actionFunc(this, globalCtx); + + if (this->demoEffectTimer > 0) { + this->demoEffectTimer--; + } + + if (this->isVisible) { + func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + } else { + func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + } +} + +void ObjTimeblock_Draw(Actor* thisx, GlobalContext* globalCtx) { + if (THIS->isVisible) { + Color_RGB8* primColor = &sPrimColors[THIS->dyna.actor.initPosRot.rot.z & 7]; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_timeblock.c", 762); + + func_80093D18(globalCtx->state.gfxCtx); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_timeblock.c", 766), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, primColor->r, primColor->g, primColor->b, 255); + gSPDisplayList(POLY_OPA_DISP++, D_06000980); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_timeblock.c", 772); + } +} diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h index 0a2cf9e406..c642608ffd 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.h @@ -6,13 +6,22 @@ struct ObjTimeblock; +typedef s32 (*ObjTimeblockSongObserverFunc)(struct ObjTimeblock*, GlobalContext*); typedef void (*ObjTimeblockActionFunc)(struct ObjTimeblock*, GlobalContext*); typedef struct ObjTimeblock { /* 0x0000 */ DynaPolyActor dyna; - /* 0x0164 */ char unk_164[0x4]; - /* 0x0168 */ ObjTimeblockActionFunc actionFunc; - /* 0x016C */ char unk_16C[0x10]; + /* 0x0164 */ ObjTimeblockActionFunc actionFunc; + /* 0x0168 */ ObjTimeblockSongObserverFunc songObserverFunc; + /* 0x016C */ s16 demoEffectTimer; + /* 0x016E */ s16 songEndTimer; + /* 0x0170 */ s16 demoEffectFirstPartTimer; + /* 0x0172 */ u16 unk_172; + /* 0x0174 */ u8 unk_174; + /* 0x0175 */ u8 unk_175; + /* 0x0176 */ u8 unk_176; + /* 0x0177 */ u8 unk_177; + /* 0x0178 */ u8 isVisible; } ObjTimeblock; // size = 0x017C extern const ActorInit Obj_Timeblock_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index 7654260a89..f8e3d05d41 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -1541,6 +1541,10 @@ D_06001E50 = 0x06001E50; D_06001AF8 = 0x06001AF8; D_060089E0 = 0x060089E0; +// z_obj_timeblock +D_06000980 = 0x06000980; +D_06000B30 = 0x06000B30; + // z_bg_ddan_jd D_06003CE0 = 0x06003CE0; D_060037B8 = 0x060037B8;