From b29c268f375013d648fb483445bdc9dd1869f275 Mon Sep 17 00:00:00 2001 From: Roman971 <32455037+Roman971@users.noreply.github.com> Date: Wed, 16 Sep 2020 00:41:38 +0200 Subject: [PATCH] Use dummies to match bss ordering and some functions in z_collision_check.c (#393) --- .../code/z_collision_check/func_8005DFAC.s | 89 ------- .../code/z_collision_check/func_8005E10C.s | 89 ------- .../code/z_collision_check/func_800628A4.s | 102 -------- .../code/z_collision_check/func_80062A28.s | 88 ------- .../code/z_collision_check/func_80062B80.s | 87 ------- data/z_collision_check.bss.s | 217 ------------------ include/functions.h | 2 +- spec | 1 - src/code/z_collision_check.c | 127 +++++----- 9 files changed, 58 insertions(+), 744 deletions(-) delete mode 100644 asm/non_matchings/code/z_collision_check/func_8005DFAC.s delete mode 100644 asm/non_matchings/code/z_collision_check/func_8005E10C.s delete mode 100644 asm/non_matchings/code/z_collision_check/func_800628A4.s delete mode 100644 asm/non_matchings/code/z_collision_check/func_80062A28.s delete mode 100644 asm/non_matchings/code/z_collision_check/func_80062B80.s delete mode 100644 data/z_collision_check.bss.s diff --git a/asm/non_matchings/code/z_collision_check/func_8005DFAC.s b/asm/non_matchings/code/z_collision_check/func_8005DFAC.s deleted file mode 100644 index 5b0a527e22..0000000000 --- a/asm/non_matchings/code/z_collision_check/func_8005DFAC.s +++ /dev/null @@ -1,89 +0,0 @@ -glabel func_8005DFAC -/* AD514C 8005DFAC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* AD5150 8005DFB0 AFBF001C */ sw $ra, 0x1c($sp) -/* AD5154 8005DFB4 AFA5002C */ sw $a1, 0x2c($sp) -/* AD5158 8005DFB8 AFA60030 */ sw $a2, 0x30($sp) -/* AD515C 8005DFBC C4C40000 */ lwc1 $f4, ($a2) -/* AD5160 8005DFC0 3C018016 */ lui $at, %hi(D_8015D8A4) # $at, 0x8016 -/* AD5164 8005DFC4 24190005 */ li $t9, 5 -/* AD5168 8005DFC8 4600218D */ trunc.w.s $f6, $f4 -/* AD516C 8005DFCC 3C028016 */ lui $v0, %hi(D_8015D8A0) # $v0, 0x8016 -/* AD5170 8005DFD0 2442D8A0 */ addiu $v0, %lo(D_8015D8A0) # addiu $v0, $v0, -0x2760 -/* AD5174 8005DFD4 240300FF */ li $v1, 255 -/* AD5178 8005DFD8 44183000 */ mfc1 $t8, $f6 -/* AD517C 8005DFDC 24080080 */ li $t0, 128 -/* AD5180 8005DFE0 2409000A */ li $t1, 10 -/* AD5184 8005DFE4 A438D8A0 */ sh $t8, %lo(D_8015D8A0)($at) -/* AD5188 8005DFE8 C4C80004 */ lwc1 $f8, 4($a2) -/* AD518C 8005DFEC 24180005 */ li $t8, 5 -/* AD5190 8005DFF0 240A0020 */ li $t2, 32 -/* AD5194 8005DFF4 4600428D */ trunc.w.s $f10, $f8 -/* AD5198 8005DFF8 240B0040 */ li $t3, 64 -/* AD519C 8005DFFC 240E0010 */ li $t6, 16 -/* AD51A0 8005E000 240D0001 */ li $t5, 1 -/* AD51A4 8005E004 440C5000 */ mfc1 $t4, $f10 -/* AD51A8 8005E008 27A50024 */ addiu $a1, $sp, 0x24 -/* AD51AC 8005E00C 00003825 */ move $a3, $zero -/* AD51B0 8005E010 A42CD8A2 */ sh $t4, %lo(D_8015D8A2)($at) -/* AD51B4 8005E014 C4D00008 */ lwc1 $f16, 8($a2) -/* AD51B8 8005E018 240C00C8 */ li $t4, 200 -/* AD51BC 8005E01C AFA20014 */ sw $v0, 0x14($sp) -/* AD51C0 8005E020 4600848D */ trunc.w.s $f18, $f16 -/* AD51C4 8005E024 AFAD0010 */ sw $t5, 0x10($sp) -/* AD51C8 8005E028 00003025 */ move $a2, $zero -/* AD51CC 8005E02C 440F9000 */ mfc1 $t7, $f18 -/* AD51D0 8005E030 00000000 */ nop -/* AD51D4 8005E034 A42FD8A4 */ sh $t7, %lo(D_8015D8A4)($at) -/* AD51D8 8005E038 3C018016 */ lui $at, %hi(D_8015DD34) # $at, 0x8016 -/* AD51DC 8005E03C AC38DD34 */ sw $t8, %lo(D_8015DD34)($at) -/* AD51E0 8005E040 3C018016 */ lui $at, %hi(D_8015DD38) # $at, 0x8016 -/* AD51E4 8005E044 AC39DD38 */ sw $t9, %lo(D_8015DD38)($at) -/* AD51E8 8005E048 A049049C */ sb $t1, 0x49c($v0) -/* AD51EC 8005E04C A049049D */ sb $t1, 0x49d($v0) -/* AD51F0 8005E050 A04C049E */ sb $t4, 0x49e($v0) -/* AD51F4 8005E054 A043049F */ sb $v1, 0x49f($v0) -/* AD51F8 8005E058 A04004A0 */ sb $zero, 0x4a0($v0) -/* AD51FC 8005E05C A04004A1 */ sb $zero, 0x4a1($v0) -/* AD5200 8005E060 A04804A2 */ sb $t0, 0x4a2($v0) -/* AD5204 8005E064 A04304A3 */ sb $v1, 0x4a3($v0) -/* AD5208 8005E068 A04004A4 */ sb $zero, 0x4a4($v0) -/* AD520C 8005E06C A04004A5 */ sb $zero, 0x4a5($v0) -/* AD5210 8005E070 A04804A6 */ sb $t0, 0x4a6($v0) -/* AD5214 8005E074 A04304A7 */ sb $v1, 0x4a7($v0) -/* AD5218 8005E078 A04004A8 */ sb $zero, 0x4a8($v0) -/* AD521C 8005E07C A04004A9 */ sb $zero, 0x4a9($v0) -/* AD5220 8005E080 A04804AA */ sb $t0, 0x4aa($v0) -/* AD5224 8005E084 A04304AB */ sb $v1, 0x4ab($v0) -/* AD5228 8005E088 A04004AC */ sb $zero, 0x4ac($v0) -/* AD522C 8005E08C A04004AD */ sb $zero, 0x4ad($v0) -/* AD5230 8005E090 A04A04AE */ sb $t2, 0x4ae($v0) -/* AD5234 8005E094 A04004AF */ sb $zero, 0x4af($v0) -/* AD5238 8005E098 A04004B0 */ sb $zero, 0x4b0($v0) -/* AD523C 8005E09C A04004B1 */ sb $zero, 0x4b1($v0) -/* AD5240 8005E0A0 A04A04B2 */ sb $t2, 0x4b2($v0) -/* AD5244 8005E0A4 A04004B3 */ sb $zero, 0x4b3($v0) -/* AD5248 8005E0A8 A04004B4 */ sb $zero, 0x4b4($v0) -/* AD524C 8005E0AC A04004B5 */ sb $zero, 0x4b5($v0) -/* AD5250 8005E0B0 A04B04B6 */ sb $t3, 0x4b6($v0) -/* AD5254 8005E0B4 A04004B7 */ sb $zero, 0x4b7($v0) -/* AD5258 8005E0B8 A04004B8 */ sb $zero, 0x4b8($v0) -/* AD525C 8005E0BC A04004B9 */ sb $zero, 0x4b9($v0) -/* AD5260 8005E0C0 A04B04BA */ sb $t3, 0x4ba($v0) -/* AD5264 8005E0C4 A04004BB */ sb $zero, 0x4bb($v0) -/* AD5268 8005E0C8 3C018016 */ lui $at, %hi(D_8015DD5C) # $at, 0x8016 -/* AD526C 8005E0CC AC20DD5C */ sw $zero, %lo(D_8015DD5C)($at) -/* AD5270 8005E0D0 3C018016 */ lui $at, %hi(D_8015DD60) # $at, 0x8016 -/* AD5274 8005E0D4 AC2EDD60 */ sw $t6, %lo(D_8015DD60)($at) -/* AD5278 8005E0D8 3C014100 */ li $at, 0x41000000 # 0.000000 -/* AD527C 8005E0DC 44812000 */ mtc1 $at, $f4 -/* AD5280 8005E0E0 3C018016 */ lui $at, %hi(D_8015DD2C) -/* AD5284 8005E0E4 E424DD2C */ swc1 $f4, %lo(D_8015DD2C)($at) -/* AD5288 8005E0E8 3C01BF80 */ li $at, 0xBF800000 # 0.000000 -/* AD528C 8005E0EC 44813000 */ mtc1 $at, $f6 -/* AD5290 8005E0F0 3C018016 */ lui $at, %hi(D_8015DD30) -/* AD5294 8005E0F4 0C009B35 */ jal Effect_Add -/* AD5298 8005E0F8 E426DD30 */ swc1 $f6, %lo(D_8015DD30)($at) -/* AD529C 8005E0FC 8FBF001C */ lw $ra, 0x1c($sp) -/* AD52A0 8005E100 27BD0028 */ addiu $sp, $sp, 0x28 -/* AD52A4 8005E104 03E00008 */ jr $ra -/* AD52A8 8005E108 00000000 */ nop diff --git a/asm/non_matchings/code/z_collision_check/func_8005E10C.s b/asm/non_matchings/code/z_collision_check/func_8005E10C.s deleted file mode 100644 index e1db92478a..0000000000 --- a/asm/non_matchings/code/z_collision_check/func_8005E10C.s +++ /dev/null @@ -1,89 +0,0 @@ -glabel func_8005E10C -/* AD52AC 8005E10C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* AD52B0 8005E110 AFBF001C */ sw $ra, 0x1c($sp) -/* AD52B4 8005E114 AFA5002C */ sw $a1, 0x2c($sp) -/* AD52B8 8005E118 AFA60030 */ sw $a2, 0x30($sp) -/* AD52BC 8005E11C C4C40000 */ lwc1 $f4, ($a2) -/* AD52C0 8005E120 3C018016 */ lui $at, %hi(D_8015DD6C) # $at, 0x8016 -/* AD52C4 8005E124 24190005 */ li $t9, 5 -/* AD52C8 8005E128 4600218D */ trunc.w.s $f6, $f4 -/* AD52CC 8005E12C 3C028016 */ lui $v0, %hi(D_8015DD68) # $v0, 0x8016 -/* AD52D0 8005E130 2442DD68 */ addiu $v0, %lo(D_8015DD68) # addiu $v0, $v0, -0x2298 -/* AD52D4 8005E134 240300FF */ li $v1, 255 -/* AD52D8 8005E138 44183000 */ mfc1 $t8, $f6 -/* AD52DC 8005E13C 24080080 */ li $t0, 128 -/* AD52E0 8005E140 2409000A */ li $t1, 10 -/* AD52E4 8005E144 A438DD68 */ sh $t8, %lo(D_8015DD68)($at) -/* AD52E8 8005E148 C4C80004 */ lwc1 $f8, 4($a2) -/* AD52EC 8005E14C 24180005 */ li $t8, 5 -/* AD52F0 8005E150 240A0020 */ li $t2, 32 -/* AD52F4 8005E154 4600428D */ trunc.w.s $f10, $f8 -/* AD52F8 8005E158 240B0040 */ li $t3, 64 -/* AD52FC 8005E15C 240E0010 */ li $t6, 16 -/* AD5300 8005E160 240D0001 */ li $t5, 1 -/* AD5304 8005E164 440C5000 */ mfc1 $t4, $f10 -/* AD5308 8005E168 27A50024 */ addiu $a1, $sp, 0x24 -/* AD530C 8005E16C 00003825 */ move $a3, $zero -/* AD5310 8005E170 A42CDD6A */ sh $t4, %lo(D_8015DD6A)($at) -/* AD5314 8005E174 C4D00008 */ lwc1 $f16, 8($a2) -/* AD5318 8005E178 240C00C8 */ li $t4, 200 -/* AD531C 8005E17C AFA20014 */ sw $v0, 0x14($sp) -/* AD5320 8005E180 4600848D */ trunc.w.s $f18, $f16 -/* AD5324 8005E184 AFAD0010 */ sw $t5, 0x10($sp) -/* AD5328 8005E188 00003025 */ move $a2, $zero -/* AD532C 8005E18C 440F9000 */ mfc1 $t7, $f18 -/* AD5330 8005E190 00000000 */ nop -/* AD5334 8005E194 A42FDD6C */ sh $t7, %lo(D_8015DD6C)($at) -/* AD5338 8005E198 3C018016 */ lui $at, %hi(D_8015E1FC) # $at, 0x8016 -/* AD533C 8005E19C AC38E1FC */ sw $t8, %lo(D_8015E1FC)($at) -/* AD5340 8005E1A0 3C018016 */ lui $at, %hi(D_8015E200) # $at, 0x8016 -/* AD5344 8005E1A4 AC39E200 */ sw $t9, %lo(D_8015E200)($at) -/* AD5348 8005E1A8 A049049C */ sb $t1, 0x49c($v0) -/* AD534C 8005E1AC A04C049D */ sb $t4, 0x49d($v0) -/* AD5350 8005E1B0 A049049E */ sb $t1, 0x49e($v0) -/* AD5354 8005E1B4 A043049F */ sb $v1, 0x49f($v0) -/* AD5358 8005E1B8 A04004A0 */ sb $zero, 0x4a0($v0) -/* AD535C 8005E1BC A04804A1 */ sb $t0, 0x4a1($v0) -/* AD5360 8005E1C0 A04004A2 */ sb $zero, 0x4a2($v0) -/* AD5364 8005E1C4 A04304A3 */ sb $v1, 0x4a3($v0) -/* AD5368 8005E1C8 A04004A4 */ sb $zero, 0x4a4($v0) -/* AD536C 8005E1CC A04804A5 */ sb $t0, 0x4a5($v0) -/* AD5370 8005E1D0 A04004A6 */ sb $zero, 0x4a6($v0) -/* AD5374 8005E1D4 A04304A7 */ sb $v1, 0x4a7($v0) -/* AD5378 8005E1D8 A04004A8 */ sb $zero, 0x4a8($v0) -/* AD537C 8005E1DC A04804A9 */ sb $t0, 0x4a9($v0) -/* AD5380 8005E1E0 A04004AA */ sb $zero, 0x4aa($v0) -/* AD5384 8005E1E4 A04304AB */ sb $v1, 0x4ab($v0) -/* AD5388 8005E1E8 A04004AC */ sb $zero, 0x4ac($v0) -/* AD538C 8005E1EC A04A04AD */ sb $t2, 0x4ad($v0) -/* AD5390 8005E1F0 A04004AE */ sb $zero, 0x4ae($v0) -/* AD5394 8005E1F4 A04004AF */ sb $zero, 0x4af($v0) -/* AD5398 8005E1F8 A04004B0 */ sb $zero, 0x4b0($v0) -/* AD539C 8005E1FC A04A04B1 */ sb $t2, 0x4b1($v0) -/* AD53A0 8005E200 A04004B2 */ sb $zero, 0x4b2($v0) -/* AD53A4 8005E204 A04004B3 */ sb $zero, 0x4b3($v0) -/* AD53A8 8005E208 A04004B4 */ sb $zero, 0x4b4($v0) -/* AD53AC 8005E20C A04B04B5 */ sb $t3, 0x4b5($v0) -/* AD53B0 8005E210 A04004B6 */ sb $zero, 0x4b6($v0) -/* AD53B4 8005E214 A04004B7 */ sb $zero, 0x4b7($v0) -/* AD53B8 8005E218 A04004B8 */ sb $zero, 0x4b8($v0) -/* AD53BC 8005E21C A04B04B9 */ sb $t3, 0x4b9($v0) -/* AD53C0 8005E220 A04004BA */ sb $zero, 0x4ba($v0) -/* AD53C4 8005E224 A04004BB */ sb $zero, 0x4bb($v0) -/* AD53C8 8005E228 3C018016 */ lui $at, %hi(D_8015E224) # $at, 0x8016 -/* AD53CC 8005E22C AC20E224 */ sw $zero, %lo(D_8015E224)($at) -/* AD53D0 8005E230 3C018016 */ lui $at, %hi(D_8015E228) # $at, 0x8016 -/* AD53D4 8005E234 AC2EE228 */ sw $t6, %lo(D_8015E228)($at) -/* AD53D8 8005E238 3C014100 */ li $at, 0x41000000 # 0.000000 -/* AD53DC 8005E23C 44812000 */ mtc1 $at, $f4 -/* AD53E0 8005E240 3C018016 */ lui $at, %hi(D_8015E1F4) -/* AD53E4 8005E244 E424E1F4 */ swc1 $f4, %lo(D_8015E1F4)($at) -/* AD53E8 8005E248 3C01BF80 */ li $at, 0xBF800000 # 0.000000 -/* AD53EC 8005E24C 44813000 */ mtc1 $at, $f6 -/* AD53F0 8005E250 3C018016 */ lui $at, %hi(D_8015E1F8) -/* AD53F4 8005E254 0C009B35 */ jal Effect_Add -/* AD53F8 8005E258 E426E1F8 */ swc1 $f6, %lo(D_8015E1F8)($at) -/* AD53FC 8005E25C 8FBF001C */ lw $ra, 0x1c($sp) -/* AD5400 8005E260 27BD0028 */ addiu $sp, $sp, 0x28 -/* AD5404 8005E264 03E00008 */ jr $ra -/* AD5408 8005E268 00000000 */ nop diff --git a/asm/non_matchings/code/z_collision_check/func_800628A4.s b/asm/non_matchings/code/z_collision_check/func_800628A4.s deleted file mode 100644 index 56039bc2ab..0000000000 --- a/asm/non_matchings/code/z_collision_check/func_800628A4.s +++ /dev/null @@ -1,102 +0,0 @@ -glabel func_800628A4 -/* AD9A44 800628A4 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* AD9A48 800628A8 AFBF0034 */ sw $ra, 0x34($sp) -/* AD9A4C 800628AC AFB60030 */ sw $s6, 0x30($sp) -/* AD9A50 800628B0 AFB5002C */ sw $s5, 0x2c($sp) -/* AD9A54 800628B4 AFB40028 */ sw $s4, 0x28($sp) -/* AD9A58 800628B8 AFB30024 */ sw $s3, 0x24($sp) -/* AD9A5C 800628BC AFB20020 */ sw $s2, 0x20($sp) -/* AD9A60 800628C0 AFB1001C */ sw $s1, 0x1c($sp) -/* AD9A64 800628C4 AFB00018 */ sw $s0, 0x18($sp) -/* AD9A68 800628C8 8CA20018 */ lw $v0, 0x18($a1) -/* AD9A6C 800628CC 00A09025 */ move $s2, $a1 -/* AD9A70 800628D0 0080B025 */ move $s6, $a0 -/* AD9A74 800628D4 1840004A */ blez $v0, .L80062A00 -/* AD9A78 800628D8 00009825 */ move $s3, $zero -/* AD9A7C 800628DC 3C158016 */ lui $s5, %hi(D_8015CF00) # $s5, 0x8016 -/* AD9A80 800628E0 3C148016 */ lui $s4, %hi(D_8015E648) # $s4, 0x8016 -/* AD9A84 800628E4 2694E648 */ addiu $s4, %lo(D_8015E648) # addiu $s4, $s4, -0x19b8 -/* AD9A88 800628E8 26B5CF00 */ addiu $s5, %lo(D_8015CF00) # addiu $s5, $s5, -0x3100 -/* AD9A8C 800628EC 00008025 */ move $s0, $zero -.L800628F0: -/* AD9A90 800628F0 8E4E001C */ lw $t6, 0x1c($s2) -/* AD9A94 800628F4 01D08821 */ addu $s1, $t6, $s0 -/* AD9A98 800628F8 922F003C */ lbu $t7, 0x3c($s1) -/* AD9A9C 800628FC 56CF003D */ bnel $s6, $t7, .L800629F4 -/* AD9AA0 80062900 26730001 */ addiu $s3, $s3, 1 -/* AD9AA4 80062904 86380028 */ lh $t8, 0x28($s1) -/* AD9AA8 80062908 3C018016 */ lui $at, %hi(D_8015E648) -/* AD9AAC 8006290C 02802025 */ move $a0, $s4 -/* AD9AB0 80062910 44982000 */ mtc1 $t8, $f4 -/* AD9AB4 80062914 02A02825 */ move $a1, $s5 -/* AD9AB8 80062918 468021A0 */ cvt.s.w $f6, $f4 -/* AD9ABC 8006291C E426E648 */ swc1 $f6, %lo(D_8015E648)($at) -/* AD9AC0 80062920 8E59001C */ lw $t9, 0x1c($s2) -/* AD9AC4 80062924 03304021 */ addu $t0, $t9, $s0 -/* AD9AC8 80062928 8509002A */ lh $t1, 0x2a($t0) -/* AD9ACC 8006292C 44894000 */ mtc1 $t1, $f8 -/* AD9AD0 80062930 00000000 */ nop -/* AD9AD4 80062934 468042A0 */ cvt.s.w $f10, $f8 -/* AD9AD8 80062938 E42AE64C */ swc1 $f10, %lo(D_8015E64C)($at) -/* AD9ADC 8006293C 8E4A001C */ lw $t2, 0x1c($s2) -/* AD9AE0 80062940 3C018016 */ lui $at, %hi(D_8015E650) -/* AD9AE4 80062944 01505821 */ addu $t3, $t2, $s0 -/* AD9AE8 80062948 856C002C */ lh $t4, 0x2c($t3) -/* AD9AEC 8006294C 448C8000 */ mtc1 $t4, $f16 -/* AD9AF0 80062950 00000000 */ nop -/* AD9AF4 80062954 468084A0 */ cvt.s.w $f18, $f16 -/* AD9AF8 80062958 0C0346BD */ jal Matrix_MultVec3f -/* AD9AFC 8006295C E432E650 */ swc1 $f18, %lo(D_8015E650)($at) -/* AD9B00 80062960 3C018016 */ lui $at, %hi(D_8015CF00) -/* AD9B04 80062964 C424CF00 */ lwc1 $f4, %lo(D_8015CF00)($at) -/* AD9B08 80062968 8E4F001C */ lw $t7, 0x1c($s2) -/* AD9B0C 8006296C 4600218D */ trunc.w.s $f6, $f4 -/* AD9B10 80062970 01F0C021 */ addu $t8, $t7, $s0 -/* AD9B14 80062974 440E3000 */ mfc1 $t6, $f6 -/* AD9B18 80062978 00000000 */ nop -/* AD9B1C 8006297C A70E0030 */ sh $t6, 0x30($t8) -/* AD9B20 80062980 C428CF04 */ lwc1 $f8, %lo(D_8015CF04)($at) -/* AD9B24 80062984 8E49001C */ lw $t1, 0x1c($s2) -/* AD9B28 80062988 3C018016 */ lui $at, %hi(D_8015CF08) -/* AD9B2C 8006298C 4600428D */ trunc.w.s $f10, $f8 -/* AD9B30 80062990 01305021 */ addu $t2, $t1, $s0 -/* AD9B34 80062994 44085000 */ mfc1 $t0, $f10 -/* AD9B38 80062998 00000000 */ nop -/* AD9B3C 8006299C A5480032 */ sh $t0, 0x32($t2) -/* AD9B40 800629A0 C430CF08 */ lwc1 $f16, %lo(D_8015CF08)($at) -/* AD9B44 800629A4 8E4D001C */ lw $t5, 0x1c($s2) -/* AD9B48 800629A8 4600848D */ trunc.w.s $f18, $f16 -/* AD9B4C 800629AC 01B07821 */ addu $t7, $t5, $s0 -/* AD9B50 800629B0 440C9000 */ mfc1 $t4, $f18 -/* AD9B54 800629B4 00000000 */ nop -/* AD9B58 800629B8 A5EC0034 */ sh $t4, 0x34($t7) -/* AD9B5C 800629BC 8E4E001C */ lw $t6, 0x1c($s2) -/* AD9B60 800629C0 01D08821 */ addu $s1, $t6, $s0 -/* AD9B64 800629C4 8638002E */ lh $t8, 0x2e($s1) -/* AD9B68 800629C8 C6240038 */ lwc1 $f4, 0x38($s1) -/* AD9B6C 800629CC 44983000 */ mtc1 $t8, $f6 -/* AD9B70 800629D0 00000000 */ nop -/* AD9B74 800629D4 46803220 */ cvt.s.w $f8, $f6 -/* AD9B78 800629D8 46082282 */ mul.s $f10, $f4, $f8 -/* AD9B7C 800629DC 4600540D */ trunc.w.s $f16, $f10 -/* AD9B80 800629E0 44098000 */ mfc1 $t1, $f16 -/* AD9B84 800629E4 00000000 */ nop -/* AD9B88 800629E8 A6290036 */ sh $t1, 0x36($s1) -/* AD9B8C 800629EC 8E420018 */ lw $v0, 0x18($s2) -/* AD9B90 800629F0 26730001 */ addiu $s3, $s3, 1 -.L800629F4: -/* AD9B94 800629F4 0262082A */ slt $at, $s3, $v0 -/* AD9B98 800629F8 1420FFBD */ bnez $at, .L800628F0 -/* AD9B9C 800629FC 26100040 */ addiu $s0, $s0, 0x40 -.L80062A00: -/* AD9BA0 80062A00 8FBF0034 */ lw $ra, 0x34($sp) -/* AD9BA4 80062A04 8FB00018 */ lw $s0, 0x18($sp) -/* AD9BA8 80062A08 8FB1001C */ lw $s1, 0x1c($sp) -/* AD9BAC 80062A0C 8FB20020 */ lw $s2, 0x20($sp) -/* AD9BB0 80062A10 8FB30024 */ lw $s3, 0x24($sp) -/* AD9BB4 80062A14 8FB40028 */ lw $s4, 0x28($sp) -/* AD9BB8 80062A18 8FB5002C */ lw $s5, 0x2c($sp) -/* AD9BBC 80062A1C 8FB60030 */ lw $s6, 0x30($sp) -/* AD9BC0 80062A20 03E00008 */ jr $ra -/* AD9BC4 80062A24 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/code/z_collision_check/func_80062A28.s b/asm/non_matchings/code/z_collision_check/func_80062A28.s deleted file mode 100644 index a407604fbc..0000000000 --- a/asm/non_matchings/code/z_collision_check/func_80062A28.s +++ /dev/null @@ -1,88 +0,0 @@ -glabel func_80062A28 -/* AD9BC8 80062A28 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* AD9BCC 80062A2C AFBF001C */ sw $ra, 0x1c($sp) -/* AD9BD0 80062A30 AFA5002C */ sw $a1, 0x2c($sp) -/* AD9BD4 80062A34 C4A40000 */ lwc1 $f4, ($a1) -/* AD9BD8 80062A38 3C018016 */ lui $at, %hi(D_8015CF14) # $at, 0x8016 -/* AD9BDC 80062A3C 240F0005 */ li $t7, 5 -/* AD9BE0 80062A40 4600218D */ trunc.w.s $f6, $f4 -/* AD9BE4 80062A44 3C028016 */ lui $v0, %hi(D_8015CF10) # $v0, 0x8016 -/* AD9BE8 80062A48 2442CF10 */ addiu $v0, %lo(D_8015CF10) # addiu $v0, $v0, -0x30f0 -/* AD9BEC 80062A4C 24030080 */ li $v1, 128 -/* AD9BF0 80062A50 44183000 */ mfc1 $t8, $f6 -/* AD9BF4 80062A54 24080040 */ li $t0, 64 -/* AD9BF8 80062A58 240900FF */ li $t1, 255 -/* AD9BFC 80062A5C A438CF10 */ sh $t8, %lo(D_8015CF10)($at) -/* AD9C00 80062A60 C4A80004 */ lwc1 $f8, 4($a1) -/* AD9C04 80062A64 24180005 */ li $t8, 5 -/* AD9C08 80062A68 240A0020 */ li $t2, 32 -/* AD9C0C 80062A6C 4600428D */ trunc.w.s $f10, $f8 -/* AD9C10 80062A70 24190010 */ li $t9, 16 -/* AD9C14 80062A74 00003025 */ move $a2, $zero -/* AD9C18 80062A78 00003825 */ move $a3, $zero -/* AD9C1C 80062A7C 440B5000 */ mfc1 $t3, $f10 -/* AD9C20 80062A80 00000000 */ nop -/* AD9C24 80062A84 A42BCF12 */ sh $t3, %lo(D_8015CF12)($at) -/* AD9C28 80062A88 C4B00008 */ lwc1 $f16, 8($a1) -/* AD9C2C 80062A8C 240B0001 */ li $t3, 1 -/* AD9C30 80062A90 AFAB0010 */ sw $t3, 0x10($sp) -/* AD9C34 80062A94 4600848D */ trunc.w.s $f18, $f16 -/* AD9C38 80062A98 AFA20014 */ sw $v0, 0x14($sp) -/* AD9C3C 80062A9C 27A50024 */ addiu $a1, $sp, 0x24 -/* AD9C40 80062AA0 440D9000 */ mfc1 $t5, $f18 -/* AD9C44 80062AA4 00000000 */ nop -/* AD9C48 80062AA8 A42DCF14 */ sh $t5, %lo(D_8015CF14)($at) -/* AD9C4C 80062AAC 3C018016 */ lui $at, %hi(D_8015D3A4) # $at, 0x8016 -/* AD9C50 80062AB0 AC2FD3A4 */ sw $t7, %lo(D_8015D3A4)($at) -/* AD9C54 80062AB4 3C018016 */ lui $at, %hi(D_8015D3A8) # $at, 0x8016 -/* AD9C58 80062AB8 AC38D3A8 */ sw $t8, %lo(D_8015D3A8)($at) -/* AD9C5C 80062ABC A043049C */ sb $v1, 0x49c($v0) -/* AD9C60 80062AC0 A040049D */ sb $zero, 0x49d($v0) -/* AD9C64 80062AC4 A048049E */ sb $t0, 0x49e($v0) -/* AD9C68 80062AC8 A049049F */ sb $t1, 0x49f($v0) -/* AD9C6C 80062ACC A04304A0 */ sb $v1, 0x4a0($v0) -/* AD9C70 80062AD0 A04004A1 */ sb $zero, 0x4a1($v0) -/* AD9C74 80062AD4 A04804A2 */ sb $t0, 0x4a2($v0) -/* AD9C78 80062AD8 A04904A3 */ sb $t1, 0x4a3($v0) -/* AD9C7C 80062ADC A04904A4 */ sb $t1, 0x4a4($v0) -/* AD9C80 80062AE0 A04304A5 */ sb $v1, 0x4a5($v0) -/* AD9C84 80062AE4 A04004A6 */ sb $zero, 0x4a6($v0) -/* AD9C88 80062AE8 A04904A7 */ sb $t1, 0x4a7($v0) -/* AD9C8C 80062AEC A04904A8 */ sb $t1, 0x4a8($v0) -/* AD9C90 80062AF0 A04304A9 */ sb $v1, 0x4a9($v0) -/* AD9C94 80062AF4 A04004AA */ sb $zero, 0x4aa($v0) -/* AD9C98 80062AF8 A04904AB */ sb $t1, 0x4ab($v0) -/* AD9C9C 80062AFC A04804AC */ sb $t0, 0x4ac($v0) -/* AD9CA0 80062B00 A04004AD */ sb $zero, 0x4ad($v0) -/* AD9CA4 80062B04 A04A04AE */ sb $t2, 0x4ae($v0) -/* AD9CA8 80062B08 A04004AF */ sb $zero, 0x4af($v0) -/* AD9CAC 80062B0C A04804B0 */ sb $t0, 0x4b0($v0) -/* AD9CB0 80062B10 A04004B1 */ sb $zero, 0x4b1($v0) -/* AD9CB4 80062B14 A04A04B2 */ sb $t2, 0x4b2($v0) -/* AD9CB8 80062B18 A04004B3 */ sb $zero, 0x4b3($v0) -/* AD9CBC 80062B1C A04304B4 */ sb $v1, 0x4b4($v0) -/* AD9CC0 80062B20 A04004B5 */ sb $zero, 0x4b5($v0) -/* AD9CC4 80062B24 A04804B6 */ sb $t0, 0x4b6($v0) -/* AD9CC8 80062B28 A04004B7 */ sb $zero, 0x4b7($v0) -/* AD9CCC 80062B2C A04304B8 */ sb $v1, 0x4b8($v0) -/* AD9CD0 80062B30 A04004B9 */ sb $zero, 0x4b9($v0) -/* AD9CD4 80062B34 A04804BA */ sb $t0, 0x4ba($v0) -/* AD9CD8 80062B38 A04004BB */ sb $zero, 0x4bb($v0) -/* AD9CDC 80062B3C 3C018016 */ lui $at, %hi(D_8015D3CC) # $at, 0x8016 -/* AD9CE0 80062B40 AC20D3CC */ sw $zero, %lo(D_8015D3CC)($at) -/* AD9CE4 80062B44 3C018016 */ lui $at, %hi(D_8015D3D0) # $at, 0x8016 -/* AD9CE8 80062B48 AC39D3D0 */ sw $t9, %lo(D_8015D3D0)($at) -/* AD9CEC 80062B4C 3C014100 */ li $at, 0x41000000 # 0.000000 -/* AD9CF0 80062B50 44812000 */ mtc1 $at, $f4 -/* AD9CF4 80062B54 3C018016 */ lui $at, %hi(D_8015D39C) -/* AD9CF8 80062B58 E424D39C */ swc1 $f4, %lo(D_8015D39C)($at) -/* AD9CFC 80062B5C 3C01BF80 */ li $at, 0xBF800000 # 0.000000 -/* AD9D00 80062B60 44813000 */ mtc1 $at, $f6 -/* AD9D04 80062B64 3C018016 */ lui $at, %hi(D_8015D3A0) -/* AD9D08 80062B68 0C009B35 */ jal Effect_Add -/* AD9D0C 80062B6C E426D3A0 */ swc1 $f6, %lo(D_8015D3A0)($at) -/* AD9D10 80062B70 8FBF001C */ lw $ra, 0x1c($sp) -/* AD9D14 80062B74 27BD0028 */ addiu $sp, $sp, 0x28 -/* AD9D18 80062B78 03E00008 */ jr $ra -/* AD9D1C 80062B7C 00000000 */ nop - diff --git a/asm/non_matchings/code/z_collision_check/func_80062B80.s b/asm/non_matchings/code/z_collision_check/func_80062B80.s deleted file mode 100644 index 4eb8966792..0000000000 --- a/asm/non_matchings/code/z_collision_check/func_80062B80.s +++ /dev/null @@ -1,87 +0,0 @@ -glabel func_80062B80 -/* AD9D20 80062B80 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* AD9D24 80062B84 AFBF001C */ sw $ra, 0x1c($sp) -/* AD9D28 80062B88 AFA5002C */ sw $a1, 0x2c($sp) -/* AD9D2C 80062B8C C4A40000 */ lwc1 $f4, ($a1) -/* AD9D30 80062B90 3C018016 */ lui $at, %hi(D_8015D3DC) # $at, 0x8016 -/* AD9D34 80062B94 240D0005 */ li $t5, 5 -/* AD9D38 80062B98 4600218D */ trunc.w.s $f6, $f4 -/* AD9D3C 80062B9C 240F0005 */ li $t7, 5 -/* AD9D40 80062BA0 3C028016 */ lui $v0, %hi(D_8015D3D8) # $v0, 0x8016 -/* AD9D44 80062BA4 2442D3D8 */ addiu $v0, %lo(D_8015D3D8) # addiu $v0, $v0, -0x2c28 -/* AD9D48 80062BA8 44183000 */ mfc1 $t8, $f6 -/* AD9D4C 80062BAC 24030064 */ li $v1, 100 -/* AD9D50 80062BB0 24080032 */ li $t0, 50 -/* AD9D54 80062BB4 A438D3D8 */ sh $t8, %lo(D_8015D3D8)($at) -/* AD9D58 80062BB8 C4A80004 */ lwc1 $f8, 4($a1) -/* AD9D5C 80062BBC 240900FF */ li $t1, 255 -/* AD9D60 80062BC0 24180010 */ li $t8, 16 -/* AD9D64 80062BC4 4600428D */ trunc.w.s $f10, $f8 -/* AD9D68 80062BC8 24190001 */ li $t9, 1 -/* AD9D6C 80062BCC 00003025 */ move $a2, $zero -/* AD9D70 80062BD0 00003825 */ move $a3, $zero -/* AD9D74 80062BD4 440A5000 */ mfc1 $t2, $f10 -/* AD9D78 80062BD8 00000000 */ nop -/* AD9D7C 80062BDC A42AD3DA */ sh $t2, %lo(D_8015D3DA)($at) -/* AD9D80 80062BE0 C4B00008 */ lwc1 $f16, 8($a1) -/* AD9D84 80062BE4 AFA20014 */ sw $v0, 0x14($sp) -/* AD9D88 80062BE8 AFB90010 */ sw $t9, 0x10($sp) -/* AD9D8C 80062BEC 4600848D */ trunc.w.s $f18, $f16 -/* AD9D90 80062BF0 27A50024 */ addiu $a1, $sp, 0x24 -/* AD9D94 80062BF4 440C9000 */ mfc1 $t4, $f18 -/* AD9D98 80062BF8 00000000 */ nop -/* AD9D9C 80062BFC A42CD3DC */ sh $t4, %lo(D_8015D3DC)($at) -/* AD9DA0 80062C00 3C018016 */ lui $at, %hi(D_8015D86C) # $at, 0x8016 -/* AD9DA4 80062C04 AC2DD86C */ sw $t5, %lo(D_8015D86C)($at) -/* AD9DA8 80062C08 3C018016 */ lui $at, %hi(D_8015D870) # $at, 0x8016 -/* AD9DAC 80062C0C AC2FD870 */ sw $t7, %lo(D_8015D870)($at) -/* AD9DB0 80062C10 A049049C */ sb $t1, 0x49c($v0) -/* AD9DB4 80062C14 A049049D */ sb $t1, 0x49d($v0) -/* AD9DB8 80062C18 A049049E */ sb $t1, 0x49e($v0) -/* AD9DBC 80062C1C A049049F */ sb $t1, 0x49f($v0) -/* AD9DC0 80062C20 A04304A0 */ sb $v1, 0x4a0($v0) -/* AD9DC4 80062C24 A04304A1 */ sb $v1, 0x4a1($v0) -/* AD9DC8 80062C28 A04304A2 */ sb $v1, 0x4a2($v0) -/* AD9DCC 80062C2C A04304A3 */ sb $v1, 0x4a3($v0) -/* AD9DD0 80062C30 A04304A4 */ sb $v1, 0x4a4($v0) -/* AD9DD4 80062C34 A04304A5 */ sb $v1, 0x4a5($v0) -/* AD9DD8 80062C38 A04304A6 */ sb $v1, 0x4a6($v0) -/* AD9DDC 80062C3C A04304A7 */ sb $v1, 0x4a7($v0) -/* AD9DE0 80062C40 A04304A8 */ sb $v1, 0x4a8($v0) -/* AD9DE4 80062C44 A04304A9 */ sb $v1, 0x4a9($v0) -/* AD9DE8 80062C48 A04304AA */ sb $v1, 0x4aa($v0) -/* AD9DEC 80062C4C A04304AB */ sb $v1, 0x4ab($v0) -/* AD9DF0 80062C50 A04804AC */ sb $t0, 0x4ac($v0) -/* AD9DF4 80062C54 A04804AD */ sb $t0, 0x4ad($v0) -/* AD9DF8 80062C58 A04804AE */ sb $t0, 0x4ae($v0) -/* AD9DFC 80062C5C A04804AF */ sb $t0, 0x4af($v0) -/* AD9E00 80062C60 A04804B0 */ sb $t0, 0x4b0($v0) -/* AD9E04 80062C64 A04804B1 */ sb $t0, 0x4b1($v0) -/* AD9E08 80062C68 A04804B2 */ sb $t0, 0x4b2($v0) -/* AD9E0C 80062C6C A04804B3 */ sb $t0, 0x4b3($v0) -/* AD9E10 80062C70 A04804B4 */ sb $t0, 0x4b4($v0) -/* AD9E14 80062C74 A04804B5 */ sb $t0, 0x4b5($v0) -/* AD9E18 80062C78 A04804B6 */ sb $t0, 0x4b6($v0) -/* AD9E1C 80062C7C A04804B7 */ sb $t0, 0x4b7($v0) -/* AD9E20 80062C80 A04004B8 */ sb $zero, 0x4b8($v0) -/* AD9E24 80062C84 A04004B9 */ sb $zero, 0x4b9($v0) -/* AD9E28 80062C88 A04004BA */ sb $zero, 0x4ba($v0) -/* AD9E2C 80062C8C A04004BB */ sb $zero, 0x4bb($v0) -/* AD9E30 80062C90 3C018016 */ lui $at, %hi(D_8015D894) # $at, 0x8016 -/* AD9E34 80062C94 AC20D894 */ sw $zero, %lo(D_8015D894)($at) -/* AD9E38 80062C98 3C018016 */ lui $at, %hi(D_8015D898) # $at, 0x8016 -/* AD9E3C 80062C9C AC38D898 */ sw $t8, %lo(D_8015D898)($at) -/* AD9E40 80062CA0 3C014100 */ li $at, 0x41000000 # 0.000000 -/* AD9E44 80062CA4 44812000 */ mtc1 $at, $f4 -/* AD9E48 80062CA8 3C018016 */ lui $at, %hi(D_8015D864) -/* AD9E4C 80062CAC E424D864 */ swc1 $f4, %lo(D_8015D864)($at) -/* AD9E50 80062CB0 3C01BF80 */ li $at, 0xBF800000 # 0.000000 -/* AD9E54 80062CB4 44813000 */ mtc1 $at, $f6 -/* AD9E58 80062CB8 3C018016 */ lui $at, %hi(D_8015D868) -/* AD9E5C 80062CBC 0C009B35 */ jal Effect_Add -/* AD9E60 80062CC0 E426D868 */ swc1 $f6, %lo(D_8015D868)($at) -/* AD9E64 80062CC4 8FBF001C */ lw $ra, 0x1c($sp) -/* AD9E68 80062CC8 27BD0028 */ addiu $sp, $sp, 0x28 -/* AD9E6C 80062CCC 03E00008 */ jr $ra -/* AD9E70 80062CD0 00000000 */ nop - diff --git a/data/z_collision_check.bss.s b/data/z_collision_check.bss.s deleted file mode 100644 index a45df86591..0000000000 --- a/data/z_collision_check.bss.s +++ /dev/null @@ -1,217 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purpose registers - -.section .bss - -.balign 16 - -glabel D_8015CF00 - .space 0x4 - -glabel D_8015CF04 - .space 0x4 - -glabel D_8015CF08 - .space 0x8 - -glabel D_8015CF10 - .space 0x2 - -glabel D_8015CF12 - .space 0x2 - -glabel D_8015CF14 - .space 0x488 - -glabel D_8015D39C - .space 0x4 - -glabel D_8015D3A0 - .space 0x4 - -glabel D_8015D3A4 - .space 0x4 - -glabel D_8015D3A8 - .space 0x24 - -glabel D_8015D3CC - .space 0x4 - -glabel D_8015D3D0 - .space 0x8 - -glabel D_8015D3D8 - .space 0x2 - -glabel D_8015D3DA - .space 0x2 - -glabel D_8015D3DC - .space 0x488 - -glabel D_8015D864 - .space 0x4 - -glabel D_8015D868 - .space 0x4 - -glabel D_8015D86C - .space 0x4 - -glabel D_8015D870 - .space 0x24 - -glabel D_8015D894 - .space 0x4 - -glabel D_8015D898 - .space 0x8 - -glabel D_8015D8A0 - .space 0x2 - -glabel D_8015D8A2 - .space 0x2 - -glabel D_8015D8A4 - .space 0x488 - -glabel D_8015DD2C - .space 0x4 - -glabel D_8015DD30 - .space 0x4 - -glabel D_8015DD34 - .space 0x4 - -glabel D_8015DD38 - .space 0x24 - -glabel D_8015DD5C - .space 0x4 - -glabel D_8015DD60 - .space 0x8 - -glabel D_8015DD68 - .space 0x2 - -glabel D_8015DD6A - .space 0x2 - -glabel D_8015DD6C - .space 0x488 - -glabel D_8015E1F4 - .space 0x4 - -glabel D_8015E1F8 - .space 0x4 - -glabel D_8015E1FC - .space 0x4 - -glabel D_8015E200 - .space 0x24 - -glabel D_8015E224 - .space 0x4 - -glabel D_8015E228 - .space 0x8 - -glabel D_8015E230 - .space 0x38 - -glabel D_8015E268 - .space 0x38 - -glabel D_8015E2A0 - .space 0x38 - -glabel D_8015E2D8 - .space 0x38 - -glabel D_8015E310 - .space 0x10 - -glabel D_8015E320 - .space 0x38 - -glabel D_8015E358 - .space 0x38 - -glabel D_8015E390 - .space 0x10 - -glabel D_8015E3A0 - .space 0x38 - -glabel D_8015E3D8 - .space 0x38 - -glabel D_8015E410 - .space 0x10 - -glabel D_8015E420 - .space 0x10 - -glabel D_8015E430 - .space 0x10 - -glabel D_8015E440 - .space 0x38 - -glabel D_8015E478 - .space 0x38 - -glabel D_8015E4B0 - .space 0x10 - -glabel D_8015E4C0 - .space 0x38 - -glabel D_8015E4F8 - .space 0x38 - -glabel D_8015E530 - .space 0x34 - -glabel D_8015E564 - .space 0x34 - -glabel D_8015E598 - .space 0x10 - -glabel D_8015E5A8 - .space 0x34 - -glabel D_8015E5DC - .space 0x34 - -glabel D_8015E610 - .space 0xC - -glabel D_8015E61C - .space 0xC - -glabel D_8015E628 - .space 0x10 - -glabel D_8015E638 - .space 0x10 - -glabel D_8015E648 - .space 0x4 - -glabel D_8015E64C - .space 0x4 - -glabel D_8015E650 - .space 0x10 diff --git a/include/functions.h b/include/functions.h index a34951b4a7..42482d45ce 100644 --- a/include/functions.h +++ b/include/functions.h @@ -704,7 +704,7 @@ s32 func_8005B198(); // ? func_8005B1A4(?); DamageTable* DamageTable_Get(s32 index); // ? func_8005B280(?); -// ? func_8005B2AC(?); +void func_8005B2AC(GraphicsContext* gfx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b); s32 Collider_InitBase(GlobalContext* globalCtx, Collider* collider); s32 Collider_DestroyBase(GlobalContext* globalCtx, Collider* collider); s32 Collider_SetBase_Actor(GlobalContext* globalCtx, Collider* collider, ColliderInit_Actor* src); diff --git a/spec b/spec index 5ced884045..b4c6eb0f0d 100644 --- a/spec +++ b/spec @@ -296,7 +296,6 @@ beginseg include "build/data/z_camera.bss.o" include "build/src/code/z_collision_btltbls.o" include "build/src/code/z_collision_check.o" - include "build/data/z_collision_check.bss.o" include "build/src/code/z_common_data.o" include "build/src/code/z_debug.o" include "build/src/code/z_debug_display.o" diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 105db862a6..2b5b1ccede 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -2,8 +2,6 @@ #include #include -void func_8005B2AC(GraphicsContext* gfx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b); - // draw red poly void func_8005B280(GraphicsContext* gfx, Vec3f* vA, Vec3f* vB, Vec3f* vC) { func_8005B2AC(gfx, vA, vB, vC, 255, 0, 0); @@ -1231,9 +1229,6 @@ s32 func_8005DF74(ColliderBody* left, ColliderBody* right) { void func_8005DF9C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { } -#ifdef NON_MATCHING -// Blue EffectSpark -// .bss problems void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { static EffectSparkInit D_8015D8A0; s32 sp24; @@ -1282,14 +1277,7 @@ void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { Effect_Add(globalCtx, &sp24, EFFECT_SPARK, 0, 1, &D_8015D8A0); } -#else -void func_8005DFAC(GlobalContext* globalCtx, Collider* collider, Vec3f* v); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/func_8005DFAC.s") -#endif -#ifdef NON_MATCHING -// Green EffectSpark -// .bss problems void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { static EffectSparkInit D_8015DD68; s32 sp24; @@ -1338,10 +1326,6 @@ void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { Effect_Add(globalCtx, &sp24, EFFECT_SPARK, 0, 1, &D_8015DD68); } -#else -void func_8005E10C(GlobalContext* globalCtx, Collider* collider, Vec3f* v); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/func_8005E10C.s") -#endif void func_8005E26C(GlobalContext* globalCtx, Collider* collider, Vec3f* v) { func_800299AC(globalCtx, v); @@ -1751,8 +1735,8 @@ void CollisionCheck_AC_TrisVsJntSph(GlobalContext* globalCtx, CollisionCheckCont } } -extern TriNorm D_8015E230; -extern TriNorm D_8015E268; +static TriNorm D_8015E230; +static TriNorm D_8015E268; void CollisionCheck_AC_JntSphVsQuad(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { @@ -1796,8 +1780,8 @@ void CollisionCheck_AC_JntSphVsQuad(GlobalContext* globalCtx, CollisionCheckCont } } -extern TriNorm D_8015E2A0; -extern TriNorm D_8015E2D8; +static TriNorm D_8015E2A0; +static TriNorm D_8015E2D8; void CollisionCheck_AC_QuadVsJntSph(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { @@ -1916,7 +1900,7 @@ void CollisionCheck_AC_CylVsTris(GlobalContext* globalCtx, CollisionCheckContext } } -extern Vec3f D_8015E310; +static Vec3f D_8015E310; void CollisionCheck_AC_TrisVsCyl(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { ColliderTris* left = (ColliderTris*)l; @@ -1950,9 +1934,9 @@ void CollisionCheck_AC_TrisVsCyl(GlobalContext* globalCtx, CollisionCheckContext } } -extern TriNorm D_8015E320; -extern TriNorm D_8015E358; -extern Vec3f D_8015E390; +static TriNorm D_8015E320; +static TriNorm D_8015E358; +static Vec3f D_8015E390; void CollisionCheck_AC_CylVsQuad(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { ColliderCylinder* left = (ColliderCylinder*)l; @@ -1996,9 +1980,11 @@ void CollisionCheck_AC_CylVsQuad(GlobalContext* globalCtx, CollisionCheckContext } } -extern TriNorm D_8015E3A0; -extern TriNorm D_8015E3D8; -extern Vec3f D_8015E410; +static s8 sBssDummy1; + +static TriNorm D_8015E3A0; +static TriNorm D_8015E3D8; +static Vec3f D_8015E410; void CollisionCheck_AC_QuadVsCyl(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { ColliderQuad* left = (ColliderQuad*)l; @@ -2046,7 +2032,12 @@ void CollisionCheck_AC_QuadVsCyl(GlobalContext* globalCtx, CollisionCheckContext } } -extern Vec3f D_8015E420; +static s8 sBssDummy2; +static s8 sBssDummy3; +static s8 sBssDummy4; +static s8 sBssDummy5; + +static Vec3f D_8015E420; void CollisionCheck_AC_TrisVsTris(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { @@ -2086,9 +2077,14 @@ void CollisionCheck_AC_TrisVsTris(GlobalContext* globalCtx, CollisionCheckContex } } -extern Vec3f D_8015E430; -extern TriNorm D_8015E440; -extern TriNorm D_8015E478; +static s8 sBssDummy6; +static s8 sBssDummy7; +static s8 sBssDummy8; +static s8 sBssDummy9; + +static Vec3f D_8015E430; +static TriNorm D_8015E440; +static TriNorm D_8015E478; void CollisionCheck_AC_TrisVsQuad(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { @@ -2132,9 +2128,9 @@ void CollisionCheck_AC_TrisVsQuad(GlobalContext* globalCtx, CollisionCheckContex } } -extern Vec3f D_8015E4B0; -extern TriNorm D_8015E4C0; -extern TriNorm D_8015E4F8; +static Vec3f D_8015E4B0; +static TriNorm D_8015E4C0; +static TriNorm D_8015E4F8; void CollisionCheck_AC_QuadVsTris(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { @@ -2180,9 +2176,9 @@ void CollisionCheck_AC_QuadVsTris(GlobalContext* globalCtx, CollisionCheckContex } } -extern TriNorm D_8015E530[2]; -extern Vec3f D_8015E598; -extern TriNorm D_8015E5A8[2]; +static TriNorm D_8015E530[2]; +static Vec3f D_8015E598; +static TriNorm D_8015E5A8[2]; void CollisionCheck_AC_QuadVsQuad(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* l, Collider* r) { @@ -2772,7 +2768,7 @@ void func_800622E4(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx) { } } -extern Linef D_8015E610; +static Linef D_8015E610; s32 CollisionCheck_generalLineOcCheck_JntSph(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, Vec3f* arg3, Vec3f* arg4) { @@ -2793,8 +2789,8 @@ s32 CollisionCheck_generalLineOcCheck_JntSph(GlobalContext* globalCtx, Collision return 0; } -extern Vec3f D_8015E628; -extern Vec3f D_8015E638; +static Vec3f D_8015E628; +static Vec3f D_8015E638; s32 CollisionCheck_generalLineOcCheck_Cyl(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, Vec3f* arg3, Vec3f* arg4) { @@ -2910,35 +2906,35 @@ void func_8006285C(GlobalContext* globalCtx, ColliderTris* collider, s32 index, Collider_SetTrisItemDim(globalCtx, &item->dim, init); } -#ifdef NON_MATCHING -// Codegen OK, .bss section problems +// Due to an unknown reason, bss ordering changed between the 2 static Vec3f variables in the function below. +// In order to reproduce this behavior, we need a specific number of bss variables in the file before that point. +// For this, we introduce a certain amount of dummy variables throughout the file, which we fit inside padding added +// by the compiler between structs like TriNorm and/or Vec3f, so they don't take space in bss. +static s8 sBssDummy10; +static s8 sBssDummy11; +static s8 sBssDummy12; +static s8 sBssDummy13; + void func_800628A4(s32 arg0, ColliderJntSph* collider) { - s32 phi_s3; - - static Vec3f D_8015CF00; static Vec3f D_8015E648; + static Vec3f D_8015CF00; // bss ordering changes here + s32 i; - for (phi_s3 = 0; phi_s3 < collider->count; phi_s3++) { - if (arg0 == collider->list[phi_s3].dim.joint) { - D_8015E648.x = collider->list[phi_s3].dim.modelSphere.center.x; - D_8015E648.y = collider->list[phi_s3].dim.modelSphere.center.y; - D_8015E648.z = collider->list[phi_s3].dim.modelSphere.center.z; + for (i = 0; i < collider->count; i++) { + if (arg0 == collider->list[i].dim.joint) { + D_8015E648.x = collider->list[i].dim.modelSphere.center.x; + D_8015E648.y = collider->list[i].dim.modelSphere.center.y; + D_8015E648.z = collider->list[i].dim.modelSphere.center.z; Matrix_MultVec3f(&D_8015E648, &D_8015CF00); - collider->list[phi_s3].dim.worldSphere.center.x = (s32)D_8015CF00.x; - collider->list[phi_s3].dim.worldSphere.center.y = (s32)D_8015CF00.y; - collider->list[phi_s3].dim.worldSphere.center.z = (s32)D_8015CF00.z; - collider->list[phi_s3].dim.worldSphere.radius = - (s32)((f32)collider->list[phi_s3].dim.modelSphere.radius * collider->list[phi_s3].dim.scale); + collider->list[i].dim.worldSphere.center.x = (s32)D_8015CF00.x; + collider->list[i].dim.worldSphere.center.y = (s32)D_8015CF00.y; + collider->list[i].dim.worldSphere.center.z = (s32)D_8015CF00.z; + collider->list[i].dim.worldSphere.radius = + (s32)((f32)collider->list[i].dim.modelSphere.radius * collider->list[i].dim.scale); } } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/func_800628A4.s") -#endif -#ifdef NON_MATCHING -// Purple EffectSpark -// .bss section problems void func_80062A28(GlobalContext* globalCtx, Vec3f* v) { static EffectSparkInit D_8015CF10; s32 sp24; @@ -2987,13 +2983,7 @@ void func_80062A28(GlobalContext* globalCtx, Vec3f* v) { Effect_Add(globalCtx, &sp24, EFFECT_SPARK, 0, 1, &D_8015CF10); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/func_80062A28.s") -#endif -#ifdef NON_MATCHING -// White EffectSpark (Bubbles?) -// .bss section problems void func_80062B80(GlobalContext* globalCtx, Vec3f* v) { static EffectSparkInit D_8015D3D8; s32 sp24; @@ -3042,9 +3032,6 @@ void func_80062B80(GlobalContext* globalCtx, Vec3f* v) { Effect_Add(globalCtx, &sp24, EFFECT_SPARK, 0, 1, &D_8015D3D8); } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_check/func_80062B80.s") -#endif void func_80062CD4(GlobalContext* globalCtx, Vec3f* v) { static EffectShieldParticleInit init = {