From ba49ef6a0e7ad1b4e7e7dc83927555c7cc18543e Mon Sep 17 00:00:00 2001 From: zelda2773 Date: Mon, 30 Mar 2020 21:56:36 -0400 Subject: [PATCH 1/4] Decompiled ovl_Obj_Comb --- .../actors/ovl_Obj_Comb/ObjComb_Destroy.s | 13 -- .../actors/ovl_Obj_Comb/ObjComb_Draw.s | 107 --------- .../actors/ovl_Obj_Comb/ObjComb_Init.s | 31 --- .../actors/ovl_Obj_Comb/ObjComb_Update.s | 33 --- .../actors/ovl_Obj_Comb/func_80B91B60.s | 206 ------------------ .../actors/ovl_Obj_Comb/func_80B91E4C.s | 63 ------ .../actors/ovl_Obj_Comb/func_80B91FB0.s | 7 - .../actors/ovl_Obj_Comb/func_80B91FC0.s | 70 ------ data/overlays/actors/z_obj_comb.data.s | 23 -- data/overlays/actors/z_obj_comb.reloc.s | 11 - data/overlays/actors/z_obj_comb.rodata.s | 37 ---- spec | 4 +- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 192 +++++++++++++++- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h | 10 +- undefined_syms.txt | 6 +- 15 files changed, 197 insertions(+), 616 deletions(-) delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Destroy.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Draw.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Init.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Update.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91B60.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91E4C.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FB0.s delete mode 100644 asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FC0.s delete mode 100644 data/overlays/actors/z_obj_comb.data.s delete mode 100644 data/overlays/actors/z_obj_comb.reloc.s delete mode 100644 data/overlays/actors/z_obj_comb.rodata.s diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Destroy.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Destroy.s deleted file mode 100644 index e024fef6d4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Destroy.s +++ /dev/null @@ -1,13 +0,0 @@ -glabel ObjComb_Destroy -/* 00428 80B91F88 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0042C 80B91F8C 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00430 80B91F90 AFBF0014 */ sw $ra, 0x0014($sp) -/* 00434 80B91F94 00A02025 */ or $a0, $a1, $zero ## $a0 = 00000000 -/* 00438 80B91F98 0C016F32 */ jal func_8005BCC8 -/* 0043C 80B91F9C 24E50150 */ addiu $a1, $a3, 0x0150 ## $a1 = 00000150 -/* 00440 80B91FA0 8FBF0014 */ lw $ra, 0x0014($sp) -/* 00444 80B91FA4 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 00448 80B91FA8 03E00008 */ jr $ra -/* 0044C 80B91FAC 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Draw.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Draw.s deleted file mode 100644 index 849b4fd9aa..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Draw.s +++ /dev/null @@ -1,107 +0,0 @@ -glabel ObjComb_Draw -/* 005BC 80B9211C 27BDFFB8 */ addiu $sp, $sp, 0xFFB8 ## $sp = FFFFFFB8 -/* 005C0 80B92120 AFBF001C */ sw $ra, 0x001C($sp) -/* 005C4 80B92124 AFB10018 */ sw $s1, 0x0018($sp) -/* 005C8 80B92128 AFB00014 */ sw $s0, 0x0014($sp) -/* 005CC 80B9212C AFA5004C */ sw $a1, 0x004C($sp) -/* 005D0 80B92130 8CA50000 */ lw $a1, 0x0000($a1) ## 00000000 -/* 005D4 80B92134 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 005D8 80B92138 3C0680B9 */ lui $a2, %hi(D_80B92330) ## $a2 = 80B90000 -/* 005DC 80B9213C 24C62330 */ addiu $a2, $a2, %lo(D_80B92330) ## $a2 = 80B92330 -/* 005E0 80B92140 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8 -/* 005E4 80B92144 24070171 */ addiu $a3, $zero, 0x0171 ## $a3 = 00000171 -/* 005E8 80B92148 0C031AB1 */ jal func_800C6AC4 -/* 005EC 80B9214C 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 005F0 80B92150 8FAF004C */ lw $t7, 0x004C($sp) -/* 005F4 80B92154 0C024F46 */ jal func_80093D18 -/* 005F8 80B92158 8DE40000 */ lw $a0, 0x0000($t7) ## 00000000 -/* 005FC 80B9215C 3C0142EC */ lui $at, 0x42EC ## $at = 42EC0000 -/* 00600 80B92160 44812000 */ mtc1 $at, $f4 ## $f4 = 118.00 -/* 00604 80B92164 C6060054 */ lwc1 $f6, 0x0054($s0) ## 00000054 -/* 00608 80B92168 C60A0028 */ lwc1 $f10, 0x0028($s0) ## 00000028 -/* 0060C 80B9216C C60C0024 */ lwc1 $f12, 0x0024($s0) ## 00000024 -/* 00610 80B92170 46062202 */ mul.s $f8, $f4, $f6 -/* 00614 80B92174 8E06002C */ lw $a2, 0x002C($s0) ## 0000002C -/* 00618 80B92178 00003825 */ or $a3, $zero, $zero ## $a3 = 00000000 -/* 0061C 80B9217C 0C034261 */ jal Matrix_Translate -/* 00620 80B92180 46085380 */ add.s $f14, $f10, $f8 -/* 00624 80B92184 861800B6 */ lh $t8, 0x00B6($s0) ## 000000B6 -/* 00628 80B92188 3C0180B9 */ lui $at, %hi(D_80B92370) ## $at = 80B90000 -/* 0062C 80B9218C C4242370 */ lwc1 $f4, %lo(D_80B92370)($at) -/* 00630 80B92190 44988000 */ mtc1 $t8, $f16 ## $f16 = 0.00 -/* 00634 80B92194 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00638 80B92198 468084A0 */ cvt.s.w $f18, $f16 -/* 0063C 80B9219C 46049302 */ mul.s $f12, $f18, $f4 -/* 00640 80B921A0 0C034348 */ jal Matrix_RotateY -/* 00644 80B921A4 00000000 */ nop -/* 00648 80B921A8 861900B4 */ lh $t9, 0x00B4($s0) ## 000000B4 -/* 0064C 80B921AC 3C0180B9 */ lui $at, %hi(D_80B92374) ## $at = 80B90000 -/* 00650 80B921B0 C4282374 */ lwc1 $f8, %lo(D_80B92374)($at) -/* 00654 80B921B4 44993000 */ mtc1 $t9, $f6 ## $f6 = 0.00 -/* 00658 80B921B8 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 0065C 80B921BC 468032A0 */ cvt.s.w $f10, $f6 -/* 00660 80B921C0 46085302 */ mul.s $f12, $f10, $f8 -/* 00664 80B921C4 0C0342DC */ jal Matrix_RotateX -/* 00668 80B921C8 00000000 */ nop -/* 0066C 80B921CC 860800B8 */ lh $t0, 0x00B8($s0) ## 000000B8 -/* 00670 80B921D0 3C0180B9 */ lui $at, %hi(D_80B92378) ## $at = 80B90000 -/* 00674 80B921D4 C4242378 */ lwc1 $f4, %lo(D_80B92378)($at) -/* 00678 80B921D8 44888000 */ mtc1 $t0, $f16 ## $f16 = 0.00 -/* 0067C 80B921DC 24050001 */ addiu $a1, $zero, 0x0001 ## $a1 = 00000001 -/* 00680 80B921E0 468084A0 */ cvt.s.w $f18, $f16 -/* 00684 80B921E4 46049302 */ mul.s $f12, $f18, $f4 -/* 00688 80B921E8 0C0343B5 */ jal Matrix_RotateZ -/* 0068C 80B921EC 00000000 */ nop -/* 00690 80B921F0 3C0142EC */ lui $at, 0x42EC ## $at = 42EC0000 -/* 00694 80B921F4 44815000 */ mtc1 $at, $f10 ## $f10 = 118.00 -/* 00698 80B921F8 C6060054 */ lwc1 $f6, 0x0054($s0) ## 00000054 -/* 0069C 80B921FC 44806000 */ mtc1 $zero, $f12 ## $f12 = 0.00 -/* 006A0 80B92200 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 006A4 80B92204 460A3382 */ mul.s $f14, $f6, $f10 -/* 006A8 80B92208 44066000 */ mfc1 $a2, $f12 -/* 006AC 80B9220C 0C034261 */ jal Matrix_Translate -/* 006B0 80B92210 46007387 */ neg.s $f14, $f14 -/* 006B4 80B92214 C60C0050 */ lwc1 $f12, 0x0050($s0) ## 00000050 -/* 006B8 80B92218 C60E0054 */ lwc1 $f14, 0x0054($s0) ## 00000054 -/* 006BC 80B9221C 8E060058 */ lw $a2, 0x0058($s0) ## 00000058 -/* 006C0 80B92220 0C0342A3 */ jal Matrix_Scale -/* 006C4 80B92224 24070001 */ addiu $a3, $zero, 0x0001 ## $a3 = 00000001 -/* 006C8 80B92228 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 006CC 80B9222C 3C0ADA38 */ lui $t2, 0xDA38 ## $t2 = DA380000 -/* 006D0 80B92230 354A0003 */ ori $t2, $t2, 0x0003 ## $t2 = DA380003 -/* 006D4 80B92234 24490008 */ addiu $t1, $v0, 0x0008 ## $t1 = 00000008 -/* 006D8 80B92238 AE2902C0 */ sw $t1, 0x02C0($s1) ## 000002C0 -/* 006DC 80B9223C AC4A0000 */ sw $t2, 0x0000($v0) ## 00000000 -/* 006E0 80B92240 8FAB004C */ lw $t3, 0x004C($sp) -/* 006E4 80B92244 3C0580B9 */ lui $a1, %hi(D_80B92340) ## $a1 = 80B90000 -/* 006E8 80B92248 24A52340 */ addiu $a1, $a1, %lo(D_80B92340) ## $a1 = 80B92340 -/* 006EC 80B9224C 8D640000 */ lw $a0, 0x0000($t3) ## 00000000 -/* 006F0 80B92250 2406018A */ addiu $a2, $zero, 0x018A ## $a2 = 0000018A -/* 006F4 80B92254 0C0346A2 */ jal Matrix_NewMtx -/* 006F8 80B92258 AFA2002C */ sw $v0, 0x002C($sp) -/* 006FC 80B9225C 8FA3002C */ lw $v1, 0x002C($sp) -/* 00700 80B92260 3C0E0501 */ lui $t6, 0x0501 ## $t6 = 05010000 -/* 00704 80B92264 25CE95B0 */ addiu $t6, $t6, 0x95B0 ## $t6 = 050095B0 -/* 00708 80B92268 AC620004 */ sw $v0, 0x0004($v1) ## 00000004 -/* 0070C 80B9226C 8E2202C0 */ lw $v0, 0x02C0($s1) ## 000002C0 -/* 00710 80B92270 3C0DDE00 */ lui $t5, 0xDE00 ## $t5 = DE000000 -/* 00714 80B92274 00002025 */ or $a0, $zero, $zero ## $a0 = 00000000 -/* 00718 80B92278 244C0008 */ addiu $t4, $v0, 0x0008 ## $t4 = 00000008 -/* 0071C 80B9227C AE2C02C0 */ sw $t4, 0x02C0($s1) ## 000002C0 -/* 00720 80B92280 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150 -/* 00724 80B92284 AC4E0004 */ sw $t6, 0x0004($v0) ## 00000004 -/* 00728 80B92288 0C018A29 */ jal func_800628A4 -/* 0072C 80B9228C AC4D0000 */ sw $t5, 0x0000($v0) ## 00000000 -/* 00730 80B92290 8FAF004C */ lw $t7, 0x004C($sp) -/* 00734 80B92294 3C0680B9 */ lui $a2, %hi(D_80B92350) ## $a2 = 80B90000 -/* 00738 80B92298 24C62350 */ addiu $a2, $a2, %lo(D_80B92350) ## $a2 = 80B92350 -/* 0073C 80B9229C 27A40030 */ addiu $a0, $sp, 0x0030 ## $a0 = FFFFFFE8 -/* 00740 80B922A0 24070192 */ addiu $a3, $zero, 0x0192 ## $a3 = 00000192 -/* 00744 80B922A4 0C031AD5 */ jal func_800C6B54 -/* 00748 80B922A8 8DE50000 */ lw $a1, 0x0000($t7) ## 00000000 -/* 0074C 80B922AC 8FBF001C */ lw $ra, 0x001C($sp) -/* 00750 80B922B0 8FB00014 */ lw $s0, 0x0014($sp) -/* 00754 80B922B4 8FB10018 */ lw $s1, 0x0018($sp) -/* 00758 80B922B8 03E00008 */ jr $ra -/* 0075C 80B922BC 27BD0048 */ addiu $sp, $sp, 0x0048 ## $sp = 00000000 - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Init.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Init.s deleted file mode 100644 index 4ee9f4cfb4..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Init.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel ObjComb_Init -/* 003BC 80B91F1C 27BDFFD0 */ addiu $sp, $sp, 0xFFD0 ## $sp = FFFFFFD0 -/* 003C0 80B91F20 AFA50034 */ sw $a1, 0x0034($sp) -/* 003C4 80B91F24 AFBF0024 */ sw $ra, 0x0024($sp) -/* 003C8 80B91F28 AFB00020 */ sw $s0, 0x0020($sp) -/* 003CC 80B91F2C 3C0580B9 */ lui $a1, %hi(D_80B92314) ## $a1 = 80B90000 -/* 003D0 80B91F30 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 003D4 80B91F34 0C01E037 */ jal Actor_ProcessInitChain - -/* 003D8 80B91F38 24A52314 */ addiu $a1, $a1, %lo(D_80B92314) ## $a1 = 80B92314 -/* 003DC 80B91F3C 26050150 */ addiu $a1, $s0, 0x0150 ## $a1 = 00000150 -/* 003E0 80B91F40 AFA50028 */ sw $a1, 0x0028($sp) -/* 003E4 80B91F44 0C016EFE */ jal func_8005BBF8 -/* 003E8 80B91F48 8FA40034 */ lw $a0, 0x0034($sp) -/* 003EC 80B91F4C 3C0780B9 */ lui $a3, %hi(D_80B92304) ## $a3 = 80B90000 -/* 003F0 80B91F50 260E0170 */ addiu $t6, $s0, 0x0170 ## $t6 = 00000170 -/* 003F4 80B91F54 8FA50028 */ lw $a1, 0x0028($sp) -/* 003F8 80B91F58 AFAE0010 */ sw $t6, 0x0010($sp) -/* 003FC 80B91F5C 24E72304 */ addiu $a3, $a3, %lo(D_80B92304) ## $a3 = 80B92304 -/* 00400 80B91F60 8FA40034 */ lw $a0, 0x0034($sp) -/* 00404 80B91F64 0C017014 */ jal func_8005C050 -/* 00408 80B91F68 02003025 */ or $a2, $s0, $zero ## $a2 = 00000000 -/* 0040C 80B91F6C 0C2E47EC */ jal func_80B91FB0 -/* 00410 80B91F70 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00414 80B91F74 8FBF0024 */ lw $ra, 0x0024($sp) -/* 00418 80B91F78 8FB00020 */ lw $s0, 0x0020($sp) -/* 0041C 80B91F7C 27BD0030 */ addiu $sp, $sp, 0x0030 ## $sp = 00000000 -/* 00420 80B91F80 03E00008 */ jr $ra -/* 00424 80B91F84 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Update.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Update.s deleted file mode 100644 index 2590d5e10e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Update.s +++ /dev/null @@ -1,33 +0,0 @@ -glabel ObjComb_Update -/* 00548 80B920A8 27BDFFE8 */ addiu $sp, $sp, 0xFFE8 ## $sp = FFFFFFE8 -/* 0054C 80B920AC AFBF0014 */ sw $ra, 0x0014($sp) -/* 00550 80B920B0 848E01B2 */ lh $t6, 0x01B2($a0) ## 000001B2 -/* 00554 80B920B4 25CF2EE0 */ addiu $t7, $t6, 0x2EE0 ## $t7 = 00002EE0 -/* 00558 80B920B8 A48F01B2 */ sh $t7, 0x01B2($a0) ## 000001B2 -/* 0055C 80B920BC AFA40018 */ sw $a0, 0x0018($sp) -/* 00560 80B920C0 8C99014C */ lw $t9, 0x014C($a0) ## 0000014C -/* 00564 80B920C4 0320F809 */ jalr $ra, $t9 -/* 00568 80B920C8 00000000 */ nop -/* 0056C 80B920CC 8FA60018 */ lw $a2, 0x0018($sp) -/* 00570 80B920D0 0C01DE1C */ jal Math_Sins - ## sins? -/* 00574 80B920D4 84C401B2 */ lh $a0, 0x01B2($a2) ## 000001B2 -/* 00578 80B920D8 8FA60018 */ lw $a2, 0x0018($sp) -/* 0057C 80B920DC 84D801B0 */ lh $t8, 0x01B0($a2) ## 000001B0 -/* 00580 80B920E0 84C80014 */ lh $t0, 0x0014($a2) ## 00000014 -/* 00584 80B920E4 44982000 */ mtc1 $t8, $f4 ## $f4 = 0.00 -/* 00588 80B920E8 44885000 */ mtc1 $t0, $f10 ## $f10 = 0.00 -/* 0058C 80B920EC 468021A0 */ cvt.s.w $f6, $f4 -/* 00590 80B920F0 46805420 */ cvt.s.w $f16, $f10 -/* 00594 80B920F4 46060202 */ mul.s $f8, $f0, $f6 -/* 00598 80B920F8 46104480 */ add.s $f18, $f8, $f16 -/* 0059C 80B920FC 4600910D */ trunc.w.s $f4, $f18 -/* 005A0 80B92100 440A2000 */ mfc1 $t2, $f4 -/* 005A4 80B92104 00000000 */ nop -/* 005A8 80B92108 A4CA00B4 */ sh $t2, 0x00B4($a2) ## 000000B4 -/* 005AC 80B9210C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 005B0 80B92110 27BD0018 */ addiu $sp, $sp, 0x0018 ## $sp = 00000000 -/* 005B4 80B92114 03E00008 */ jr $ra -/* 005B8 80B92118 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91B60.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91B60.s deleted file mode 100644 index f3a13cb60e..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91B60.s +++ /dev/null @@ -1,206 +0,0 @@ -glabel func_80B91B60 -/* 00000 80B91B60 27BDFF18 */ addiu $sp, $sp, 0xFF18 ## $sp = FFFFFF18 -/* 00004 80B91B64 F7BE0070 */ sdc1 $f30, 0x0070($sp) -/* 00008 80B91B68 3C0141C8 */ lui $at, 0x41C8 ## $at = 41C80000 -/* 0000C 80B91B6C 4481F000 */ mtc1 $at, $f30 ## $f30 = 25.00 -/* 00010 80B91B70 F7BC0068 */ sdc1 $f28, 0x0068($sp) -/* 00014 80B91B74 3C014290 */ lui $at, 0x4290 ## $at = 42900000 -/* 00018 80B91B78 4481E000 */ mtc1 $at, $f28 ## $f28 = 72.00 -/* 0001C 80B91B7C F7BA0060 */ sdc1 $f26, 0x0060($sp) -/* 00020 80B91B80 3C0180B9 */ lui $at, %hi(D_80B92360) ## $at = 80B90000 -/* 00024 80B91B84 C43A2360 */ lwc1 $f26, %lo(D_80B92360)($at) -/* 00028 80B91B88 F7B80058 */ sdc1 $f24, 0x0058($sp) -/* 0002C 80B91B8C 3C0180B9 */ lui $at, %hi(D_80B92364) ## $at = 80B90000 -/* 00030 80B91B90 C4382364 */ lwc1 $f24, %lo(D_80B92364)($at) -/* 00034 80B91B94 AFBE0098 */ sw $s8, 0x0098($sp) -/* 00038 80B91B98 F7B60050 */ sdc1 $f22, 0x0050($sp) -/* 0003C 80B91B9C 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 00040 80B91BA0 AFB70094 */ sw $s7, 0x0094($sp) -/* 00044 80B91BA4 AFB60090 */ sw $s6, 0x0090($sp) -/* 00048 80B91BA8 AFB5008C */ sw $s5, 0x008C($sp) -/* 0004C 80B91BAC AFB30084 */ sw $s3, 0x0084($sp) -/* 00050 80B91BB0 AFB20080 */ sw $s2, 0x0080($sp) -/* 00054 80B91BB4 3C1E0501 */ lui $s8, 0x0501 ## $s8 = 05010000 -/* 00058 80B91BB8 248F0024 */ addiu $t7, $a0, 0x0024 ## $t7 = 00000024 -/* 0005C 80B91BBC 4481B000 */ mtc1 $at, $f22 ## $f22 = 0.50 -/* 00060 80B91BC0 AFBF009C */ sw $ra, 0x009C($sp) -/* 00064 80B91BC4 AFB40088 */ sw $s4, 0x0088($sp) -/* 00068 80B91BC8 AFB1007C */ sw $s1, 0x007C($sp) -/* 0006C 80B91BCC AFB00078 */ sw $s0, 0x0078($sp) -/* 00070 80B91BD0 F7B40048 */ sdc1 $f20, 0x0048($sp) -/* 00074 80B91BD4 AFA400E8 */ sw $a0, 0x00E8($sp) -/* 00078 80B91BD8 AFA500EC */ sw $a1, 0x00EC($sp) -/* 0007C 80B91BDC 00009025 */ or $s2, $zero, $zero ## $s2 = 00000000 -/* 00080 80B91BE0 AFAF00A8 */ sw $t7, 0x00A8($sp) -/* 00084 80B91BE4 27DE9940 */ addiu $s8, $s8, 0x9940 ## $s8 = 05009940 -/* 00088 80B91BE8 00009825 */ or $s3, $zero, $zero ## $s3 = 00000000 -/* 0008C 80B91BEC 27B500D0 */ addiu $s5, $sp, 0x00D0 ## $s5 = FFFFFFE8 -/* 00090 80B91BF0 27B600DC */ addiu $s6, $sp, 0x00DC ## $s6 = FFFFFFF4 -/* 00094 80B91BF4 27B700C4 */ addiu $s7, $sp, 0x00C4 ## $s7 = FFFFFFDC -/* 00098 80B91BF8 26524E20 */ addiu $s2, $s2, 0x4E20 ## $s2 = 00004E20 -.L80B91BFC: -/* 0009C 80B91BFC 00129400 */ sll $s2, $s2, 16 -/* 000A0 80B91C00 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 000A4 80B91C04 00129403 */ sra $s2, $s2, 16 -/* 000A8 80B91C08 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 000AC 80B91C0C 44812000 */ mtc1 $at, $f4 ## $f4 = 10.00 -/* 000B0 80B91C10 00122400 */ sll $a0, $s2, 16 -/* 000B4 80B91C14 00042403 */ sra $a0, $a0, 16 -/* 000B8 80B91C18 46040502 */ mul.s $f20, $f0, $f4 -/* 000BC 80B91C1C 0C01DE1C */ jal Math_Sins - ## sins? -/* 000C0 80B91C20 00000000 */ nop -/* 000C4 80B91C24 2678FFF1 */ addiu $t8, $s3, 0xFFF1 ## $t8 = FFFFFFF1 -/* 000C8 80B91C28 44984000 */ mtc1 $t8, $f8 ## $f8 = NaN -/* 000CC 80B91C2C 46140182 */ mul.s $f6, $f0, $f20 -/* 000D0 80B91C30 00122400 */ sll $a0, $s2, 16 -/* 000D4 80B91C34 00042403 */ sra $a0, $a0, 16 -/* 000D8 80B91C38 468042A0 */ cvt.s.w $f10, $f8 -/* 000DC 80B91C3C E7A600DC */ swc1 $f6, 0x00DC($sp) -/* 000E0 80B91C40 46185402 */ mul.s $f16, $f10, $f24 -/* 000E4 80B91C44 0C01DE0D */ jal Math_Coss - ## coss? -/* 000E8 80B91C48 E7B000E0 */ swc1 $f16, 0x00E0($sp) -/* 000EC 80B91C4C 46140482 */ mul.s $f18, $f0, $f20 -/* 000F0 80B91C50 02C02025 */ or $a0, $s6, $zero ## $a0 = FFFFFFF4 -/* 000F4 80B91C54 8FA500A8 */ lw $a1, 0x00A8($sp) -/* 000F8 80B91C58 02A03025 */ or $a2, $s5, $zero ## $a2 = FFFFFFE8 -/* 000FC 80B91C5C 0C01DFA7 */ jal Math_Vec3f_Sum - ## Vec3f_Add -/* 00100 80B91C60 E7B200E4 */ swc1 $f18, 0x00E4($sp) -/* 00104 80B91C64 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00108 80B91C68 00000000 */ nop -/* 0010C 80B91C6C C7A600DC */ lwc1 $f6, 0x00DC($sp) -/* 00110 80B91C70 46160101 */ sub.s $f4, $f0, $f22 -/* 00114 80B91C74 46163202 */ mul.s $f8, $f6, $f22 -/* 00118 80B91C78 46082280 */ add.s $f10, $f4, $f8 -/* 0011C 80B91C7C 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00120 80B91C80 E7AA00C4 */ swc1 $f10, 0x00C4($sp) -/* 00124 80B91C84 C7B200E0 */ lwc1 $f18, 0x00E0($sp) -/* 00128 80B91C88 46160401 */ sub.s $f16, $f0, $f22 -/* 0012C 80B91C8C 461A9182 */ mul.s $f6, $f18, $f26 -/* 00130 80B91C90 46068100 */ add.s $f4, $f16, $f6 -/* 00134 80B91C94 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00138 80B91C98 E7A400C8 */ swc1 $f4, 0x00C8($sp) -/* 0013C 80B91C9C C7AA00E4 */ lwc1 $f10, 0x00E4($sp) -/* 00140 80B91CA0 46160201 */ sub.s $f8, $f0, $f22 -/* 00144 80B91CA4 46165482 */ mul.s $f18, $f10, $f22 -/* 00148 80B91CA8 46124400 */ add.s $f16, $f8, $f18 -/* 0014C 80B91CAC 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00150 80B91CB0 E7B000CC */ swc1 $f16, 0x00CC($sp) -/* 00154 80B91CB4 461C0182 */ mul.s $f6, $f0, $f28 -/* 00158 80B91CB8 2410FF38 */ addiu $s0, $zero, 0xFF38 ## $s0 = FFFFFF38 -/* 0015C 80B91CBC 461E3100 */ add.s $f4, $f6, $f30 -/* 00160 80B91CC0 4600228D */ trunc.w.s $f10, $f4 -/* 00164 80B91CC4 44025000 */ mfc1 $v0, $f10 -/* 00168 80B91CC8 00000000 */ nop -/* 0016C 80B91CCC 00021C00 */ sll $v1, $v0, 16 -/* 00170 80B91CD0 00031C03 */ sra $v1, $v1, 16 -/* 00174 80B91CD4 28610028 */ slti $at, $v1, 0x0028 -/* 00178 80B91CD8 0002A400 */ sll $s4, $v0, 16 -/* 0017C 80B91CDC 10200003 */ beq $at, $zero, .L80B91CEC -/* 00180 80B91CE0 0014A403 */ sra $s4, $s4, 16 -/* 00184 80B91CE4 10000008 */ beq $zero, $zero, .L80B91D08 -/* 00188 80B91CE8 24110028 */ addiu $s1, $zero, 0x0028 ## $s1 = 00000028 -.L80B91CEC: -/* 0018C 80B91CEC 28610046 */ slti $at, $v1, 0x0046 -/* 00190 80B91CF0 10200004 */ beq $at, $zero, .L80B91D04 -/* 00194 80B91CF4 2410FEAC */ addiu $s0, $zero, 0xFEAC ## $s0 = FFFFFEAC -/* 00198 80B91CF8 2410FEE8 */ addiu $s0, $zero, 0xFEE8 ## $s0 = FFFFFEE8 -/* 0019C 80B91CFC 10000002 */ beq $zero, $zero, .L80B91D08 -/* 001A0 80B91D00 2411001E */ addiu $s1, $zero, 0x001E ## $s1 = 0000001E -.L80B91D04: -/* 001A4 80B91D04 24110014 */ addiu $s1, $zero, 0x0014 ## $s1 = 00000014 -.L80B91D08: -/* 001A8 80B91D08 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 001AC 80B91D0C 00000000 */ nop -/* 001B0 80B91D10 3C0180B9 */ lui $at, %hi(D_80B92368) ## $at = 80B90000 -/* 001B4 80B91D14 C4282368 */ lwc1 $f8, %lo(D_80B92368)($at) -/* 001B8 80B91D18 8FA400EC */ lw $a0, 0x00EC($sp) -/* 001BC 80B91D1C 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFE8 -/* 001C0 80B91D20 4608003C */ c.lt.s $f0, $f8 -/* 001C4 80B91D24 02E03025 */ or $a2, $s7, $zero ## $a2 = FFFFFFDC -/* 001C8 80B91D28 02A03825 */ or $a3, $s5, $zero ## $a3 = FFFFFFE8 -/* 001CC 80B91D2C 24080004 */ addiu $t0, $zero, 0x0004 ## $t0 = 00000004 -/* 001D0 80B91D30 45000003 */ bc1f .L80B91D40 -/* 001D4 80B91D34 24090050 */ addiu $t1, $zero, 0x0050 ## $t1 = 00000050 -/* 001D8 80B91D38 1000000A */ beq $zero, $zero, .L80B91D64 -/* 001DC 80B91D3C 24020060 */ addiu $v0, $zero, 0x0060 ## $v0 = 00000060 -.L80B91D40: -/* 001E0 80B91D40 3C0180B9 */ lui $at, %hi(D_80B9236C) ## $at = 80B90000 -/* 001E4 80B91D44 C432236C */ lwc1 $f18, %lo(D_80B9236C)($at) -/* 001E8 80B91D48 24020020 */ addiu $v0, $zero, 0x0020 ## $v0 = 00000020 -/* 001EC 80B91D4C 4612003C */ c.lt.s $f0, $f18 -/* 001F0 80B91D50 00000000 */ nop -/* 001F4 80B91D54 45000003 */ bc1f .L80B91D64 -/* 001F8 80B91D58 00000000 */ nop -/* 001FC 80B91D5C 10000001 */ beq $zero, $zero, .L80B91D64 -/* 00200 80B91D60 24020040 */ addiu $v0, $zero, 0x0040 ## $v0 = 00000040 -.L80B91D64: -/* 00204 80B91D64 240AFFFF */ addiu $t2, $zero, 0xFFFF ## $t2 = FFFFFFFF -/* 00208 80B91D68 240B0002 */ addiu $t3, $zero, 0x0002 ## $t3 = 00000002 -/* 0020C 80B91D6C AFAB0038 */ sw $t3, 0x0038($sp) -/* 00210 80B91D70 AFAA0034 */ sw $t2, 0x0034($sp) -/* 00214 80B91D74 AFB00010 */ sw $s0, 0x0010($sp) -/* 00218 80B91D78 AFA20014 */ sw $v0, 0x0014($sp) -/* 0021C 80B91D7C AFB10018 */ sw $s1, 0x0018($sp) -/* 00220 80B91D80 AFA8001C */ sw $t0, 0x001C($sp) -/* 00224 80B91D84 AFA00020 */ sw $zero, 0x0020($sp) -/* 00228 80B91D88 AFB40024 */ sw $s4, 0x0024($sp) -/* 0022C 80B91D8C AFA00028 */ sw $zero, 0x0028($sp) -/* 00230 80B91D90 AFA0002C */ sw $zero, 0x002C($sp) -/* 00234 80B91D94 AFA90030 */ sw $t1, 0x0030($sp) -/* 00238 80B91D98 0C00A7A3 */ jal Effect_SpawnFragment - -/* 0023C 80B91D9C AFBE003C */ sw $s8, 0x003C($sp) -/* 00240 80B91DA0 26730001 */ addiu $s3, $s3, 0x0001 ## $s3 = 00000001 -/* 00244 80B91DA4 2401001F */ addiu $at, $zero, 0x001F ## $at = 0000001F -/* 00248 80B91DA8 5661FF94 */ bnel $s3, $at, .L80B91BFC -/* 0024C 80B91DAC 26524E20 */ addiu $s2, $s2, 0x4E20 ## $s2 = 00009C40 -/* 00250 80B91DB0 8FAC00E8 */ lw $t4, 0x00E8($sp) -/* 00254 80B91DB4 3C014120 */ lui $at, 0x4120 ## $at = 41200000 -/* 00258 80B91DB8 44812000 */ mtc1 $at, $f4 ## $f4 = 10.00 -/* 0025C 80B91DBC C5900024 */ lwc1 $f16, 0x0024($t4) ## 00000024 -/* 00260 80B91DC0 240D0046 */ addiu $t5, $zero, 0x0046 ## $t5 = 00000046 -/* 00264 80B91DC4 240E003C */ addiu $t6, $zero, 0x003C ## $t6 = 0000003C -/* 00268 80B91DC8 E7B000D0 */ swc1 $f16, 0x00D0($sp) -/* 0026C 80B91DCC C5860028 */ lwc1 $f6, 0x0028($t4) ## 00000028 -/* 00270 80B91DD0 240F0001 */ addiu $t7, $zero, 0x0001 ## $t7 = 00000001 -/* 00274 80B91DD4 8FA400EC */ lw $a0, 0x00EC($sp) -/* 00278 80B91DD8 46043281 */ sub.s $f10, $f6, $f4 -/* 0027C 80B91DDC 02A02825 */ or $a1, $s5, $zero ## $a1 = FFFFFFE8 -/* 00280 80B91DE0 3C064220 */ lui $a2, 0x4220 ## $a2 = 42200000 -/* 00284 80B91DE4 24070006 */ addiu $a3, $zero, 0x0006 ## $a3 = 00000006 -/* 00288 80B91DE8 E7AA00D4 */ swc1 $f10, 0x00D4($sp) -/* 0028C 80B91DEC C588002C */ lwc1 $f8, 0x002C($t4) ## 0000002C -/* 00290 80B91DF0 AFAF0018 */ sw $t7, 0x0018($sp) -/* 00294 80B91DF4 AFAE0014 */ sw $t6, 0x0014($sp) -/* 00298 80B91DF8 AFAD0010 */ sw $t5, 0x0010($sp) -/* 0029C 80B91DFC 0C00CD20 */ jal func_80033480 -/* 002A0 80B91E00 E7A800D8 */ swc1 $f8, 0x00D8($sp) -/* 002A4 80B91E04 8FBF009C */ lw $ra, 0x009C($sp) -/* 002A8 80B91E08 D7B40048 */ ldc1 $f20, 0x0048($sp) -/* 002AC 80B91E0C D7B60050 */ ldc1 $f22, 0x0050($sp) -/* 002B0 80B91E10 D7B80058 */ ldc1 $f24, 0x0058($sp) -/* 002B4 80B91E14 D7BA0060 */ ldc1 $f26, 0x0060($sp) -/* 002B8 80B91E18 D7BC0068 */ ldc1 $f28, 0x0068($sp) -/* 002BC 80B91E1C D7BE0070 */ ldc1 $f30, 0x0070($sp) -/* 002C0 80B91E20 8FB00078 */ lw $s0, 0x0078($sp) -/* 002C4 80B91E24 8FB1007C */ lw $s1, 0x007C($sp) -/* 002C8 80B91E28 8FB20080 */ lw $s2, 0x0080($sp) -/* 002CC 80B91E2C 8FB30084 */ lw $s3, 0x0084($sp) -/* 002D0 80B91E30 8FB40088 */ lw $s4, 0x0088($sp) -/* 002D4 80B91E34 8FB5008C */ lw $s5, 0x008C($sp) -/* 002D8 80B91E38 8FB60090 */ lw $s6, 0x0090($sp) -/* 002DC 80B91E3C 8FB70094 */ lw $s7, 0x0094($sp) -/* 002E0 80B91E40 8FBE0098 */ lw $s8, 0x0098($sp) -/* 002E4 80B91E44 03E00008 */ jr $ra -/* 002E8 80B91E48 27BD00E8 */ addiu $sp, $sp, 0x00E8 ## $sp = 00000000 - - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91E4C.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91E4C.s deleted file mode 100644 index 23bd2d93bc..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91E4C.s +++ /dev/null @@ -1,63 +0,0 @@ -glabel func_80B91E4C -/* 002EC 80B91E4C 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 002F0 80B91E50 AFBF0014 */ sw $ra, 0x0014($sp) -/* 002F4 80B91E54 AFA50024 */ sw $a1, 0x0024($sp) -/* 002F8 80B91E58 8482001C */ lh $v0, 0x001C($a0) ## 0000001C -/* 002FC 80B91E5C 00803825 */ or $a3, $a0, $zero ## $a3 = 00000000 -/* 00300 80B91E60 3046001F */ andi $a2, $v0, 0x001F ## $a2 = 00000000 -/* 00304 80B91E64 00063400 */ sll $a2, $a2, 16 -/* 00308 80B91E68 00063403 */ sra $a2, $a2, 16 -/* 0030C 80B91E6C 1CC00002 */ bgtz $a2, .L80B91E78 -/* 00310 80B91E70 28C1001A */ slti $at, $a2, 0x001A -/* 00314 80B91E74 10200025 */ beq $at, $zero, .L80B91F0C -.L80B91E78: -/* 00318 80B91E78 24010006 */ addiu $at, $zero, 0x0006 ## $at = 00000006 -/* 0031C 80B91E7C 14C10013 */ bne $a2, $at, .L80B91ECC -/* 00320 80B91E80 8FA40024 */ lw $a0, 0x0024($sp) -/* 00324 80B91E84 00022A03 */ sra $a1, $v0, 8 -/* 00328 80B91E88 30A5003F */ andi $a1, $a1, 0x003F ## $a1 = 00000000 -/* 0032C 80B91E8C A7A6001E */ sh $a2, 0x001E($sp) -/* 00330 80B91E90 0C00B35B */ jal Flags_GetCollectible - -/* 00334 80B91E94 AFA70020 */ sw $a3, 0x0020($sp) -/* 00338 80B91E98 87A6001E */ lh $a2, 0x001E($sp) -/* 0033C 80B91E9C 10400003 */ beq $v0, $zero, .L80B91EAC -/* 00340 80B91EA0 8FA70020 */ lw $a3, 0x0020($sp) -/* 00344 80B91EA4 10000015 */ beq $zero, $zero, .L80B91EFC -/* 00348 80B91EA8 2406FFFF */ addiu $a2, $zero, 0xFFFF ## $a2 = FFFFFFFF -.L80B91EAC: -/* 0034C 80B91EAC 84EE001C */ lh $t6, 0x001C($a3) ## 0000001C -/* 00350 80B91EB0 000E7A03 */ sra $t7, $t6, 8 -/* 00354 80B91EB4 31F8003F */ andi $t8, $t7, 0x003F ## $t8 = 00000000 -/* 00358 80B91EB8 0018CA00 */ sll $t9, $t8, 8 -/* 0035C 80B91EBC 00D93025 */ or $a2, $a2, $t9 ## $a2 = FFFFFFFF -/* 00360 80B91EC0 00063400 */ sll $a2, $a2, 16 -/* 00364 80B91EC4 1000000D */ beq $zero, $zero, .L80B91EFC -/* 00368 80B91EC8 00063403 */ sra $a2, $a2, 16 -.L80B91ECC: -/* 0036C 80B91ECC A7A6001E */ sh $a2, 0x001E($sp) -/* 00370 80B91ED0 0C03F66B */ jal Math_Rand_ZeroOne - ## Rand.Next() float -/* 00374 80B91ED4 AFA70020 */ sw $a3, 0x0020($sp) -/* 00378 80B91ED8 3C013F00 */ lui $at, 0x3F00 ## $at = 3F000000 -/* 0037C 80B91EDC 44812000 */ mtc1 $at, $f4 ## $f4 = 0.50 -/* 00380 80B91EE0 87A6001E */ lh $a2, 0x001E($sp) -/* 00384 80B91EE4 8FA70020 */ lw $a3, 0x0020($sp) -/* 00388 80B91EE8 4604003C */ c.lt.s $f0, $f4 -/* 0038C 80B91EEC 00000000 */ nop -/* 00390 80B91EF0 45000002 */ bc1f .L80B91EFC -/* 00394 80B91EF4 00000000 */ nop -/* 00398 80B91EF8 2406FFFF */ addiu $a2, $zero, 0xFFFF ## $a2 = FFFFFFFF -.L80B91EFC: -/* 0039C 80B91EFC 04C00003 */ bltz $a2, .L80B91F0C -/* 003A0 80B91F00 8FA40024 */ lw $a0, 0x0024($sp) -/* 003A4 80B91F04 0C007D52 */ jal Item_DropCollectible - -/* 003A8 80B91F08 24E50024 */ addiu $a1, $a3, 0x0024 ## $a1 = 00000024 -.L80B91F0C: -/* 003AC 80B91F0C 8FBF0014 */ lw $ra, 0x0014($sp) -/* 003B0 80B91F10 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 -/* 003B4 80B91F14 03E00008 */ jr $ra -/* 003B8 80B91F18 00000000 */ nop - - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FB0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FB0.s deleted file mode 100644 index 8f3e4998a7..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FB0.s +++ /dev/null @@ -1,7 +0,0 @@ -glabel func_80B91FB0 -/* 00450 80B91FB0 3C0E80B9 */ lui $t6, %hi(func_80B91FC0) ## $t6 = 80B90000 -/* 00454 80B91FB4 25CE1FC0 */ addiu $t6, $t6, %lo(func_80B91FC0) ## $t6 = 80B91FC0 -/* 00458 80B91FB8 03E00008 */ jr $ra -/* 0045C 80B91FBC AC8E014C */ sw $t6, 0x014C($a0) ## 0000014C - - diff --git a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FC0.s b/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FC0.s deleted file mode 100644 index 2ab4307bee..0000000000 --- a/asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FC0.s +++ /dev/null @@ -1,70 +0,0 @@ -glabel func_80B91FC0 -/* 00460 80B91FC0 27BDFFE0 */ addiu $sp, $sp, 0xFFE0 ## $sp = FFFFFFE0 -/* 00464 80B91FC4 AFBF001C */ sw $ra, 0x001C($sp) -/* 00468 80B91FC8 AFB10018 */ sw $s1, 0x0018($sp) -/* 0046C 80B91FCC AFB00014 */ sw $s0, 0x0014($sp) -/* 00470 80B91FD0 848E01B0 */ lh $t6, 0x01B0($a0) ## 000001B0 -/* 00474 80B91FD4 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 00478 80B91FD8 00A08825 */ or $s1, $a1, $zero ## $s1 = 00000000 -/* 0047C 80B91FDC 25CFFFCE */ addiu $t7, $t6, 0xFFCE ## $t7 = FFFFFFCE -/* 00480 80B91FE0 A48F01B0 */ sh $t7, 0x01B0($a0) ## 000001B0 -/* 00484 80B91FE4 849801B0 */ lh $t8, 0x01B0($a0) ## 000001B0 -/* 00488 80B91FE8 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 0048C 80B91FEC 00808025 */ or $s0, $a0, $zero ## $s0 = 00000000 -/* 00490 80B91FF0 07010002 */ bgez $t8, .L80B91FFC -/* 00494 80B91FF4 02212821 */ addu $a1, $s1, $at -/* 00498 80B91FF8 A48001B0 */ sh $zero, 0x01B0($a0) ## 000001B0 -.L80B91FFC: -/* 0049C 80B91FFC 92030161 */ lbu $v1, 0x0161($s0) ## 00000161 -/* 004A0 80B92000 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 004A4 80B92004 30790002 */ andi $t9, $v1, 0x0002 ## $t9 = 00000000 -/* 004A8 80B92008 13200018 */ beq $t9, $zero, .L80B9206C -/* 004AC 80B9200C 00000000 */ nop -/* 004B0 80B92010 8E09016C */ lw $t1, 0x016C($s0) ## 0000016C -/* 004B4 80B92014 3068FFFD */ andi $t0, $v1, 0xFFFD ## $t0 = 00000000 -/* 004B8 80B92018 A2080161 */ sb $t0, 0x0161($s0) ## 00000161 -/* 004BC 80B9201C 8D2A0024 */ lw $t2, 0x0024($t1) ## 00000024 -/* 004C0 80B92020 3C014001 */ lui $at, 0x4001 ## $at = 40010000 -/* 004C4 80B92024 3421F866 */ ori $at, $at, 0xF866 ## $at = 4001F866 -/* 004C8 80B92028 8D420000 */ lw $v0, 0x0000($t2) ## 00000000 -/* 004CC 80B9202C 240C05DC */ addiu $t4, $zero, 0x05DC ## $t4 = 000005DC -/* 004D0 80B92030 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 004D4 80B92034 00415824 */ and $t3, $v0, $at -/* 004D8 80B92038 11600003 */ beq $t3, $zero, .L80B92048 -/* 004DC 80B9203C 00000000 */ nop -/* 004E0 80B92040 1000000C */ beq $zero, $zero, .L80B92074 -/* 004E4 80B92044 A60C01B0 */ sh $t4, 0x01B0($s0) ## 000001B0 -.L80B92048: -/* 004E8 80B92048 0C2E46D8 */ jal func_80B91B60 -/* 004EC 80B9204C 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 004F0 80B92050 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 004F4 80B92054 0C2E4793 */ jal func_80B91E4C -/* 004F8 80B92058 02202825 */ or $a1, $s1, $zero ## $a1 = 00000000 -/* 004FC 80B9205C 0C00B55C */ jal Actor_Kill - -/* 00500 80B92060 02002025 */ or $a0, $s0, $zero ## $a0 = 00000000 -/* 00504 80B92064 10000004 */ beq $zero, $zero, .L80B92078 -/* 00508 80B92068 8E0D0130 */ lw $t5, 0x0130($s0) ## 00000130 -.L80B9206C: -/* 0050C 80B9206C 0C01767D */ jal Actor_CollisionCheck_SetAC - ## CollisionCheck_setAC -/* 00510 80B92070 26060150 */ addiu $a2, $s0, 0x0150 ## $a2 = 00000150 -.L80B92074: -/* 00514 80B92074 8E0D0130 */ lw $t5, 0x0130($s0) ## 00000130 -.L80B92078: -/* 00518 80B92078 3C010001 */ lui $at, 0x0001 ## $at = 00010000 -/* 0051C 80B9207C 34211E60 */ ori $at, $at, 0x1E60 ## $at = 00011E60 -/* 00520 80B92080 11A00004 */ beq $t5, $zero, .L80B92094 -/* 00524 80B92084 02202025 */ or $a0, $s1, $zero ## $a0 = 00000000 -/* 00528 80B92088 02212821 */ addu $a1, $s1, $at -/* 0052C 80B9208C 0C017713 */ jal Actor_CollisionCheck_SetOT - ## CollisionCheck_setOT -/* 00530 80B92090 26060150 */ addiu $a2, $s0, 0x0150 ## $a2 = 00000150 -.L80B92094: -/* 00534 80B92094 8FBF001C */ lw $ra, 0x001C($sp) -/* 00538 80B92098 8FB00014 */ lw $s0, 0x0014($sp) -/* 0053C 80B9209C 8FB10018 */ lw $s1, 0x0018($sp) -/* 00540 80B920A0 03E00008 */ jr $ra -/* 00544 80B920A4 27BD0020 */ addiu $sp, $sp, 0x0020 ## $sp = 00000000 - - diff --git a/data/overlays/actors/z_obj_comb.data.s b/data/overlays/actors/z_obj_comb.data.s deleted file mode 100644 index a9cc43406d..0000000000 --- a/data/overlays/actors/z_obj_comb.data.s +++ /dev/null @@ -1,23 +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 purposee registers - -.section .data - -glabel Obj_Comb_InitVars - .word 0x019E0600, 0x00000000, 0x00020000, 0x000001B4 -.word ObjComb_Init -.word ObjComb_Destroy -.word ObjComb_Update -.word ObjComb_Draw -glabel D_80B922E0 - .word 0x00000000, 0x00000000, 0x00000000, 0x4001FFFE, 0x00000000, 0x00010100, 0x00000000, 0x00000000, 0x000F0064 -glabel D_80B92304 - .word 0x0A000909, 0x20000000, 0x00000001 -.word D_80B922E0 -glabel D_80B92314 - .word 0xC8500064, 0xB0F4044C, 0xB0F80064, 0x30FC0384, 0x00000000, 0x00000000, 0x00000000 - diff --git a/data/overlays/actors/z_obj_comb.reloc.s b/data/overlays/actors/z_obj_comb.reloc.s deleted file mode 100644 index 496dab5144..0000000000 --- a/data/overlays/actors/z_obj_comb.reloc.s +++ /dev/null @@ -1,11 +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 purposee registers - -.section .rodata -glabel D_80B92380 - -.incbin "baserom/ovl_Obj_Comb", 0x820, 0x000000A0 diff --git a/data/overlays/actors/z_obj_comb.rodata.s b/data/overlays/actors/z_obj_comb.rodata.s deleted file mode 100644 index 55967af28f..0000000000 --- a/data/overlays/actors/z_obj_comb.rodata.s +++ /dev/null @@ -1,37 +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 purposee registers - -.section .rodata - -glabel D_80B92330 - .asciz "../z_obj_comb.c" - .balign 4 - -glabel D_80B92340 - .asciz "../z_obj_comb.c" - .balign 4 - -glabel D_80B92350 - .asciz "../z_obj_comb.c" - .balign 4 - -glabel D_80B92360 - .word 0x3F19999A -glabel D_80B92364 - .word 0x3F333333 -glabel D_80B92368 - .word 0x3DCCCCCD -glabel D_80B9236C - .word 0x3F4CCCCD -glabel D_80B92370 - .word 0x38C90FDB -glabel D_80B92374 - .word 0x38C90FDB -glabel D_80B92378 - .word 0x38C90FDB, 0x00000000 - - diff --git a/spec b/spec index 858962b1e8..32ca30a07d 100644 --- a/spec +++ b/spec @@ -4022,9 +4022,7 @@ endseg beginseg name "ovl_Obj_Comb" include "build/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.o" - include "build/data/overlays/actors/z_obj_comb.data.o" - include "build/data/overlays/actors/z_obj_comb.rodata.o" - include "build/data/overlays/actors/z_obj_comb.reloc.o" + include "build/src/overlays/actors/ovl_Obj_Comb/z_obj_comb_reloc.o" endseg beginseg diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 38099bca4e..8c35088072 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -8,7 +8,11 @@ void ObjComb_Destroy(ObjComb* this, GlobalContext* globalCtx); void ObjComb_Update(ObjComb* this, GlobalContext* globalCtx); void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx); -/* +void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx); +void func_80B91E4C(ObjComb* this, GlobalContext* globalCtx); +void func_80B91FB0(ObjComb* this); +void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx); + const ActorInit Obj_Comb_InitVars = { ACTOR_OBJ_COMB, ACTORTYPE_PROP, @@ -21,19 +25,187 @@ const ActorInit Obj_Comb_InitVars = { (ActorFunc)ObjComb_Update, (ActorFunc)ObjComb_Draw, }; -*/ -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91B60.s") -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91E4C.s") +UNK_TYPE D_80B922E0[] = { + 0x00000000, 0x00000000, 0x00000000, 0x4001FFFE, 0x00000000, 0x00010100, 0x00000000, 0x00000000, 0x000F0064, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Init.s") +UNK_TYPE D_80B92304[] = { + 0x0A000909, + 0x20000000, + 0x00000001, + &D_80B922E0, +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Destroy.s") +InitChainEntry D_80B92314[] = { + ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), + ICHAIN_F32(unk_F4, 1100, ICHAIN_CONTINUE), + ICHAIN_F32(unk_F8, 100, ICHAIN_CONTINUE), + ICHAIN_F32(unk_FC, 900, ICHAIN_STOP), +}; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FB0.s") +extern UNK_TYPE D_050095B0; +extern UNK_TYPE D_05009940; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/func_80B91FC0.s") +void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { + Vec3f pos1; + Vec3f posSum; + Vec3f pos2; + Gfx** dlist; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Update.s") + s16 scale; + s16 phi_s2; + s16 gravityInfluence; + char u0; + char rotSpeed; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Obj_Comb/ObjComb_Draw.s") + f32 rand1; + f32 rand2; + s32 i; + + dlist = &D_05009940; + + phi_s2 = 0; + for (i = 0; i < 31; i++) { + phi_s2 += 20000; + rand1 = Math_Rand_ZeroOne() * 10.0f; + + pos1.x = Math_Sins(phi_s2) * rand1; + pos1.y = (i - 15) * 0.7f; + pos1.z = Math_Coss(phi_s2) * rand1; + + Math_Vec3f_Sum(&pos1, &this->actor.posRot.pos, &posSum); + + pos2.x = (Math_Rand_ZeroOne() - 0.5f) + pos1.x * 0.5f; + pos2.y = (Math_Rand_ZeroOne() - 0.5f) + pos1.y * 0.6f; + pos2.z = (Math_Rand_ZeroOne() - 0.5f) + pos1.z * 0.5f; + + scale = Math_Rand_ZeroOne() * 72.0f + 25.0f; + + if (scale < 40) { + gravityInfluence = -200; + rotSpeed = 40; + } else if (scale < 70) { + gravityInfluence = -280; + rotSpeed = 30; + } else { + gravityInfluence = -340; + rotSpeed = 20; + } + + rand2 = Math_Rand_ZeroOne(); + + if (rand2 < 0.1f) { + u0 = 96; + } else if (rand2 < 0.8f) { + u0 = 64; + } else { + u0 = 32; + } + + Effect_SpawnFragment(globalCtx, &posSum, &pos2, &posSum, gravityInfluence, u0, rotSpeed, 4, 0, scale, 0, 0, 80, + -1, 2, dlist); + } + + posSum.x = this->actor.posRot.pos.x; + posSum.y = this->actor.posRot.pos.y - 10.0f; + posSum.z = this->actor.posRot.pos.z; + func_80033480(globalCtx, &posSum, 40.0f, 6, 70, 60, 1); +} + +void func_80B91E4C(ObjComb* this, GlobalContext* globalCtx) { + s16 params = this->actor.params & 0x1F; + + if ((params > 0) || (params < 0x1A)) { + if (params == 6) { + if (Flags_GetCollectible(globalCtx, (this->actor.params >> 8) & 0x3F) != 0) { + params = -1; + } else { + params = (params | (((this->actor.params >> 8) & 0x3F) << 8)); + } + } else if (Math_Rand_ZeroOne() < 0.5f) { + params = -1; + } + if (params >= 0) { + Item_DropCollectible(globalCtx, &this->actor.posRot, params); + } + } +} + +void ObjComb_Init(ObjComb* this, GlobalContext* globalCtx) { + s32 pad; + + Actor_ProcessInitChain(&this->actor, &D_80B92314); + func_8005BBF8(globalCtx, &this->unk_150); + func_8005C050(globalCtx, &this->unk_150, this, &D_80B92304, &this->unk_170); + func_80B91FB0(this); +} + +void ObjComb_Destroy(ObjComb* this, GlobalContext* globalCtx) { + func_8005BCC8(globalCtx, &this->unk_150); +} + +void func_80B91FB0(ObjComb* this) { + this->actionFunc = func_80B91FC0; +} + +void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx) { + s32 flags; + + this->unk_1B0 -= 50; + if (this->unk_1B0 < 0) { + this->unk_1B0 = 0; + } + + if ((this->unk_161 & 2) != 0) { + this->unk_161 &= 0xFFFD; + flags = this->colliderBody->colliding->toucher.flags; + if (flags & 0x4001F866) { + this->unk_1B0 = 1500; + } else { + ObjComb_Break(this, globalCtx); + func_80B91E4C(this, globalCtx); + Actor_Kill(this); + } + } else { + Actor_CollisionCheck_SetAC(globalCtx, &globalCtx->sub_11E60, &this->unk_150); + } + + if (this->actor.update != NULL) { + Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->unk_150); + } +} + +void ObjComb_Update(ObjComb* this, GlobalContext* globalCtx) { + this->unk_1B2 += 0x2EE0; + this->actionFunc(&this->actor, globalCtx); + this->actor.shape.rot.x = + (s32)((Math_Sins(this->unk_1B2) * (f32)this->unk_1B0) + (f32)this->actor.initPosRot.rot.x); +} + +void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx) { + s32 pad; + GraphicsContext* gfxCtx; + Gfx* gfxArr[4]; + + gfxCtx = globalCtx->state.gfxCtx; + + func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_obj_comb.c", 369); + func_80093D18(globalCtx->state.gfxCtx); + + Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y + (118.0f * this->actor.scale.y), + this->actor.posRot.pos.z, 0); + Matrix_RotateY((f32)this->actor.shape.rot.y * 0.0000958738f, 1); + Matrix_RotateX((f32)this->actor.shape.rot.x * 0.0000958738f, 1); + Matrix_RotateZ((f32)this->actor.shape.rot.z * 0.0000958738f, 1); + Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, 1); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1); + + gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_comb.c", 394), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + + gSPDisplayList(gfxCtx->polyOpa.p++, &D_050095B0); + + func_800628A4(0, &this->unk_150); + func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_obj_comb.c", 402); +} diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h index 650ad1e261..fcbf6676d7 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h @@ -6,7 +6,15 @@ typedef struct { /* 0x0000 */ Actor actor; - /* 0x014C */ char unk_14C[0x68]; + /* 0x014C */ ActorFunc actionFunc; + /* 0x0150 */ char unk_150[0x11]; + /* 0x0161 */ u8 unk_161; + /* 0x0162 */ char unk_162[0xA]; + /* 0x016C */ ColliderBody* colliderBody; + /* 0x0170 */ char unk_170[0x2C]; + /* 0x019C */ char unk_19C[0x14]; + /* 0x01B0 */ s16 unk_1B0; + /* 0x01B2 */ s16 unk_1B2; } ObjComb; // size = 0x01B4 extern const ActorInit Obj_Comb_InitVars; diff --git a/undefined_syms.txt b/undefined_syms.txt index 131d46de9e..dc9c125878 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -454,4 +454,8 @@ link_animetion_segment = 0x07000000; // z_en_ds D_06004768 = 0x06004768; -D_0600039C = 0x0600039C; \ No newline at end of file +D_0600039C = 0x0600039C; + +// z_obj_comb +D_050095B0 = 0x050095B0; +D_05009940 = 0x05009940; \ No newline at end of file From c05de00a96bd5d93ff6b86508171ae1fb1d2bec5 Mon Sep 17 00:00:00 2001 From: zelda2773 Date: Mon, 30 Mar 2020 23:46:54 -0400 Subject: [PATCH 2/4] ovl_Obj_Comb fix struct --- include/functions.h | 1 + src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 38 ++++++++----------- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h | 5 +-- 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/include/functions.h b/include/functions.h index b5262044f6..72c19c22a8 100644 --- a/include/functions.h +++ b/include/functions.h @@ -690,6 +690,7 @@ s32 func_8005BA74(UNK_TYPE, UNK_TYPE); // ? func_8005BB8C(?); // ? func_8005BBB0(?); // ? func_8005BBD4(?); +void func_8005C050(GlobalContext* globalCtx, Collider* collision, Actor* actor, UNK_TYPE arg3, UNK_TYPE arg4); // ? func_8005C2BC(?); s32 func_8005C318(GlobalContext* globalCtx, ColliderDimensions* dim); s32 func_8005C328(GlobalContext* globalCtx, ColliderDimensions* dest, ColliderDimensions* src); diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 8c35088072..0d12c451e1 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -51,21 +51,16 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { Vec3f pos1; Vec3f posSum; Vec3f pos2; - Gfx** dlist; - + Gfx** dlist = &D_05009940; s16 scale; - s16 phi_s2; + s16 phi_s2 = 0; s16 gravityInfluence; char u0; char rotSpeed; - f32 rand1; f32 rand2; s32 i; - dlist = &D_05009940; - - phi_s2 = 0; for (i = 0; i < 31; i++) { phi_s2 += 20000; rand1 = Math_Rand_ZeroOne() * 10.0f; @@ -81,7 +76,6 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { pos2.z = (Math_Rand_ZeroOne() - 0.5f) + pos1.z * 0.5f; scale = Math_Rand_ZeroOne() * 72.0f + 25.0f; - if (scale < 40) { gravityInfluence = -200; rotSpeed = 40; @@ -94,7 +88,6 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { } rand2 = Math_Rand_ZeroOne(); - if (rand2 < 0.1f) { u0 = 96; } else if (rand2 < 0.8f) { @@ -136,13 +129,13 @@ void ObjComb_Init(ObjComb* this, GlobalContext* globalCtx) { s32 pad; Actor_ProcessInitChain(&this->actor, &D_80B92314); - func_8005BBF8(globalCtx, &this->unk_150); - func_8005C050(globalCtx, &this->unk_150, this, &D_80B92304, &this->unk_170); + func_8005BBF8(globalCtx, &this->collider); + func_8005C050(globalCtx, &this->collider, this, &D_80B92304, &this->unk_170); func_80B91FB0(this); } void ObjComb_Destroy(ObjComb* this, GlobalContext* globalCtx) { - func_8005BCC8(globalCtx, &this->unk_150); + func_8005BCC8(globalCtx, &this->collider); } void func_80B91FB0(ObjComb* this) { @@ -157,8 +150,8 @@ void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx) { this->unk_1B0 = 0; } - if ((this->unk_161 & 2) != 0) { - this->unk_161 &= 0xFFFD; + if ((this->collider.collideFlags & 0x2) != 0) { + this->collider.collideFlags &= ~0x2; flags = this->colliderBody->colliding->toucher.flags; if (flags & 0x4001F866) { this->unk_1B0 = 1500; @@ -168,19 +161,18 @@ void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx) { Actor_Kill(this); } } else { - Actor_CollisionCheck_SetAC(globalCtx, &globalCtx->sub_11E60, &this->unk_150); + Actor_CollisionCheck_SetAC(globalCtx, &globalCtx->sub_11E60, &this->collider); } if (this->actor.update != NULL) { - Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->unk_150); + Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, &this->collider); } } void ObjComb_Update(ObjComb* this, GlobalContext* globalCtx) { - this->unk_1B2 += 0x2EE0; + this->unk_1B2 += 12000; this->actionFunc(&this->actor, globalCtx); - this->actor.shape.rot.x = - (s32)((Math_Sins(this->unk_1B2) * (f32)this->unk_1B0) + (f32)this->actor.initPosRot.rot.x); + this->actor.shape.rot.x = Math_Sins(this->unk_1B2) * this->unk_1B0 + this->actor.initPosRot.rot.x; } void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx) { @@ -195,9 +187,9 @@ void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx) { Matrix_Translate(this->actor.posRot.pos.x, this->actor.posRot.pos.y + (118.0f * this->actor.scale.y), this->actor.posRot.pos.z, 0); - Matrix_RotateY((f32)this->actor.shape.rot.y * 0.0000958738f, 1); - Matrix_RotateX((f32)this->actor.shape.rot.x * 0.0000958738f, 1); - Matrix_RotateZ((f32)this->actor.shape.rot.z * 0.0000958738f, 1); + Matrix_RotateY(this->actor.shape.rot.y * 0.0000958738f, 1); + Matrix_RotateX(this->actor.shape.rot.x * 0.0000958738f, 1); + Matrix_RotateZ(this->actor.shape.rot.z * 0.0000958738f, 1); Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, 1); Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1); @@ -206,6 +198,6 @@ void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx) { gSPDisplayList(gfxCtx->polyOpa.p++, &D_050095B0); - func_800628A4(0, &this->unk_150); + func_800628A4(0, &this->collider); func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_obj_comb.c", 402); } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h index fcbf6676d7..663a48fcc0 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h @@ -7,9 +7,8 @@ typedef struct { /* 0x0000 */ Actor actor; /* 0x014C */ ActorFunc actionFunc; - /* 0x0150 */ char unk_150[0x11]; - /* 0x0161 */ u8 unk_161; - /* 0x0162 */ char unk_162[0xA]; + /* 0x0150 */ Collider collider; + /* 0x0168 */ char unk_168[0x4]; /* 0x016C */ ColliderBody* colliderBody; /* 0x0170 */ char unk_170[0x2C]; /* 0x019C */ char unk_19C[0x14]; From 730b788f6ee0f4b2a026cfa7070b7e5674a4f83f Mon Sep 17 00:00:00 2001 From: zelda2773 Date: Tue, 31 Mar 2020 00:03:53 -0400 Subject: [PATCH 3/4] ovl_Obj_Comb add header --- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 0d12c451e1..462363100a 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -1,3 +1,9 @@ +/* + * File: z_obj_comb.c + * Overlay: ovl_Obj_Comb + * Description: Beehive + */ + #include "z_obj_comb.h" #define ROOM 0x00 @@ -37,7 +43,7 @@ UNK_TYPE D_80B92304[] = { &D_80B922E0, }; -InitChainEntry D_80B92314[] = { +InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32(unk_F4, 1100, ICHAIN_CONTINUE), ICHAIN_F32(unk_F8, 100, ICHAIN_CONTINUE), @@ -95,7 +101,6 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { } else { u0 = 32; } - Effect_SpawnFragment(globalCtx, &posSum, &pos2, &posSum, gravityInfluence, u0, rotSpeed, 4, 0, scale, 0, 0, 80, -1, 2, dlist); } @@ -128,7 +133,7 @@ void func_80B91E4C(ObjComb* this, GlobalContext* globalCtx) { void ObjComb_Init(ObjComb* this, GlobalContext* globalCtx) { s32 pad; - Actor_ProcessInitChain(&this->actor, &D_80B92314); + Actor_ProcessInitChain(&this->actor, &initChain); func_8005BBF8(globalCtx, &this->collider); func_8005C050(globalCtx, &this->collider, this, &D_80B92304, &this->unk_170); func_80B91FB0(this); From 5059e623fbc635c18655f78872711e4c71b26b0b Mon Sep 17 00:00:00 2001 From: zelda2773 Date: Tue, 31 Mar 2020 10:13:21 -0400 Subject: [PATCH 4/4] ovl_Obj_Comb renamed functions and variables --- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 42 +++++++++---------- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h | 6 +-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 462363100a..8fc88f2d71 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -15,9 +15,9 @@ void ObjComb_Update(ObjComb* this, GlobalContext* globalCtx); void ObjComb_Draw(ObjComb* this, GlobalContext* globalCtx); void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx); -void func_80B91E4C(ObjComb* this, GlobalContext* globalCtx); -void func_80B91FB0(ObjComb* this); -void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx); +void ObjComb_ChooseItemDrop(ObjComb* this, GlobalContext* globalCtx); +void ObjComb_SetWait(ObjComb* this); +void ObjComb_Wait(ObjComb* this, GlobalContext* globalCtx); const ActorInit Obj_Comb_InitVars = { ACTOR_OBJ_COMB, @@ -43,7 +43,7 @@ UNK_TYPE D_80B92304[] = { &D_80B922E0, }; -InitChainEntry initChain[] = { +static InitChainEntry initChain[] = { ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), ICHAIN_F32(unk_F4, 1100, ICHAIN_CONTINUE), ICHAIN_F32(unk_F8, 100, ICHAIN_CONTINUE), @@ -59,21 +59,21 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { Vec3f pos2; Gfx** dlist = &D_05009940; s16 scale; - s16 phi_s2 = 0; + s16 angle = 0; s16 gravityInfluence; - char u0; - char rotSpeed; + u8 u0; + u8 rotSpeed; f32 rand1; f32 rand2; s32 i; for (i = 0; i < 31; i++) { - phi_s2 += 20000; + angle += 20000; rand1 = Math_Rand_ZeroOne() * 10.0f; - pos1.x = Math_Sins(phi_s2) * rand1; + pos1.x = Math_Sins(angle) * rand1; pos1.y = (i - 15) * 0.7f; - pos1.z = Math_Coss(phi_s2) * rand1; + pos1.z = Math_Coss(angle) * rand1; Math_Vec3f_Sum(&pos1, &this->actor.posRot.pos, &posSum); @@ -111,12 +111,12 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) { func_80033480(globalCtx, &posSum, 40.0f, 6, 70, 60, 1); } -void func_80B91E4C(ObjComb* this, GlobalContext* globalCtx) { +void ObjComb_ChooseItemDrop(ObjComb* this, GlobalContext* globalCtx) { s16 params = this->actor.params & 0x1F; if ((params > 0) || (params < 0x1A)) { if (params == 6) { - if (Flags_GetCollectible(globalCtx, (this->actor.params >> 8) & 0x3F) != 0) { + if (Flags_GetCollectible(globalCtx, (this->actor.params >> 8) & 0x3F)) { params = -1; } else { params = (params | (((this->actor.params >> 8) & 0x3F) << 8)); @@ -135,20 +135,20 @@ void ObjComb_Init(ObjComb* this, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, &initChain); func_8005BBF8(globalCtx, &this->collider); - func_8005C050(globalCtx, &this->collider, this, &D_80B92304, &this->unk_170); - func_80B91FB0(this); + func_8005C050(globalCtx, &this->collider, this, &D_80B92304, &this->colliderBody); + ObjComb_SetWait(this); } void ObjComb_Destroy(ObjComb* this, GlobalContext* globalCtx) { func_8005BCC8(globalCtx, &this->collider); } -void func_80B91FB0(ObjComb* this) { - this->actionFunc = func_80B91FC0; +void ObjComb_SetWait(ObjComb* this) { + this->actionFunc = ObjComb_Wait; } -void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx) { - s32 flags; +void ObjComb_Wait(ObjComb* this, GlobalContext* globalCtx) { + s32 toucherFlags; this->unk_1B0 -= 50; if (this->unk_1B0 < 0) { @@ -157,12 +157,12 @@ void func_80B91FC0(ObjComb* this, GlobalContext* globalCtx) { if ((this->collider.collideFlags & 0x2) != 0) { this->collider.collideFlags &= ~0x2; - flags = this->colliderBody->colliding->toucher.flags; - if (flags & 0x4001F866) { + toucherFlags = this->colliderBodyPtr->colliding->toucher.flags; + if (toucherFlags & 0x4001F866) { this->unk_1B0 = 1500; } else { ObjComb_Break(this, globalCtx); - func_80B91E4C(this, globalCtx); + ObjComb_ChooseItemDrop(this, globalCtx); Actor_Kill(this); } } else { diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h index 663a48fcc0..fcd17464c8 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.h @@ -9,9 +9,9 @@ typedef struct { /* 0x014C */ ActorFunc actionFunc; /* 0x0150 */ Collider collider; /* 0x0168 */ char unk_168[0x4]; - /* 0x016C */ ColliderBody* colliderBody; - /* 0x0170 */ char unk_170[0x2C]; - /* 0x019C */ char unk_19C[0x14]; + /* 0x016C */ ColliderBody* colliderBodyPtr; + /* 0x0170 */ ColliderBody colliderBody; + /* 0x0198 */ char unk_198[0x18]; /* 0x01B0 */ s16 unk_1B0; /* 0x01B2 */ s16 unk_1B2; } ObjComb; // size = 0x01B4