Add some more actor types, match a function (#191)

* Add some more actor types, match a function

* Identify the boundBox member of the Player struct

Note that while the `flag` members are signed, they should be understood as just a group of bits.
Based on some googling around (see https://stackoverflow.com/a/11644749) the operation `thing.flag |= 0x8000`
is NOT undefined behaviour, even though that is setting the sign bit.
The numerical interpretation of the result as a signed number is implementation defined, while the
actual operation acts on the bit representation of the number.

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-05-07 00:56:43 -04:00
committed by GitHub
parent d4a0f7ab8f
commit ecb085b291
14 changed files with 799 additions and 788 deletions
@@ -1469,14 +1469,14 @@ glabel func_8008DC08
/* 08EB0C 8008DF0C 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 08EB10 8008DF10 44819000 */ mtc1 $at, $f18
/* 08EB14 8008DF14 ACC800BC */ sw $t0, 0xbc($a2)
/* 08EB18 8008DF18 3C01800E */ lui $at, %hi(gKartBoundingBoxTable)
/* 08EB18 8008DF18 3C01800E */ lui $at, %hi(gKartBoundingBoxSizeTable)
/* 08EB1C 8008DF1C 000B6080 */ sll $t4, $t3, 2
/* 08EB20 8008DF20 A4C00DB6 */ sh $zero, 0xdb6($a2)
/* 08EB24 8008DF24 ACCA00BC */ sw $t2, 0xbc($a2)
/* 08EB28 8008DF28 002C0821 */ addu $at, $at, $t4
/* 08EB2C 8008DF2C E4D00DC4 */ swc1 $f16, 0xdc4($a2)
/* 08EB30 8008DF30 E4D20224 */ swc1 $f18, 0x224($a2)
/* 08EB34 8008DF34 C42426B0 */ lwc1 $f4, %lo(gKartBoundingBoxTable)($at)
/* 08EB34 8008DF34 C42426B0 */ lwc1 $f4, %lo(gKartBoundingBoxSizeTable)($at)
/* 08EB38 8008DF38 3C0E8016 */ lui $t6, %hi(D_80165190) # $t6, 0x8016
/* 08EB3C 8008DF3C 25CE5190 */ addiu $t6, %lo(D_80165190) # addiu $t6, $t6, 0x5190
/* 08EB40 8008DF40 00076840 */ sll $t5, $a3, 1
@@ -1741,11 +1741,11 @@ glabel func_8008E118
/* 08EF18 8008E318 0C008973 */ jal move_f32_towards
/* 08EF1C 8008E31C 34A53333 */ ori $a1, (0x3F333333 & 0xFFFF) # ori $a1, $a1, 0x3333
/* 08EF20 8008E320 960E0254 */ lhu $t6, 0x254($s0)
/* 08EF24 8008E324 3C01800E */ lui $at, %hi(gKartBoundingBoxTable)
/* 08EF24 8008E324 3C01800E */ lui $at, %hi(gKartBoundingBoxSizeTable)
/* 08EF28 8008E328 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc
/* 08EF2C 8008E32C 000E7880 */ sll $t7, $t6, 2
/* 08EF30 8008E330 002F0821 */ addu $at, $at, $t7
/* 08EF34 8008E334 C43226B0 */ lwc1 $f18, %lo(gKartBoundingBoxTable)($at)
/* 08EF34 8008E334 C43226B0 */ lwc1 $f18, %lo(gKartBoundingBoxSizeTable)($at)
/* 08EF38 8008E338 3C01800F */ lui $at, %hi(D_800EF598)
/* 08EF3C 8008E33C D426F598 */ ldc1 $f6, %lo(D_800EF598)($at)
/* 08EF40 8008E340 46009121 */ cvt.d.s $f4, $f18
@@ -1796,7 +1796,7 @@ glabel func_8008E3C0
/* 08EFE0 8008E3E0 0C008973 */ jal move_f32_towards
/* 08EFE4 8008E3E4 3C053F80 */ lui $a1, 0x3f80
/* 08EFE8 8008E3E8 8FA70018 */ lw $a3, 0x18($sp)
/* 08EFEC 8008E3EC 3C05800E */ lui $a1, %hi(gKartBoundingBoxTable) # 0x800e
/* 08EFEC 8008E3EC 3C05800E */ lui $a1, %hi(gKartBoundingBoxSizeTable) # 0x800e
/* 08EFF0 8008E3F0 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc
/* 08EFF4 8008E3F4 94EE0254 */ lhu $t6, 0x254($a3)
/* 08EFF8 8008E3F8 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd
@@ -1804,7 +1804,7 @@ glabel func_8008E3C0
/* 08F000 8008E400 000E7880 */ sll $t7, $t6, 2
/* 08F004 8008E404 00AF2821 */ addu $a1, $a1, $t7
/* 08F008 8008E408 0C008973 */ jal move_f32_towards
/* 08F00C 8008E40C 8CA526B0 */ lw $a1, %lo(gKartBoundingBoxTable)($a1) # 0x26b0($a1)
/* 08F00C 8008E40C 8CA526B0 */ lw $a1, %lo(gKartBoundingBoxSizeTable)($a1) # 0x26b0($a1)
/* 08F010 8008E410 8FA70018 */ lw $a3, 0x18($sp)
/* 08F014 8008E414 3C01BFFF */ lui $at, (0xBFFFFFFF >> 16) # lui $at, 0xbfff
/* 08F018 8008E418 3421FFFF */ ori $at, (0xBFFFFFFF & 0xFFFF) # ori $at, $at, 0xffff
@@ -1814,12 +1814,12 @@ glabel func_8008E3C0
/* 08F028 8008E428 0301C824 */ and $t9, $t8, $at
/* 08F02C 8008E42C 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 08F030 8008E430 44812000 */ mtc1 $at, $f4
/* 08F034 8008E434 3C01800E */ lui $at, %hi(gKartBoundingBoxTable)
/* 08F034 8008E434 3C01800E */ lui $at, %hi(gKartBoundingBoxSizeTable)
/* 08F038 8008E438 00084880 */ sll $t1, $t0, 2
/* 08F03C 8008E43C 00290821 */ addu $at, $at, $t1
/* 08F040 8008E440 ACF900BC */ sw $t9, 0xbc($a3)
/* 08F044 8008E444 E4E40224 */ swc1 $f4, 0x224($a3)
/* 08F048 8008E448 C42626B0 */ lwc1 $f6, %lo(gKartBoundingBoxTable)($at)
/* 08F048 8008E448 C42626B0 */ lwc1 $f6, %lo(gKartBoundingBoxSizeTable)($at)
/* 08F04C 8008E44C 3C014040 */ li $at, 0x40400000 # 3.000000
/* 08F050 8008E450 44814000 */ mtc1 $at, $f8
/* 08F054 8008E454 3C010800 */ lui $at, 0x800
+178 -178
View File
@@ -1,178 +1,178 @@
glabel func_8008E118
/* 08ED18 8008E118 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 08ED1C 8008E11C AFBF001C */ sw $ra, 0x1c($sp)
/* 08ED20 8008E120 AFB00018 */ sw $s0, 0x18($sp)
/* 08ED24 8008E124 AFA50024 */ sw $a1, 0x24($sp)
/* 08ED28 8008E128 8C8200BC */ lw $v0, 0xbc($a0)
/* 08ED2C 8008E12C 00053600 */ sll $a2, $a1, 0x18
/* 08ED30 8008E130 00067603 */ sra $t6, $a2, 0x18
/* 08ED34 8008E134 34018000 */ li $at, 32768
/* 08ED38 8008E138 304F8000 */ andi $t7, $v0, 0x8000
/* 08ED3C 8008E13C 01C03025 */ move $a2, $t6
/* 08ED40 8008E140 15E10023 */ bne $t7, $at, .L8008E1D0
/* 08ED44 8008E144 00808025 */ move $s0, $a0
/* 08ED48 8008E148 3C030400 */ lui $v1, 0x400
/* 08ED4C 8008E14C 0043C024 */ and $t8, $v0, $v1
/* 08ED50 8008E150 1078001F */ beq $v1, $t8, .L8008E1D0
/* 08ED54 8008E154 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd
/* 08ED58 8008E158 848800AE */ lh $t0, 0xae($a0)
/* 08ED5C 8008E15C 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff
/* 08ED60 8008E160 0041C824 */ and $t9, $v0, $at
/* 08ED64 8008E164 000E2E00 */ sll $a1, $t6, 0x18
/* 08ED68 8008E168 AC9900BC */ sw $t9, 0xbc($a0)
/* 08ED6C 8008E16C A48000A8 */ sh $zero, 0xa8($a0)
/* 08ED70 8008E170 AC80007C */ sw $zero, 0x7c($a0)
/* 08ED74 8008E174 A48000C0 */ sh $zero, 0xc0($a0)
/* 08ED78 8008E178 00054E03 */ sra $t1, $a1, 0x18
/* 08ED7C 8008E17C A488002E */ sh $t0, 0x2e($a0)
/* 08ED80 8008E180 A3AE0027 */ sb $t6, 0x27($sp)
/* 08ED84 8008E184 0C0238F0 */ jal func_8008E3C0
/* 08ED88 8008E188 01202825 */ move $a1, $t1
/* 08ED8C 8008E18C 83A60027 */ lb $a2, 0x27($sp)
/* 08ED90 8008E190 3C0B8016 */ lui $t3, %hi(D_80165190) # $t3, 0x8016
/* 08ED94 8008E194 256B5190 */ addiu $t3, %lo(D_80165190) # addiu $t3, $t3, 0x5190
/* 08ED98 8008E198 00065040 */ sll $t2, $a2, 1
/* 08ED9C 8008E19C 24030001 */ li $v1, 1
/* 08EDA0 8008E1A0 014B1021 */ addu $v0, $t2, $t3
/* 08EDA4 8008E1A4 00062E00 */ sll $a1, $a2, 0x18
/* 08EDA8 8008E1A8 00056603 */ sra $t4, $a1, 0x18
/* 08EDAC 8008E1AC A4430000 */ sh $v1, ($v0)
/* 08EDB0 8008E1B0 A4430010 */ sh $v1, 0x10($v0)
/* 08EDB4 8008E1B4 A4430020 */ sh $v1, 0x20($v0)
/* 08EDB8 8008E1B8 A4430030 */ sh $v1, 0x30($v0)
/* 08EDBC 8008E1BC 01802825 */ move $a1, $t4
/* 08EDC0 8008E1C0 0C0236AF */ jal func_8008DABC
/* 08EDC4 8008E1C4 02002025 */ move $a0, $s0
/* 08EDC8 8008E1C8 10000079 */ b .L8008E3B0
/* 08EDCC 8008E1CC 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E1D0:
/* 08EDD0 8008E1D0 3C030002 */ lui $v1, 2
/* 08EDD4 8008E1D4 00436824 */ and $t5, $v0, $v1
/* 08EDD8 8008E1D8 146D002D */ bne $v1, $t5, .L8008E290
/* 08EDDC 8008E1DC 00062040 */ sll $a0, $a2, 1
/* 08EDE0 8008E1E0 860E002E */ lh $t6, 0x2e($s0)
/* 08EDE4 8008E1E4 3C188019 */ lui $t8, %hi(D_8018D920) # $t8, 0x8019
/* 08EDE8 8008E1E8 2718D920 */ addiu $t8, %lo(D_8018D920) # addiu $t8, $t8, -0x26e0
/* 08EDEC 8008E1EC 25CFFA50 */ addiu $t7, $t6, -0x5b0
/* 08EDF0 8008E1F0 A60F002E */ sh $t7, 0x2e($s0)
/* 08EDF4 8008E1F4 00981021 */ addu $v0, $a0, $t8
/* 08EDF8 8008E1F8 84590000 */ lh $t9, ($v0)
/* 08EDFC 8008E1FC 240105B0 */ li $at, 1456
/* 08EE00 8008E200 3C053F80 */ lui $a1, 0x3f80
/* 08EE04 8008E204 2728FA50 */ addiu $t0, $t9, -0x5b0
/* 08EE08 8008E208 3103FFFF */ andi $v1, $t0, 0xffff
/* 08EE0C 8008E20C 0061001A */ div $zero, $v1, $at
/* 08EE10 8008E210 00004812 */ mflo $t1
/* 08EE14 8008E214 00095400 */ sll $t2, $t1, 0x10
/* 08EE18 8008E218 000A5C03 */ sra $t3, $t2, 0x10
/* 08EE1C 8008E21C 15600018 */ bnez $t3, .L8008E280
/* 08EE20 8008E220 A4480000 */ sh $t0, ($v0)
/* 08EE24 8008E224 860C00B2 */ lh $t4, 0xb2($s0)
/* 08EE28 8008E228 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd
/* 08EE2C 8008E22C 3C088016 */ lui $t0, %hi(D_80165190) # $t0, 0x8016
/* 08EE30 8008E230 258DFFFF */ addiu $t5, $t4, -1
/* 08EE34 8008E234 A60D00B2 */ sh $t5, 0xb2($s0)
/* 08EE38 8008E238 860E00B2 */ lh $t6, 0xb2($s0)
/* 08EE3C 8008E23C 24030001 */ li $v1, 1
/* 08EE40 8008E240 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff
/* 08EE44 8008E244 1DC0000E */ bgtz $t6, .L8008E280
/* 08EE48 8008E248 25085190 */ addiu $t0, %lo(D_80165190) # addiu $t0, $t0, 0x5190
/* 08EE4C 8008E24C 8E0F00BC */ lw $t7, 0xbc($s0)
/* 08EE50 8008E250 861900AE */ lh $t9, 0xae($s0)
/* 08EE54 8008E254 A60000A8 */ sh $zero, 0xa8($s0)
/* 08EE58 8008E258 01E1C024 */ and $t8, $t7, $at
/* 08EE5C 8008E25C AE1800BC */ sw $t8, 0xbc($s0)
/* 08EE60 8008E260 AE00007C */ sw $zero, 0x7c($s0)
/* 08EE64 8008E264 A60000C0 */ sh $zero, 0xc0($s0)
/* 08EE68 8008E268 00881021 */ addu $v0, $a0, $t0
/* 08EE6C 8008E26C A619002E */ sh $t9, 0x2e($s0)
/* 08EE70 8008E270 A4430000 */ sh $v1, ($v0)
/* 08EE74 8008E274 A4430010 */ sh $v1, 0x10($v0)
/* 08EE78 8008E278 A4430020 */ sh $v1, 0x20($v0)
/* 08EE7C 8008E27C A4430030 */ sh $v1, 0x30($v0)
.L8008E280:
/* 08EE80 8008E280 0C00C7D2 */ jal func_80031F48
/* 08EE84 8008E284 02002025 */ move $a0, $s0
/* 08EE88 8008E288 10000049 */ b .L8008E3B0
/* 08EE8C 8008E28C 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E290:
/* 08EE90 8008E290 860900B0 */ lh $t1, 0xb0($s0)
/* 08EE94 8008E294 C604008C */ lwc1 $f4, 0x8c($s0)
/* 08EE98 8008E298 3C01800F */ lui $at, %hi(D_800EF590)
/* 08EE9C 8008E29C 252A0001 */ addiu $t2, $t1, 1
/* 08EEA0 8008E2A0 A60A00B0 */ sh $t2, 0xb0($s0)
/* 08EEA4 8008E2A4 D428F590 */ ldc1 $f8, %lo(D_800EF590)($at)
/* 08EEA8 8008E2A8 460021A1 */ cvt.d.s $f6, $f4
/* 08EEAC 8008E2AC 860200B0 */ lh $v0, 0xb0($s0)
/* 08EEB0 8008E2B0 46283282 */ mul.d $f10, $f6, $f8
/* 08EEB4 8008E2B4 24030001 */ li $v1, 1
/* 08EEB8 8008E2B8 46205420 */ cvt.s.d $f16, $f10
/* 08EEBC 8008E2BC 1462000F */ bne $v1, $v0, .L8008E2FC
/* 08EEC0 8008E2C0 E610008C */ swc1 $f16, 0x8c($s0)
/* 08EEC4 8008E2C4 960B0000 */ lhu $t3, ($s0)
/* 08EEC8 8008E2C8 30C400FF */ andi $a0, $a2, 0xff
/* 08EECC 8008E2CC 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900
/* 08EED0 8008E2D0 316C4000 */ andi $t4, $t3, 0x4000
/* 08EED4 8008E2D4 11800009 */ beqz $t4, .L8008E2FC
/* 08EED8 8008E2D8 00000000 */ nop
/* 08EEDC 8008E2DC 96050254 */ lhu $a1, 0x254($s0)
/* 08EEE0 8008E2E0 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005
/* 08EEE4 8008E2E4 A3A60027 */ sb $a2, 0x27($sp)
/* 08EEE8 8008E2E8 00056900 */ sll $t5, $a1, 4
/* 08EEEC 8008E2EC 0C03243D */ jal func_800C90F4
/* 08EEF0 8008E2F0 01A12821 */ addu $a1, $t5, $at
/* 08EEF4 8008E2F4 83A60027 */ lb $a2, 0x27($sp)
/* 08EEF8 8008E2F8 860200B0 */ lh $v0, 0xb0($s0)
.L8008E2FC:
/* 08EEFC 8008E2FC 0440001A */ bltz $v0, .L8008E368
/* 08EF00 8008E300 284101CC */ slti $at, $v0, 0x1cc
/* 08EF04 8008E304 10200018 */ beqz $at, .L8008E368
/* 08EF08 8008E308 26040224 */ addiu $a0, $s0, 0x224
/* 08EF0C 8008E30C 3C053F33 */ lui $a1, (0x3F333333 >> 16) # lui $a1, 0x3f33
/* 08EF10 8008E310 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc
/* 08EF14 8008E314 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd
/* 08EF18 8008E318 0C008973 */ jal move_f32_towards
/* 08EF1C 8008E31C 34A53333 */ ori $a1, (0x3F333333 & 0xFFFF) # ori $a1, $a1, 0x3333
/* 08EF20 8008E320 960E0254 */ lhu $t6, 0x254($s0)
/* 08EF24 8008E324 3C01800E */ lui $at, %hi(gKartBoundingBoxTable)
/* 08EF28 8008E328 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc
/* 08EF2C 8008E32C 000E7880 */ sll $t7, $t6, 2
/* 08EF30 8008E330 002F0821 */ addu $at, $at, $t7
/* 08EF34 8008E334 C43226B0 */ lwc1 $f18, %lo(gKartBoundingBoxTable)($at)
/* 08EF38 8008E338 3C01800F */ lui $at, %hi(D_800EF598)
/* 08EF3C 8008E33C D426F598 */ ldc1 $f6, %lo(D_800EF598)($at)
/* 08EF40 8008E340 46009121 */ cvt.d.s $f4, $f18
/* 08EF44 8008E344 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd
/* 08EF48 8008E348 46262202 */ mul.d $f8, $f4, $f6
/* 08EF4C 8008E34C 26040070 */ addiu $a0, $s0, 0x70
/* 08EF50 8008E350 462042A0 */ cvt.s.d $f10, $f8
/* 08EF54 8008E354 44055000 */ mfc1 $a1, $f10
/* 08EF58 8008E358 0C008973 */ jal move_f32_towards
/* 08EF5C 8008E35C 00000000 */ nop
/* 08EF60 8008E360 10000013 */ b .L8008E3B0
/* 08EF64 8008E364 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E368:
/* 08EF68 8008E368 00062E00 */ sll $a1, $a2, 0x18
/* 08EF6C 8008E36C 0005C603 */ sra $t8, $a1, 0x18
/* 08EF70 8008E370 03002825 */ move $a1, $t8
/* 08EF74 8008E374 02002025 */ move $a0, $s0
/* 08EF78 8008E378 0C0238F0 */ jal func_8008E3C0
/* 08EF7C 8008E37C A3A60027 */ sb $a2, 0x27($sp)
/* 08EF80 8008E380 96190000 */ lhu $t9, ($s0)
/* 08EF84 8008E384 83A60027 */ lb $a2, 0x27($sp)
/* 08EF88 8008E388 33284000 */ andi $t0, $t9, 0x4000
/* 08EF8C 8008E38C 11000007 */ beqz $t0, .L8008E3AC
/* 08EF90 8008E390 30C400FF */ andi $a0, $a2, 0xff
/* 08EF94 8008E394 96050254 */ lhu $a1, 0x254($s0)
/* 08EF98 8008E398 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900
/* 08EF9C 8008E39C 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008
/* 08EFA0 8008E3A0 00054900 */ sll $t1, $a1, 4
/* 08EFA4 8008E3A4 0C03243D */ jal func_800C90F4
/* 08EFA8 8008E3A8 01212821 */ addu $a1, $t1, $at
.L8008E3AC:
/* 08EFAC 8008E3AC 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E3B0:
/* 08EFB0 8008E3B0 8FB00018 */ lw $s0, 0x18($sp)
/* 08EFB4 8008E3B4 27BD0020 */ addiu $sp, $sp, 0x20
/* 08EFB8 8008E3B8 03E00008 */ jr $ra
/* 08EFBC 8008E3BC 00000000 */ nop
glabel func_8008E118
/* 08ED18 8008E118 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 08ED1C 8008E11C AFBF001C */ sw $ra, 0x1c($sp)
/* 08ED20 8008E120 AFB00018 */ sw $s0, 0x18($sp)
/* 08ED24 8008E124 AFA50024 */ sw $a1, 0x24($sp)
/* 08ED28 8008E128 8C8200BC */ lw $v0, 0xbc($a0)
/* 08ED2C 8008E12C 00053600 */ sll $a2, $a1, 0x18
/* 08ED30 8008E130 00067603 */ sra $t6, $a2, 0x18
/* 08ED34 8008E134 34018000 */ li $at, 32768
/* 08ED38 8008E138 304F8000 */ andi $t7, $v0, 0x8000
/* 08ED3C 8008E13C 01C03025 */ move $a2, $t6
/* 08ED40 8008E140 15E10023 */ bne $t7, $at, .L8008E1D0
/* 08ED44 8008E144 00808025 */ move $s0, $a0
/* 08ED48 8008E148 3C030400 */ lui $v1, 0x400
/* 08ED4C 8008E14C 0043C024 */ and $t8, $v0, $v1
/* 08ED50 8008E150 1078001F */ beq $v1, $t8, .L8008E1D0
/* 08ED54 8008E154 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd
/* 08ED58 8008E158 848800AE */ lh $t0, 0xae($a0)
/* 08ED5C 8008E15C 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff
/* 08ED60 8008E160 0041C824 */ and $t9, $v0, $at
/* 08ED64 8008E164 000E2E00 */ sll $a1, $t6, 0x18
/* 08ED68 8008E168 AC9900BC */ sw $t9, 0xbc($a0)
/* 08ED6C 8008E16C A48000A8 */ sh $zero, 0xa8($a0)
/* 08ED70 8008E170 AC80007C */ sw $zero, 0x7c($a0)
/* 08ED74 8008E174 A48000C0 */ sh $zero, 0xc0($a0)
/* 08ED78 8008E178 00054E03 */ sra $t1, $a1, 0x18
/* 08ED7C 8008E17C A488002E */ sh $t0, 0x2e($a0)
/* 08ED80 8008E180 A3AE0027 */ sb $t6, 0x27($sp)
/* 08ED84 8008E184 0C0238F0 */ jal func_8008E3C0
/* 08ED88 8008E188 01202825 */ move $a1, $t1
/* 08ED8C 8008E18C 83A60027 */ lb $a2, 0x27($sp)
/* 08ED90 8008E190 3C0B8016 */ lui $t3, %hi(D_80165190) # $t3, 0x8016
/* 08ED94 8008E194 256B5190 */ addiu $t3, %lo(D_80165190) # addiu $t3, $t3, 0x5190
/* 08ED98 8008E198 00065040 */ sll $t2, $a2, 1
/* 08ED9C 8008E19C 24030001 */ li $v1, 1
/* 08EDA0 8008E1A0 014B1021 */ addu $v0, $t2, $t3
/* 08EDA4 8008E1A4 00062E00 */ sll $a1, $a2, 0x18
/* 08EDA8 8008E1A8 00056603 */ sra $t4, $a1, 0x18
/* 08EDAC 8008E1AC A4430000 */ sh $v1, ($v0)
/* 08EDB0 8008E1B0 A4430010 */ sh $v1, 0x10($v0)
/* 08EDB4 8008E1B4 A4430020 */ sh $v1, 0x20($v0)
/* 08EDB8 8008E1B8 A4430030 */ sh $v1, 0x30($v0)
/* 08EDBC 8008E1BC 01802825 */ move $a1, $t4
/* 08EDC0 8008E1C0 0C0236AF */ jal func_8008DABC
/* 08EDC4 8008E1C4 02002025 */ move $a0, $s0
/* 08EDC8 8008E1C8 10000079 */ b .L8008E3B0
/* 08EDCC 8008E1CC 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E1D0:
/* 08EDD0 8008E1D0 3C030002 */ lui $v1, 2
/* 08EDD4 8008E1D4 00436824 */ and $t5, $v0, $v1
/* 08EDD8 8008E1D8 146D002D */ bne $v1, $t5, .L8008E290
/* 08EDDC 8008E1DC 00062040 */ sll $a0, $a2, 1
/* 08EDE0 8008E1E0 860E002E */ lh $t6, 0x2e($s0)
/* 08EDE4 8008E1E4 3C188019 */ lui $t8, %hi(D_8018D920) # $t8, 0x8019
/* 08EDE8 8008E1E8 2718D920 */ addiu $t8, %lo(D_8018D920) # addiu $t8, $t8, -0x26e0
/* 08EDEC 8008E1EC 25CFFA50 */ addiu $t7, $t6, -0x5b0
/* 08EDF0 8008E1F0 A60F002E */ sh $t7, 0x2e($s0)
/* 08EDF4 8008E1F4 00981021 */ addu $v0, $a0, $t8
/* 08EDF8 8008E1F8 84590000 */ lh $t9, ($v0)
/* 08EDFC 8008E1FC 240105B0 */ li $at, 1456
/* 08EE00 8008E200 3C053F80 */ lui $a1, 0x3f80
/* 08EE04 8008E204 2728FA50 */ addiu $t0, $t9, -0x5b0
/* 08EE08 8008E208 3103FFFF */ andi $v1, $t0, 0xffff
/* 08EE0C 8008E20C 0061001A */ div $zero, $v1, $at
/* 08EE10 8008E210 00004812 */ mflo $t1
/* 08EE14 8008E214 00095400 */ sll $t2, $t1, 0x10
/* 08EE18 8008E218 000A5C03 */ sra $t3, $t2, 0x10
/* 08EE1C 8008E21C 15600018 */ bnez $t3, .L8008E280
/* 08EE20 8008E220 A4480000 */ sh $t0, ($v0)
/* 08EE24 8008E224 860C00B2 */ lh $t4, 0xb2($s0)
/* 08EE28 8008E228 3C01FFFD */ lui $at, (0xFFFDFFFF >> 16) # lui $at, 0xfffd
/* 08EE2C 8008E22C 3C088016 */ lui $t0, %hi(D_80165190) # $t0, 0x8016
/* 08EE30 8008E230 258DFFFF */ addiu $t5, $t4, -1
/* 08EE34 8008E234 A60D00B2 */ sh $t5, 0xb2($s0)
/* 08EE38 8008E238 860E00B2 */ lh $t6, 0xb2($s0)
/* 08EE3C 8008E23C 24030001 */ li $v1, 1
/* 08EE40 8008E240 3421FFFF */ ori $at, (0xFFFDFFFF & 0xFFFF) # ori $at, $at, 0xffff
/* 08EE44 8008E244 1DC0000E */ bgtz $t6, .L8008E280
/* 08EE48 8008E248 25085190 */ addiu $t0, %lo(D_80165190) # addiu $t0, $t0, 0x5190
/* 08EE4C 8008E24C 8E0F00BC */ lw $t7, 0xbc($s0)
/* 08EE50 8008E250 861900AE */ lh $t9, 0xae($s0)
/* 08EE54 8008E254 A60000A8 */ sh $zero, 0xa8($s0)
/* 08EE58 8008E258 01E1C024 */ and $t8, $t7, $at
/* 08EE5C 8008E25C AE1800BC */ sw $t8, 0xbc($s0)
/* 08EE60 8008E260 AE00007C */ sw $zero, 0x7c($s0)
/* 08EE64 8008E264 A60000C0 */ sh $zero, 0xc0($s0)
/* 08EE68 8008E268 00881021 */ addu $v0, $a0, $t0
/* 08EE6C 8008E26C A619002E */ sh $t9, 0x2e($s0)
/* 08EE70 8008E270 A4430000 */ sh $v1, ($v0)
/* 08EE74 8008E274 A4430010 */ sh $v1, 0x10($v0)
/* 08EE78 8008E278 A4430020 */ sh $v1, 0x20($v0)
/* 08EE7C 8008E27C A4430030 */ sh $v1, 0x30($v0)
.L8008E280:
/* 08EE80 8008E280 0C00C7D2 */ jal func_80031F48
/* 08EE84 8008E284 02002025 */ move $a0, $s0
/* 08EE88 8008E288 10000049 */ b .L8008E3B0
/* 08EE8C 8008E28C 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E290:
/* 08EE90 8008E290 860900B0 */ lh $t1, 0xb0($s0)
/* 08EE94 8008E294 C604008C */ lwc1 $f4, 0x8c($s0)
/* 08EE98 8008E298 3C01800F */ lui $at, %hi(D_800EF590)
/* 08EE9C 8008E29C 252A0001 */ addiu $t2, $t1, 1
/* 08EEA0 8008E2A0 A60A00B0 */ sh $t2, 0xb0($s0)
/* 08EEA4 8008E2A4 D428F590 */ ldc1 $f8, %lo(D_800EF590)($at)
/* 08EEA8 8008E2A8 460021A1 */ cvt.d.s $f6, $f4
/* 08EEAC 8008E2AC 860200B0 */ lh $v0, 0xb0($s0)
/* 08EEB0 8008E2B0 46283282 */ mul.d $f10, $f6, $f8
/* 08EEB4 8008E2B4 24030001 */ li $v1, 1
/* 08EEB8 8008E2B8 46205420 */ cvt.s.d $f16, $f10
/* 08EEBC 8008E2BC 1462000F */ bne $v1, $v0, .L8008E2FC
/* 08EEC0 8008E2C0 E610008C */ swc1 $f16, 0x8c($s0)
/* 08EEC4 8008E2C4 960B0000 */ lhu $t3, ($s0)
/* 08EEC8 8008E2C8 30C400FF */ andi $a0, $a2, 0xff
/* 08EECC 8008E2CC 3C012900 */ lui $at, (0x29008005 >> 16) # lui $at, 0x2900
/* 08EED0 8008E2D0 316C4000 */ andi $t4, $t3, 0x4000
/* 08EED4 8008E2D4 11800009 */ beqz $t4, .L8008E2FC
/* 08EED8 8008E2D8 00000000 */ nop
/* 08EEDC 8008E2DC 96050254 */ lhu $a1, 0x254($s0)
/* 08EEE0 8008E2E0 34218005 */ ori $at, (0x29008005 & 0xFFFF) # ori $at, $at, 0x8005
/* 08EEE4 8008E2E4 A3A60027 */ sb $a2, 0x27($sp)
/* 08EEE8 8008E2E8 00056900 */ sll $t5, $a1, 4
/* 08EEEC 8008E2EC 0C03243D */ jal func_800C90F4
/* 08EEF0 8008E2F0 01A12821 */ addu $a1, $t5, $at
/* 08EEF4 8008E2F4 83A60027 */ lb $a2, 0x27($sp)
/* 08EEF8 8008E2F8 860200B0 */ lh $v0, 0xb0($s0)
.L8008E2FC:
/* 08EEFC 8008E2FC 0440001A */ bltz $v0, .L8008E368
/* 08EF00 8008E300 284101CC */ slti $at, $v0, 0x1cc
/* 08EF04 8008E304 10200018 */ beqz $at, .L8008E368
/* 08EF08 8008E308 26040224 */ addiu $a0, $s0, 0x224
/* 08EF0C 8008E30C 3C053F33 */ lui $a1, (0x3F333333 >> 16) # lui $a1, 0x3f33
/* 08EF10 8008E310 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc
/* 08EF14 8008E314 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd
/* 08EF18 8008E318 0C008973 */ jal move_f32_towards
/* 08EF1C 8008E31C 34A53333 */ ori $a1, (0x3F333333 & 0xFFFF) # ori $a1, $a1, 0x3333
/* 08EF20 8008E320 960E0254 */ lhu $t6, 0x254($s0)
/* 08EF24 8008E324 3C01800E */ lui $at, %hi(gKartBoundingBoxSizeTable)
/* 08EF28 8008E328 3C063DCC */ lui $a2, (0x3DCCCCCD >> 16) # lui $a2, 0x3dcc
/* 08EF2C 8008E32C 000E7880 */ sll $t7, $t6, 2
/* 08EF30 8008E330 002F0821 */ addu $at, $at, $t7
/* 08EF34 8008E334 C43226B0 */ lwc1 $f18, %lo(gKartBoundingBoxSizeTable)($at)
/* 08EF38 8008E338 3C01800F */ lui $at, %hi(D_800EF598)
/* 08EF3C 8008E33C D426F598 */ ldc1 $f6, %lo(D_800EF598)($at)
/* 08EF40 8008E340 46009121 */ cvt.d.s $f4, $f18
/* 08EF44 8008E344 34C6CCCD */ ori $a2, (0x3DCCCCCD & 0xFFFF) # ori $a2, $a2, 0xcccd
/* 08EF48 8008E348 46262202 */ mul.d $f8, $f4, $f6
/* 08EF4C 8008E34C 26040070 */ addiu $a0, $s0, 0x70
/* 08EF50 8008E350 462042A0 */ cvt.s.d $f10, $f8
/* 08EF54 8008E354 44055000 */ mfc1 $a1, $f10
/* 08EF58 8008E358 0C008973 */ jal move_f32_towards
/* 08EF5C 8008E35C 00000000 */ nop
/* 08EF60 8008E360 10000013 */ b .L8008E3B0
/* 08EF64 8008E364 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E368:
/* 08EF68 8008E368 00062E00 */ sll $a1, $a2, 0x18
/* 08EF6C 8008E36C 0005C603 */ sra $t8, $a1, 0x18
/* 08EF70 8008E370 03002825 */ move $a1, $t8
/* 08EF74 8008E374 02002025 */ move $a0, $s0
/* 08EF78 8008E378 0C0238F0 */ jal func_8008E3C0
/* 08EF7C 8008E37C A3A60027 */ sb $a2, 0x27($sp)
/* 08EF80 8008E380 96190000 */ lhu $t9, ($s0)
/* 08EF84 8008E384 83A60027 */ lb $a2, 0x27($sp)
/* 08EF88 8008E388 33284000 */ andi $t0, $t9, 0x4000
/* 08EF8C 8008E38C 11000007 */ beqz $t0, .L8008E3AC
/* 08EF90 8008E390 30C400FF */ andi $a0, $a2, 0xff
/* 08EF94 8008E394 96050254 */ lhu $a1, 0x254($s0)
/* 08EF98 8008E398 3C012900 */ lui $at, (0x29008008 >> 16) # lui $at, 0x2900
/* 08EF9C 8008E39C 34218008 */ ori $at, (0x29008008 & 0xFFFF) # ori $at, $at, 0x8008
/* 08EFA0 8008E3A0 00054900 */ sll $t1, $a1, 4
/* 08EFA4 8008E3A4 0C03243D */ jal func_800C90F4
/* 08EFA8 8008E3A8 01212821 */ addu $a1, $t1, $at
.L8008E3AC:
/* 08EFAC 8008E3AC 8FBF001C */ lw $ra, 0x1c($sp)
.L8008E3B0:
/* 08EFB0 8008E3B0 8FB00018 */ lw $s0, 0x18($sp)
/* 08EFB4 8008E3B4 27BD0020 */ addiu $sp, $sp, 0x20
/* 08EFB8 8008E3B8 03E00008 */ jr $ra
/* 08EFBC 8008E3BC 00000000 */ nop
@@ -1,33 +0,0 @@
glabel func_802B09C0
/* 119FD0 802B09C0 AFA40000 */ sw $a0, ($sp)
/* 119FD4 802B09C4 00047400 */ sll $t6, $a0, 0x10
/* 119FD8 802B09C8 000E2403 */ sra $a0, $t6, 0x10
/* 119FDC 802B09CC 2401FFFF */ li $at, -1
/* 119FE0 802B09D0 14810003 */ bne $a0, $at, .L802B09E0
/* 119FE4 802B09D4 0004C0C0 */ sll $t8, $a0, 3
/* 119FE8 802B09D8 03E00008 */ jr $ra
/* 119FEC 802B09DC 00001025 */ move $v0, $zero
.L802B09E0:
/* 119FF0 802B09E0 0304C023 */ subu $t8, $t8, $a0
/* 119FF4 802B09E4 0018C100 */ sll $t8, $t8, 4
/* 119FF8 802B09E8 3C028016 */ lui $v0, %hi(D_8015F9BE) # 0x8016
/* 119FFC 802B09EC 00581021 */ addu $v0, $v0, $t8
/* 11A000 802B09F0 8442F9BE */ lh $v0, %lo(D_8015F9BE)($v0)
/* 11A004 802B09F4 24010002 */ li $at, 2
/* 11A008 802B09F8 54410004 */ bnel $v0, $at, .L802B0A0C
/* 11A00C 802B09FC 24010003 */ li $at, 3
/* 11A010 802B0A00 03E00008 */ jr $ra
/* 11A014 802B0A04 24020001 */ li $v0, 1
/* 11A018 802B0A08 24010003 */ li $at, 3
.L802B0A0C:
/* 11A01C 802B0A0C 54410004 */ bnel $v0, $at, .L802B0A20
/* 11A020 802B0A10 00001025 */ move $v0, $zero
/* 11A024 802B0A14 03E00008 */ jr $ra
/* 11A028 802B0A18 24020001 */ li $v0, 1
/* 11A02C 802B0A1C 00001025 */ move $v0, $zero
.L802B0A20:
/* 11A030 802B0A20 03E00008 */ jr $ra
/* 11A034 802B0A24 00000000 */ nop
+78 -23
View File
@@ -6,31 +6,20 @@
// This keeps the other files cleaner.
struct piranha_plant {
/* 0x00 */ s16 unk0; // 0xC, 0xD, or 0x2B
#ifdef AVOID_UB
/* 0x02 */ u16 unk2;
#else
s16 unk2; // bitflag
#endif
/* 0x04 */ s16 unk4; // Timer?
/* 0x06 */ s16 unk6; // 1
/* 0x08 */ s16 unk8;
/* 0x0A */ s16 unkA;
/* 0x0C */ f32 unkC;
/* 0x10 */ Vec3s unk10; // Actor rotation
/* 0x18 */ s32 unk18;
/* 0x1C */ f32 unk1C;
/* 0x20 */ s16 unk20;
/* 0x22 */ s16 unk22;
/* 0x24 */ s16 unk24;
/* 0x26 */ s16 unk26;
/* 0x28 */ s16 unk28;
/* 0x2A */ s16 unk2A;
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ Vec4s visibilityStates; // A per-camera visibilty state tracker
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ Vec4s unk10;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec4s timers; // A per-camera timer. Might be more appropriate to call this state
/* 0x2C */ f32 unk_02C;
/* 0x30 */ UnkActorInner unk30;
};
struct triple_shell_parent {
/* 0x00 */ s16 type;
/* 0x02 */ s16 unk_02;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 shellsAvailable;
/* 0x06 */ s16 state;
/* 0x08 */ f32 unk_08;
@@ -46,13 +35,13 @@ struct triple_shell_parent {
struct shell_actor {
/* 0x00 */ s16 type;
/* 0x02 */ s16 unk_02;
/* 0x02 */ s16 flags;
// Index in D_8015F9B8 for the parent actor of this shell
// Seems to pull double duty as a timer
/* 0x04 */ s16 parentIndex;
/* 0x06 */ s16 state;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ s16 rotVelocity; // Change in rotAngle on a per-update basis
/* 0x12 */ s16 rotAngle; // Angle of rotation around player (or parent?), not the rotation of the shell itself
/* 0x14 */ s16 playerId; // Id of the player that "owns" the shell
@@ -62,6 +51,72 @@ struct shell_actor {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct item_box {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 someTimer;
/* 0x06 */ s16 state;
/* 0x08 */ f32 resetDistance; // Value added to the Y position when box is touched. Expected to be negative
// Distance at which a player can activate the item box
// Named "bounding box" to match the name used for the "size" of a kart
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ Vec3s rot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ f32 origY; // Original Y position. Basically the Y position the box will reset to after being touched
/* 0x28 */ f32 unk_028;
/* 0x2C */ f32 unk_02C;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct fake_item_box {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 someTimer;
/* 0x06 */ s16 state;
/* 0x08 */ f32 sizeScaling; // Controls the size of the box
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ Vec3s rot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ f32 playerId;
/* 0x28 */ f32 targetY;
/* 0x2C */ f32 unk_02C;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct banana_bunch_parent {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 state;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ s16 playerId; // Player that own the bananas
/* 0x12 */ s16 bananaIndices[5]; // Indices in D_8015F9B8 for the bananas owned by this parent
/* 0x1C */ s16 bananasAvailable;
/* 0x1E */ s16 unk_1E;
/* 0x20 */ f32 unk_20[4];
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct banana_actor {
/* 0x00 */ s16 type;
/* 0x02 */ s16 flags;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 state;
/* 0x08 */ s16 parentIndex;
/* 0x0A */ s16 bananaId; // ? Appears to indiciate which banana of the bunch this one is
/* 0x0C */ f32 boundingBoxSize;
/* 0x10 */ s16 playerId; // Player that owns this particular banana
/* 0x12 */ s16 elderIndex; // Index of the next-oldest banana in the bunch
/* 0x14 */ s16 youngerIndex; // Index of the next-youngest banana in the bunch. -1 if this banana is the youngest
/* 0x16 */ s16 unk_16; // Index of the next-youngest banana in the bunch. -1 if this banana is the youngest
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
struct Actor {
/* 0x00 */ s16 unk0; // 0xC, 0xD, or 0x2B
#ifdef AVOID_UB
+1 -1
View File
@@ -297,7 +297,7 @@ typedef struct {
/* 0x0064 */ f32 unk_064;
/* 0x0068 */ f32 unk_068;
/* 0x006C */ f32 unk_06C;
/* 0x0070 */ f32 unk_070;
/* 0x0070 */ f32 boundingBoxSize;
/* 0x0074 */ f32 unk_074;
/* 0x0078 */ s16 unk_078;
/* 0x007A */ s16 unk_07A;
+1 -1
View File
@@ -35,7 +35,7 @@ extern f32 gKartFrictionTable[8];
extern f32 gKartGravityTable[8];
extern f32 D_800E2670[8];
extern f32 gKartTopSpeedTable[8];
extern f32 gKartBoundingBoxTable[8];
extern f32 gKartBoundingBoxSizeTable[8];
extern f32 D_800E26D0[15];
extern f32 D_800E270C[15];
+6 -6
View File
@@ -1119,7 +1119,7 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) {
sp38 = temp_f0;
sp94 = temp_f2;
sp40 = temp_f2;
sp90 = -player->unk_070;
sp90 = -player->boundingBoxSize;
func_802B63B8(sp48, temp_a0, &sp5C);
sp80 = player->boundingBoxCorners[0].cornerX;
sp84 = player->boundingBoxCorners[0].cornerY;
@@ -1135,7 +1135,7 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) {
sp34 = temp_f14;
sp28 = temp_f2_2;
sp94 = sp40;
sp90 = -player->unk_070;
sp90 = -player->boundingBoxSize;
func_802B63B8(sp48, (bitwise f32 *) temp_f14, temp_a0_2, &sp5C);
sp80 = player->boundingBoxCorners[1].cornerX;
sp84 = player->boundingBoxCorners[1].cornerY;
@@ -1149,7 +1149,7 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) {
sp8C = (f32) (sp38 - 2.6);
sp94 = temp_f12;
sp40 = temp_f12;
sp90 = -player->unk_070;
sp90 = -player->boundingBoxSize;
func_802B63B8(temp_f12, temp_a0_3, &sp5C);
sp80 = player->boundingBoxCorners[2].cornerX;
sp84 = player->boundingBoxCorners[2].cornerY;
@@ -1161,7 +1161,7 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) {
temp_a0_4 = &sp8C;
sp8C = (f32) (sp28 + 2.6);
sp94 = sp40;
sp90 = -player->unk_070;
sp90 = -player->boundingBoxSize;
func_802B63B8((bitwise f32) temp_a0_4, &sp5C);
sp80 = player->boundingBoxCorners[3].cornerX;
sp84 = player->boundingBoxCorners[3].cornerY;
@@ -3228,7 +3228,7 @@ void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) {
spF8 = temp_f4;
spF8 = temp_f8 - D_800ED830;
}
func_802AD950(&player->unk_110, player->unk_070, spFC, spF8, spF4, player->rotX, player->rotY, player->rotZ);
func_802AD950(&player->unk_110, player->boundingBoxSize, spFC, spF8, spF4, player->rotX, player->rotY, player->rotZ);
player->unk_058 = 0.0f;
player->unk_060 = 0.0f;
player->unk_05C = 1.0f;
@@ -3404,7 +3404,7 @@ void func_8002E4C4(Player *player) {
player->kartHopJerk = 0.0f;
player->kartHopAcceleration = 0.0f;
player->kartHopVelocity = 0.0f;
player->pos[1] = func_802AE1C0(player->pos[0], D_80164510[player_index] + 10.0f, player->pos[2]) + player->unk_070;
player->pos[1] = func_802AE1C0(player->pos[0], D_80164510[player_index] + 10.0f, player->pos[2]) + player->boundingBoxSize;
if (((player->pos[1] - D_80164510[player_index]) > 1200.0f) || ((player->pos[1] - D_80164510[player_index]) < -1200.0f)) {
player->pos[1] = player->rotY;
}
+2 -2
View File
@@ -21,7 +21,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4,
player->characterId = arg6;
player->unk_0B6 = 0;
player->unk_0FC = gKartFrictionTable[player->characterId];
player->unk_070 = gKartBoundingBoxTable[player->characterId];
player->boundingBoxSize = gKartBoundingBoxSizeTable[player->characterId];
player->unk_100 = gKartGravityTable[player->characterId];
switch (gModeSelection) {
@@ -50,7 +50,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4,
}
player->pos[0] = arg2;
ret = func_802AE1C0(arg2, arg4 + 50.0f, arg3) + player->unk_070;
ret = func_802AE1C0(arg2, arg4 + 50.0f, arg3) + player->boundingBoxSize;
player->pos[2] = arg3;
player->pos[1] = ret;
player->rotX = arg2;
+4 -4
View File
@@ -4146,13 +4146,13 @@ void func_8005F90C(Player *player, s16 arg1, s32 arg2, s32 arg3) {
phi_v0 = (s32) player->boundingBoxCorners[2].surfaceType;
phi_f12 = player->pos[2];
phi_f0 = player->pos[0];
phi_f2 = player->pos[1] - player->unk_070;
phi_f2 = player->pos[1] - player->boundingBoxSize;
phi_t1 = 1;
} else {
phi_v0 = (s32) player->boundingBoxCorners[3].surfaceType;
phi_f12 = player->pos[2];
phi_f0 = player->pos[0];
phi_f2 = player->pos[1] - player->unk_070;
phi_f2 = player->pos[1] - player->boundingBoxSize;
}
switch (phi_v0) {
case 2:
@@ -5421,7 +5421,7 @@ void func_80062AA8(Player* arg0, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) {
arg0->unk_258[20 + arg3].unk_012 = 5;
arg0->unk_258[20 + arg3].unk_00C = D_800EE60C;
arg0->unk_258[20 + arg3].unk_01E = 0;
arg0->unk_258[20 + arg3].unk_000[1] = (arg0->pos[1] + arg0->unk_070) - 2.5;
arg0->unk_258[20 + arg3].unk_000[1] = (arg0->pos[1] + arg0->boundingBoxSize) - 2.5;
}
void func_80062B18(f32 *arg0, f32 *arg1, f32 *arg2, f32 arg3, f32 arg4, f32 arg5, u16 arg6, u16 arg7) {
@@ -5850,7 +5850,7 @@ void func_80064184(Player* arg0, s16 arg1, s8 arg2, UNUSED s8 arg3) {
arg0->unk_258[arg1].unk_000[2] = arg0->pos[2] + sp3C;
arg0->unk_258[arg1].unk_000[1] = arg0->pos[1] + sp40;
++arg0->unk_258[arg1].unk_01E;
if ((arg0->unk_258[arg1].unk_01E == 12) || (D_801652A0[arg2] <= (arg0->pos[1] - arg0->unk_070))) {
if ((arg0->unk_258[arg1].unk_01E == 12) || (D_801652A0[arg2] <= (arg0->pos[1] - arg0->boundingBoxSize))) {
arg0->unk_258[arg1].unk_01C = 0;
arg0->unk_258[arg1].unk_01E = 0;
arg0->unk_258[arg1].unk_012 = 0;
+5 -5
View File
@@ -940,7 +940,7 @@ void func_8008DC08(Player* player, s8 arg1) {
player->unk_DB6 = 0;
player->unk_0BC |= 0x08000000;
player->unk_224 = 1.0f;
player->unk_070 = gKartBoundingBoxTable[player->characterId];
player->boundingBoxSize = gKartBoundingBoxSizeTable[player->characterId];
D_80165190[0][arg1] = 1;
D_80165190[1][arg1] = 1;
D_80165190[2][arg1] = 1;
@@ -995,7 +995,7 @@ void func_8008DF98(Player* player, s8 arg1) {
? func_800C90F4(s32, s32, s8); /* extern */
extern ? D_80165190;
extern ? D_8018D920;
extern ? gKartBoundingBoxTable;
extern ? gKartBoundingBoxSizeTable;
void func_8008E118(void *arg0, s8 arg1) {
s16 *temp_v0_3;
@@ -1061,7 +1061,7 @@ void func_8008E118(void *arg0, s8 arg1) {
}
if ((arg0->unkB0 >= 0) && (arg0->unkB0 < 0x1CC)) {
move_f32_towards(arg0 + 0x224, 0.7f, 0x3DCCCCCD);
move_f32_towards(arg0 + 0x70, *(&gKartBoundingBoxTable + (arg0->unk254 * 4)) * 0.9, 0x3DCCCCCD);
move_f32_towards(arg0 + 0x70, *(&gKartBoundingBoxSizeTable + (arg0->unk254 * 4)) * 0.9, 0x3DCCCCCD);
return;
}
arg1 = phi_a2;
@@ -1076,11 +1076,11 @@ GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008E118.s")
void func_8008E3C0(Player* player, UNUSED s8 arg1) {
move_f32_towards(&player->unk_224, 1.0f, 0.1f);
move_f32_towards(&player->unk_070, gKartBoundingBoxTable[player->characterId], 0.1f);
move_f32_towards(&player->boundingBoxSize, gKartBoundingBoxSizeTable[player->characterId], 0.1f);
player->unk_0BC &= ~0x40000000;
player->unk_224 = 1.0f;
player->unk_070 = gKartBoundingBoxTable[player->characterId];
player->boundingBoxSize = gKartBoundingBoxSizeTable[player->characterId];
player->unk_DC4 = 3.0f;
player->unk_DB6 = 0;
player->unk_0BC |= 0x08000000;
+163 -169
View File
@@ -894,48 +894,46 @@ void update_obj_train_car2(struct Actor *arg0) {
arg0->unk6 -= 0x666;
}
void update_obj_piranha_plant(void *data) {
struct piranha_plant *arg0 = (struct piranha_plant *) data;
s16 temp_v0 = arg0->unk2;
if ((temp_v0 & 0x800) == 0) {
if ((temp_v0 & 0x400) != 0) {
arg0->unk1C += 4.0f;
if (arg0->unk1C > 800.0f) {
arg0->unk2 |= 0x800;
void update_obj_piranha_plant(struct piranha_plant *arg0) {
if ((arg0->flags & 0x800) == 0) {
if ((arg0->flags & 0x400) != 0) {
arg0->pos[1] += 4.0f;
if (arg0->pos[1] > 800.0f) {
arg0->flags |= 0x800;
}
} else {
if (arg0->unk4 == 1) {
arg0->unk24++;
if (arg0->unk24 > 60) {
arg0->unk24 = 6;
// This has to be an unrolled loop
if (arg0->visibilityStates[0] == 1) {
arg0->timers[0]++;
if (arg0->timers[0] > 60) {
arg0->timers[0] = 6;
}
} else {
arg0->unk24 = 0;
arg0->timers[0] = 0;
}
if (arg0->unk6 == 1) {
arg0->unk26++;
if (arg0->unk26 > 60) {
arg0->unk26 = 6;
if (arg0->visibilityStates[1] == 1) {
arg0->timers[1]++;
if (arg0->timers[1] > 60) {
arg0->timers[1] = 6;
}
} else {
arg0->unk26 = 0;
arg0->timers[1] = 0;
}
if (arg0->unk8 == 1) {
arg0->unk28++;
if (arg0->unk28 > 60) {
arg0->unk28 = 6;
if (arg0->visibilityStates[2] == 1) {
arg0->timers[2]++;
if (arg0->timers[2] > 60) {
arg0->timers[2] = 6;
}
} else {
arg0->unk28 = 0;
arg0->timers[2] = 0;
}
if (arg0->unkA == 1) {
arg0->unk2A++;
if (arg0->unk2A > 60) {
arg0->unk2A = 6;
if (arg0->visibilityStates[3] == 1) {
arg0->timers[3]++;
if (arg0->timers[3] > 60) {
arg0->timers[3] = 6;
}
} else {
arg0->unk2A = 0;
arg0->timers[3] = 0;
}
}
}
@@ -2291,115 +2289,112 @@ GLOBAL_ASM("asm/non_matchings/code_actors/func_8029A23C.s")
#endif
#ifdef MIPS_TO_C
/*
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void func_80297230(void *, void *); // extern
void func_802972B8(void *, void *); // extern
void func_802979F8(void *, ?, void *); // extern
s32 func_802B4FF8(void *, ?, void *); // extern
f32 func_802B80D0(s32, u16, ?, f32, f32); // extern
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
? func_80297230(Camera *, struct shell_actor *); /* extern */
? func_802972B8(Camera *, struct shell_actor *); /* extern */
? func_802979F8(struct shell_actor *, ?, f32 (*)[4]); /* extern */
s32 func_802B4FF8(f32 (*)[4], ?, f32 (*)[4]); /* extern */
f32 func_802B80D0(f32 *, u16, ?, f32, f32); /* extern */
extern ? D_0D005338;
extern ? D_0D005368;
extern ? D_802B87E8;
extern f32 D_802B96AC;
extern f32 D_802B96B0;
extern ? D_80150130;
extern s32 D_802BA050;
extern s32 D_802BA054;
static ? D_802B87E8; /* unable to generate initializer */
static f32 D_802B96AC = 490000.0f;
static f32 D_802B96B0 = 40000.0f;
void func_8029A3AC(void *arg0, void *arg1, void *arg2) {
void func_8029A3AC(Camera *camera, Mat4 arg1, struct shell_actor *shell) {
u16 sp7C;
? sp58;
s32 sp54;
f32 sp50;
Gfx *temp_v0;
Gfx *temp_v0_2;
Gfx *temp_v0_3;
Gfx *temp_v0_4;
Gfx *temp_v0_5;
Gfx *temp_v0_6;
Gfx *temp_v0_7;
Gfx *temp_v0_8;
Gfx *temp_v0_9;
f32 temp_f0;
s32 temp_t3;
u16 temp_t8;
void *temp_v0;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
void *temp_v0_9;
s32 phi_t3;
sp58.unk0 = D_802B87E8.unk0;
sp58.unk4 = D_802B87E8.unk4;
sp58.unk8 = D_802B87E8.unk8;
sp58.unkC = D_802B87E8.unkC;
sp58.unk10 = D_802B87E8.unk10;
sp58.unk14 = D_802B87E8.unk14;
sp58.unk18 = D_802B87E8.unk18;
sp58.unk1C = D_802B87E8.unk1C;
temp_f0 = func_802B80D0(arg2 + 0x18, arg0->unk26, 0, (&D_80150130)[(arg0 - camera1) / 0xB8], D_802B96AC);
sp58.unk0 = (s32) D_802B87E8.unk0;
sp58.unk4 = (s32) D_802B87E8.unk4;
sp58.unk8 = (s32) D_802B87E8.unk8;
sp58.unkC = (s32) D_802B87E8.unkC;
sp58.unk10 = (s32) D_802B87E8.unk10;
sp58.unk14 = (s32) D_802B87E8.unk14;
sp58.unk18 = (s32) D_802B87E8.unk18;
sp58.unk1C = (u16) D_802B87E8.unk1C;
temp_f0 = func_802B80D0(shell->pos, (u16) camera->rotX2, 0, *(&D_80150130 + (((s32) (camera - camera1) / 184) * 4)), D_802B96AC);
if (temp_f0 < 0.0f) {
func_80297230(arg0, arg2);
func_80297230(camera, shell);
return;
}
sp50 = temp_f0;
func_802972B8(arg0, arg2);
func_802972B8(camera, shell);
if (temp_f0 < D_802B96B0) {
func_802979F8(arg2, 0x4059999A, arg1);
func_802979F8(shell, 0x4059999A, arg1);
}
if (arg2->unk0 == 0x2A) {
if (shell->type == 0x002A) {
phi_t3 = D_802BA054;
} else {
phi_t3 = D_802BA050;
}
temp_t8 = (arg2->unk10 / 0x1111) & 0xFFFF;
arg1->unk30 = arg2->unk18;
temp_t8 = ((s32) (u16) shell->rotVelocity / 4369) & 0xFFFF;
arg1->unk30 = (f32) shell->pos[0];
temp_t3 = phi_t3 + (sp + (temp_t8 * 2))->unk58;
arg1->unk34 = (arg2->unk1C - arg2->unkC) + 1.0f;
arg1->unk38 = arg2->unk20;
arg1->unk34 = (f32) ((shell->pos[1] - shell->boundingBoxSize) + 1.0f);
arg1->unk38 = (f32) shell->pos[2];
sp7C = temp_t8;
sp54 = temp_t3;
if (func_802B4FF8(arg1, 0, arg1) != 0) {
temp_v0 = gDisplayListHead;
gDisplayListHead = temp_v0 + 8;
temp_v0->unk0 = 0xFD500000;
temp_v0->unk4 = temp_t3 & 0x1FFFFFFF;
temp_v0->words.w0 = 0xFD500000;
temp_v0->words.w1 = temp_t3 & 0x1FFFFFFF;
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0xF5500000;
temp_v0_2->unk4 = 0x7080200;
temp_v0_2->words.w0 = 0xF5500000;
temp_v0_2->words.w1 = 0x07080200;
temp_v0_3 = gDisplayListHead;
gDisplayListHead = temp_v0_3 + 8;
temp_v0_3->unk4 = 0;
temp_v0_3->unk0 = 0xE6000000;
temp_v0_3->words.w1 = 0;
temp_v0_3->words.w0 = 0xE6000000;
temp_v0_4 = gDisplayListHead;
gDisplayListHead = temp_v0_4 + 8;
temp_v0_4->unk4 = 0x71FF200;
temp_v0_4->unk0 = 0xF3000000;
temp_v0_4->words.w1 = 0x071FF200;
temp_v0_4->words.w0 = 0xF3000000;
temp_v0_5 = gDisplayListHead;
gDisplayListHead = temp_v0_5 + 8;
temp_v0_5->unk4 = 0;
temp_v0_5->unk0 = 0xE7000000;
temp_v0_5->words.w1 = 0;
temp_v0_5->words.w0 = 0xE7000000;
temp_v0_6 = gDisplayListHead;
gDisplayListHead = temp_v0_6 + 8;
temp_v0_6->unk0 = 0xF5480800;
temp_v0_6->unk4 = 0x80200;
temp_v0_6->words.w0 = 0xF5480800;
temp_v0_6->words.w1 = 0x00080200;
temp_v0_7 = gDisplayListHead;
gDisplayListHead = temp_v0_7 + 8;
temp_v0_7->unk0 = 0xF2000000;
temp_v0_7->unk4 = 0x7C07C;
if (sp7C < 8) {
temp_v0_7->words.w0 = 0xF2000000;
temp_v0_7->words.w1 = 0x0007C07C;
if ((s32) sp7C < 8) {
temp_v0_8 = gDisplayListHead;
gDisplayListHead = temp_v0_8 + 8;
temp_v0_8->unk0 = 0x6000000;
temp_v0_8->unk4 = &D_0D005338;
temp_v0_8->words.w0 = 0x06000000;
temp_v0_8->words.w1 = (u32) &D_0D005338;
return;
}
temp_v0_9 = gDisplayListHead;
gDisplayListHead = temp_v0_9 + 8;
temp_v0_9->unk0 = 0x6000000;
temp_v0_9->unk4 = &D_0D005368;
// Duplicate return node #11. Try simplifying control flow for better match
temp_v0_9->words.w0 = 0x06000000;
temp_v0_9->words.w1 = (u32) &D_0D005368;
}
}
*/
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029A3AC.s")
#endif
@@ -4931,7 +4926,7 @@ s32 func_8029F408(Player *arg0, Player *arg1) {
if ((temp_a3->posY - arg1->posZ) < 0.0f) {
return 0;
}
if ((temp_a3->unk_070 + (bitwise f32) arg1->unk_00C) < temp_f2_2) {
if ((temp_a3->boundingBoxSize + (bitwise f32) arg1->unk_00C) < temp_f2_2) {
return 0;
}
if ((temp_a3->unk_000 & 0x4000) != 0) {
@@ -5148,7 +5143,7 @@ s32 func_8029FB80(Player *arg0, struct Actor *arg1) {
f32 temp_f16;
f32 temp_f2;
temp_f0 = arg0->unk_070 + arg1->unkC;
temp_f0 = arg0->boundingBoxSize + arg1->unkC;
temp_f2 = arg1->unk18[0] - arg0->pos[0];
if (temp_f0 < temp_f2) {
return 0;
@@ -5817,14 +5812,14 @@ void func_802A0E44(void) {
f32 func_802ABEAC(UnkActorInner*, Vec3f);
extern f32 D_802B99CC;
void func_802A1064(struct Actor *arg0) {
if (arg0 - &D_8015F9B8[0] > 100u) { return; }
if ((arg0->unk2 & 0x8000) == 0) { return; }
void func_802A1064(struct fake_item_box *fake_item_box) {
if (fake_item_box - (struct fake_item_box*)D_8015F9B8 > 100u) { return; }
if ((fake_item_box->flags & 0x8000) == 0) { return; }
if (arg0->unk0 == 13) {
arg0->unk6 = 1;
arg0->unk24[1] = func_802ABEAC(&arg0->unk30, arg0->unk18) + D_802B99CC;
arg0->unk4 = 100;
if (fake_item_box->type == 13) {
fake_item_box->state = 1;
fake_item_box->targetY = func_802ABEAC(&fake_item_box->unk30, fake_item_box->pos) + D_802B99CC;
fake_item_box->someTimer = 100;
}
}
@@ -5832,8 +5827,8 @@ extern f32 D_802B99D0;
extern f32 D_802B99D4;
void func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
void func_802B4E30(struct Actor*);
void update_obj_fake_item_box(struct Actor *arg0) {
u32 temp_v1 = arg0->unk24[0];
void update_obj_fake_item_box(struct fake_item_box *fake_item_box) {
u32 temp_v1 = fake_item_box->playerId;
Player *temp_v0_4 = &gPlayers[temp_v1];
struct Controller *temp_v1_3;
@@ -5844,75 +5839,75 @@ void update_obj_fake_item_box(struct Actor *arg0) {
f32 temp_f18;
s32 pad2[3];
switch(arg0->unk6) {
switch(fake_item_box->state) {
case 0:
arg0->unkC = arg0->unk8 * 5.5f;
arg0->unk10[0] -= 0xB6;
arg0->unk10[1] += 0x16C;
arg0->unk10[2] -= 0xB6;
fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f;
fake_item_box->rot[0] -= 0xB6;
fake_item_box->rot[1] += 0x16C;
fake_item_box->rot[2] -= 0xB6;
temp_f14 = temp_v0_4->pos[0] - arg0->unk18[0];
temp_f16 = temp_v0_4->pos[1] - arg0->unk18[1];
temp_f18 = temp_v0_4->pos[2] - arg0->unk18[2];
temp_f14 = temp_v0_4->pos[0] - fake_item_box->pos[0];
temp_f16 = temp_v0_4->pos[1] - fake_item_box->pos[1];
temp_f18 = temp_v0_4->pos[2] - fake_item_box->pos[2];
temp_f2_2 = sqrtf((temp_f14 * temp_f14) + (temp_f16 * temp_f16) + (temp_f18 * temp_f18)) / 10.0f;
temp_f14 /= temp_f2_2;
temp_f16 /= temp_f2_2;
temp_f18 /= temp_f2_2;
arg0->unk18[0] = temp_v0_4->pos[0] - temp_f14;
arg0->unk18[1] = (temp_v0_4->pos[1] - temp_f16) - 1.0f;
arg0->unk18[2] = temp_v0_4->pos[2] - temp_f18;
func_802ADDC8(&arg0->unk30, arg0->unkC, arg0->unk18[0], arg0->unk18[1], arg0->unk18[2]);
func_802B4E30(arg0);
fake_item_box->pos[0] = temp_v0_4->pos[0] - temp_f14;
fake_item_box->pos[1] = (temp_v0_4->pos[1] - temp_f16) - 1.0f;
fake_item_box->pos[2] = temp_v0_4->pos[2] - temp_f18;
func_802ADDC8(&fake_item_box->unk30, fake_item_box->boundingBoxSize, fake_item_box->pos[0], fake_item_box->pos[1], fake_item_box->pos[2]);
func_802B4E30(fake_item_box);
temp_v1_3 = &gControllers[temp_v1];
if ((temp_v0_4->unk_000 & 0x4000) != 0) {
if ((temp_v1_3->buttonDepressed & Z_TRIG) != 0) {
temp_v1_3->buttonDepressed &= 0xDFFF;
func_802A1064(arg0);
func_802A1064(fake_item_box);
temp_v0_4->unk_00C &= 0xFFFBFFFF;
func_800C9060(((temp_v0_4 - gPlayerOne)) & 0xFF, 0x19008012);
}
}
break;
case 1:
if (arg0->unk8 < 1.0f) {
arg0->unk8 += D_802B99D0;
} else if (arg0->unk8 >= 1.0f) {
arg0->unk8 = 1.0f;
if (fake_item_box->sizeScaling < 1.0f) {
fake_item_box->sizeScaling += D_802B99D0;
} else if (fake_item_box->sizeScaling >= 1.0f) {
fake_item_box->sizeScaling = 1.0f;
}
arg0->unkC = arg0->unk8 * 5.5f;
if (arg0->unk24[1] <= arg0->unk18[1]) {
arg0->unk18[1] = arg0->unk24[1];
fake_item_box->boundingBoxSize = fake_item_box->sizeScaling * 5.5f;
if (fake_item_box->targetY <= fake_item_box->pos[1]) {
fake_item_box->pos[1] = fake_item_box->targetY;
} else {
arg0->unk18[1] += D_802B99D4;
fake_item_box->pos[1] += D_802B99D4;
}
if ((arg0->unk2 & 0x1000) != 0) {
if ((arg0->unk4 <= 0) || (arg0->unk4 >= 0x12D)) {
arg0->unk2 &= 0xEFFF;
arg0->unk4 = 0;
if ((fake_item_box->flags & 0x1000) != 0) {
if ((fake_item_box->someTimer <= 0) || (fake_item_box->someTimer >= 0x12D)) {
fake_item_box->flags &= 0xEFFF;
fake_item_box->someTimer = 0;
} else {
arg0->unk4--;
fake_item_box->someTimer--;
}
}
arg0->unk10[0] -= 0xB6;
arg0->unk10[1] += 0x16C;
arg0->unk10[2] -= 0xB6;
fake_item_box->rot[0] -= 0xB6;
fake_item_box->rot[1] += 0x16C;
fake_item_box->rot[2] -= 0xB6;
break;
case 2:
if ((arg0->unk4 >= 0x14) || (arg0->unk4 < 0)) {
func_8029E854(arg0);
if ((fake_item_box->someTimer >= 0x14) || (fake_item_box->someTimer < 0)) {
func_8029E854(fake_item_box);
} else {
arg0->unk4++;
arg0->unk10[0] += 0x444;
arg0->unk10[1] -= 0x2D8;
arg0->unk10[2] += 0x16C;
fake_item_box->someTimer++;
fake_item_box->rot[0] += 0x444;
fake_item_box->rot[1] -= 0x2D8;
fake_item_box->rot[2] += 0x16C;
}
break;
default:
func_8029E854(arg0);
func_8029E854(fake_item_box);
break;
}
}
@@ -5934,60 +5929,59 @@ void func_802A14BC(f32 arg0, f32 arg1, f32 arg2) {
}
}
void update_obj_item_box_hot_air_balloon(struct Actor *arg0) {
switch(arg0->unk6) {
void update_obj_item_box_hot_air_balloon(struct item_box *itemBox) {
switch(itemBox->state) {
case 5:
arg0->unk10[0] += 0xB6;
arg0->unk10[1] -= 0x16C;
arg0->unk10[2] += 0xB6;
itemBox->rot[0] += 0xB6;
itemBox->rot[1] -= 0x16C;
itemBox->rot[2] += 0xB6;
break;
case 3:
if (arg0->unk4 == 0x14) {
arg0->unk6 = 5;
arg0->unk2 = -0x4000;
return;
if (itemBox->someTimer == 0x14) {
itemBox->state = 5;
itemBox->flags = -0x4000;
} else {
itemBox->someTimer++;
itemBox->rot[0] += 0x444;
itemBox->rot[1] -= 0x2D8;
itemBox->rot[2] += 0x16C;
}
arg0->unk4++;
arg0->unk10[0] += 0x444;
arg0->unk10[1] -= 0x2D8;
arg0->unk10[2] += 0x16C;
break;
}
}
extern f32 D_802B99D8;
extern f32 D_802B99DC;
void update_obj_item_box(struct Actor *arg0) {
switch (arg0->unk6) {
void update_obj_item_box(struct item_box *itemBox) {
switch (itemBox->state) {
case 0:
arg0->unk6 = 1;
itemBox->state = 1;
break;
case 1:
if ((arg0->unk18[1] - arg0->unk24[0]) < D_802B99D8) {
arg0->unk18[1] += D_802B99DC;
if ((itemBox->pos[1] - itemBox->origY) < D_802B99D8) {
itemBox->pos[1] += D_802B99DC;
} else {
arg0->unk18[1] = arg0->unk24[0] + D_802B99D8;
arg0->unk6 = 2;
arg0->unk2 = 0xC000;
itemBox->pos[1] = itemBox->origY + D_802B99D8;
itemBox->state = 2;
itemBox->flags = 0xC000;
}
break;
case 2:
arg0->unk10[0] += 0xB6;
arg0->unk10[1] -= 0x16C;
arg0->unk10[2] += 0xB6;
itemBox->rot[0] += 0xB6;
itemBox->rot[1] -= 0x16C;
itemBox->rot[2] += 0xB6;
break;
case 3:
if (arg0->unk4 == 20) {
arg0->unk6 = 0;
arg0->unk18[1] = arg0->unk8 - 20.0f;
arg0->unk2 = 0xC000;
if (itemBox->someTimer == 20) {
itemBox->state = 0;
itemBox->pos[1] = itemBox->resetDistance - 20.0f;
itemBox->flags = 0xC000;
} else {
arg0->unk4++;
arg0->unk10[0] += 0x444;
arg0->unk10[1] -= 0x2D8;
arg0->unk10[2] += 0x16C;
itemBox->someTimer++;
itemBox->rot[0] += 0x444;
itemBox->rot[1] -= 0x2D8;
itemBox->rot[2] += 0x16C;
}
break;
}
+351 -356
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -93,7 +93,7 @@ f32 D_800E2670[] = {
f32 gKartTopSpeedTable[] = {
9.0, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0,
};
f32 gKartBoundingBoxTable[] = {
f32 gKartBoundingBoxSizeTable[] = {
5.5, 5.5, 5.5, 5.5, 5.5, 6.0, 5.5, 6.0,
};
+1 -1
View File
@@ -4475,7 +4475,7 @@ s32 func_802AFA34(Player *player, kartBoundingBoxCorner *corner, f32 cornerX, f3
sp104 = 0x447A0000;
sp108 = 0x447A0000;
sp10C = 0x447A0000;
temp_f20 = player->unk_070;
temp_f20 = player->boundingBoxSize;
spFE = 0x1388;
sp100 = 0x1388;
sp102 = 0x1388;