From 468c59279251bc52393c66fb86630c3079a597f7 Mon Sep 17 00:00:00 2001 From: i82orbom Date: Sat, 29 Aug 2020 03:14:20 +0200 Subject: [PATCH] Decompiles z_bg_spot11_bakudankabe.c (#355) * Starts z_bg_spot11_bakudankabe * BgSpot11Bakudankabe_Init * BgSpot11Bakudankabe_Destroy * BgSpot11Bakudankabe_Update * BgSpot11Bakudankabe_Draw * func_808B2180 * func_808B2218 WIP * Finishes z_bg_spot11_bakudankabe.c * Removes forward declared function * Addresses PR comments Co-authored-by: i82orbom --- .../BgSpot11Bakudankabe_Destroy.s | 21 -- .../BgSpot11Bakudankabe_Draw.s | 13 -- .../BgSpot11Bakudankabe_Init.s | 58 ----- .../BgSpot11Bakudankabe_Update.s | 45 ---- .../ovl_Bg_Spot11_Bakudankabe/func_808B2180.s | 41 ---- .../ovl_Bg_Spot11_Bakudankabe/func_808B2218.s | 218 ------------------ .../actors/z_bg_spot11_bakudankabe.data.s | 24 -- .../actors/z_bg_spot11_bakudankabe.reloc.s | 13 -- spec | 3 +- .../z_bg_spot11_bakudankabe.c | 117 +++++++++- .../z_bg_spot11_bakudankabe.h | 4 +- undefined_syms.txt | 5 + 12 files changed, 117 insertions(+), 445 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s delete mode 100644 data/overlays/actors/z_bg_spot11_bakudankabe.data.s delete mode 100644 data/overlays/actors/z_bg_spot11_bakudankabe.reloc.s diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s deleted file mode 100644 index ad6bd959f7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s +++ /dev/null @@ -1,21 +0,0 @@ -glabel BgSpot11Bakudankabe_Destroy -/* 00454 808B25D4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00458 808B25D8 AFA40018 */ sw $a0, 0x0018($sp) -/* 0045C 808B25DC 8FAE0018 */ lw $t6, 0x0018($sp) -/* 00460 808B25E0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00464 808B25E4 00A03825 */ or $a3, $a1, $zero ## $a3 = 00000000 -/* 00468 808B25E8 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 0046C 808B25EC 8DC6014C */ lw $a2, 0x014C($t6) ## 0000014C -/* 00470 808B25F0 AFA7001C */ sw $a3, 0x001C($sp) -/* 00474 808B25F4 0C00FB56 */ jal DynaPolyInfo_Free - ## DynaPolyInfo_delReserve -/* 00478 808B25F8 24A50810 */ addiu $a1, $a1, 0x0810 ## $a1 = 00000810 -/* 0047C 808B25FC 8FA50018 */ lw $a1, 0x0018($sp) -/* 00480 808B2600 8FA4001C */ lw $a0, 0x001C($sp) -/* 00484 808B2604 0C0170EB */ jal Collider_DestroyCylinder - -/* 00488 808B2608 24A50164 */ addiu $a1, $a1, 0x0164 ## $a1 = 00000164 -/* 0048C 808B260C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00490 808B2610 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00494 808B2614 03E00008 */ jr $ra -/* 00498 808B2618 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s deleted file mode 100644 index a2a8c8cfd9..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s +++ /dev/null @@ -1,13 +0,0 @@ -glabel BgSpot11Bakudankabe_Draw -/* 00534 808B26B4 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 00538 808B26B8 AFA40018 */ sw $a0, 0x0018($sp) -/* 0053C 808B26BC 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00540 808B26C0 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00544 808B26C4 3C050600 */ lui $a1, 0x0600 ## $a1 = 06000000 -/* 00548 808B26C8 0C00D498 */ jal Gfx_DrawDListOpa - -/* 0054C 808B26CC 24A51980 */ addiu $a1, $a1, 0x1980 ## $a1 = 06001980 -/* 00550 808B26D0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00554 808B26D4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00558 808B26D8 03E00008 */ jr $ra -/* 0055C 808B26DC 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s deleted file mode 100644 index 499deace6c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s +++ /dev/null @@ -1,58 +0,0 @@ -.rdata -glabel D_808B2750 - .asciz "(spot11 爆弾壁)(arg_data 0x%04x)\n" - .balign 4 - -.text -glabel BgSpot11Bakudankabe_Init -/* 003AC 808B252C 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 003B0 808B2530 AFBF001C */ sw $ra, 0x001C($sp) -/* 003B4 808B2534 AFB00018 */ sw $s0, 0x0018($sp) -/* 003B8 808B2538 AFA50034 */ sw $a1, 0x0034($sp) -/* 003BC 808B253C 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003C0 808B2540 AFA00024 */ sw $zero, 0x0024($sp) -/* 003C4 808B2544 0C010D20 */ jal DynaPolyInfo_SetActorMove - -/* 003C8 808B2548 00002825 */ or $a1, $zero, $zero ## $a1 = 00000000 -/* 003CC 808B254C 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 003D0 808B2550 8FA40034 */ lw $a0, 0x0034($sp) -/* 003D4 808B2554 0C00B2D0 */ jal Flags_GetSwitch - -/* 003D8 808B2558 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 003DC 808B255C 10400005 */ beq $v0, $zero, .L808B2574 -/* 003E0 808B2560 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003E4 808B2564 0C00B55C */ jal Actor_Kill - -/* 003E8 808B2568 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 003EC 808B256C 10000015 */ beq $zero, $zero, .L808B25C4 -/* 003F0 808B2570 8FBF001C */ lw $ra, 0x001C($sp) -.L808B2574: -/* 003F4 808B2574 0C22C860 */ jal func_808B2180 -/* 003F8 808B2578 8FA50034 */ lw $a1, 0x0034($sp) -/* 003FC 808B257C 3C040600 */ lui $a0, 0x0600 ## $a0 = 06000000 -/* 00400 808B2580 24841A58 */ addiu $a0, $a0, 0x1A58 ## $a0 = 06001A58 -/* 00404 808B2584 0C010620 */ jal DynaPolyInfo_Alloc - -/* 00408 808B2588 27A50024 */ addiu $a1, $sp, 0x0024 ## $a1 = FFFFFFF4 -/* 0040C 808B258C 8FA40034 */ lw $a0, 0x0034($sp) -/* 00410 808B2590 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 00414 808B2594 8FA70024 */ lw $a3, 0x0024($sp) -/* 00418 808B2598 0C00FA9D */ jal DynaPolyInfo_RegisterActor - ## DynaPolyInfo_setActor -/* 0041C 808B259C 24850810 */ addiu $a1, $a0, 0x0810 ## $a1 = 00000810 -/* 00420 808B25A0 AE02014C */ sw $v0, 0x014C($s0) ## 0000014C -/* 00424 808B25A4 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00428 808B25A8 0C00B58B */ jal Actor_SetScale - -/* 0042C 808B25AC 3C053F80 */ lui $a1, 0x3F80 ## $a1 = 3F800000 -/* 00430 808B25B0 3C04808B */ lui $a0, %hi(D_808B2750) ## $a0 = 808B0000 -/* 00434 808B25B4 24842750 */ addiu $a0, $a0, %lo(D_808B2750) ## $a0 = 808B2750 -/* 00438 808B25B8 0C00084C */ jal osSyncPrintf - -/* 0043C 808B25BC 8605001C */ lh $a1, 0x001C($s0) ## 0000001C -/* 00440 808B25C0 8FBF001C */ lw $ra, 0x001C($sp) -.L808B25C4: -/* 00444 808B25C4 8FB00018 */ lw $s0, 0x0018($sp) -/* 00448 808B25C8 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 0044C 808B25CC 03E00008 */ jr $ra -/* 00450 808B25D0 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s deleted file mode 100644 index fed1eded9c..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s +++ /dev/null @@ -1,45 +0,0 @@ -glabel BgSpot11Bakudankabe_Update -/* 0049C 808B261C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 004A0 808B2620 AFBF001C */ sw $ra, 0x001C($sp) -/* 004A4 808B2624 AFB10018 */ sw $s1, 0x0018($sp) -/* 004A8 808B2628 AFB00014 */ sw $s0, 0x0014($sp) -/* 004AC 808B262C 908E0175 */ lbu $t6, 0x0175($a0) ## 00000175 -/* 004B0 808B2630 00A08025 */ or $s0, $a1, $zero ## $s0 = 00000000 -/* 004B4 808B2634 00808825 */ or $s1, $a0, $zero ## $s1 = 00000000 -/* 004B8 808B2638 31CF0002 */ andi $t7, $t6, 0x0002 ## $t7 = 00000000 -/* 004BC 808B263C 11E00013 */ beq $t7, $zero, .L808B268C -/* 004C0 808B2640 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 004C4 808B2644 0C22C886 */ jal func_808B2218 -/* 004C8 808B2648 00000000 */ nop -/* 004CC 808B264C 8625001C */ lh $a1, 0x001C($s1) ## 0000001C -/* 004D0 808B2650 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 004D4 808B2654 0C00B2DD */ jal Flags_SetSwitch - -/* 004D8 808B2658 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 004DC 808B265C 3C05808B */ lui $a1, %hi(D_808B2738) ## $a1 = 808B0000 -/* 004E0 808B2660 24A52738 */ addiu $a1, $a1, %lo(D_808B2738) ## $a1 = 808B2738 -/* 004E4 808B2664 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 004E8 808B2668 24060028 */ addiu $a2, $zero, 0x0028 ## $a2 = 00000028 -/* 004EC 808B266C 0C01AEB6 */ jal Audio_PlaySoundAtPosition - -/* 004F0 808B2670 24072810 */ addiu $a3, $zero, 0x2810 ## $a3 = 00002810 -/* 004F4 808B2674 0C01E221 */ jal func_80078884 -/* 004F8 808B2678 24044802 */ addiu $a0, $zero, 0x4802 ## $a0 = 00004802 -/* 004FC 808B267C 0C00B55C */ jal Actor_Kill - -/* 00500 808B2680 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00504 808B2684 10000007 */ beq $zero, $zero, .L808B26A4 -/* 00508 808B2688 8FBF001C */ lw $ra, 0x001C($sp) -.L808B268C: -/* 0050C 808B268C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00001E60 -/* 00510 808B2690 02012821 */ addu $a1, $s0, $at -/* 00514 808B2694 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00518 808B2698 0C01767D */ jal CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 0051C 808B269C 26260164 */ addiu $a2, $s1, 0x0164 ## $a2 = 00000164 -/* 00520 808B26A0 8FBF001C */ lw $ra, 0x001C($sp) -.L808B26A4: -/* 00524 808B26A4 8FB00014 */ lw $s0, 0x0014($sp) -/* 00528 808B26A8 8FB10018 */ lw $s1, 0x0018($sp) -/* 0052C 808B26AC 03E00008 */ jr $ra -/* 00530 808B26B0 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s deleted file mode 100644 index bce11791b1..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s +++ /dev/null @@ -1,41 +0,0 @@ -glabel func_808B2180 -/* 00000 808B2180 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00004 808B2184 00803025 */ or $a2, $a0, $zero ## $a2 = 00000000 -/* 00008 808B2188 AFA50024 */ sw $a1, 0x0024($sp) -/* 0000C 808B218C 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00010 808B2190 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00014 808B2194 24C50164 */ addiu $a1, $a2, 0x0164 ## $a1 = 00000164 -/* 00018 808B2198 AFA50018 */ sw $a1, 0x0018($sp) -/* 0001C 808B219C 0C0170D9 */ jal Collider_InitCylinder - -/* 00020 808B21A0 AFA60020 */ sw $a2, 0x0020($sp) -/* 00024 808B21A4 3C07808B */ lui $a3, %hi(D_808B2700) ## $a3 = 808B0000 -/* 00028 808B21A8 8FA50018 */ lw $a1, 0x0018($sp) -/* 0002C 808B21AC 8FA60020 */ lw $a2, 0x0020($sp) -/* 00030 808B21B0 24E72700 */ addiu $a3, $a3, %lo(D_808B2700) ## $a3 = 808B2700 -/* 00034 808B21B4 0C01712B */ jal Collider_SetCylinder - -/* 00038 808B21B8 8FA40024 */ lw $a0, 0x0024($sp) -/* 0003C 808B21BC 8FA60020 */ lw $a2, 0x0020($sp) -/* 00040 808B21C0 C4C40024 */ lwc1 $f4, 0x0024($a2) ## 00000024 -/* 00044 808B21C4 C4C80028 */ lwc1 $f8, 0x0028($a2) ## 00000028 -/* 00048 808B21C8 C4D0002C */ lwc1 $f16, 0x002C($a2) ## 0000002C -/* 0004C 808B21CC 4600218D */ trunc.w.s $f6, $f4 -/* 00050 808B21D0 84CE01AA */ lh $t6, 0x01AA($a2) ## 000001AA -/* 00054 808B21D4 84CA01AC */ lh $t2, 0x01AC($a2) ## 000001AC -/* 00058 808B21D8 4600428D */ trunc.w.s $f10, $f8 -/* 0005C 808B21DC 44083000 */ mfc1 $t0, $f6 -/* 00060 808B21E0 84D901AE */ lh $t9, 0x01AE($a2) ## 000001AE -/* 00064 808B21E4 4600848D */ trunc.w.s $f18, $f16 -/* 00068 808B21E8 440F5000 */ mfc1 $t7, $f10 -/* 0006C 808B21EC 01C84821 */ addu $t1, $t6, $t0 -/* 00070 808B21F0 A4C901AA */ sh $t1, 0x01AA($a2) ## 000001AA -/* 00074 808B21F4 440B9000 */ mfc1 $t3, $f18 -/* 00078 808B21F8 014FC021 */ addu $t8, $t2, $t7 -/* 0007C 808B21FC A4D801AC */ sh $t8, 0x01AC($a2) ## 000001AC -/* 00080 808B2200 032B6021 */ addu $t4, $t9, $t3 -/* 00084 808B2204 A4CC01AE */ sh $t4, 0x01AE($a2) ## 000001AE -/* 00088 808B2208 8FBF0014 */ lw $ra, 0x0014($sp) -/* 0008C 808B220C 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 00090 808B2210 03E00008 */ jr $ra -/* 00094 808B2214 00000000 */ nop diff --git a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s b/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s deleted file mode 100644 index 052f8f90b2..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s +++ /dev/null @@ -1,218 +0,0 @@ -.late_rodata -glabel D_808B2774 - .float 0.2 -glabel D_808B2778 - .float 0.4 - -.text -glabel func_808B2218 -/* 00098 808B2218 27BDFF28 */ addiu $sp, $sp, 0xFF28 ## $sp = FFFFFF28 -/* 0009C 808B221C F7BE0070 */ sdc1 $f30, 0x0070($sp) -/* 000A0 808B2220 3C01808B */ lui $at, %hi(D_808B2774) ## $at = 808B0000 -/* 000A4 808B2224 C43E2774 */ lwc1 $f30, %lo(D_808B2774)($at) -/* 000A8 808B2228 F7BC0068 */ sdc1 $f28, 0x0068($sp) -/* 000AC 808B222C 3C0141A0 */ lui $at, 0x41A0 ## $at = 41A00000 -/* 000B0 808B2230 4481E000 */ mtc1 $at, $f28 ## $f28 = 20.00 -/* 000B4 808B2234 F7BA0060 */ sdc1 $f26, 0x0060($sp) -/* 000B8 808B2238 3C0140D0 */ lui $at, 0x40D0 ## $at = 40D00000 -/* 000BC 808B223C 4481D000 */ mtc1 $at, $f26 ## $f26 = 6.50 -/* 000C0 808B2240 F7B80058 */ sdc1 $f24, 0x0058($sp) -/* 000C4 808B2244 3C0141F0 */ lui $at, 0x41F0 ## $at = 41F00000 -/* 000C8 808B2248 4481C000 */ mtc1 $at, $f24 ## $f24 = 30.00 -/* 000CC 808B224C 44800000 */ mtc1 $zero, $f0 ## $f0 = 0.00 -/* 000D0 808B2250 F7B60050 */ sdc1 $f22, 0x0050($sp) -/* 000D4 808B2254 3C0142F0 */ lui $at, 0x42F0 ## $at = 42F00000 -/* 000D8 808B2258 4481B000 */ mtc1 $at, $f22 ## $f22 = 120.00 -/* 000DC 808B225C AFB70094 */ sw $s7, 0x0094($sp) -/* 000E0 808B2260 F7B40048 */ sdc1 $f20, 0x0048($sp) -/* 000E4 808B2264 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 000E8 808B2268 AFBE0098 */ sw $s8, 0x0098($sp) -/* 000EC 808B226C AFB60090 */ sw $s6, 0x0090($sp) -/* 000F0 808B2270 AFB5008C */ sw $s5, 0x008C($sp) -/* 000F4 808B2274 AFB20080 */ sw $s2, 0x0080($sp) -/* 000F8 808B2278 AFB1007C */ sw $s1, 0x007C($sp) -/* 000FC 808B227C 3C170501 */ lui $s7, 0x0501 ## $s7 = 05010000 -/* 00100 808B2280 4481A000 */ mtc1 $at, $f20 ## $f20 = 0.50 -/* 00104 808B2284 AFBF009C */ sw $ra, 0x009C($sp) -/* 00108 808B2288 AFB40088 */ sw $s4, 0x0088($sp) -/* 0010C 808B228C AFB30084 */ sw $s3, 0x0084($sp) -/* 00110 808B2290 AFB00078 */ sw $s0, 0x0078($sp) -/* 00114 808B2294 AFA500DC */ sw $a1, 0x00DC($sp) -/* 00118 808B2298 26F7A880 */ addiu $s7, $s7, 0xA880 ## $s7 = 0500A880 -/* 0011C 808B229C 00008825 */ or $s1, $zero, $zero ## $s1 = 00000000 -/* 00120 808B22A0 27B200C8 */ addiu $s2, $sp, 0x00C8 ## $s2 = FFFFFFF0 -/* 00124 808B22A4 24950024 */ addiu $s5, $a0, 0x0024 ## $s5 = 00000024 -/* 00128 808B22A8 27B600BC */ addiu $s6, $sp, 0x00BC ## $s6 = FFFFFFE4 -/* 0012C 808B22AC 241E0014 */ addiu $s8, $zero, 0x0014 ## $s8 = 00000014 -/* 00130 808B22B0 E7A000C4 */ swc1 $f0, 0x00C4($sp) -/* 00134 808B22B4 E7A000BC */ swc1 $f0, 0x00BC($sp) -.L808B22B8: -/* 00138 808B22B8 3C05808B */ lui $a1, %hi(D_808B272C) ## $a1 = 808B0000 -/* 0013C 808B22BC 24A5272C */ addiu $a1, $a1, %lo(D_808B272C) ## $a1 = 808B272C -/* 00140 808B22C0 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000024 -/* 00144 808B22C4 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 00148 808B22C8 02403025 */ or $a2, $s2, $zero ## $a2 = FFFFFFF0 -/* 0014C 808B22CC 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00150 808B22D0 00000000 */ nop -/* 00154 808B22D4 46140181 */ sub.s $f6, $f0, $f20 -/* 00158 808B22D8 44919000 */ mtc1 $s1, $f18 ## $f18 = 0.00 -/* 0015C 808B22DC C7A400C8 */ lwc1 $f4, 0x00C8($sp) -/* 00160 808B22E0 C7B000CC */ lwc1 $f16, 0x00CC($sp) -/* 00164 808B22E4 46163202 */ mul.s $f8, $f6, $f22 -/* 00168 808B22E8 468091A0 */ cvt.s.w $f6, $f18 -/* 0016C 808B22EC 46082280 */ add.s $f10, $f4, $f8 -/* 00170 808B22F0 461A3102 */ mul.s $f4, $f6, $f26 -/* 00174 808B22F4 E7AA00C8 */ swc1 $f10, 0x00C8($sp) -/* 00178 808B22F8 4604C200 */ add.s $f8, $f24, $f4 -/* 0017C 808B22FC 46088280 */ add.s $f10, $f16, $f8 -/* 00180 808B2300 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00184 808B2304 E7AA00CC */ swc1 $f10, 0x00CC($sp) -/* 00188 808B2308 46140181 */ sub.s $f6, $f0, $f20 -/* 0018C 808B230C C7B200D0 */ lwc1 $f18, 0x00D0($sp) -/* 00190 808B2310 461C3102 */ mul.s $f4, $f6, $f28 -/* 00194 808B2314 46049400 */ add.s $f16, $f18, $f4 -/* 00198 808B2318 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 0019C 808B231C E7B000D0 */ swc1 $f16, 0x00D0($sp) -/* 001A0 808B2320 461E0201 */ sub.s $f8, $f0, $f30 -/* 001A4 808B2324 3C014140 */ lui $at, 0x4140 ## $at = 41400000 -/* 001A8 808B2328 44815000 */ mtc1 $at, $f10 ## $f10 = 12.00 -/* 001AC 808B232C 00000000 */ nop -/* 001B0 808B2330 460A4182 */ mul.s $f6, $f8, $f10 -/* 001B4 808B2334 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 001B8 808B2338 E7A600C0 */ swc1 $f6, 0x00C0($sp) -/* 001BC 808B233C 3C01425C */ lui $at, 0x425C ## $at = 425C0000 -/* 001C0 808B2340 44819000 */ mtc1 $at, $f18 ## $f18 = 55.00 -/* 001C4 808B2344 3C014100 */ lui $at, 0x4100 ## $at = 41000000 -/* 001C8 808B2348 44818000 */ mtc1 $at, $f16 ## $f16 = 8.00 -/* 001CC 808B234C 46120102 */ mul.s $f4, $f0, $f18 -/* 001D0 808B2350 46102200 */ add.s $f8, $f4, $f16 -/* 001D4 808B2354 4600428D */ trunc.w.s $f10, $f8 -/* 001D8 808B2358 44025000 */ mfc1 $v0, $f10 -/* 001DC 808B235C 00000000 */ nop -/* 001E0 808B2360 00021C00 */ sll $v1, $v0, 16 -/* 001E4 808B2364 00031C03 */ sra $v1, $v1, 16 -/* 001E8 808B2368 28610014 */ slti $at, $v1, 0x0014 -/* 001EC 808B236C 00029C00 */ sll $s3, $v0, 16 -/* 001F0 808B2370 10200003 */ beq $at, $zero, .L808B2380 -/* 001F4 808B2374 00139C03 */ sra $s3, $s3, 16 -/* 001F8 808B2378 10000006 */ beq $zero, $zero, .L808B2394 -/* 001FC 808B237C 2410FED4 */ addiu $s0, $zero, 0xFED4 ## $s0 = FFFFFED4 -.L808B2380: -/* 00200 808B2380 28610023 */ slti $at, $v1, 0x0023 -/* 00204 808B2384 10200003 */ beq $at, $zero, .L808B2394 -/* 00208 808B2388 2410FE5C */ addiu $s0, $zero, 0xFE5C ## $s0 = FFFFFE5C -/* 0020C 808B238C 10000001 */ beq $zero, $zero, .L808B2394 -/* 00210 808B2390 2410FE98 */ addiu $s0, $zero, 0xFE98 ## $s0 = FFFFFE98 -.L808B2394: -/* 00214 808B2394 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00218 808B2398 00000000 */ nop -/* 0021C 808B239C 3C01808B */ lui $at, %hi(D_808B2778) ## $at = 808B0000 -/* 00220 808B23A0 C4262778 */ lwc1 $f6, %lo(D_808B2778)($at) -/* 00224 808B23A4 8FA400DC */ lw $a0, 0x00DC($sp) -/* 00228 808B23A8 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 0022C 808B23AC 4606003C */ c.lt.s $f0, $f6 -/* 00230 808B23B0 02C03025 */ or $a2, $s6, $zero ## $a2 = FFFFFFE4 -/* 00234 808B23B4 02403825 */ or $a3, $s2, $zero ## $a3 = FFFFFFF0 -/* 00238 808B23B8 240F001E */ addiu $t7, $zero, 0x001E ## $t7 = 0000001E -/* 0023C 808B23BC 45000003 */ bc1f .L808B23CC -/* 00240 808B23C0 24180004 */ addiu $t8, $zero, 0x0004 ## $t8 = 00000004 -/* 00244 808B23C4 10000002 */ beq $zero, $zero, .L808B23D0 -/* 00248 808B23C8 24020041 */ addiu $v0, $zero, 0x0041 ## $v0 = 00000041 -.L808B23CC: -/* 0024C 808B23CC 24020021 */ addiu $v0, $zero, 0x0021 ## $v0 = 00000021 -.L808B23D0: -/* 00250 808B23D0 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 00254 808B23D4 24080003 */ addiu $t0, $zero, 0x0003 ## $t0 = 00000003 -/* 00258 808B23D8 24090050 */ addiu $t1, $zero, 0x0050 ## $t1 = 00000050 -/* 0025C 808B23DC 240AFFFF */ addiu $t2, $zero, 0xFFFF ## $t2 = FFFFFFFF -/* 00260 808B23E0 240B0002 */ addiu $t3, $zero, 0x0002 ## $t3 = 00000002 -/* 00264 808B23E4 AFAB0038 */ sw $t3, 0x0038($sp) -/* 00268 808B23E8 AFAA0034 */ sw $t2, 0x0034($sp) -/* 0026C 808B23EC AFA90030 */ sw $t1, 0x0030($sp) -/* 00270 808B23F0 AFA8002C */ sw $t0, 0x002C($sp) -/* 00274 808B23F4 AFB90028 */ sw $t9, 0x0028($sp) -/* 00278 808B23F8 AFB00010 */ sw $s0, 0x0010($sp) -/* 0027C 808B23FC AFA20014 */ sw $v0, 0x0014($sp) -/* 00280 808B2400 AFAF0018 */ sw $t7, 0x0018($sp) -/* 00284 808B2404 AFB8001C */ sw $t8, 0x001C($sp) -/* 00288 808B2408 AFA00020 */ sw $zero, 0x0020($sp) -/* 0028C 808B240C AFB30024 */ sw $s3, 0x0024($sp) -/* 00290 808B2410 0C00A7A3 */ jal func_80029E8C - -/* 00294 808B2414 AFB7003C */ sw $s7, 0x003C($sp) -/* 00298 808B2418 26310001 */ addiu $s1, $s1, 0x0001 ## $s1 = 00000001 -/* 0029C 808B241C 163EFFA6 */ bne $s1, $s8, .L808B22B8 -/* 002A0 808B2420 00000000 */ nop -/* 002A4 808B2424 3C05808B */ lui $a1, %hi(D_808B272C) ## $a1 = 808B0000 -/* 002A8 808B2428 24A5272C */ addiu $a1, $a1, %lo(D_808B272C) ## $a1 = 808B272C -/* 002AC 808B242C 02A02025 */ or $a0, $s5, $zero ## $a0 = 00000024 -/* 002B0 808B2430 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 002B4 808B2434 02403025 */ or $a2, $s2, $zero ## $a2 = FFFFFFF0 -/* 002B8 808B2438 3C01428C */ lui $at, 0x428C ## $at = 428C0000 -/* 002BC 808B243C 4481A000 */ mtc1 $at, $f20 ## $f20 = 70.00 -/* 002C0 808B2440 240C006E */ addiu $t4, $zero, 0x006E ## $t4 = 0000006E -/* 002C4 808B2444 240D00A0 */ addiu $t5, $zero, 0x00A0 ## $t5 = 000000A0 -/* 002C8 808B2448 240E0001 */ addiu $t6, $zero, 0x0001 ## $t6 = 00000001 -/* 002CC 808B244C 4406A000 */ mfc1 $a2, $f20 -/* 002D0 808B2450 AFAE0018 */ sw $t6, 0x0018($sp) -/* 002D4 808B2454 AFAD0014 */ sw $t5, 0x0014($sp) -/* 002D8 808B2458 AFAC0010 */ sw $t4, 0x0010($sp) -/* 002DC 808B245C 8FA400DC */ lw $a0, 0x00DC($sp) -/* 002E0 808B2460 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 002E4 808B2464 0C00CD20 */ jal func_80033480 -/* 002E8 808B2468 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 002EC 808B246C 3C014220 */ lui $at, 0x4220 ## $at = 42200000 -/* 002F0 808B2470 4481B000 */ mtc1 $at, $f22 ## $f22 = 40.00 -/* 002F4 808B2474 C7B200CC */ lwc1 $f18, 0x00CC($sp) -/* 002F8 808B2478 4406A000 */ mfc1 $a2, $f20 -/* 002FC 808B247C 240F006E */ addiu $t7, $zero, 0x006E ## $t7 = 0000006E -/* 00300 808B2480 46169100 */ add.s $f4, $f18, $f22 -/* 00304 808B2484 241800A0 */ addiu $t8, $zero, 0x00A0 ## $t8 = 000000A0 -/* 00308 808B2488 24190001 */ addiu $t9, $zero, 0x0001 ## $t9 = 00000001 -/* 0030C 808B248C AFB90018 */ sw $t9, 0x0018($sp) -/* 00310 808B2490 E7A400CC */ swc1 $f4, 0x00CC($sp) -/* 00314 808B2494 AFB80014 */ sw $t8, 0x0014($sp) -/* 00318 808B2498 AFAF0010 */ sw $t7, 0x0010($sp) -/* 0031C 808B249C 8FA400DC */ lw $a0, 0x00DC($sp) -/* 00320 808B24A0 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 00324 808B24A4 0C00CD20 */ jal func_80033480 -/* 00328 808B24A8 24070005 */ addiu $a3, $zero, 0x0005 ## $a3 = 00000005 -/* 0032C 808B24AC C7B000CC */ lwc1 $f16, 0x00CC($sp) -/* 00330 808B24B0 4406A000 */ mfc1 $a2, $f20 -/* 00334 808B24B4 2408006E */ addiu $t0, $zero, 0x006E ## $t0 = 0000006E -/* 00338 808B24B8 46168200 */ add.s $f8, $f16, $f22 -/* 0033C 808B24BC 240900A0 */ addiu $t1, $zero, 0x00A0 ## $t1 = 000000A0 -/* 00340 808B24C0 240A0001 */ addiu $t2, $zero, 0x0001 ## $t2 = 00000001 -/* 00344 808B24C4 AFAA0018 */ sw $t2, 0x0018($sp) -/* 00348 808B24C8 E7A800CC */ swc1 $f8, 0x00CC($sp) -/* 0034C 808B24CC AFA90014 */ sw $t1, 0x0014($sp) -/* 00350 808B24D0 AFA80010 */ sw $t0, 0x0010($sp) -/* 00354 808B24D4 8FA400DC */ lw $a0, 0x00DC($sp) -/* 00358 808B24D8 02402825 */ or $a1, $s2, $zero ## $a1 = FFFFFFF0 -/* 0035C 808B24DC 0C00CD20 */ jal func_80033480 -/* 00360 808B24E0 24070004 */ addiu $a3, $zero, 0x0004 ## $a3 = 00000004 -/* 00364 808B24E4 8FBF009C */ lw $ra, 0x009C($sp) -/* 00368 808B24E8 D7B40048 */ ldc1 $f20, 0x0048($sp) -/* 0036C 808B24EC D7B60050 */ ldc1 $f22, 0x0050($sp) -/* 00370 808B24F0 D7B80058 */ ldc1 $f24, 0x0058($sp) -/* 00374 808B24F4 D7BA0060 */ ldc1 $f26, 0x0060($sp) -/* 00378 808B24F8 D7BC0068 */ ldc1 $f28, 0x0068($sp) -/* 0037C 808B24FC D7BE0070 */ ldc1 $f30, 0x0070($sp) -/* 00380 808B2500 8FB00078 */ lw $s0, 0x0078($sp) -/* 00384 808B2504 8FB1007C */ lw $s1, 0x007C($sp) -/* 00388 808B2508 8FB20080 */ lw $s2, 0x0080($sp) -/* 0038C 808B250C 8FB30084 */ lw $s3, 0x0084($sp) -/* 00390 808B2510 8FB40088 */ lw $s4, 0x0088($sp) -/* 00394 808B2514 8FB5008C */ lw $s5, 0x008C($sp) -/* 00398 808B2518 8FB60090 */ lw $s6, 0x0090($sp) -/* 0039C 808B251C 8FB70094 */ lw $s7, 0x0094($sp) -/* 003A0 808B2520 8FBE0098 */ lw $s8, 0x0098($sp) -/* 003A4 808B2524 03E00008 */ jr $ra -/* 003A8 808B2528 27BD00D8 */ addiu $sp, $sp, 0x00D8 ## $sp = 00000000 diff --git a/data/overlays/actors/z_bg_spot11_bakudankabe.data.s b/data/overlays/actors/z_bg_spot11_bakudankabe.data.s deleted file mode 100644 index 94e56ecfaa..0000000000 --- a/data/overlays/actors/z_bg_spot11_bakudankabe.data.s +++ /dev/null @@ -1,24 +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_Spot11_Bakudankabe_InitVars - .word 0x019F0100, 0x00000030, 0x016F0000, 0x000001B0 -.word BgSpot11Bakudankabe_Init -.word BgSpot11Bakudankabe_Destroy -.word BgSpot11Bakudankabe_Update -.word BgSpot11Bakudankabe_Draw -glabel D_808B2700 - .word 0x0A000900, 0x20010000, 0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00000000, 0x00010000, 0x00280050, 0x000008D3, 0x006CF9D4 -glabel D_808B272C - .word 0x450D3000, 0x42D80000, 0xC4C1C000 -glabel D_808B2738 - .word 0x450D3000, 0x42D80000, 0xC4C1C000, 0x00000000, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.s b/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.s deleted file mode 100644 index 9205222923..0000000000 --- a/data/overlays/actors/z_bg_spot11_bakudankabe.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_808B2780 - .incbin "baserom/ovl_Bg_Spot11_Bakudankabe", 0x600, 0x00000070 diff --git a/spec b/spec index 4e1c3a4066..021aaa66b5 100644 --- a/spec +++ b/spec @@ -1290,8 +1290,7 @@ endseg beginseg name "ovl_Bg_Spot11_Bakudankabe" include "build/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.o" - include "build/data/overlays/actors/z_bg_spot11_bakudankabe.data.o" - include "build/data/overlays/actors/z_bg_spot11_bakudankabe.reloc.o" + include "build/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/ovl_Bg_Spot11_Bakudankabe_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index 02ad575b3f..5667ea1773 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -15,7 +15,6 @@ void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx); -/* const ActorInit Bg_Spot11_Bakudankabe_InitVars = { ACTOR_BG_SPOT11_BAKUDANKABE, ACTORTYPE_BG, @@ -27,15 +26,117 @@ const ActorInit Bg_Spot11_Bakudankabe_InitVars = { (ActorFunc)BgSpot11Bakudankabe_Update, (ActorFunc)BgSpot11Bakudankabe_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2180.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/func_808B2218.s") +static ColliderCylinderInit sCylinderInit = { + { COLTYPE_UNK10, 0x00, 0x09, 0x00, 0x20, COLSHAPE_CYLINDER }, + { 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000008, 0x00, 0x00 }, 0x00, 0x01, 0x00 }, + { 40, 80, 0, { 2259, 108, -1580 } }, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Init.s") +Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f }; +Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Destroy.s") +extern UNK_TYPE D_06001A58; +extern Gfx D_06001980[]; +extern Gfx D_0500A880[]; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Update.s") +void func_808B2180(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) { + s32 pad; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot11_Bakudankabe/BgSpot11Bakudankabe_Draw.s") + Collider_InitCylinder(globalCtx, &this->collider); + Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit); + this->collider.dim.pos.x += (s16)this->dyna.actor.posRot.pos.x; + this->collider.dim.pos.y += (s16)this->dyna.actor.posRot.pos.y; + this->collider.dim.pos.z += (s16)this->dyna.actor.posRot.pos.z; +} + +void func_808B2218(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) { + Actor* thisx = &this->dyna.actor; + Vec3f burstDepthY; + Vec3f burstDepthX; + s32 i; + + burstDepthX.z = 0; + burstDepthX.x = 0; + + for (i = 0; i < 20; i++) { + s16 scale; + s32 gravityInfluence; + s32 rotationSpeed; + + Math_Vec3f_Sum(&thisx->posRot.pos, &D_808B272C, &burstDepthY); + + burstDepthY.x += (Math_Rand_ZeroOne() - 0.5f) * 120.0f; + burstDepthY.y += (30.0f + (i * 6.5f)); + burstDepthY.z += (Math_Rand_ZeroOne() - 0.5f) * 20.0f; + + burstDepthX.y = (Math_Rand_ZeroOne() - 0.2f) * 12.0f; + scale = (Math_Rand_ZeroOne() * 55.0f) + 8.0f; + + if (scale < 20) { + gravityInfluence = -300; + } else if (scale < 35) { + gravityInfluence = -360; + } else { + gravityInfluence = -420; + } + if (Math_Rand_ZeroOne() < 0.4f) { + rotationSpeed = 65; + } else { + rotationSpeed = 33; + } + func_80029E8C(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E, 4, 0, + scale, 1, 3, 80, -1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880); + } + Math_Vec3f_Sum(&thisx->posRot.pos, &D_808B272C, &burstDepthY); + func_80033480(globalCtx, &burstDepthY, 70, 4, 110, 160, 1); + burstDepthY.y += 40; + func_80033480(globalCtx, &burstDepthY, 70, 5, 110, 160, 1); + burstDepthY.y += 40; + func_80033480(globalCtx, &burstDepthY, 70, 4, 110, 160, 1); +} + +void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + s32 pad; + s32 sp24; + + sp24 = 0; + DynaPolyInfo_SetActorMove(&this->dyna, 0); + if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) { + Actor_Kill(&this->dyna.actor); + return; + } + func_808B2180(this, globalCtx); + DynaPolyInfo_Alloc(&D_06001A58, &sp24); + this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, sp24); + Actor_SetScale(&this->dyna.actor, 1.0f); + osSyncPrintf("(spot11 爆弾壁)(arg_data 0x%04x)\n", this->dyna.actor.params); +} + +void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + + DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); + Collider_DestroyCylinder(globalCtx, &this->collider); +} + +void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + + if (this->collider.base.acFlags & 2) { + func_808B2218(this, globalCtx); + Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F)); + Audio_PlaySoundAtPosition(globalCtx, &D_808B2738, 40, NA_SE_EV_WALL_BROKEN); + func_80078884(NA_SE_SY_CORRECT_CHIME); + Actor_Kill(&this->dyna.actor); + return; + } + CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); +} + +void BgSpot11Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { + BgSpot11Bakudankabe* this = THIS; + + Gfx_DrawDListOpa(globalCtx, D_06001980); +} diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h index ba28475249..579a801476 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.h @@ -7,8 +7,8 @@ struct BgSpot11Bakudankabe; typedef struct BgSpot11Bakudankabe { - /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x64]; + /* 0x0000 */ DynaPolyActor dyna; + /* 0x0164 */ ColliderCylinder collider; } BgSpot11Bakudankabe; // size = 0x01B0 extern const ActorInit Bg_Spot11_Bakudankabe_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index 489b1e7418..c302bae50e 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -165,6 +165,11 @@ D_060007D0 = 0x060007D0; // z_bg_spot09_obj D_06008010 = 0x06008010; +// z_bg_spot11_bakudankabe +D_06001A58 = 0x06001A58; +D_06001980 = 0x06001980; +D_0500A880 = 0x0500A880; + // z_bg_spot12_gate D_06001080 = 0x06001080; D_060011EC = 0x060011EC;