diff --git a/.gitignore b/.gitignore index e78b49569..49e7caf5c 100755 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ expected/* # Assets. Generally ignored, but ones with "custom" in the name are fine. /bin/* /textures/**/*.png +/textures/**/*.bin /assets/**/*.bin /music/**/*.m64 /sound/**/*.m64 diff --git a/asm/non_matchings/code_802B0210/update_obj_banana.s b/asm/non_matchings/code_802B0210/update_obj_banana.s index f71256d72..ee9007bfb 100644 --- a/asm/non_matchings/code_802B0210/update_obj_banana.s +++ b/asm/non_matchings/code_802B0210/update_obj_banana.s @@ -575,7 +575,7 @@ glabel L802B285C /* 11BEDC 802B28CC A60C0012 */ sh $t4, 0x12($s0) /* 11BEE0 802B28D0 1720000B */ bnez $t9, .L802B2900 /* 11BEE4 802B28D4 A60E0014 */ sh $t6, 0x14($s0) -/* 11BEE8 802B28D8 0C0A7A15 */ jal func_8029E854 +/* 11BEE8 802B28D8 0C0A7A15 */ jal destroy_actor /* 11BEEC 802B28DC 02002025 */ move $a0, $s0 /* 11BEF0 802B28E0 10000008 */ b .L802B2904 /* 11BEF4 802B28E4 8FBF0024 */ lw $ra, 0x24($sp) diff --git a/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s b/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s index d795a6ecc..91b187b80 100644 --- a/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s +++ b/asm/non_matchings/code_802B0210/update_obj_banana_bunch.s @@ -204,7 +204,7 @@ glabel L802B0C70 .L802B0D24: /* 11A334 802B0D24 1460000A */ bnez $v1, .L802B0D50 /* 11A338 802B0D28 02002025 */ move $a0, $s0 -/* 11A33C 802B0D2C 0C0A7A15 */ jal func_8029E854 +/* 11A33C 802B0D2C 0C0A7A15 */ jal destroy_actor /* 11A340 802B0D30 AFA7002C */ sw $a3, 0x2c($sp) /* 11A344 802B0D34 8FA7002C */ lw $a3, 0x2c($sp) /* 11A348 802B0D38 3C01FFFB */ lui $at, (0xFFFBFFFF >> 16) # lui $at, 0xfffb diff --git a/asm/non_matchings/code_802B0210/update_obj_green_shell.s b/asm/non_matchings/code_802B0210/update_obj_green_shell.s index 538131405..ce95168f7 100644 --- a/asm/non_matchings/code_802B0210/update_obj_green_shell.s +++ b/asm/non_matchings/code_802B0210/update_obj_green_shell.s @@ -558,7 +558,7 @@ glabel L802B3AC4 /* 11D12C 802B3B1C A60E0012 */ sh $t6, 0x12($s0) /* 11D130 802B3B20 17200003 */ bnez $t9, .L802B3B30 /* 11D134 802B3B24 E604001C */ swc1 $f4, 0x1c($s0) -/* 11D138 802B3B28 0C0A7A15 */ jal func_8029E854 +/* 11D138 802B3B28 0C0A7A15 */ jal destroy_actor /* 11D13C 802B3B2C 02002025 */ move $a0, $s0 .L802B3B30: glabel L802B3B30 diff --git a/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s b/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s index 7ee60a568..556fe6e1e 100644 --- a/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s +++ b/asm/non_matchings/code_802B0210/update_obj_red_blue_shell.s @@ -750,7 +750,7 @@ glabel L802B4CE4 /* 11E34C 802B4D3C A6180012 */ sh $t8, 0x12($s0) /* 11E350 802B4D40 15200036 */ bnez $t1, .L802B4E1C /* 11E354 802B4D44 E604001C */ swc1 $f4, 0x1c($s0) -/* 11E358 802B4D48 0C0A7A15 */ jal func_8029E854 +/* 11E358 802B4D48 0C0A7A15 */ jal destroy_actor /* 11E35C 802B4D4C 02002025 */ move $a0, $s0 /* 11E360 802B4D50 10000033 */ b .L802B4E20 /* 11E364 802B4D54 8FBF002C */ lw $ra, 0x2c($sp) diff --git a/asm/non_matchings/code_802B0210/update_obj_triple_shell.s b/asm/non_matchings/code_802B0210/update_obj_triple_shell.s index e93868bf0..b137796bc 100644 --- a/asm/non_matchings/code_802B0210/update_obj_triple_shell.s +++ b/asm/non_matchings/code_802B0210/update_obj_triple_shell.s @@ -297,7 +297,7 @@ glabel L802B11FC .L802B12F0: /* 11A900 802B12F0 54600006 */ bnel $v1, $zero, .L802B130C /* 11A904 802B12F4 860F0014 */ lh $t7, 0x14($s0) -/* 11A908 802B12F8 0C0A7A15 */ jal func_8029E854 +/* 11A908 802B12F8 0C0A7A15 */ jal destroy_actor /* 11A90C 802B12FC 02002025 */ move $a0, $s0 /* 11A910 802B1300 10000138 */ b .L802B17E4 /* 11A914 802B1304 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/code_actors/func_80296A50.s b/asm/non_matchings/code_actors/func_80296A50.s index 890f6076c..42af7b13b 100644 --- a/asm/non_matchings/code_actors/func_80296A50.s +++ b/asm/non_matchings/code_actors/func_80296A50.s @@ -37,7 +37,7 @@ glabel func_80296A50 /* 1000E4 80296AD4 944C0000 */ lhu $t4, ($v0) /* 1000E8 80296AD8 00A02025 */ move $a0, $a1 /* 1000EC 80296ADC 258DFFFF */ addiu $t5, $t4, -1 -/* 1000F0 80296AE0 0C0A7A15 */ jal func_8029E854 +/* 1000F0 80296AE0 0C0A7A15 */ jal destroy_actor /* 1000F4 80296AE4 A44D0000 */ sh $t5, ($v0) /* 1000F8 80296AE8 10000086 */ b .L80296D04 /* 1000FC 80296AEC 8FBF0014 */ lw $ra, 0x14($sp) @@ -89,7 +89,7 @@ glabel L80296B88 /* 1001A0 80296B90 944D0000 */ lhu $t5, ($v0) /* 1001A4 80296B94 00A02025 */ move $a0, $a1 /* 1001A8 80296B98 25AEFFFF */ addiu $t6, $t5, -1 -/* 1001AC 80296B9C 0C0A7A15 */ jal func_8029E854 +/* 1001AC 80296B9C 0C0A7A15 */ jal destroy_actor /* 1001B0 80296BA0 A44E0000 */ sh $t6, ($v0) /* 1001B4 80296BA4 10000057 */ b .L80296D04 /* 1001B8 80296BA8 8FBF0014 */ lw $ra, 0x14($sp) @@ -136,7 +136,7 @@ glabel L80296BAC /* 100240 80296C30 944A0000 */ lhu $t2, ($v0) /* 100244 80296C34 00A02025 */ move $a0, $a1 /* 100248 80296C38 254BFFFF */ addiu $t3, $t2, -1 -/* 10024C 80296C3C 0C0A7A15 */ jal func_8029E854 +/* 10024C 80296C3C 0C0A7A15 */ jal destroy_actor /* 100250 80296C40 A44B0000 */ sh $t3, ($v0) /* 100254 80296C44 1000002F */ b .L80296D04 /* 100258 80296C48 8FBF0014 */ lw $ra, 0x14($sp) @@ -182,7 +182,7 @@ glabel L80296CCC /* 1002E4 80296CD4 94590000 */ lhu $t9, ($v0) /* 1002E8 80296CD8 00A02025 */ move $a0, $a1 /* 1002EC 80296CDC 272AFFFF */ addiu $t2, $t9, -1 -/* 1002F0 80296CE0 0C0A7A15 */ jal func_8029E854 +/* 1002F0 80296CE0 0C0A7A15 */ jal destroy_actor /* 1002F4 80296CE4 A44A0000 */ sh $t2, ($v0) /* 1002F8 80296CE8 10000006 */ b .L80296D04 /* 1002FC 80296CEC 8FBF0014 */ lw $ra, 0x14($sp) diff --git a/asm/non_matchings/code_actors/func_80298D10.s b/asm/non_matchings/code_actors/func_80298D10.s deleted file mode 100644 index def7e2f32..000000000 --- a/asm/non_matchings/code_actors/func_80298D10.s +++ /dev/null @@ -1,30 +0,0 @@ -glabel func_80298D10 -/* 102320 80298D10 3C020601 */ lui $v0, %hi(D_06013F78) # $v0, 0x601 -/* 102324 80298D14 24423F78 */ addiu $v0, %lo(D_06013F78) # addiu $v0, $v0, 0x3f78 -/* 102328 80298D18 00027602 */ srl $t6, $v0, 0x18 -/* 10232C 80298D1C 000E7880 */ sll $t7, $t6, 2 -/* 102330 80298D20 3C188015 */ lui $t8, %hi(gSegmentTable) -/* 102334 80298D24 030FC021 */ addu $t8, $t8, $t7 -/* 102338 80298D28 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff -/* 10233C 80298D2C 8F180258 */ lw $t8, %lo(gSegmentTable)($t8) -/* 102340 80298D30 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 102344 80298D34 0041C824 */ and $t9, $v0, $at -/* 102348 80298D38 3C018000 */ lui $at, 0x8000 -/* 10234C 80298D3C 03191821 */ addu $v1, $t8, $t9 -/* 102350 80298D40 00611821 */ addu $v1, $v1, $at -/* 102354 80298D44 84680000 */ lh $t0, ($v1) -/* 102358 80298D48 24048000 */ li $a0, -32768 -/* 10235C 80298D4C 10880009 */ beq $a0, $t0, .L80298D74 -/* 102360 80298D50 00000000 */ nop -.L80298D54: -/* 102364 80298D54 846A0006 */ lh $t2, 6($v1) -/* 102368 80298D58 846C000A */ lh $t4, 0xa($v1) -/* 10236C 80298D5C 84690008 */ lh $t1, 8($v1) -/* 102370 80298D60 314B000F */ andi $t3, $t2, 0xf -/* 102374 80298D64 A46B0006 */ sh $t3, 6($v1) -/* 102378 80298D68 2463000A */ addiu $v1, $v1, 0xa -/* 10237C 80298D6C 148CFFF9 */ bne $a0, $t4, .L80298D54 -/* 102380 80298D70 A469FFF8 */ sh $t1, -8($v1) -.L80298D74: -/* 102384 80298D74 03E00008 */ jr $ra -/* 102388 80298D78 00000000 */ nop diff --git a/asm/non_matchings/code_actors/func_8029D9F8.s b/asm/non_matchings/code_actors/func_8029D9F8.s deleted file mode 100644 index 987e49983..000000000 --- a/asm/non_matchings/code_actors/func_8029D9F8.s +++ /dev/null @@ -1,51 +0,0 @@ -glabel func_8029D9F8 -/* 107008 8029D9F8 27BDFF90 */ addiu $sp, $sp, -0x70 -/* 10700C 8029D9FC AFB6002C */ sw $s6, 0x2c($sp) -/* 107010 8029DA00 AFB10018 */ sw $s1, 0x18($sp) -/* 107014 8029DA04 AFB70030 */ sw $s7, 0x30($sp) -/* 107018 8029DA08 AFB50028 */ sw $s5, 0x28($sp) -/* 10701C 8029DA0C AFB40024 */ sw $s4, 0x24($sp) -/* 107020 8029DA10 AFB30020 */ sw $s3, 0x20($sp) -/* 107024 8029DA14 AFB2001C */ sw $s2, 0x1c($sp) -/* 107028 8029DA18 AFB00014 */ sw $s0, 0x14($sp) -/* 10702C 8029DA1C 3C11800F */ lui $s1, %hi(gPlayers) # $s1, 0x800f -/* 107030 8029DA20 3C168016 */ lui $s6, %hi(gActorList) # $s6, 0x8016 -/* 107034 8029DA24 AFBF0034 */ sw $ra, 0x34($sp) -/* 107038 8029DA28 26D6F9B8 */ addiu $s6, %lo(gActorList) # addiu $s6, $s6, -0x648 -/* 10703C 8029DA2C 26316990 */ addiu $s1, %lo(gPlayers) # addiu $s1, $s1, 0x6990 -/* 107040 8029DA30 00008025 */ move $s0, $zero -/* 107044 8029DA34 24120004 */ li $s2, 4 -/* 107048 8029DA38 27B30064 */ addiu $s3, $sp, 0x64 -/* 10704C 8029DA3C 27B40050 */ addiu $s4, $sp, 0x50 -/* 107050 8029DA40 27B50058 */ addiu $s5, $sp, 0x58 -/* 107054 8029DA44 24170070 */ li $s7, 112 -.L8029DA48: -/* 107058 8029DA48 96220000 */ lhu $v0, ($s1) -/* 10705C 8029DA4C 304E4000 */ andi $t6, $v0, 0x4000 -/* 107060 8029DA50 11C0000B */ beqz $t6, .L8029DA80 -/* 107064 8029DA54 304F0100 */ andi $t7, $v0, 0x100 -/* 107068 8029DA58 15E00009 */ bnez $t7, .L8029DA80 -/* 10706C 8029DA5C 02602025 */ move $a0, $s3 -/* 107070 8029DA60 02802825 */ move $a1, $s4 -/* 107074 8029DA64 02A03025 */ move $a2, $s5 -/* 107078 8029DA68 0C0A7B22 */ jal func_8029EC88 -/* 10707C 8029DA6C 2407002D */ li $a3, 45 -/* 107080 8029DA70 00570019 */ multu $v0, $s7 -/* 107084 8029DA74 0000C012 */ mflo $t8 -/* 107088 8029DA78 02D8C821 */ addu $t9, $s6, $t8 -/* 10708C 8029DA7C A7300004 */ sh $s0, 4($t9) -.L8029DA80: -/* 107090 8029DA80 26100001 */ addiu $s0, $s0, 1 -/* 107094 8029DA84 1612FFF0 */ bne $s0, $s2, .L8029DA48 -/* 107098 8029DA88 26310DD8 */ addiu $s1, $s1, 0xdd8 -/* 10709C 8029DA8C 8FBF0034 */ lw $ra, 0x34($sp) -/* 1070A0 8029DA90 8FB00014 */ lw $s0, 0x14($sp) -/* 1070A4 8029DA94 8FB10018 */ lw $s1, 0x18($sp) -/* 1070A8 8029DA98 8FB2001C */ lw $s2, 0x1c($sp) -/* 1070AC 8029DA9C 8FB30020 */ lw $s3, 0x20($sp) -/* 1070B0 8029DAA0 8FB40024 */ lw $s4, 0x24($sp) -/* 1070B4 8029DAA4 8FB50028 */ lw $s5, 0x28($sp) -/* 1070B8 8029DAA8 8FB6002C */ lw $s6, 0x2c($sp) -/* 1070BC 8029DAAC 8FB70030 */ lw $s7, 0x30($sp) -/* 1070C0 8029DAB0 03E00008 */ jr $ra -/* 1070C4 8029DAB4 27BD0070 */ addiu $sp, $sp, 0x70 diff --git a/asm/non_matchings/code_actors/func_8029DAB8.s b/asm/non_matchings/code_actors/func_8029DAB8.s deleted file mode 100644 index cd00b8069..000000000 --- a/asm/non_matchings/code_actors/func_8029DAB8.s +++ /dev/null @@ -1,37 +0,0 @@ -glabel func_8029DAB8 -/* 1070C8 8029DAB8 3C018015 */ lui $at, %hi(gNumActors) # $at, 0x8015 -/* 1070CC 8029DABC 3C038016 */ lui $v1, %hi(gActorList) # $v1, 0x8016 -/* 1070D0 8029DAC0 3C028016 */ lui $v0, %hi(D_80162578) # $v0, 0x8016 -/* 1070D4 8029DAC4 44800000 */ mtc1 $zero, $f0 -/* 1070D8 8029DAC8 A4200110 */ sh $zero, %lo(gNumActors)($at) -/* 1070DC 8029DACC 24422578 */ addiu $v0, %lo(D_80162578) # addiu $v0, $v0, 0x2578 -/* 1070E0 8029DAD0 2463F9B8 */ addiu $v1, %lo(gActorList) # addiu $v1, $v1, -0x648 -.L8029DAD4: -/* 1070E4 8029DAD4 246301C0 */ addiu $v1, $v1, 0x1c0 -/* 1070E8 8029DAD8 A460FEB2 */ sh $zero, -0x14e($v1) -/* 1070EC 8029DADC A460FEB0 */ sh $zero, -0x150($v1) -/* 1070F0 8029DAE0 A460FEB4 */ sh $zero, -0x14c($v1) -/* 1070F4 8029DAE4 A460FEB6 */ sh $zero, -0x14a($v1) -/* 1070F8 8029DAE8 E460FEB8 */ swc1 $f0, -0x148($v1) -/* 1070FC 8029DAEC E460FEBC */ swc1 $f0, -0x144($v1) -/* 107100 8029DAF0 A460FF22 */ sh $zero, -0xde($v1) -/* 107104 8029DAF4 A460FF20 */ sh $zero, -0xe0($v1) -/* 107108 8029DAF8 A460FF24 */ sh $zero, -0xdc($v1) -/* 10710C 8029DAFC A460FF26 */ sh $zero, -0xda($v1) -/* 107110 8029DB00 E460FF28 */ swc1 $f0, -0xd8($v1) -/* 107114 8029DB04 E460FF2C */ swc1 $f0, -0xd4($v1) -/* 107118 8029DB08 A460FF92 */ sh $zero, -0x6e($v1) -/* 10711C 8029DB0C A460FF90 */ sh $zero, -0x70($v1) -/* 107120 8029DB10 A460FF94 */ sh $zero, -0x6c($v1) -/* 107124 8029DB14 A460FF96 */ sh $zero, -0x6a($v1) -/* 107128 8029DB18 E460FF98 */ swc1 $f0, -0x68($v1) -/* 10712C 8029DB1C E460FF9C */ swc1 $f0, -0x64($v1) -/* 107130 8029DB20 A460FE42 */ sh $zero, -0x1be($v1) -/* 107134 8029DB24 A460FE40 */ sh $zero, -0x1c0($v1) -/* 107138 8029DB28 A460FE44 */ sh $zero, -0x1bc($v1) -/* 10713C 8029DB2C A460FE46 */ sh $zero, -0x1ba($v1) -/* 107140 8029DB30 E460FE48 */ swc1 $f0, -0x1b8($v1) -/* 107144 8029DB34 1462FFE7 */ bne $v1, $v0, .L8029DAD4 -/* 107148 8029DB38 E460FE4C */ swc1 $f0, -0x1b4($v1) -/* 10714C 8029DB3C 03E00008 */ jr $ra -/* 107150 8029DB40 00000000 */ nop diff --git a/asm/non_matchings/code_actors/func_8029DB44.s b/asm/non_matchings/code_actors/func_8029DB44.s index b8362ab69..482ffda5d 100644 --- a/asm/non_matchings/code_actors/func_8029DB44.s +++ b/asm/non_matchings/code_actors/func_8029DB44.s @@ -392,7 +392,7 @@ glabel L8029E10C /* 10771C 8029E10C 3C040601 */ lui $a0, %hi(D_06013EC0) # $a0, 0x601 /* 107720 8029E110 0C0A760C */ jal place_all_item_boxes /* 107724 8029E114 24843EC0 */ addiu $a0, %lo(D_06013EC0) # addiu $a0, $a0, 0x3ec0 -/* 107728 8029E118 0C0A767E */ jal func_8029D9F8 +/* 107728 8029E118 0C0A767E */ jal init_kiwano_fruit /* 10772C 8029E11C 00000000 */ nop /* 107730 8029E120 0C0A6344 */ jal func_80298D10 /* 107734 8029E124 00000000 */ nop diff --git a/asm/non_matchings/code_actors/func_8029E158.s b/asm/non_matchings/code_actors/func_8029E158.s index 6a48c44a7..e4c965c7a 100644 --- a/asm/non_matchings/code_actors/func_8029E158.s +++ b/asm/non_matchings/code_actors/func_8029E158.s @@ -417,7 +417,7 @@ glabel L8029E770 glabel L8029E7AC /* 107DBC 8029E7AC 0C0A5E06 */ jal func_80297818 /* 107DC0 8029E7B0 00000000 */ nop -/* 107DC4 8029E7B4 0C0A76AE */ jal func_8029DAB8 +/* 107DC4 8029E7B4 0C0A76AE */ jal destroy_all_actors /* 107DC8 8029E7B8 00000000 */ nop /* 107DCC 8029E7BC 0C0A76D1 */ jal func_8029DB44 /* 107DD0 8029E7C0 00000000 */ nop diff --git a/asm/non_matchings/code_actors/func_8029E7DC.s b/asm/non_matchings/code_actors/func_8029E7DC.s deleted file mode 100644 index 1cc7ce7c1..000000000 --- a/asm/non_matchings/code_actors/func_8029E7DC.s +++ /dev/null @@ -1,35 +0,0 @@ -glabel func_8029E7DC -/* 107DEC 8029E7DC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 107DF0 8029E7E0 AFBF0014 */ sw $ra, 0x14($sp) -/* 107DF4 8029E7E4 84820002 */ lh $v0, 2($a0) -/* 107DF8 8029E7E8 00803025 */ move $a2, $a0 -/* 107DFC 8029E7EC 24840018 */ addiu $a0, $a0, 0x18 -/* 107E00 8029E7F0 304E0200 */ andi $t6, $v0, 0x200 -/* 107E04 8029E7F4 11C00006 */ beqz $t6, .L8029E810 -/* 107E08 8029E7F8 304F0100 */ andi $t7, $v0, 0x100 -/* 107E0C 8029E7FC 3C051901 */ lui $a1, (0x19019053 >> 16) # lui $a1, 0x1901 -/* 107E10 8029E800 0C032678 */ jal func_800C99E0 -/* 107E14 8029E804 34A59053 */ ori $a1, (0x19019053 & 0xFFFF) # ori $a1, $a1, 0x9053 -/* 107E18 8029E808 1000000F */ b .L8029E848 -/* 107E1C 8029E80C 8FBF0014 */ lw $ra, 0x14($sp) -.L8029E810: -/* 107E20 8029E810 11E00007 */ beqz $t7, .L8029E830 -/* 107E24 8029E814 30580080 */ andi $t8, $v0, 0x80 -/* 107E28 8029E818 3C051901 */ lui $a1, (0x19018010 >> 16) # lui $a1, 0x1901 -/* 107E2C 8029E81C 34A58010 */ ori $a1, (0x19018010 & 0xFFFF) # ori $a1, $a1, 0x8010 -/* 107E30 8029E820 0C032678 */ jal func_800C99E0 -/* 107E34 8029E824 24C40018 */ addiu $a0, $a2, 0x18 -/* 107E38 8029E828 10000007 */ b .L8029E848 -/* 107E3C 8029E82C 8FBF0014 */ lw $ra, 0x14($sp) -.L8029E830: -/* 107E40 8029E830 13000004 */ beqz $t8, .L8029E844 -/* 107E44 8029E834 24C40018 */ addiu $a0, $a2, 0x18 -/* 107E48 8029E838 3C051900 */ lui $a1, (0x19008054 >> 16) # lui $a1, 0x1900 -/* 107E4C 8029E83C 0C032678 */ jal func_800C99E0 -/* 107E50 8029E840 34A58054 */ ori $a1, (0x19008054 & 0xFFFF) # ori $a1, $a1, 0x8054 -.L8029E844: -/* 107E54 8029E844 8FBF0014 */ lw $ra, 0x14($sp) -.L8029E848: -/* 107E58 8029E848 27BD0018 */ addiu $sp, $sp, 0x18 -/* 107E5C 8029E84C 03E00008 */ jr $ra -/* 107E60 8029E850 00000000 */ nop diff --git a/asm/non_matchings/code_actors/func_8029E854.s b/asm/non_matchings/code_actors/func_8029E854.s deleted file mode 100644 index adbbc2d9b..000000000 --- a/asm/non_matchings/code_actors/func_8029E854.s +++ /dev/null @@ -1,16 +0,0 @@ -glabel func_8029E854 -/* 107E64 8029E854 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 107E68 8029E858 AFBF0014 */ sw $ra, 0x14($sp) -/* 107E6C 8029E85C 0C0A79F7 */ jal func_8029E7DC -/* 107E70 8029E860 AFA40018 */ sw $a0, 0x18($sp) -/* 107E74 8029E864 8FA40018 */ lw $a0, 0x18($sp) -/* 107E78 8029E868 3C028015 */ lui $v0, %hi(gNumActors) # $v0, 0x8015 -/* 107E7C 8029E86C 24420110 */ addiu $v0, %lo(gNumActors) # addiu $v0, $v0, 0x110 -/* 107E80 8029E870 A4800002 */ sh $zero, 2($a0) -/* 107E84 8029E874 A4800000 */ sh $zero, ($a0) -/* 107E88 8029E878 944E0000 */ lhu $t6, ($v0) -/* 107E8C 8029E87C 8FBF0014 */ lw $ra, 0x14($sp) -/* 107E90 8029E880 27BD0018 */ addiu $sp, $sp, 0x18 -/* 107E94 8029E884 25CFFFFF */ addiu $t7, $t6, -1 -/* 107E98 8029E888 03E00008 */ jr $ra -/* 107E9C 8029E88C A44F0000 */ sh $t7, ($v0) diff --git a/include/actor_types.h b/include/actor_types.h index 4af3c913d..4b8c11436 100644 --- a/include/actor_types.h +++ b/include/actor_types.h @@ -127,10 +127,16 @@ struct ActorSpawnData { // members unverified. data located at D_06013F78 struct UnkActorSpawnData { /* 0x00 */ Vec3s pos; - /* 0x06 */ u16 someId; // Usually populated, but not necessarily used by all actors types + /* 0x06 */ s16 someId; // s16 required here. /* 0x08 */ u16 unk8; }; +struct UnkActorSpawnData80298D10 { + /* 0x00 */ Vec3s pos; + /* 0x06 */ s16 someId; // Usually populated, but not necessarily used by all actors types + /* 0x08 */ s16 unk8; +}; + struct YoshiValleyEgg { /* 0x00 */ s16 type; /* 0x02 */ s16 flags; diff --git a/include/common_structs.h b/include/common_structs.h index 3e849b654..ff53d0df3 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -283,9 +283,7 @@ typedef struct { /* 0x002E */ s16 unk_02E; /* 0x0030 */ s16 unk_030; /* 0x0032 */ char unk_032[0x2]; - /* 0x0034 */ f32 unk_034; - /* 0x0038 */ f32 unk_038; - /* 0x003C */ f32 unk_03C; + /* 0x0034 */ Vec3f unk_034; /* 0x0040 */ char unk_040[0x2]; /* 0x0042 */ s16 unk_042; /* 0x0044 */ s16 unk_044; diff --git a/src/audio/external.c b/src/audio/external.c index a10446013..c17d8e876 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -5274,7 +5274,7 @@ s32 func_800C21E8(s32, ?); // extern extern u8 D_800EA108; extern u8 D_800EA1C0; -void func_800C99E0(s32 arg0, ? arg1) { +void func_800C99E0(Vec3f arg0, s32 arg1) { s32 temp_t9; s32 temp_v0; s32 phi_s0; diff --git a/src/code_800029B0.c b/src/code_800029B0.c index 7c54da4aa..de73cb207 100644 --- a/src/code_800029B0.c +++ b/src/code_800029B0.c @@ -251,7 +251,7 @@ void func_80003040(void) { gPlayerCountSelection1 = 1; set_segment_base_addr(0x03, (gPrevLoadedAddress + 0xFFFF7000)); - func_8029DAB8(); + destroy_all_actors(); switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: func_802A84F4(&D_0F04F45C, 0x35B, 0x800); diff --git a/src/code_80027D00.c b/src/code_80027D00.c index 4ae641236..fe83b7d34 100644 --- a/src/code_80027D00.c +++ b/src/code_80027D00.c @@ -2964,9 +2964,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { f32 spB0; f32 spAC; f32 spA8; - f32 spA0; - f32 sp9C; - f32 sp98; + //f32 spA0; + //f32 sp9C; + Vec3f sp98; // Clearly a vec3f ? sp8C; s32 sp7C; f32 sp60; @@ -3158,9 +3158,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { func_8002C7E4(temp_f12_3, temp_f14_3, player, arg3, arg2); sp18C = func_80030150(player, arg3); func_802B63B8(&sp184, temp_a1); - sp98 = player->unk_034; - sp9C = player->unk_038; - spA0 = player->unk_03C; + sp98 = player->unk_034[0]; + sp9C = player->unk_034[1]; + spA0 = player->unk_034[2]; if (((player->unk_10C < 3) && (player->unk_256 < 3)) || ((player->unk_0BC & 0x2000) == 0x2000)) { temp_t4 = player->unk_07C >> 0x10; if ((temp_t4 >= 0x28) || (temp_t4 < -0x27)) { @@ -3217,9 +3217,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { player->rotY = temp_f12_6; temp_t9 = &D_8018CE10[arg3]; sp54 = temp_t9; - spFC = temp_t9->unk_04 + (temp_f0_7 + player->unk_034); - spF8 = player->unk_038 + temp_f12_6; - spF4 = temp_t9->unk_0C + (spE8 + player->unk_03C); + spFC = temp_t9->unk_04 + (temp_f0_7 + player->unk_034[0]); + spF8 = player->unk_034[1] + temp_f12_6; + spF4 = temp_t9->unk_0C + (spE8 + player->unk_034[2]); temp_v0_6 = player->unk_0CA; if (((temp_v0_6 & 2) != 2) && ((temp_v0_6 & 8) != 8) && ((player->unk_0BC & 0x4000000) != 0x4000000) && ((temp_v0_6 & 1) == 0)) { func_8002AAC0(temp_f12_6, phi_f14_2, player); @@ -3359,9 +3359,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { } player->unk_064 = sp178; player->unk_06C = sp180; - player->unk_034 = sp98; - player->unk_038 = sp9C; - player->unk_03C = spA0; + player->unk_034[0] = sp98[0]; + player->unk_034[1] = sp98[1]; + player->unk_034[2] = sp98[2]; temp_v0_18 = &D_80165070[arg3]; temp_v0_18->unk0 = sp98; temp_v0_18->unk4 = sp9C; @@ -3372,9 +3372,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { temp_f12_7 = *temp_v0_19; if (temp_f12_7 < temp_f2_8) { temp_f0_8 = temp_f12_7 / temp_f2_8; - player->unk_034 *= temp_f0_8; - player->unk_038 *= temp_f0_8; - player->unk_03C *= temp_f0_8; + player->unk_034[0] *= temp_f0_8; + player->unk_034[1] *= temp_f0_8; + player->unk_034[2] *= temp_f0_8; player->unk_094 = *temp_v0_19; } } @@ -3383,9 +3383,9 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { if (temp_f2_9 > 1.0f) { temp_f0_9 = 1.0f / temp_f2_9; player->unk_094 = 1.0f; - player->unk_034 *= temp_f0_9; - player->unk_038 *= temp_f0_9; - player->unk_03C *= temp_f0_9; + player->unk_034[0] *= temp_f0_9; + player->unk_034[1] *= temp_f0_9; + player->unk_034[2] *= temp_f0_9; } } if (player->unk_124 >= 500.0f) { @@ -3408,7 +3408,7 @@ void func_8002E4C4(Player *player) { if (((player->pos[1] - D_80164510[player_index]) > 1200.0f) || ((player->pos[1] - D_80164510[player_index]) < -1200.0f)) { player->pos[1] = player->rotY; } - player->unk_038 = 0.0f; + player->unk_034[1] = 0.0f; } #ifdef MIPS_TO_C diff --git a/src/code_800393C0.c b/src/code_800393C0.c index 0f236ccc6..6dace5ab7 100644 --- a/src/code_800393C0.c +++ b/src/code_800393C0.c @@ -64,9 +64,9 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4, player->unk_05C = 1.0f; player->unk_058 = 0.0f; player->unk_060 = 0.0f; - player->unk_034 = 0.0f; - player->unk_038 = 0.0f; - player->unk_03C = 0.0f; + player->unk_034[0] = 0.0f; + player->unk_034[1] = 0.0f; + player->unk_034[2] = 0.0f; player->unk_02E = arg5; player->unk_030 = 0; player->unk_0FA = 0; diff --git a/src/code_8008C1D0.c b/src/code_8008C1D0.c index bcca20592..20069632e 100644 --- a/src/code_8008C1D0.c +++ b/src/code_8008C1D0.c @@ -1101,8 +1101,8 @@ void func_8008E4A4(Player* player, s8 arg1) { player->unk_042 += 0xAAA; player->unk_08C = 0.0f; player->unk_09C = 0.0f; - player->unk_034 = 0.0f; - player->unk_03C = 0.0f; + player->unk_034[0] = 0.0f; + player->unk_034[2] = 0.0f; player->unk_0BC &= ~0xC0; if ((player->unk_0BC & 8) != 8) { diff --git a/src/code_80296A50.c b/src/code_80296A50.c index cb1c7a6df..bd5a399fd 100644 --- a/src/code_80296A50.c +++ b/src/code_80296A50.c @@ -9,6 +9,7 @@ f32 sins(u16); /* extern */ f32 coss(u16); /* extern */ +void func_800C99E0(Vec3f, s32); // audio external f32 func_802B80D0(Vec3f, Vec3f, u16, f32, f32, f32); // extern void func_800C98B8(Vec3f, Vec3f, u32); // extern void func_8029794C(Vec3f, Vec3s, f32); @@ -49,12 +50,13 @@ s32 D_802BA058; struct Actor *D_802BA05C; s8 D_802BA060[512]; // tlut 256 u16 D_802BA260; +extern u16 gNumActors; #ifdef MIPS_TO_C //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 ? func_8000EE58(u16, void *, u16, s32); /* extern */ -? func_8029E854(void *, void *); /* extern */ +? destroy_actor(void *, void *); /* extern */ extern u16 D_8015F6FE; extern u16 gNumPermanentActors; extern ? gActorList; @@ -93,7 +95,7 @@ loop_2: func_8000EE58(phi_a2, phi_a1, phi_a2, 2); } D_8015F6FE += -1; - func_8029E854(phi_a1, phi_a1); + destroy_actor(phi_a1, phi_a1); return; } temp_a2 = phi_a2 + 1; @@ -124,7 +126,7 @@ loop_12: /* fallthrough */ case 7: /* switch 1 */ D_8015F6FE += -1; - func_8029E854(phi_a1_2, phi_a1_2); + destroy_actor(phi_a1_2, phi_a1_2); return; } } else { @@ -158,7 +160,7 @@ loop_23: func_8000EE58(phi_a2_4, phi_a1_3, phi_a2_4, 2); block_29: D_8015F6FE += -1; - func_8029E854(phi_a1_3, phi_a1_3); + destroy_actor(phi_a1_3, phi_a1_3); return; } block_30: @@ -190,7 +192,7 @@ loop_34: /* fallthrough */ case 7: /* switch 2 */ D_8015F6FE += -1; - func_8029E854(phi_a1_4, phi_a1_4); + destroy_actor(phi_a1_4, phi_a1_4); return; } } else { @@ -1265,9 +1267,9 @@ extern f32 D_802B964C; // 0.8f #ifdef RO_DATA // Needs D_802B964C imported to match void func_80298AC0(Player *player) { Vec3f sp64; - s32 segment = (((unsigned int)(D_06013F78)) >> 24); - s32 offset = ((unsigned int)(D_06013F78) & 0x00ffffff); - struct UnkActorSpawnData *data = (gSegmentTable[segment] + offset) - 0x80000000U; + s32 segment = SEGMENT_NUMBER2(D_06013F78); + s32 offset = SEGMENT_OFFSET(D_06013F78); + struct UnkActorSpawnData *data = VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); while (data->pos[0] != -0x8000) { sp64[0] = data->pos[0] * gCourseDirection; @@ -1282,7 +1284,7 @@ void func_80298AC0(Player *player) { if ((player->unk_000 & 0x100) == 0) { func_800C9060((u8) (player - gPlayerOne), 0x19007018); } - return; + break; } data++; } @@ -1319,30 +1321,17 @@ void func_80298C94(void) { GLOBAL_ASM("asm/non_matchings/code_actors/func_80298C94.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_06013F78; -extern ? gSegmentTable; - void func_80298D10(void) { - s16 *temp_v1; - s16 *temp_v1_2; - s16 *phi_v1; + s32 segment = SEGMENT_NUMBER2(D_06013F78); + s32 offset = SEGMENT_OFFSET(D_06013F78); + struct UnkActorSpawnData80298D10 *temp_v1 = VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset); - temp_v1 = *(&gSegmentTable + ((&D_06013F78 >> 0x18) * 4)) + (&D_06013F78 & 0xFFFFFF) + 0x80000000; - phi_v1 = temp_v1; - if (*temp_v1 != -0x8000) { - do { - phi_v1->unk6 = phi_v1->unk6 & 0xF; - temp_v1_2 = phi_v1 + 0xA; - temp_v1_2->unk-8 = phi_v1->unk_08; - phi_v1 = temp_v1_2; - } while (phi_v1->unkA != -0x8000); + while (temp_v1->pos[0] != -0x8000) { + temp_v1->pos[1] = temp_v1->unk8; + temp_v1->someId &= 0xF; + temp_v1++; } } -#else -GLOBAL_ASM("asm/non_matchings/code_actors/func_80298D10.s") -#endif // Might just be an s32 array with a u16 in it... However that might work. Vec3s D_802B87E0[] = {0x0000, 0x0000, 0x0000}; @@ -3017,65 +3006,50 @@ void place_all_item_boxes(struct ActorSpawnData *spawnData) { } } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s32 func_8029EC88(? *, ? *, ? *, ?); // extern -extern ? gActorList; -extern u16 gPlayers; - -void func_8029D9F8(void) { - ? sp64; - ? sp58; - ? sp50; - s16 temp_s0; - u16 temp_v0; - u16 *phi_s1; +void init_kiwano_fruit(void) { + Vec3f sp64; + Vec3f sp58; + Vec3s sp50; + Player *phi_s1; + struct Actor *actor; s16 phi_s0; + s32 i; - phi_s1 = &gPlayers; - phi_s0 = 0; - do { - temp_v0 = *phi_s1; - if (((temp_v0 & 0x4000) != 0) && ((temp_v0 & 0x100) == 0)) { - (&gActorList + (func_8029EC88(&sp64, &sp50, &sp58, 0x2D) * 0x70))->unk_04 = phi_s0; - } - temp_s0 = phi_s0 + 1; - phi_s1 += 0xDD8; - phi_s0 = temp_s0; - } while (temp_s0 != 4); + //phi_s0 = 0; + for (i = 0; i < 4; i++) { + phi_s1 = &gPlayers[i]; + //temp_v0 = *phi_s1; + if ((phi_s1->unk_000 & 0x4000) == 0) { continue; } + if ((phi_s1->unk_000 & 0x100) != 0) { continue; } + + phi_s0 = func_8029EC88(sp64, sp50, sp58, ACTOR_KIWANO_FRUIT); + actor = &gActorList[phi_s0]; + actor->unk_04 = i; + } } -#else -GLOBAL_ASM("asm/non_matchings/code_actors/func_8029D9F8.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern s16 gNumActors; -//extern ? gActorList; -extern s32 D_80162578; -extern struct Actor gActorList[112]; -void func_8029DAB8(void) { - struct Actor *temp_v1; +/** + * Destroys actors via zeroing some of the member data + * Key word some. When spawning a new actor, + * members such as pos and rot should be set to prevent using expired data + **/ +void destroy_all_actors(void) { s32 i; gNumActors = 0; for (i = 0; i < ACTOR_LIST_SIZE; i++) { - temp_v1 = &gActorList[i]; - temp_v1->unk2 = 0; - temp_v1->unk0 = 0; - temp_v1->unk_04 = 0; - temp_v1->unk6 = 0; - temp_v1->unk_08 = 0.0f; - temp_v1->unkC = 0.0f; + gActorList[i].flags = 0; + gActorList[i].type = 0; + gActorList[i].unk_04 = 0; + gActorList[i].state = 0; + gActorList[i].unk_08 = 0.0f; + gActorList[i].boundingBoxSize = 0.0f; } } -#else -GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DAB8.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 ? func_80298D10(); /* extern */ -? func_8029D9F8(); /* extern */ +? init_kiwano_fruit(); /* extern */ s32 func_8029EC88(f32 *, ? *, ? *, ?); /* extern */ ? func_802A14BC(f32, ?, ?); /* extern */ ? vec3s_set(? *, ?, ?, ?); /* extern */ @@ -3272,7 +3246,7 @@ void func_8029DB44(void) { break; case COURSE_DK_JUNGLE: place_all_item_boxes(&D_06013EC0); - func_8029D9F8(); + init_kiwano_fruit(); func_80298D10(); break; case COURSE_BIG_DONUT: @@ -3289,7 +3263,7 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DB44.s") //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 ? func_800122D8(); /* extern */ ? func_80297818(); /* extern */ -? func_8029DAB8(); /* extern */ +? destroy_all_actors(); /* extern */ ? func_8029DB44(); /* extern */ s32 func_802A84F4(? *, ?, ?); /* extern */ ? set_segment_base_addr(?, s32); /* extern */ @@ -3458,7 +3432,7 @@ void func_8029E158(void) { break; } func_80297818(); - func_8029DAB8(); + destroy_all_actors(); func_8029DB44(); func_800122D8(); } @@ -3466,44 +3440,40 @@ void func_8029E158(void) { GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E158.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_800C99E0(void *, ?, void *); // extern +void func_8029E7DC(struct Actor *actor) { + s16 temp_v0 = actor->flags; -void func_8029E7DC(void *arg0) { - s16 temp_v0; - - temp_v0 = arg0->unk2; if ((temp_v0 & 0x200) != 0) { - func_800C99E0(arg0 + 0x18, 0x19019053, arg0); + func_800C99E0(actor->pos, 0x19019053); return; } if ((temp_v0 & 0x100) != 0) { - func_800C99E0(arg0 + 0x18, 0x19018010, arg0); + func_800C99E0(actor->pos, 0x19018010); return; } if ((temp_v0 & 0x80) != 0) { - func_800C99E0(arg0 + 0x18, 0x19008054, arg0); + func_800C99E0(actor->pos, 0x19008054); } } -#else -GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E7DC.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_8029E7DC(); // extern -extern u16 gNumActors; - -void func_8029E854(void *arg0) { - func_8029E7DC(); - arg0->unk2 = 0; - arg0->unk0 = 0; - gNumActors = gNumActors - 1; +/** + * This func likely plays an audio track based on flag + * Next, it destroys the actor via zeroing its flags and type. + * Note that the data from its other members still exist. + * Actors are expected to set members such as pos and rot data if used. Not doing so could result in the use of expired data. + * + * This method does not require modification to gActorList directly. + * No popping members of gActorList. The list is always the size of ACTOR_LIST_SIZE. + * Actors are members of gActorList by definition. + * + * @param Actor to destroy + */ +void destroy_actor(struct Actor *actor) { + func_8029E7DC(actor); + actor->flags = 0; + actor->type = 0; + gNumActors--; } -#else -GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E854.s") -#endif #ifdef MIPS_TO_C //generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd @@ -3672,7 +3642,6 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E890.s") void func_80296D10(struct Actor *, f32 *, s16 *, f32 *, s32); /* extern */ s16 func_8029E890(f32 *, s16 *, f32 *, s16); /* extern */ -extern u16 gNumActors; s16 func_8029EC88(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) { s32 index; @@ -3947,7 +3916,7 @@ s32 func_8029F408(Player *player, struct YoshiValleyEgg *egg) { egg->flags |= 0x400; egg->pathCenter[1] = 8.0f; player = temp_a3; - func_800C98B8(temp_a3->pos, &temp_a3->unk_034, 0x19018010, temp_a3); + func_800C98B8(temp_a3->pos, &temp_a3->unk_034[0], 0x19018010, temp_a3); func_800C90F4(((s32) (player - gPlayerOne) / 3544) & 0xFF, (player->characterId * 0x10) + 0x2900800D); } else { player = temp_a3; @@ -4562,7 +4531,7 @@ void func_802A0450(Player *player, struct Actor *actor) { player->unk_00C |= 4; sp42 = temp_t0; sp36 = temp_v1_2; - func_800C98B8(player->pos, &player->unk_034, 0x19018010, player); + func_800C98B8(player->pos, &player->unk_034[0], 0x19018010, player); temp_v0_2 = &gPlayers[temp_v1_2]; if (((temp_v0_2->unk_000 & 0x4000) != 0) && (temp_t0 != temp_v1_2)) { func_800C90F4(temp_v1_2 & 0xFF, (temp_v0_2->characterId * 0x10) + 0x29008006); @@ -4578,7 +4547,7 @@ void func_802A0450(Player *player, struct Actor *actor) { player->unk_00C |= 2; sp42 = temp_t0; sp36 = temp_v1_3; - func_800C98B8(player->pos, &player->unk_034, 0x19018010, player); + func_800C98B8(player->pos, &player->unk_034[0], 0x19018010, player); } temp_v0_3 = &gPlayers[actor->rot[2]]; if (((temp_v0_3->unk_000 & 0x4000) != 0) && (temp_t0 != actor->rot[2])) { @@ -4601,7 +4570,7 @@ void func_802A0450(Player *player, struct Actor *actor) { player->unk_00C |= 2; sp42 = temp_t0; sp36 = temp_v1_4; - func_800C98B8(player->pos, &player->unk_034, 0x19018010, player); + func_800C98B8(player->pos, &player->unk_034[0], 0x19018010, player); } temp_v0_4 = &gPlayers[actor->rot[2]]; if (((temp_v0_4->unk_000 & 0x4000) != 0) && (temp_t0 != actor->rot[2])) { @@ -4912,7 +4881,7 @@ void update_obj_fake_item_box(struct FakeItemBox *fake_item_box) { case 2: if ((fake_item_box->someTimer >= 0x14) || (fake_item_box->someTimer < 0)) { - func_8029E854(fake_item_box); + destroy_actor(fake_item_box); } else { fake_item_box->someTimer++; fake_item_box->rot[0] += 0x444; @@ -4921,7 +4890,7 @@ void update_obj_fake_item_box(struct FakeItemBox *fake_item_box) { } break; default: - func_8029E854(fake_item_box); + destroy_actor(fake_item_box); break; } } diff --git a/src/code_802B0210.c b/src/code_802B0210.c index 555d44dde..ffd55c7aa 100644 --- a/src/code_802B0210.c +++ b/src/code_802B0210.c @@ -327,7 +327,7 @@ s32 func_802B09C0(s16 bananaId) { #ifdef MIPS_TO_C //generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd ? func_800C9060(s32, ?); /* extern */ -? func_8029E854(struct BananaBunchParent *, s32); /* extern */ +? destroy_actor(struct BananaBunchParent *, s32); /* extern */ ? func_802B0648(struct BananaBunchParent *); /* extern */ ? func_802B0788(s16, struct BananaBunchParent *, Player *, Player *); /* extern */ s32 func_802B09C0(s16, s32); /* extern */ @@ -450,7 +450,7 @@ void update_obj_banana_bunch(struct BananaBunchParent *banana_bunch) { } if (phi_v1_5 == 0) { sp2C = temp_a3; - func_8029E854(banana_bunch, 1); + destroy_actor(banana_bunch, 1); temp_a3->unk_00C &= 0xFFFBFFFF; return; } @@ -500,7 +500,7 @@ s32 func_802B0E14(s16 arg0) { ? func_8000EDC8(s32); /* extern */ ? func_800C9060(u8, ?); /* extern */ ? func_800C90F4(u8, s32); /* extern */ -? func_8029E854(struct TripleShellParent *); /* extern */ +? destroy_actor(struct TripleShellParent *); /* extern */ s32 func_802B0E14(s16, s16); /* extern */ s32 func_802B19EC(struct TripleShellParent *, Player *, s16, ?); /* extern */ ? func_802B64C4(f32 *, s16); /* extern */ @@ -636,7 +636,7 @@ void update_obj_triple_shell(struct TripleShellParent *actor, s16 arg1) { actor->shellIndices[2] = -1.0f; } if (phi_v1_3 == 0) { - func_8029E854(actor); + destroy_actor(actor); return; } temp_v0_5 = &gControllers[actor->playerId]; @@ -1010,7 +1010,7 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B1FFC.s") #ifdef MIPS_TO_C //generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd ? func_800C9060(s32, ?, u16); /* extern */ -? func_8029E854(struct BananaActor *); /* extern */ +? destroy_actor(struct BananaActor *); /* extern */ ? func_8029FDC8(f32, struct BananaActor *); /* extern */ ? func_802ADDC8(f32, UnkActorInner *, UnkActorInner *, f32, f32, f32, f32); /* extern */ ? func_802B4E30(struct BananaActor *); /* extern */ @@ -1264,7 +1264,7 @@ void update_obj_banana(struct BananaActor *banana) { banana->elderIndex += -0x5B0; banana->youngerIndex += 0x38E; if (banana->unk_04 == 0) { - func_8029E854(banana); + destroy_actor(banana); return; } break; @@ -1316,12 +1316,12 @@ void func_802B2914(struct BananaBunchParent *banana_bunch, Player *player, s16 b sp4C += player->pos[0]; sp50 += player->pos[1]; sp54 += player->pos[2]; - sp60 = player->unk_034; - sp64 = player->unk_038; + sp60 = player->unk_034[0]; + sp64 = player->unk_034[1]; sp58 = 0; sp5A = 0; sp5C = 0; - sp68 = player->unk_03C; + sp68 = player->unk_034[2]; temp_v0 = func_8029EC88(temp_a0, temp_a1, temp_a2, 6); temp_t6 = temp_v0; if (temp_v0 >= 0) { @@ -1672,7 +1672,7 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B30EC.s") ? func_800C9060(u8, ?); /* extern */ ? func_800C90F4(u8, s32); /* extern */ ? func_800C98B8(f32 *, f32 *, ?); /* extern */ -? func_8029E854(f32, struct ShellActor *); /* extern */ +? destroy_actor(f32, struct ShellActor *); /* extern */ ? func_8029FDC8(f32, struct ShellActor *); /* extern */ f32 func_802ABE30(f32, f32, f32, u16); /* extern */ ? func_802AC098(UnkActorInner *, f32 *); /* extern */ @@ -1890,7 +1890,7 @@ void update_obj_green_shell(struct ShellActor *shell) { shell->rotAngle += 0x5B0; shell->pos[1] += shell->velocity[1]; if (shell->parentIndex == 0) { - func_8029E854(-5.0f, shell); + destroy_actor(-5.0f, shell); } break; } @@ -2159,7 +2159,7 @@ GLOBAL_ASM("asm/non_matchings/code_802B0210/func_802B4104.s") ? func_800C9060(u8, ?); /* extern */ ? func_800C90F4(u8, s32); /* extern */ ? func_800C9D80(f32 *, f32 *, ?); /* extern */ -? func_8029E854(f32, struct ShellActor *); /* extern */ +? destroy_actor(f32, struct ShellActor *); /* extern */ ? func_8029FDC8(f32, struct ShellActor *); /* extern */ f32 func_802ABE30(f32, f32, f32, u16); /* extern */ ? func_802AD950(UnkActorInner *, ?, f32, f32, f32, f32, f32, f32); /* extern */ @@ -2464,7 +2464,7 @@ block_16: shell->rotAngle += 0x5B0; shell->pos[1] += shell->velocity[1]; if (shell->parentIndex == 0) { - func_8029E854(-5.0f, shell); + destroy_actor(-5.0f, shell); return; } break;