From 9a9025f01c5686b439fa11b2b796ec14d36c8fba Mon Sep 17 00:00:00 2001 From: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Date: Mon, 23 Nov 2020 23:32:57 +0000 Subject: [PATCH] ovl_bg_ice_turara OK (#467) * ovl_Bg_Ice_Turara.c OK * =Updated z_bg_ice_turara.c to address comments * Params and all functions named * remove unnecessary linebreak * Update src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Changed enum names Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> --- .../ovl_Bg_Ice_Turara/BgIceTurara_Destroy.s | 21 --- .../ovl_Bg_Ice_Turara/BgIceTurara_Draw.s | 16 -- .../ovl_Bg_Ice_Turara/BgIceTurara_Init.s | 64 ------- .../ovl_Bg_Ice_Turara/BgIceTurara_Update.s | 10 -- .../actors/ovl_Bg_Ice_Turara/func_80892040.s | 138 --------------- .../actors/ovl_Bg_Ice_Turara/func_80892220.s | 29 --- .../actors/ovl_Bg_Ice_Turara/func_80892280.s | 16 -- .../actors/ovl_Bg_Ice_Turara/func_808922B8.s | 106 ----------- .../actors/ovl_Bg_Ice_Turara/func_80892424.s | 95 ---------- .../actors/ovl_Bg_Ice_Turara/func_80892574.s | 23 --- data/overlays/actors/z_bg_ice_turara.data.s | 28 --- data/overlays/actors/z_bg_ice_turara.reloc.s | 13 -- spec | 3 +- .../ovl_Bg_Ice_Turara/z_bg_ice_turara.c | 167 ++++++++++++++++-- .../ovl_Bg_Ice_Turara/z_bg_ice_turara.h | 14 +- undefined_syms.txt | 5 + 16 files changed, 173 insertions(+), 575 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892040.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892220.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892280.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_808922B8.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892424.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892574.s delete mode 100644 data/overlays/actors/z_bg_ice_turara.data.s delete mode 100644 data/overlays/actors/z_bg_ice_turara.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Destroy.s deleted file mode 100644 index d7d985fa23..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Destroy.s +++ /dev/null @@ -1,21 +0,0 @@ -glabel BgIceTurara_Destroy -/* 000D8 80891FF8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 000DC 80891FFC AFA40018 */ sw $a0, 0x0018($sp) -/* 000E0 80892000 8FAE0018 */ lw $t6, 0x0018($sp) -/* 000E4 80892004 AFBF0014 */ sw $ra, 0x0014($sp) -/* 000E8 80892008 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 000EC 8089200C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 000F0 80892010 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 000F4 80892014 AFA7001C */ sw $a3, 0x001C($sp) -/* 000F8 80892018 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 000FC 8089201C 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 00100 80892020 8FA50018 */ lw $a1, 0x0018($sp) -/* 00104 80892024 8FA4001C */ lw $a0, 0x001C($sp) -/* 00108 80892028 0C0170EB */ jal Collider_DestroyCylinder - -/* 0010C 8089202C 24A5016C */ addiu $a1, $a1, 0x016C ## $a1 = 0000016C -/* 00110 80892030 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00114 80892034 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00118 80892038 03E00008 */ jr $ra -/* 0011C 8089203C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Draw.s deleted file mode 100644 index a49b3ece68..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Draw.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel BgIceTurara_Draw -/* 006C8 808925E8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 006CC 808925EC AFA40018 */ sw $a0, 0x0018($sp) -/* 006D0 808925F0 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 006D4 808925F4 AFBF0014 */ sw $ra, 0x0014($sp) -/* 006D8 808925F8 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000 -/* 006DC 808925FC 0C00D498 */ jal Gfx_DrawDListOpa - -/* 006E0 80892600 24A523D0 */ addiu $a1, $a1, 0x23D0 ## $a1 = 060023D0 -/* 006E4 80892604 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006E8 80892608 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 006EC 8089260C 03E00008 */ jr $ra -/* 006F0 80892610 00000000 */ nop -/* 006F4 80892614 00000000 */ nop -/* 006F8 80892618 00000000 */ nop -/* 006FC 8089261C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Init.s deleted file mode 100644 index d01df898fa..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Init.s +++ /dev/null @@ -1,64 +0,0 @@ -glabel BgIceTurara_Init -/* 00000 80891F20 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00004 80891F24 AFA50034 */ sw $a1, 0x0034($sp) -/* 00008 80891F28 AFBF001C */ sw $ra, 0x001C($sp) -/* 0000C 80891F2C AFB00018 */ sw $s0, 0x0018($sp) -/* 00010 80891F30 3C058089 */ lui $a1, %hi(D_8089266C) ## $a1 = 80890000 -/* 00014 80891F34 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00018 80891F38 AFA00024 */ sw $zero, 0x0024($sp) -/* 0001C 80891F3C 0C01E037 */ jal Actor_ProcessInitChain - -/* 00020 80891F40 24A5266C */ addiu $a1, $a1, %lo(D_8089266C) ## $a1 = 8089266C -/* 00024 80891F44 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00028 80891F48 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 0002C 80891F4C 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 00030 80891F50 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00034 80891F54 24842594 */ addiu $a0, $a0, 0x2594 ## $a0 = 06002594 -/* 00038 80891F58 0C010620 */ jal DynaPolyInfo_Alloc - -/* 0003C 80891F5C 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4 -/* 00040 80891F60 2605016C */ addiu $a1, $s0, 0x016C ## $a1 = 0000016C -/* 00044 80891F64 AFA50020 */ sw $a1, 0x0020($sp) -/* 00048 80891F68 0C0170D9 */ jal Collider_InitCylinder - -/* 0004C 80891F6C 8FA40034 */ lw $a0, 0x0034($sp) -/* 00050 80891F70 3C078089 */ lui $a3, %hi(D_80892620) ## $a3 = 80890000 -/* 00054 80891F74 24E72620 */ addiu $a3, $a3, %lo(D_80892620) ## $a3 = 80892620 -/* 00058 80891F78 8FA40034 */ lw $a0, 0x0034($sp) -/* 0005C 80891F7C 8FA50020 */ lw $a1, 0x0020($sp) -/* 00060 80891F80 0C01712B */ jal Collider_SetCylinder - -/* 00064 80891F84 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00068 80891F88 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0006C 80891F8C 0C0189B7 */ jal Collider_CylinderUpdate - -/* 00070 80891F90 8FA50020 */ lw $a1, 0x0020($sp) -/* 00074 80891F94 8FA40034 */ lw $a0, 0x0034($sp) -/* 00078 80891F98 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 0007C 80891F9C 8FA70024 */ lw $a3, 0x0024($sp) -/* 00080 80891FA0 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 00084 80891FA4 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00088 80891FA8 860F001C */ lh $t7, 0x001C($s0) ## 0000001C -/* 0008C 80891FAC AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00090 80891FB0 24198000 */ addiu $t9, $zero, 0x8000 ## $t9 = FFFF8000 -/* 00094 80891FB4 15E00005 */ bne $t7, $zero, .L80891FCC -/* 00098 80891FB8 3C014496 */ lui $at, 0x4496 ## $at = 44960000 -/* 0009C 80891FBC 3C188089 */ lui $t8, %hi(func_80892220) ## $t8 = 80890000 -/* 000A0 80891FC0 27182220 */ addiu $t8, $t8, %lo(func_80892220) ## $t8 = 80892220 -/* 000A4 80891FC4 10000007 */ beq $zero, $zero, .L80891FE4 -/* 000A8 80891FC8 AE180164 */ sw $t8, 0x0164($s0) ## 00000164 -.L80891FCC: -/* 000AC 80891FCC 44812000 */ mtc1 $at, $f4 ## $f4 = 1200.00 -/* 000B0 80891FD0 3C088089 */ lui $t0, %hi(func_80892280) ## $t0 = 80890000 -/* 000B4 80891FD4 25082280 */ addiu $t0, $t0, %lo(func_80892280) ## $t0 = 80892280 -/* 000B8 80891FD8 A61900B4 */ sh $t9, 0x00B4($s0) ## 000000B4 -/* 000BC 80891FDC AE080164 */ sw $t0, 0x0164($s0) ## 00000164 -/* 000C0 80891FE0 E60400BC */ swc1 $f4, 0x00BC($s0) ## 000000BC -.L80891FE4: -/* 000C4 80891FE4 8FBF001C */ lw $ra, 0x001C($sp) -/* 000C8 80891FE8 8FB00018 */ lw $s0, 0x0018($sp) -/* 000CC 80891FEC 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 000D0 80891FF0 03E00008 */ jr $ra -/* 000D4 80891FF4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Update.s deleted file mode 100644 index 93ecbc437c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Update.s +++ /dev/null @@ -1,10 +0,0 @@ -glabel BgIceTurara_Update -/* 006A4 808925C4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 006A8 808925C8 AFBF0014 */ sw $ra, 0x0014($sp) -/* 006AC 808925CC 8C990164 */ lw $t9, 0x0164($a0) ## 00000164 -/* 006B0 808925D0 0320F809 */ jalr $ra, $t9 -/* 006B4 808925D4 00000000 */ nop -/* 006B8 808925D8 8FBF0014 */ lw $ra, 0x0014($sp) -/* 006BC 808925DC 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 006C0 808925E0 03E00008 */ jr $ra -/* 006C4 808925E4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892040.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892040.s deleted file mode 100644 index 7a2a43c69e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892040.s +++ /dev/null @@ -1,138 +0,0 @@ -.late_rodata -glabel D_80892690 - .float 0.1 -glabel D_80892694 - .float 0.2 - -.text -glabel func_80892040 -/* 00120 80892040 27BDFF58 */ addiu $sp, $sp, 0xFF58 ## $sp = FFFFFF58 -/* 00124 80892044 AFB1005C */ sw $s1, 0x005C($sp) -/* 00128 80892048 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 0012C 8089204C AFBE0078 */ sw $s8, 0x0078($sp) -/* 00130 80892050 00A0F025 */ or $s8, $a1, $zero ## $s8 = 00000000 -/* 00134 80892054 AFBF007C */ sw $ra, 0x007C($sp) -/* 00138 80892058 AFA600B0 */ sw $a2, 0x00B0($sp) -/* 0013C 8089205C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00140 80892060 AFB70074 */ sw $s7, 0x0074($sp) -/* 00144 80892064 AFB60070 */ sw $s6, 0x0070($sp) -/* 00148 80892068 AFB5006C */ sw $s5, 0x006C($sp) -/* 0014C 8089206C AFB40068 */ sw $s4, 0x0068($sp) -/* 00150 80892070 AFB30064 */ sw $s3, 0x0064($sp) -/* 00154 80892074 AFB20060 */ sw $s2, 0x0060($sp) -/* 00158 80892078 AFB00058 */ sw $s0, 0x0058($sp) -/* 0015C 8089207C F7BE0050 */ sdc1 $f30, 0x0050($sp) -/* 00160 80892080 F7BC0048 */ sdc1 $f28, 0x0048($sp) -/* 00164 80892084 F7BA0040 */ sdc1 $f26, 0x0040($sp) -/* 00168 80892088 F7B80038 */ sdc1 $f24, 0x0038($sp) -/* 0016C 8089208C F7B60030 */ sdc1 $f22, 0x0030($sp) -/* 00170 80892090 F7B40028 */ sdc1 $f20, 0x0028($sp) -/* 00174 80892094 26250024 */ addiu $a1, $s1, 0x0024 ## $a1 = 00000024 -/* 00178 80892098 2406001E */ addiu $a2, $zero, 0x001E ## $a2 = 0000001E -/* 0017C 8089209C 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 00180 808920A0 240728CB */ addiu $a3, $zero, 0x28CB ## $a3 = 000028CB -/* 00184 808920A4 3C018089 */ lui $at, %hi(D_80892690) ## $at = 80890000 -/* 00188 808920A8 C43E2690 */ lwc1 $f30, %lo(D_80892690)($at) -/* 0018C 808920AC 3C018089 */ lui $at, %hi(D_80892694) ## $at = 80890000 -/* 00190 808920B0 C43C2694 */ lwc1 $f28, %lo(D_80892694)($at) -/* 00194 808920B4 3C014080 */ lui $at, 0x4080 ## $at = 40800000 -/* 00198 808920B8 4481D000 */ mtc1 $at, $f26 ## $f26 = 4.00 -/* 0019C 808920BC 3C0140E0 */ lui $at, 0x40E0 ## $at = 40E00000 -/* 001A0 808920C0 4481B000 */ mtc1 $at, $f22 ## $f22 = 7.00 -/* 001A4 808920C4 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 001A8 808920C8 3C168089 */ lui $s6, %hi(D_8089268C) ## $s6 = 80890000 -/* 001AC 808920CC 3C158089 */ lui $s5, %hi(D_80892688) ## $s5 = 80890000 -/* 001B0 808920D0 3C148089 */ lui $s4, %hi(D_8089267C) ## $s4 = 80890000 -/* 001B4 808920D4 4481A000 */ mtc1 $at, $f20 ## $f20 = 8.00 -/* 001B8 808920D8 2694267C */ addiu $s4, $s4, %lo(D_8089267C) ## $s4 = 8089267C -/* 001BC 808920DC 26B52688 */ addiu $s5, $s5, %lo(D_80892688) ## $s5 = 80892688 -/* 001C0 808920E0 26D6268C */ addiu $s6, $s6, %lo(D_8089268C) ## $s6 = 8089268C -/* 001C4 808920E4 AFA00088 */ sw $zero, 0x0088($sp) -/* 001C8 808920E8 2417000A */ addiu $s7, $zero, 0x000A ## $s7 = 0000000A -/* 001CC 808920EC 27B3009C */ addiu $s3, $sp, 0x009C ## $s3 = FFFFFFF4 -/* 001D0 808920F0 27B20090 */ addiu $s2, $sp, 0x0090 ## $s2 = FFFFFFE8 -.L808920F4: -/* 001D4 808920F4 8FA20088 */ lw $v0, 0x0088($sp) -/* 001D8 808920F8 C7A800B0 */ lwc1 $f8, 0x00B0($sp) -/* 001DC 808920FC 00008025 */ or $s0, $zero, $zero ## $s0 = 00000000 -/* 001E0 80892100 44822000 */ mtc1 $v0, $f4 ## $f4 = 0.00 -/* 001E4 80892104 00000000 */ nop -/* 001E8 80892108 468021A0 */ cvt.s.w $f6, $f4 -/* 001EC 8089210C 46083602 */ mul.s $f24, $f6, $f8 -/* 001F0 80892110 00000000 */ nop -.L80892114: -/* 001F4 80892114 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 001F8 80892118 4600A306 */ mov.s $f12, $f20 -/* 001FC 8089211C C62A0024 */ lwc1 $f10, 0x0024($s1) ## 00000024 -/* 00200 80892120 460A0400 */ add.s $f16, $f0, $f10 -/* 00204 80892124 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00208 80892128 E7B00090 */ swc1 $f16, 0x0090($sp) -/* 0020C 8089212C C7B200B0 */ lwc1 $f18, 0x00B0($sp) -/* 00210 80892130 C6260028 */ lwc1 $f6, 0x0028($s1) ## 00000028 -/* 00214 80892134 4600A306 */ mov.s $f12, $f20 -/* 00218 80892138 46120102 */ mul.s $f4, $f0, $f18 -/* 0021C 8089213C 46062200 */ add.s $f8, $f4, $f6 -/* 00220 80892140 46184280 */ add.s $f10, $f8, $f24 -/* 00224 80892144 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 00228 80892148 E7AA0094 */ swc1 $f10, 0x0094($sp) -/* 0022C 8089214C C630002C */ lwc1 $f16, 0x002C($s1) ## 0000002C -/* 00230 80892150 4600B306 */ mov.s $f12, $f22 -/* 00234 80892154 46100480 */ add.s $f18, $f0, $f16 -/* 00238 80892158 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 0023C 8089215C E7B20098 */ swc1 $f18, 0x0098($sp) -/* 00240 80892160 E7A0009C */ swc1 $f0, 0x009C($sp) -/* 00244 80892164 0C00CFC8 */ jal Math_Rand_CenteredFloat - -/* 00248 80892168 4600B306 */ mov.s $f12, $f22 -/* 0024C 8089216C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00250 80892170 E7A000A4 */ swc1 $f0, 0x00A4($sp) -/* 00254 80892174 461A0102 */ mul.s $f4, $f0, $f26 -/* 00258 80892178 46142180 */ add.s $f6, $f4, $f20 -/* 0025C 8089217C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00260 80892180 E7A600A0 */ swc1 $f6, 0x00A0($sp) -/* 00264 80892184 461C0202 */ mul.s $f8, $f0, $f28 -/* 00268 80892188 240E001E */ addiu $t6, $zero, 0x001E ## $t6 = 0000001E -/* 0026C 8089218C AFAE001C */ sw $t6, 0x001C($sp) -/* 00270 80892190 03C02025 */ or $a0, $s8, $zero ## $a0 = 00000000 -/* 00274 80892194 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFE8 -/* 00278 80892198 02603825 */ or $a3, $s3, $zero ## $a3 = FFFFFFF4 -/* 0027C 8089219C AFB40010 */ sw $s4, 0x0010($sp) -/* 00280 808921A0 461E4280 */ add.s $f10, $f8, $f30 -/* 00284 808921A4 AFB50014 */ sw $s5, 0x0014($sp) -/* 00288 808921A8 AFB60018 */ sw $s6, 0x0018($sp) -/* 0028C 808921AC 44065000 */ mfc1 $a2, $f10 -/* 00290 808921B0 0C00A8A9 */ jal EffectSsEnIce_Spawn -/* 00294 808921B4 00000000 */ nop -/* 00298 808921B8 26100001 */ addiu $s0, $s0, 0x0001 ## $s0 = 00000001 -/* 0029C 808921BC 1617FFD5 */ bne $s0, $s7, .L80892114 -/* 002A0 808921C0 00000000 */ nop -/* 002A4 808921C4 8FAF0088 */ lw $t7, 0x0088($sp) -/* 002A8 808921C8 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 002AC 808921CC 25F80001 */ addiu $t8, $t7, 0x0001 ## $t8 = 00000001 -/* 002B0 808921D0 1701FFC8 */ bne $t8, $at, .L808920F4 -/* 002B4 808921D4 AFB80088 */ sw $t8, 0x0088($sp) -/* 002B8 808921D8 8FBF007C */ lw $ra, 0x007C($sp) -/* 002BC 808921DC D7B40028 */ ldc1 $f20, 0x0028($sp) -/* 002C0 808921E0 D7B60030 */ ldc1 $f22, 0x0030($sp) -/* 002C4 808921E4 D7B80038 */ ldc1 $f24, 0x0038($sp) -/* 002C8 808921E8 D7BA0040 */ ldc1 $f26, 0x0040($sp) -/* 002CC 808921EC D7BC0048 */ ldc1 $f28, 0x0048($sp) -/* 002D0 808921F0 D7BE0050 */ ldc1 $f30, 0x0050($sp) -/* 002D4 808921F4 8FB00058 */ lw $s0, 0x0058($sp) -/* 002D8 808921F8 8FB1005C */ lw $s1, 0x005C($sp) -/* 002DC 808921FC 8FB20060 */ lw $s2, 0x0060($sp) -/* 002E0 80892200 8FB30064 */ lw $s3, 0x0064($sp) -/* 002E4 80892204 8FB40068 */ lw $s4, 0x0068($sp) -/* 002E8 80892208 8FB5006C */ lw $s5, 0x006C($sp) -/* 002EC 8089220C 8FB60070 */ lw $s6, 0x0070($sp) -/* 002F0 80892210 8FB70074 */ lw $s7, 0x0074($sp) -/* 002F4 80892214 8FBE0078 */ lw $s8, 0x0078($sp) -/* 002F8 80892218 03E00008 */ jr $ra -/* 002FC 8089221C 27BD00A8 */ addiu $sp, $sp, 0x00A8 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892220.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892220.s deleted file mode 100644 index b423cee0cf..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892220.s +++ /dev/null @@ -1,29 +0,0 @@ -glabel func_80892220 -/* 00300 80892220 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00304 80892224 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00308 80892228 AFA5001C */ sw $a1, 0x001C($sp) -/* 0030C 8089222C 908E017D */ lbu $t6, 0x017D($a0) ## 0000017D -/* 00310 80892230 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00314 80892234 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00318 80892238 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000 -/* 0031C 8089223C 11E00008 */ beq $t7, $zero, .L80892260 -/* 00320 80892240 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00324 80892244 3C064248 */ lui $a2, 0x4248 ## $a2 = 42480000 -/* 00328 80892248 0C224810 */ jal func_80892040 -/* 0032C 8089224C AFA70018 */ sw $a3, 0x0018($sp) -/* 00330 80892250 0C00B55C */ jal Actor_Kill - -/* 00334 80892254 8FA40018 */ lw $a0, 0x0018($sp) -/* 00338 80892258 10000006 */ beq $zero, $zero, .L80892274 -/* 0033C 8089225C 8FBF0014 */ lw $ra, 0x0014($sp) -.L80892260: -/* 00340 80892260 8FA4001C */ lw $a0, 0x001C($sp) -/* 00344 80892264 24E6016C */ addiu $a2, $a3, 0x016C ## $a2 = 0000016C -/* 00348 80892268 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 0034C 8089226C 00812821 */ addu $a1, $a0, $at -/* 00350 80892270 8FBF0014 */ lw $ra, 0x0014($sp) -.L80892274: -/* 00354 80892274 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00358 80892278 03E00008 */ jr $ra -/* 0035C 8089227C 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892280.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892280.s deleted file mode 100644 index 6e8640aeb0..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892280.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel func_80892280 -/* 00360 80892280 AFA50004 */ sw $a1, 0x0004($sp) -/* 00364 80892284 3C014270 */ lui $at, 0x4270 ## $at = 42700000 -/* 00368 80892288 44813000 */ mtc1 $at, $f6 ## $f6 = 60.00 -/* 0036C 8089228C C4840090 */ lwc1 $f4, 0x0090($a0) ## 00000090 -/* 00370 80892290 3C0F8089 */ lui $t7, %hi(func_808922B8) ## $t7 = 80890000 -/* 00374 80892294 240E000A */ addiu $t6, $zero, 0x000A ## $t6 = 0000000A -/* 00378 80892298 4606203C */ c.lt.s $f4, $f6 -/* 0037C 8089229C 25EF22B8 */ addiu $t7, $t7, %lo(func_808922B8) ## $t7 = 808922B8 -/* 00380 808922A0 45000003 */ bc1f .L808922B0 -/* 00384 808922A4 00000000 */ nop -/* 00388 808922A8 A48E0168 */ sh $t6, 0x0168($a0) ## 00000168 -/* 0038C 808922AC AC8F0164 */ sw $t7, 0x0164($a0) ## 00000164 -.L808922B0: -/* 00390 808922B0 03E00008 */ jr $ra -/* 00394 808922B4 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_808922B8.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_808922B8.s deleted file mode 100644 index 82833cacd2..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_808922B8.s +++ /dev/null @@ -1,106 +0,0 @@ -glabel func_808922B8 -/* 00398 808922B8 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 0039C 808922BC AFBF001C */ sw $ra, 0x001C($sp) -/* 003A0 808922C0 AFB00018 */ sw $s0, 0x0018($sp) -/* 003A4 808922C4 AFA50034 */ sw $a1, 0x0034($sp) -/* 003A8 808922C8 84820168 */ lh $v0, 0x0168($a0) ## 00000168 -/* 003AC 808922CC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003B0 808922D0 240528D4 */ addiu $a1, $zero, 0x28D4 ## $a1 = 000028D4 -/* 003B4 808922D4 10400003 */ beq $v0, $zero, .L808922E4 -/* 003B8 808922D8 244EFFFF */ addiu $t6, $v0, 0xFFFF ## $t6 = FFFFFFFF -/* 003BC 808922DC A48E0168 */ sh $t6, 0x0168($a0) ## 00000168 -/* 003C0 808922E0 84820168 */ lh $v0, 0x0168($a0) ## 00000168 -.L808922E4: -/* 003C4 808922E4 04410004 */ bgez $v0, .L808922F8 -/* 003C8 808922E8 304F0003 */ andi $t7, $v0, 0x0003 ## $t7 = 00000000 -/* 003CC 808922EC 11E00002 */ beq $t7, $zero, .L808922F8 -/* 003D0 808922F0 00000000 */ nop -/* 003D4 808922F4 25EFFFFC */ addiu $t7, $t7, 0xFFFC ## $t7 = FFFFFFFC -.L808922F8: -/* 003D8 808922F8 15E00004 */ bne $t7, $zero, .L8089230C -/* 003DC 808922FC 00000000 */ nop -/* 003E0 80892300 0C00BE0A */ jal Audio_PlayActorSound2 - -/* 003E4 80892304 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003E8 80892308 86020168 */ lh $v0, 0x0168($s0) ## 00000168 -.L8089230C: -/* 003EC 8089230C 14400017 */ bne $v0, $zero, .L8089236C -/* 003F0 80892310 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003F4 80892314 C6040008 */ lwc1 $f4, 0x0008($s0) ## 00000008 -/* 003F8 80892318 C6060010 */ lwc1 $f6, 0x0010($s0) ## 00000010 -/* 003FC 8089231C 2606016C */ addiu $a2, $s0, 0x016C ## $a2 = 0000016C -/* 00400 80892320 E6040024 */ swc1 $f4, 0x0024($s0) ## 00000024 -/* 00404 80892324 E606002C */ swc1 $f6, 0x002C($s0) ## 0000002C -/* 00408 80892328 AFA60024 */ sw $a2, 0x0024($sp) -/* 0040C 8089232C 0C0189B7 */ jal Collider_CylinderUpdate - -/* 00410 80892330 00C02825 */ or $a1, $a2, $zero ## $a1 = 0000016C -/* 00414 80892334 8FA40034 */ lw $a0, 0x0034($sp) -/* 00418 80892338 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0041C 8089233C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00420 80892340 8FA60024 */ lw $a2, 0x0024($sp) -/* 00424 80892344 0C0175E7 */ jal CollisionCheck_SetAT - ## CollisionCheck_setAT -/* 00428 80892348 00812821 */ addu $a1, $a0, $at -/* 0042C 8089234C 8FA40034 */ lw $a0, 0x0034($sp) -/* 00430 80892350 8E06014C */ lw $a2, 0x014C($s0) ## 0000014C -/* 00434 80892354 0C00FAFE */ jal func_8003EBF8 -/* 00438 80892358 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 0043C 8089235C 3C198089 */ lui $t9, %hi(func_80892424) ## $t9 = 80890000 -/* 00440 80892360 27392424 */ addiu $t9, $t9, %lo(func_80892424) ## $t9 = 80892424 -/* 00444 80892364 1000002A */ beq $zero, $zero, .L80892410 -/* 00448 80892368 AE190164 */ sw $t9, 0x0164($s0) ## 00000164 -.L8089236C: -/* 0044C 8089236C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00450 80892370 00000000 */ nop -/* 00454 80892374 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00458 80892378 E7A00028 */ swc1 $f0, 0x0028($sp) -/* 0045C 8089237C 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00460 80892380 44811000 */ mtc1 $at, $f2 ## $f2 = 0.50 -/* 00464 80892384 C7B00028 */ lwc1 $f16, 0x0028($sp) -/* 00468 80892388 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 0046C 8089238C 4602003C */ c.lt.s $f0, $f2 -/* 00470 80892390 46101482 */ mul.s $f18, $f2, $f16 -/* 00474 80892394 45000003 */ bc1f .L808923A4 -/* 00478 80892398 00000000 */ nop -/* 0047C 8089239C 10000001 */ beq $zero, $zero, .L808923A4 -/* 00480 808923A0 2402FFFF */ addiu $v0, $zero, 0xFFFF ## $v0 = FFFFFFFF -.L808923A4: -/* 00484 808923A4 44824000 */ mtc1 $v0, $f8 ## $f8 = NaN -/* 00488 808923A8 46029100 */ add.s $f4, $f18, $f2 -/* 0048C 808923AC 468042A0 */ cvt.s.w $f10, $f8 -/* 00490 808923B0 C6080008 */ lwc1 $f8, 0x0008($s0) ## 00000008 -/* 00494 808923B4 46045182 */ mul.s $f6, $f10, $f4 -/* 00498 808923B8 46083400 */ add.s $f16, $f6, $f8 -/* 0049C 808923BC 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 004A0 808923C0 E6100024 */ swc1 $f16, 0x0024($s0) ## 00000024 -/* 004A4 808923C4 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 004A8 808923C8 E7A00028 */ swc1 $f0, 0x0028($sp) -/* 004AC 808923CC 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 004B0 808923D0 44811000 */ mtc1 $at, $f2 ## $f2 = 0.50 -/* 004B4 808923D4 C7A40028 */ lwc1 $f4, 0x0028($sp) -/* 004B8 808923D8 24020001 */ addiu $v0, $zero, 0x0001 ## $v0 = 00000001 -/* 004BC 808923DC 4602003C */ c.lt.s $f0, $f2 -/* 004C0 808923E0 46041182 */ mul.s $f6, $f2, $f4 -/* 004C4 808923E4 45000003 */ bc1f .L808923F4 -/* 004C8 808923E8 00000000 */ nop -/* 004CC 808923EC 10000001 */ beq $zero, $zero, .L808923F4 -/* 004D0 808923F0 2402FFFF */ addiu $v0, $zero, 0xFFFF ## $v0 = FFFFFFFF -.L808923F4: -/* 004D4 808923F4 44829000 */ mtc1 $v0, $f18 ## $f18 = NaN -/* 004D8 808923F8 46023200 */ add.s $f8, $f6, $f2 -/* 004DC 808923FC 468092A0 */ cvt.s.w $f10, $f18 -/* 004E0 80892400 C6120010 */ lwc1 $f18, 0x0010($s0) ## 00000010 -/* 004E4 80892404 46085402 */ mul.s $f16, $f10, $f8 -/* 004E8 80892408 46128100 */ add.s $f4, $f16, $f18 -/* 004EC 8089240C E604002C */ swc1 $f4, 0x002C($s0) ## 0000002C -.L80892410: -/* 004F0 80892410 8FBF001C */ lw $ra, 0x001C($sp) -/* 004F4 80892414 8FB00018 */ lw $s0, 0x0018($sp) -/* 004F8 80892418 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 004FC 8089241C 03E00008 */ jr $ra -/* 00500 80892420 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892424.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892424.s deleted file mode 100644 index e24d93c6a9..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892424.s +++ /dev/null @@ -1,95 +0,0 @@ -glabel func_80892424 -/* 00504 80892424 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 00508 80892428 AFBF0024 */ sw $ra, 0x0024($sp) -/* 0050C 8089242C AFB10020 */ sw $s1, 0x0020($sp) -/* 00510 80892430 AFB0001C */ sw $s0, 0x001C($sp) -/* 00514 80892434 9082017C */ lbu $v0, 0x017C($a0) ## 0000017C -/* 00518 80892438 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 0051C 8089243C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00520 80892440 304E0002 */ andi $t6, $v0, 0x0002 ## $t6 = 00000000 -/* 00524 80892444 15C00005 */ bne $t6, $zero, .L8089245C -/* 00528 80892448 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 0052C 8089244C 948F0088 */ lhu $t7, 0x0088($a0) ## 00000088 -/* 00530 80892450 31F80001 */ andi $t8, $t7, 0x0001 ## $t8 = 00000000 -/* 00534 80892454 13000022 */ beq $t8, $zero, .L808924E0 -/* 00538 80892458 00000000 */ nop -.L8089245C: -/* 0053C 8089245C C6000080 */ lwc1 $f0, 0x0080($s0) ## 00000080 -/* 00540 80892460 C6040028 */ lwc1 $f4, 0x0028($s0) ## 00000028 -/* 00544 80892464 96080088 */ lhu $t0, 0x0088($s0) ## 00000088 -/* 00548 80892468 3059FFFD */ andi $t9, $v0, 0xFFFD ## $t9 = 00000000 -/* 0054C 8089246C 4600203C */ c.lt.s $f4, $f0 -/* 00550 80892470 3109FFFE */ andi $t1, $t0, 0xFFFE ## $t1 = 00000000 -/* 00554 80892474 A219017C */ sb $t9, 0x017C($s0) ## 0000017C -/* 00558 80892478 A6090088 */ sh $t1, 0x0088($s0) ## 00000088 -/* 0055C 8089247C 45000002 */ bc1f .L80892488 -/* 00560 80892480 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00564 80892484 E6000028 */ swc1 $f0, 0x0028($s0) ## 00000028 -.L80892488: -/* 00568 80892488 0C224810 */ jal func_80892040 -/* 0056C 8089248C 3C064220 */ lui $a2, 0x4220 ## $a2 = 42200000 -/* 00570 80892490 860A001C */ lh $t2, 0x001C($s0) ## 0000001C -/* 00574 80892494 24010002 */ addiu $at, $zero, 0x0002 ## $at = 00000002 -/* 00578 80892498 1541000D */ bne $t2, $at, .L808924D0 -/* 0057C 8089249C 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000 -/* 00580 808924A0 44814000 */ mtc1 $at, $f8 ## $f8 = 120.00 -/* 00584 808924A4 C606000C */ lwc1 $f6, 0x000C($s0) ## 0000000C -/* 00588 808924A8 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 0058C 808924AC 26250810 */ addiu $a1, $s1, 0x0810 ## $a1 = 00000810 -/* 00590 808924B0 46083280 */ add.s $f10, $f6, $f8 -/* 00594 808924B4 8E06014C */ lw $a2, 0x014C($s0) ## 0000014C -/* 00598 808924B8 0C00FB14 */ jal func_8003EC50 -/* 0059C 808924BC E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028 -/* 005A0 808924C0 3C0B8089 */ lui $t3, %hi(func_80892574) ## $t3 = 80890000 -/* 005A4 808924C4 256B2574 */ addiu $t3, $t3, %lo(func_80892574) ## $t3 = 80892574 -/* 005A8 808924C8 10000025 */ beq $zero, $zero, .L80892560 -/* 005AC 808924CC AE0B0164 */ sw $t3, 0x0164($s0) ## 00000164 -.L808924D0: -/* 005B0 808924D0 0C00B55C */ jal Actor_Kill - -/* 005B4 808924D4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 005B8 808924D8 10000022 */ beq $zero, $zero, .L80892564 -/* 005BC 808924DC 8FBF0024 */ lw $ra, 0x0024($sp) -.L808924E0: -/* 005C0 808924E0 0C00B638 */ jal Actor_MoveForward - -/* 005C4 808924E4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 005C8 808924E8 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 005CC 808924EC 44819000 */ mtc1 $at, $f18 ## $f18 = 40.00 -/* 005D0 808924F0 C6100028 */ lwc1 $f16, 0x0028($s0) ## 00000028 -/* 005D4 808924F4 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 005D8 808924F8 240C0004 */ addiu $t4, $zero, 0x0004 ## $t4 = 00000004 -/* 005DC 808924FC 46128100 */ add.s $f4, $f16, $f18 -/* 005E0 80892500 44060000 */ mfc1 $a2, $f0 -/* 005E4 80892504 44070000 */ mfc1 $a3, $f0 -/* 005E8 80892508 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 005EC 8089250C E6040028 */ swc1 $f4, 0x0028($s0) ## 00000028 -/* 005F0 80892510 AFAC0014 */ sw $t4, 0x0014($sp) -/* 005F4 80892514 02002825 */ or $a1, $s0, $zero ## $a1 = 00000000 -/* 005F8 80892518 0C00B92D */ jal func_8002E4B4 -/* 005FC 8089251C E7A00010 */ swc1 $f0, 0x0010($sp) -/* 00600 80892520 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 00604 80892524 44814000 */ mtc1 $at, $f8 ## $f8 = 40.00 -/* 00608 80892528 C6060028 */ lwc1 $f6, 0x0028($s0) ## 00000028 -/* 0060C 8089252C 2606016C */ addiu $a2, $s0, 0x016C ## $a2 = 0000016C -/* 00610 80892530 00C02825 */ or $a1, $a2, $zero ## $a1 = 0000016C -/* 00614 80892534 46083281 */ sub.s $f10, $f6, $f8 -/* 00618 80892538 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 0061C 8089253C E60A0028 */ swc1 $f10, 0x0028($s0) ## 00000028 -/* 00620 80892540 0C0189B7 */ jal Collider_CylinderUpdate - -/* 00624 80892544 AFA6002C */ sw $a2, 0x002C($sp) -/* 00628 80892548 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0062C 8089254C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00630 80892550 8FA6002C */ lw $a2, 0x002C($sp) -/* 00634 80892554 02212821 */ addu $a1, $s1, $at -/* 00638 80892558 0C0175E7 */ jal CollisionCheck_SetAT - ## CollisionCheck_setAT -/* 0063C 8089255C 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -.L80892560: -/* 00640 80892560 8FBF0024 */ lw $ra, 0x0024($sp) -.L80892564: -/* 00644 80892564 8FB0001C */ lw $s0, 0x001C($sp) -/* 00648 80892568 8FB10020 */ lw $s1, 0x0020($sp) -/* 0064C 8089256C 03E00008 */ jr $ra -/* 00650 80892570 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892574.s b/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892574.s deleted file mode 100644 index 67c9e33ec7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892574.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_80892574 -/* 00654 80892574 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00658 80892578 AFBF0014 */ sw $ra, 0x0014($sp) -/* 0065C 8089257C AFA5001C */ sw $a1, 0x001C($sp) -/* 00660 80892580 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00664 80892584 8CE5000C */ lw $a1, 0x000C($a3) ## 0000000C -/* 00668 80892588 AFA70018 */ sw $a3, 0x0018($sp) -/* 0066C 8089258C 24840028 */ addiu $a0, $a0, 0x0028 ## $a0 = 00000028 -/* 00670 80892590 0C01DE80 */ jal Math_ApproxF - -/* 00674 80892594 3C063F80 */ lui $a2, 0x3F80 ## $a2 = 3F800000 -/* 00678 80892598 10400006 */ beq $v0, $zero, .L808925B4 -/* 0067C 8089259C 8FA70018 */ lw $a3, 0x0018($sp) -/* 00680 808925A0 44802000 */ mtc1 $zero, $f4 ## $f4 = 0.00 -/* 00684 808925A4 3C0E8089 */ lui $t6, %hi(func_80892280) ## $t6 = 80890000 -/* 00688 808925A8 25CE2280 */ addiu $t6, $t6, %lo(func_80892280) ## $t6 = 80892280 -/* 0068C 808925AC ACEE0164 */ sw $t6, 0x0164($a3) ## 00000164 -/* 00690 808925B0 E4E40060 */ swc1 $f4, 0x0060($a3) ## 00000060 -.L808925B4: -/* 00694 808925B4 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00698 808925B8 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 0069C 808925BC 03E00008 */ jr $ra -/* 006A0 808925C0 00000000 */ nop diff --git a/data/overlays/actors/z_bg_ice_turara.data.s b/data/overlays/actors/z_bg_ice_turara.data.s deleted file mode 100644 index 8149d52864..0000000000 --- a/data/overlays/actors/z_bg_ice_turara.data.s +++ /dev/null @@ -1,28 +0,0 @@ -.include "macro.inc" - - # assembler directives - .set noat # allow manual use of $at - .set noreorder # don't insert nops after branches - .set gp=64 # allow use of 64-bit general purpose registers - -.section .data - -.balign 16 - -glabel D_80892620 - .word 0x0A110900, 0x20010000, 0x00000000, 0xFFCFFFFF, 0x00040000, 0x4FC007CA, 0x00000000, 0x01010000, 0x000D0078, 0x00000000, 0x00000000 -glabel Bg_Ice_Turara_InitVars - .word 0x01C70600, 0x00000000, 0x006B0000, 0x000001B8 -.word BgIceTurara_Init -.word BgIceTurara_Destroy -.word BgIceTurara_Update -.word BgIceTurara_Draw -glabel D_8089266C - .word 0xB0F80258, 0xB06CFFFD, 0xB070FFE2, 0x48500064 -glabel D_8089267C - .word 0x00000000, 0xBF800000, 0x00000000 -glabel D_80892688 - .word 0xAAFFFFFF -glabel D_8089268C - .word 0x003264FF - diff --git a/data/overlays/actors/z_bg_ice_turara.reloc.s b/data/overlays/actors/z_bg_ice_turara.reloc.s deleted file mode 100644 index 8889cf2fa4..0000000000 --- a/data/overlays/actors/z_bg_ice_turara.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_808926A0 - .incbin "baserom/ovl_Bg_Ice_Turara", 0x780, 0x000000A0 diff --git a/spec b/spec index 4908133d6b..90e94350dd 100644 --- a/spec +++ b/spec @@ -930,8 +930,7 @@ endseg beginseg name "ovl_Bg_Ice_Turara" include "build/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.o" - include "build/data/overlays/actors/z_bg_ice_turara.data.o" - include "build/data/overlays/actors/z_bg_ice_turara.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Ice_Turara/ovl_Bg_Ice_Turara_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c index 89118bf75e..1a1272bfa8 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c +++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c @@ -15,7 +15,21 @@ void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Update(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Draw(Actor* thisx, GlobalContext* globalCtx); -/* +void BgIceTurara_Stalagmite(BgIceTurara* this, GlobalContext* globalCtx); +void BgIceTurara_Wait(BgIceTurara* this, GlobalContext* globalCtx); +void BgIceTurara_Shiver(BgIceTurara* this, GlobalContext* globalCtx); +void BgIceTurara_Fall(BgIceTurara* this, GlobalContext* globalCtx); +void BgIceTurara_Regrow(BgIceTurara* this, GlobalContext* globalCtx); + +static ColliderCylinderInit sCylinderInit = { + { COLTYPE_UNK10, 0x11, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER }, + { 0x00, { 0xFFCFFFFF, 0x00, 0x04 }, { 0x4FC007CA, 0x00, 0x00 }, 0x01, 0x01, 0x00 }, + { 13, 120, 0, { 0, 0, 0 } }, +}; + +extern Gfx D_060023D0[]; +extern ColHeader D_06002594; + const ActorInit Bg_Ice_Turara_InitVars = { ACTOR_BG_ICE_TURARA, ACTORTYPE_PROP, @@ -27,23 +41,152 @@ const ActorInit Bg_Ice_Turara_InitVars = { (ActorFunc)BgIceTurara_Update, (ActorFunc)BgIceTurara_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Init.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Destroy.s") +InitChainEntry sInitChain[] = { + ICHAIN_F32(uncullZoneScale, 600, ICHAIN_CONTINUE), + ICHAIN_F32(gravity, -3, ICHAIN_CONTINUE), + ICHAIN_F32(minVelocityY, -30, ICHAIN_CONTINUE), + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892040.s") +void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx) { + BgIceTurara* this = THIS; + s32 pad; + ColHeader* colHeader = NULL; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892220.s") + Actor_ProcessInitChain(&this->dyna.actor, sInitChain); + DynaPolyInfo_SetActorMove(&this->dyna, 0); + DynaPolyInfo_Alloc(&D_06002594, &colHeader); + Collider_InitCylinder(globalCtx, &this->collider); + Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit); + Collider_CylinderUpdate(&this->dyna.actor, &this->collider); + this->dyna.dynaPolyId = + DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); + if (this->dyna.actor.params == TURARA_STALAGMITE) { + this->actionFunc = BgIceTurara_Stalagmite; + } else { + this->dyna.actor.shape.rot.x = -0x8000; + this->dyna.actor.shape.unk_08 = 1200.0f; + this->actionFunc = BgIceTurara_Wait; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892280.s") +void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgIceTurara* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_808922B8.s") + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + Collider_DestroyCylinder(globalCtx, &this->collider); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892424.s") +void BgIceTurara_Break(BgIceTurara* this, GlobalContext* globalCtx, f32 arg2) { + static Vec3f accel = { 0.0f, -1.0f, 0.0f }; + static Color_RGBA8 primColor = { 170, 255, 255, 255 }; + static Color_RGBA8 envColor = { 0, 50, 100, 255 }; + Vec3f vel; + Vec3f pos; + s32 j; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/func_80892574.s") + Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.posRot.pos, 30, NA_SE_EV_ICE_BROKEN); + for (i = 0; i < 2; i++) { + for (j = 0; j < 10; j++) { + pos.x = this->dyna.actor.posRot.pos.x + Math_Rand_CenteredFloat(8.0f); + pos.y = this->dyna.actor.posRot.pos.y + (Math_Rand_ZeroOne() * arg2) + (i * arg2); + pos.z = this->dyna.actor.posRot.pos.z + Math_Rand_CenteredFloat(8.0f); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Update.s") + vel.x = Math_Rand_CenteredFloat(7.0f); + vel.z = Math_Rand_CenteredFloat(7.0f); + vel.y = (Math_Rand_ZeroOne() * 4.0f) + 8.0f; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Ice_Turara/BgIceTurara_Draw.s") + EffectSsEnIce_Spawn(globalCtx, &pos, (Math_Rand_ZeroOne() * 0.2f) + 0.1f, &vel, &accel, &primColor, + &envColor, 30); + } + } +} + +void BgIceTurara_Stalagmite(BgIceTurara* this, GlobalContext* globalCtx) { + if (this->collider.base.acFlags & 2) { + BgIceTurara_Break(this, globalCtx, 50.0f); + Actor_Kill(&this->dyna.actor); + return; + } + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); +} + +void BgIceTurara_Wait(BgIceTurara* this, GlobalContext* globalCtx) { + if (this->dyna.actor.xzDistFromLink < 60.0f) { + this->shiverTimer = 10; + this->actionFunc = BgIceTurara_Shiver; + } +} + +void BgIceTurara_Shiver(BgIceTurara* this, GlobalContext* globalCtx) { + s16 phi_v0_3; + s16 phi_v0_2; + f32 sp28; + + if (this->shiverTimer != 0) { + this->shiverTimer--; + } + if (!(this->shiverTimer % 4)) { + Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_ICE_SWING); + } + if (this->shiverTimer == 0) { + this->dyna.actor.posRot.pos.x = this->dyna.actor.initPosRot.pos.x; + this->dyna.actor.posRot.pos.z = this->dyna.actor.initPosRot.pos.z; + Collider_CylinderUpdate(&this->dyna.actor, &this->collider); + CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); + func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + this->actionFunc = BgIceTurara_Fall; + } else { + sp28 = Math_Rand_ZeroOne(); + phi_v0_2 = (Math_Rand_ZeroOne() < 0.5f ? -1 : 1); + this->dyna.actor.posRot.pos.x = (phi_v0_2 * ((0.5f * sp28) + 0.5f)) + this->dyna.actor.initPosRot.pos.x; + sp28 = Math_Rand_ZeroOne(); + phi_v0_3 = (Math_Rand_ZeroOne() < 0.5f ? -1 : 1); + this->dyna.actor.posRot.pos.z = (phi_v0_3 * ((0.5f * sp28) + 0.5f)) + this->dyna.actor.initPosRot.pos.z; + } +} + +void BgIceTurara_Fall(BgIceTurara* this, GlobalContext* globalCtx) { + if ((this->collider.base.atFlags & 2) || (this->dyna.actor.bgCheckFlags & 1)) { + this->collider.base.atFlags &= ~2; + this->dyna.actor.bgCheckFlags &= ~1; + if (this->dyna.actor.posRot.pos.y < this->dyna.actor.groundY) { + this->dyna.actor.posRot.pos.y = this->dyna.actor.groundY; + } + BgIceTurara_Break(this, globalCtx, 40.0f); + if (this->dyna.actor.params == TURARA_STALACTITE_REGROW) { + this->dyna.actor.posRot.pos.y = this->dyna.actor.initPosRot.pos.y + 120.0f; + func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + this->actionFunc = BgIceTurara_Regrow; + } else { + Actor_Kill(&this->dyna.actor); + return; + } + } else { + Actor_MoveForward(&this->dyna.actor); + this->dyna.actor.posRot.pos.y += 40.0f; + func_8002E4B4(globalCtx, &this->dyna.actor, 0.0f, 0.0f, 0.0f, 4); + this->dyna.actor.posRot.pos.y -= 40.0f; + Collider_CylinderUpdate(&this->dyna.actor, &this->collider); + CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); + } +} + +void BgIceTurara_Regrow(BgIceTurara* this, GlobalContext* globalCtx) { + if (Math_ApproxF(&this->dyna.actor.posRot.pos.y, this->dyna.actor.initPosRot.pos.y, 1.0f)) { + this->actionFunc = BgIceTurara_Wait; + this->dyna.actor.velocity.y = 0.0f; + } +} + +void BgIceTurara_Update(Actor* thisx, GlobalContext* globalCtx) { + BgIceTurara* this = THIS; + + this->actionFunc(this, globalCtx); +} + +void BgIceTurara_Draw(Actor* thisx, GlobalContext* globalCtx) { + Gfx_DrawDListOpa(globalCtx, D_060023D0); +} diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h index c469cdaf2a..6704accbee 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h +++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.h @@ -6,9 +6,19 @@ struct BgIceTurara; +typedef void (*BgIceTuraraActionFunc)(struct BgIceTurara*, GlobalContext*); + +typedef enum { + /* 0 */ TURARA_STALAGMITE, + /* 1 */ TURARA_STALACTITE, + /* 2 */ TURARA_STALACTITE_REGROW +} BgIceTuraraType; + typedef struct BgIceTurara { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x6C]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ BgIceTuraraActionFunc actionFunc; + /* 0x0168 */ s16 shiverTimer; + /* 0x016C */ ColliderCylinder collider; } BgIceTurara; // size = 0x01B8 extern const ActorInit Bg_Ice_Turara_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index c3b3e087a0..9d3ae08b9c 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -1387,3 +1387,8 @@ D_06002530 = 0x06002530; D_060000E8 = 0x060000E8; D_060023B0 = 0x060023B0; D_06002428 = 0x06002428; + +// z_bg_ice_turara +D_060023D0 = 0x060023D0; +D_06002594 = 0x06002594; +