From a7beb8814bae0281efbc1ed113888d32c18d9ac3 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 27 Sep 2020 16:35:52 +0200 Subject: [PATCH] ovl_Obj_Lightswitch OK and documented (#373) * ovl_Obj_Lightswitch OK * ovl_Obj_Lightswitch documented * Removed unneeded prototypes * Minor cleanup * Cleanup, names * Use color array for more sane SetEnvColor * enum styling Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * more enum styling * globalCtx2 meme * XxxInit -> SetupXxx Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> --- .../ObjLightswitch_Destroy.s | 11 - .../ovl_Obj_Lightswitch/ObjLightswitch_Draw.s | 47 -- .../ovl_Obj_Lightswitch/ObjLightswitch_Init.s | 158 ------ .../ObjLightswitch_Update.s | 64 --- .../ovl_Obj_Lightswitch/func_80B96BA0.s | 40 -- .../ovl_Obj_Lightswitch/func_80B96C3C.s | 56 --- .../ovl_Obj_Lightswitch/func_80B96D00.s | 37 -- .../ovl_Obj_Lightswitch/func_80B96D80.s | 154 ------ .../ovl_Obj_Lightswitch/func_80B971A8.s | 13 - .../ovl_Obj_Lightswitch/func_80B971D8.s | 62 --- .../ovl_Obj_Lightswitch/func_80B972B8.s | 9 - .../ovl_Obj_Lightswitch/func_80B972D8.s | 69 --- .../ovl_Obj_Lightswitch/func_80B973C8.s | 15 - .../ovl_Obj_Lightswitch/func_80B97400.s | 78 --- .../ovl_Obj_Lightswitch/func_80B97518.s | 11 - .../ovl_Obj_Lightswitch/func_80B97540.s | 67 --- .../ovl_Obj_Lightswitch/func_80B97630.s | 7 - .../ovl_Obj_Lightswitch/func_80B97648.s | 21 - .../ovl_Obj_Lightswitch/func_80B97690.s | 7 - .../ovl_Obj_Lightswitch/func_80B976A8.s | 20 - .../ovl_Obj_Lightswitch/func_80B977D0.s | 250 ---------- .../ovl_Obj_Lightswitch/func_80B97B50.s | 217 --------- data/overlays/actors/z_obj_lightswitch.data.s | 33 -- .../overlays/actors/z_obj_lightswitch.reloc.s | 13 - include/functions.h | 1 + spec | 3 +- .../ovl_Obj_Lightswitch/z_obj_lightswitch.c | 460 +++++++++++++++++- .../ovl_Obj_Lightswitch/z_obj_lightswitch.h | 21 +- undefined_syms.txt | 8 + 29 files changed, 466 insertions(+), 1486 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96BA0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96C3C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D00.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D80.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971A8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971D8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972B8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972D8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B973C8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97400.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97518.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97540.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97630.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97648.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97690.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B976A8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B977D0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97B50.s delete mode 100644 data/overlays/actors/z_obj_lightswitch.data.s delete mode 100644 data/overlays/actors/z_obj_lightswitch.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Destroy.s deleted file mode 100644 index aa9eb5b6ad..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Destroy.s +++ /dev/null @@ -1,11 +0,0 @@ -glabel ObjLightswitch_Destroy -/* 005E0 80B97180 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 005E4 80B97184 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 005E8 80B97188 AFBF0014 */ sw $ra, 0x0014($sp) -/* 005EC 80B9718C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 005F0 80B97190 0C016F32 */ jal Collider_DestroyJntSph -/* 005F4 80B97194 24E50150 */ addiu $a1, $a3, 0x0150 ## $a1 = 00000150 -/* 005F8 80B97198 8FBF0014 */ lw $ra, 0x0014($sp) -/* 005FC 80B9719C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00600 80B971A0 03E00008 */ jr $ra -/* 00604 80B971A4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Draw.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Draw.s deleted file mode 100644 index 5960e71294..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Draw.s +++ /dev/null @@ -1,47 +0,0 @@ -glabel ObjLightswitch_Draw -/* 012B8 80B97E58 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 012BC 80B97E5C AFBF0014 */ sw $ra, 0x0014($sp) -/* 012C0 80B97E60 848301BC */ lh $v1, 0x01BC($a0) ## 000001BC -/* 012C4 80B97E64 8482001C */ lh $v0, 0x001C($a0) ## 0000001C -/* 012C8 80B97E68 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 012CC 80B97E6C 00031983 */ sra $v1, $v1, 6 -/* 012D0 80B97E70 304E0001 */ andi $t6, $v0, 0x0001 ## $t6 = 00000000 -/* 012D4 80B97E74 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 012D8 80B97E78 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 012DC 80B97E7C 15C1000B */ bne $t6, $at, .L80B97EAC -/* 012E0 80B97E80 306300FF */ andi $v1, $v1, 0x00FF ## $v1 = 00000000 -/* 012E4 80B97E84 00002025 */ or $a0, $zero, $zero ## $a0 = 00000000 -/* 012E8 80B97E88 24C50150 */ addiu $a1, $a2, 0x0150 ## $a1 = 00000150 -/* 012EC 80B97E8C AFA30018 */ sw $v1, 0x0018($sp) -/* 012F0 80B97E90 AFA60020 */ sw $a2, 0x0020($sp) -/* 012F4 80B97E94 0C018A29 */ jal func_800628A4 -/* 012F8 80B97E98 AFA70024 */ sw $a3, 0x0024($sp) -/* 012FC 80B97E9C 8FA60020 */ lw $a2, 0x0020($sp) -/* 01300 80B97EA0 8FA30018 */ lw $v1, 0x0018($sp) -/* 01304 80B97EA4 8FA70024 */ lw $a3, 0x0024($sp) -/* 01308 80B97EA8 84C2001C */ lh $v0, 0x001C($a2) ## 0000001C -.L80B97EAC: -/* 0130C 80B97EAC 00027903 */ sra $t7, $v0, 4 -/* 01310 80B97EB0 31F80003 */ andi $t8, $t7, 0x0003 ## $t8 = 00000000 -/* 01314 80B97EB4 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 01318 80B97EB8 1701000A */ bne $t8, $at, .L80B97EE4 -/* 0131C 80B97EBC 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 01320 80B97EC0 1C600003 */ bgtz $v1, .L80B97ED0 -/* 01324 80B97EC4 286100FF */ slti $at, $v1, 0x00FF -/* 01328 80B97EC8 10200006 */ beq $at, $zero, .L80B97EE4 -/* 0132C 80B97ECC 00000000 */ nop -.L80B97ED0: -/* 01330 80B97ED0 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 01334 80B97ED4 0C2E5ED4 */ jal func_80B97B50 -/* 01338 80B97ED8 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 0133C 80B97EDC 10000004 */ beq $zero, $zero, .L80B97EF0 -/* 01340 80B97EE0 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B97EE4: -/* 01344 80B97EE4 0C2E5DF4 */ jal func_80B977D0 -/* 01348 80B97EE8 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 0134C 80B97EEC 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B97EF0: -/* 01350 80B97EF0 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 01354 80B97EF4 03E00008 */ jr $ra -/* 01358 80B97EF8 00000000 */ nop -/* 0135C 80B97EFC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s deleted file mode 100644 index c6ea64474e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s +++ /dev/null @@ -1,158 +0,0 @@ -.rdata -glabel D_80B97F90 - .asciz "\x1b[41;37m" - .balign 4 - -glabel D_80B97F9C - .asciz "押引ブロック発生失敗(%s %d)(arg_data 0x%04x)\n" - .balign 4 - -glabel D_80B97FCC - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B97FE4 - .asciz "\x1b[m" - .balign 4 - -glabel D_80B97FE8 - .asciz "(光スイッチ)(arg_data 0x%04x)\n" - .balign 4 - -.text -glabel ObjLightswitch_Init -/* 00408 80B96FA8 27BDFFB0 */ addiu $sp, $sp, 0xFFB0 ## $sp = FFFFFFB0 -/* 0040C 80B96FAC AFB00038 */ sw $s0, 0x0038($sp) -/* 00410 80B96FB0 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00414 80B96FB4 AFBF003C */ sw $ra, 0x003C($sp) -/* 00418 80B96FB8 AFA50054 */ sw $a1, 0x0054($sp) -/* 0041C 80B96FBC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00420 80B96FC0 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00424 80B96FC4 00052A03 */ sra $a1, $a1, 8 -/* 00428 80B96FC8 0C00B2D0 */ jal Flags_GetSwitch - -/* 0042C 80B96FCC 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00430 80B96FD0 3C0580B9 */ lui $a1, %hi(D_80B97F80) ## $a1 = 80B90000 -/* 00434 80B96FD4 AFA20048 */ sw $v0, 0x0048($sp) -/* 00438 80B96FD8 AFA00044 */ sw $zero, 0x0044($sp) -/* 0043C 80B96FDC 24A57F80 */ addiu $a1, $a1, %lo(D_80B97F80) ## $a1 = 80B97F80 -/* 00440 80B96FE0 0C01E037 */ jal Actor_ProcessInitChain - -/* 00444 80B96FE4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00448 80B96FE8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0044C 80B96FEC 0C00B56E */ jal Actor_SetHeight - -/* 00450 80B96FF0 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 00454 80B96FF4 8FAE0048 */ lw $t6, 0x0048($sp) -/* 00458 80B96FF8 11C0000E */ beq $t6, $zero, .L80B97034 -/* 0045C 80B96FFC 00000000 */ nop -/* 00460 80B97000 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -/* 00464 80B97004 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 00468 80B97008 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 0046C 80B9700C 00027903 */ sra $t7, $v0, 4 -/* 00470 80B97010 31F80003 */ andi $t8, $t7, 0x0003 ## $t8 = 00000000 -/* 00474 80B97014 17010003 */ bne $t8, $at, .L80B97024 -/* 00478 80B97018 00000000 */ nop -/* 0047C 80B9701C 10000008 */ beq $zero, $zero, .L80B97040 -/* 00480 80B97020 AFB90044 */ sw $t9, 0x0044($sp) -.L80B97024: -/* 00484 80B97024 0C2E5CF2 */ jal func_80B973C8 -/* 00488 80B97028 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0048C 80B9702C 10000004 */ beq $zero, $zero, .L80B97040 -/* 00490 80B97030 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L80B97034: -/* 00494 80B97034 0C2E5C6A */ jal func_80B971A8 -/* 00498 80B97038 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0049C 80B9703C 8602001C */ lh $v0, 0x001C($s0) ## 0000001C -.L80B97040: -/* 004A0 80B97040 30480001 */ andi $t0, $v0, 0x0001 ## $t0 = 00000000 -/* 004A4 80B97044 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 004A8 80B97048 15010037 */ bne $t0, $at, .L80B97128 -/* 004AC 80B9704C 8FA90048 */ lw $t1, 0x0048($sp) -/* 004B0 80B97050 11200008 */ beq $t1, $zero, .L80B97074 -/* 004B4 80B97054 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024 -/* 004B8 80B97058 3C0580B9 */ lui $a1, %hi(D_80B97F68) ## $a1 = 80B90000 -/* 004BC 80B9705C 0C01DF90 */ jal Math_Vec3f_Copy - ## Vec3f_Copy -/* 004C0 80B97060 24A57F68 */ addiu $a1, $a1, %lo(D_80B97F68) ## $a1 = 80B97F68 -/* 004C4 80B97064 3C0580B9 */ lui $a1, %hi(D_80B97F68) ## $a1 = 80B90000 -/* 004C8 80B97068 24A57F68 */ addiu $a1, $a1, %lo(D_80B97F68) ## $a1 = 80B97F68 -/* 004CC 80B9706C 0C01DF90 */ jal Math_Vec3f_Copy - ## Vec3f_Copy -/* 004D0 80B97070 26040008 */ addiu $a0, $s0, 0x0008 ## $a0 = 00000008 -.L80B97074: -/* 004D4 80B97074 8FA60054 */ lw $a2, 0x0054($sp) -/* 004D8 80B97078 240AC000 */ addiu $t2, $zero, 0xC000 ## $t2 = FFFFC000 -/* 004DC 80B9707C A60A00B4 */ sh $t2, 0x00B4($s0) ## 000000B4 -/* 004E0 80B97080 860200B4 */ lh $v0, 0x00B4($s0) ## 000000B4 -/* 004E4 80B97084 A60000B8 */ sh $zero, 0x00B8($s0) ## 000000B8 -/* 004E8 80B97088 8E0B0004 */ lw $t3, 0x0004($s0) ## 00000004 -/* 004EC 80B9708C A6020014 */ sh $v0, 0x0014($s0) ## 00000014 -/* 004F0 80B97090 A6020030 */ sh $v0, 0x0030($s0) ## 00000030 -/* 004F4 80B97094 860200B8 */ lh $v0, 0x00B8($s0) ## 000000B8 -/* 004F8 80B97098 C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 -/* 004FC 80B9709C 356C0020 */ ori $t4, $t3, 0x0020 ## $t4 = 00000020 -/* 00500 80B970A0 AE0C0004 */ sw $t4, 0x0004($s0) ## 00000004 -/* 00504 80B970A4 A6020018 */ sh $v0, 0x0018($s0) ## 00000018 -/* 00508 80B970A8 A6020034 */ sh $v0, 0x0034($s0) ## 00000034 -/* 0050C 80B970AC E7A40010 */ swc1 $f4, 0x0010($sp) -/* 00510 80B970B0 C606000C */ lwc1 $f6, 0x000C($s0) ## 0000000C -/* 00514 80B970B4 240EFF00 */ addiu $t6, $zero, 0xFF00 ## $t6 = FFFFFF00 -/* 00518 80B970B8 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 0051C 80B970BC E7A60014 */ swc1 $f6, 0x0014($sp) -/* 00520 80B970C0 C6080010 */ lwc1 $f8, 0x0010($s0) ## 00000010 -/* 00524 80B970C4 AFA0001C */ sw $zero, 0x001C($sp) -/* 00528 80B970C8 240700FF */ addiu $a3, $zero, 0x00FF ## $a3 = 000000FF -/* 0052C 80B970CC E7A80018 */ swc1 $f8, 0x0018($sp) -/* 00530 80B970D0 860D0016 */ lh $t5, 0x0016($s0) ## 00000016 -/* 00534 80B970D4 AFAE0028 */ sw $t6, 0x0028($sp) -/* 00538 80B970D8 AFA00024 */ sw $zero, 0x0024($sp) -/* 0053C 80B970DC 24C41C24 */ addiu $a0, $a2, 0x1C24 ## $a0 = 00001C24 -/* 00540 80B970E0 0C00C916 */ jal Actor_SpawnAsChild - -/* 00544 80B970E4 AFAD0020 */ sw $t5, 0x0020($sp) -/* 00548 80B970E8 1440000F */ bne $v0, $zero, .L80B97128 -/* 0054C 80B970EC 3C0480B9 */ lui $a0, %hi(D_80B97F90) ## $a0 = 80B90000 -/* 00550 80B970F0 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001 -/* 00554 80B970F4 AFAF0044 */ sw $t7, 0x0044($sp) -/* 00558 80B970F8 0C00084C */ jal osSyncPrintf - -/* 0055C 80B970FC 24847F90 */ addiu $a0, $a0, %lo(D_80B97F90) ## $a0 = 80B97F90 -/* 00560 80B97100 3C0480B9 */ lui $a0, %hi(D_80B97F9C) ## $a0 = 80B90000 -/* 00564 80B97104 3C0580B9 */ lui $a1, %hi(D_80B97FCC) ## $a1 = 80B90000 -/* 00568 80B97108 24A57FCC */ addiu $a1, $a1, %lo(D_80B97FCC) ## $a1 = 80B97FCC -/* 0056C 80B9710C 24847F9C */ addiu $a0, $a0, %lo(D_80B97F9C) ## $a0 = 80B97F9C -/* 00570 80B97110 240601C4 */ addiu $a2, $zero, 0x01C4 ## $a2 = 000001C4 -/* 00574 80B97114 0C00084C */ jal osSyncPrintf - -/* 00578 80B97118 8607001C */ lh $a3, 0x001C($s0) ## 0000001C -/* 0057C 80B9711C 3C0480B9 */ lui $a0, %hi(D_80B97FE4) ## $a0 = 80B90000 -/* 00580 80B97120 0C00084C */ jal osSyncPrintf - -/* 00584 80B97124 24847FE4 */ addiu $a0, $a0, %lo(D_80B97FE4) ## $a0 = 80B97FE4 -.L80B97128: -/* 00588 80B97128 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0058C 80B9712C 0C2E5AE8 */ jal func_80B96BA0 -/* 00590 80B97130 8FA50054 */ lw $a1, 0x0054($sp) -/* 00594 80B97134 3C0680B9 */ lui $a2, %hi(D_80B97F54) ## $a2 = 80B90000 -/* 00598 80B97138 24C67F54 */ addiu $a2, $a2, %lo(D_80B97F54) ## $a2 = 80B97F54 -/* 0059C 80B9713C 26040098 */ addiu $a0, $s0, 0x0098 ## $a0 = 00000098 -/* 005A0 80B97140 0C0187B5 */ jal func_80061ED4 -/* 005A4 80B97144 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 005A8 80B97148 8FB80044 */ lw $t8, 0x0044($sp) -/* 005AC 80B9714C 13000003 */ beq $t8, $zero, .L80B9715C -/* 005B0 80B97150 00000000 */ nop -/* 005B4 80B97154 0C00B55C */ jal Actor_Kill - -/* 005B8 80B97158 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -.L80B9715C: -/* 005BC 80B9715C 3C0480B9 */ lui $a0, %hi(D_80B97FE8) ## $a0 = 80B90000 -/* 005C0 80B97160 24847FE8 */ addiu $a0, $a0, %lo(D_80B97FE8) ## $a0 = 80B97FE8 -/* 005C4 80B97164 0C00084C */ jal osSyncPrintf - -/* 005C8 80B97168 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 005CC 80B9716C 8FBF003C */ lw $ra, 0x003C($sp) -/* 005D0 80B97170 8FB00038 */ lw $s0, 0x0038($sp) -/* 005D4 80B97174 27BD0050 */ addiu $sp, $sp, 0x0050 ## $sp = 00000000 -/* 005D8 80B97178 03E00008 */ jr $ra -/* 005DC 80B9717C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Update.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Update.s deleted file mode 100644 index 1d2abcd566..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Update.s +++ /dev/null @@ -1,64 +0,0 @@ -glabel ObjLightswitch_Update -/* 00B4C 80B976EC 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00B50 80B976F0 AFBF001C */ sw $ra, 0x001C($sp) -/* 00B54 80B976F4 AFB10018 */ sw $s1, 0x0018($sp) -/* 00B58 80B976F8 AFB00014 */ sw $s0, 0x0014($sp) -/* 00B5C 80B976FC 848201B2 */ lh $v0, 0x01B2($a0) ## 000001B2 -/* 00B60 80B97700 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00B64 80B97704 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00B68 80B97708 18400002 */ blez $v0, .L80B97714 -/* 00B6C 80B9770C 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 00B70 80B97710 A48E01B2 */ sh $t6, 0x01B2($a0) ## 000001B2 -.L80B97714: -/* 00B74 80B97714 8E19014C */ lw $t9, 0x014C($s0) ## 0000014C -/* 00B78 80B97718 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00B7C 80B9771C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 00B80 80B97720 0320F809 */ jalr $ra, $t9 -/* 00B84 80B97724 00000000 */ nop -/* 00B88 80B97728 8E0F0130 */ lw $t7, 0x0130($s0) ## 00000130 -/* 00B8C 80B9772C 51E00024 */ beql $t7, $zero, .L80B977C0 -/* 00B90 80B97730 8FBF001C */ lw $ra, 0x001C($sp) -/* 00B94 80B97734 8618001C */ lh $t8, 0x001C($s0) ## 0000001C -/* 00B98 80B97738 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00B9C 80B9773C 33080001 */ andi $t0, $t8, 0x0001 ## $t0 = 00000000 -/* 00BA0 80B97740 5501000F */ bnel $t0, $at, .L80B97780 -/* 00BA4 80B97744 92020161 */ lbu $v0, 0x0161($s0) ## 00000161 -/* 00BA8 80B97748 8E02011C */ lw $v0, 0x011C($s0) ## 0000011C -/* 00BAC 80B9774C 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00BB0 80B97750 44814000 */ mtc1 $at, $f8 ## $f8 = 60.00 -/* 00BB4 80B97754 C4440024 */ lwc1 $f4, 0x0024($v0) ## 00000024 -/* 00BB8 80B97758 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00BBC 80B9775C 24050000 */ addiu $a1, $zero, 0x0000 ## $a1 = 00000000 -/* 00BC0 80B97760 E6040024 */ swc1 $f4, 0x0024($s0) ## 00000024 -/* 00BC4 80B97764 C4460028 */ lwc1 $f6, 0x0028($v0) ## 00000028 -/* 00BC8 80B97768 46083280 */ add.s $f10, $f6, $f8 -/* 00BCC 80B9776C E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028 -/* 00BD0 80B97770 C450002C */ lwc1 $f16, 0x002C($v0) ## 0000002C -/* 00BD4 80B97774 0C00B56E */ jal Actor_SetHeight - -/* 00BD8 80B97778 E610002C */ swc1 $f16, 0x002C($s0) ## 0000002C -/* 00BDC 80B9777C 92020161 */ lbu $v0, 0x0161($s0) ## 00000161 -.L80B97780: -/* 00BE0 80B97780 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00BE4 80B97784 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00BE8 80B97788 3049FFFD */ andi $t1, $v0, 0xFFFD ## $t1 = 00000000 -/* 00BEC 80B9778C A2090161 */ sb $t1, 0x0161($s0) ## 00000161 -/* 00BF0 80B97790 02212821 */ addu $a1, $s1, $at -/* 00BF4 80B97794 26060150 */ addiu $a2, $s0, 0x0150 ## $a2 = 00000150 -/* 00BF8 80B97798 A20201C2 */ sb $v0, 0x01C2($s0) ## 000001C2 -/* 00BFC 80B9779C AFA60020 */ sw $a2, 0x0020($sp) -/* 00C00 80B977A0 AFA50024 */ sw $a1, 0x0024($sp) -/* 00C04 80B977A4 0C017713 */ jal CollisionCheck_SetOC - ## CollisionCheck_setOT -/* 00C08 80B977A8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00C0C 80B977AC 8FA50024 */ lw $a1, 0x0024($sp) -/* 00C10 80B977B0 8FA60020 */ lw $a2, 0x0020($sp) -/* 00C14 80B977B4 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 00C18 80B977B8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00C1C 80B977BC 8FBF001C */ lw $ra, 0x001C($sp) -.L80B977C0: -/* 00C20 80B977C0 8FB00014 */ lw $s0, 0x0014($sp) -/* 00C24 80B977C4 8FB10018 */ lw $s1, 0x0018($sp) -/* 00C28 80B977C8 03E00008 */ jr $ra -/* 00C2C 80B977CC 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96BA0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96BA0.s deleted file mode 100644 index 993e05a834..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96BA0.s +++ /dev/null @@ -1,40 +0,0 @@ -glabel func_80B96BA0 -/* 00000 80B96BA0 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00004 80B96BA4 AFB00020 */ sw $s0, 0x0020($sp) -/* 00008 80B96BA8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 0000C 80B96BAC AFA50034 */ sw $a1, 0x0034($sp) -/* 00010 80B96BB0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00014 80B96BB4 AFBF0024 */ sw $ra, 0x0024($sp) -/* 00018 80B96BB8 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150 -/* 0001C 80B96BBC 0C016EFE */ jal Collider_InitJntSph -/* 00020 80B96BC0 AFA50028 */ sw $a1, 0x0028($sp) -/* 00024 80B96BC4 3C0780B9 */ lui $a3, %hi(D_80B97F44) ## $a3 = 80B90000 -/* 00028 80B96BC8 260E0170 */ addiu $t6, $s0, 0x0170 ## $t6 = 00000170 -/* 0002C 80B96BCC AFAE0010 */ sw $t6, 0x0010($sp) -/* 00030 80B96BD0 24E77F44 */ addiu $a3, $a3, %lo(D_80B97F44) ## $a3 = 80B97F44 -/* 00034 80B96BD4 8FA40034 */ lw $a0, 0x0034($sp) -/* 00038 80B96BD8 8FA50028 */ lw $a1, 0x0028($sp) -/* 0003C 80B96BDC 0C017014 */ jal Collider_SetJntSph -/* 00040 80B96BE0 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00044 80B96BE4 C60400BC */ lwc1 $f4, 0x00BC($s0) ## 000000BC -/* 00048 80B96BE8 C6060054 */ lwc1 $f6, 0x0054($s0) ## 00000054 -/* 0004C 80B96BEC C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028 -/* 00050 80B96BF0 C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024 -/* 00054 80B96BF4 46062202 */ mul.s $f8, $f4, $f6 -/* 00058 80B96BF8 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C -/* 0005C 80B96BFC 260700B4 */ addiu $a3, $s0, 0x00B4 ## $a3 = 000000B4 -/* 00060 80B96C00 0C0345A5 */ jal func_800D1694 -/* 00064 80B96C04 46085380 */ add.s $f14, $f10, $f8 -/* 00068 80B96C08 C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 0006C 80B96C0C C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 00070 80B96C10 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 00074 80B96C14 0C0342A3 */ jal Matrix_Scale -/* 00078 80B96C18 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 0007C 80B96C1C 00002025 */ or $a0, $zero, $zero ## $a0 = 00000000 -/* 00080 80B96C20 0C018A29 */ jal func_800628A4 -/* 00084 80B96C24 8FA50028 */ lw $a1, 0x0028($sp) -/* 00088 80B96C28 8FBF0024 */ lw $ra, 0x0024($sp) -/* 0008C 80B96C2C 8FB00020 */ lw $s0, 0x0020($sp) -/* 00090 80B96C30 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00094 80B96C34 03E00008 */ jr $ra -/* 00098 80B96C38 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96C3C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96C3C.s deleted file mode 100644 index d6d0abdb90..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96C3C.s +++ /dev/null @@ -1,56 +0,0 @@ -glabel func_80B96C3C -/* 0009C 80B96C3C 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 000A0 80B96C40 AFB00018 */ sw $s0, 0x0018($sp) -/* 000A4 80B96C44 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 000A8 80B96C48 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 000AC 80B96C4C AFBF001C */ sw $ra, 0x001C($sp) -/* 000B0 80B96C50 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 000B4 80B96C54 84E5001C */ lh $a1, 0x001C($a3) ## 0000001C -/* 000B8 80B96C58 AFA70028 */ sw $a3, 0x0028($sp) -/* 000BC 80B96C5C 00052A03 */ sra $a1, $a1, 8 -/* 000C0 80B96C60 0C00B2D0 */ jal Flags_GetSwitch - -/* 000C4 80B96C64 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 000C8 80B96C68 14400020 */ bne $v0, $zero, .L80B96CEC -/* 000CC 80B96C6C 8FA70028 */ lw $a3, 0x0028($sp) -/* 000D0 80B96C70 84E2001C */ lh $v0, 0x001C($a3) ## 0000001C -/* 000D4 80B96C74 AFA70028 */ sw $a3, 0x0028($sp) -/* 000D8 80B96C78 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 000DC 80B96C7C 00021903 */ sra $v1, $v0, 4 -/* 000E0 80B96C80 30630003 */ andi $v1, $v1, 0x0003 ## $v1 = 00000000 -/* 000E4 80B96C84 00022A03 */ sra $a1, $v0, 8 -/* 000E8 80B96C88 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 000EC 80B96C8C 0C00B2DD */ jal Flags_SetSwitch - -/* 000F0 80B96C90 AFA30020 */ sw $v1, 0x0020($sp) -/* 000F4 80B96C94 8FA30020 */ lw $v1, 0x0020($sp) -/* 000F8 80B96C98 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 000FC 80B96C9C 8FA70028 */ lw $a3, 0x0028($sp) -/* 00100 80B96CA0 14610006 */ bne $v1, $at, .L80B96CBC -/* 00104 80B96CA4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00108 80B96CA8 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 0010C 80B96CAC 0C0201AF */ jal func_800806BC -/* 00110 80B96CB0 24064807 */ addiu $a2, $zero, 0x4807 ## $a2 = 00004807 -/* 00114 80B96CB4 1000000E */ beq $zero, $zero, .L80B96CF0 -/* 00118 80B96CB8 8FBF001C */ lw $ra, 0x001C($sp) -.L80B96CBC: -/* 0011C 80B96CBC 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 00120 80B96CC0 14610007 */ bne $v1, $at, .L80B96CE0 -/* 00124 80B96CC4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00128 80B96CC8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0012C 80B96CCC 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 00130 80B96CD0 0C0201AF */ jal func_800806BC -/* 00134 80B96CD4 24064806 */ addiu $a2, $zero, 0x4806 ## $a2 = 00004806 -/* 00138 80B96CD8 10000005 */ beq $zero, $zero, .L80B96CF0 -/* 0013C 80B96CDC 8FBF001C */ lw $ra, 0x001C($sp) -.L80B96CE0: -/* 00140 80B96CE0 00E02825 */ or $a1, $a3, $zero ## $a1 = 00000000 -/* 00144 80B96CE4 0C0201AF */ jal func_800806BC -/* 00148 80B96CE8 24064802 */ addiu $a2, $zero, 0x4802 ## $a2 = 00004802 -.L80B96CEC: -/* 0014C 80B96CEC 8FBF001C */ lw $ra, 0x001C($sp) -.L80B96CF0: -/* 00150 80B96CF0 8FB00018 */ lw $s0, 0x0018($sp) -/* 00154 80B96CF4 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00158 80B96CF8 03E00008 */ jr $ra -/* 0015C 80B96CFC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D00.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D00.s deleted file mode 100644 index a809fb5cbe..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D00.s +++ /dev/null @@ -1,37 +0,0 @@ -glabel func_80B96D00 -/* 00160 80B96D00 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00164 80B96D04 AFA40018 */ sw $a0, 0x0018($sp) -/* 00168 80B96D08 8FAE0018 */ lw $t6, 0x0018($sp) -/* 0016C 80B96D0C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00170 80B96D10 AFA5001C */ sw $a1, 0x001C($sp) -/* 00174 80B96D14 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00178 80B96D18 85C5001C */ lh $a1, 0x001C($t6) ## 0000001C -/* 0017C 80B96D1C 00052A03 */ sra $a1, $a1, 8 -/* 00180 80B96D20 0C00B2D0 */ jal Flags_GetSwitch - -/* 00184 80B96D24 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00188 80B96D28 10400011 */ beq $v0, $zero, .L80B96D70 -/* 0018C 80B96D2C 8FAF0018 */ lw $t7, 0x0018($sp) -/* 00190 80B96D30 85E5001C */ lh $a1, 0x001C($t7) ## 0000001C -/* 00194 80B96D34 8FA4001C */ lw $a0, 0x001C($sp) -/* 00198 80B96D38 00052A03 */ sra $a1, $a1, 8 -/* 0019C 80B96D3C 0C00B2ED */ jal Flags_UnsetSwitch - -/* 001A0 80B96D40 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 001A4 80B96D44 8FB80018 */ lw $t8, 0x0018($sp) -/* 001A8 80B96D48 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 001AC 80B96D4C 8FA4001C */ lw $a0, 0x001C($sp) -/* 001B0 80B96D50 8719001C */ lh $t9, 0x001C($t8) ## 0000001C -/* 001B4 80B96D54 03002825 */ or $a1, $t8, $zero ## $a1 = 00000000 -/* 001B8 80B96D58 00194103 */ sra $t0, $t9, 4 -/* 001BC 80B96D5C 31090003 */ andi $t1, $t0, 0x0003 ## $t1 = 00000000 -/* 001C0 80B96D60 55210004 */ bnel $t1, $at, .L80B96D74 -/* 001C4 80B96D64 8FBF0014 */ lw $ra, 0x0014($sp) -/* 001C8 80B96D68 0C0201AF */ jal func_800806BC -/* 001CC 80B96D6C 24064807 */ addiu $a2, $zero, 0x4807 ## $a2 = 00004807 -.L80B96D70: -/* 001D0 80B96D70 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B96D74: -/* 001D4 80B96D74 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 001D8 80B96D78 03E00008 */ jr $ra -/* 001DC 80B96D7C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D80.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D80.s deleted file mode 100644 index c290c6eaf3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D80.s +++ /dev/null @@ -1,154 +0,0 @@ -.late_rodata -glabel D_80B980F8 - .word 0x38808081, 0x00000000 - -.text -glabel func_80B96D80 -/* 001E0 80B96D80 27BDFF80 */ addiu $sp, $sp, 0xFF80 ## $sp = FFFFFF80 -/* 001E4 80B96D84 AFB00048 */ sw $s0, 0x0048($sp) -/* 001E8 80B96D88 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 001EC 80B96D8C AFBF004C */ sw $ra, 0x004C($sp) -/* 001F0 80B96D90 AFA50084 */ sw $a1, 0x0084($sp) -/* 001F4 80B96D94 0C01DE1C */ jal Math_Sins - ## sins? -/* 001F8 80B96D98 848400B6 */ lh $a0, 0x00B6($a0) ## 000000B6 -/* 001FC 80B96D9C E7A00070 */ swc1 $f0, 0x0070($sp) -/* 00200 80B96DA0 0C01DE0D */ jal Math_Coss - ## coss? -/* 00204 80B96DA4 860400B6 */ lh $a0, 0x00B6($s0) ## 000000B6 -/* 00208 80B96DA8 E7A0006C */ swc1 $f0, 0x006C($sp) -/* 0020C 80B96DAC 860201BC */ lh $v0, 0x01BC($s0) ## 000001BC -/* 00210 80B96DB0 28411900 */ slti $at, $v0, 0x1900 -/* 00214 80B96DB4 54200078 */ bnel $at, $zero, .L80B96F98 -/* 00218 80B96DB8 8FBF004C */ lw $ra, 0x004C($sp) -/* 0021C 80B96DBC 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 00220 80B96DC0 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00224 80B96DC4 44811000 */ mtc1 $at, $f2 ## $f2 = 60.00 -/* 00228 80B96DC8 468021A0 */ cvt.s.w $f6, $f4 -/* 0022C 80B96DCC 3C0180BA */ lui $at, %hi(D_80B980F8) ## $at = 80BA0000 -/* 00230 80B96DD0 C42880F8 */ lwc1 $f8, %lo(D_80B980F8)($at) -/* 00234 80B96DD4 3C013F80 */ lui $at, 0x3F80 ## $at = 3F800000 -/* 00238 80B96DD8 44812000 */ mtc1 $at, $f4 ## $f4 = 1.00 -/* 0023C 80B96DDC 3C0143C8 */ lui $at, 0x43C8 ## $at = 43C80000 -/* 00240 80B96DE0 46083282 */ mul.s $f10, $f6, $f8 -/* 00244 80B96DE4 44814000 */ mtc1 $at, $f8 ## $f8 = 400.00 -/* 00248 80B96DE8 460A2181 */ sub.s $f6, $f4, $f10 -/* 0024C 80B96DEC 46083002 */ mul.s $f0, $f6, $f8 -/* 00250 80B96DF0 4600103C */ c.lt.s $f2, $f0 -/* 00254 80B96DF4 00000000 */ nop -/* 00258 80B96DF8 45020004 */ bc1fl .L80B96E0C -/* 0025C 80B96DFC 46000386 */ mov.s $f14, $f0 -/* 00260 80B96E00 10000002 */ beq $zero, $zero, .L80B96E0C -/* 00264 80B96E04 46001386 */ mov.s $f14, $f2 -/* 00268 80B96E08 46000386 */ mov.s $f14, $f0 -.L80B96E0C: -/* 0026C 80B96E0C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00270 80B96E10 E7AE0058 */ swc1 $f14, 0x0058($sp) -/* 00274 80B96E14 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00278 80B96E18 44818000 */ mtc1 $at, $f16 ## $f16 = 30.00 -/* 0027C 80B96E1C C7AE0058 */ lwc1 $f14, 0x0058($sp) -/* 00280 80B96E20 46107101 */ sub.s $f4, $f14, $f16 -/* 00284 80B96E24 46102280 */ add.s $f10, $f4, $f16 -/* 00288 80B96E28 460A0082 */ mul.s $f2, $f0, $f10 -/* 0028C 80B96E2C 4602803C */ c.lt.s $f16, $f2 -/* 00290 80B96E30 46101301 */ sub.s $f12, $f2, $f16 -/* 00294 80B96E34 45000003 */ bc1f .L80B96E44 -/* 00298 80B96E38 E7AC0064 */ swc1 $f12, 0x0064($sp) -/* 0029C 80B96E3C 1000000F */ beq $zero, $zero, .L80B96E7C -/* 002A0 80B96E40 46008086 */ mov.s $f2, $f16 -.L80B96E44: -/* 002A4 80B96E44 460C6202 */ mul.s $f8, $f12, $f12 -/* 002A8 80B96E48 3C0142C8 */ lui $at, 0x42C8 ## $at = 42C80000 -/* 002AC 80B96E4C 44817000 */ mtc1 $at, $f14 ## $f14 = 100.00 -/* 002B0 80B96E50 3C014461 */ lui $at, 0x4461 ## $at = 44610000 -/* 002B4 80B96E54 44813000 */ mtc1 $at, $f6 ## $f6 = 900.00 -/* 002B8 80B96E58 00000000 */ nop -/* 002BC 80B96E5C 46083081 */ sub.s $f2, $f6, $f8 -/* 002C0 80B96E60 460E103C */ c.lt.s $f2, $f14 -/* 002C4 80B96E64 00000000 */ nop -/* 002C8 80B96E68 45020003 */ bc1fl .L80B96E78 -/* 002CC 80B96E6C 46001004 */ sqrt.s $f0, $f2 -/* 002D0 80B96E70 46007086 */ mov.s $f2, $f14 -/* 002D4 80B96E74 46001004 */ sqrt.s $f0, $f2 -.L80B96E78: -/* 002D8 80B96E78 46000086 */ mov.s $f2, $f0 -.L80B96E7C: -/* 002DC 80B96E7C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 002E0 80B96E80 E7A20068 */ swc1 $f2, 0x0068($sp) -/* 002E4 80B96E84 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 002E8 80B96E88 44812000 */ mtc1 $at, $f4 ## $f4 = 0.50 -/* 002EC 80B96E8C C7A20068 */ lwc1 $f2, 0x0068($sp) -/* 002F0 80B96E90 46040281 */ sub.s $f10, $f0, $f4 -/* 002F4 80B96E94 46025302 */ mul.s $f12, $f10, $f2 -/* 002F8 80B96E98 460C6080 */ add.s $f2, $f12, $f12 -/* 002FC 80B96E9C 46001385 */ abs.s $f14, $f2 -/* 00300 80B96EA0 E7A20068 */ swc1 $f2, 0x0068($sp) -/* 00304 80B96EA4 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00308 80B96EA8 E7AE0058 */ swc1 $f14, 0x0058($sp) -/* 0030C 80B96EAC 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 00310 80B96EB0 44818000 */ mtc1 $at, $f16 ## $f16 = 30.00 -/* 00314 80B96EB4 C7AE0058 */ lwc1 $f14, 0x0058($sp) -/* 00318 80B96EB8 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 0031C 80B96EBC 44819000 */ mtc1 $at, $f18 ## $f18 = 10.00 -/* 00320 80B96EC0 460E8181 */ sub.s $f6, $f16, $f14 -/* 00324 80B96EC4 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00328 80B96EC8 44814000 */ mtc1 $at, $f8 ## $f8 = 0.50 -/* 0032C 80B96ECC C7A20068 */ lwc1 $f2, 0x0068($sp) -/* 00330 80B96ED0 3C0680B9 */ lui $a2, %hi(D_80B97F74) ## $a2 = 80B90000 -/* 00334 80B96ED4 46083102 */ mul.s $f4, $f6, $f8 -/* 00338 80B96ED8 C7A60070 */ lwc1 $f6, 0x0070($sp) -/* 0033C 80B96EDC 24C67F74 */ addiu $a2, $a2, %lo(D_80B97F74) ## $a2 = 80B97F74 -/* 00340 80B96EE0 46120282 */ mul.s $f10, $f0, $f18 -/* 00344 80B96EE4 240E0064 */ addiu $t6, $zero, 0x0064 ## $t6 = 00000064 -/* 00348 80B96EE8 240F00FF */ addiu $t7, $zero, 0x00FF ## $t7 = 000000FF -/* 0034C 80B96EEC 241800FF */ addiu $t8, $zero, 0x00FF ## $t8 = 000000FF -/* 00350 80B96EF0 241900A0 */ addiu $t9, $zero, 0x00A0 ## $t9 = 000000A0 -/* 00354 80B96EF4 240800A0 */ addiu $t0, $zero, 0x00A0 ## $t0 = 000000A0 -/* 00358 80B96EF8 240900FF */ addiu $t1, $zero, 0x00FF ## $t1 = 000000FF -/* 0035C 80B96EFC 46045300 */ add.s $f12, $f10, $f4 -/* 00360 80B96F00 C7AA006C */ lwc1 $f10, 0x006C($sp) -/* 00364 80B96F04 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00368 80B96F08 240B0009 */ addiu $t3, $zero, 0x0009 ## $t3 = 00000009 -/* 0036C 80B96F0C 46066202 */ mul.s $f8, $f12, $f6 -/* 00370 80B96F10 240C0001 */ addiu $t4, $zero, 0x0001 ## $t4 = 00000001 -/* 00374 80B96F14 00C03825 */ or $a3, $a2, $zero ## $a3 = 80B97F74 -/* 00378 80B96F18 460A1102 */ mul.s $f4, $f2, $f10 -/* 0037C 80B96F1C 8FA40084 */ lw $a0, 0x0084($sp) -/* 00380 80B96F20 27A50074 */ addiu $a1, $sp, 0x0074 ## $a1 = FFFFFFF4 -/* 00384 80B96F24 46044200 */ add.s $f8, $f8, $f4 -/* 00388 80B96F28 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 -/* 0038C 80B96F2C 46082100 */ add.s $f4, $f4, $f8 -/* 00390 80B96F30 E7A40074 */ swc1 $f4, 0x0074($sp) -/* 00394 80B96F34 C6080028 */ lwc1 $f8, 0x0028($s0) ## 00000028 -/* 00398 80B96F38 C7A40064 */ lwc1 $f4, 0x0064($sp) -/* 0039C 80B96F3C 46044200 */ add.s $f8, $f8, $f4 -/* 003A0 80B96F40 46124100 */ add.s $f4, $f8, $f18 -/* 003A4 80B96F44 460A6202 */ mul.s $f8, $f12, $f10 -/* 003A8 80B96F48 E7A40078 */ swc1 $f4, 0x0078($sp) -/* 003AC 80B96F4C 46061102 */ mul.s $f4, $f2, $f6 -/* 003B0 80B96F50 C606002C */ lwc1 $f6, 0x002C($s0) ## 0000002C -/* 003B4 80B96F54 AFAC003C */ sw $t4, 0x003C($sp) -/* 003B8 80B96F58 AFAB0038 */ sw $t3, 0x0038($sp) -/* 003BC 80B96F5C AFAA0034 */ sw $t2, 0x0034($sp) -/* 003C0 80B96F60 AFA00030 */ sw $zero, 0x0030($sp) -/* 003C4 80B96F64 AFA0002C */ sw $zero, 0x002C($sp) -/* 003C8 80B96F68 46044281 */ sub.s $f10, $f8, $f4 -/* 003CC 80B96F6C AFA90028 */ sw $t1, 0x0028($sp) -/* 003D0 80B96F70 AFA80024 */ sw $t0, 0x0024($sp) -/* 003D4 80B96F74 AFB90020 */ sw $t9, 0x0020($sp) -/* 003D8 80B96F78 460A3200 */ add.s $f8, $f6, $f10 -/* 003DC 80B96F7C AFB8001C */ sw $t8, 0x001C($sp) -/* 003E0 80B96F80 AFAF0018 */ sw $t7, 0x0018($sp) -/* 003E4 80B96F84 AFA00014 */ sw $zero, 0x0014($sp) -/* 003E8 80B96F88 E7A8007C */ swc1 $f8, 0x007C($sp) -/* 003EC 80B96F8C 0C00A9AE */ jal func_8002A6B8 -/* 003F0 80B96F90 AFAE0010 */ sw $t6, 0x0010($sp) -/* 003F4 80B96F94 8FBF004C */ lw $ra, 0x004C($sp) -.L80B96F98: -/* 003F8 80B96F98 8FB00048 */ lw $s0, 0x0048($sp) -/* 003FC 80B96F9C 27BD0080 */ addiu $sp, $sp, 0x0080 ## $sp = 00000000 -/* 00400 80B96FA0 03E00008 */ jr $ra -/* 00404 80B96FA4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971A8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971A8.s deleted file mode 100644 index 54daf647ca..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971A8.s +++ /dev/null @@ -1,13 +0,0 @@ -glabel func_80B971A8 -/* 00608 80B971A8 3C0E80B9 */ lui $t6, %hi(func_80B971D8) ## $t6 = 80B90000 -/* 0060C 80B971AC 24023FC0 */ addiu $v0, $zero, 0x3FC0 ## $v0 = 00003FC0 -/* 00610 80B971B0 25CE71D8 */ addiu $t6, $t6, %lo(func_80B971D8) ## $t6 = 80B971D8 -/* 00614 80B971B4 240F26C0 */ addiu $t7, $zero, 0x26C0 ## $t7 = 000026C0 -/* 00618 80B971B8 24181F40 */ addiu $t8, $zero, 0x1F40 ## $t8 = 00001F40 -/* 0061C 80B971BC AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C -/* 00620 80B971C0 A48001B4 */ sh $zero, 0x01B4($a0) ## 000001B4 -/* 00624 80B971C4 A48F01B6 */ sh $t7, 0x01B6($a0) ## 000001B6 -/* 00628 80B971C8 A49801B8 */ sh $t8, 0x01B8($a0) ## 000001B8 -/* 0062C 80B971CC A48201BA */ sh $v0, 0x01BA($a0) ## 000001BA -/* 00630 80B971D0 03E00008 */ jr $ra -/* 00634 80B971D4 A48201BC */ sh $v0, 0x01BC($a0) ## 000001BC diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971D8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971D8.s deleted file mode 100644 index 79864cb066..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971D8.s +++ /dev/null @@ -1,62 +0,0 @@ -glabel func_80B971D8 -/* 00638 80B971D8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0063C 80B971DC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00640 80B971E0 AFA5001C */ sw $a1, 0x001C($sp) -/* 00644 80B971E4 8482001C */ lh $v0, 0x001C($a0) ## 0000001C -/* 00648 80B971E8 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 0064C 80B971EC 00021103 */ sra $v0, $v0, 4 -/* 00650 80B971F0 30420003 */ andi $v0, $v0, 0x0003 ## $v0 = 00000000 -/* 00654 80B971F4 5040000A */ beql $v0, $zero, .L80B97220 -/* 00658 80B971F8 908E0161 */ lbu $t6, 0x0161($a0) ## 00000161 -/* 0065C 80B971FC 10410012 */ beq $v0, $at, .L80B97248 -/* 00660 80B97200 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00664 80B97204 10410005 */ beq $v0, $at, .L80B9721C -/* 00668 80B97208 24010003 */ addiu $at, $zero, 0x0003 ## $at = 00000003 -/* 0066C 80B9720C 5041001E */ beql $v0, $at, .L80B97288 -/* 00670 80B97210 908A0161 */ lbu $t2, 0x0161($a0) ## 00000161 -/* 00674 80B97214 10000025 */ beq $zero, $zero, .L80B972AC -/* 00678 80B97218 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B9721C: -/* 0067C 80B9721C 908E0161 */ lbu $t6, 0x0161($a0) ## 00000161 -.L80B97220: -/* 00680 80B97220 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000 -/* 00684 80B97224 51E00021 */ beql $t7, $zero, .L80B972AC -/* 00688 80B97228 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0068C 80B9722C 0C2E5CAE */ jal func_80B972B8 -/* 00690 80B97230 AFA40018 */ sw $a0, 0x0018($sp) -/* 00694 80B97234 8FA40018 */ lw $a0, 0x0018($sp) -/* 00698 80B97238 0C2E5B0F */ jal func_80B96C3C -/* 0069C 80B9723C 8FA5001C */ lw $a1, 0x001C($sp) -/* 006A0 80B97240 1000001A */ beq $zero, $zero, .L80B972AC -/* 006A4 80B97244 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B97248: -/* 006A8 80B97248 90980161 */ lbu $t8, 0x0161($a0) ## 00000161 -/* 006AC 80B9724C 33190002 */ andi $t9, $t8, 0x0002 ## $t9 = 00000000 -/* 006B0 80B97250 53200016 */ beql $t9, $zero, .L80B972AC -/* 006B4 80B97254 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006B8 80B97258 908801C2 */ lbu $t0, 0x01C2($a0) ## 000001C2 -/* 006BC 80B9725C 31090002 */ andi $t1, $t0, 0x0002 ## $t1 = 00000000 -/* 006C0 80B97260 55200012 */ bnel $t1, $zero, .L80B972AC -/* 006C4 80B97264 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006C8 80B97268 0C2E5CAE */ jal func_80B972B8 -/* 006CC 80B9726C AFA40018 */ sw $a0, 0x0018($sp) -/* 006D0 80B97270 8FA40018 */ lw $a0, 0x0018($sp) -/* 006D4 80B97274 0C2E5B0F */ jal func_80B96C3C -/* 006D8 80B97278 8FA5001C */ lw $a1, 0x001C($sp) -/* 006DC 80B9727C 1000000B */ beq $zero, $zero, .L80B972AC -/* 006E0 80B97280 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006E4 80B97284 908A0161 */ lbu $t2, 0x0161($a0) ## 00000161 -.L80B97288: -/* 006E8 80B97288 314B0002 */ andi $t3, $t2, 0x0002 ## $t3 = 00000000 -/* 006EC 80B9728C 51600007 */ beql $t3, $zero, .L80B972AC -/* 006F0 80B97290 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006F4 80B97294 0C2E5D8C */ jal func_80B97630 -/* 006F8 80B97298 AFA40018 */ sw $a0, 0x0018($sp) -/* 006FC 80B9729C 8FA40018 */ lw $a0, 0x0018($sp) -/* 00700 80B972A0 0C2E5B0F */ jal func_80B96C3C -/* 00704 80B972A4 8FA5001C */ lw $a1, 0x001C($sp) -/* 00708 80B972A8 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B972AC: -/* 0070C 80B972AC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00710 80B972B0 03E00008 */ jr $ra -/* 00714 80B972B4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972B8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972B8.s deleted file mode 100644 index 1bc652b799..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972B8.s +++ /dev/null @@ -1,9 +0,0 @@ -glabel func_80B972B8 -/* 00718 80B972B8 3C0E80B9 */ lui $t6, %hi(func_80B972D8) ## $t6 = 80B90000 -/* 0071C 80B972BC 25CE72D8 */ addiu $t6, $t6, %lo(func_80B972D8) ## $t6 = 80B972D8 -/* 00720 80B972C0 240F0064 */ addiu $t7, $zero, 0x0064 ## $t7 = 00000064 -/* 00724 80B972C4 AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C -/* 00728 80B972C8 A48F01B2 */ sh $t7, 0x01B2($a0) ## 000001B2 -/* 0072C 80B972CC A48001B0 */ sh $zero, 0x01B0($a0) ## 000001B0 -/* 00730 80B972D0 03E00008 */ jr $ra -/* 00734 80B972D4 A48001B4 */ sh $zero, 0x01B4($a0) ## 000001B4 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972D8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972D8.s deleted file mode 100644 index 9e4eeab5d3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972D8.s +++ /dev/null @@ -1,69 +0,0 @@ -glabel func_80B972D8 -/* 00738 80B972D8 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 0073C 80B972DC AFBF001C */ sw $ra, 0x001C($sp) -/* 00740 80B972E0 AFB00018 */ sw $s0, 0x0018($sp) -/* 00744 80B972E4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00748 80B972E8 0C016C66 */ jal func_8005B198 -/* 0074C 80B972EC AFA50024 */ sw $a1, 0x0024($sp) -/* 00750 80B972F0 920E0002 */ lbu $t6, 0x0002($s0) ## 00000002 -/* 00754 80B972F4 504E0005 */ beql $v0, $t6, .L80B9730C -/* 00758 80B972F8 860301B0 */ lh $v1, 0x01B0($s0) ## 000001B0 -/* 0075C 80B972FC 860F01B2 */ lh $t7, 0x01B2($s0) ## 000001B2 -/* 00760 80B97300 5DE0002D */ bgtzl $t7, .L80B973B8 -/* 00764 80B97304 8FBF001C */ lw $ra, 0x001C($sp) -/* 00768 80B97308 860301B0 */ lh $v1, 0x01B0($s0) ## 000001B0 -.L80B9730C: -/* 0076C 80B9730C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00770 80B97310 54600005 */ bnel $v1, $zero, .L80B97328 -/* 00774 80B97314 24780001 */ addiu $t8, $v1, 0x0001 ## $t8 = 00000001 -/* 00778 80B97318 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 0077C 80B9731C 2405286F */ addiu $a1, $zero, 0x286F ## $a1 = 0000286F -/* 00780 80B97320 860301B0 */ lh $v1, 0x01B0($s0) ## 000001B0 -/* 00784 80B97324 24780001 */ addiu $t8, $v1, 0x0001 ## $t8 = 00000001 -.L80B97328: -/* 00788 80B97328 A61801B0 */ sh $t8, 0x01B0($s0) ## 000001B0 -/* 0078C 80B9732C 260401C0 */ addiu $a0, $s0, 0x01C0 ## $a0 = 000001C0 -/* 00790 80B97330 2405FF56 */ addiu $a1, $zero, 0xFF56 ## $a1 = FFFFFF56 -/* 00794 80B97334 0C01DE5F */ jal Math_ApproxS - -/* 00798 80B97338 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A -/* 0079C 80B9733C 860301B0 */ lh $v1, 0x01B0($s0) ## 000001B0 -/* 007A0 80B97340 861901BE */ lh $t9, 0x01BE($s0) ## 000001BE -/* 007A4 80B97344 860801C0 */ lh $t0, 0x01C0($s0) ## 000001C0 -/* 007A8 80B97348 00036080 */ sll $t4, $v1, 2 -/* 007AC 80B9734C 01836023 */ subu $t4, $t4, $v1 -/* 007B0 80B97350 000C6080 */ sll $t4, $t4, 2 -/* 007B4 80B97354 00035080 */ sll $t2, $v1, 2 -/* 007B8 80B97358 01435021 */ addu $t2, $t2, $v1 -/* 007BC 80B9735C 01836021 */ addu $t4, $t4, $v1 -/* 007C0 80B97360 000A5180 */ sll $t2, $t2, 6 -/* 007C4 80B97364 000C6140 */ sll $t4, $t4, 5 -/* 007C8 80B97368 254B26C0 */ addiu $t3, $t2, 0x26C0 ## $t3 = 000026C0 -/* 007CC 80B9736C 258D1F40 */ addiu $t5, $t4, 0x1F40 ## $t5 = 00001F40 -/* 007D0 80B97370 28610014 */ slti $at, $v1, 0x0014 -/* 007D4 80B97374 03284821 */ addu $t1, $t9, $t0 -/* 007D8 80B97378 A60901BE */ sh $t1, 0x01BE($s0) ## 000001BE -/* 007DC 80B9737C A60B01B6 */ sh $t3, 0x01B6($s0) ## 000001B6 -/* 007E0 80B97380 14200005 */ bne $at, $zero, .L80B97398 -/* 007E4 80B97384 A60D01B8 */ sh $t5, 0x01B8($s0) ## 000001B8 -/* 007E8 80B97388 0C2E5CF2 */ jal func_80B973C8 -/* 007EC 80B9738C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 007F0 80B97390 10000009 */ beq $zero, $zero, .L80B973B8 -/* 007F4 80B97394 8FBF001C */ lw $ra, 0x001C($sp) -.L80B97398: -/* 007F8 80B97398 2401000F */ addiu $at, $zero, 0x000F ## $at = 0000000F -/* 007FC 80B9739C 14610005 */ bne $v1, $at, .L80B973B4 -/* 00800 80B973A0 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 00804 80B973A4 A60E01B4 */ sh $t6, 0x01B4($s0) ## 000001B4 -/* 00808 80B973A8 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0080C 80B973AC 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00810 80B973B0 24052815 */ addiu $a1, $zero, 0x2815 ## $a1 = 00002815 -.L80B973B4: -/* 00814 80B973B4 8FBF001C */ lw $ra, 0x001C($sp) -.L80B973B8: -/* 00818 80B973B8 8FB00018 */ lw $s0, 0x0018($sp) -/* 0081C 80B973BC 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00820 80B973C0 03E00008 */ jr $ra -/* 00824 80B973C4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B973C8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B973C8.s deleted file mode 100644 index 6ceba63e45..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B973C8.s +++ /dev/null @@ -1,15 +0,0 @@ -glabel func_80B973C8 -/* 00828 80B973C8 24023FC0 */ addiu $v0, $zero, 0x3FC0 ## $v0 = 00003FC0 -/* 0082C 80B973CC 3C0E80B9 */ lui $t6, %hi(func_80B97400) ## $t6 = 80B90000 -/* 00830 80B973D0 25CE7400 */ addiu $t6, $t6, %lo(func_80B97400) ## $t6 = 80B97400 -/* 00834 80B973D4 240F0002 */ addiu $t7, $zero, 0x0002 ## $t7 = 00000002 -/* 00838 80B973D8 2418FF56 */ addiu $t8, $zero, 0xFF56 ## $t8 = FFFFFF56 -/* 0083C 80B973DC AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C -/* 00840 80B973E0 A48F01B4 */ sh $t7, 0x01B4($a0) ## 000001B4 -/* 00844 80B973E4 A48201B6 */ sh $v0, 0x01B6($a0) ## 000001B6 -/* 00848 80B973E8 A48201B8 */ sh $v0, 0x01B8($a0) ## 000001B8 -/* 0084C 80B973EC A48201BA */ sh $v0, 0x01BA($a0) ## 000001BA -/* 00850 80B973F0 A48201BC */ sh $v0, 0x01BC($a0) ## 000001BC -/* 00854 80B973F4 A49801C0 */ sh $t8, 0x01C0($a0) ## 000001C0 -/* 00858 80B973F8 03E00008 */ jr $ra -/* 0085C 80B973FC A48001B0 */ sh $zero, 0x01B0($a0) ## 000001B0 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97400.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97400.s deleted file mode 100644 index 58d48b4e1c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97400.s +++ /dev/null @@ -1,78 +0,0 @@ -glabel func_80B97400 -/* 00860 80B97400 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00864 80B97404 AFBF001C */ sw $ra, 0x001C($sp) -/* 00868 80B97408 AFB00018 */ sw $s0, 0x0018($sp) -/* 0086C 80B9740C 8483001C */ lh $v1, 0x001C($a0) ## 0000001C -/* 00870 80B97410 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00874 80B97414 00A03025 */ or $a2, $a1, $zero ## $a2 = 00000000 -/* 00878 80B97418 00031103 */ sra $v0, $v1, 4 -/* 0087C 80B9741C 30420003 */ andi $v0, $v0, 0x0003 ## $v0 = 00000000 -/* 00880 80B97420 10400008 */ beq $v0, $zero, .L80B97444 -/* 00884 80B97424 00C02025 */ or $a0, $a2, $zero ## $a0 = 00000000 -/* 00888 80B97428 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 0088C 80B9742C 1041000E */ beq $v0, $at, .L80B97468 -/* 00890 80B97430 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00894 80B97434 5041001D */ beql $v0, $at, .L80B974AC -/* 00898 80B97438 92080161 */ lbu $t0, 0x0161($s0) ## 00000161 -/* 0089C 80B9743C 1000002E */ beq $zero, $zero, .L80B974F8 -/* 008A0 80B97440 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -.L80B97444: -/* 008A4 80B97444 00032A03 */ sra $a1, $v1, 8 -/* 008A8 80B97448 0C00B2D0 */ jal Flags_GetSwitch - -/* 008AC 80B9744C 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 008B0 80B97450 54400029 */ bnel $v0, $zero, .L80B974F8 -/* 008B4 80B97454 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -/* 008B8 80B97458 0C2E5D46 */ jal func_80B97518 -/* 008BC 80B9745C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 008C0 80B97460 10000025 */ beq $zero, $zero, .L80B974F8 -/* 008C4 80B97464 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -.L80B97468: -/* 008C8 80B97468 920E0161 */ lbu $t6, 0x0161($s0) ## 00000161 -/* 008CC 80B9746C 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000 -/* 008D0 80B97470 51E00021 */ beql $t7, $zero, .L80B974F8 -/* 008D4 80B97474 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -/* 008D8 80B97478 921801C2 */ lbu $t8, 0x01C2($s0) ## 000001C2 -/* 008DC 80B9747C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 008E0 80B97480 33190002 */ andi $t9, $t8, 0x0002 ## $t9 = 00000000 -/* 008E4 80B97484 5720001C */ bnel $t9, $zero, .L80B974F8 -/* 008E8 80B97488 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -/* 008EC 80B9748C 0C2E5D46 */ jal func_80B97518 -/* 008F0 80B97490 AFA60024 */ sw $a2, 0x0024($sp) -/* 008F4 80B97494 8FA50024 */ lw $a1, 0x0024($sp) -/* 008F8 80B97498 0C2E5B40 */ jal func_80B96D00 -/* 008FC 80B9749C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00900 80B974A0 10000015 */ beq $zero, $zero, .L80B974F8 -/* 00904 80B974A4 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -/* 00908 80B974A8 92080161 */ lbu $t0, 0x0161($s0) ## 00000161 -.L80B974AC: -/* 0090C 80B974AC 31090002 */ andi $t1, $t0, 0x0002 ## $t1 = 00000000 -/* 00910 80B974B0 55200010 */ bnel $t1, $zero, .L80B974F4 -/* 00914 80B974B4 A60001B0 */ sh $zero, 0x01B0($s0) ## 000001B0 -/* 00918 80B974B8 860201B0 */ lh $v0, 0x01B0($s0) ## 000001B0 -/* 0091C 80B974BC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00920 80B974C0 28410007 */ slti $at, $v0, 0x0007 -/* 00924 80B974C4 14200008 */ bne $at, $zero, .L80B974E8 -/* 00928 80B974C8 244A0001 */ addiu $t2, $v0, 0x0001 ## $t2 = 00000001 -/* 0092C 80B974CC 0C2E5D46 */ jal func_80B97518 -/* 00930 80B974D0 AFA60024 */ sw $a2, 0x0024($sp) -/* 00934 80B974D4 8FA50024 */ lw $a1, 0x0024($sp) -/* 00938 80B974D8 0C2E5B40 */ jal func_80B96D00 -/* 0093C 80B974DC 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00940 80B974E0 10000005 */ beq $zero, $zero, .L80B974F8 -/* 00944 80B974E4 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -.L80B974E8: -/* 00948 80B974E8 10000002 */ beq $zero, $zero, .L80B974F4 -/* 0094C 80B974EC A60A01B0 */ sh $t2, 0x01B0($s0) ## 000001B0 -/* 00950 80B974F0 A60001B0 */ sh $zero, 0x01B0($s0) ## 000001B0 -.L80B974F4: -/* 00954 80B974F4 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -.L80B974F8: -/* 00958 80B974F8 860C01C0 */ lh $t4, 0x01C0($s0) ## 000001C0 -/* 0095C 80B974FC 016C6821 */ addu $t5, $t3, $t4 -/* 00960 80B97500 A60D01BE */ sh $t5, 0x01BE($s0) ## 000001BE -/* 00964 80B97504 8FBF001C */ lw $ra, 0x001C($sp) -/* 00968 80B97508 8FB00018 */ lw $s0, 0x0018($sp) -/* 0096C 80B9750C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00970 80B97510 03E00008 */ jr $ra -/* 00974 80B97514 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97518.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97518.s deleted file mode 100644 index c8696de9f3..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97518.s +++ /dev/null @@ -1,11 +0,0 @@ -glabel func_80B97518 -/* 00978 80B97518 3C0E80B9 */ lui $t6, %hi(func_80B97540) ## $t6 = 80B90000 -/* 0097C 80B9751C 25CE7540 */ addiu $t6, $t6, %lo(func_80B97540) ## $t6 = 80B97540 -/* 00980 80B97520 240F0064 */ addiu $t7, $zero, 0x0064 ## $t7 = 00000064 -/* 00984 80B97524 24180014 */ addiu $t8, $zero, 0x0014 ## $t8 = 00000014 -/* 00988 80B97528 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 0098C 80B9752C AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C -/* 00990 80B97530 A48F01B2 */ sh $t7, 0x01B2($a0) ## 000001B2 -/* 00994 80B97534 A49801B0 */ sh $t8, 0x01B0($a0) ## 000001B0 -/* 00998 80B97538 03E00008 */ jr $ra -/* 0099C 80B9753C A49901B4 */ sh $t9, 0x01B4($a0) ## 000001B4 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97540.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97540.s deleted file mode 100644 index 162a28928f..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97540.s +++ /dev/null @@ -1,67 +0,0 @@ -glabel func_80B97540 -/* 009A0 80B97540 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 009A4 80B97544 AFBF0014 */ sw $ra, 0x0014($sp) -/* 009A8 80B97548 AFA5001C */ sw $a1, 0x001C($sp) -/* 009AC 80B9754C 848E001C */ lh $t6, 0x001C($a0) ## 0000001C -/* 009B0 80B97550 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 009B4 80B97554 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 009B8 80B97558 000E7903 */ sra $t7, $t6, 4 -/* 009BC 80B9755C 31F80003 */ andi $t8, $t7, 0x0003 ## $t8 = 00000000 -/* 009C0 80B97560 5701000B */ bnel $t8, $at, .L80B97590 -/* 009C4 80B97564 84E901B0 */ lh $t1, 0x01B0($a3) ## 000001B0 -/* 009C8 80B97568 0C016C66 */ jal func_8005B198 -/* 009CC 80B9756C AFA40018 */ sw $a0, 0x0018($sp) -/* 009D0 80B97570 8FA70018 */ lw $a3, 0x0018($sp) -/* 009D4 80B97574 90F90002 */ lbu $t9, 0x0002($a3) ## 00000002 -/* 009D8 80B97578 50590005 */ beql $v0, $t9, .L80B97590 -/* 009DC 80B9757C 84E901B0 */ lh $t1, 0x01B0($a3) ## 000001B0 -/* 009E0 80B97580 84E801B2 */ lh $t0, 0x01B2($a3) ## 000001B2 -/* 009E4 80B97584 5D000027 */ bgtzl $t0, .L80B97624 -/* 009E8 80B97588 8FBF0014 */ lw $ra, 0x0014($sp) -/* 009EC 80B9758C 84E901B0 */ lh $t1, 0x01B0($a3) ## 000001B0 -.L80B97590: -/* 009F0 80B97590 24E401C0 */ addiu $a0, $a3, 0x01C0 ## $a0 = 000001C0 -/* 009F4 80B97594 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 009F8 80B97598 252AFFFF */ addiu $t2, $t1, 0xFFFF ## $t2 = FFFFFFFF -/* 009FC 80B9759C A4EA01B0 */ sh $t2, 0x01B0($a3) ## 000001B0 -/* 00A00 80B975A0 AFA70018 */ sw $a3, 0x0018($sp) -/* 00A04 80B975A4 0C01DE5F */ jal Math_ApproxS - -/* 00A08 80B975A8 2406000A */ addiu $a2, $zero, 0x000A ## $a2 = 0000000A -/* 00A0C 80B975AC 8FA70018 */ lw $a3, 0x0018($sp) -/* 00A10 80B975B0 2401000F */ addiu $at, $zero, 0x000F ## $at = 0000000F -/* 00A14 80B975B4 84E301B0 */ lh $v1, 0x01B0($a3) ## 000001B0 -/* 00A18 80B975B8 84EB01BE */ lh $t3, 0x01BE($a3) ## 000001BE -/* 00A1C 80B975BC 84EC01C0 */ lh $t4, 0x01C0($a3) ## 000001C0 -/* 00A20 80B975C0 0003C080 */ sll $t8, $v1, 2 -/* 00A24 80B975C4 0303C023 */ subu $t8, $t8, $v1 -/* 00A28 80B975C8 0018C080 */ sll $t8, $t8, 2 -/* 00A2C 80B975CC 00037080 */ sll $t6, $v1, 2 -/* 00A30 80B975D0 01C37021 */ addu $t6, $t6, $v1 -/* 00A34 80B975D4 0303C021 */ addu $t8, $t8, $v1 -/* 00A38 80B975D8 000E7180 */ sll $t6, $t6, 6 -/* 00A3C 80B975DC 0018C140 */ sll $t8, $t8, 5 -/* 00A40 80B975E0 25CF26C0 */ addiu $t7, $t6, 0x26C0 ## $t7 = 000026C0 -/* 00A44 80B975E4 27191F40 */ addiu $t9, $t8, 0x1F40 ## $t9 = 00001F40 -/* 00A48 80B975E8 016C6821 */ addu $t5, $t3, $t4 -/* 00A4C 80B975EC A4ED01BE */ sh $t5, 0x01BE($a3) ## 000001BE -/* 00A50 80B975F0 A4EF01B6 */ sh $t7, 0x01B6($a3) ## 000001B6 -/* 00A54 80B975F4 1C600005 */ bgtz $v1, .L80B9760C -/* 00A58 80B975F8 A4F901B8 */ sh $t9, 0x01B8($a3) ## 000001B8 -/* 00A5C 80B975FC 0C2E5C6A */ jal func_80B971A8 -/* 00A60 80B97600 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00A64 80B97604 10000007 */ beq $zero, $zero, .L80B97624 -/* 00A68 80B97608 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B9760C: -/* 00A6C 80B9760C 14610004 */ bne $v1, $at, .L80B97620 -/* 00A70 80B97610 00E02025 */ or $a0, $a3, $zero ## $a0 = 00000000 -/* 00A74 80B97614 A4E001B4 */ sh $zero, 0x01B4($a3) ## 000001B4 -/* 00A78 80B97618 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00A7C 80B9761C 24052815 */ addiu $a1, $zero, 0x2815 ## $a1 = 00002815 -.L80B97620: -/* 00A80 80B97620 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B97624: -/* 00A84 80B97624 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00A88 80B97628 03E00008 */ jr $ra -/* 00A8C 80B9762C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97630.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97630.s deleted file mode 100644 index f61e6fbf7e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97630.s +++ /dev/null @@ -1,7 +0,0 @@ -glabel func_80B97630 -/* 00A90 80B97630 3C0E80B9 */ lui $t6, %hi(func_80B97648) ## $t6 = 80B90000 -/* 00A94 80B97634 25CE7648 */ addiu $t6, $t6, %lo(func_80B97648) ## $t6 = 80B97648 -/* 00A98 80B97638 240F0064 */ addiu $t7, $zero, 0x0064 ## $t7 = 00000064 -/* 00A9C 80B9763C AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C -/* 00AA0 80B97640 03E00008 */ jr $ra -/* 00AA4 80B97644 A48F01B2 */ sh $t7, 0x01B2($a0) ## 000001B2 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97648.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97648.s deleted file mode 100644 index 6fb6f8fd72..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97648.s +++ /dev/null @@ -1,21 +0,0 @@ -glabel func_80B97648 -/* 00AA8 80B97648 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00AAC 80B9764C AFBF0014 */ sw $ra, 0x0014($sp) -/* 00AB0 80B97650 AFA5001C */ sw $a1, 0x001C($sp) -/* 00AB4 80B97654 0C016C66 */ jal func_8005B198 -/* 00AB8 80B97658 AFA40018 */ sw $a0, 0x0018($sp) -/* 00ABC 80B9765C 8FA40018 */ lw $a0, 0x0018($sp) -/* 00AC0 80B97660 908E0002 */ lbu $t6, 0x0002($a0) ## 00000002 -/* 00AC4 80B97664 104E0004 */ beq $v0, $t6, .L80B97678 -/* 00AC8 80B97668 00000000 */ nop -/* 00ACC 80B9766C 848F01B2 */ lh $t7, 0x01B2($a0) ## 000001B2 -/* 00AD0 80B97670 5DE00004 */ bgtzl $t7, .L80B97684 -/* 00AD4 80B97674 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B97678: -/* 00AD8 80B97678 0C2E5DA4 */ jal func_80B97690 -/* 00ADC 80B9767C 00000000 */ nop -/* 00AE0 80B97680 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B97684: -/* 00AE4 80B97684 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00AE8 80B97688 03E00008 */ jr $ra -/* 00AEC 80B9768C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97690.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97690.s deleted file mode 100644 index a2b926abf7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97690.s +++ /dev/null @@ -1,7 +0,0 @@ -glabel func_80B97690 -/* 00AF0 80B97690 3C0E80B9 */ lui $t6, %hi(func_80B976A8) ## $t6 = 80B90000 -/* 00AF4 80B97694 25CE76A8 */ addiu $t6, $t6, %lo(func_80B976A8) ## $t6 = 80B976A8 -/* 00AF8 80B97698 240F3FC0 */ addiu $t7, $zero, 0x3FC0 ## $t7 = 00003FC0 -/* 00AFC 80B9769C AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C -/* 00B00 80B976A0 03E00008 */ jr $ra -/* 00B04 80B976A4 A48F01BC */ sh $t7, 0x01BC($a0) ## 000001BC diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B976A8.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B976A8.s deleted file mode 100644 index 9f0382c972..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B976A8.s +++ /dev/null @@ -1,20 +0,0 @@ -glabel func_80B976A8 -/* 00B08 80B976A8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00B0C 80B976AC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00B10 80B976B0 848E01BC */ lh $t6, 0x01BC($a0) ## 000001BC -/* 00B14 80B976B4 25CFFF38 */ addiu $t7, $t6, 0xFF38 ## $t7 = FFFFFF38 -/* 00B18 80B976B8 A48F01BC */ sh $t7, 0x01BC($a0) ## 000001BC -/* 00B1C 80B976BC 0C2E5B60 */ jal func_80B96D80 -/* 00B20 80B976C0 AFA40018 */ sw $a0, 0x0018($sp) -/* 00B24 80B976C4 8FA40018 */ lw $a0, 0x0018($sp) -/* 00B28 80B976C8 849801BC */ lh $t8, 0x01BC($a0) ## 000001BC -/* 00B2C 80B976CC 07030004 */ bgezl $t8, .L80B976E0 -/* 00B30 80B976D0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00B34 80B976D4 0C00B55C */ jal Actor_Kill - -/* 00B38 80B976D8 00000000 */ nop -/* 00B3C 80B976DC 8FBF0014 */ lw $ra, 0x0014($sp) -.L80B976E0: -/* 00B40 80B976E0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00B44 80B976E4 03E00008 */ jr $ra -/* 00B48 80B976E8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B977D0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B977D0.s deleted file mode 100644 index ab20d2551b..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B977D0.s +++ /dev/null @@ -1,250 +0,0 @@ -.rdata -glabel D_80B98008 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B98020 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B98038 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B98050 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B98068 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -.text -glabel func_80B977D0 -/* 00C30 80B977D0 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88 -/* 00C34 80B977D4 AFBF001C */ sw $ra, 0x001C($sp) -/* 00C38 80B977D8 AFB10018 */ sw $s1, 0x0018($sp) -/* 00C3C 80B977DC AFB00014 */ sw $s0, 0x0014($sp) -/* 00C40 80B977E0 AFA5007C */ sw $a1, 0x007C($sp) -/* 00C44 80B977E4 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00C48 80B977E8 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00C4C 80B977EC 3C0680BA */ lui $a2, %hi(D_80B98008) ## $a2 = 80BA0000 -/* 00C50 80B977F0 24C68008 */ addiu $a2, $a2, %lo(D_80B98008) ## $a2 = 80B98008 -/* 00C54 80B977F4 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFD4 -/* 00C58 80B977F8 24070329 */ addiu $a3, $zero, 0x0329 ## $a3 = 00000329 -/* 00C5C 80B977FC 0C031AB1 */ jal Graph_OpenDisps -/* 00C60 80B97800 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00C64 80B97804 8FAF007C */ lw $t7, 0x007C($sp) -/* 00C68 80B97808 0C024F46 */ jal func_80093D18 -/* 00C6C 80B9780C 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 00C70 80B97810 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00C74 80B97814 3C19FB00 */ lui $t9, 0xFB00 ## $t9 = FB000000 -/* 00C78 80B97818 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00C7C 80B9781C 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00C80 80B97820 AE3802C0 */ sw $t8, 0x02C0($s1) ## 000002C0 -/* 00C84 80B97824 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 00C88 80B97828 860D01B6 */ lh $t5, 0x01B6($s0) ## 000001B6 -/* 00C8C 80B9782C 860801BA */ lh $t0, 0x01BA($s0) ## 000001BA -/* 00C90 80B97830 860901B8 */ lh $t1, 0x01B8($s0) ## 000001B8 -/* 00C94 80B97834 000DC183 */ sra $t8, $t5, 6 -/* 00C98 80B97838 00085183 */ sra $t2, $t0, 6 -/* 00C9C 80B9783C 314B00FF */ andi $t3, $t2, 0x00FF ## $t3 = 00000000 -/* 00CA0 80B97840 0018CE00 */ sll $t9, $t8, 24 -/* 00CA4 80B97844 861801BC */ lh $t8, 0x01BC($s0) ## 000001BC -/* 00CA8 80B97848 000B6200 */ sll $t4, $t3, 8 -/* 00CAC 80B9784C 00095983 */ sra $t3, $t1, 6 -/* 00CB0 80B97850 316D00FF */ andi $t5, $t3, 0x00FF ## $t5 = 00000000 -/* 00CB4 80B97854 01994025 */ or $t0, $t4, $t9 ## $t0 = FB000000 -/* 00CB8 80B97858 000D7400 */ sll $t6, $t5, 16 -/* 00CBC 80B9785C 0018C983 */ sra $t9, $t8, 6 -/* 00CC0 80B97860 332900FF */ andi $t1, $t9, 0x00FF ## $t1 = 00000000 -/* 00CC4 80B97864 010E7825 */ or $t7, $t0, $t6 ## $t7 = FB000000 -/* 00CC8 80B97868 01E95025 */ or $t2, $t7, $t1 ## $t2 = FB000000 -/* 00CCC 80B9786C AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004 -/* 00CD0 80B97870 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00CD4 80B97874 3C088011 */ lui $t0, %hi(D_80116280+0x10) -/* 00CD8 80B97878 3C0DDB06 */ lui $t5, 0xDB06 ## $t5 = DB060000 -/* 00CDC 80B9787C 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 00CE0 80B97880 AE2B02C0 */ sw $t3, 0x02C0($s1) ## 000002C0 -/* 00CE4 80B97884 35AD0024 */ ori $t5, $t5, 0x0024 ## $t5 = DB060024 -/* 00CE8 80B97888 25086290 */ addiu $t0, %lo(D_80116280+0x10) -/* 00CEC 80B9788C AC480004 */ sw $t0, 0x0004($v0) ## 00000004 -/* 00CF0 80B97890 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000 -/* 00CF4 80B97894 860E001C */ lh $t6, 0x001C($s0) ## 0000001C -/* 00CF8 80B97898 31D80001 */ andi $t8, $t6, 0x0001 ## $t8 = 00000000 -/* 00CFC 80B9789C 5701001B */ bnel $t8, $at, .L80B9790C -/* 00D00 80B978A0 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -/* 00D04 80B978A4 8E02011C */ lw $v0, 0x011C($s0) ## 0000011C -/* 00D08 80B978A8 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00D0C 80B978AC 44814000 */ mtc1 $at, $f8 ## $f8 = 60.00 -/* 00D10 80B978B0 C4440024 */ lwc1 $f4, 0x0024($v0) ## 00000024 -/* 00D14 80B978B4 27A40068 */ addiu $a0, $sp, 0x0068 ## $a0 = FFFFFFF0 -/* 00D18 80B978B8 26050024 */ addiu $a1, $s0, 0x0024 ## $a1 = 00000024 -/* 00D1C 80B978BC E6040024 */ swc1 $f4, 0x0024($s0) ## 00000024 -/* 00D20 80B978C0 C4460028 */ lwc1 $f6, 0x0028($v0) ## 00000028 -/* 00D24 80B978C4 46083280 */ add.s $f10, $f6, $f8 -/* 00D28 80B978C8 E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028 -/* 00D2C 80B978CC C450002C */ lwc1 $f16, 0x002C($v0) ## 0000002C -/* 00D30 80B978D0 0C01DF90 */ jal Math_Vec3f_Copy - ## Vec3f_Copy -/* 00D34 80B978D4 E610002C */ swc1 $f16, 0x002C($s0) ## 0000002C -/* 00D38 80B978D8 C7AC0068 */ lwc1 $f12, 0x0068($sp) -/* 00D3C 80B978DC C7AE006C */ lwc1 $f14, 0x006C($sp) -/* 00D40 80B978E0 8FA60070 */ lw $a2, 0x0070($sp) -/* 00D44 80B978E4 0C0345A5 */ jal func_800D1694 -/* 00D48 80B978E8 260700B4 */ addiu $a3, $s0, 0x00B4 ## $a3 = 000000B4 -/* 00D4C 80B978EC C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 00D50 80B978F0 C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 00D54 80B978F4 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 00D58 80B978F8 0C0342A3 */ jal Matrix_Scale -/* 00D5C 80B978FC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00D60 80B97900 1000000C */ beq $zero, $zero, .L80B97934 -/* 00D64 80B97904 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00D68 80B97908 C6120024 */ lwc1 $f18, 0x0024($s0) ## 00000024 -.L80B9790C: -/* 00D6C 80B9790C E7B20068 */ swc1 $f18, 0x0068($sp) -/* 00D70 80B97910 C6060054 */ lwc1 $f6, 0x0054($s0) ## 00000054 -/* 00D74 80B97914 C60400BC */ lwc1 $f4, 0x00BC($s0) ## 000000BC -/* 00D78 80B97918 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028 -/* 00D7C 80B9791C 46062202 */ mul.s $f8, $f4, $f6 -/* 00D80 80B97920 46085400 */ add.s $f16, $f10, $f8 -/* 00D84 80B97924 E7B0006C */ swc1 $f16, 0x006C($sp) -/* 00D88 80B97928 C612002C */ lwc1 $f18, 0x002C($s0) ## 0000002C -/* 00D8C 80B9792C E7B20070 */ swc1 $f18, 0x0070($sp) -/* 00D90 80B97930 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -.L80B97934: -/* 00D94 80B97934 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000 -/* 00D98 80B97938 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003 -/* 00D9C 80B9793C 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008 -/* 00DA0 80B97940 AE2C02C0 */ sw $t4, 0x02C0($s1) ## 000002C0 -/* 00DA4 80B97944 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 00DA8 80B97948 8FAF007C */ lw $t7, 0x007C($sp) -/* 00DAC 80B9794C 3C0580BA */ lui $a1, %hi(D_80B98020) ## $a1 = 80BA0000 -/* 00DB0 80B97950 24A58020 */ addiu $a1, $a1, %lo(D_80B98020) ## $a1 = 80B98020 -/* 00DB4 80B97954 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 00DB8 80B97958 24060349 */ addiu $a2, $zero, 0x0349 ## $a2 = 00000349 -/* 00DBC 80B9795C 0C0346A2 */ jal Matrix_NewMtx -/* 00DC0 80B97960 AFA20040 */ sw $v0, 0x0040($sp) -/* 00DC4 80B97964 8FA30040 */ lw $v1, 0x0040($sp) -/* 00DC8 80B97968 3C0ADB06 */ lui $t2, 0xDB06 ## $t2 = DB060000 -/* 00DCC 80B9796C 354A0020 */ ori $t2, $t2, 0x0020 ## $t2 = DB060020 -/* 00DD0 80B97970 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00DD4 80B97974 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00DD8 80B97978 3C0480B9 */ lui $a0, %hi(D_80B97F5C) ## $a0 = 80B90000 -/* 00DDC 80B9797C 3C198016 */ lui $t9, %hi(gSegments) -/* 00DE0 80B97980 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008 -/* 00DE4 80B97984 AE2902C0 */ sw $t1, 0x02C0($s1) ## 000002C0 -/* 00DE8 80B97988 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000 -/* 00DEC 80B9798C 860B01B4 */ lh $t3, 0x01B4($s0) ## 000001B4 -/* 00DF0 80B97990 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 00DF4 80B97994 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 00DF8 80B97998 000B6880 */ sll $t5, $t3, 2 -/* 00DFC 80B9799C 008D2021 */ addu $a0, $a0, $t5 -/* 00E00 80B979A0 8C847F5C */ lw $a0, %lo(D_80B97F5C)($a0) -/* 00E04 80B979A4 3C0D0600 */ lui $t5, 0x0600 ## $t5 = 06000000 -/* 00E08 80B979A8 25AD0260 */ addiu $t5, $t5, 0x0260 ## $t5 = 06000260 -/* 00E0C 80B979AC 00047100 */ sll $t6, $a0, 4 -/* 00E10 80B979B0 000EC702 */ srl $t8, $t6, 28 -/* 00E14 80B979B4 00186080 */ sll $t4, $t8, 2 -/* 00E18 80B979B8 032CC821 */ addu $t9, $t9, $t4 -/* 00E1C 80B979BC 8F396FA8 */ lw $t9, %lo(gSegments)($t9) -/* 00E20 80B979C0 00814024 */ and $t0, $a0, $at -/* 00E24 80B979C4 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 00E28 80B979C8 01197821 */ addu $t7, $t0, $t9 -/* 00E2C 80B979CC 01E14821 */ addu $t1, $t7, $at -/* 00E30 80B979D0 AC490004 */ sw $t1, 0x0004($v0) ## 00000004 -/* 00E34 80B979D4 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00E38 80B979D8 3C0BDE00 */ lui $t3, 0xDE00 ## $t3 = DE000000 -/* 00E3C 80B979DC 27A70060 */ addiu $a3, $sp, 0x0060 ## $a3 = FFFFFFE8 -/* 00E40 80B979E0 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00E44 80B979E4 AE2A02C0 */ sw $t2, 0x02C0($s1) ## 000002C0 -/* 00E48 80B979E8 AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004 -/* 00E4C 80B979EC AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000 -/* 00E50 80B979F0 860E00B4 */ lh $t6, 0x00B4($s0) ## 000000B4 -/* 00E54 80B979F4 8FA60070 */ lw $a2, 0x0070($sp) -/* 00E58 80B979F8 C7AE006C */ lwc1 $f14, 0x006C($sp) -/* 00E5C 80B979FC A7AE0060 */ sh $t6, 0x0060($sp) -/* 00E60 80B97A00 861800B6 */ lh $t8, 0x00B6($s0) ## 000000B6 -/* 00E64 80B97A04 C7AC0068 */ lwc1 $f12, 0x0068($sp) -/* 00E68 80B97A08 A7B80062 */ sh $t8, 0x0062($sp) -/* 00E6C 80B97A0C 860801BE */ lh $t0, 0x01BE($s0) ## 000001BE -/* 00E70 80B97A10 860C00B8 */ lh $t4, 0x00B8($s0) ## 000000B8 -/* 00E74 80B97A14 0188C821 */ addu $t9, $t4, $t0 -/* 00E78 80B97A18 0C0345A5 */ jal func_800D1694 -/* 00E7C 80B97A1C A7B90064 */ sh $t9, 0x0064($sp) -/* 00E80 80B97A20 C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 00E84 80B97A24 C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 00E88 80B97A28 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 00E8C 80B97A2C 0C0342A3 */ jal Matrix_Scale -/* 00E90 80B97A30 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00E94 80B97A34 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00E98 80B97A38 3C09DA38 */ lui $t1, 0xDA38 ## $t1 = DA380000 -/* 00E9C 80B97A3C 35290003 */ ori $t1, $t1, 0x0003 ## $t1 = DA380003 -/* 00EA0 80B97A40 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008 -/* 00EA4 80B97A44 AE2F02C0 */ sw $t7, 0x02C0($s1) ## 000002C0 -/* 00EA8 80B97A48 AC490000 */ sw $t1, 0x0000($v0) ## 00000000 -/* 00EAC 80B97A4C 8FAA007C */ lw $t2, 0x007C($sp) -/* 00EB0 80B97A50 3C0580BA */ lui $a1, %hi(D_80B98038) ## $a1 = 80BA0000 -/* 00EB4 80B97A54 24A58038 */ addiu $a1, $a1, %lo(D_80B98038) ## $a1 = 80B98038 -/* 00EB8 80B97A58 8D440000 */ lw $a0, 0x0000($t2) ## 00000000 -/* 00EBC 80B97A5C 2406035B */ addiu $a2, $zero, 0x035B ## $a2 = 0000035B -/* 00EC0 80B97A60 0C0346A2 */ jal Matrix_NewMtx -/* 00EC4 80B97A64 AFA20034 */ sw $v0, 0x0034($sp) -/* 00EC8 80B97A68 8FA30034 */ lw $v1, 0x0034($sp) -/* 00ECC 80B97A6C 3C0E0600 */ lui $t6, 0x0600 ## $t6 = 06000000 -/* 00ED0 80B97A70 25CE0398 */ addiu $t6, $t6, 0x0398 ## $t6 = 06000398 -/* 00ED4 80B97A74 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00ED8 80B97A78 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00EDC 80B97A7C 3C0DDE00 */ lui $t5, 0xDE00 ## $t5 = DE000000 -/* 00EE0 80B97A80 27A70060 */ addiu $a3, $sp, 0x0060 ## $a3 = FFFFFFE8 -/* 00EE4 80B97A84 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 00EE8 80B97A88 AE2B02C0 */ sw $t3, 0x02C0($s1) ## 000002C0 -/* 00EEC 80B97A8C AC4E0004 */ sw $t6, 0x0004($v0) ## 00000004 -/* 00EF0 80B97A90 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000 -/* 00EF4 80B97A94 860C01BE */ lh $t4, 0x01BE($s0) ## 000001BE -/* 00EF8 80B97A98 861800B8 */ lh $t8, 0x00B8($s0) ## 000000B8 -/* 00EFC 80B97A9C 8FA60070 */ lw $a2, 0x0070($sp) -/* 00F00 80B97AA0 C7AE006C */ lwc1 $f14, 0x006C($sp) -/* 00F04 80B97AA4 030C4023 */ subu $t0, $t8, $t4 -/* 00F08 80B97AA8 A7A80064 */ sh $t0, 0x0064($sp) -/* 00F0C 80B97AAC 0C0345A5 */ jal func_800D1694 -/* 00F10 80B97AB0 C7AC0068 */ lwc1 $f12, 0x0068($sp) -/* 00F14 80B97AB4 C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 00F18 80B97AB8 C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 00F1C 80B97ABC 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 00F20 80B97AC0 0C0342A3 */ jal Matrix_Scale -/* 00F24 80B97AC4 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 00F28 80B97AC8 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00F2C 80B97ACC 3C0FDA38 */ lui $t7, 0xDA38 ## $t7 = DA380000 -/* 00F30 80B97AD0 35EF0003 */ ori $t7, $t7, 0x0003 ## $t7 = DA380003 -/* 00F34 80B97AD4 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 00F38 80B97AD8 AE3902C0 */ sw $t9, 0x02C0($s1) ## 000002C0 -/* 00F3C 80B97ADC AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 00F40 80B97AE0 8FA9007C */ lw $t1, 0x007C($sp) -/* 00F44 80B97AE4 3C0580BA */ lui $a1, %hi(D_80B98050) ## $a1 = 80BA0000 -/* 00F48 80B97AE8 24A58050 */ addiu $a1, $a1, %lo(D_80B98050) ## $a1 = 80B98050 -/* 00F4C 80B97AEC 24060369 */ addiu $a2, $zero, 0x0369 ## $a2 = 00000369 -/* 00F50 80B97AF0 00408025 */ or $s0, $v0, $zero ## $s0 = 00000000 -/* 00F54 80B97AF4 0C0346A2 */ jal Matrix_NewMtx -/* 00F58 80B97AF8 8D240000 */ lw $a0, 0x0000($t1) ## 00000000 -/* 00F5C 80B97AFC AE020004 */ sw $v0, 0x0004($s0) ## 00000004 -/* 00F60 80B97B00 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00F64 80B97B04 3C0D0600 */ lui $t5, 0x0600 ## $t5 = 06000000 -/* 00F68 80B97B08 25AD0408 */ addiu $t5, $t5, 0x0408 ## $t5 = 06000408 -/* 00F6C 80B97B0C 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00F70 80B97B10 AE2A02C0 */ sw $t2, 0x02C0($s1) ## 000002C0 -/* 00F74 80B97B14 3C0BDE00 */ lui $t3, 0xDE00 ## $t3 = DE000000 -/* 00F78 80B97B18 AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000 -/* 00F7C 80B97B1C AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004 -/* 00F80 80B97B20 8FAE007C */ lw $t6, 0x007C($sp) -/* 00F84 80B97B24 3C0680BA */ lui $a2, %hi(D_80B98068) ## $a2 = 80BA0000 -/* 00F88 80B97B28 24C68068 */ addiu $a2, $a2, %lo(D_80B98068) ## $a2 = 80B98068 -/* 00F8C 80B97B2C 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFD4 -/* 00F90 80B97B30 2407036E */ addiu $a3, $zero, 0x036E ## $a3 = 0000036E -/* 00F94 80B97B34 0C031AD5 */ jal Graph_CloseDisps -/* 00F98 80B97B38 8DC50000 */ lw $a1, 0x0000($t6) ## 00000000 -/* 00F9C 80B97B3C 8FBF001C */ lw $ra, 0x001C($sp) -/* 00FA0 80B97B40 8FB00014 */ lw $s0, 0x0014($sp) -/* 00FA4 80B97B44 8FB10018 */ lw $s1, 0x0018($sp) -/* 00FA8 80B97B48 03E00008 */ jr $ra -/* 00FAC 80B97B4C 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97B50.s b/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97B50.s deleted file mode 100644 index 2ea8366104..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97B50.s +++ /dev/null @@ -1,217 +0,0 @@ -.rdata -glabel D_80B98080 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B98098 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B980B0 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B980C8 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -glabel D_80B980E0 - .asciz "../z_obj_lightswitch.c" - .balign 4 - -.text -glabel func_80B97B50 -/* 00FB0 80B97B50 27BDFF88 */ addiu $sp, $sp, 0xFF88 ## $sp = FFFFFF88 -/* 00FB4 80B97B54 AFBF001C */ sw $ra, 0x001C($sp) -/* 00FB8 80B97B58 AFB10018 */ sw $s1, 0x0018($sp) -/* 00FBC 80B97B5C AFB00014 */ sw $s0, 0x0014($sp) -/* 00FC0 80B97B60 AFA5007C */ sw $a1, 0x007C($sp) -/* 00FC4 80B97B64 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00FC8 80B97B68 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00FCC 80B97B6C 3C0680BA */ lui $a2, %hi(D_80B98080) ## $a2 = 80BA0000 -/* 00FD0 80B97B70 24C68080 */ addiu $a2, $a2, %lo(D_80B98080) ## $a2 = 80B98080 -/* 00FD4 80B97B74 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFD4 -/* 00FD8 80B97B78 2407037A */ addiu $a3, $zero, 0x037A ## $a3 = 0000037A -/* 00FDC 80B97B7C 0C031AB1 */ jal Graph_OpenDisps -/* 00FE0 80B97B80 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 00FE4 80B97B84 8FAF007C */ lw $t7, 0x007C($sp) -/* 00FE8 80B97B88 0C024F61 */ jal func_80093D84 -/* 00FEC 80B97B8C 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 00FF0 80B97B90 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 00FF4 80B97B94 3C19FB00 */ lui $t9, 0xFB00 ## $t9 = FB000000 -/* 00FF8 80B97B98 3C0580BA */ lui $a1, %hi(D_80B98098) ## $a1 = 80BA0000 -/* 00FFC 80B97B9C 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 01000 80B97BA0 AE3802D0 */ sw $t8, 0x02D0($s1) ## 000002D0 -/* 01004 80B97BA4 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 01008 80B97BA8 860D01B6 */ lh $t5, 0x01B6($s0) ## 000001B6 -/* 0100C 80B97BAC 860801BA */ lh $t0, 0x01BA($s0) ## 000001BA -/* 01010 80B97BB0 860901B8 */ lh $t1, 0x01B8($s0) ## 000001B8 -/* 01014 80B97BB4 000DC183 */ sra $t8, $t5, 6 -/* 01018 80B97BB8 00085183 */ sra $t2, $t0, 6 -/* 0101C 80B97BBC 314B00FF */ andi $t3, $t2, 0x00FF ## $t3 = 00000000 -/* 01020 80B97BC0 0018CE00 */ sll $t9, $t8, 24 -/* 01024 80B97BC4 861801BC */ lh $t8, 0x01BC($s0) ## 000001BC -/* 01028 80B97BC8 000B6200 */ sll $t4, $t3, 8 -/* 0102C 80B97BCC 00095983 */ sra $t3, $t1, 6 -/* 01030 80B97BD0 316D00FF */ andi $t5, $t3, 0x00FF ## $t5 = 00000000 -/* 01034 80B97BD4 01994025 */ or $t0, $t4, $t9 ## $t0 = FB000000 -/* 01038 80B97BD8 000D7400 */ sll $t6, $t5, 16 -/* 0103C 80B97BDC 0018C983 */ sra $t9, $t8, 6 -/* 01040 80B97BE0 332900FF */ andi $t1, $t9, 0x00FF ## $t1 = 00000000 -/* 01044 80B97BE4 010E7825 */ or $t7, $t0, $t6 ## $t7 = FB000000 -/* 01048 80B97BE8 01E95025 */ or $t2, $t7, $t1 ## $t2 = FB000000 -/* 0104C 80B97BEC AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004 -/* 01050 80B97BF0 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 01054 80B97BF4 3C088011 */ lui $t0, %hi(D_80116280) -/* 01058 80B97BF8 3C0DDB06 */ lui $t5, 0xDB06 ## $t5 = DB060000 -/* 0105C 80B97BFC 244B0008 */ addiu $t3, $v0, 0x0008 ## $t3 = 00000008 -/* 01060 80B97C00 AE2B02D0 */ sw $t3, 0x02D0($s1) ## 000002D0 -/* 01064 80B97C04 35AD0024 */ ori $t5, $t5, 0x0024 ## $t5 = DB060024 -/* 01068 80B97C08 25086280 */ addiu $t0, %lo(D_80116280) -/* 0106C 80B97C0C AC480004 */ sw $t0, 0x0004($v0) ## 00000004 -/* 01070 80B97C10 AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000 -/* 01074 80B97C14 C6040024 */ lwc1 $f4, 0x0024($s0) ## 00000024 -/* 01078 80B97C18 3C18DA38 */ lui $t8, 0xDA38 ## $t8 = DA380000 -/* 0107C 80B97C1C 37180003 */ ori $t8, $t8, 0x0003 ## $t8 = DA380003 -/* 01080 80B97C20 E7A40068 */ swc1 $f4, 0x0068($sp) -/* 01084 80B97C24 C6080054 */ lwc1 $f8, 0x0054($s0) ## 00000054 -/* 01088 80B97C28 C60600BC */ lwc1 $f6, 0x00BC($s0) ## 000000BC -/* 0108C 80B97C2C C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028 -/* 01090 80B97C30 24A58098 */ addiu $a1, $a1, %lo(D_80B98098) ## $a1 = 80B98098 -/* 01094 80B97C34 46083282 */ mul.s $f10, $f6, $f8 -/* 01098 80B97C38 24060390 */ addiu $a2, $zero, 0x0390 ## $a2 = 00000390 -/* 0109C 80B97C3C 460A8480 */ add.s $f18, $f16, $f10 -/* 010A0 80B97C40 E7B2006C */ swc1 $f18, 0x006C($sp) -/* 010A4 80B97C44 C604002C */ lwc1 $f4, 0x002C($s0) ## 0000002C -/* 010A8 80B97C48 E7A40070 */ swc1 $f4, 0x0070($sp) -/* 010AC 80B97C4C 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 010B0 80B97C50 244E0008 */ addiu $t6, $v0, 0x0008 ## $t6 = 00000008 -/* 010B4 80B97C54 AE2E02D0 */ sw $t6, 0x02D0($s1) ## 000002D0 -/* 010B8 80B97C58 AC580000 */ sw $t8, 0x0000($v0) ## 00000000 -/* 010BC 80B97C5C 8FAC007C */ lw $t4, 0x007C($sp) -/* 010C0 80B97C60 8D840000 */ lw $a0, 0x0000($t4) ## 00000000 -/* 010C4 80B97C64 0C0346A2 */ jal Matrix_NewMtx -/* 010C8 80B97C68 AFA20040 */ sw $v0, 0x0040($sp) -/* 010CC 80B97C6C 8FA30040 */ lw $v1, 0x0040($sp) -/* 010D0 80B97C70 3C0FDB06 */ lui $t7, 0xDB06 ## $t7 = DB060000 -/* 010D4 80B97C74 35EF0020 */ ori $t7, $t7, 0x0020 ## $t7 = DB060020 -/* 010D8 80B97C78 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 010DC 80B97C7C 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 010E0 80B97C80 3C0480B9 */ lui $a0, %hi(D_80B97F5C) ## $a0 = 80B90000 -/* 010E4 80B97C84 3C188016 */ lui $t8, %hi(gSegments) -/* 010E8 80B97C88 24590008 */ addiu $t9, $v0, 0x0008 ## $t9 = 00000008 -/* 010EC 80B97C8C AE3902D0 */ sw $t9, 0x02D0($s1) ## 000002D0 -/* 010F0 80B97C90 AC4F0000 */ sw $t7, 0x0000($v0) ## 00000000 -/* 010F4 80B97C94 860901B4 */ lh $t1, 0x01B4($s0) ## 000001B4 -/* 010F8 80B97C98 3C0100FF */ lui $at, 0x00FF ## $at = 00FF0000 -/* 010FC 80B97C9C 3421FFFF */ ori $at, $at, 0xFFFF ## $at = 00FFFFFF -/* 01100 80B97CA0 00095080 */ sll $t2, $t1, 2 -/* 01104 80B97CA4 008A2021 */ addu $a0, $a0, $t2 -/* 01108 80B97CA8 8C847F5C */ lw $a0, %lo(D_80B97F5C)($a0) -/* 0110C 80B97CAC 3C0A0600 */ lui $t2, 0x0600 ## $t2 = 06000000 -/* 01110 80B97CB0 254A0260 */ addiu $t2, $t2, 0x0260 ## $t2 = 06000260 -/* 01114 80B97CB4 00046900 */ sll $t5, $a0, 4 -/* 01118 80B97CB8 000D4702 */ srl $t0, $t5, 28 -/* 0111C 80B97CBC 00087080 */ sll $t6, $t0, 2 -/* 01120 80B97CC0 030EC021 */ addu $t8, $t8, $t6 -/* 01124 80B97CC4 8F186FA8 */ lw $t8, %lo(gSegments)($t8) -/* 01128 80B97CC8 00815824 */ and $t3, $a0, $at -/* 0112C 80B97CCC 3C018000 */ lui $at, 0x8000 ## $at = 80000000 -/* 01130 80B97CD0 01786021 */ addu $t4, $t3, $t8 -/* 01134 80B97CD4 0181C821 */ addu $t9, $t4, $at -/* 01138 80B97CD8 AC590004 */ sw $t9, 0x0004($v0) ## 00000004 -/* 0113C 80B97CDC 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 01140 80B97CE0 3C09DE00 */ lui $t1, 0xDE00 ## $t1 = DE000000 -/* 01144 80B97CE4 27A70060 */ addiu $a3, $sp, 0x0060 ## $a3 = FFFFFFE8 -/* 01148 80B97CE8 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008 -/* 0114C 80B97CEC AE2F02D0 */ sw $t7, 0x02D0($s1) ## 000002D0 -/* 01150 80B97CF0 AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004 -/* 01154 80B97CF4 AC490000 */ sw $t1, 0x0000($v0) ## 00000000 -/* 01158 80B97CF8 860D00B4 */ lh $t5, 0x00B4($s0) ## 000000B4 -/* 0115C 80B97CFC 8FA60070 */ lw $a2, 0x0070($sp) -/* 01160 80B97D00 C7AE006C */ lwc1 $f14, 0x006C($sp) -/* 01164 80B97D04 A7AD0060 */ sh $t5, 0x0060($sp) -/* 01168 80B97D08 860800B6 */ lh $t0, 0x00B6($s0) ## 000000B6 -/* 0116C 80B97D0C C7AC0068 */ lwc1 $f12, 0x0068($sp) -/* 01170 80B97D10 A7A80062 */ sh $t0, 0x0062($sp) -/* 01174 80B97D14 860B01BE */ lh $t3, 0x01BE($s0) ## 000001BE -/* 01178 80B97D18 860E00B8 */ lh $t6, 0x00B8($s0) ## 000000B8 -/* 0117C 80B97D1C 01CBC021 */ addu $t8, $t6, $t3 -/* 01180 80B97D20 0C0345A5 */ jal func_800D1694 -/* 01184 80B97D24 A7B80064 */ sh $t8, 0x0064($sp) -/* 01188 80B97D28 C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 0118C 80B97D2C C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 01190 80B97D30 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 01194 80B97D34 0C0342A3 */ jal Matrix_Scale -/* 01198 80B97D38 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 0119C 80B97D3C 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 011A0 80B97D40 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000 -/* 011A4 80B97D44 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003 -/* 011A8 80B97D48 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008 -/* 011AC 80B97D4C AE2C02D0 */ sw $t4, 0x02D0($s1) ## 000002D0 -/* 011B0 80B97D50 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 011B4 80B97D54 8FAF007C */ lw $t7, 0x007C($sp) -/* 011B8 80B97D58 3C0580BA */ lui $a1, %hi(D_80B980B0) ## $a1 = 80BA0000 -/* 011BC 80B97D5C 24A580B0 */ addiu $a1, $a1, %lo(D_80B980B0) ## $a1 = 80B980B0 -/* 011C0 80B97D60 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 011C4 80B97D64 240603A2 */ addiu $a2, $zero, 0x03A2 ## $a2 = 000003A2 -/* 011C8 80B97D68 0C0346A2 */ jal Matrix_NewMtx -/* 011CC 80B97D6C AFA20034 */ sw $v0, 0x0034($sp) -/* 011D0 80B97D70 8FA30034 */ lw $v1, 0x0034($sp) -/* 011D4 80B97D74 3C0D0600 */ lui $t5, 0x0600 ## $t5 = 06000000 -/* 011D8 80B97D78 25AD0398 */ addiu $t5, $t5, 0x0398 ## $t5 = 06000398 -/* 011DC 80B97D7C AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 011E0 80B97D80 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 011E4 80B97D84 3C0ADE00 */ lui $t2, 0xDE00 ## $t2 = DE000000 -/* 011E8 80B97D88 27A70060 */ addiu $a3, $sp, 0x0060 ## $a3 = FFFFFFE8 -/* 011EC 80B97D8C 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008 -/* 011F0 80B97D90 AE2902D0 */ sw $t1, 0x02D0($s1) ## 000002D0 -/* 011F4 80B97D94 AC4D0004 */ sw $t5, 0x0004($v0) ## 00000004 -/* 011F8 80B97D98 AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000 -/* 011FC 80B97D9C 860E01BE */ lh $t6, 0x01BE($s0) ## 000001BE -/* 01200 80B97DA0 860800B8 */ lh $t0, 0x00B8($s0) ## 000000B8 -/* 01204 80B97DA4 8FA60070 */ lw $a2, 0x0070($sp) -/* 01208 80B97DA8 C7AE006C */ lwc1 $f14, 0x006C($sp) -/* 0120C 80B97DAC 010E5823 */ subu $t3, $t0, $t6 -/* 01210 80B97DB0 A7AB0064 */ sh $t3, 0x0064($sp) -/* 01214 80B97DB4 0C0345A5 */ jal func_800D1694 -/* 01218 80B97DB8 C7AC0068 */ lwc1 $f12, 0x0068($sp) -/* 0121C 80B97DBC C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 01220 80B97DC0 C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 01224 80B97DC4 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 01228 80B97DC8 0C0342A3 */ jal Matrix_Scale -/* 0122C 80B97DCC 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 01230 80B97DD0 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 01234 80B97DD4 3C0CDA38 */ lui $t4, 0xDA38 ## $t4 = DA380000 -/* 01238 80B97DD8 358C0003 */ ori $t4, $t4, 0x0003 ## $t4 = DA380003 -/* 0123C 80B97DDC 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 01240 80B97DE0 AE3802D0 */ sw $t8, 0x02D0($s1) ## 000002D0 -/* 01244 80B97DE4 AC4C0000 */ sw $t4, 0x0000($v0) ## 00000000 -/* 01248 80B97DE8 8FB9007C */ lw $t9, 0x007C($sp) -/* 0124C 80B97DEC 3C0580BA */ lui $a1, %hi(D_80B980C8) ## $a1 = 80BA0000 -/* 01250 80B97DF0 24A580C8 */ addiu $a1, $a1, %lo(D_80B980C8) ## $a1 = 80B980C8 -/* 01254 80B97DF4 240603B0 */ addiu $a2, $zero, 0x03B0 ## $a2 = 000003B0 -/* 01258 80B97DF8 00408025 */ or $s0, $v0, $zero ## $s0 = 00000000 -/* 0125C 80B97DFC 0C0346A2 */ jal Matrix_NewMtx -/* 01260 80B97E00 8F240000 */ lw $a0, 0x0000($t9) ## 00000000 -/* 01264 80B97E04 AE020004 */ sw $v0, 0x0004($s0) ## 00000004 -/* 01268 80B97E08 8E2202D0 */ lw $v0, 0x02D0($s1) ## 000002D0 -/* 0126C 80B97E0C 3C0A0600 */ lui $t2, 0x0600 ## $t2 = 06000000 -/* 01270 80B97E10 254A0408 */ addiu $t2, $t2, 0x0408 ## $t2 = 06000408 -/* 01274 80B97E14 244F0008 */ addiu $t7, $v0, 0x0008 ## $t7 = 00000008 -/* 01278 80B97E18 AE2F02D0 */ sw $t7, 0x02D0($s1) ## 000002D0 -/* 0127C 80B97E1C 3C09DE00 */ lui $t1, 0xDE00 ## $t1 = DE000000 -/* 01280 80B97E20 AC490000 */ sw $t1, 0x0000($v0) ## 00000000 -/* 01284 80B97E24 AC4A0004 */ sw $t2, 0x0004($v0) ## 00000004 -/* 01288 80B97E28 8FAD007C */ lw $t5, 0x007C($sp) -/* 0128C 80B97E2C 3C0680BA */ lui $a2, %hi(D_80B980E0) ## $a2 = 80BA0000 -/* 01290 80B97E30 24C680E0 */ addiu $a2, $a2, %lo(D_80B980E0) ## $a2 = 80B980E0 -/* 01294 80B97E34 27A4004C */ addiu $a0, $sp, 0x004C ## $a0 = FFFFFFD4 -/* 01298 80B97E38 240703B5 */ addiu $a3, $zero, 0x03B5 ## $a3 = 000003B5 -/* 0129C 80B97E3C 0C031AD5 */ jal Graph_CloseDisps -/* 012A0 80B97E40 8DA50000 */ lw $a1, 0x0000($t5) ## 00000000 -/* 012A4 80B97E44 8FBF001C */ lw $ra, 0x001C($sp) -/* 012A8 80B97E48 8FB00014 */ lw $s0, 0x0014($sp) -/* 012AC 80B97E4C 8FB10018 */ lw $s1, 0x0018($sp) -/* 012B0 80B97E50 03E00008 */ jr $ra -/* 012B4 80B97E54 27BD0078 */ addiu $sp, $sp, 0x0078 ## $sp = 00000000 diff --git a/data/overlays/actors/z_obj_lightswitch.data.s b/data/overlays/actors/z_obj_lightswitch.data.s deleted file mode 100644 index ad18762e1e..0000000000 --- a/data/overlays/actors/z_obj_lightswitch.data.s +++ /dev/null @@ -1,33 +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_Lightswitch_InitVars - .word 0x01500000, 0x00000010, 0x012A0000, 0x000001C4 -.word ObjLightswitch_Init -.word ObjLightswitch_Destroy -.word ObjLightswitch_Update -.word ObjLightswitch_Draw -glabel D_80B97F20 - .word 0x00000000, 0x00000000, 0x00000000, 0x00200000, 0x00000000, 0x00010100, 0x00000000, 0x00000000, 0x00130064 -glabel D_80B97F44 - .word 0x0A000939, 0x20000000, 0x00000001 -.word D_80B97F20 -glabel D_80B97F54 - .word 0x0000000C, 0x003CFF00 -glabel D_80B97F5C - .word 0x06000C20, 0x06000420, 0x06001420 -glabel D_80B97F68 - .word 0xC4D56000, 0x4452C000, 0xC3340000 -glabel D_80B97F74 - .word 0x00000000, 0x00000000, 0x00000000 -glabel D_80B97F80 - .word 0xC8500064, 0xB0F403E8, 0xB0F801F4, 0x30FC03E8 - diff --git a/data/overlays/actors/z_obj_lightswitch.reloc.s b/data/overlays/actors/z_obj_lightswitch.reloc.s deleted file mode 100644 index 12e9744480..0000000000 --- a/data/overlays/actors/z_obj_lightswitch.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_80B98100 - .incbin "baserom/ovl_Obj_Lightswitch", 0x1560, 0x00000170 diff --git a/include/functions.h b/include/functions.h index 6bf20647dc..de9f438e28 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1052,6 +1052,7 @@ Vec3f* OLib_Vec3fDiffRad(Vec3f* dest, Vec3f* a, Vec3f* b); s16 func_800800F8(GlobalContext* globalCtx, s16 arg1, s16 arg2, Actor* actor, s16 arg4); void func_800803F0(GlobalContext* globalCtx, s16 camId); // ? func_80080480(?); +UNK_TYPE func_800806BC(GlobalContext* globalCtx, Actor* actor, UNK_TYPE); void func_80080788(UNK_TYPE, UNK_TYPE); void Map_SavePlayerInitialInfo(GlobalContext* globalCtx); void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor); diff --git a/spec b/spec index 656656ae1b..bcfa674459 100644 --- a/spec +++ b/spec @@ -3560,8 +3560,7 @@ endseg beginseg name "ovl_Obj_Lightswitch" include "build/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.o" - include "build/data/overlays/actors/z_obj_lightswitch.data.o" - include "build/data/overlays/actors/z_obj_lightswitch.reloc.o" + include "build/src/overlays/actors/ovl_Obj_Lightswitch/ovl_Obj_Lightswitch_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index a44f8bdc30..a25f295a15 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -5,17 +5,43 @@ */ #include "z_obj_lightswitch.h" +#include #define FLAGS 0x00000010 #define THIS ((ObjLightswitch*)thisx) +typedef enum { + /* 0x00 */ FACE_EYES_CLOSED, + /* 0x01 */ FACE_EYES_OPEN, + /* 0x02 */ FACE_EYES_OPEN_SMILING +} FaceTextureIndex; + void ObjLightswitch_Init(Actor* thisx, GlobalContext* globalCtx); void ObjLightswitch_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjLightswitch_Update(Actor* thisx, GlobalContext* globalCtx); void ObjLightswitch_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void ObjLightswitch_SetupOff(ObjLightswitch* this); +void ObjLightswitch_Off(ObjLightswitch* this, GlobalContext* globalCtx); +void ObjLightswitch_SetupTurnOn(ObjLightswitch* this); +void ObjLightswitch_TurnOn(ObjLightswitch* this, GlobalContext* globalCtx); +void ObjLightswitch_SetupOn(ObjLightswitch* this); +void ObjLightswitch_On(ObjLightswitch* this, GlobalContext* globalCtx); +void ObjLightswitch_SetupTurnOff(ObjLightswitch* this); +void ObjLightswitch_TurnOff(ObjLightswitch* this, GlobalContext* globalCtx); +void ObjLightswitch_SetupDisappearDelay(ObjLightswitch* this); +void ObjLightswitch_DisappearDelay(ObjLightswitch* this, GlobalContext* globalCtx); +void ObjLightswitch_SetupDisappear(ObjLightswitch* this); +void ObjLightswitch_Disappear(ObjLightswitch* this, GlobalContext* globalCtx); + +extern Gfx D_06000260[]; // face, uses rgba16 32x32 texture at 0x08000000, branches to dlist 0x09000000, uses env color +extern Gfx D_06000398[]; // flame ring, branches to dlist 0x09000000, uses env color +extern Gfx D_06000408[]; // a square, geometry only +extern UNK_TYPE D_06000420[]; // rgba16 32x32 eyes open +extern UNK_TYPE D_06000C20[]; // rgba16 32x32 eyes closed +extern UNK_TYPE D_06001420[]; // rgba16 32x32 eyes open, smiling + const ActorInit Obj_Lightswitch_InitVars = { ACTOR_OBJ_LIGHTSWITCH, ACTORTYPE_SWITCH, @@ -27,47 +53,433 @@ const ActorInit Obj_Lightswitch_InitVars = { (ActorFunc)ObjLightswitch_Update, (ActorFunc)ObjLightswitch_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96BA0.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96C3C.s") +static ColliderJntSphItemInit sColliderJntSphItemInit[] = { + { + { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00200000, 0x00, 0x00 }, 0x00, 0x01, 0x01 }, + { 0, { { 0, 0, 0 }, 19 }, 100 }, + }, +}; +static ColliderJntSphInit sColliderJntSphInit = { + { COLTYPE_UNK10, 0x00, 0x09, 0x39, 0x20, COLSHAPE_JNTSPH }, + 1, + sColliderJntSphItemInit, +}; +static CollisionCheckInfoInit sCollisionCheckInfoInit = { 0, 0xC, 0x3C, 0xFF }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D00.s") +static UNK_PTR faceTextures[] = { D_06000C20, D_06000420, D_06001420 }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B96D80.s") +static Vec3f D_80B97F68 = { -1707.0f, 843.0f, -180.0f }; +static Vec3f D_80B97F74 = { 0.0f, 0.0f, 0.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Init.s") +static InitChainEntry sInitChain[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneScale, 500, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Destroy.s") +void ObjLightswitch_InitCollider(ObjLightswitch* this, GlobalContext* globalCtx) { + s32 pad; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971A8.s") + Collider_InitJntSph(globalCtx, &this->collider); + Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderItems); + func_800D1694(this->actor.posRot.pos.x, this->actor.posRot.pos.y + (this->actor.shape.unk_08 * this->actor.scale.y), + this->actor.posRot.pos.z, &this->actor.shape.rot); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + func_800628A4(0, &this->collider); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B971D8.s") +void ObjLightswitch_SetSwitchFlag(ObjLightswitch* this, GlobalContext* globalCtx) { + Actor* thisx = &this->actor; // required + s32 type; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972B8.s") + if (!Flags_GetSwitch(globalCtx, this->actor.params >> 8 & 0x3F)) { + type = this->actor.params >> 4 & 3; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B972D8.s") + Flags_SetSwitch(globalCtx, this->actor.params >> 8 & 0x3F); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B973C8.s") + if (type == OBJLIGHTSWITCH_TYPE_1) { + func_800806BC(globalCtx, thisx, 0x4807); + } else if (type == OBJLIGHTSWITCH_TYPE_BURN) { + func_800806BC(globalCtx, thisx, 0x4806); + } else { + func_800806BC(globalCtx, thisx, 0x4802); + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97400.s") +void ObjLightswitch_ClearSwitchFlag(ObjLightswitch* this, GlobalContext* globalCtx) { + if (Flags_GetSwitch(globalCtx, this->actor.params >> 8 & 0x3F)) { + Flags_UnsetSwitch(globalCtx, this->actor.params >> 8 & 0x3F); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97518.s") + if ((this->actor.params >> 4 & 3) == OBJLIGHTSWITCH_TYPE_1) { + func_800806BC(globalCtx, &this->actor, 0x4807); + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97540.s") +void ObjLightswitch_SpawnDisappearEffects(ObjLightswitch* this, GlobalContext* globalCtx) { + Vec3f pos; + f32 s = Math_Sins(this->actor.shape.rot.y); + f32 c = Math_Coss(this->actor.shape.rot.y); + f32 x; + f32 y; + f32 z; + s32 pad; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97630.s") + if (this->alpha >= (100 << 6)) { + x = (CLAMP_MAX((1.0f - 1.0f / (255 << 6) * this->alpha) * 400.0f, 60.0f) - 30.0f + 30.0f) * Math_Rand_ZeroOne(); + y = x - 30.0f; + if (x > 30.0f) { + x = 30.0f; + } else { + x = 900.0f - (y * y); + if (x < 100.0f) { + x = 100.0f; + } + x = sqrtf(x); + } + x = 2.0f * (x * (Math_Rand_ZeroOne() - 0.5f)); + z = (30.0f - fabsf(x)) * 0.5f + 10.0f * Math_Rand_ZeroOne(); + pos.x = this->actor.posRot.pos.x + ((z * s) + (x * c)); + pos.y = this->actor.posRot.pos.y + y + 10.0f; + pos.z = this->actor.posRot.pos.z + ((z * c) - (x * s)); + func_8002A6B8(globalCtx, &pos, &D_80B97F74, &D_80B97F74, 0x64, 0, 0xFF, 0xFF, 0xA0, 0xA0, 0xFF, 0, 0, 1, 9, 1); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97648.s") +void ObjLightswitch_Init(Actor* thisx, GlobalContext* globalCtx) { + ObjLightswitch* this = THIS; + s32 switchFlagSet = Flags_GetSwitch(globalCtx, this->actor.params >> 8 & 0x3F); + s32 removeSelf = false; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97690.s") + Actor_ProcessInitChain(&this->actor, sInitChain); + Actor_SetHeight(&this->actor, 0.0f); + if (switchFlagSet) { + if ((this->actor.params >> 4 & 3) == OBJLIGHTSWITCH_TYPE_BURN) { + removeSelf = true; + } else { + ObjLightswitch_SetupOn(this); + } + } else { + ObjLightswitch_SetupOff(this); + } + if ((this->actor.params & 1) == 1) { + if (switchFlagSet) { + Math_Vec3f_Copy(&this->actor.posRot.pos, &D_80B97F68); + Math_Vec3f_Copy(&this->actor.initPosRot.pos, &D_80B97F68); + } + this->actor.shape.rot.x = -0x4000; + this->actor.shape.rot.z = 0; + this->actor.posRot.rot.x = this->actor.initPosRot.rot.x = this->actor.shape.rot.x; + this->actor.posRot.rot.z = this->actor.initPosRot.rot.z = this->actor.shape.rot.z; + this->actor.flags |= 0x20; + if (!Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_OBJ_OSHIHIKI, + this->actor.initPosRot.pos.x, this->actor.initPosRot.pos.y, + this->actor.initPosRot.pos.z, 0, this->actor.initPosRot.rot.y, 0, 0xFF00)) { + osSyncPrintf(VT_COL(RED, WHITE)); + osSyncPrintf("押引ブロック発生失敗(%s %d)(arg_data 0x%04x)\n", "../z_obj_lightswitch.c", 452, + this->actor.params); + osSyncPrintf(VT_RST); + removeSelf = true; + } + } + ObjLightswitch_InitCollider(this, globalCtx); + func_80061ED4(&this->actor.colChkInfo, NULL, &sCollisionCheckInfoInit); + if (removeSelf) { + Actor_Kill(&this->actor); + } + osSyncPrintf("(光スイッチ)(arg_data 0x%04x)\n", this->actor.params); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B976A8.s") +void ObjLightswitch_Destroy(Actor* thisx, GlobalContext* globalCtx) { + Collider_DestroyJntSph(globalCtx, &THIS->collider); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Update.s") +void ObjLightswitch_SetupOff(ObjLightswitch* this) { + this->actionFunc = ObjLightswitch_Off; + this->faceTextureIndex = FACE_EYES_CLOSED; + this->color[0] = 155 << 6; + this->color[1] = 125 << 6; + this->color[2] = 255 << 6; + this->alpha = 255 << 6; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B977D0.s") +void ObjLightswitch_Off(ObjLightswitch* this, GlobalContext* globalCtx) { + switch (this->actor.params >> 4 & 3) { + case OBJLIGHTSWITCH_TYPE_STAY_ON: + case OBJLIGHTSWITCH_TYPE_2: + if (this->collider.base.acFlags & 2) { + ObjLightswitch_SetupTurnOn(this); + ObjLightswitch_SetSwitchFlag(this, globalCtx); + } + break; + case OBJLIGHTSWITCH_TYPE_1: + if ((this->collider.base.acFlags & 2) && !(this->prevFrameACflags & 2)) { + ObjLightswitch_SetupTurnOn(this); + ObjLightswitch_SetSwitchFlag(this, globalCtx); + } + break; + case OBJLIGHTSWITCH_TYPE_BURN: + if (this->collider.base.acFlags & 2) { + ObjLightswitch_SetupDisappearDelay(this); + ObjLightswitch_SetSwitchFlag(this, globalCtx); + } + break; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/func_80B97B50.s") +void ObjLightswitch_SetupTurnOn(ObjLightswitch* this) { + this->actionFunc = ObjLightswitch_TurnOn; + this->toggleDelay = 100; + this->timer = 0; + this->faceTextureIndex = FACE_EYES_CLOSED; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Lightswitch/ObjLightswitch_Draw.s") +void ObjLightswitch_TurnOn(ObjLightswitch* this, GlobalContext* globalCtx) { + if (func_8005B198() == this->actor.type || this->toggleDelay <= 0) { + if (this->timer == 0) { + Audio_PlayActorSound2(&this->actor, NA_SE_EV_TRIFORCE_FLASH); + } + + this->timer++; + + Math_ApproxS(&this->flameRingRotSpeed, -0xAA, 0xA); + this->flameRingRot += this->flameRingRotSpeed; + + this->color[0] = this->timer * (((255 - 155) << 6) / 20) + (155 << 6); + this->color[1] = this->timer * (((255 - 125) << 6) / 20) + (125 << 6); + + if (this->timer >= 20) { + ObjLightswitch_SetupOn(this); + } else if (this->timer == 15) { + this->faceTextureIndex = FACE_EYES_OPEN; + Audio_PlayActorSound2(&this->actor, NA_SE_EV_FOOT_SWITCH); + } + } +} + +void ObjLightswitch_SetupOn(ObjLightswitch* this) { + this->actionFunc = ObjLightswitch_On; + this->faceTextureIndex = FACE_EYES_OPEN_SMILING; + + this->color[0] = 255 << 6; + this->color[1] = 255 << 6; + this->color[2] = 255 << 6; + this->alpha = 255 << 6; + + this->flameRingRotSpeed = -0xAA; + this->timer = 0; +} + +void ObjLightswitch_On(ObjLightswitch* this, GlobalContext* globalCtx) { + switch (this->actor.params >> 4 & 3) { + case OBJLIGHTSWITCH_TYPE_STAY_ON: + if (!Flags_GetSwitch(globalCtx, this->actor.params >> 8 & 0x3F)) { + ObjLightswitch_SetupTurnOff(this); + } + break; + case OBJLIGHTSWITCH_TYPE_1: + if (this->collider.base.acFlags & 2 && !(this->prevFrameACflags & 2)) { + ObjLightswitch_SetupTurnOff(this); + ObjLightswitch_ClearSwitchFlag(this, globalCtx); + } + break; + case OBJLIGHTSWITCH_TYPE_2: + if (!(this->collider.base.acFlags & 2)) { + if (this->timer >= 7) { + ObjLightswitch_SetupTurnOff(this); + ObjLightswitch_ClearSwitchFlag(this, globalCtx); + } else { + this->timer++; + } + } else { + this->timer = 0; + } + break; + } + this->flameRingRot += this->flameRingRotSpeed; +} + +void ObjLightswitch_SetupTurnOff(ObjLightswitch* this) { + this->actionFunc = ObjLightswitch_TurnOff; + this->toggleDelay = 100; + this->timer = 20; + this->faceTextureIndex = FACE_EYES_OPEN; +} + +void ObjLightswitch_TurnOff(ObjLightswitch* this, GlobalContext* globalCtx) { + if ((this->actor.params >> 4 & 3) != OBJLIGHTSWITCH_TYPE_1 || func_8005B198() == this->actor.type || + this->toggleDelay <= 0) { + this->timer--; + + Math_ApproxS(&this->flameRingRotSpeed, 0, 0xA); + this->flameRingRot += this->flameRingRotSpeed; + + this->color[0] = this->timer * (((255 - 155) << 6) / 20) + (155 << 6); + this->color[1] = this->timer * (((255 - 125) << 6) / 20) + (125 << 6); + + if (this->timer <= 0) { + ObjLightswitch_SetupOff(this); + } else if (this->timer == 15) { + this->faceTextureIndex = FACE_EYES_CLOSED; + Audio_PlayActorSound2(&this->actor, NA_SE_EV_FOOT_SWITCH); + } + } +} + +void ObjLightswitch_SetupDisappearDelay(ObjLightswitch* this) { + this->actionFunc = ObjLightswitch_DisappearDelay; + this->toggleDelay = 100; +} + +void ObjLightswitch_DisappearDelay(ObjLightswitch* this, GlobalContext* globalCtx) { + if (func_8005B198() == this->actor.type || this->toggleDelay <= 0) { + ObjLightswitch_SetupDisappear(this); + } +} + +void ObjLightswitch_SetupDisappear(ObjLightswitch* this) { + this->actionFunc = ObjLightswitch_Disappear; + this->alpha = 255 << 6; +} + +void ObjLightswitch_Disappear(ObjLightswitch* this, GlobalContext* globalCtx) { + this->alpha -= 200; + ObjLightswitch_SpawnDisappearEffects(this, globalCtx); + if (this->alpha < 0) { + Actor_Kill(&this->actor); + } +} + +void ObjLightswitch_Update(Actor* thisx, GlobalContext* globalCtx) { + ObjLightswitch* this = THIS; + GlobalContext* globalCtx2 = globalCtx; + + if (this->toggleDelay > 0) { + this->toggleDelay--; + } + + this->actionFunc(this, globalCtx2); + + if (this->actor.update != NULL) { + if ((this->actor.params & 1) == 1) { + this->actor.posRot.pos.x = this->actor.child->posRot.pos.x; + this->actor.posRot.pos.y = this->actor.child->posRot.pos.y + 60.0f; + this->actor.posRot.pos.z = this->actor.child->posRot.pos.z; + Actor_SetHeight(&this->actor, 0.0f); + } + + this->prevFrameACflags = this->collider.base.acFlags; + this->collider.base.acFlags &= ~2; + CollisionCheck_SetOC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base); + CollisionCheck_SetAC(globalCtx2, &globalCtx2->colChkCtx, &this->collider.base); + } +} + +void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) { + Actor* child; + Vec3f pos; + Vec3s rot; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 809); + func_80093D18(globalCtx->state.gfxCtx); + + gDPSetEnvColor(oGfxCtx->polyOpa.p++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), + (u8)(this->color[2] >> 6), (u8)(this->alpha >> 6)); + gSPSegment(oGfxCtx->polyOpa.p++, 0x09, &D_80116280[2]); + + if ((this->actor.params & 1) == 1) { + child = this->actor.child; + this->actor.posRot.pos.x = child->posRot.pos.x; + this->actor.posRot.pos.y = child->posRot.pos.y + 60.0f; + this->actor.posRot.pos.z = child->posRot.pos.z; + Math_Vec3f_Copy(&pos, &this->actor.posRot.pos); + func_800D1694(pos.x, pos.y, pos.z, &this->actor.shape.rot); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + } else { + pos.x = this->actor.posRot.pos.x; + pos.y = this->actor.posRot.pos.y + this->actor.shape.unk_08 * this->actor.scale.y; + pos.z = this->actor.posRot.pos.z; + } + + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 841), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000260); + + rot.x = this->actor.shape.rot.x; + rot.y = this->actor.shape.rot.y; + rot.z = this->actor.shape.rot.z + this->flameRingRot; + func_800D1694(pos.x, pos.y, pos.z, &rot); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 859), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000398); + + rot.z = this->actor.shape.rot.z - this->flameRingRot; + func_800D1694(pos.x, pos.y, pos.z, &rot); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 873), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyOpa.p++, D_06000408); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 878); +} + +void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) { + s32 pad; + Vec3f sp68; + Vec3s sp60; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 890); + func_80093D84(globalCtx->state.gfxCtx); + + gDPSetEnvColor(oGfxCtx->polyXlu.p++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), + (u8)(this->color[2] >> 6), (u8)(this->alpha >> 6)); + gSPSegment(oGfxCtx->polyXlu.p++, 0x09, D_80116280); + + sp68.x = this->actor.posRot.pos.x; + sp68.y = this->actor.posRot.pos.y + (this->actor.shape.unk_08 * this->actor.scale.y); + sp68.z = this->actor.posRot.pos.z; + + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 912), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(oGfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000260); + + sp60.x = this->actor.shape.rot.x; + sp60.y = this->actor.shape.rot.y; + sp60.z = this->actor.shape.rot.z + this->flameRingRot; + + func_800D1694(sp68.x, sp68.y, sp68.z, &sp60); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 930), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000398); + + sp60.z = this->actor.shape.rot.z - this->flameRingRot; + func_800D1694(sp68.x, sp68.y, sp68.z, &sp60); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + gSPMatrix(oGfxCtx->polyXlu.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 944), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(oGfxCtx->polyXlu.p++, D_06000408); + + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 949); +} + +void ObjLightswitch_Draw(Actor* thisx, GlobalContext* globalCtx) { + ObjLightswitch* this = THIS; + s32 alpha = this->alpha >> 6 & 0xFF; + + if ((this->actor.params & 1) == 1) { + func_800628A4(0, &this->collider); + } + + if ((this->actor.params >> 4 & 3) == OBJLIGHTSWITCH_TYPE_BURN && (alpha > 0 || alpha < 255)) { + ObjLightswitch_DrawXlu(this, globalCtx); + } else { + ObjLightswitch_DrawOpa(this, globalCtx); + } +} diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h index e24e38c6e3..11d67f1f49 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.h @@ -6,9 +6,28 @@ struct ObjLightswitch; +typedef void (*ObjLightswitchActionFunc)(struct ObjLightswitch*, GlobalContext*); + +typedef enum { + /* 0 */ OBJLIGHTSWITCH_TYPE_STAY_ON, // doesn't turn off unless the switch flag is cleared some other way + /* 1 */ OBJLIGHTSWITCH_TYPE_1, // turns on and off + /* 2 */ OBJLIGHTSWITCH_TYPE_2, // turns on and off + /* 3 */ OBJLIGHTSWITCH_TYPE_BURN // disappears when turned on +} ObjLightswitch_Type; + typedef struct ObjLightswitch { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x78]; + /* 0x014C */ ObjLightswitchActionFunc actionFunc; + /* 0x0150 */ ColliderJntSph collider; + /* 0x0170 */ ColliderJntSphItem colliderItems[1]; + /* 0x01B0 */ s16 timer; // collision-related threshold and controls animation/logic when turning on/off + /* 0x01B2 */ s16 toggleDelay; // timer ticking down used for delaying tuning on/off or disappearing, can be bypassed + /* 0x01B4 */ s16 faceTextureIndex; // texture used by the center part of the sun + /* 0x01B6 */ s16 color[3]; // rgb, (0-255 color component) << 6 + /* 0x01BC */ s16 alpha; // (0-255 alpha) << 6 + /* 0x01BE */ s16 flameRingRot; + /* 0x01C0 */ s16 flameRingRotSpeed; + /* 0x01C2 */ u8 prevFrameACflags; } ObjLightswitch; // size = 0x01C4 extern const ActorInit Obj_Lightswitch_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index c250e074ad..efaf91cb3c 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -750,6 +750,14 @@ D_06005810 = 0x06005810; D_06000180 = 0x06000180; D_06000360 = 0x06000360; +// z_obj_lightswitch +D_06000260 = 0x06000260; +D_06000398 = 0x06000398; +D_06000408 = 0x06000408; +D_06000420 = 0x06000420; +D_06000C20 = 0x06000C20; +D_06001420 = 0x06001420; + // z_en_pu_box D_06000380 = 0x06000380; D_060006D0 = 0x060006D0;