From 9312c21c2f0898ca31294a1c7607f77d63d4b9dc Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 23 Nov 2020 06:53:17 -0600 Subject: [PATCH] Bg_Mizu_Shutter (#487) * Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * ZAP2 stuff * ZAP why * ZAP again * gate * done * done * now with names --- .../BgMizuShutter_Destroy.s | 14 -- .../ovl_Bg_Mizu_Shutter/BgMizuShutter_Draw.s | 70 ------- .../ovl_Bg_Mizu_Shutter/BgMizuShutter_Init.s | 174 ------------------ .../BgMizuShutter_Update.s | 10 - .../ovl_Bg_Mizu_Shutter/func_8089F0DC.s | 43 ----- .../ovl_Bg_Mizu_Shutter/func_8089F170.s | 22 --- .../ovl_Bg_Mizu_Shutter/func_8089F1BC.s | 158 ---------------- .../ovl_Bg_Mizu_Shutter/func_8089F3A4.s | 36 ---- data/overlays/actors/z_bg_mizu_shutter.data.s | 26 --- .../overlays/actors/z_bg_mizu_shutter.reloc.s | 13 -- spec | 3 +- .../ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c | 153 +++++++++++++-- .../ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h | 19 +- 13 files changed, 157 insertions(+), 584 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F0DC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F170.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F1BC.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F3A4.s delete mode 100644 data/overlays/actors/z_bg_mizu_shutter.data.s delete mode 100644 data/overlays/actors/z_bg_mizu_shutter.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Destroy.s deleted file mode 100644 index 45add8bb7d..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Destroy.s +++ /dev/null @@ -1,14 +0,0 @@ -glabel BgMizuShutter_Destroy -/* 0025C 8089F0AC 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00260 8089F0B0 AFA40018 */ sw $a0, 0x0018($sp) -/* 00264 8089F0B4 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00268 8089F0B8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0026C 8089F0BC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00270 8089F0C0 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 00274 8089F0C4 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 00278 8089F0C8 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 0027C 8089F0CC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00280 8089F0D0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00284 8089F0D4 03E00008 */ jr $ra -/* 00288 8089F0D8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Draw.s deleted file mode 100644 index ea665300a6..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Draw.s +++ /dev/null @@ -1,70 +0,0 @@ -.rdata -glabel D_8089F580 - .asciz "../z_bg_mizu_shutter.c" - .balign 4 - -glabel D_8089F598 - .asciz "../z_bg_mizu_shutter.c" - .balign 4 - -glabel D_8089F5B0 - .asciz "../z_bg_mizu_shutter.c" - .balign 4 - -.text -glabel BgMizuShutter_Draw -/* 005F8 8089F448 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 005FC 8089F44C AFBF001C */ sw $ra, 0x001C($sp) -/* 00600 8089F450 AFB00018 */ sw $s0, 0x0018($sp) -/* 00604 8089F454 AFA40048 */ sw $a0, 0x0048($sp) -/* 00608 8089F458 AFA5004C */ sw $a1, 0x004C($sp) -/* 0060C 8089F45C 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 00610 8089F460 3C06808A */ lui $a2, %hi(D_8089F580) ## $a2 = 808A0000 -/* 00614 8089F464 24C6F580 */ addiu $a2, $a2, %lo(D_8089F580) ## $a2 = 8089F580 -/* 00618 8089F468 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFE4 -/* 0061C 8089F46C 2407019A */ addiu $a3, $zero, 0x019A ## $a3 = 0000019A -/* 00620 8089F470 0C031AB1 */ jal Graph_OpenDisps -/* 00624 8089F474 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 00628 8089F478 8FAF004C */ lw $t7, 0x004C($sp) -/* 0062C 8089F47C 0C024F46 */ jal func_80093D18 -/* 00630 8089F480 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 00634 8089F484 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00638 8089F488 3C19DA38 */ lui $t9, 0xDA38 ## $t9 = DA380000 -/* 0063C 8089F48C 37390003 */ ori $t9, $t9, 0x0003 ## $t9 = DA380003 -/* 00640 8089F490 24580008 */ addiu $t8, $v0, 0x0008 ## $t8 = 00000008 -/* 00644 8089F494 AE1802C0 */ sw $t8, 0x02C0($s0) ## 000002C0 -/* 00648 8089F498 AC590000 */ sw $t9, 0x0000($v0) ## 00000000 -/* 0064C 8089F49C 8FA8004C */ lw $t0, 0x004C($sp) -/* 00650 8089F4A0 3C05808A */ lui $a1, %hi(D_8089F598) ## $a1 = 808A0000 -/* 00654 8089F4A4 24A5F598 */ addiu $a1, $a1, %lo(D_8089F598) ## $a1 = 8089F598 -/* 00658 8089F4A8 8D040000 */ lw $a0, 0x0000($t0) ## 00000000 -/* 0065C 8089F4AC 2406019F */ addiu $a2, $zero, 0x019F ## $a2 = 0000019F -/* 00660 8089F4B0 0C0346A2 */ jal Matrix_NewMtx -/* 00664 8089F4B4 AFA20028 */ sw $v0, 0x0028($sp) -/* 00668 8089F4B8 8FA30028 */ lw $v1, 0x0028($sp) -/* 0066C 8089F4BC 3C06808A */ lui $a2, %hi(D_8089F5B0) ## $a2 = 808A0000 -/* 00670 8089F4C0 24C6F5B0 */ addiu $a2, $a2, %lo(D_8089F5B0) ## $a2 = 8089F5B0 -/* 00674 8089F4C4 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 00678 8089F4C8 8FA40048 */ lw $a0, 0x0048($sp) -/* 0067C 8089F4CC 240701A6 */ addiu $a3, $zero, 0x01A6 ## $a3 = 000001A6 -/* 00680 8089F4D0 8C890170 */ lw $t1, 0x0170($a0) ## 00000170 -/* 00684 8089F4D4 51200009 */ beql $t1, $zero, .L8089F4FC -/* 00688 8089F4D8 8FAD004C */ lw $t5, 0x004C($sp) -/* 0068C 8089F4DC 8E0202C0 */ lw $v0, 0x02C0($s0) ## 000002C0 -/* 00690 8089F4E0 3C0BDE00 */ lui $t3, 0xDE00 ## $t3 = DE000000 -/* 00694 8089F4E4 244A0008 */ addiu $t2, $v0, 0x0008 ## $t2 = 00000008 -/* 00698 8089F4E8 AE0A02C0 */ sw $t2, 0x02C0($s0) ## 000002C0 -/* 0069C 8089F4EC AC4B0000 */ sw $t3, 0x0000($v0) ## 00000000 -/* 006A0 8089F4F0 8C8C0170 */ lw $t4, 0x0170($a0) ## 00000170 -/* 006A4 8089F4F4 AC4C0004 */ sw $t4, 0x0004($v0) ## 00000004 -/* 006A8 8089F4F8 8FAD004C */ lw $t5, 0x004C($sp) -.L8089F4FC: -/* 006AC 8089F4FC 27A4002C */ addiu $a0, $sp, 0x002C ## $a0 = FFFFFFE4 -/* 006B0 8089F500 0C031AD5 */ jal Graph_CloseDisps -/* 006B4 8089F504 8DA50000 */ lw $a1, 0x0000($t5) ## 00000000 -/* 006B8 8089F508 8FBF001C */ lw $ra, 0x001C($sp) -/* 006BC 8089F50C 8FB00018 */ lw $s0, 0x0018($sp) -/* 006C0 8089F510 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 -/* 006C4 8089F514 03E00008 */ jr $ra -/* 006C8 8089F518 00000000 */ nop -/* 006CC 8089F51C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Init.s deleted file mode 100644 index 7bf5fd3fe5..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Init.s +++ /dev/null @@ -1,174 +0,0 @@ -.late_rodata -glabel D_8089F5C8 - .float 9.58738019108e-05 - -glabel D_8089F5CC - .float 9.58738019108e-05 - -glabel D_8089F5D0 - .float 9.58738019108e-05 - -.text -glabel BgMizuShutter_Init -/* 00000 8089EE50 27BDFFC0 */ addiu $sp, $sp, 0xFFC0 ## $sp = FFFFFFC0 -/* 00004 8089EE54 AFA50044 */ sw $a1, 0x0044($sp) -/* 00008 8089EE58 AFBF001C */ sw $ra, 0x001C($sp) -/* 0000C 8089EE5C AFB00018 */ sw $s0, 0x0018($sp) -/* 00010 8089EE60 3C05808A */ lui $a1, %hi(D_8089F568) ## $a1 = 808A0000 -/* 00014 8089EE64 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 8089EE68 AFA00030 */ sw $zero, 0x0030($sp) -/* 0001C 8089EE6C 0C01E037 */ jal Actor_ProcessInitChain - -/* 00020 8089EE70 24A5F568 */ addiu $a1, $a1, %lo(D_8089F568) ## $a1 = 8089F568 -/* 00024 8089EE74 960E001C */ lhu $t6, 0x001C($s0) ## 0000001C -/* 00028 8089EE78 3C08808A */ lui $t0, %hi(D_8089F540) ## $t0 = 808A0000 -/* 0002C 8089EE7C 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00030 8089EE80 000E7B03 */ sra $t7, $t6, 12 -/* 00034 8089EE84 31F8000F */ andi $t8, $t7, 0x000F ## $t8 = 00000000 -/* 00038 8089EE88 0018C880 */ sll $t9, $t8, 2 -/* 0003C 8089EE8C 01194021 */ addu $t0, $t0, $t9 -/* 00040 8089EE90 8D08F540 */ lw $t0, %lo(D_8089F540)($t0) -/* 00044 8089EE94 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00048 8089EE98 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 0004C 8089EE9C AE080170 */ sw $t0, 0x0170($s0) ## 00000170 -/* 00050 8089EEA0 9609001C */ lhu $t1, 0x001C($s0) ## 0000001C -/* 00054 8089EEA4 3C04808A */ lui $a0, %hi(D_8089F548) ## $a0 = 808A0000 -/* 00058 8089EEA8 27A50030 */ addiu $a1, $sp, 0x0030 ## $a1 = FFFFFFF0 -/* 0005C 8089EEAC 00095303 */ sra $t2, $t1, 12 -/* 00060 8089EEB0 314B000F */ andi $t3, $t2, 0x000F ## $t3 = 00000000 -/* 00064 8089EEB4 000B6080 */ sll $t4, $t3, 2 -/* 00068 8089EEB8 008C2021 */ addu $a0, $a0, $t4 -/* 0006C 8089EEBC 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00070 8089EEC0 8C84F548 */ lw $a0, %lo(D_8089F548)($a0) -/* 00074 8089EEC4 8FA40044 */ lw $a0, 0x0044($sp) -/* 00078 8089EEC8 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 0007C 8089EECC 8FA70030 */ lw $a3, 0x0030($sp) -/* 00080 8089EED0 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00084 8089EED4 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00088 8089EED8 9603001C */ lhu $v1, 0x001C($s0) ## 0000001C -/* 0008C 8089EEDC AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00090 8089EEE0 24010001 */ addiu $at, $zero, 0x0001 ## $at = 00000001 -/* 00094 8089EEE4 00031B03 */ sra $v1, $v1, 12 -/* 00098 8089EEE8 3063000F */ andi $v1, $v1, 0x000F ## $v1 = 00000000 -/* 0009C 8089EEEC 10600003 */ beq $v1, $zero, .L8089EEFC -/* 000A0 8089EEF0 26020024 */ addiu $v0, $s0, 0x0024 ## $v0 = 00000024 -/* 000A4 8089EEF4 54610069 */ bnel $v1, $at, .L8089F09C -/* 000A8 8089EEF8 8FBF001C */ lw $ra, 0x001C($sp) -.L8089EEFC: -/* 000AC 8089EEFC 8C4E0000 */ lw $t6, 0x0000($v0) ## 00000024 -/* 000B0 8089EF00 26030178 */ addiu $v1, $s0, 0x0178 ## $v1 = 00000178 -/* 000B4 8089EF04 3C01808A */ lui $at, %hi(D_8089F5C8) ## $at = 808A0000 -/* 000B8 8089EF08 AC6E0000 */ sw $t6, 0x0000($v1) ## 00000178 -/* 000BC 8089EF0C 8C4D0004 */ lw $t5, 0x0004($v0) ## 00000028 -/* 000C0 8089EF10 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 000C4 8089EF14 AC6D0004 */ sw $t5, 0x0004($v1) ## 0000017C -/* 000C8 8089EF18 8C4E0008 */ lw $t6, 0x0008($v0) ## 0000002C -/* 000CC 8089EF1C AC6E0008 */ sw $t6, 0x0008($v1) ## 00000180 -/* 000D0 8089EF20 960F001C */ lhu $t7, 0x001C($s0) ## 0000001C -/* 000D4 8089EF24 86090032 */ lh $t1, 0x0032($s0) ## 00000032 -/* 000D8 8089EF28 AE000168 */ sw $zero, 0x0168($s0) ## 00000168 -/* 000DC 8089EF2C 000FC183 */ sra $t8, $t7, 6 -/* 000E0 8089EF30 44892000 */ mtc1 $t1, $f4 ## $f4 = 0.00 -/* 000E4 8089EF34 3319003F */ andi $t9, $t8, 0x003F ## $t9 = 00000000 -/* 000E8 8089EF38 00194080 */ sll $t0, $t9, 2 -/* 000EC 8089EF3C 468021A0 */ cvt.s.w $f6, $f4 -/* 000F0 8089EF40 01194021 */ addu $t0, $t0, $t9 -/* 000F4 8089EF44 00084080 */ sll $t0, $t0, 2 -/* 000F8 8089EF48 AE08016C */ sw $t0, 0x016C($s0) ## 0000016C -/* 000FC 8089EF4C C428F5C8 */ lwc1 $f8, %lo(D_8089F5C8)($at) -/* 00100 8089EF50 AFA30020 */ sw $v1, 0x0020($sp) -/* 00104 8089EF54 AFA20028 */ sw $v0, 0x0028($sp) -/* 00108 8089EF58 46083302 */ mul.s $f12, $f6, $f8 -/* 0010C 8089EF5C 0C034348 */ jal Matrix_RotateY -/* 00110 8089EF60 00000000 */ nop -/* 00114 8089EF64 860A0030 */ lh $t2, 0x0030($s0) ## 00000030 -/* 00118 8089EF68 3C01808A */ lui $at, %hi(D_8089F5CC) ## $at = 808A0000 -/* 0011C 8089EF6C C432F5CC */ lwc1 $f18, %lo(D_8089F5CC)($at) -/* 00120 8089EF70 448A5000 */ mtc1 $t2, $f10 ## $f10 = 0.00 -/* 00124 8089EF74 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00128 8089EF78 46805420 */ cvt.s.w $f16, $f10 -/* 0012C 8089EF7C 46128302 */ mul.s $f12, $f16, $f18 -/* 00130 8089EF80 0C0342DC */ jal Matrix_RotateX -/* 00134 8089EF84 00000000 */ nop -/* 00138 8089EF88 860B0034 */ lh $t3, 0x0034($s0) ## 00000034 -/* 0013C 8089EF8C 3C01808A */ lui $at, %hi(D_8089F5D0) ## $at = 808A0000 -/* 00140 8089EF90 C428F5D0 */ lwc1 $f8, %lo(D_8089F5D0)($at) -/* 00144 8089EF94 448B2000 */ mtc1 $t3, $f4 ## $f4 = 0.00 -/* 00148 8089EF98 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 0014C 8089EF9C 468021A0 */ cvt.s.w $f6, $f4 -/* 00150 8089EFA0 46083302 */ mul.s $f12, $f6, $f8 -/* 00154 8089EFA4 0C0343B5 */ jal Matrix_RotateZ -/* 00158 8089EFA8 00000000 */ nop -/* 0015C 8089EFAC 960C001C */ lhu $t4, 0x001C($s0) ## 0000001C -/* 00160 8089EFB0 3C18808A */ lui $t8, %hi(D_8089F550) ## $t8 = 808A0000 -/* 00164 8089EFB4 2718F550 */ addiu $t8, $t8, %lo(D_8089F550) ## $t8 = 8089F550 -/* 00168 8089EFB8 000C6B03 */ sra $t5, $t4, 12 -/* 0016C 8089EFBC 31AE000F */ andi $t6, $t5, 0x000F ## $t6 = 00000000 -/* 00170 8089EFC0 000E7880 */ sll $t7, $t6, 2 -/* 00174 8089EFC4 01EE7823 */ subu $t7, $t7, $t6 -/* 00178 8089EFC8 000F7880 */ sll $t7, $t7, 2 -/* 0017C 8089EFCC 26050184 */ addiu $a1, $s0, 0x0184 ## $a1 = 00000184 -/* 00180 8089EFD0 AFA50024 */ sw $a1, 0x0024($sp) -/* 00184 8089EFD4 0C0346BD */ jal Matrix_MultVec3f -/* 00188 8089EFD8 01F82021 */ addu $a0, $t7, $t8 -/* 0018C 8089EFDC C60A0184 */ lwc1 $f10, 0x0184($s0) ## 00000184 -/* 00190 8089EFE0 C6100024 */ lwc1 $f16, 0x0024($s0) ## 00000024 -/* 00194 8089EFE4 C6040188 */ lwc1 $f4, 0x0188($s0) ## 00000188 -/* 00198 8089EFE8 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028 -/* 0019C 8089EFEC 46105480 */ add.s $f18, $f10, $f16 -/* 001A0 8089EFF0 C610002C */ lwc1 $f16, 0x002C($s0) ## 0000002C -/* 001A4 8089EFF4 C60A018C */ lwc1 $f10, 0x018C($s0) ## 0000018C -/* 001A8 8089EFF8 46062200 */ add.s $f8, $f4, $f6 -/* 001AC 8089EFFC E6120184 */ swc1 $f18, 0x0184($s0) ## 00000184 -/* 001B0 8089F000 8E19016C */ lw $t9, 0x016C($s0) ## 0000016C -/* 001B4 8089F004 46105480 */ add.s $f18, $f10, $f16 -/* 001B8 8089F008 240104EC */ addiu $at, $zero, 0x04EC ## $at = 000004EC -/* 001BC 8089F00C E6080188 */ swc1 $f8, 0x0188($s0) ## 00000188 -/* 001C0 8089F010 1321000D */ beq $t9, $at, .L8089F048 -/* 001C4 8089F014 E612018C */ swc1 $f18, 0x018C($s0) ## 0000018C -/* 001C8 8089F018 9605001C */ lhu $a1, 0x001C($s0) ## 0000001C -/* 001CC 8089F01C 8FA40044 */ lw $a0, 0x0044($sp) -/* 001D0 8089F020 0C00B2ED */ jal Flags_UnsetSwitch - -/* 001D4 8089F024 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 001D8 8089F028 8FA90020 */ lw $t1, 0x0020($sp) -/* 001DC 8089F02C 8FA80028 */ lw $t0, 0x0028($sp) -/* 001E0 8089F030 8D2B0000 */ lw $t3, 0x0000($t1) ## 00000000 -/* 001E4 8089F034 AD0B0000 */ sw $t3, 0x0000($t0) ## 00000000 -/* 001E8 8089F038 8D2A0004 */ lw $t2, 0x0004($t1) ## 00000004 -/* 001EC 8089F03C AD0A0004 */ sw $t2, 0x0004($t0) ## 00000004 -/* 001F0 8089F040 8D2B0008 */ lw $t3, 0x0008($t1) ## 00000008 -/* 001F4 8089F044 AD0B0008 */ sw $t3, 0x0008($t0) ## 00000008 -.L8089F048: -/* 001F8 8089F048 9605001C */ lhu $a1, 0x001C($s0) ## 0000001C -/* 001FC 8089F04C 8FA40044 */ lw $a0, 0x0044($sp) -/* 00200 8089F050 0C00B2D0 */ jal Flags_GetSwitch - -/* 00204 8089F054 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 00208 8089F058 1040000D */ beq $v0, $zero, .L8089F090 -/* 0020C 8089F05C 3C19808A */ lui $t9, %hi(func_8089F0DC) ## $t9 = 808A0000 -/* 00210 8089F060 8FAD0024 */ lw $t5, 0x0024($sp) -/* 00214 8089F064 8FAC0028 */ lw $t4, 0x0028($sp) -/* 00218 8089F068 3C18808A */ lui $t8, %hi(func_8089F3A4) ## $t8 = 808A0000 -/* 0021C 8089F06C 8DAF0000 */ lw $t7, 0x0000($t5) ## 00000000 -/* 00220 8089F070 2718F3A4 */ addiu $t8, $t8, %lo(func_8089F3A4) ## $t8 = 8089F3A4 -/* 00224 8089F074 AD8F0000 */ sw $t7, 0x0000($t4) ## 00000000 -/* 00228 8089F078 8DAE0004 */ lw $t6, 0x0004($t5) ## 00000004 -/* 0022C 8089F07C AD8E0004 */ sw $t6, 0x0004($t4) ## 00000004 -/* 00230 8089F080 8DAF0008 */ lw $t7, 0x0008($t5) ## 00000008 -/* 00234 8089F084 AD8F0008 */ sw $t7, 0x0008($t4) ## 00000008 -/* 00238 8089F088 10000003 */ beq $zero, $zero, .L8089F098 -/* 0023C 8089F08C AE180164 */ sw $t8, 0x0164($s0) ## 00000164 -.L8089F090: -/* 00240 8089F090 2739F0DC */ addiu $t9, $t9, %lo(func_8089F0DC) ## $t9 = 8089F0DC -/* 00244 8089F094 AE190164 */ sw $t9, 0x0164($s0) ## 00000164 -.L8089F098: -/* 00248 8089F098 8FBF001C */ lw $ra, 0x001C($sp) -.L8089F09C: -/* 0024C 8089F09C 8FB00018 */ lw $s0, 0x0018($sp) -/* 00250 8089F0A0 27BD0040 */ addiu $sp, $sp, 0x0040 ## $sp = 00000000 -/* 00254 8089F0A4 03E00008 */ jr $ra -/* 00258 8089F0A8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Update.s deleted file mode 100644 index be5130aa14..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel BgMizuShutter_Update -/* 005D4 8089F424 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 005D8 8089F428 AFBF0014 */ sw $ra, 0x0014($sp) -/* 005DC 8089F42C 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 005E0 8089F430 0320F809 */ jalr $ra, $t9 -/* 005E4 8089F434 00000000 */ nop -/* 005E8 8089F438 8FBF0014 */ lw $ra, 0x0014($sp) -/* 005EC 8089F43C 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 005F0 8089F440 03E00008 */ jr $ra -/* 005F4 8089F444 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F0DC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F0DC.s deleted file mode 100644 index 9023901884..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F0DC.s +++ /dev/null @@ -1,43 +0,0 @@ -glabel func_8089F0DC -/* 0028C 8089F0DC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00290 8089F0E0 AFB00020 */ sw $s0, 0x0020($sp) -/* 00294 8089F0E4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00298 8089F0E8 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0029C 8089F0EC AFA5002C */ sw $a1, 0x002C($sp) -/* 002A0 8089F0F0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 002A4 8089F0F4 9605001C */ lhu $a1, 0x001C($s0) ## 0000001C -/* 002A8 8089F0F8 0C00B2D0 */ jal Flags_GetSwitch - -/* 002AC 8089F0FC 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 002B0 8089F100 10400016 */ beq $v0, $zero, .L8089F15C -/* 002B4 8089F104 8FA4002C */ lw $a0, 0x002C($sp) -/* 002B8 8089F108 86020030 */ lh $v0, 0x0030($s0) ## 00000030 -/* 002BC 8089F10C 2405119E */ addiu $a1, $zero, 0x119E ## $a1 = 0000119E -/* 002C0 8089F110 2406FF9D */ addiu $a2, $zero, 0xFF9D ## $a2 = FFFFFF9D -/* 002C4 8089F114 04400003 */ bltz $v0, .L8089F124 -/* 002C8 8089F118 00021823 */ subu $v1, $zero, $v0 -/* 002CC 8089F11C 10000001 */ beq $zero, $zero, .L8089F124 -/* 002D0 8089F120 00401825 */ or $v1, $v0, $zero ## $v1 = 00000000 -.L8089F124: -/* 002D4 8089F124 28612C61 */ slti $at, $v1, 0x2C61 -/* 002D8 8089F128 14200005 */ bne $at, $zero, .L8089F140 -/* 002DC 8089F12C 02003825 */ or $a3, $s0, $zero ## $a3 = 00000000 -/* 002E0 8089F130 0C02003E */ jal func_800800F8 -/* 002E4 8089F134 AFA00010 */ sw $zero, 0x0010($sp) -/* 002E8 8089F138 10000003 */ beq $zero, $zero, .L8089F148 -/* 002EC 8089F13C 00000000 */ nop -.L8089F140: -/* 002F0 8089F140 0C020120 */ jal func_80080480 -/* 002F4 8089F144 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -.L8089F148: -/* 002F8 8089F148 3C0E808A */ lui $t6, %hi(func_8089F170) ## $t6 = 808A0000 -/* 002FC 8089F14C 25CEF170 */ addiu $t6, $t6, %lo(func_8089F170) ## $t6 = 8089F170 -/* 00300 8089F150 240F001E */ addiu $t7, $zero, 0x001E ## $t7 = 0000001E -/* 00304 8089F154 AE0E0164 */ sw $t6, 0x0164($s0) ## 00000164 -/* 00308 8089F158 AE0F0168 */ sw $t7, 0x0168($s0) ## 00000168 -.L8089F15C: -/* 0030C 8089F15C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00310 8089F160 8FB00020 */ lw $s0, 0x0020($sp) -/* 00314 8089F164 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 00318 8089F168 03E00008 */ jr $ra -/* 0031C 8089F16C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F170.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F170.s deleted file mode 100644 index 2301f1b28c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F170.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel func_8089F170 -/* 00320 8089F170 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00324 8089F174 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00328 8089F178 AFA5001C */ sw $a1, 0x001C($sp) -/* 0032C 8089F17C 8C820168 */ lw $v0, 0x0168($a0) ## 00000168 -/* 00330 8089F180 24052859 */ addiu $a1, $zero, 0x2859 ## $a1 = 00002859 -/* 00334 8089F184 2C430001 */ sltiu $v1, $v0, 0x0001 -/* 00338 8089F188 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 0033C 8089F18C 10600007 */ beq $v1, $zero, .L8089F1AC -/* 00340 8089F190 AC8E0168 */ sw $t6, 0x0168($a0) ## 00000168 -/* 00344 8089F194 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00348 8089F198 AFA40018 */ sw $a0, 0x0018($sp) -/* 0034C 8089F19C 8FA40018 */ lw $a0, 0x0018($sp) -/* 00350 8089F1A0 3C0F808A */ lui $t7, %hi(func_8089F1BC) ## $t7 = 808A0000 -/* 00354 8089F1A4 25EFF1BC */ addiu $t7, $t7, %lo(func_8089F1BC) ## $t7 = 8089F1BC -/* 00358 8089F1A8 AC8F0164 */ sw $t7, 0x0164($a0) ## 00000164 -.L8089F1AC: -/* 0035C 8089F1AC 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00360 8089F1B0 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00364 8089F1B4 03E00008 */ jr $ra -/* 00368 8089F1B8 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F1BC.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F1BC.s deleted file mode 100644 index 1943f60005..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F1BC.s +++ /dev/null @@ -1,158 +0,0 @@ -.late_rodata -glabel D_8089F5D4 - .float 0.1 - -glabel D_8089F5D8 - .float 0.1 - -glabel D_8089F5DC - .float 0.1 - -glabel D_8089F5E0 - .float 0.1 - -glabel D_8089F5E4 - .float 0.1 - -glabel D_8089F5E8 - .float 0.1 - -glabel D_8089F5EC - .float 0.1 - -.text -glabel func_8089F1BC -/* 0036C 8089F1BC 27BDFFD8 */ addiu $sp, $sp, 0xFFD8 ## $sp = FFFFFFD8 -/* 00370 8089F1C0 AFB00020 */ sw $s0, 0x0020($sp) -/* 00374 8089F1C4 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00378 8089F1C8 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0037C 8089F1CC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00380 8089F1D0 9605001C */ lhu $a1, 0x001C($s0) ## 0000001C -/* 00384 8089F1D4 0C00B2D0 */ jal Flags_GetSwitch - -/* 00388 8089F1D8 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 0038C 8089F1DC 10400031 */ beq $v0, $zero, .L8089F2A4 -/* 00390 8089F1E0 26040174 */ addiu $a0, $s0, 0x0174 ## $a0 = 00000174 -/* 00394 8089F1E4 3C01808A */ lui $at, %hi(D_8089F5D4) ## $at = 808A0000 -/* 00398 8089F1E8 C424F5D4 */ lwc1 $f4, %lo(D_8089F5D4)($at) -/* 0039C 8089F1EC 8E050184 */ lw $a1, 0x0184($s0) ## 00000184 -/* 003A0 8089F1F0 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024 -/* 003A4 8089F1F4 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 003A8 8089F1F8 3C074080 */ lui $a3, 0x4080 ## $a3 = 40800000 -/* 003AC 8089F1FC 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 003B0 8089F200 E7A40010 */ swc1 $f4, 0x0010($sp) -/* 003B4 8089F204 3C01808A */ lui $at, %hi(D_8089F5D8) ## $at = 808A0000 -/* 003B8 8089F208 C426F5D8 */ lwc1 $f6, %lo(D_8089F5D8)($at) -/* 003BC 8089F20C 8E050188 */ lw $a1, 0x0188($s0) ## 00000188 -/* 003C0 8089F210 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028 -/* 003C4 8089F214 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 003C8 8089F218 3C074080 */ lui $a3, 0x4080 ## $a3 = 40800000 -/* 003CC 8089F21C 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 003D0 8089F220 E7A60010 */ swc1 $f6, 0x0010($sp) -/* 003D4 8089F224 3C01808A */ lui $at, %hi(D_8089F5DC) ## $at = 808A0000 -/* 003D8 8089F228 C428F5DC */ lwc1 $f8, %lo(D_8089F5DC)($at) -/* 003DC 8089F22C 8E05018C */ lw $a1, 0x018C($s0) ## 0000018C -/* 003E0 8089F230 2604002C */ addiu $a0, $s0, 0x002C ## $a0 = 0000002C -/* 003E4 8089F234 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 003E8 8089F238 3C074080 */ lui $a3, 0x4080 ## $a3 = 40800000 -/* 003EC 8089F23C 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 003F0 8089F240 E7A80010 */ swc1 $f8, 0x0010($sp) -/* 003F4 8089F244 C60A0184 */ lwc1 $f10, 0x0184($s0) ## 00000184 -/* 003F8 8089F248 C6100024 */ lwc1 $f16, 0x0024($s0) ## 00000024 -/* 003FC 8089F24C 46105032 */ c.eq.s $f10, $f16 -/* 00400 8089F250 00000000 */ nop -/* 00404 8089F254 4502004F */ bc1fl .L8089F394 -/* 00408 8089F258 8FBF0024 */ lw $ra, 0x0024($sp) -/* 0040C 8089F25C C6120188 */ lwc1 $f18, 0x0188($s0) ## 00000188 -/* 00410 8089F260 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028 -/* 00414 8089F264 46049032 */ c.eq.s $f18, $f4 -/* 00418 8089F268 00000000 */ nop -/* 0041C 8089F26C 45020049 */ bc1fl .L8089F394 -/* 00420 8089F270 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00424 8089F274 C606018C */ lwc1 $f6, 0x018C($s0) ## 0000018C -/* 00428 8089F278 C608002C */ lwc1 $f8, 0x002C($s0) ## 0000002C -/* 0042C 8089F27C 3C0F808A */ lui $t7, %hi(func_8089F3A4) ## $t7 = 808A0000 -/* 00430 8089F280 25EFF3A4 */ addiu $t7, $t7, %lo(func_8089F3A4) ## $t7 = 8089F3A4 -/* 00434 8089F284 46083032 */ c.eq.s $f6, $f8 -/* 00438 8089F288 00000000 */ nop -/* 0043C 8089F28C 45020041 */ bc1fl .L8089F394 -/* 00440 8089F290 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00444 8089F294 8E0E016C */ lw $t6, 0x016C($s0) ## 0000016C -/* 00448 8089F298 AE0F0164 */ sw $t7, 0x0164($s0) ## 00000164 -/* 0044C 8089F29C 1000003C */ beq $zero, $zero, .L8089F390 -/* 00450 8089F2A0 AE0E0168 */ sw $t6, 0x0168($s0) ## 00000168 -.L8089F2A4: -/* 00454 8089F2A4 3C01808A */ lui $at, %hi(D_8089F5E0) ## $at = 808A0000 -/* 00458 8089F2A8 C42AF5E0 */ lwc1 $f10, %lo(D_8089F5E0)($at) -/* 0045C 8089F2AC 3C0541A0 */ lui $a1, 0x41A0 ## $a1 = 41A00000 -/* 00460 8089F2B0 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 00464 8089F2B4 3C074040 */ lui $a3, 0x4040 ## $a3 = 40400000 -/* 00468 8089F2B8 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 0046C 8089F2BC E7AA0010 */ swc1 $f10, 0x0010($sp) -/* 00470 8089F2C0 3C01808A */ lui $at, %hi(D_8089F5E4) ## $at = 808A0000 -/* 00474 8089F2C4 C430F5E4 */ lwc1 $f16, %lo(D_8089F5E4)($at) -/* 00478 8089F2C8 8E050178 */ lw $a1, 0x0178($s0) ## 00000178 -/* 0047C 8089F2CC 8E070174 */ lw $a3, 0x0174($s0) ## 00000174 -/* 00480 8089F2D0 26040024 */ addiu $a0, $s0, 0x0024 ## $a0 = 00000024 -/* 00484 8089F2D4 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 00488 8089F2D8 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 0048C 8089F2DC E7B00010 */ swc1 $f16, 0x0010($sp) -/* 00490 8089F2E0 3C01808A */ lui $at, %hi(D_8089F5E8) ## $at = 808A0000 -/* 00494 8089F2E4 C432F5E8 */ lwc1 $f18, %lo(D_8089F5E8)($at) -/* 00498 8089F2E8 8E05017C */ lw $a1, 0x017C($s0) ## 0000017C -/* 0049C 8089F2EC 8E070174 */ lw $a3, 0x0174($s0) ## 00000174 -/* 004A0 8089F2F0 26040028 */ addiu $a0, $s0, 0x0028 ## $a0 = 00000028 -/* 004A4 8089F2F4 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 004A8 8089F2F8 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 004AC 8089F2FC E7B20010 */ swc1 $f18, 0x0010($sp) -/* 004B0 8089F300 3C01808A */ lui $at, %hi(D_8089F5EC) ## $at = 808A0000 -/* 004B4 8089F304 C424F5EC */ lwc1 $f4, %lo(D_8089F5EC)($at) -/* 004B8 8089F308 8E050180 */ lw $a1, 0x0180($s0) ## 00000180 -/* 004BC 8089F30C 8E070174 */ lw $a3, 0x0174($s0) ## 00000174 -/* 004C0 8089F310 2604002C */ addiu $a0, $s0, 0x002C ## $a0 = 0000002C -/* 004C4 8089F314 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 004C8 8089F318 0C01E0C4 */ jal Math_SmoothScaleMaxMinF - -/* 004CC 8089F31C E7A40010 */ swc1 $f4, 0x0010($sp) -/* 004D0 8089F320 C6060178 */ lwc1 $f6, 0x0178($s0) ## 00000178 -/* 004D4 8089F324 C6080024 */ lwc1 $f8, 0x0024($s0) ## 00000024 -/* 004D8 8089F328 46083032 */ c.eq.s $f6, $f8 -/* 004DC 8089F32C 00000000 */ nop -/* 004E0 8089F330 45020018 */ bc1fl .L8089F394 -/* 004E4 8089F334 8FBF0024 */ lw $ra, 0x0024($sp) -/* 004E8 8089F338 C60A017C */ lwc1 $f10, 0x017C($s0) ## 0000017C -/* 004EC 8089F33C C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028 -/* 004F0 8089F340 46105032 */ c.eq.s $f10, $f16 -/* 004F4 8089F344 00000000 */ nop -/* 004F8 8089F348 45020012 */ bc1fl .L8089F394 -/* 004FC 8089F34C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00500 8089F350 C6120180 */ lwc1 $f18, 0x0180($s0) ## 00000180 -/* 00504 8089F354 C604002C */ lwc1 $f4, 0x002C($s0) ## 0000002C -/* 00508 8089F358 24050078 */ addiu $a1, $zero, 0x0078 ## $a1 = 00000078 -/* 0050C 8089F35C 24060014 */ addiu $a2, $zero, 0x0014 ## $a2 = 00000014 -/* 00510 8089F360 46049032 */ c.eq.s $f18, $f4 -/* 00514 8089F364 2407000A */ addiu $a3, $zero, 0x000A ## $a3 = 0000000A -/* 00518 8089F368 4502000A */ bc1fl .L8089F394 -/* 0051C 8089F36C 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00520 8089F370 0C02A800 */ jal func_800AA000 -/* 00524 8089F374 C60C008C */ lwc1 $f12, 0x008C($s0) ## 0000008C -/* 00528 8089F378 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0052C 8089F37C 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 00530 8089F380 2405281D */ addiu $a1, $zero, 0x281D ## $a1 = 0000281D -/* 00534 8089F384 3C18808A */ lui $t8, %hi(func_8089F0DC) ## $t8 = 808A0000 -/* 00538 8089F388 2718F0DC */ addiu $t8, $t8, %lo(func_8089F0DC) ## $t8 = 8089F0DC -/* 0053C 8089F38C AE180164 */ sw $t8, 0x0164($s0) ## 00000164 -.L8089F390: -/* 00540 8089F390 8FBF0024 */ lw $ra, 0x0024($sp) -.L8089F394: -/* 00544 8089F394 8FB00020 */ lw $s0, 0x0020($sp) -/* 00548 8089F398 27BD0028 */ addiu $sp, $sp, 0x0028 ## $sp = 00000000 -/* 0054C 8089F39C 03E00008 */ jr $ra -/* 00550 8089F3A0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F3A4.s b/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F3A4.s deleted file mode 100644 index ac834fd79c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F3A4.s +++ /dev/null @@ -1,36 +0,0 @@ -glabel func_8089F3A4 -/* 00554 8089F3A4 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00558 8089F3A8 AFBF001C */ sw $ra, 0x001C($sp) -/* 0055C 8089F3AC AFB00018 */ sw $s0, 0x0018($sp) -/* 00560 8089F3B0 AFA50024 */ sw $a1, 0x0024($sp) -/* 00564 8089F3B4 8C8E016C */ lw $t6, 0x016C($a0) ## 0000016C -/* 00568 8089F3B8 240104EC */ addiu $at, $zero, 0x04EC ## $at = 000004EC -/* 0056C 8089F3BC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00570 8089F3C0 51C10014 */ beql $t6, $at, .L8089F414 -/* 00574 8089F3C4 8FBF001C */ lw $ra, 0x001C($sp) -/* 00578 8089F3C8 8C8F0168 */ lw $t7, 0x0168($a0) ## 00000168 -/* 0057C 8089F3CC 25F8FFFF */ addiu $t8, $t7, 0xFFFF ## $t8 = FFFFFFFF -/* 00580 8089F3D0 AC980168 */ sw $t8, 0x0168($a0) ## 00000168 -/* 00584 8089F3D4 0C00BE65 */ jal func_8002F994 -/* 00588 8089F3D8 8E050168 */ lw $a1, 0x0168($s0) ## 00000168 -/* 0058C 8089F3DC 8E190168 */ lw $t9, 0x0168($s0) ## 00000168 -/* 00590 8089F3E0 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00594 8089F3E4 5720000B */ bnel $t9, $zero, .L8089F414 -/* 00598 8089F3E8 8FBF001C */ lw $ra, 0x001C($sp) -/* 0059C 8089F3EC 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 005A0 8089F3F0 2405285A */ addiu $a1, $zero, 0x285A ## $a1 = 0000285A -/* 005A4 8089F3F4 9605001C */ lhu $a1, 0x001C($s0) ## 0000001C -/* 005A8 8089F3F8 8FA40024 */ lw $a0, 0x0024($sp) -/* 005AC 8089F3FC 0C00B2ED */ jal Flags_UnsetSwitch - -/* 005B0 8089F400 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 005B4 8089F404 3C08808A */ lui $t0, %hi(func_8089F1BC) ## $t0 = 808A0000 -/* 005B8 8089F408 2508F1BC */ addiu $t0, $t0, %lo(func_8089F1BC) ## $t0 = 8089F1BC -/* 005BC 8089F40C AE080164 */ sw $t0, 0x0164($s0) ## 00000164 -/* 005C0 8089F410 8FBF001C */ lw $ra, 0x001C($sp) -.L8089F414: -/* 005C4 8089F414 8FB00018 */ lw $s0, 0x0018($sp) -/* 005C8 8089F418 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 005CC 8089F41C 03E00008 */ jr $ra -/* 005D0 8089F420 00000000 */ nop diff --git a/data/overlays/actors/z_bg_mizu_shutter.data.s b/data/overlays/actors/z_bg_mizu_shutter.data.s deleted file mode 100644 index 463d342a65..0000000000 --- a/data/overlays/actors/z_bg_mizu_shutter.data.s +++ /dev/null @@ -1,26 +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 Bg_Mizu_Shutter_InitVars - .word 0x01BB0600, 0x00000010, 0x00590000, 0x00000190 -.word BgMizuShutter_Init -.word BgMizuShutter_Destroy -.word BgMizuShutter_Update -.word BgMizuShutter_Draw -glabel D_8089F540 - .word 0x06007130, 0x060072D0 -glabel D_8089F548 - .word 0x06007250, 0x060073F0 -glabel D_8089F550 - .word 0x00000000, 0x42C80000, 0x00000000, 0x00000000, 0x430C0000, 0x00000000 -glabel D_8089F568 - .word 0xB0F805DC, 0xB0FC044C, 0xB0F403E8, 0x48500064, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_mizu_shutter.reloc.s b/data/overlays/actors/z_bg_mizu_shutter.reloc.s deleted file mode 100644 index 41c8de50aa..0000000000 --- a/data/overlays/actors/z_bg_mizu_shutter.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_8089F5F0 - .incbin "baserom/ovl_Bg_Mizu_Shutter", 0x7A0, 0x000000F0 diff --git a/spec b/spec index d754ddec30..d586e4bef0 100644 --- a/spec +++ b/spec @@ -1064,8 +1064,7 @@ endseg beginseg name "ovl_Bg_Mizu_Shutter" include "build/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.o" - include "build/data/overlays/actors/z_bg_mizu_shutter.data.o" - include "build/data/overlays/actors/z_bg_mizu_shutter.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Mizu_Shutter/ovl_Bg_Mizu_Shutter_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c index ad62335052..0958d99443 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c @@ -4,12 +4,19 @@ #define THIS ((BgMizuShutter*)thisx) -void BgMizuShutter_Init(Actor* thisx, GlobalContext* globalCtx); -void BgMizuShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); -void BgMizuShutter_Update(Actor* thisx, GlobalContext* globalCtx); -void BgMizuShutter_Draw(Actor* thisx, GlobalContext* globalCtx); +#define SIZE_PARAM (((u16)this->dyna.actor.params >> 0xC) & 0xF) +#define TIMER_PARAM (((u16)this->dyna.actor.params >> 6) & 0x3F) + +void BgMizuShutter_Init(BgMizuShutter* this, GlobalContext* globalCtx); +void BgMizuShutter_Destroy(BgMizuShutter* this, GlobalContext* globalCtx); +void BgMizuShutter_Update(BgMizuShutter* this, GlobalContext* globalCtx); +void BgMizuShutter_Draw(BgMizuShutter* this, GlobalContext* globalCtx); + +void BgMizuShutter_WaitForTimer(BgMizuShutter* this, GlobalContext* globalCtx); +void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx); +void BgMizuShutter_Move(BgMizuShutter* this, GlobalContext* globalCtx); +void BgMizuShutter_WaitForCutscene(BgMizuShutter* this, GlobalContext* globalCtx); -/* const ActorInit Bg_Mizu_Shutter_InitVars = { ACTOR_BG_MIZU_SHUTTER, ACTORTYPE_PROP, @@ -21,19 +28,137 @@ const ActorInit Bg_Mizu_Shutter_InitVars = { (ActorFunc)BgMizuShutter_Update, (ActorFunc)BgMizuShutter_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Destroy.s") +static Gfx* sDisplayLists[] = { 0x06007130, 0x060072D0 }; +static CollisionHeader* sCollisionHeaders[] = { 0x06007250, 0x060073F0 }; +static Vec3f sDisplacements[] = { + { 0.0f, 100.0f, 0.0f }, + { 0.0f, 140.0f, 0.0f }, +}; +static InitChainEntry sInitChain[] = { + ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneDownward, 1100, ICHAIN_CONTINUE), + ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F0DC.s") +void BgMizuShutter_Init(BgMizuShutter* thisx, GlobalContext* globalCtx) { + s32 pad; + BgMizuShutter* this = THIS; + s32 pad2; + CollisionHeader* sp30 = NULL; + s32 pad3; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F170.s") + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); + this->displayList = sDisplayLists[SIZE_PARAM]; + DynaPolyInfo_SetActorMove(&this->dyna, 1); + DynaPolyInfo_Alloc(sCollisionHeaders[SIZE_PARAM], &sp30); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp30); + if ((SIZE_PARAM == BGMIZUSHUTTER_SMALL) || (SIZE_PARAM == BGMIZUSHUTTER_LARGE)) { + this->closedPos = this->dyna.actor.posRot.pos; + this->timer = 0; + this->timerMax = TIMER_PARAM * 20; + Matrix_RotateY(this->dyna.actor.posRot.rot.y * (M_PI / 0x8000), 0); + Matrix_RotateX(this->dyna.actor.posRot.rot.x * (M_PI / 0x8000), 1); + Matrix_RotateZ(this->dyna.actor.posRot.rot.z * (M_PI / 0x8000), 1); + Matrix_MultVec3f(&sDisplacements[SIZE_PARAM], &this->openPos); + this->openPos.x += this->dyna.actor.posRot.pos.x; + this->openPos.y += this->dyna.actor.posRot.pos.y; + this->openPos.z += this->dyna.actor.posRot.pos.z; + if (this->timerMax != 0x3F * 20) { + Flags_UnsetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F); + this->dyna.actor.posRot.pos = this->closedPos; + } + if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) { + this->dyna.actor.posRot.pos = this->openPos; + this->actionFunc = BgMizuShutter_WaitForTimer; + } else { + this->actionFunc = BgMizuShutter_WaitForSwitch; + } + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F1BC.s") +void BgMizuShutter_Destroy(BgMizuShutter* thisx, GlobalContext* globalCtx) { + s32 pad; + BgMizuShutter* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/func_8089F3A4.s") + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Update.s") +void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx) { + if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) { + if (ABS(this->dyna.actor.posRot.rot.x) > 0x2C60) { + func_800800F8(globalCtx, 0x119E, -0x63, &this->dyna.actor, 0); + } else { + func_80080480(globalCtx, &this->dyna.actor); + } + this->actionFunc = BgMizuShutter_WaitForCutscene; + this->timer = 30; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Mizu_Shutter/BgMizuShutter_Draw.s") +void BgMizuShutter_WaitForCutscene(BgMizuShutter* this, GlobalContext* globalCtx) { + if (this->timer-- == 0) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN); + this->actionFunc = BgMizuShutter_Move; + } +} + +void BgMizuShutter_Move(BgMizuShutter* this, GlobalContext* globalCtx) { + if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) { + Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.x, this->openPos.x, 1.0f, 4.0f, 0.1f); + Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, this->openPos.y, 1.0f, 4.0f, 0.1f); + Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.z, this->openPos.z, 1.0f, 4.0f, 0.1f); + if ((this->dyna.actor.posRot.pos.x == this->openPos.x) && (this->dyna.actor.posRot.pos.y == this->openPos.y) && + (this->dyna.actor.posRot.pos.z == this->openPos.z)) { + this->timer = this->timerMax; + this->actionFunc = BgMizuShutter_WaitForTimer; + } + } else { + Math_SmoothScaleMaxMinF(&this->maxSpeed, 20.0f, 1.0f, 3.0f, 0.1f); + Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.x, this->closedPos.x, 1.0f, this->maxSpeed, 0.1f); + Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.y, this->closedPos.y, 1.0f, this->maxSpeed, 0.1f); + Math_SmoothScaleMaxMinF(&this->dyna.actor.posRot.pos.z, this->closedPos.z, 1.0f, this->maxSpeed, 0.1f); + if ((this->dyna.actor.posRot.pos.x == this->closedPos.x) && + (this->dyna.actor.posRot.pos.y == this->closedPos.y) && + (this->dyna.actor.posRot.pos.z == this->closedPos.z)) { + func_800AA000(this->dyna.actor.xyzDistFromLinkSq, 0x78, 0x14, 0xA); + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND); + this->actionFunc = BgMizuShutter_WaitForSwitch; + } + } +} + +void BgMizuShutter_WaitForTimer(BgMizuShutter* this, GlobalContext* globalCtx) { + if (this->timerMax != 0x3F * 20) { + this->timer--; + func_8002F994(&this->dyna.actor, this->timer); + if (this->timer == 0) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_CLOSE); + Flags_UnsetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F); + this->actionFunc = BgMizuShutter_Move; + } + } +} + +void BgMizuShutter_Update(BgMizuShutter* thisx, GlobalContext* globalCtx) { + s32 pad; + BgMizuShutter* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void BgMizuShutter_Draw(BgMizuShutter* thisx, GlobalContext* globalCtx) { + s32 pad; + BgMizuShutter* this = THIS; + + OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_shutter.c", 410); + func_80093D18(globalCtx->state.gfxCtx); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mizu_shutter.c", 415), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + if (this->displayList != NULL) { + gSPDisplayList(POLY_OPA_DISP++, this->displayList); + } + CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_shutter.c", 422); +} diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h index 656e526b77..fd0bdf6c79 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h +++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.h @@ -4,13 +4,28 @@ #include "ultra64.h" #include "global.h" +#define BGMIZUSHUTTER_PARAM(size, timer, switchFlag) (size << 0xC) | (timer << 0x6) | switchFlag + struct BgMizuShutter; +typedef void (*BgMizuShutterActionFunc)(struct BgMizuShutter*, GlobalContext*); + typedef struct BgMizuShutter { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x44]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ BgMizuShutterActionFunc actionFunc; + /* 0x0168 */ s32 timer; + /* 0x016C */ s32 timerMax; + /* 0x0170 */ Gfx* displayList; + /* 0x0174 */ f32 maxSpeed; + /* 0x0178 */ Vec3f closedPos; + /* 0x0184 */ Vec3f openPos; } BgMizuShutter; // size = 0x0190 +typedef enum BgMizuShutterSize { + BGMIZUSHUTTER_SMALL, + BGMIZUSHUTTER_LARGE +} BgMizuShutterSize; + extern const ActorInit Bg_Mizu_Shutter_InitVars; #endif