diff --git a/Makefile b/Makefile index cbb4683ca..47a07a616 100644 --- a/Makefile +++ b/Makefile @@ -495,7 +495,6 @@ $(BUILD_DIR)/src/os/_Litob.o: OPT_FLAGS := -O3 $(BUILD_DIR)/src/os/_Ldtob.o: OPT_FLAGS := -O3 $(BUILD_DIR)/src/os/osSyncPrintf.o: OPT_FLAGS := -O3 - #################### Compile course vertex to mio0 ##################### mushroom_cup := $(BUILD_DIR)/courses/mushroom_cup diff --git a/asm/non_matchings/code_8001F980/func_8001F9E4.s b/asm/non_matchings/code_8001F980/func_8001F9E4.s deleted file mode 100644 index a64b2b38e..000000000 --- a/asm/non_matchings/code_8001F980/func_8001F9E4.s +++ /dev/null @@ -1,77 +0,0 @@ -glabel func_8001F9E4 -/* 0205E4 8001F9E4 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0205E8 8001F9E8 AFBF001C */ sw $ra, 0x1c($sp) -/* 0205EC 8001F9EC AFB00018 */ sw $s0, 0x18($sp) -/* 0205F0 8001F9F0 00808025 */ move $s0, $a0 -/* 0205F4 8001F9F4 AFA5003C */ sw $a1, 0x3c($sp) -/* 0205F8 8001F9F8 0C009F40 */ jal get_player_index_for_player -/* 0205FC 8001F9FC AFA60040 */ sw $a2, 0x40($sp) -/* 020600 8001FA00 27A40030 */ addiu $a0, $sp, 0x30 -/* 020604 8001FA04 0C007E60 */ jal func_8001F980 -/* 020608 8001FA08 27A5002C */ addiu $a1, $sp, 0x2c -/* 02060C 8001FA0C 83A20043 */ lb $v0, 0x43($sp) -/* 020610 8001FA10 96180002 */ lhu $t8, 2($s0) -/* 020614 8001FA14 240F0002 */ li $t7, 2 -/* 020618 8001FA18 00027080 */ sll $t6, $v0, 2 -/* 02061C 8001FA1C 01CF1804 */ sllv $v1, $t7, $t6 -/* 020620 8001FA20 0060C827 */ not $t9, $v1 -/* 020624 8001FA24 240A0008 */ li $t2, 8 -/* 020628 8001FA28 01CA4004 */ sllv $t0, $t2, $t6 -/* 02062C 8001FA2C 03195824 */ and $t3, $t8, $t9 -/* 020630 8001FA30 01006027 */ not $t4, $t0 -/* 020634 8001FA34 A60B0002 */ sh $t3, 2($s0) -/* 020638 8001FA38 016C6824 */ and $t5, $t3, $t4 -/* 02063C 8001FA3C A60D0002 */ sh $t5, 2($s0) -/* 020640 8001FA40 3C198016 */ lui $t9, %hi(D_8016557A) # $t9, 0x8016 -/* 020644 8001FA44 3C0E8016 */ lui $t6, %hi(D_80165578) # $t6, 0x8016 -/* 020648 8001FA48 85CE5578 */ lh $t6, %lo(D_80165578)($t6) -/* 02064C 8001FA4C 8739557A */ lh $t9, %lo(D_8016557A)($t9) -/* 020650 8001FA50 8FA9002C */ lw $t1, 0x2c($sp) -/* 020654 8001FA54 8FAF0030 */ lw $t7, 0x30($sp) -/* 020658 8001FA58 AFA80020 */ sw $t0, 0x20($sp) -/* 02065C 8001FA5C 03295021 */ addu $t2, $t9, $t1 -/* 020660 8001FA60 01CFC021 */ addu $t8, $t6, $t7 -/* 020664 8001FA64 44982000 */ mtc1 $t8, $f4 -/* 020668 8001FA68 448A3000 */ mtc1 $t2, $f6 -/* 02066C 8001FA6C AFA30024 */ sw $v1, 0x24($sp) -/* 020670 8001FA70 46802120 */ cvt.s.w $f4, $f4 -/* 020674 8001FA74 8FA5003C */ lw $a1, 0x3c($sp) -/* 020678 8001FA78 02002025 */ move $a0, $s0 -/* 02067C 8001FA7C 468031A0 */ cvt.s.w $f6, $f6 -/* 020680 8001FA80 44062000 */ mfc1 $a2, $f4 -/* 020684 8001FA84 44073000 */ mfc1 $a3, $f6 -/* 020688 8001FA88 0C007EC3 */ jal func_8001FB0C -/* 02068C 8001FA8C 00000000 */ nop -/* 020690 8001FA90 24010001 */ li $at, 1 -/* 020694 8001FA94 14410004 */ bne $v0, $at, .L8001FAA8 -/* 020698 8001FA98 8FA30024 */ lw $v1, 0x24($sp) -/* 02069C 8001FA9C 960B0002 */ lhu $t3, 2($s0) -/* 0206A0 8001FAA0 01636025 */ or $t4, $t3, $v1 -/* 0206A4 8001FAA4 A60C0002 */ sh $t4, 2($s0) -.L8001FAA8: -/* 0206A8 8001FAA8 3C0D8016 */ lui $t5, %hi(D_80165580) # $t5, 0x8016 -/* 0206AC 8001FAAC 3C0E8016 */ lui $t6, %hi(D_80165582) # $t6, 0x8016 -/* 0206B0 8001FAB0 85CE5582 */ lh $t6, %lo(D_80165582)($t6) -/* 0206B4 8001FAB4 85AD5580 */ lh $t5, %lo(D_80165580)($t5) -/* 0206B8 8001FAB8 02002025 */ move $a0, $s0 -/* 0206BC 8001FABC 448E5000 */ mtc1 $t6, $f10 -/* 0206C0 8001FAC0 448D4000 */ mtc1 $t5, $f8 -/* 0206C4 8001FAC4 8FA5003C */ lw $a1, 0x3c($sp) -/* 0206C8 8001FAC8 468052A0 */ cvt.s.w $f10, $f10 -/* 0206CC 8001FACC 46804220 */ cvt.s.w $f8, $f8 -/* 0206D0 8001FAD0 44075000 */ mfc1 $a3, $f10 -/* 0206D4 8001FAD4 44064000 */ mfc1 $a2, $f8 -/* 0206D8 8001FAD8 0C007EC3 */ jal func_8001FB0C -/* 0206DC 8001FADC 00000000 */ nop -/* 0206E0 8001FAE0 24010001 */ li $at, 1 -/* 0206E4 8001FAE4 14410004 */ bne $v0, $at, .L8001FAF8 -/* 0206E8 8001FAE8 8FB80020 */ lw $t8, 0x20($sp) -/* 0206EC 8001FAEC 960F0002 */ lhu $t7, 2($s0) -/* 0206F0 8001FAF0 01F8C825 */ or $t9, $t7, $t8 -/* 0206F4 8001FAF4 A6190002 */ sh $t9, 2($s0) -.L8001FAF8: -/* 0206F8 8001FAF8 8FBF001C */ lw $ra, 0x1c($sp) -/* 0206FC 8001FAFC 8FB00018 */ lw $s0, 0x18($sp) -/* 020700 8001FB00 27BD0038 */ addiu $sp, $sp, 0x38 -/* 020704 8001FB04 03E00008 */ jr $ra -/* 020708 8001FB08 00000000 */ nop diff --git a/asm/non_matchings/code_8001F980/func_80020524.s b/asm/non_matchings/code_8001F980/func_80020524.s deleted file mode 100644 index cadc8e84d..000000000 --- a/asm/non_matchings/code_8001F980/func_80020524.s +++ /dev/null @@ -1,222 +0,0 @@ -glabel func_80020524 -/* 021124 80020524 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 021128 80020528 3C038016 */ lui $v1, %hi(D_80164AC0) # $v1, 0x8016 -/* 02112C 8002052C 84634AC0 */ lh $v1, %lo(D_80164AC0)($v1) -/* 021130 80020530 3C028016 */ lui $v0, %hi(D_80164AB0) # $v0, 0x8016 -/* 021134 80020534 84424AB0 */ lh $v0, %lo(D_80164AB0)($v0) -/* 021138 80020538 AFB3002C */ sw $s3, 0x2c($sp) -/* 02113C 8002053C 3C138016 */ lui $s3, %hi(D_801651D0) # $s3, 0x8016 -/* 021140 80020540 267351D0 */ addiu $s3, %lo(D_801651D0) # addiu $s3, $s3, 0x51d0 -/* 021144 80020544 0003C900 */ sll $t9, $v1, 4 -/* 021148 80020548 02794821 */ addu $t1, $s3, $t9 -/* 02114C 8002054C 00033600 */ sll $a2, $v1, 0x18 -/* 021150 80020550 00025040 */ sll $t2, $v0, 1 -/* 021154 80020554 AFBF0044 */ sw $ra, 0x44($sp) -/* 021158 80020558 AFBE0040 */ sw $fp, 0x40($sp) -/* 02115C 8002055C AFB7003C */ sw $s7, 0x3c($sp) -/* 021160 80020560 AFB60038 */ sw $s6, 0x38($sp) -/* 021164 80020564 AFB50034 */ sw $s5, 0x34($sp) -/* 021168 80020568 AFB40030 */ sw $s4, 0x30($sp) -/* 02116C 8002056C AFB20028 */ sw $s2, 0x28($sp) -/* 021170 80020570 AFB10024 */ sw $s1, 0x24($sp) -/* 021174 80020574 AFB00020 */ sw $s0, 0x20($sp) -/* 021178 80020578 012A5821 */ addu $t3, $t1, $t2 -/* 02117C 8002057C 00067E03 */ sra $t7, $a2, 0x18 -/* 021180 80020580 856C0000 */ lh $t4, ($t3) -/* 021184 80020584 000F3E00 */ sll $a3, $t7, 0x18 -/* 021188 80020588 00022E00 */ sll $a1, $v0, 0x18 -/* 02118C 8002058C 00057603 */ sra $t6, $a1, 0x18 -/* 021190 80020590 0007C603 */ sra $t8, $a3, 0x18 -/* 021194 80020594 3C048016 */ lui $a0, %hi(D_80164AD0) # $a0, 0x8016 -/* 021198 80020598 8C844AD0 */ lw $a0, %lo(D_80164AD0)($a0) -/* 02119C 8002059C 03003825 */ move $a3, $t8 -/* 0211A0 800205A0 01C02825 */ move $a1, $t6 -/* 0211A4 800205A4 01E03025 */ move $a2, $t7 -/* 0211A8 800205A8 0C009D58 */ jal func_80027560 -/* 0211AC 800205AC AFAC0010 */ sw $t4, 0x10($sp) -/* 0211B0 800205B0 3C04800E */ lui $a0, %hi(gPlayerOneCopy) # $a0, 0x800e -/* 0211B4 800205B4 8C84C4FC */ lw $a0, %lo(gPlayerOneCopy)($a0) -/* 0211B8 800205B8 00002825 */ move $a1, $zero -/* 0211BC 800205BC 0C01B96B */ jal func_8006E5AC -/* 0211C0 800205C0 00003025 */ move $a2, $zero -/* 0211C4 800205C4 3C04800E */ lui $a0, %hi(gPlayerTwo) # $a0, 0x800e -/* 0211C8 800205C8 8C84C4E0 */ lw $a0, %lo(gPlayerTwo)($a0) -/* 0211CC 800205CC 24050001 */ li $a1, 1 -/* 0211D0 800205D0 0C01B96B */ jal func_8006E5AC -/* 0211D4 800205D4 00003025 */ move $a2, $zero -/* 0211D8 800205D8 3C04800E */ lui $a0, %hi(gPlayerThree) # $a0, 0x800e -/* 0211DC 800205DC 8C84C4E4 */ lw $a0, %lo(gPlayerThree)($a0) -/* 0211E0 800205E0 24050002 */ li $a1, 2 -/* 0211E4 800205E4 0C01B96B */ jal func_8006E5AC -/* 0211E8 800205E8 00003025 */ move $a2, $zero -/* 0211EC 800205EC 3C04800E */ lui $a0, %hi(gPlayerFour) # $a0, 0x800e -/* 0211F0 800205F0 8C84C4E8 */ lw $a0, %lo(gPlayerFour)($a0) -/* 0211F4 800205F4 24050003 */ li $a1, 3 -/* 0211F8 800205F8 0C01B96B */ jal func_8006E5AC -/* 0211FC 800205FC 00003025 */ move $a2, $zero -/* 021200 80020600 3C0D800E */ lui $t5, %hi(gActiveScreenMode) # $t5, 0x800e -/* 021204 80020604 8DADC52C */ lw $t5, %lo(gActiveScreenMode)($t5) -/* 021208 80020608 24010003 */ li $at, 3 -/* 02120C 8002060C 3C04800E */ lui $a0, %hi(gPlayerFive) # $a0, 0x800e -/* 021210 80020610 11A10013 */ beq $t5, $at, .L80020660 -/* 021214 80020614 24050004 */ li $a1, 4 -/* 021218 80020618 8C84C4EC */ lw $a0, %lo(gPlayerFive)($a0) -/* 02121C 8002061C 0C01B96B */ jal func_8006E5AC -/* 021220 80020620 00003025 */ move $a2, $zero -/* 021224 80020624 3C04800E */ lui $a0, %hi(gPlayerSix) # $a0, 0x800e -/* 021228 80020628 8C84C4F0 */ lw $a0, %lo(gPlayerSix)($a0) -/* 02122C 8002062C 24050005 */ li $a1, 5 -/* 021230 80020630 0C01B96B */ jal func_8006E5AC -/* 021234 80020634 00003025 */ move $a2, $zero -/* 021238 80020638 3C04800E */ lui $a0, %hi(gPlayerSeven) # $a0, 0x800e -/* 02123C 8002063C 8C84C4F4 */ lw $a0, %lo(gPlayerSeven)($a0) -/* 021240 80020640 24050006 */ li $a1, 6 -/* 021244 80020644 0C01B96B */ jal func_8006E5AC -/* 021248 80020648 00003025 */ move $a2, $zero -/* 02124C 8002064C 3C04800E */ lui $a0, %hi(gPlayerEight) # $a0, 0x800e -/* 021250 80020650 8C84C4F8 */ lw $a0, %lo(gPlayerEight)($a0) -/* 021254 80020654 24050007 */ li $a1, 7 -/* 021258 80020658 0C01B96B */ jal func_8006E5AC -/* 02125C 8002065C 00003025 */ move $a2, $zero -.L80020660: -/* 021260 80020660 3C148015 */ lui $s4, %hi(gDmaMesgQueue) # $s4, 0x8015 -/* 021264 80020664 3C158015 */ lui $s5, %hi(gMainReceivedMesg) # $s5, 0x8015 -/* 021268 80020668 26B5F098 */ addiu $s5, %lo(gMainReceivedMesg) # addiu $s5, $s5, -0xf68 -/* 02126C 8002066C 2694EF58 */ addiu $s4, %lo(gDmaMesgQueue) # addiu $s4, $s4, -0x10a8 -/* 021270 80020670 02802025 */ move $a0, $s4 -/* 021274 80020674 02A02825 */ move $a1, $s5 -/* 021278 80020678 0C0335D4 */ jal osRecvMesg -/* 02127C 8002067C 24060001 */ li $a2, 1 -/* 021280 80020680 3C16800E */ lui $s6, %hi(D_800DDB58) # $s6, 0x800e -/* 021284 80020684 26D6DB58 */ addiu $s6, %lo(D_800DDB58) # addiu $s6, $s6, -0x24a8 -/* 021288 80020688 8EC20000 */ lw $v0, ($s6) -/* 02128C 8002068C 24100001 */ li $s0, 1 -/* 021290 80020690 241E0920 */ li $fp, 2336 -/* 021294 80020694 28410002 */ slti $at, $v0, 2 -/* 021298 80020698 14200049 */ bnez $at, .L800207C0 -/* 02129C 8002069C 3C17802E */ lui $s7, %hi(D_802DFB80) # $s7, 0x802e -/* 0212A0 800206A0 26F7FB80 */ addiu $s7, %lo(D_802DFB80) # addiu $s7, $s7, -0x480 -.L800206A4: -/* 0212A4 800206A4 3C198016 */ lui $t9, %hi(D_80164AC0) # $t9, 0x8016 -/* 0212A8 800206A8 27394AC0 */ addiu $t9, %lo(D_80164AC0) # addiu $t9, $t9, 0x4ac0 -/* 0212AC 800206AC 00101040 */ sll $v0, $s0, 1 -/* 0212B0 800206B0 3C0F8016 */ lui $t7, %hi(D_80164AB0) # $t7, 0x8016 -/* 0212B4 800206B4 25EF4AB0 */ addiu $t7, %lo(D_80164AB0) # addiu $t7, $t7, 0x4ab0 -/* 0212B8 800206B8 00599021 */ addu $s2, $v0, $t9 -/* 0212BC 800206BC 86480000 */ lh $t0, ($s2) -/* 0212C0 800206C0 004F8821 */ addu $s1, $v0, $t7 -/* 0212C4 800206C4 86230000 */ lh $v1, ($s1) -/* 0212C8 800206C8 00107080 */ sll $t6, $s0, 2 -/* 0212CC 800206CC 3C048016 */ lui $a0, %hi(D_80164AD0) # 0x8016 -/* 0212D0 800206D0 00085900 */ sll $t3, $t0, 4 -/* 0212D4 800206D4 026B6021 */ addu $t4, $s3, $t3 -/* 0212D8 800206D8 008E2021 */ addu $a0, $a0, $t6 -/* 0212DC 800206DC 00083600 */ sll $a2, $t0, 0x18 -/* 0212E0 800206E0 00036840 */ sll $t5, $v1, 1 -/* 0212E4 800206E4 018D7021 */ addu $t6, $t4, $t5 -/* 0212E8 800206E8 00064E03 */ sra $t1, $a2, 0x18 -/* 0212EC 800206EC 85CF0000 */ lh $t7, ($t6) -/* 0212F0 800206F0 00093E00 */ sll $a3, $t1, 0x18 -/* 0212F4 800206F4 00032E00 */ sll $a1, $v1, 0x18 -/* 0212F8 800206F8 0005C603 */ sra $t8, $a1, 0x18 -/* 0212FC 800206FC 00075603 */ sra $t2, $a3, 0x18 -/* 021300 80020700 01403825 */ move $a3, $t2 -/* 021304 80020704 03002825 */ move $a1, $t8 -/* 021308 80020708 01203025 */ move $a2, $t1 -/* 02130C 8002070C 8C844AD0 */ lw $a0, %lo(D_80164AD0)($a0) # 0x4ad0 -/* 021310 80020710 0C009D58 */ jal func_80027560 -/* 021314 80020714 AFAF0010 */ sw $t7, 0x10($sp) -/* 021318 80020718 8642FFFE */ lh $v0, -2($s2) -/* 02131C 8002071C 8623FFFE */ lh $v1, -2($s1) -/* 021320 80020720 0002C100 */ sll $t8, $v0, 4 -/* 021324 80020724 0278C821 */ addu $t9, $s3, $t8 -/* 021328 80020728 00034840 */ sll $t1, $v1, 1 -/* 02132C 8002072C 03295021 */ addu $t2, $t9, $t1 -/* 021330 80020730 85460000 */ lh $a2, ($t2) -/* 021334 80020734 007E0019 */ multu $v1, $fp -/* 021338 80020738 000268C0 */ sll $t5, $v0, 3 -/* 02133C 8002073C 000658C0 */ sll $t3, $a2, 3 -/* 021340 80020740 01665821 */ addu $t3, $t3, $a2 -/* 021344 80020744 000B58C0 */ sll $t3, $t3, 3 -/* 021348 80020748 01A26821 */ addu $t5, $t5, $v0 -/* 02134C 8002074C 000D68C0 */ sll $t5, $t5, 3 -/* 021350 80020750 01665821 */ addu $t3, $t3, $a2 -/* 021354 80020754 000B5A40 */ sll $t3, $t3, 9 -/* 021358 80020758 01A26821 */ addu $t5, $t5, $v0 -/* 02135C 8002075C 000D6A00 */ sll $t5, $t5, 8 -/* 021360 80020760 02EB6021 */ addu $t4, $s7, $t3 -/* 021364 80020764 018D7021 */ addu $t6, $t4, $t5 -/* 021368 80020768 0002CBC0 */ sll $t9, $v0, 0xf -/* 02136C 8002076C 0006C400 */ sll $t8, $a2, 0x10 -/* 021370 80020770 03194821 */ addu $t1, $t8, $t9 -/* 021374 80020774 3C0C802C */ lui $t4, %hi(D_802BFB80) # $t4, 0x802c -/* 021378 80020778 00035300 */ sll $t2, $v1, 0xc -/* 02137C 8002077C 012A5821 */ addu $t3, $t1, $t2 -/* 021380 80020780 258CFB80 */ addiu $t4, %lo(D_802BFB80) # addiu $t4, $t4, -0x480 -/* 021384 80020784 00007812 */ mflo $t7 -/* 021388 80020788 01CF2021 */ addu $a0, $t6, $t7 -/* 02138C 8002078C 0C010034 */ jal mio0decode -/* 021390 80020790 016C2821 */ addu $a1, $t3, $t4 -/* 021394 80020794 02802025 */ move $a0, $s4 -/* 021398 80020798 02A02825 */ move $a1, $s5 -/* 02139C 8002079C 0C0335D4 */ jal osRecvMesg -/* 0213A0 800207A0 24060001 */ li $a2, 1 -/* 0213A4 800207A4 8EC20000 */ lw $v0, ($s6) -/* 0213A8 800207A8 26100001 */ addiu $s0, $s0, 1 -/* 0213AC 800207AC 00106C00 */ sll $t5, $s0, 0x10 -/* 0213B0 800207B0 000D8403 */ sra $s0, $t5, 0x10 -/* 0213B4 800207B4 0202082A */ slt $at, $s0, $v0 -/* 0213B8 800207B8 1420FFBA */ bnez $at, .L800206A4 -/* 0213BC 800207BC 00000000 */ nop -.L800207C0: -/* 0213C0 800207C0 00023840 */ sll $a3, $v0, 1 -/* 0213C4 800207C4 3C038016 */ lui $v1, %hi(D_80164ABE) # 0x8016 -/* 0213C8 800207C8 00671821 */ addu $v1, $v1, $a3 -/* 0213CC 800207CC 3C068016 */ lui $a2, %hi(D_80164AAE) # 0x8016 -/* 0213D0 800207D0 84634ABE */ lh $v1, %lo(D_80164ABE)($v1) # 0x4abe -/* 0213D4 800207D4 00C73021 */ addu $a2, $a2, $a3 -/* 0213D8 800207D8 84C64AAE */ lh $a2, %lo(D_80164AAE)($a2) # 0x4aae($a2) -/* 0213DC 800207DC 00037900 */ sll $t7, $v1, 4 -/* 0213E0 800207E0 026FC021 */ addu $t8, $s3, $t7 -/* 0213E4 800207E4 0006C840 */ sll $t9, $a2, 1 -/* 0213E8 800207E8 03194821 */ addu $t1, $t8, $t9 -/* 0213EC 800207EC 85280000 */ lh $t0, ($t1) -/* 0213F0 800207F0 241E0920 */ li $fp, 2336 -/* 0213F4 800207F4 00DE0019 */ multu $a2, $fp -/* 0213F8 800207F8 000850C0 */ sll $t2, $t0, 3 -/* 0213FC 800207FC 000360C0 */ sll $t4, $v1, 3 -/* 021400 80020800 01485021 */ addu $t2, $t2, $t0 -/* 021404 80020804 000A50C0 */ sll $t2, $t2, 3 -/* 021408 80020808 01836021 */ addu $t4, $t4, $v1 -/* 02140C 8002080C 3C17802E */ lui $s7, %hi(D_802DFB80) # $s7, 0x802e -/* 021410 80020810 000C60C0 */ sll $t4, $t4, 3 -/* 021414 80020814 01485021 */ addu $t2, $t2, $t0 -/* 021418 80020818 26F7FB80 */ addiu $s7, %lo(D_802DFB80) # addiu $s7, $s7, -0x480 -/* 02141C 8002081C 000A5240 */ sll $t2, $t2, 9 -/* 021420 80020820 01836021 */ addu $t4, $t4, $v1 -/* 021424 80020824 000C6200 */ sll $t4, $t4, 8 -/* 021428 80020828 02EA5821 */ addu $t3, $s7, $t2 -/* 02142C 8002082C 016C6821 */ addu $t5, $t3, $t4 -/* 021430 80020830 0003C3C0 */ sll $t8, $v1, 0xf -/* 021434 80020834 00087C00 */ sll $t7, $t0, 0x10 -/* 021438 80020838 01F8C821 */ addu $t9, $t7, $t8 -/* 02143C 8002083C 3C0B802C */ lui $t3, %hi(D_802BFB80) # $t3, 0x802c -/* 021440 80020840 00064B00 */ sll $t1, $a2, 0xc -/* 021444 80020844 03295021 */ addu $t2, $t9, $t1 -/* 021448 80020848 256BFB80 */ addiu $t3, %lo(D_802BFB80) # addiu $t3, $t3, -0x480 -/* 02144C 8002084C 00007012 */ mflo $t6 -/* 021450 80020850 01AE2021 */ addu $a0, $t5, $t6 -/* 021454 80020854 0C010034 */ jal mio0decode -/* 021458 80020858 014B2821 */ addu $a1, $t2, $t3 -/* 02145C 8002085C 8FBF0044 */ lw $ra, 0x44($sp) -/* 021460 80020860 8FB00020 */ lw $s0, 0x20($sp) -/* 021464 80020864 8FB10024 */ lw $s1, 0x24($sp) -/* 021468 80020868 8FB20028 */ lw $s2, 0x28($sp) -/* 02146C 8002086C 8FB3002C */ lw $s3, 0x2c($sp) -/* 021470 80020870 8FB40030 */ lw $s4, 0x30($sp) -/* 021474 80020874 8FB50034 */ lw $s5, 0x34($sp) -/* 021478 80020878 8FB60038 */ lw $s6, 0x38($sp) -/* 02147C 8002087C 8FB7003C */ lw $s7, 0x3c($sp) -/* 021480 80020880 8FBE0040 */ lw $fp, 0x40($sp) -/* 021484 80020884 03E00008 */ jr $ra -/* 021488 80020888 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/non_matchings/code_8001F980/func_80021244.s b/asm/non_matchings/code_8001F980/func_80021244.s deleted file mode 100644 index c072e3be4..000000000 --- a/asm/non_matchings/code_8001F980/func_80021244.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_80021244 -/* 021E44 80021244 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 021E48 80021248 AFBF0014 */ sw $ra, 0x14($sp) -/* 021E4C 8002124C AFA5001C */ sw $a1, 0x1c($sp) -/* 021E50 80021250 AFA60020 */ sw $a2, 0x20($sp) -/* 021E54 80021254 94820000 */ lhu $v0, ($a0) -/* 021E58 80021258 0006C600 */ sll $t8, $a2, 0x18 -/* 021E5C 8002125C 0018CE03 */ sra $t9, $t8, 0x18 -/* 021E60 80021260 00057600 */ sll $t6, $a1, 0x18 -/* 021E64 80021264 34018000 */ li $at, 32768 -/* 021E68 80021268 30488000 */ andi $t0, $v0, 0x8000 -/* 021E6C 8002126C 000E2E03 */ sra $a1, $t6, 0x18 -/* 021E70 80021270 1501000C */ bne $t0, $at, .L800212A4 -/* 021E74 80021274 03203025 */ move $a2, $t9 -/* 021E78 80021278 30490040 */ andi $t1, $v0, 0x40 -/* 021E7C 8002127C 15200009 */ bnez $t1, .L800212A4 -/* 021E80 80021280 00195080 */ sll $t2, $t9, 2 -/* 021E84 80021284 948C0002 */ lhu $t4, 2($a0) -/* 021E88 80021288 240B0002 */ li $t3, 2 -/* 021E8C 8002128C 014B1004 */ sllv $v0, $t3, $t2 -/* 021E90 80021290 01826824 */ and $t5, $t4, $v0 -/* 021E94 80021294 544D0004 */ bnel $v0, $t5, .L800212A8 -/* 021E98 80021298 8FBF0014 */ lw $ra, 0x14($sp) -/* 021E9C 8002129C 0C0099EB */ jal func_800267AC -/* 021EA0 800212A0 00000000 */ nop -.L800212A4: -/* 021EA4 800212A4 8FBF0014 */ lw $ra, 0x14($sp) -.L800212A8: -/* 021EA8 800212A8 27BD0018 */ addiu $sp, $sp, 0x18 -/* 021EAC 800212AC 03E00008 */ jr $ra -/* 021EB0 800212B0 00000000 */ nop diff --git a/asm/non_matchings/code_8001F980/func_80022B50.s b/asm/non_matchings/code_8001F980/func_80022B50.s deleted file mode 100644 index 9512ccc44..000000000 --- a/asm/non_matchings/code_8001F980/func_80022B50.s +++ /dev/null @@ -1,31 +0,0 @@ -glabel func_80022B50 -/* 023750 80022B50 AFA50004 */ sw $a1, 4($sp) -/* 023754 80022B54 84820DB6 */ lh $v0, 0xdb6($a0) -/* 023758 80022B58 C4800DC4 */ lwc1 $f0, 0xdc4($a0) -/* 02375C 80022B5C 28410005 */ slti $at, $v0, 5 -/* 023760 80022B60 10200004 */ beqz $at, .L80022B74 -/* 023764 80022B64 00000000 */ nop -/* 023768 80022B68 24420001 */ addiu $v0, $v0, 1 -/* 02376C 80022B6C 00027400 */ sll $t6, $v0, 0x10 -/* 023770 80022B70 000E1403 */ sra $v0, $t6, 0x10 -.L80022B74: -/* 023774 80022B74 00420019 */ multu $v0, $v0 -/* 023778 80022B78 44828000 */ mtc1 $v0, $f16 -/* 02377C 80022B7C 3C01800F */ lui $at, %hi(D_800ED690) -/* 023780 80022B80 D424D690 */ ldc1 $f4, %lo(D_800ED690)($at) -/* 023784 80022B84 468084A0 */ cvt.s.w $f18, $f16 -/* 023788 80022B88 E4800DC4 */ swc1 $f0, 0xdc4($a0) -/* 02378C 80022B8C A4820DB6 */ sh $v0, 0xdb6($a0) -/* 023790 80022B90 0000C012 */ mflo $t8 -/* 023794 80022B94 44983000 */ mtc1 $t8, $f6 -/* 023798 80022B98 00000000 */ nop -/* 02379C 80022B9C 46803221 */ cvt.d.w $f8, $f6 -/* 0237A0 80022BA0 46282282 */ mul.d $f10, $f4, $f8 -/* 0237A4 80022BA4 00000000 */ nop -/* 0237A8 80022BA8 46009182 */ mul.s $f6, $f18, $f0 -/* 0237AC 80022BAC 46003121 */ cvt.d.s $f4, $f6 -/* 0237B0 80022BB0 462A2201 */ sub.d $f8, $f4, $f10 -/* 0237B4 80022BB4 4620440D */ trunc.w.d $f16, $f8 -/* 0237B8 80022BB8 44088000 */ mfc1 $t0, $f16 -/* 0237BC 80022BBC 03E00008 */ jr $ra -/* 0237C0 80022BC0 A4880DA4 */ sh $t0, 0xda4($a0) diff --git a/asm/non_matchings/code_8001F980/func_80022BC4.s b/asm/non_matchings/code_8001F980/func_80022BC4.s deleted file mode 100644 index 87217bf39..000000000 --- a/asm/non_matchings/code_8001F980/func_80022BC4.s +++ /dev/null @@ -1,60 +0,0 @@ -glabel func_80022BC4 -/* 0237C4 80022BC4 AFA50004 */ sw $a1, 4($sp) -/* 0237C8 80022BC8 84820DB6 */ lh $v0, 0xdb6($a0) -/* 0237CC 80022BCC 3C013FE0 */ li $at, 0x3FE00000 # 1.750000 -/* 0237D0 80022BD0 44812800 */ mtc1 $at, $f5 -/* 0237D4 80022BD4 24420001 */ addiu $v0, $v0, 1 -/* 0237D8 80022BD8 00027400 */ sll $t6, $v0, 0x10 -/* 0237DC 80022BDC 000E1403 */ sra $v0, $t6, 0x10 -/* 0237E0 80022BE0 00420019 */ multu $v0, $v0 -/* 0237E4 80022BE4 44828000 */ mtc1 $v0, $f16 -/* 0237E8 80022BE8 44802000 */ mtc1 $zero, $f4 -/* 0237EC 80022BEC C4800DC4 */ lwc1 $f0, 0xdc4($a0) -/* 0237F0 80022BF0 468084A0 */ cvt.s.w $f18, $f16 -/* 0237F4 80022BF4 0000C012 */ mflo $t8 -/* 0237F8 80022BF8 44983000 */ mtc1 $t8, $f6 -/* 0237FC 80022BFC 00000000 */ nop -/* 023800 80022C00 46803221 */ cvt.d.w $f8, $f6 -/* 023804 80022C04 46282282 */ mul.d $f10, $f4, $f8 -/* 023808 80022C08 00000000 */ nop -/* 02380C 80022C0C 46009182 */ mul.s $f6, $f18, $f0 -/* 023810 80022C10 46003121 */ cvt.d.s $f4, $f6 -/* 023814 80022C14 462A2201 */ sub.d $f8, $f4, $f10 -/* 023818 80022C18 4620440D */ trunc.w.d $f16, $f8 -/* 02381C 80022C1C 44058000 */ mfc1 $a1, $f16 -/* 023820 80022C20 00000000 */ nop -/* 023824 80022C24 00051C00 */ sll $v1, $a1, 0x10 -/* 023828 80022C28 00034403 */ sra $t0, $v1, 0x10 -/* 02382C 80022C2C 10400017 */ beqz $v0, .L80022C8C -/* 023830 80022C30 01001825 */ move $v1, $t0 -/* 023834 80022C34 00054C00 */ sll $t1, $a1, 0x10 -/* 023838 80022C38 00095403 */ sra $t2, $t1, 0x10 -/* 02383C 80022C3C 05410013 */ bgez $t2, .L80022C8C -/* 023840 80022C40 3C01800F */ lui $at, %hi(D_800ED698) -/* 023844 80022C44 D426D698 */ ldc1 $f6, %lo(D_800ED698)($at) -/* 023848 80022C48 460004A1 */ cvt.d.s $f18, $f0 -/* 02384C 80022C4C 3C01800F */ lui $at, %hi(D_800ED6A0) -/* 023850 80022C50 46269102 */ mul.d $f4, $f18, $f6 -/* 023854 80022C54 D42AD6A0 */ ldc1 $f10, %lo(D_800ED6A0)($at) -/* 023858 80022C58 00001025 */ move $v0, $zero -/* 02385C 80022C5C 3C01F7FF */ lui $at, (0xF7FFFFFF >> 16) # lui $at, 0xf7ff -/* 023860 80022C60 46202020 */ cvt.s.d $f0, $f4 -/* 023864 80022C64 46000221 */ cvt.d.s $f8, $f0 -/* 023868 80022C68 462A403E */ c.le.d $f8, $f10 -/* 02386C 80022C6C 00000000 */ nop -/* 023870 80022C70 45000006 */ bc1f .L80022C8C -/* 023874 80022C74 00000000 */ nop -/* 023878 80022C78 8C8B00BC */ lw $t3, 0xbc($a0) -/* 02387C 80022C7C 3421FFFF */ ori $at, (0xF7FFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 023880 80022C80 44800000 */ mtc1 $zero, $f0 -/* 023884 80022C84 01616024 */ and $t4, $t3, $at -/* 023888 80022C88 AC8C00BC */ sw $t4, 0xbc($a0) -.L80022C8C: -/* 02388C 80022C8C 5C600003 */ bgtzl $v1, .L80022C9C -/* 023890 80022C90 A4830DA4 */ sh $v1, 0xda4($a0) -/* 023894 80022C94 00001825 */ move $v1, $zero -/* 023898 80022C98 A4830DA4 */ sh $v1, 0xda4($a0) -.L80022C9C: -/* 02389C 80022C9C E4800DC4 */ swc1 $f0, 0xdc4($a0) -/* 0238A0 80022CA0 03E00008 */ jr $ra -/* 0238A4 80022CA4 A4820DB6 */ sh $v0, 0xdb6($a0) diff --git a/asm/non_matchings/code_8001F980/func_80022CA8.s b/asm/non_matchings/code_8001F980/func_80022CA8.s deleted file mode 100644 index c1098eb8f..000000000 --- a/asm/non_matchings/code_8001F980/func_80022CA8.s +++ /dev/null @@ -1,47 +0,0 @@ -glabel func_80022CA8 -/* 0238A8 80022CA8 AFA50004 */ sw $a1, 4($sp) -/* 0238AC 80022CAC AFA60008 */ sw $a2, 8($sp) -/* 0238B0 80022CB0 AFA7000C */ sw $a3, 0xc($sp) -/* 0238B4 80022CB4 84820DA4 */ lh $v0, 0xda4($a0) -/* 0238B8 80022CB8 3C01800F */ lui $at, %hi(D_800ED6A8) -/* 0238BC 80022CBC D428D6A8 */ ldc1 $f8, %lo(D_800ED6A8)($at) -/* 0238C0 80022CC0 44822000 */ mtc1 $v0, $f4 -/* 0238C4 80022CC4 3C014032 */ li $at, 0x40320000 # 2.781250 -/* 0238C8 80022CC8 44818800 */ mtc1 $at, $f17 -/* 0238CC 80022CCC 468021A1 */ cvt.d.w $f6, $f4 -/* 0238D0 80022CD0 44808000 */ mtc1 $zero, $f16 -/* 0238D4 80022CD4 00057600 */ sll $t6, $a1, 0x18 -/* 0238D8 80022CD8 000E7E03 */ sra $t7, $t6, 0x18 -/* 0238DC 80022CDC 3C0B800E */ lui $t3, %hi(D_800DDBB4) # $t3, 0x800e -/* 0238E0 80022CE0 46283282 */ mul.d $f10, $f6, $f8 -/* 0238E4 80022CE4 256BDBB4 */ addiu $t3, %lo(D_800DDBB4) # addiu $t3, $t3, -0x244c -/* 0238E8 80022CE8 000F5080 */ sll $t2, $t7, 2 -/* 0238EC 80022CEC 014B1821 */ addu $v1, $t2, $t3 -/* 0238F0 80022CF0 8C6D0000 */ lw $t5, ($v1) -/* 0238F4 80022CF4 0007C600 */ sll $t8, $a3, 0x18 -/* 0238F8 80022CF8 0018CE03 */ sra $t9, $t8, 0x18 -/* 0238FC 80022CFC 00193100 */ sll $a2, $t9, 4 -/* 023900 80022D00 462A8481 */ sub.d $f18, $f16, $f10 -/* 023904 80022D04 01A67021 */ addu $t6, $t5, $a2 -/* 023908 80022D08 240F0009 */ li $t7, 9 -/* 02390C 80022D0C 01E24823 */ subu $t1, $t7, $v0 -/* 023910 80022D10 4620910D */ trunc.w.d $f4, $f18 -/* 023914 80022D14 44082000 */ mfc1 $t0, $f4 -/* 023918 80022D18 00000000 */ nop -/* 02391C 80022D1C A5C80002 */ sh $t0, 2($t6) -/* 023920 80022D20 8C780000 */ lw $t8, ($v1) -/* 023924 80022D24 0306C821 */ addu $t9, $t8, $a2 -/* 023928 80022D28 A7290012 */ sh $t1, 0x12($t9) -/* 02392C 80022D2C 8C6A0000 */ lw $t2, ($v1) -/* 023930 80022D30 01465821 */ addu $t3, $t2, $a2 -/* 023934 80022D34 A5690022 */ sh $t1, 0x22($t3) -/* 023938 80022D38 8C6C0000 */ lw $t4, ($v1) -/* 02393C 80022D3C 01866821 */ addu $t5, $t4, $a2 -/* 023940 80022D40 A5A80032 */ sh $t0, 0x32($t5) -/* 023944 80022D44 8C6E0000 */ lw $t6, ($v1) -/* 023948 80022D48 01C67821 */ addu $t7, $t6, $a2 -/* 02394C 80022D4C A5E90042 */ sh $t1, 0x42($t7) -/* 023950 80022D50 8C780000 */ lw $t8, ($v1) -/* 023954 80022D54 0306C821 */ addu $t9, $t8, $a2 -/* 023958 80022D58 03E00008 */ jr $ra -/* 02395C 80022D5C A7290072 */ sh $t1, 0x72($t9) diff --git a/asm/non_matchings/code_8001F980/func_80022D60.s b/asm/non_matchings/code_8001F980/func_80022D60.s deleted file mode 100644 index 17ffe3ff9..000000000 --- a/asm/non_matchings/code_8001F980/func_80022D60.s +++ /dev/null @@ -1,22 +0,0 @@ -glabel func_80022D60 -/* 023960 80022D60 00057600 */ sll $t6, $a1, 0x18 -/* 023964 80022D64 000E7E03 */ sra $t7, $t6, 0x18 -/* 023968 80022D68 3C09800E */ lui $t1, %hi(D_800DDBB4) # $t1, 0x800e -/* 02396C 80022D6C 2529DBB4 */ addiu $t1, %lo(D_800DDBB4) # addiu $t1, $t1, -0x244c -/* 023970 80022D70 000F4080 */ sll $t0, $t7, 2 -/* 023974 80022D74 01091021 */ addu $v0, $t0, $t1 -/* 023978 80022D78 8C4A0000 */ lw $t2, ($v0) -/* 02397C 80022D7C 0007C600 */ sll $t8, $a3, 0x18 -/* 023980 80022D80 0018CE03 */ sra $t9, $t8, 0x18 -/* 023984 80022D84 AFA40000 */ sw $a0, ($sp) -/* 023988 80022D88 00191900 */ sll $v1, $t9, 4 -/* 02398C 80022D8C 24040015 */ li $a0, 21 -/* 023990 80022D90 AFA50004 */ sw $a1, 4($sp) -/* 023994 80022D94 AFA60008 */ sw $a2, 8($sp) -/* 023998 80022D98 AFA7000C */ sw $a3, 0xc($sp) -/* 02399C 80022D9C 01435821 */ addu $t3, $t2, $v1 -/* 0239A0 80022DA0 A5640002 */ sh $a0, 2($t3) -/* 0239A4 80022DA4 8C4C0000 */ lw $t4, ($v0) -/* 0239A8 80022DA8 01836821 */ addu $t5, $t4, $v1 -/* 0239AC 80022DAC 03E00008 */ jr $ra -/* 0239B0 80022DB0 A5A40032 */ sh $a0, 0x32($t5) diff --git a/asm/non_matchings/code_8001F980/func_80022DB4.s b/asm/non_matchings/code_8001F980/func_80022DB4.s deleted file mode 100644 index dfcfd853e..000000000 --- a/asm/non_matchings/code_8001F980/func_80022DB4.s +++ /dev/null @@ -1,55 +0,0 @@ -glabel func_80022DB4 -/* 0239B4 80022DB4 AFA50004 */ sw $a1, 4($sp) -/* 0239B8 80022DB8 84820DCC */ lh $v0, 0xdcc($a0) -/* 0239BC 80022DBC 3C01800F */ lui $at, %hi(D_800ED6B0) -/* 0239C0 80022DC0 D424D6B0 */ ldc1 $f4, %lo(D_800ED6B0)($at) -/* 0239C4 80022DC4 24420001 */ addiu $v0, $v0, 1 -/* 0239C8 80022DC8 00027400 */ sll $t6, $v0, 0x10 -/* 0239CC 80022DCC 000E1403 */ sra $v0, $t6, 0x10 -/* 0239D0 80022DD0 00420019 */ multu $v0, $v0 -/* 0239D4 80022DD4 44828000 */ mtc1 $v0, $f16 -/* 0239D8 80022DD8 C4800DC0 */ lwc1 $f0, 0xdc0($a0) -/* 0239DC 80022DDC 468084A0 */ cvt.s.w $f18, $f16 -/* 0239E0 80022DE0 0000C012 */ mflo $t8 -/* 0239E4 80022DE4 44983000 */ mtc1 $t8, $f6 -/* 0239E8 80022DE8 00000000 */ nop -/* 0239EC 80022DEC 46803221 */ cvt.d.w $f8, $f6 -/* 0239F0 80022DF0 46282282 */ mul.d $f10, $f4, $f8 -/* 0239F4 80022DF4 00000000 */ nop -/* 0239F8 80022DF8 46009182 */ mul.s $f6, $f18, $f0 -/* 0239FC 80022DFC 46003121 */ cvt.d.s $f4, $f6 -/* 023A00 80022E00 462A2201 */ sub.d $f8, $f4, $f10 -/* 023A04 80022E04 4620440D */ trunc.w.d $f16, $f8 -/* 023A08 80022E08 44058000 */ mfc1 $a1, $f16 -/* 023A0C 80022E0C 00000000 */ nop -/* 023A10 80022E10 00051C00 */ sll $v1, $a1, 0x10 -/* 023A14 80022E14 00034403 */ sra $t0, $v1, 0x10 -/* 023A18 80022E18 10400013 */ beqz $v0, .L80022E68 -/* 023A1C 80022E1C 01001825 */ move $v1, $t0 -/* 023A20 80022E20 00054C00 */ sll $t1, $a1, 0x10 -/* 023A24 80022E24 00095403 */ sra $t2, $t1, 0x10 -/* 023A28 80022E28 0541000F */ bgez $t2, .L80022E68 -/* 023A2C 80022E2C 3C01800F */ lui $at, %hi(D_800ED6B8) -/* 023A30 80022E30 D426D6B8 */ ldc1 $f6, %lo(D_800ED6B8)($at) -/* 023A34 80022E34 460004A1 */ cvt.d.s $f18, $f0 -/* 023A38 80022E38 3C01800F */ lui $at, %hi(D_800ED6C0) -/* 023A3C 80022E3C 46269102 */ mul.d $f4, $f18, $f6 -/* 023A40 80022E40 D42AD6C0 */ ldc1 $f10, %lo(D_800ED6C0)($at) -/* 023A44 80022E44 00001025 */ move $v0, $zero -/* 023A48 80022E48 46202020 */ cvt.s.d $f0, $f4 -/* 023A4C 80022E4C 46000221 */ cvt.d.s $f8, $f0 -/* 023A50 80022E50 462A403E */ c.le.d $f8, $f10 -/* 023A54 80022E54 00000000 */ nop -/* 023A58 80022E58 45000003 */ bc1f .L80022E68 -/* 023A5C 80022E5C 00000000 */ nop -/* 023A60 80022E60 44800000 */ mtc1 $zero, $f0 -/* 023A64 80022E64 00000000 */ nop -.L80022E68: -/* 023A68 80022E68 5C600003 */ bgtzl $v1, .L80022E78 -/* 023A6C 80022E6C A4830DD2 */ sh $v1, 0xdd2($a0) -/* 023A70 80022E70 00001825 */ move $v1, $zero -/* 023A74 80022E74 A4830DD2 */ sh $v1, 0xdd2($a0) -.L80022E78: -/* 023A78 80022E78 E4800DC0 */ swc1 $f0, 0xdc0($a0) -/* 023A7C 80022E7C 03E00008 */ jr $ra -/* 023A80 80022E80 A4820DCC */ sh $v0, 0xdcc($a0) diff --git a/asm/non_matchings/code_8001F980/func_80022E84.s b/asm/non_matchings/code_8001F980/func_80022E84.s deleted file mode 100644 index bea36e35d..000000000 --- a/asm/non_matchings/code_8001F980/func_80022E84.s +++ /dev/null @@ -1,37 +0,0 @@ -glabel func_80022E84 -/* 023A84 80022E84 00057600 */ sll $t6, $a1, 0x18 -/* 023A88 80022E88 000E7E03 */ sra $t7, $t6, 0x18 -/* 023A8C 80022E8C 3C0B800E */ lui $t3, %hi(D_800DDBB4) # $t3, 0x800e -/* 023A90 80022E90 256BDBB4 */ addiu $t3, %lo(D_800DDBB4) # addiu $t3, $t3, -0x244c -/* 023A94 80022E94 000F5080 */ sll $t2, $t7, 2 -/* 023A98 80022E98 AFA50004 */ sw $a1, 4($sp) -/* 023A9C 80022E9C AFA60008 */ sw $a2, 8($sp) -/* 023AA0 80022EA0 AFA7000C */ sw $a3, 0xc($sp) -/* 023AA4 80022EA4 014B1821 */ addu $v1, $t2, $t3 -/* 023AA8 80022EA8 84820DD2 */ lh $v0, 0xdd2($a0) -/* 023AAC 80022EAC 8C6D0000 */ lw $t5, ($v1) -/* 023AB0 80022EB0 0007C600 */ sll $t8, $a3, 0x18 -/* 023AB4 80022EB4 0018CE03 */ sra $t9, $t8, 0x18 -/* 023AB8 80022EB8 00193100 */ sll $a2, $t9, 4 -/* 023ABC 80022EBC 240C0012 */ li $t4, 18 -/* 023AC0 80022EC0 01824023 */ subu $t0, $t4, $v0 -/* 023AC4 80022EC4 01A67021 */ addu $t6, $t5, $a2 -/* 023AC8 80022EC8 A5C80002 */ sh $t0, 2($t6) -/* 023ACC 80022ECC 8C780000 */ lw $t8, ($v1) -/* 023AD0 80022ED0 240F0009 */ li $t7, 9 -/* 023AD4 80022ED4 01E24823 */ subu $t1, $t7, $v0 -/* 023AD8 80022ED8 0306C821 */ addu $t9, $t8, $a2 -/* 023ADC 80022EDC A7290012 */ sh $t1, 0x12($t9) -/* 023AE0 80022EE0 8C6A0000 */ lw $t2, ($v1) -/* 023AE4 80022EE4 01465821 */ addu $t3, $t2, $a2 -/* 023AE8 80022EE8 A5690022 */ sh $t1, 0x22($t3) -/* 023AEC 80022EEC 8C6C0000 */ lw $t4, ($v1) -/* 023AF0 80022EF0 01866821 */ addu $t5, $t4, $a2 -/* 023AF4 80022EF4 A5A80032 */ sh $t0, 0x32($t5) -/* 023AF8 80022EF8 8C6E0000 */ lw $t6, ($v1) -/* 023AFC 80022EFC 01C67821 */ addu $t7, $t6, $a2 -/* 023B00 80022F00 A5E90042 */ sh $t1, 0x42($t7) -/* 023B04 80022F04 8C780000 */ lw $t8, ($v1) -/* 023B08 80022F08 0306C821 */ addu $t9, $t8, $a2 -/* 023B0C 80022F0C 03E00008 */ jr $ra -/* 023B10 80022F10 A7290072 */ sh $t1, 0x72($t9) diff --git a/asm/non_matchings/code_8001F980/func_80022F14.s b/asm/non_matchings/code_8001F980/func_80022F14.s deleted file mode 100644 index f7d8a2c93..000000000 --- a/asm/non_matchings/code_8001F980/func_80022F14.s +++ /dev/null @@ -1,77 +0,0 @@ -glabel func_80022F14 -/* 023B14 80022F14 00057600 */ sll $t6, $a1, 0x18 -/* 023B18 80022F18 000E7E03 */ sra $t7, $t6, 0x18 -/* 023B1C 80022F1C 3C188016 */ lui $t8, %hi(D_80164B10) # $t8, 0x8016 -/* 023B20 80022F20 27184B10 */ addiu $t8, %lo(D_80164B10) # addiu $t8, $t8, 0x4b10 -/* 023B24 80022F24 000F1040 */ sll $v0, $t7, 1 -/* 023B28 80022F28 AFA40000 */ sw $a0, ($sp) -/* 023B2C 80022F2C 00581821 */ addu $v1, $v0, $t8 -/* 023B30 80022F30 94640000 */ lhu $a0, ($v1) -/* 023B34 80022F34 44876000 */ mtc1 $a3, $f12 -/* 023B38 80022F38 AFA50004 */ sw $a1, 4($sp) -/* 023B3C 80022F3C 44842000 */ mtc1 $a0, $f4 -/* 023B40 80022F40 0006CC03 */ sra $t9, $a2, 0x10 -/* 023B44 80022F44 04810005 */ bgez $a0, .L80022F5C -/* 023B48 80022F48 468021A0 */ cvt.s.w $f6, $f4 -/* 023B4C 80022F4C 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 023B50 80022F50 44814000 */ mtc1 $at, $f8 -/* 023B54 80022F54 00000000 */ nop -/* 023B58 80022F58 46083180 */ add.s $f6, $f6, $f8 -.L80022F5C: -/* 023B5C 80022F5C 332B00FF */ andi $t3, $t9, 0xff -/* 023B60 80022F60 008B6023 */ subu $t4, $a0, $t3 -/* 023B64 80022F64 448C5000 */ mtc1 $t4, $f10 -/* 023B68 80022F68 3C0F8016 */ lui $t7, %hi(D_80164B20) # $t7, 0x8016 -/* 023B6C 80022F6C 25EF4B20 */ addiu $t7, %lo(D_80164B20) # addiu $t7, $t7, 0x4b20 -/* 023B70 80022F70 46805420 */ cvt.s.w $f16, $f10 -/* 023B74 80022F74 004F3821 */ addu $a3, $v0, $t7 -/* 023B78 80022F78 94E80000 */ lhu $t0, ($a3) -/* 023B7C 80022F7C 0006C203 */ sra $t8, $a2, 8 -/* 023B80 80022F80 331900FF */ andi $t9, $t8, 0xff -/* 023B84 80022F84 01195823 */ subu $t3, $t0, $t9 -/* 023B88 80022F88 460C8482 */ mul.s $f18, $f16, $f12 -/* 023B8C 80022F8C 44885000 */ mtc1 $t0, $f10 -/* 023B90 80022F90 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 023B94 80022F94 30CF00FF */ andi $t7, $a2, 0xff -/* 023B98 80022F98 46805420 */ cvt.s.w $f16, $f10 -/* 023B9C 80022F9C 46123101 */ sub.s $f4, $f6, $f18 -/* 023BA0 80022FA0 448B9000 */ mtc1 $t3, $f18 -/* 023BA4 80022FA4 4600220D */ trunc.w.s $f8, $f4 -/* 023BA8 80022FA8 46809120 */ cvt.s.w $f4, $f18 -/* 023BAC 80022FAC 440E4000 */ mfc1 $t6, $f8 -/* 023BB0 80022FB0 00000000 */ nop -/* 023BB4 80022FB4 A46E0000 */ sh $t6, ($v1) -/* 023BB8 80022FB8 3C0E8016 */ lui $t6, %hi(D_80164B30) # $t6, 0x8016 -/* 023BBC 80022FBC 460C2202 */ mul.s $f8, $f4, $f12 -/* 023BC0 80022FC0 05010004 */ bgez $t0, .L80022FD4 -/* 023BC4 80022FC4 00000000 */ nop -/* 023BC8 80022FC8 44813000 */ mtc1 $at, $f6 -/* 023BCC 80022FCC 00000000 */ nop -/* 023BD0 80022FD0 46068400 */ add.s $f16, $f16, $f6 -.L80022FD4: -/* 023BD4 80022FD4 25CE4B30 */ addiu $t6, %lo(D_80164B30) # addiu $t6, $t6, 0x4b30 -/* 023BD8 80022FD8 004E4821 */ addu $t1, $v0, $t6 -/* 023BDC 80022FDC 952A0000 */ lhu $t2, ($t1) -/* 023BE0 80022FE0 46088281 */ sub.s $f10, $f16, $f8 -/* 023BE4 80022FE4 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000 -/* 023BE8 80022FE8 014FC023 */ subu $t8, $t2, $t7 -/* 023BEC 80022FEC 44984000 */ mtc1 $t8, $f8 -/* 023BF0 80022FF0 4600518D */ trunc.w.s $f6, $f10 -/* 023BF4 80022FF4 448A9000 */ mtc1 $t2, $f18 -/* 023BF8 80022FF8 468042A0 */ cvt.s.w $f10, $f8 -/* 023BFC 80022FFC 440D3000 */ mfc1 $t5, $f6 -/* 023C00 80023000 00000000 */ nop -/* 023C04 80023004 A4ED0000 */ sh $t5, ($a3) -/* 023C08 80023008 46809120 */ cvt.s.w $f4, $f18 -/* 023C0C 8002300C 460C5182 */ mul.s $f6, $f10, $f12 -/* 023C10 80023010 05430005 */ bgezl $t2, .L80023028 -/* 023C14 80023014 46062481 */ sub.s $f18, $f4, $f6 -/* 023C18 80023018 44818000 */ mtc1 $at, $f16 -/* 023C1C 8002301C 00000000 */ nop -/* 023C20 80023020 46102100 */ add.s $f4, $f4, $f16 -/* 023C24 80023024 46062481 */ sub.s $f18, $f4, $f6 -.L80023028: -/* 023C28 80023028 4600940D */ trunc.w.s $f16, $f18 -/* 023C2C 8002302C 440B8000 */ mfc1 $t3, $f16 -/* 023C30 80023030 03E00008 */ jr $ra -/* 023C34 80023034 A52B0000 */ sh $t3, ($t1) diff --git a/asm/non_matchings/code_8001F980/func_80023038.s b/asm/non_matchings/code_8001F980/func_80023038.s deleted file mode 100644 index 3da988cfc..000000000 --- a/asm/non_matchings/code_8001F980/func_80023038.s +++ /dev/null @@ -1,44 +0,0 @@ -glabel func_80023038 -/* 023C38 80023038 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 023C3C 8002303C AFA50024 */ sw $a1, 0x24($sp) -/* 023C40 80023040 AFA7002C */ sw $a3, 0x2c($sp) -/* 023C44 80023044 83A70027 */ lb $a3, 0x27($sp) -/* 023C48 80023048 00067C03 */ sra $t7, $a2, 0x10 -/* 023C4C 8002304C 31F800FF */ andi $t8, $t7, 0xff -/* 023C50 80023050 3C0E8016 */ lui $t6, %hi(D_80164B40) # $t6, 0x8016 -/* 023C54 80023054 AFBF0014 */ sw $ra, 0x14($sp) -/* 023C58 80023058 AFA40020 */ sw $a0, 0x20($sp) -/* 023C5C 8002305C AFA60028 */ sw $a2, 0x28($sp) -/* 023C60 80023060 25CE4B40 */ addiu $t6, %lo(D_80164B40) # addiu $t6, $t6, 0x4b40 -/* 023C64 80023064 0018CC00 */ sll $t9, $t8, 0x10 -/* 023C68 80023068 00071040 */ sll $v0, $a3, 1 -/* 023C6C 8002306C 004E2021 */ addu $a0, $v0, $t6 -/* 023C70 80023070 AFA2001C */ sw $v0, 0x1c($sp) -/* 023C74 80023074 00192C03 */ sra $a1, $t9, 0x10 -/* 023C78 80023078 0C00899D */ jal move_u16_towards -/* 023C7C 8002307C 8FA6002C */ lw $a2, 0x2c($sp) -/* 023C80 80023080 8FA50028 */ lw $a1, 0x28($sp) -/* 023C84 80023084 8FA9001C */ lw $t1, 0x1c($sp) -/* 023C88 80023088 3C0A8016 */ lui $t2, %hi(D_80164B50) # $t2, 0x8016 -/* 023C8C 8002308C 00055A03 */ sra $t3, $a1, 8 -/* 023C90 80023090 316C00FF */ andi $t4, $t3, 0xff -/* 023C94 80023094 000C6C00 */ sll $t5, $t4, 0x10 -/* 023C98 80023098 254A4B50 */ addiu $t2, %lo(D_80164B50) # addiu $t2, $t2, 0x4b50 -/* 023C9C 8002309C 000D2C03 */ sra $a1, $t5, 0x10 -/* 023CA0 800230A0 8FA6002C */ lw $a2, 0x2c($sp) -/* 023CA4 800230A4 0C00899D */ jal move_u16_towards -/* 023CA8 800230A8 012A2021 */ addu $a0, $t1, $t2 -/* 023CAC 800230AC 8FA50028 */ lw $a1, 0x28($sp) -/* 023CB0 800230B0 8FAF001C */ lw $t7, 0x1c($sp) -/* 023CB4 800230B4 3C188016 */ lui $t8, %hi(D_80164B60) # $t8, 0x8016 -/* 023CB8 800230B8 30B900FF */ andi $t9, $a1, 0xff -/* 023CBC 800230BC 00194400 */ sll $t0, $t9, 0x10 -/* 023CC0 800230C0 27184B60 */ addiu $t8, %lo(D_80164B60) # addiu $t8, $t8, 0x4b60 -/* 023CC4 800230C4 00082C03 */ sra $a1, $t0, 0x10 -/* 023CC8 800230C8 8FA6002C */ lw $a2, 0x2c($sp) -/* 023CCC 800230CC 0C00899D */ jal move_u16_towards -/* 023CD0 800230D0 01F82021 */ addu $a0, $t7, $t8 -/* 023CD4 800230D4 8FBF0014 */ lw $ra, 0x14($sp) -/* 023CD8 800230D8 27BD0020 */ addiu $sp, $sp, 0x20 -/* 023CDC 800230DC 03E00008 */ jr $ra -/* 023CE0 800230E0 00000000 */ nop diff --git a/asm/non_matchings/code_8001F980/func_800230E4.s b/asm/non_matchings/code_8001F980/func_800230E4.s deleted file mode 100644 index 94c3e9789..000000000 --- a/asm/non_matchings/code_8001F980/func_800230E4.s +++ /dev/null @@ -1,70 +0,0 @@ -glabel func_800230E4 -/* 023CE4 800230E4 3C18800E */ lui $t8, %hi(gCurrentCourseId) # $t8, 0x800e -/* 023CE8 800230E8 8718C5A0 */ lh $t8, %lo(gCurrentCourseId)($t8) -/* 023CEC 800230EC 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 023CF0 800230F0 00057600 */ sll $t6, $a1, 0x18 -/* 023CF4 800230F4 000E7E03 */ sra $t7, $t6, 0x18 -/* 023CF8 800230F8 AFA5001C */ sw $a1, 0x1c($sp) -/* 023CFC 800230FC 24010008 */ li $at, 8 -/* 023D00 80023100 01E02825 */ move $a1, $t7 -/* 023D04 80023104 AFBF0014 */ sw $ra, 0x14($sp) -/* 023D08 80023108 1701002E */ bne $t8, $at, .L800231C4 -/* 023D0C 8002310C AFA40018 */ sw $a0, 0x18($sp) -/* 023D10 80023110 000FC840 */ sll $t9, $t7, 1 -/* 023D14 80023114 3C028016 */ lui $v0, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 023D18 80023118 00591021 */ addu $v0, $v0, $t9 -/* 023D1C 8002311C 94424438 */ lhu $v0, %lo(gNearestWaypointByPlayerId)($v0) # 0x4438 -/* 023D20 80023120 2841014F */ slti $at, $v0, 0x14f -/* 023D24 80023124 14200002 */ bnez $at, .L80023130 -/* 023D28 80023128 28410158 */ slti $at, $v0, 0x158 -/* 023D2C 8002312C 14200010 */ bnez $at, .L80023170 -.L80023130: -/* 023D30 80023130 2841015E */ slti $at, $v0, 0x15e -/* 023D34 80023134 14200002 */ bnez $at, .L80023140 -/* 023D38 80023138 28410164 */ slti $at, $v0, 0x164 -/* 023D3C 8002313C 1420000C */ bnez $at, .L80023170 -.L80023140: -/* 023D40 80023140 28410169 */ slti $at, $v0, 0x169 -/* 023D44 80023144 14200002 */ bnez $at, .L80023150 -/* 023D48 80023148 28410170 */ slti $at, $v0, 0x170 -/* 023D4C 8002314C 14200008 */ bnez $at, .L80023170 -.L80023150: -/* 023D50 80023150 28410174 */ slti $at, $v0, 0x174 -/* 023D54 80023154 14200002 */ bnez $at, .L80023160 -/* 023D58 80023158 2841017A */ slti $at, $v0, 0x17a -/* 023D5C 8002315C 14200004 */ bnez $at, .L80023170 -.L80023160: -/* 023D60 80023160 2841017E */ slti $at, $v0, 0x17e -/* 023D64 80023164 14200015 */ bnez $at, .L800231BC -/* 023D68 80023168 28410184 */ slti $at, $v0, 0x184 -/* 023D6C 8002316C 10200013 */ beqz $at, .L800231BC -.L80023170: -/* 023D70 80023170 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023D74 80023174 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023D78 80023178 8FA40018 */ lw $a0, 0x18($sp) -/* 023D7C 8002317C 3C06001C */ lui $a2, 0x1c -/* 023D80 80023180 0C008BC5 */ jal func_80022F14 -/* 023D84 80023184 A3A5001F */ sb $a1, 0x1f($sp) -/* 023D88 80023188 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023D8C 8002318C 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023D90 80023190 8FA40018 */ lw $a0, 0x18($sp) -/* 023D94 80023194 83A5001F */ lb $a1, 0x1f($sp) -/* 023D98 80023198 0C008C0E */ jal func_80023038 -/* 023D9C 8002319C 240600E0 */ li $a2, 224 -/* 023DA0 800231A0 83A8001F */ lb $t0, 0x1f($sp) -/* 023DA4 800231A4 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 023DA8 800231A8 24020001 */ li $v0, 1 -/* 023DAC 800231AC 00084880 */ sll $t1, $t0, 2 -/* 023DB0 800231B0 00290821 */ addu $at, $at, $t1 -/* 023DB4 800231B4 10000004 */ b .L800231C8 -/* 023DB8 800231B8 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L800231BC: -/* 023DBC 800231BC 10000002 */ b .L800231C8 -/* 023DC0 800231C0 00001025 */ move $v0, $zero -.L800231C4: -/* 023DC4 800231C4 00001025 */ move $v0, $zero -.L800231C8: -/* 023DC8 800231C8 8FBF0014 */ lw $ra, 0x14($sp) -/* 023DCC 800231CC 27BD0018 */ addiu $sp, $sp, 0x18 -/* 023DD0 800231D0 03E00008 */ jr $ra -/* 023DD4 800231D4 00000000 */ nop diff --git a/asm/non_matchings/code_8001F980/func_800231D8.s b/asm/non_matchings/code_8001F980/func_800231D8.s deleted file mode 100644 index 25442383f..000000000 --- a/asm/non_matchings/code_8001F980/func_800231D8.s +++ /dev/null @@ -1,281 +0,0 @@ -glabel func_800231D8 -/* 023DD8 800231D8 3C02800E */ lui $v0, %hi(gCurrentCourseId) # $v0, 0x800e -/* 023DDC 800231DC 8442C5A0 */ lh $v0, %lo(gCurrentCourseId)($v0) -/* 023DE0 800231E0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 023DE4 800231E4 AFA5001C */ sw $a1, 0x1c($sp) -/* 023DE8 800231E8 00057600 */ sll $t6, $a1, 0x18 -/* 023DEC 800231EC 24010002 */ li $at, 2 -/* 023DF0 800231F0 000E2E03 */ sra $a1, $t6, 0x18 -/* 023DF4 800231F4 10410006 */ beq $v0, $at, .L80023210 -/* 023DF8 800231F8 AFBF0014 */ sw $ra, 0x14($sp) -/* 023DFC 800231FC 24010003 */ li $at, 3 -/* 023E00 80023200 10410067 */ beq $v0, $at, .L800233A0 -/* 023E04 80023204 00056840 */ sll $t5, $a1, 1 -/* 023E08 80023208 100000D4 */ b .L8002355C -/* 023E0C 8002320C 00003025 */ move $a2, $zero -.L80023210: -/* 023E10 80023210 0005C040 */ sll $t8, $a1, 1 -/* 023E14 80023214 3C028016 */ lui $v0, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 023E18 80023218 00581021 */ addu $v0, $v0, $t8 -/* 023E1C 8002321C 94424438 */ lhu $v0, %lo(gNearestWaypointByPlayerId)($v0) # 0x4438 -/* 023E20 80023220 28410015 */ slti $at, $v0, 0x15 -/* 023E24 80023224 14200002 */ bnez $at, .L80023230 -/* 023E28 80023228 2841002A */ slti $at, $v0, 0x2a -/* 023E2C 8002322C 1420000F */ bnez $at, .L8002326C -.L80023230: -/* 023E30 80023230 2841014D */ slti $at, $v0, 0x14d -/* 023E34 80023234 14200002 */ bnez $at, .L80023240 -/* 023E38 80023238 2841015C */ slti $at, $v0, 0x15c -/* 023E3C 8002323C 1420000B */ bnez $at, .L8002326C -.L80023240: -/* 023E40 80023240 284101D1 */ slti $at, $v0, 0x1d1 -/* 023E44 80023244 14200002 */ bnez $at, .L80023250 -/* 023E48 80023248 284101E4 */ slti $at, $v0, 0x1e4 -/* 023E4C 8002324C 14200007 */ bnez $at, .L8002326C -.L80023250: -/* 023E50 80023250 3C0143FA */ li $at, 0x43FA0000 # 500.000000 -/* 023E54 80023254 44813000 */ mtc1 $at, $f6 -/* 023E58 80023258 C4840124 */ lwc1 $f4, 0x124($a0) -/* 023E5C 8002325C 284100F1 */ slti $at, $v0, 0xf1 -/* 023E60 80023260 4604303E */ c.le.s $f6, $f4 -/* 023E64 80023264 00000000 */ nop -/* 023E68 80023268 45000012 */ bc1f .L800232B4 -.L8002326C: -/* 023E6C 8002326C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023E70 80023270 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023E74 80023274 3C060034 */ lui $a2, 0x34 -/* 023E78 80023278 AFA40018 */ sw $a0, 0x18($sp) -/* 023E7C 8002327C 0C008BC5 */ jal func_80022F14 -/* 023E80 80023280 A3A5001F */ sb $a1, 0x1f($sp) -/* 023E84 80023284 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023E88 80023288 8FA40018 */ lw $a0, 0x18($sp) -/* 023E8C 8002328C 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023E90 80023290 83A5001F */ lb $a1, 0x1f($sp) -/* 023E94 80023294 0C008C0E */ jal func_80023038 -/* 023E98 80023298 24064040 */ li $a2, 16448 -/* 023E9C 8002329C 83B9001F */ lb $t9, 0x1f($sp) -/* 023EA0 800232A0 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 023EA4 800232A4 00194080 */ sll $t0, $t9, 2 -/* 023EA8 800232A8 00280821 */ addu $at, $at, $t0 -/* 023EAC 800232AC 100000BB */ b .L8002359C -/* 023EB0 800232B0 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L800232B4: -/* 023EB4 800232B4 14200002 */ bnez $at, .L800232C0 -/* 023EB8 800232B8 284100F5 */ slti $at, $v0, 0xf5 -/* 023EBC 800232BC 14200015 */ bnez $at, .L80023314 -.L800232C0: -/* 023EC0 800232C0 284100FB */ slti $at, $v0, 0xfb -/* 023EC4 800232C4 14200002 */ bnez $at, .L800232D0 -/* 023EC8 800232C8 284100FF */ slti $at, $v0, 0xff -/* 023ECC 800232CC 14200011 */ bnez $at, .L80023314 -.L800232D0: -/* 023ED0 800232D0 28410105 */ slti $at, $v0, 0x105 -/* 023ED4 800232D4 14200002 */ bnez $at, .L800232E0 -/* 023ED8 800232D8 28410109 */ slti $at, $v0, 0x109 -/* 023EDC 800232DC 1420000D */ bnez $at, .L80023314 -.L800232E0: -/* 023EE0 800232E0 2841010F */ slti $at, $v0, 0x10f -/* 023EE4 800232E4 14200002 */ bnez $at, .L800232F0 -/* 023EE8 800232E8 28410113 */ slti $at, $v0, 0x113 -/* 023EEC 800232EC 14200009 */ bnez $at, .L80023314 -.L800232F0: -/* 023EF0 800232F0 28410145 */ slti $at, $v0, 0x145 -/* 023EF4 800232F4 14200002 */ bnez $at, .L80023300 -/* 023EF8 800232F8 2841014A */ slti $at, $v0, 0x14a -/* 023EFC 800232FC 14200005 */ bnez $at, .L80023314 -.L80023300: -/* 023F00 80023300 2841015E */ slti $at, $v0, 0x15e -/* 023F04 80023304 14200015 */ bnez $at, .L8002335C -/* 023F08 80023308 00003025 */ move $a2, $zero -/* 023F0C 8002330C 28410163 */ slti $at, $v0, 0x163 -/* 023F10 80023310 10200012 */ beqz $at, .L8002335C -.L80023314: -/* 023F14 80023314 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023F18 80023318 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023F1C 8002331C 3C06001C */ lui $a2, 0x1c -/* 023F20 80023320 AFA40018 */ sw $a0, 0x18($sp) -/* 023F24 80023324 0C008BC5 */ jal func_80022F14 -/* 023F28 80023328 A3A5001F */ sb $a1, 0x1f($sp) -/* 023F2C 8002332C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023F30 80023330 8FA40018 */ lw $a0, 0x18($sp) -/* 023F34 80023334 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023F38 80023338 83A5001F */ lb $a1, 0x1f($sp) -/* 023F3C 8002333C 0C008C0E */ jal func_80023038 -/* 023F40 80023340 240600E0 */ li $a2, 224 -/* 023F44 80023344 83A9001F */ lb $t1, 0x1f($sp) -/* 023F48 80023348 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 023F4C 8002334C 00095080 */ sll $t2, $t1, 2 -/* 023F50 80023350 002A0821 */ addu $at, $at, $t2 -/* 023F54 80023354 10000091 */ b .L8002359C -/* 023F58 80023358 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80($at) -.L8002335C: -/* 023F5C 8002335C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023F60 80023360 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023F64 80023364 AFA40018 */ sw $a0, 0x18($sp) -/* 023F68 80023368 0C008BC5 */ jal func_80022F14 -/* 023F6C 8002336C A3A5001F */ sb $a1, 0x1f($sp) -/* 023F70 80023370 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 023F74 80023374 8FA40018 */ lw $a0, 0x18($sp) -/* 023F78 80023378 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 023F7C 8002337C 83A5001F */ lb $a1, 0x1f($sp) -/* 023F80 80023380 0C008C0E */ jal func_80023038 -/* 023F84 80023384 00003025 */ move $a2, $zero -/* 023F88 80023388 83AB001F */ lb $t3, 0x1f($sp) -/* 023F8C 8002338C 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 023F90 80023390 000B6080 */ sll $t4, $t3, 2 -/* 023F94 80023394 002C0821 */ addu $at, $at, $t4 -/* 023F98 80023398 10000080 */ b .L8002359C -/* 023F9C 8002339C AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L800233A0: -/* 023FA0 800233A0 3C028016 */ lui $v0, %hi(gNearestWaypointByPlayerId) # 0x8016 -/* 023FA4 800233A4 004D1021 */ addu $v0, $v0, $t5 -/* 023FA8 800233A8 94424438 */ lhu $v0, %lo(gNearestWaypointByPlayerId)($v0) # 0x4438 -/* 023FAC 800233AC 2841000D */ slti $at, $v0, 0xd -/* 023FB0 800233B0 14200002 */ bnez $at, .L800233BC -/* 023FB4 800233B4 28410015 */ slti $at, $v0, 0x15 -/* 023FB8 800233B8 14200045 */ bnez $at, .L800234D0 -.L800233BC: -/* 023FBC 800233BC 28410029 */ slti $at, $v0, 0x29 -/* 023FC0 800233C0 14200002 */ bnez $at, .L800233CC -/* 023FC4 800233C4 28410039 */ slti $at, $v0, 0x39 -/* 023FC8 800233C8 14200041 */ bnez $at, .L800234D0 -.L800233CC: -/* 023FCC 800233CC 28410046 */ slti $at, $v0, 0x46 -/* 023FD0 800233D0 14200002 */ bnez $at, .L800233DC -/* 023FD4 800233D4 2841004E */ slti $at, $v0, 0x4e -/* 023FD8 800233D8 1420003D */ bnez $at, .L800234D0 -.L800233DC: -/* 023FDC 800233DC 2841005F */ slti $at, $v0, 0x5f -/* 023FE0 800233E0 14200002 */ bnez $at, .L800233EC -/* 023FE4 800233E4 28410067 */ slti $at, $v0, 0x67 -/* 023FE8 800233E8 14200039 */ bnez $at, .L800234D0 -.L800233EC: -/* 023FEC 800233EC 2841007B */ slti $at, $v0, 0x7b -/* 023FF0 800233F0 14200002 */ bnez $at, .L800233FC -/* 023FF4 800233F4 28410086 */ slti $at, $v0, 0x86 -/* 023FF8 800233F8 14200035 */ bnez $at, .L800234D0 -.L800233FC: -/* 023FFC 800233FC 2841009D */ slti $at, $v0, 0x9d -/* 024000 80023400 14200002 */ bnez $at, .L8002340C -/* 024004 80023404 284100A6 */ slti $at, $v0, 0xa6 -/* 024008 80023408 14200031 */ bnez $at, .L800234D0 -.L8002340C: -/* 02400C 8002340C 284100B9 */ slti $at, $v0, 0xb9 -/* 024010 80023410 14200002 */ bnez $at, .L8002341C -/* 024014 80023414 284100C3 */ slti $at, $v0, 0xc3 -/* 024018 80023418 1420002D */ bnez $at, .L800234D0 -.L8002341C: -/* 02401C 8002341C 284100B9 */ slti $at, $v0, 0xb9 -/* 024020 80023420 14200002 */ bnez $at, .L8002342C -/* 024024 80023424 284100C3 */ slti $at, $v0, 0xc3 -/* 024028 80023428 14200029 */ bnez $at, .L800234D0 -.L8002342C: -/* 02402C 8002342C 284100D7 */ slti $at, $v0, 0xd7 -/* 024030 80023430 14200002 */ bnez $at, .L8002343C -/* 024034 80023434 284100E1 */ slti $at, $v0, 0xe1 -/* 024038 80023438 14200025 */ bnez $at, .L800234D0 -.L8002343C: -/* 02403C 8002343C 2841010E */ slti $at, $v0, 0x10e -/* 024040 80023440 14200002 */ bnez $at, .L8002344C -/* 024044 80023444 28410119 */ slti $at, $v0, 0x119 -/* 024048 80023448 14200021 */ bnez $at, .L800234D0 -.L8002344C: -/* 02404C 8002344C 28410154 */ slti $at, $v0, 0x154 -/* 024050 80023450 14200002 */ bnez $at, .L8002345C -/* 024054 80023454 2841015F */ slti $at, $v0, 0x15f -/* 024058 80023458 1420001D */ bnez $at, .L800234D0 -.L8002345C: -/* 02405C 8002345C 284101EF */ slti $at, $v0, 0x1ef -/* 024060 80023460 14200002 */ bnez $at, .L8002346C -/* 024064 80023464 284101F7 */ slti $at, $v0, 0x1f7 -/* 024068 80023468 14200019 */ bnez $at, .L800234D0 -.L8002346C: -/* 02406C 8002346C 28410202 */ slti $at, $v0, 0x202 -/* 024070 80023470 14200002 */ bnez $at, .L8002347C -/* 024074 80023474 28410209 */ slti $at, $v0, 0x209 -/* 024078 80023478 14200015 */ bnez $at, .L800234D0 -.L8002347C: -/* 02407C 8002347C 28410216 */ slti $at, $v0, 0x216 -/* 024080 80023480 14200002 */ bnez $at, .L8002348C -/* 024084 80023484 2841021D */ slti $at, $v0, 0x21d -/* 024088 80023488 14200011 */ bnez $at, .L800234D0 -.L8002348C: -/* 02408C 8002348C 28410230 */ slti $at, $v0, 0x230 -/* 024090 80023490 14200002 */ bnez $at, .L8002349C -/* 024094 80023494 2841023A */ slti $at, $v0, 0x23a -/* 024098 80023498 1420000D */ bnez $at, .L800234D0 -.L8002349C: -/* 02409C 8002349C 2841024C */ slti $at, $v0, 0x24c -/* 0240A0 800234A0 14200002 */ bnez $at, .L800234AC -/* 0240A4 800234A4 28410256 */ slti $at, $v0, 0x256 -/* 0240A8 800234A8 14200009 */ bnez $at, .L800234D0 -.L800234AC: -/* 0240AC 800234AC 28410288 */ slti $at, $v0, 0x288 -/* 0240B0 800234B0 14200002 */ bnez $at, .L800234BC -/* 0240B4 800234B4 28410269 */ slti $at, $v0, 0x269 -/* 0240B8 800234B8 14200005 */ bnez $at, .L800234D0 -.L800234BC: -/* 0240BC 800234BC 28410274 */ slti $at, $v0, 0x274 -/* 0240C0 800234C0 14200015 */ bnez $at, .L80023518 -/* 0240C4 800234C4 00003025 */ move $a2, $zero -/* 0240C8 800234C8 2841027E */ slti $at, $v0, 0x27e -/* 0240CC 800234CC 10200012 */ beqz $at, .L80023518 -.L800234D0: -/* 0240D0 800234D0 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 0240D4 800234D4 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 0240D8 800234D8 3C06001C */ lui $a2, 0x1c -/* 0240DC 800234DC AFA40018 */ sw $a0, 0x18($sp) -/* 0240E0 800234E0 0C008BC5 */ jal func_80022F14 -/* 0240E4 800234E4 A3A5001F */ sb $a1, 0x1f($sp) -/* 0240E8 800234E8 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 0240EC 800234EC 8FA40018 */ lw $a0, 0x18($sp) -/* 0240F0 800234F0 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 0240F4 800234F4 83A5001F */ lb $a1, 0x1f($sp) -/* 0240F8 800234F8 0C008C0E */ jal func_80023038 -/* 0240FC 800234FC 240600E0 */ li $a2, 224 -/* 024100 80023500 83AE001F */ lb $t6, 0x1f($sp) -/* 024104 80023504 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 024108 80023508 000E7880 */ sll $t7, $t6, 2 -/* 02410C 8002350C 002F0821 */ addu $at, $at, $t7 -/* 024110 80023510 10000022 */ b .L8002359C -/* 024114 80023514 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L80023518: -/* 024118 80023518 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 02411C 8002351C 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024120 80023520 AFA40018 */ sw $a0, 0x18($sp) -/* 024124 80023524 0C008BC5 */ jal func_80022F14 -/* 024128 80023528 A3A5001F */ sb $a1, 0x1f($sp) -/* 02412C 8002352C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 024130 80023530 8FA40018 */ lw $a0, 0x18($sp) -/* 024134 80023534 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024138 80023538 83A5001F */ lb $a1, 0x1f($sp) -/* 02413C 8002353C 0C008C0E */ jal func_80023038 -/* 024140 80023540 00003025 */ move $a2, $zero -/* 024144 80023544 83B8001F */ lb $t8, 0x1f($sp) -/* 024148 80023548 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 02414C 8002354C 0018C880 */ sll $t9, $t8, 2 -/* 024150 80023550 00390821 */ addu $at, $at, $t9 -/* 024154 80023554 10000011 */ b .L8002359C -/* 024158 80023558 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L8002355C: -/* 02415C 8002355C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 024160 80023560 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024164 80023564 AFA40018 */ sw $a0, 0x18($sp) -/* 024168 80023568 0C008BC5 */ jal func_80022F14 -/* 02416C 8002356C A3A5001F */ sb $a1, 0x1f($sp) -/* 024170 80023570 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 024174 80023574 8FA40018 */ lw $a0, 0x18($sp) -/* 024178 80023578 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 02417C 8002357C 83A5001F */ lb $a1, 0x1f($sp) -/* 024180 80023580 0C008C0E */ jal func_80023038 -/* 024184 80023584 00003025 */ move $a2, $zero -/* 024188 80023588 83A8001F */ lb $t0, 0x1f($sp) -/* 02418C 8002358C 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 024190 80023590 00084880 */ sll $t1, $t0, 2 -/* 024194 80023594 00290821 */ addu $at, $at, $t1 -/* 024198 80023598 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L8002359C: -/* 02419C 8002359C 8FBF0014 */ lw $ra, 0x14($sp) -/* 0241A0 800235A0 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0241A4 800235A4 03E00008 */ jr $ra -/* 0241A8 800235A8 00000000 */ nop diff --git a/asm/non_matchings/code_8001F980/func_800235AC.s b/asm/non_matchings/code_8001F980/func_800235AC.s deleted file mode 100644 index 0ae9516d2..000000000 --- a/asm/non_matchings/code_8001F980/func_800235AC.s +++ /dev/null @@ -1,423 +0,0 @@ -glabel func_800235AC -/* 0241AC 800235AC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0241B0 800235B0 AFBF001C */ sw $ra, 0x1c($sp) -/* 0241B4 800235B4 AFB10018 */ sw $s1, 0x18($sp) -/* 0241B8 800235B8 AFB00014 */ sw $s0, 0x14($sp) -/* 0241BC 800235BC AFA50034 */ sw $a1, 0x34($sp) -/* 0241C0 800235C0 948F0000 */ lhu $t7, ($a0) -/* 0241C4 800235C4 00058E00 */ sll $s1, $a1, 0x18 -/* 0241C8 800235C8 00117603 */ sra $t6, $s1, 0x18 -/* 0241CC 800235CC 24010100 */ li $at, 256 -/* 0241D0 800235D0 31F80100 */ andi $t8, $t7, 0x100 -/* 0241D4 800235D4 01C08825 */ move $s1, $t6 -/* 0241D8 800235D8 17010018 */ bne $t8, $at, .L8002363C -/* 0241DC 800235DC 00808025 */ move $s0, $a0 -/* 0241E0 800235E0 3C19800E */ lui $t9, %hi(gPlayerThree) # $t9, 0x800e -/* 0241E4 800235E4 8F39C4E4 */ lw $t9, %lo(gPlayerThree)($t9) -/* 0241E8 800235E8 000E2E00 */ sll $a1, $t6, 0x18 -/* 0241EC 800235EC 00054603 */ sra $t0, $a1, 0x18 -/* 0241F0 800235F0 14990012 */ bne $a0, $t9, .L8002363C -/* 0241F4 800235F4 01002825 */ move $a1, $t0 -/* 0241F8 800235F8 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 0241FC 800235FC 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024200 80023600 0C008BC5 */ jal func_80022F14 -/* 024204 80023604 3C06001C */ lui $a2, 0x1c -/* 024208 80023608 00112E00 */ sll $a1, $s1, 0x18 -/* 02420C 8002360C 00054E03 */ sra $t1, $a1, 0x18 -/* 024210 80023610 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 024214 80023614 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024218 80023618 01202825 */ move $a1, $t1 -/* 02421C 8002361C 02002025 */ move $a0, $s0 -/* 024220 80023620 0C008C0E */ jal func_80023038 -/* 024224 80023624 240600E0 */ li $a2, 224 -/* 024228 80023628 00115080 */ sll $t2, $s1, 2 -/* 02422C 8002362C 3C018016 */ lui $at, %hi(D_80164B80) # 0x8016 -/* 024230 80023630 002A0821 */ addu $at, $at, $t2 -/* 024234 80023634 10000169 */ b .L80023BDC -/* 024238 80023638 AC204B80 */ sw $zero, %lo(D_80164B80)($at) # 0x4b80 -.L8002363C: -/* 02423C 8002363C 860200CA */ lh $v0, 0xca($s0) -/* 024240 80023640 24040010 */ li $a0, 16 -/* 024244 80023644 24010004 */ li $at, 4 -/* 024248 80023648 30430010 */ andi $v1, $v0, 0x10 -/* 02424C 8002364C 14830014 */ bne $a0, $v1, .L800236A0 -/* 024250 80023650 304B0004 */ andi $t3, $v0, 4 -/* 024254 80023654 15610012 */ bne $t3, $at, .L800236A0 -/* 024258 80023658 00112E00 */ sll $a1, $s1, 0x18 -/* 02425C 8002365C 00056603 */ sra $t4, $a1, 0x18 -/* 024260 80023660 3C060064 */ lui $a2, (0x00646464 >> 16) # lui $a2, 0x64 -/* 024264 80023664 34C66464 */ ori $a2, (0x00646464 & 0xFFFF) # ori $a2, $a2, 0x6464 -/* 024268 80023668 01802825 */ move $a1, $t4 -/* 02426C 8002366C 02002025 */ move $a0, $s0 -/* 024270 80023670 0C008BC5 */ jal func_80022F14 -/* 024274 80023674 3C073F00 */ lui $a3, 0x3f00 -/* 024278 80023678 00112E00 */ sll $a1, $s1, 0x18 -/* 02427C 8002367C 00056E03 */ sra $t5, $a1, 0x18 -/* 024280 80023680 3C073DCC */ lui $a3, (0x3DCCCCCD >> 16) # lui $a3, 0x3dcc -/* 024284 80023684 34E7CCCD */ ori $a3, (0x3DCCCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024288 80023688 01A02825 */ move $a1, $t5 -/* 02428C 8002368C 02002025 */ move $a0, $s0 -/* 024290 80023690 0C008C0E */ jal func_80023038 -/* 024294 80023694 3C0600FF */ lui $a2, 0xff -/* 024298 80023698 10000151 */ b .L80023BE0 -/* 02429C 8002369C 8FBF001C */ lw $ra, 0x1c($sp) -.L800236A0: -/* 0242A0 800236A0 304E0004 */ andi $t6, $v0, 4 -/* 0242A4 800236A4 24010004 */ li $at, 4 -/* 0242A8 800236A8 15C10010 */ bne $t6, $at, .L800236EC -/* 0242AC 800236AC 00112E00 */ sll $a1, $s1, 0x18 -/* 0242B0 800236B0 00057E03 */ sra $t7, $a1, 0x18 -/* 0242B4 800236B4 01E02825 */ move $a1, $t7 -/* 0242B8 800236B8 02002025 */ move $a0, $s0 -/* 0242BC 800236BC 00003025 */ move $a2, $zero -/* 0242C0 800236C0 0C008BC5 */ jal func_80022F14 -/* 0242C4 800236C4 3C073F80 */ lui $a3, 0x3f80 -/* 0242C8 800236C8 00112E00 */ sll $a1, $s1, 0x18 -/* 0242CC 800236CC 0005C603 */ sra $t8, $a1, 0x18 -/* 0242D0 800236D0 03002825 */ move $a1, $t8 -/* 0242D4 800236D4 02002025 */ move $a0, $s0 -/* 0242D8 800236D8 00003025 */ move $a2, $zero -/* 0242DC 800236DC 0C008C0E */ jal func_80023038 -/* 0242E0 800236E0 3C073F80 */ lui $a3, 0x3f80 -/* 0242E4 800236E4 1000013E */ b .L80023BE0 -/* 0242E8 800236E8 8FBF001C */ lw $ra, 0x1c($sp) -.L800236EC: -/* 0242EC 800236EC 14830013 */ bne $a0, $v1, .L8002373C -/* 0242F0 800236F0 30490020 */ andi $t1, $v0, 0x20 -/* 0242F4 800236F4 00112E00 */ sll $a1, $s1, 0x18 -/* 0242F8 800236F8 0005CE03 */ sra $t9, $a1, 0x18 -/* 0242FC 800236FC 3C060064 */ lui $a2, (0x00646464 >> 16) # lui $a2, 0x64 -/* 024300 80023700 34C66464 */ ori $a2, (0x00646464 & 0xFFFF) # ori $a2, $a2, 0x6464 -/* 024304 80023704 03202825 */ move $a1, $t9 -/* 024308 80023708 02002025 */ move $a0, $s0 -/* 02430C 8002370C 0C008BC5 */ jal func_80022F14 -/* 024310 80023710 3C073F00 */ lui $a3, 0x3f00 -/* 024314 80023714 00112E00 */ sll $a1, $s1, 0x18 -/* 024318 80023718 00054603 */ sra $t0, $a1, 0x18 -/* 02431C 8002371C 3C073DCC */ lui $a3, (0x3DCCCCCD >> 16) # lui $a3, 0x3dcc -/* 024320 80023720 34E7CCCD */ ori $a3, (0x3DCCCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024324 80023724 01002825 */ move $a1, $t0 -/* 024328 80023728 02002025 */ move $a0, $s0 -/* 02432C 8002372C 0C008C0E */ jal func_80023038 -/* 024330 80023730 3C0600FF */ lui $a2, 0xff -/* 024334 80023734 1000012A */ b .L80023BE0 -/* 024338 80023738 8FBF001C */ lw $ra, 0x1c($sp) -.L8002373C: -/* 02433C 8002373C 24010020 */ li $at, 32 -/* 024340 80023740 15210012 */ bne $t1, $at, .L8002378C -/* 024344 80023744 02002025 */ move $a0, $s0 -/* 024348 80023748 00112E00 */ sll $a1, $s1, 0x18 -/* 02434C 8002374C 00055603 */ sra $t2, $a1, 0x18 -/* 024350 80023750 3C073DCC */ lui $a3, (0x3DCCCCCD >> 16) # lui $a3, 0x3dcc -/* 024354 80023754 34E7CCCD */ ori $a3, (0x3DCCCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024358 80023758 01402825 */ move $a1, $t2 -/* 02435C 8002375C 0C008BC5 */ jal func_80022F14 -/* 024360 80023760 00003025 */ move $a2, $zero -/* 024364 80023764 00112E00 */ sll $a1, $s1, 0x18 -/* 024368 80023768 00055E03 */ sra $t3, $a1, 0x18 -/* 02436C 8002376C 3C073DCC */ lui $a3, (0x3DCCCCCD >> 16) # lui $a3, 0x3dcc -/* 024370 80023770 34E7CCCD */ ori $a3, (0x3DCCCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024374 80023774 01602825 */ move $a1, $t3 -/* 024378 80023778 02002025 */ move $a0, $s0 -/* 02437C 8002377C 0C008C0E */ jal func_80023038 -/* 024380 80023780 00003025 */ move $a2, $zero -/* 024384 80023784 10000116 */ b .L80023BE0 -/* 024388 80023788 8FBF001C */ lw $ra, 0x1c($sp) -.L8002378C: -/* 02438C 8002378C 8E0200BC */ lw $v0, 0xbc($s0) -/* 024390 80023790 3C034000 */ lui $v1, 0x4000 -/* 024394 80023794 00436024 */ and $t4, $v0, $v1 -/* 024398 80023798 146C0055 */ bne $v1, $t4, .L800238F0 -/* 02439C 8002379C 304E0200 */ andi $t6, $v0, 0x200 -/* 0243A0 800237A0 860D00B0 */ lh $t5, 0xb0($s0) -/* 0243A4 800237A4 3C0F8016 */ lui $t7, %hi(D_80164B80) # $t7, 0x8016 -/* 0243A8 800237A8 25EF4B80 */ addiu $t7, %lo(D_80164B80) # addiu $t7, $t7, 0x4b80 -/* 0243AC 800237AC 29A10078 */ slti $at, $t5, 0x78 -/* 0243B0 800237B0 1020004F */ beqz $at, .L800238F0 -/* 0243B4 800237B4 00000000 */ nop -/* 0243B8 800237B8 00117080 */ sll $t6, $s1, 2 -/* 0243BC 800237BC 01CF1821 */ addu $v1, $t6, $t7 -/* 0243C0 800237C0 8C780000 */ lw $t8, ($v1) -/* 0243C4 800237C4 27020005 */ addiu $v0, $t8, 5 -/* 0243C8 800237C8 2841001E */ slti $at, $v0, 0x1e -/* 0243CC 800237CC 14200003 */ bnez $at, .L800237DC -/* 0243D0 800237D0 AC620000 */ sw $v0, ($v1) -/* 0243D4 800237D4 AC600000 */ sw $zero, ($v1) -/* 0243D8 800237D8 00001025 */ move $v0, $zero -.L800237DC: -/* 0243DC 800237DC 04400016 */ bltz $v0, .L80023838 -/* 0243E0 800237E0 2841000B */ slti $at, $v0, 0xb -/* 0243E4 800237E4 10200014 */ beqz $at, .L80023838 -/* 0243E8 800237E8 02002025 */ move $a0, $s0 -/* 0243EC 800237EC 00112E00 */ sll $a1, $s1, 0x18 -/* 0243F0 800237F0 00054603 */ sra $t0, $a1, 0x18 -/* 0243F4 800237F4 3C060080 */ lui $a2, (0x00808080 >> 16) # lui $a2, 0x80 -/* 0243F8 800237F8 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0243FC 800237FC 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024400 80023800 34C68080 */ ori $a2, (0x00808080 & 0xFFFF) # ori $a2, $a2, 0x8080 -/* 024404 80023804 01002825 */ move $a1, $t0 -/* 024408 80023808 0C008BC5 */ jal func_80022F14 -/* 02440C 8002380C AFA30024 */ sw $v1, 0x24($sp) -/* 024410 80023810 00112E00 */ sll $a1, $s1, 0x18 -/* 024414 80023814 00054E03 */ sra $t1, $a1, 0x18 -/* 024418 80023818 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 02441C 8002381C 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024420 80023820 01202825 */ move $a1, $t1 -/* 024424 80023824 02002025 */ move $a0, $s0 -/* 024428 80023828 0C008C0E */ jal func_80023038 -/* 02442C 8002382C 00003025 */ move $a2, $zero -/* 024430 80023830 8FA30024 */ lw $v1, 0x24($sp) -/* 024434 80023834 8C620000 */ lw $v0, ($v1) -.L80023838: -/* 024438 80023838 2841000B */ slti $at, $v0, 0xb -/* 02443C 8002383C 14200015 */ bnez $at, .L80023894 -/* 024440 80023840 28410015 */ slti $at, $v0, 0x15 -/* 024444 80023844 10200013 */ beqz $at, .L80023894 -/* 024448 80023848 02002025 */ move $a0, $s0 -/* 02444C 8002384C 00112E00 */ sll $a1, $s1, 0x18 -/* 024450 80023850 00055603 */ sra $t2, $a1, 0x18 -/* 024454 80023854 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 024458 80023858 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 02445C 8002385C 01402825 */ move $a1, $t2 -/* 024460 80023860 24060070 */ li $a2, 112 -/* 024464 80023864 0C008BC5 */ jal func_80022F14 -/* 024468 80023868 AFA30024 */ sw $v1, 0x24($sp) -/* 02446C 8002386C 00112E00 */ sll $a1, $s1, 0x18 -/* 024470 80023870 00055E03 */ sra $t3, $a1, 0x18 -/* 024474 80023874 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 024478 80023878 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 02447C 8002387C 01602825 */ move $a1, $t3 -/* 024480 80023880 02002025 */ move $a0, $s0 -/* 024484 80023884 0C008C0E */ jal func_80023038 -/* 024488 80023888 00003025 */ move $a2, $zero -/* 02448C 8002388C 8FA30024 */ lw $v1, 0x24($sp) -/* 024490 80023890 8C620000 */ lw $v0, ($v1) -.L80023894: -/* 024494 80023894 28410015 */ slti $at, $v0, 0x15 -/* 024498 80023898 142000D0 */ bnez $at, .L80023BDC -/* 02449C 8002389C 2841001F */ slti $at, $v0, 0x1f -/* 0244A0 800238A0 102000CE */ beqz $at, .L80023BDC -/* 0244A4 800238A4 02002025 */ move $a0, $s0 -/* 0244A8 800238A8 00112E00 */ sll $a1, $s1, 0x18 -/* 0244AC 800238AC 00056603 */ sra $t4, $a1, 0x18 -/* 0244B0 800238B0 3C06008F */ lui $a2, (0x008F8F00 >> 16) # lui $a2, 0x8f -/* 0244B4 800238B4 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0244B8 800238B8 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 0244BC 800238BC 34C68F00 */ ori $a2, (0x008F8F00 & 0xFFFF) # ori $a2, $a2, 0x8f00 -/* 0244C0 800238C0 0C008BC5 */ jal func_80022F14 -/* 0244C4 800238C4 01802825 */ move $a1, $t4 -/* 0244C8 800238C8 00112E00 */ sll $a1, $s1, 0x18 -/* 0244CC 800238CC 00056E03 */ sra $t5, $a1, 0x18 -/* 0244D0 800238D0 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0244D4 800238D4 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 0244D8 800238D8 01A02825 */ move $a1, $t5 -/* 0244DC 800238DC 02002025 */ move $a0, $s0 -/* 0244E0 800238E0 0C008C0E */ jal func_80023038 -/* 0244E4 800238E4 00003025 */ move $a2, $zero -/* 0244E8 800238E8 100000BD */ b .L80023BE0 -/* 0244EC 800238EC 8FBF001C */ lw $ra, 0x1c($sp) -.L800238F0: -/* 0244F0 800238F0 11C0007A */ beqz $t6, .L80023ADC -/* 0244F4 800238F4 3C01800E */ lui $at, %hi(gCourseTimer) # $at, 0x800e -/* 0244F8 800238F8 C424C598 */ lwc1 $f4, %lo(gCourseTimer)($at) -/* 0244FC 800238FC 00111080 */ sll $v0, $s1, 2 -/* 024500 80023900 3C198019 */ lui $t9, %hi(D_8018D930) # 0x8019 -/* 024504 80023904 4600218D */ trunc.w.s $f6, $f4 -/* 024508 80023908 0322C821 */ addu $t9, $t9, $v0 -/* 02450C 8002390C 8F39D930 */ lw $t9, %lo(D_8018D930)($t9) # -0x26d0 -/* 024510 80023910 44183000 */ mfc1 $t8, $f6 -/* 024514 80023914 00000000 */ nop -/* 024518 80023918 03191823 */ subu $v1, $t8, $t9 -/* 02451C 8002391C 28610009 */ slti $at, $v1, 9 -/* 024520 80023920 1020006E */ beqz $at, .L80023ADC -/* 024524 80023924 28610007 */ slti $at, $v1, 7 -/* 024528 80023928 14200008 */ bnez $at, .L8002394C -/* 02452C 8002392C 3C0B8016 */ lui $t3, %hi(D_80164B80) # $t3, 0x8016 -/* 024530 80023930 3C088016 */ lui $t0, %hi(D_80164B80) # $t0, 0x8016 -/* 024534 80023934 25084B80 */ addiu $t0, %lo(D_80164B80) # addiu $t0, $t0, 0x4b80 -/* 024538 80023938 00481821 */ addu $v1, $v0, $t0 -/* 02453C 8002393C 8C690000 */ lw $t1, ($v1) -/* 024540 80023940 252A000A */ addiu $t2, $t1, 0xa -/* 024544 80023944 10000006 */ b .L80023960 -/* 024548 80023948 AC6A0000 */ sw $t2, ($v1) -.L8002394C: -/* 02454C 8002394C 256B4B80 */ addiu $t3, %lo(D_80164B80) # addiu $t3, $t3, 0x4b80 -/* 024550 80023950 004B1821 */ addu $v1, $v0, $t3 -/* 024554 80023954 8C6C0000 */ lw $t4, ($v1) -/* 024558 80023958 258D0005 */ addiu $t5, $t4, 5 -/* 02455C 8002395C AC6D0000 */ sw $t5, ($v1) -.L80023960: -/* 024560 80023960 8C620000 */ lw $v0, ($v1) -/* 024564 80023964 28410028 */ slti $at, $v0, 0x28 -/* 024568 80023968 14200003 */ bnez $at, .L80023978 -/* 02456C 8002396C 00000000 */ nop -/* 024570 80023970 AC600000 */ sw $zero, ($v1) -/* 024574 80023974 00001025 */ move $v0, $zero -.L80023978: -/* 024578 80023978 04400015 */ bltz $v0, .L800239D0 -/* 02457C 8002397C 2841000B */ slti $at, $v0, 0xb -/* 024580 80023980 10200013 */ beqz $at, .L800239D0 -/* 024584 80023984 02002025 */ move $a0, $s0 -/* 024588 80023988 00112E00 */ sll $a1, $s1, 0x18 -/* 02458C 8002398C 00057603 */ sra $t6, $a1, 0x18 -/* 024590 80023990 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 024594 80023994 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024598 80023998 01C02825 */ move $a1, $t6 -/* 02459C 8002399C 24060070 */ li $a2, 112 -/* 0245A0 800239A0 0C008BC5 */ jal func_80022F14 -/* 0245A4 800239A4 AFA30024 */ sw $v1, 0x24($sp) -/* 0245A8 800239A8 00112E00 */ sll $a1, $s1, 0x18 -/* 0245AC 800239AC 00057E03 */ sra $t7, $a1, 0x18 -/* 0245B0 800239B0 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0245B4 800239B4 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 0245B8 800239B8 01E02825 */ move $a1, $t7 -/* 0245BC 800239BC 02002025 */ move $a0, $s0 -/* 0245C0 800239C0 0C008C0E */ jal func_80023038 -/* 0245C4 800239C4 00003025 */ move $a2, $zero -/* 0245C8 800239C8 8FA30024 */ lw $v1, 0x24($sp) -/* 0245CC 800239CC 8C620000 */ lw $v0, ($v1) -.L800239D0: -/* 0245D0 800239D0 2841000B */ slti $at, $v0, 0xb -/* 0245D4 800239D4 14200016 */ bnez $at, .L80023A30 -/* 0245D8 800239D8 28410015 */ slti $at, $v0, 0x15 -/* 0245DC 800239DC 10200014 */ beqz $at, .L80023A30 -/* 0245E0 800239E0 02002025 */ move $a0, $s0 -/* 0245E4 800239E4 00112E00 */ sll $a1, $s1, 0x18 -/* 0245E8 800239E8 0005C603 */ sra $t8, $a1, 0x18 -/* 0245EC 800239EC 3C060070 */ lui $a2, (0x00707000 >> 16) # lui $a2, 0x70 -/* 0245F0 800239F0 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0245F4 800239F4 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 0245F8 800239F8 34C67000 */ ori $a2, (0x00707000 & 0xFFFF) # ori $a2, $a2, 0x7000 -/* 0245FC 800239FC 03002825 */ move $a1, $t8 -/* 024600 80023A00 0C008BC5 */ jal func_80022F14 -/* 024604 80023A04 AFA30024 */ sw $v1, 0x24($sp) -/* 024608 80023A08 00112E00 */ sll $a1, $s1, 0x18 -/* 02460C 80023A0C 0005CE03 */ sra $t9, $a1, 0x18 -/* 024610 80023A10 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 024614 80023A14 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024618 80023A18 03202825 */ move $a1, $t9 -/* 02461C 80023A1C 02002025 */ move $a0, $s0 -/* 024620 80023A20 0C008C0E */ jal func_80023038 -/* 024624 80023A24 00003025 */ move $a2, $zero -/* 024628 80023A28 8FA30024 */ lw $v1, 0x24($sp) -/* 02462C 80023A2C 8C620000 */ lw $v0, ($v1) -.L80023A30: -/* 024630 80023A30 28410015 */ slti $at, $v0, 0x15 -/* 024634 80023A34 14200015 */ bnez $at, .L80023A8C -/* 024638 80023A38 2841001F */ slti $at, $v0, 0x1f -/* 02463C 80023A3C 10200013 */ beqz $at, .L80023A8C -/* 024640 80023A40 02002025 */ move $a0, $s0 -/* 024644 80023A44 00112E00 */ sll $a1, $s1, 0x18 -/* 024648 80023A48 00054603 */ sra $t0, $a1, 0x18 -/* 02464C 80023A4C 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 024650 80023A50 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024654 80023A54 01002825 */ move $a1, $t0 -/* 024658 80023A58 3C060070 */ lui $a2, 0x70 -/* 02465C 80023A5C 0C008BC5 */ jal func_80022F14 -/* 024660 80023A60 AFA30024 */ sw $v1, 0x24($sp) -/* 024664 80023A64 00112E00 */ sll $a1, $s1, 0x18 -/* 024668 80023A68 00054E03 */ sra $t1, $a1, 0x18 -/* 02466C 80023A6C 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 024670 80023A70 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 024674 80023A74 01202825 */ move $a1, $t1 -/* 024678 80023A78 02002025 */ move $a0, $s0 -/* 02467C 80023A7C 0C008C0E */ jal func_80023038 -/* 024680 80023A80 00003025 */ move $a2, $zero -/* 024684 80023A84 8FA30024 */ lw $v1, 0x24($sp) -/* 024688 80023A88 8C620000 */ lw $v0, ($v1) -.L80023A8C: -/* 02468C 80023A8C 2841001F */ slti $at, $v0, 0x1f -/* 024690 80023A90 14200052 */ bnez $at, .L80023BDC -/* 024694 80023A94 02002025 */ move $a0, $s0 -/* 024698 80023A98 00112E00 */ sll $a1, $s1, 0x18 -/* 02469C 80023A9C 00055603 */ sra $t2, $a1, 0x18 -/* 0246A0 80023AA0 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0246A4 80023AA4 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 0246A8 80023AA8 01402825 */ move $a1, $t2 -/* 0246AC 80023AAC 0C008BC5 */ jal func_80022F14 -/* 0246B0 80023AB0 24067000 */ li $a2, 28672 -/* 0246B4 80023AB4 00112E00 */ sll $a1, $s1, 0x18 -/* 0246B8 80023AB8 00055E03 */ sra $t3, $a1, 0x18 -/* 0246BC 80023ABC 3C073F4C */ lui $a3, (0x3F4CCCCD >> 16) # lui $a3, 0x3f4c -/* 0246C0 80023AC0 34E7CCCD */ ori $a3, (0x3F4CCCCD & 0xFFFF) # ori $a3, $a3, 0xcccd -/* 0246C4 80023AC4 01602825 */ move $a1, $t3 -/* 0246C8 80023AC8 02002025 */ move $a0, $s0 -/* 0246CC 80023ACC 0C008C0E */ jal func_80023038 -/* 0246D0 80023AD0 00003025 */ move $a2, $zero -/* 0246D4 80023AD4 10000042 */ b .L80023BE0 -/* 0246D8 80023AD8 8FBF001C */ lw $ra, 0x1c($sp) -.L80023ADC: -/* 0246DC 80023ADC 00112E00 */ sll $a1, $s1, 0x18 -/* 0246E0 80023AE0 00056603 */ sra $t4, $a1, 0x18 -/* 0246E4 80023AE4 01802825 */ move $a1, $t4 -/* 0246E8 80023AE8 0C008C39 */ jal func_800230E4 -/* 0246EC 80023AEC 02002025 */ move $a0, $s0 -/* 0246F0 80023AF0 24030001 */ li $v1, 1 -/* 0246F4 80023AF4 5043003A */ beql $v0, $v1, .L80023BE0 -/* 0246F8 80023AF8 8FBF001C */ lw $ra, 0x1c($sp) -/* 0246FC 80023AFC 8E0201F4 */ lw $v0, 0x1f4($s0) -/* 024700 80023B00 24010002 */ li $at, 2 -/* 024704 80023B04 02002025 */ move $a0, $s0 -/* 024708 80023B08 304D0001 */ andi $t5, $v0, 1 -/* 02470C 80023B0C 106D0009 */ beq $v1, $t5, .L80023B34 -/* 024710 80023B10 304E0002 */ andi $t6, $v0, 2 -/* 024714 80023B14 51C10008 */ beql $t6, $at, .L80023B38 -/* 024718 80023B18 00112E00 */ sll $a1, $s1, 0x18 -/* 02471C 80023B1C 8E0F01AC */ lw $t7, 0x1ac($s0) -/* 024720 80023B20 24010003 */ li $at, 3 -/* 024724 80023B24 00112E00 */ sll $a1, $s1, 0x18 -/* 024728 80023B28 31F80003 */ andi $t8, $t7, 3 -/* 02472C 80023B2C 17010013 */ bne $t8, $at, .L80023B7C -/* 024730 80023B30 00054E03 */ sra $t1, $a1, 0x18 -.L80023B34: -/* 024734 80023B34 00112E00 */ sll $a1, $s1, 0x18 -.L80023B38: -/* 024738 80023B38 0005CE03 */ sra $t9, $a1, 0x18 -/* 02473C 80023B3C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 024740 80023B40 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024744 80023B44 03202825 */ move $a1, $t9 -/* 024748 80023B48 0C008BC5 */ jal func_80022F14 -/* 02474C 80023B4C 00003025 */ move $a2, $zero -/* 024750 80023B50 00112E00 */ sll $a1, $s1, 0x18 -/* 024754 80023B54 00054603 */ sra $t0, $a1, 0x18 -/* 024758 80023B58 3C06006F */ lui $a2, (0x006F6F6F >> 16) # lui $a2, 0x6f -/* 02475C 80023B5C 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 024760 80023B60 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 024764 80023B64 34C66F6F */ ori $a2, (0x006F6F6F & 0xFFFF) # ori $a2, $a2, 0x6f6f -/* 024768 80023B68 01002825 */ move $a1, $t0 -/* 02476C 80023B6C 0C008C0E */ jal func_80023038 -/* 024770 80023B70 02002025 */ move $a0, $s0 -/* 024774 80023B74 1000001A */ b .L80023BE0 -/* 024778 80023B78 8FBF001C */ lw $ra, 0x1c($sp) -.L80023B7C: -/* 02477C 80023B7C 02002025 */ move $a0, $s0 -/* 024780 80023B80 0C008C76 */ jal func_800231D8 -/* 024784 80023B84 01202825 */ move $a1, $t1 -/* 024788 80023B88 860A00CA */ lh $t2, 0xca($s0) -/* 02478C 80023B8C 24011000 */ li $at, 4096 -/* 024790 80023B90 02002025 */ move $a0, $s0 -/* 024794 80023B94 314B1000 */ andi $t3, $t2, 0x1000 -/* 024798 80023B98 15610010 */ bne $t3, $at, .L80023BDC -/* 02479C 80023B9C 00112E00 */ sll $a1, $s1, 0x18 -/* 0247A0 80023BA0 00056603 */ sra $t4, $a1, 0x18 -/* 0247A4 80023BA4 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 0247A8 80023BA8 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 0247AC 80023BAC 01802825 */ move $a1, $t4 -/* 0247B0 80023BB0 0C008BC5 */ jal func_80022F14 -/* 0247B4 80023BB4 00003025 */ move $a2, $zero -/* 0247B8 80023BB8 00112E00 */ sll $a1, $s1, 0x18 -/* 0247BC 80023BBC 00056E03 */ sra $t5, $a1, 0x18 -/* 0247C0 80023BC0 3C0600F0 */ lui $a2, (0x00F0F0F0 >> 16) # lui $a2, 0xf0 -/* 0247C4 80023BC4 3C073E99 */ lui $a3, (0x3E99999A >> 16) # lui $a3, 0x3e99 -/* 0247C8 80023BC8 34E7999A */ ori $a3, (0x3E99999A & 0xFFFF) # ori $a3, $a3, 0x999a -/* 0247CC 80023BCC 34C6F0F0 */ ori $a2, (0x00F0F0F0 & 0xFFFF) # ori $a2, $a2, 0xf0f0 -/* 0247D0 80023BD0 01A02825 */ move $a1, $t5 -/* 0247D4 80023BD4 0C008C0E */ jal func_80023038 -/* 0247D8 80023BD8 02002025 */ move $a0, $s0 -.L80023BDC: -/* 0247DC 80023BDC 8FBF001C */ lw $ra, 0x1c($sp) -.L80023BE0: -/* 0247E0 80023BE0 8FB00014 */ lw $s0, 0x14($sp) -/* 0247E4 80023BE4 8FB10018 */ lw $s1, 0x18($sp) -/* 0247E8 80023BE8 03E00008 */ jr $ra -/* 0247EC 80023BEC 27BD0030 */ addiu $sp, $sp, 0x30 diff --git a/asm/non_matchings/code_8001F980/func_80023BF0.s b/asm/non_matchings/code_8001F980/func_80023BF0.s deleted file mode 100644 index ca6f9e1cf..000000000 --- a/asm/non_matchings/code_8001F980/func_80023BF0.s +++ /dev/null @@ -1,42 +0,0 @@ -glabel func_80023BF0 -/* 0247F0 80023BF0 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0247F4 80023BF4 AFBF0014 */ sw $ra, 0x14($sp) -/* 0247F8 80023BF8 AFA5001C */ sw $a1, 0x1c($sp) -/* 0247FC 80023BFC AFA60020 */ sw $a2, 0x20($sp) -/* 024800 80023C00 AFA70024 */ sw $a3, 0x24($sp) -/* 024804 80023C04 8C8200BC */ lw $v0, 0xbc($a0) -/* 024808 80023C08 3C030400 */ lui $v1, 0x400 -/* 02480C 80023C0C 83A60023 */ lb $a2, 0x23($sp) -/* 024810 80023C10 00437024 */ and $t6, $v0, $v1 -/* 024814 80023C14 106E0005 */ beq $v1, $t6, .L80023C2C -/* 024818 80023C18 83A5001F */ lb $a1, 0x1f($sp) -/* 02481C 80023C1C 3C030800 */ lui $v1, 0x800 -/* 024820 80023C20 00437824 */ and $t7, $v0, $v1 -/* 024824 80023C24 146F0006 */ bne $v1, $t7, .L80023C40 -/* 024828 80023C28 83A70027 */ lb $a3, 0x27($sp) -.L80023C2C: -/* 02482C 80023C2C 83A70027 */ lb $a3, 0x27($sp) -/* 024830 80023C30 0C008B2A */ jal func_80022CA8 -/* 024834 80023C34 AFA40018 */ sw $a0, 0x18($sp) -/* 024838 80023C38 10000006 */ b .L80023C54 -/* 02483C 80023C3C 8FA40018 */ lw $a0, 0x18($sp) -.L80023C40: -/* 024840 80023C40 83A5001F */ lb $a1, 0x1f($sp) -/* 024844 80023C44 83A60023 */ lb $a2, 0x23($sp) -/* 024848 80023C48 0C008BA1 */ jal func_80022E84 -/* 02484C 80023C4C AFA40018 */ sw $a0, 0x18($sp) -/* 024850 80023C50 8FA40018 */ lw $a0, 0x18($sp) -.L80023C54: -/* 024854 80023C54 849800CA */ lh $t8, 0xca($a0) -/* 024858 80023C58 24010002 */ li $at, 2 -/* 02485C 80023C5C 83A5001F */ lb $a1, 0x1f($sp) -/* 024860 80023C60 33190002 */ andi $t9, $t8, 2 -/* 024864 80023C64 17210003 */ bne $t9, $at, .L80023C74 -/* 024868 80023C68 83A60023 */ lb $a2, 0x23($sp) -/* 02486C 80023C6C 0C008B58 */ jal func_80022D60 -/* 024870 80023C70 83A70027 */ lb $a3, 0x27($sp) -.L80023C74: -/* 024874 80023C74 8FBF0014 */ lw $ra, 0x14($sp) -/* 024878 80023C78 27BD0018 */ addiu $sp, $sp, 0x18 -/* 02487C 80023C7C 03E00008 */ jr $ra -/* 024880 80023C80 00000000 */ nop diff --git a/asm/non_matchings/code_8001F980/func_80023C84.s b/asm/non_matchings/code_8001F980/func_80023C84.s deleted file mode 100644 index 30e8b769e..000000000 --- a/asm/non_matchings/code_8001F980/func_80023C84.s +++ /dev/null @@ -1,452 +0,0 @@ -glabel func_80023C84 -/* 024884 80023C84 27BDFEA8 */ addiu $sp, $sp, -0x158 -/* 024888 80023C88 AFA60160 */ sw $a2, 0x160($sp) -/* 02488C 80023C8C 83AE0163 */ lb $t6, 0x163($sp) -/* 024890 80023C90 AFBF0024 */ sw $ra, 0x24($sp) -/* 024894 80023C94 AFB10020 */ sw $s1, 0x20($sp) -/* 024898 80023C98 AFB0001C */ sw $s0, 0x1c($sp) -/* 02489C 80023C9C AFA5015C */ sw $a1, 0x15c($sp) -/* 0248A0 80023CA0 000E7840 */ sll $t7, $t6, 1 -/* 0248A4 80023CA4 008FC021 */ addu $t8, $a0, $t7 -/* 0248A8 80023CA8 87190048 */ lh $t9, 0x48($t8) -/* 0248AC 80023CAC 8482002E */ lh $v0, 0x2e($a0) -/* 0248B0 80023CB0 848300C0 */ lh $v1, 0xc0($a0) -/* 0248B4 80023CB4 00808825 */ move $s1, $a0 -/* 0248B8 80023CB8 00597021 */ addu $t6, $v0, $t9 -/* 0248BC 80023CBC 01C33821 */ addu $a3, $t6, $v1 -/* 0248C0 80023CC0 30EFFFFF */ andi $t7, $a3, 0xffff -/* 0248C4 80023CC4 01E03825 */ move $a3, $t7 -/* 0248C8 80023CC8 04E10003 */ bgez $a3, .L80023CD8 -/* 0248CC 80023CCC 0007C1C3 */ sra $t8, $a3, 7 -/* 0248D0 80023CD0 24E1007F */ addiu $at, $a3, 0x7f -/* 0248D4 80023CD4 0001C1C3 */ sra $t8, $at, 7 -.L80023CD8: -/* 0248D8 80023CD8 03007025 */ move $t6, $t8 -/* 0248DC 80023CDC 000E81C0 */ sll $s0, $t6, 7 -/* 0248E0 80023CE0 00027823 */ negu $t7, $v0 -/* 0248E4 80023CE4 3219FFFF */ andi $t9, $s0, 0xffff -/* 0248E8 80023CE8 01E3C023 */ subu $t8, $t7, $v1 -/* 0248EC 80023CEC A7B800C0 */ sh $t8, 0xc0($sp) -/* 0248F0 80023CF0 03208025 */ move $s0, $t9 -/* 0248F4 80023CF4 0C0AE00E */ jal coss -/* 0248F8 80023CF8 3324FFFF */ andi $a0, $t9, 0xffff -/* 0248FC 80023CFC 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 024900 80023D00 44813000 */ mtc1 $at, $f6 -/* 024904 80023D04 46000107 */ neg.s $f4, $f0 -/* 024908 80023D08 3204FFFF */ andi $a0, $s0, 0xffff -/* 02490C 80023D0C 46062202 */ mul.s $f8, $f4, $f6 -/* 024910 80023D10 0C0AE006 */ jal sins -/* 024914 80023D14 E7A800B0 */ swc1 $f8, 0xb0($sp) -/* 024918 80023D18 3C014000 */ li $at, 0x40000000 # 2.000000 -/* 02491C 80023D1C 44818000 */ mtc1 $at, $f16 -/* 024920 80023D20 46000287 */ neg.s $f10, $f0 -/* 024924 80023D24 3C030100 */ lui $v1, 0x100 -/* 024928 80023D28 46105482 */ mul.s $f18, $f10, $f16 -/* 02492C 80023D2C 24050400 */ li $a1, 1024 -/* 024930 80023D30 E7B200AC */ swc1 $f18, 0xac($sp) -/* 024934 80023D34 8E2200BC */ lw $v0, 0xbc($s1) -/* 024938 80023D38 00437024 */ and $t6, $v0, $v1 -/* 02493C 80023D3C 106E0019 */ beq $v1, $t6, .L80023DA4 -/* 024940 80023D40 30430400 */ andi $v1, $v0, 0x400 -/* 024944 80023D44 10A30017 */ beq $a1, $v1, .L80023DA4 -/* 024948 80023D48 3C040008 */ lui $a0, 8 -/* 02494C 80023D4C 00447824 */ and $t7, $v0, $a0 -/* 024950 80023D50 108F0014 */ beq $a0, $t7, .L80023DA4 -/* 024954 80023D54 3C040080 */ lui $a0, 0x80 -/* 024958 80023D58 0044C024 */ and $t8, $v0, $a0 -/* 02495C 80023D5C 50980012 */ beql $a0, $t8, .L80023DA8 -/* 024960 80023D60 C6240124 */ lwc1 $f4, 0x124($s1) -/* 024964 80023D64 50A30010 */ beql $a1, $v1, .L80023DA8 -/* 024968 80023D68 C6240124 */ lwc1 $f4, 0x124($s1) -/* 02496C 80023D6C 863900CA */ lh $t9, 0xca($s1) -/* 024970 80023D70 24010002 */ li $at, 2 -/* 024974 80023D74 3C030200 */ lui $v1, 0x200 -/* 024978 80023D78 332E0002 */ andi $t6, $t9, 2 -/* 02497C 80023D7C 11C10009 */ beq $t6, $at, .L80023DA4 -/* 024980 80023D80 00437824 */ and $t7, $v0, $v1 -/* 024984 80023D84 106F0007 */ beq $v1, $t7, .L80023DA4 -/* 024988 80023D88 3C030001 */ lui $v1, 1 -/* 02498C 80023D8C 0043C024 */ and $t8, $v0, $v1 -/* 024990 80023D90 10780004 */ beq $v1, $t8, .L80023DA4 -/* 024994 80023D94 30590008 */ andi $t9, $v0, 8 -/* 024998 80023D98 24010008 */ li $at, 8 -/* 02499C 80023D9C 57210059 */ bnel $t9, $at, .L80023F04 -/* 0249A0 80023DA0 862F00C4 */ lh $t7, 0xc4($s1) -.L80023DA4: -/* 0249A4 80023DA4 C6240124 */ lwc1 $f4, 0x124($s1) -.L80023DA8: -/* 0249A8 80023DA8 3C01800F */ lui $at, %hi(D_800ED6C8) -/* 0249AC 80023DAC D428D6C8 */ ldc1 $f8, %lo(D_800ED6C8)($at) -/* 0249B0 80023DB0 460021A1 */ cvt.d.s $f6, $f4 -/* 0249B4 80023DB4 3C013FF0 */ li $at, 0x3FF00000 # 1.875000 -/* 0249B8 80023DB8 46283282 */ mul.d $f10, $f6, $f8 -/* 0249BC 80023DBC 44818800 */ mtc1 $at, $f17 -/* 0249C0 80023DC0 44808000 */ mtc1 $zero, $f16 -/* 0249C4 80023DC4 44800000 */ mtc1 $zero, $f0 -/* 0249C8 80023DC8 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 0249CC 80023DCC 462A8481 */ sub.d $f18, $f16, $f10 -/* 0249D0 80023DD0 462090A0 */ cvt.s.d $f2, $f18 -/* 0249D4 80023DD4 4600103C */ c.lt.s $f2, $f0 -/* 0249D8 80023DD8 00000000 */ nop -/* 0249DC 80023DDC 45020003 */ bc1fl .L80023DEC -/* 0249E0 80023DE0 44810000 */ mtc1 $at, $f0 -/* 0249E4 80023DE4 46000086 */ mov.s $f2, $f0 -/* 0249E8 80023DE8 44810000 */ mtc1 $at, $f0 -.L80023DEC: -/* 0249EC 80023DEC 00000000 */ nop -/* 0249F0 80023DF0 4602003C */ c.lt.s $f0, $f2 -/* 0249F4 80023DF4 00000000 */ nop -/* 0249F8 80023DF8 45020003 */ bc1fl .L80023E08 -/* 0249FC 80023DFC C6240140 */ lwc1 $f4, 0x140($s1) -/* 024A00 80023E00 46000086 */ mov.s $f2, $f0 -/* 024A04 80023E04 C6240140 */ lwc1 $f4, 0x140($s1) -.L80023E08: -/* 024A08 80023E08 97B000C0 */ lhu $s0, 0xc0($sp) -/* 024A0C 80023E0C E7A400B4 */ swc1 $f4, 0xb4($sp) -/* 024A10 80023E10 C6260148 */ lwc1 $f6, 0x148($s1) -/* 024A14 80023E14 02002025 */ move $a0, $s0 -/* 024A18 80023E18 E7A600BC */ swc1 $f6, 0xbc($sp) -/* 024A1C 80023E1C C6280144 */ lwc1 $f8, 0x144($s1) -/* 024A20 80023E20 E7A2009C */ swc1 $f2, 0x9c($sp) -/* 024A24 80023E24 0C0AE006 */ jal sins -/* 024A28 80023E28 E7A800B8 */ swc1 $f8, 0xb8($sp) -/* 024A2C 80023E2C E7A00038 */ swc1 $f0, 0x38($sp) -/* 024A30 80023E30 0C0AE00E */ jal coss -/* 024A34 80023E34 3204FFFF */ andi $a0, $s0, 0xffff -/* 024A38 80023E38 C7B000B0 */ lwc1 $f16, 0xb0($sp) -/* 024A3C 80023E3C C7AA0038 */ lwc1 $f10, 0x38($sp) -/* 024A40 80023E40 C7A400AC */ lwc1 $f4, 0xac($sp) -/* 024A44 80023E44 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 024A48 80023E48 460A8482 */ mul.s $f18, $f16, $f10 -/* 024A4C 80023E4C C6300014 */ lwc1 $f16, 0x14($s1) -/* 024A50 80023E50 3204FFFF */ andi $a0, $s0, 0xffff -/* 024A54 80023E54 46040182 */ mul.s $f6, $f0, $f4 -/* 024A58 80023E58 46123200 */ add.s $f8, $f6, $f18 -/* 024A5C 80023E5C 44813000 */ mtc1 $at, $f6 -/* 024A60 80023E60 46104280 */ add.s $f10, $f8, $f16 -/* 024A64 80023E64 E7AA00CC */ swc1 $f10, 0xcc($sp) -/* 024A68 80023E68 C6240074 */ lwc1 $f4, 0x74($s1) -/* 024A6C 80023E6C 46062480 */ add.s $f18, $f4, $f6 -/* 024A70 80023E70 0C0AE00E */ jal coss -/* 024A74 80023E74 E7B200D0 */ swc1 $f18, 0xd0($sp) -/* 024A78 80023E78 E7A00038 */ swc1 $f0, 0x38($sp) -/* 024A7C 80023E7C 0C0AE006 */ jal sins -/* 024A80 80023E80 3204FFFF */ andi $a0, $s0, 0xffff -/* 024A84 80023E84 C7A800B0 */ lwc1 $f8, 0xb0($sp) -/* 024A88 80023E88 C7B00038 */ lwc1 $f16, 0x38($sp) -/* 024A8C 80023E8C C7A400AC */ lwc1 $f4, 0xac($sp) -/* 024A90 80023E90 87AE00C0 */ lh $t6, 0xc0($sp) -/* 024A94 80023E94 46104282 */ mul.s $f10, $f8, $f16 -/* 024A98 80023E98 C628001C */ lwc1 $f8, 0x1c($s1) -/* 024A9C 80023E9C 3C01800E */ lui $at, %hi(D_800DDBD4) -/* 024AA0 80023EA0 46040182 */ mul.s $f6, $f0, $f4 -/* 024AA4 80023EA4 C7A2009C */ lwc1 $f2, 0x9c($sp) -/* 024AA8 80023EA8 27A40118 */ addiu $a0, $sp, 0x118 -/* 024AAC 80023EAC 27A500B4 */ addiu $a1, $sp, 0xb4 -/* 024AB0 80023EB0 27A600CC */ addiu $a2, $sp, 0xcc -/* 024AB4 80023EB4 46065481 */ sub.s $f18, $f10, $f6 -/* 024AB8 80023EB8 46089400 */ add.s $f16, $f18, $f8 -/* 024ABC 80023EBC E7B000D4 */ swc1 $f16, 0xd4($sp) -/* 024AC0 80023EC0 862F0042 */ lh $t7, 0x42($s1) -/* 024AC4 80023EC4 96390254 */ lhu $t9, 0x254($s1) -/* 024AC8 80023EC8 C62A0224 */ lwc1 $f10, 0x224($s1) -/* 024ACC 80023ECC 01CF3821 */ addu $a3, $t6, $t7 -/* 024AD0 80023ED0 00197080 */ sll $t6, $t9, 2 -/* 024AD4 80023ED4 002E0821 */ addu $at, $at, $t6 -/* 024AD8 80023ED8 C424DBD4 */ lwc1 $f4, %lo(D_800DDBD4)($at) -/* 024ADC 80023EDC 30F8FFFF */ andi $t8, $a3, 0xffff -/* 024AE0 80023EE0 03003825 */ move $a3, $t8 -/* 024AE4 80023EE4 460A2182 */ mul.s $f6, $f4, $f10 -/* 024AE8 80023EE8 00000000 */ nop -/* 024AEC 80023EEC 46023482 */ mul.s $f18, $f6, $f2 -/* 024AF0 80023EF0 0C010A88 */ jal func_80042A20 -/* 024AF4 80023EF4 E7B20010 */ swc1 $f18, 0x10($sp) -/* 024AF8 80023EF8 1000003A */ b .L80023FE4 -/* 024AFC 80023EFC 83B90163 */ lb $t9, 0x163($sp) -/* 024B00 80023F00 862F00C4 */ lh $t7, 0xc4($s1) -.L80023F04: -/* 024B04 80023F04 87B800C0 */ lh $t8, 0xc0($sp) -/* 024B08 80023F08 97B000C0 */ lhu $s0, 0xc0($sp) -/* 024B0C 80023F0C A7AF00C4 */ sh $t7, 0xc4($sp) -/* 024B10 80023F10 A7B800C6 */ sh $t8, 0xc6($sp) -/* 024B14 80023F14 86390206 */ lh $t9, 0x206($s1) -/* 024B18 80023F18 02002025 */ move $a0, $s0 -/* 024B1C 80023F1C 00197040 */ sll $t6, $t9, 1 -/* 024B20 80023F20 0C0AE006 */ jal sins -/* 024B24 80023F24 A7AE00C8 */ sh $t6, 0xc8($sp) -/* 024B28 80023F28 E7A00038 */ swc1 $f0, 0x38($sp) -/* 024B2C 80023F2C 0C0AE00E */ jal coss -/* 024B30 80023F30 3204FFFF */ andi $a0, $s0, 0xffff -/* 024B34 80023F34 C7A800B0 */ lwc1 $f8, 0xb0($sp) -/* 024B38 80023F38 C7B00038 */ lwc1 $f16, 0x38($sp) -/* 024B3C 80023F3C C7AA00AC */ lwc1 $f10, 0xac($sp) -/* 024B40 80023F40 3C013F80 */ li $at, 0x3F800000 # 1.000000 -/* 024B44 80023F44 46104102 */ mul.s $f4, $f8, $f16 -/* 024B48 80023F48 C6280014 */ lwc1 $f8, 0x14($s1) -/* 024B4C 80023F4C 3204FFFF */ andi $a0, $s0, 0xffff -/* 024B50 80023F50 460A0182 */ mul.s $f6, $f0, $f10 -/* 024B54 80023F54 46043480 */ add.s $f18, $f6, $f4 -/* 024B58 80023F58 44813000 */ mtc1 $at, $f6 -/* 024B5C 80023F5C 46089400 */ add.s $f16, $f18, $f8 -/* 024B60 80023F60 E7B000CC */ swc1 $f16, 0xcc($sp) -/* 024B64 80023F64 C62A0074 */ lwc1 $f10, 0x74($s1) -/* 024B68 80023F68 46065100 */ add.s $f4, $f10, $f6 -/* 024B6C 80023F6C 0C0AE00E */ jal coss -/* 024B70 80023F70 E7A400D0 */ swc1 $f4, 0xd0($sp) -/* 024B74 80023F74 E7A00038 */ swc1 $f0, 0x38($sp) -/* 024B78 80023F78 0C0AE006 */ jal sins -/* 024B7C 80023F7C 3204FFFF */ andi $a0, $s0, 0xffff -/* 024B80 80023F80 C7B200B0 */ lwc1 $f18, 0xb0($sp) -/* 024B84 80023F84 C7A80038 */ lwc1 $f8, 0x38($sp) -/* 024B88 80023F88 C7AA00AC */ lwc1 $f10, 0xac($sp) -/* 024B8C 80023F8C 27A40118 */ addiu $a0, $sp, 0x118 -/* 024B90 80023F90 46089402 */ mul.s $f16, $f18, $f8 -/* 024B94 80023F94 C632001C */ lwc1 $f18, 0x1c($s1) -/* 024B98 80023F98 27A500CC */ addiu $a1, $sp, 0xcc -/* 024B9C 80023F9C 460A0182 */ mul.s $f6, $f0, $f10 -/* 024BA0 80023FA0 27A600C4 */ addiu $a2, $sp, 0xc4 -/* 024BA4 80023FA4 46068101 */ sub.s $f4, $f16, $f6 -/* 024BA8 80023FA8 46122200 */ add.s $f8, $f4, $f18 -/* 024BAC 80023FAC 0C008784 */ jal func_80021E10 -/* 024BB0 80023FB0 E7A800D4 */ swc1 $f8, 0xd4($sp) -/* 024BB4 80023FB4 962F0254 */ lhu $t7, 0x254($s1) -/* 024BB8 80023FB8 3C01800E */ lui $at, %hi(D_800DDBD4) -/* 024BBC 80023FBC C6300224 */ lwc1 $f16, 0x224($s1) -/* 024BC0 80023FC0 000FC080 */ sll $t8, $t7, 2 -/* 024BC4 80023FC4 00380821 */ addu $at, $at, $t8 -/* 024BC8 80023FC8 C42ADBD4 */ lwc1 $f10, %lo(D_800DDBD4)($at) -/* 024BCC 80023FCC 27A40118 */ addiu $a0, $sp, 0x118 -/* 024BD0 80023FD0 46105182 */ mul.s $f6, $f10, $f16 -/* 024BD4 80023FD4 44053000 */ mfc1 $a1, $f6 -/* 024BD8 80023FD8 0C0087E1 */ jal func_80021F84 -/* 024BDC 80023FDC 00000000 */ nop -/* 024BE0 80023FE0 83B90163 */ lb $t9, 0x163($sp) -.L80023FE4: -/* 024BE4 80023FE4 83B8015F */ lb $t8, 0x15f($sp) -/* 024BE8 80023FE8 3C0F8015 */ lui $t7, %hi(gGfxPool) # $t7, 0x8015 -/* 024BEC 80023FEC 8DEFEF40 */ lw $t7, %lo(gGfxPool)($t7) -/* 024BF0 80023FF0 00198240 */ sll $s0, $t9, 9 -/* 024BF4 80023FF4 0018C980 */ sll $t9, $t8, 6 -/* 024BF8 80023FF8 01F97021 */ addu $t6, $t7, $t9 -/* 024BFC 80023FFC 01D02021 */ addu $a0, $t6, $s0 -/* 024C00 80024000 3401EAC0 */ li $at, 60096 -/* 024C04 80024004 00812021 */ addu $a0, $a0, $at -/* 024C08 80024008 0C008860 */ jal func_80022180 -/* 024C0C 8002400C 27A50118 */ addiu $a1, $sp, 0x118 -/* 024C10 80024010 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 024C14 80024014 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 024C18 80024018 8C620000 */ lw $v0, ($v1) -/* 024C1C 8002401C 3C0F0102 */ lui $t7, (0x01020040 >> 16) # lui $t7, 0x102 -/* 024C20 80024020 35EF0040 */ ori $t7, (0x01020040 & 0xFFFF) # ori $t7, $t7, 0x40 -/* 024C24 80024024 24580008 */ addiu $t8, $v0, 8 -/* 024C28 80024028 AC780000 */ sw $t8, ($v1) -/* 024C2C 8002402C AC4F0000 */ sw $t7, ($v0) -/* 024C30 80024030 83AE015F */ lb $t6, 0x15f($sp) -/* 024C34 80024034 3C198015 */ lui $t9, %hi(gGfxPool) # $t9, 0x8015 -/* 024C38 80024038 8F39EF40 */ lw $t9, %lo(gGfxPool)($t9) -/* 024C3C 8002403C 000EC180 */ sll $t8, $t6, 6 -/* 024C40 80024040 3401EAC0 */ li $at, 60096 -/* 024C44 80024044 03387821 */ addu $t7, $t9, $t8 -/* 024C48 80024048 01F07021 */ addu $t6, $t7, $s0 -/* 024C4C 8002404C 01C1C821 */ addu $t9, $t6, $at -/* 024C50 80024050 3C011FFF */ lui $at, (0x1FFFFFFF >> 16) # lui $at, 0x1fff -/* 024C54 80024054 3421FFFF */ ori $at, (0x1FFFFFFF & 0xFFFF) # ori $at, $at, 0xffff -/* 024C58 80024058 0321C024 */ and $t8, $t9, $at -/* 024C5C 8002405C AC580004 */ sw $t8, 4($v0) -/* 024C60 80024060 8C620000 */ lw $v0, ($v1) -/* 024C64 80024064 3C0E0D01 */ lui $t6, %hi(D_0D008D58) # $t6, 0xd01 -/* 024C68 80024068 3C110600 */ lui $s1, 0x600 -/* 024C6C 8002406C 244F0008 */ addiu $t7, $v0, 8 -/* 024C70 80024070 AC6F0000 */ sw $t7, ($v1) -/* 024C74 80024074 25CE8D58 */ addiu $t6, %lo(D_0D008D58) # addiu $t6, $t6, -0x72a8 -/* 024C78 80024078 AC4E0004 */ sw $t6, 4($v0) -/* 024C7C 8002407C AC510000 */ sw $s1, ($v0) -/* 024C80 80024080 8C620000 */ lw $v0, ($v1) -/* 024C84 80024084 3C18BA00 */ lui $t8, (0xBA000E02 >> 16) # lui $t8, 0xba00 -/* 024C88 80024088 37180E02 */ ori $t8, (0xBA000E02 & 0xFFFF) # ori $t8, $t8, 0xe02 -/* 024C8C 8002408C 24590008 */ addiu $t9, $v0, 8 -/* 024C90 80024090 AC790000 */ sw $t9, ($v1) -/* 024C94 80024094 AC400004 */ sw $zero, 4($v0) -/* 024C98 80024098 AC580000 */ sw $t8, ($v0) -/* 024C9C 8002409C 8C620000 */ lw $v0, ($v1) -/* 024CA0 800240A0 3C0EFD90 */ lui $t6, 0xfd90 -/* 024CA4 800240A4 3C198019 */ lui $t9, %hi(D_8018D474) # $t9, 0x8019 -/* 024CA8 800240A8 244F0008 */ addiu $t7, $v0, 8 -/* 024CAC 800240AC AC6F0000 */ sw $t7, ($v1) -/* 024CB0 800240B0 AC4E0000 */ sw $t6, ($v0) -/* 024CB4 800240B4 8F39D474 */ lw $t9, %lo(D_8018D474)($t9) -/* 024CB8 800240B8 3C0E0708 */ lui $t6, (0x07080200 >> 16) # lui $t6, 0x708 -/* 024CBC 800240BC 35CE0200 */ ori $t6, (0x07080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 024CC0 800240C0 AC590004 */ sw $t9, 4($v0) -/* 024CC4 800240C4 8C620000 */ lw $v0, ($v1) -/* 024CC8 800240C8 3C0FF590 */ lui $t7, 0xf590 -/* 024CCC 800240CC 00002025 */ move $a0, $zero -/* 024CD0 800240D0 24580008 */ addiu $t8, $v0, 8 -/* 024CD4 800240D4 AC780000 */ sw $t8, ($v1) -/* 024CD8 800240D8 AC4E0004 */ sw $t6, 4($v0) -/* 024CDC 800240DC AC4F0000 */ sw $t7, ($v0) -/* 024CE0 800240E0 8C620000 */ lw $v0, ($v1) -/* 024CE4 800240E4 3C18E600 */ lui $t8, 0xe600 -/* 024CE8 800240E8 3C0EF300 */ lui $t6, 0xf300 -/* 024CEC 800240EC 24590008 */ addiu $t9, $v0, 8 -/* 024CF0 800240F0 AC790000 */ sw $t9, ($v1) -/* 024CF4 800240F4 AC400004 */ sw $zero, 4($v0) -/* 024CF8 800240F8 AC580000 */ sw $t8, ($v0) -/* 024CFC 800240FC 8C620000 */ lw $v0, ($v1) -/* 024D00 80024100 3C19073F */ lui $t9, (0x073FF100 >> 16) # lui $t9, 0x73f -/* 024D04 80024104 3739F100 */ ori $t9, (0x073FF100 & 0xFFFF) # ori $t9, $t9, 0xf100 -/* 024D08 80024108 244F0008 */ addiu $t7, $v0, 8 -/* 024D0C 8002410C AC6F0000 */ sw $t7, ($v1) -/* 024D10 80024110 AC590004 */ sw $t9, 4($v0) -/* 024D14 80024114 AC4E0000 */ sw $t6, ($v0) -/* 024D18 80024118 8C620000 */ lw $v0, ($v1) -/* 024D1C 8002411C 3C0FE700 */ lui $t7, 0xe700 -/* 024D20 80024120 3C19F588 */ lui $t9, (0xF5881000 >> 16) # lui $t9, 0xf588 -/* 024D24 80024124 24580008 */ addiu $t8, $v0, 8 -/* 024D28 80024128 AC780000 */ sw $t8, ($v1) -/* 024D2C 8002412C AC400004 */ sw $zero, 4($v0) -/* 024D30 80024130 AC4F0000 */ sw $t7, ($v0) -/* 024D34 80024134 8C620000 */ lw $v0, ($v1) -/* 024D38 80024138 3C180008 */ lui $t8, (0x00080200 >> 16) # lui $t8, 8 -/* 024D3C 8002413C 37180200 */ ori $t8, (0x00080200 & 0xFFFF) # ori $t8, $t8, 0x200 -/* 024D40 80024140 244E0008 */ addiu $t6, $v0, 8 -/* 024D44 80024144 AC6E0000 */ sw $t6, ($v1) -/* 024D48 80024148 37391000 */ ori $t9, (0xF5881000 & 0xFFFF) # ori $t9, $t9, 0x1000 -/* 024D4C 8002414C AC590000 */ sw $t9, ($v0) -/* 024D50 80024150 AC580004 */ sw $t8, 4($v0) -/* 024D54 80024154 8C620000 */ lw $v0, ($v1) -/* 024D58 80024158 3C19000F */ lui $t9, (0x000FC07C >> 16) # lui $t9, 0xf -/* 024D5C 8002415C 3739C07C */ ori $t9, (0x000FC07C & 0xFFFF) # ori $t9, $t9, 0xc07c -/* 024D60 80024160 244F0008 */ addiu $t7, $v0, 8 -/* 024D64 80024164 AC6F0000 */ sw $t7, ($v1) -/* 024D68 80024168 3C0EF200 */ lui $t6, 0xf200 -/* 024D6C 8002416C 00002825 */ move $a1, $zero -/* 024D70 80024170 00003025 */ move $a2, $zero -/* 024D74 80024174 240700FF */ li $a3, 255 -/* 024D78 80024178 AC4E0000 */ sw $t6, ($v0) -/* 024D7C 8002417C 0C012D05 */ jal func_8004B414 -/* 024D80 80024180 AC590004 */ sw $t9, 4($v0) -/* 024D84 80024184 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 024D88 80024188 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 024D8C 8002418C 8C620000 */ lw $v0, ($v1) -/* 024D90 80024190 3C0FB900 */ lui $t7, (0xB900031D >> 16) # lui $t7, 0xb900 -/* 024D94 80024194 3C0E0050 */ lui $t6, (0x00504B50 >> 16) # lui $t6, 0x50 -/* 024D98 80024198 24580008 */ addiu $t8, $v0, 8 -/* 024D9C 8002419C AC780000 */ sw $t8, ($v1) -/* 024DA0 800241A0 35CE4B50 */ ori $t6, (0x00504B50 & 0xFFFF) # ori $t6, $t6, 0x4b50 -/* 024DA4 800241A4 35EF031D */ ori $t7, (0xB900031D & 0xFFFF) # ori $t7, $t7, 0x31d -/* 024DA8 800241A8 AC4F0000 */ sw $t7, ($v0) -/* 024DAC 800241AC AC4E0004 */ sw $t6, 4($v0) -/* 024DB0 800241B0 8C620000 */ lw $v0, ($v1) -/* 024DB4 800241B4 3C0F800E */ lui $t7, %hi(D_800E51D0) # $t7, 0x800e -/* 024DB8 800241B8 3C180400 */ lui $t8, (0x0400103F >> 16) # lui $t8, 0x400 -/* 024DBC 800241BC 24590008 */ addiu $t9, $v0, 8 -/* 024DC0 800241C0 AC790000 */ sw $t9, ($v1) -/* 024DC4 800241C4 3718103F */ ori $t8, (0x0400103F & 0xFFFF) # ori $t8, $t8, 0x103f -/* 024DC8 800241C8 25EF51D0 */ addiu $t7, %lo(D_800E51D0) # addiu $t7, $t7, 0x51d0 -/* 024DCC 800241CC AC4F0004 */ sw $t7, 4($v0) -/* 024DD0 800241D0 AC580000 */ sw $t8, ($v0) -/* 024DD4 800241D4 8C620000 */ lw $v0, ($v1) -/* 024DD8 800241D8 3C100D01 */ lui $s0, %hi(D_0D008C78) # $s0, 0xd01 -/* 024DDC 800241DC 26108C78 */ addiu $s0, %lo(D_0D008C78) # addiu $s0, $s0, -0x7388 -/* 024DE0 800241E0 244E0008 */ addiu $t6, $v0, 8 -/* 024DE4 800241E4 AC6E0000 */ sw $t6, ($v1) -/* 024DE8 800241E8 AC500004 */ sw $s0, 4($v0) -/* 024DEC 800241EC AC510000 */ sw $s1, ($v0) -/* 024DF0 800241F0 8C620000 */ lw $v0, ($v1) -/* 024DF4 800241F4 3C18FD90 */ lui $t8, 0xfd90 -/* 024DF8 800241F8 3C0F8019 */ lui $t7, %hi(D_8018D474) # $t7, 0x8019 -/* 024DFC 800241FC 24590008 */ addiu $t9, $v0, 8 -/* 024E00 80024200 AC790000 */ sw $t9, ($v1) -/* 024E04 80024204 AC580000 */ sw $t8, ($v0) -/* 024E08 80024208 8DEFD474 */ lw $t7, %lo(D_8018D474)($t7) -/* 024E0C 8002420C 3C18F590 */ lui $t8, 0xf590 -/* 024E10 80024210 00002025 */ move $a0, $zero -/* 024E14 80024214 25EE0800 */ addiu $t6, $t7, 0x800 -/* 024E18 80024218 AC4E0004 */ sw $t6, 4($v0) -/* 024E1C 8002421C 8C620000 */ lw $v0, ($v1) -/* 024E20 80024220 3C0F0708 */ lui $t7, (0x07080200 >> 16) # lui $t7, 0x708 -/* 024E24 80024224 35EF0200 */ ori $t7, (0x07080200 & 0xFFFF) # ori $t7, $t7, 0x200 -/* 024E28 80024228 24590008 */ addiu $t9, $v0, 8 -/* 024E2C 8002422C AC790000 */ sw $t9, ($v1) -/* 024E30 80024230 AC4F0004 */ sw $t7, 4($v0) -/* 024E34 80024234 AC580000 */ sw $t8, ($v0) -/* 024E38 80024238 8C620000 */ lw $v0, ($v1) -/* 024E3C 8002423C 3C19E600 */ lui $t9, 0xe600 -/* 024E40 80024240 3C0FF300 */ lui $t7, 0xf300 -/* 024E44 80024244 244E0008 */ addiu $t6, $v0, 8 -/* 024E48 80024248 AC6E0000 */ sw $t6, ($v1) -/* 024E4C 8002424C AC400004 */ sw $zero, 4($v0) -/* 024E50 80024250 AC590000 */ sw $t9, ($v0) -/* 024E54 80024254 8C620000 */ lw $v0, ($v1) -/* 024E58 80024258 3C0E073F */ lui $t6, (0x073FF100 >> 16) # lui $t6, 0x73f -/* 024E5C 8002425C 35CEF100 */ ori $t6, (0x073FF100 & 0xFFFF) # ori $t6, $t6, 0xf100 -/* 024E60 80024260 24580008 */ addiu $t8, $v0, 8 -/* 024E64 80024264 AC780000 */ sw $t8, ($v1) -/* 024E68 80024268 AC4E0004 */ sw $t6, 4($v0) -/* 024E6C 8002426C AC4F0000 */ sw $t7, ($v0) -/* 024E70 80024270 8C620000 */ lw $v0, ($v1) -/* 024E74 80024274 3C18E700 */ lui $t8, 0xe700 -/* 024E78 80024278 3C0EF588 */ lui $t6, (0xF5881000 >> 16) # lui $t6, 0xf588 -/* 024E7C 8002427C 24590008 */ addiu $t9, $v0, 8 -/* 024E80 80024280 AC790000 */ sw $t9, ($v1) -/* 024E84 80024284 AC400004 */ sw $zero, 4($v0) -/* 024E88 80024288 AC580000 */ sw $t8, ($v0) -/* 024E8C 8002428C 8C620000 */ lw $v0, ($v1) -/* 024E90 80024290 3C190008 */ lui $t9, (0x00080200 >> 16) # lui $t9, 8 -/* 024E94 80024294 37390200 */ ori $t9, (0x00080200 & 0xFFFF) # ori $t9, $t9, 0x200 -/* 024E98 80024298 244F0008 */ addiu $t7, $v0, 8 -/* 024E9C 8002429C AC6F0000 */ sw $t7, ($v1) -/* 024EA0 800242A0 35CE1000 */ ori $t6, (0xF5881000 & 0xFFFF) # ori $t6, $t6, 0x1000 -/* 024EA4 800242A4 AC4E0000 */ sw $t6, ($v0) -/* 024EA8 800242A8 AC590004 */ sw $t9, 4($v0) -/* 024EAC 800242AC 8C620000 */ lw $v0, ($v1) -/* 024EB0 800242B0 3C0E000F */ lui $t6, (0x000FC07C >> 16) # lui $t6, 0xf -/* 024EB4 800242B4 35CEC07C */ ori $t6, (0x000FC07C & 0xFFFF) # ori $t6, $t6, 0xc07c -/* 024EB8 800242B8 24580008 */ addiu $t8, $v0, 8 -/* 024EBC 800242BC AC780000 */ sw $t8, ($v1) -/* 024EC0 800242C0 3C0FF200 */ lui $t7, 0xf200 -/* 024EC4 800242C4 00002825 */ move $a1, $zero -/* 024EC8 800242C8 00003025 */ move $a2, $zero -/* 024ECC 800242CC 240700FF */ li $a3, 255 -/* 024ED0 800242D0 AC4F0000 */ sw $t7, ($v0) -/* 024ED4 800242D4 0C012D05 */ jal func_8004B414 -/* 024ED8 800242D8 AC4E0004 */ sw $t6, 4($v0) -/* 024EDC 800242DC 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 024EE0 800242E0 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 024EE4 800242E4 8C620000 */ lw $v0, ($v1) -/* 024EE8 800242E8 3C18B900 */ lui $t8, (0xB900031D >> 16) # lui $t8, 0xb900 -/* 024EEC 800242EC 3C0F0050 */ lui $t7, (0x00504B50 >> 16) # lui $t7, 0x50 -/* 024EF0 800242F0 24590008 */ addiu $t9, $v0, 8 -/* 024EF4 800242F4 AC790000 */ sw $t9, ($v1) -/* 024EF8 800242F8 35EF4B50 */ ori $t7, (0x00504B50 & 0xFFFF) # ori $t7, $t7, 0x4b50 -/* 024EFC 800242FC 3718031D */ ori $t8, (0xB900031D & 0xFFFF) # ori $t8, $t8, 0x31d -/* 024F00 80024300 AC580000 */ sw $t8, ($v0) -/* 024F04 80024304 AC4F0004 */ sw $t7, 4($v0) -/* 024F08 80024308 8C620000 */ lw $v0, ($v1) -/* 024F0C 8002430C 3C18800E */ lui $t8, %hi(D_800E5210) # $t8, 0x800e -/* 024F10 80024310 3C190400 */ lui $t9, (0x0400103F >> 16) # lui $t9, 0x400 -/* 024F14 80024314 244E0008 */ addiu $t6, $v0, 8 -/* 024F18 80024318 AC6E0000 */ sw $t6, ($v1) -/* 024F1C 8002431C 3739103F */ ori $t9, (0x0400103F & 0xFFFF) # ori $t9, $t9, 0x103f -/* 024F20 80024320 27185210 */ addiu $t8, %lo(D_800E5210) # addiu $t8, $t8, 0x5210 -/* 024F24 80024324 AC580004 */ sw $t8, 4($v0) -/* 024F28 80024328 AC590000 */ sw $t9, ($v0) -/* 024F2C 8002432C 8C620000 */ lw $v0, ($v1) -/* 024F30 80024330 3C180001 */ lui $t8, (0x00010001 >> 16) # lui $t8, 1 -/* 024F34 80024334 37180001 */ ori $t8, (0x00010001 & 0xFFFF) # ori $t8, $t8, 1 -/* 024F38 80024338 244F0008 */ addiu $t7, $v0, 8 -/* 024F3C 8002433C AC6F0000 */ sw $t7, ($v1) -/* 024F40 80024340 AC500004 */ sw $s0, 4($v0) -/* 024F44 80024344 AC510000 */ sw $s1, ($v0) -/* 024F48 80024348 8C620000 */ lw $v0, ($v1) -/* 024F4C 8002434C 3C19BB00 */ lui $t9, 0xbb00 -/* 024F50 80024350 244E0008 */ addiu $t6, $v0, 8 -/* 024F54 80024354 AC6E0000 */ sw $t6, ($v1) -/* 024F58 80024358 AC580004 */ sw $t8, 4($v0) -/* 024F5C 8002435C AC590000 */ sw $t9, ($v0) -/* 024F60 80024360 8FBF0024 */ lw $ra, 0x24($sp) -/* 024F64 80024364 8FB10020 */ lw $s1, 0x20($sp) -/* 024F68 80024368 8FB0001C */ lw $s0, 0x1c($sp) -/* 024F6C 8002436C 03E00008 */ jr $ra -/* 024F70 80024370 27BD0158 */ addiu $sp, $sp, 0x158 diff --git a/asm/non_matchings/code_8001F980/func_80026A48.s b/asm/non_matchings/code_8001F980/func_80026A48.s deleted file mode 100644 index e3bbfcddb..000000000 --- a/asm/non_matchings/code_8001F980/func_80026A48.s +++ /dev/null @@ -1,73 +0,0 @@ -glabel func_80026A48 -/* 027648 80026A48 AFA50004 */ sw $a1, 4($sp) -/* 02764C 80026A4C 8C9800BC */ lw $t8, 0xbc($a0) -/* 027650 80026A50 00057600 */ sll $t6, $a1, 0x18 -/* 027654 80026A54 24014000 */ li $at, 16384 -/* 027658 80026A58 33194000 */ andi $t9, $t8, 0x4000 -/* 02765C 80026A5C 1721000E */ bne $t9, $at, .L80026A98 -/* 027660 80026A60 000E2E03 */ sra $a1, $t6, 0x18 -/* 027664 80026A64 94880000 */ lhu $t0, ($a0) -/* 027668 80026A68 3C0B800E */ lui $t3, %hi(D_800DDE94) # $t3, 0x800e -/* 02766C 80026A6C 31092000 */ andi $t1, $t0, 0x2000 -/* 027670 80026A70 5520000A */ bnel $t1, $zero, .L80026A9C -/* 027674 80026A74 3C013F80 */ lui $at, 0x3f80 -/* 027678 80026A78 8C8A0240 */ lw $t2, 0x240($a0) -/* 02767C 80026A7C 8D6BDE94 */ lw $t3, %lo(D_800DDE94)($t3) -/* 027680 80026A80 014B6021 */ addu $t4, $t2, $t3 -/* 027684 80026A84 29810400 */ slti $at, $t4, 0x400 -/* 027688 80026A88 1420002E */ bnez $at, .L80026B44 -/* 02768C 80026A8C AC8C0240 */ sw $t4, 0x240($a0) -/* 027690 80026A90 03E00008 */ jr $ra -/* 027694 80026A94 AC800240 */ sw $zero, 0x240($a0) - -.L80026A98: -/* 027698 80026A98 3C013F80 */ li $at, 0x3F800000 # 1.000000 -.L80026A9C: -/* 02769C 80026A9C 44811000 */ mtc1 $at, $f2 -/* 0276A0 80026AA0 C4860104 */ lwc1 $f6, 0x104($a0) -/* 0276A4 80026AA4 C4840094 */ lwc1 $f4, 0x94($a0) -/* 0276A8 80026AA8 3C014190 */ li $at, 0x41900000 # 18.000000 -/* 0276AC 80026AAC 46061200 */ add.s $f8, $f2, $f6 -/* 0276B0 80026AB0 44818000 */ mtc1 $at, $f16 -/* 0276B4 80026AB4 3C014358 */ li $at, 0x43580000 # 216.000000 -/* 0276B8 80026AB8 44813000 */ mtc1 $at, $f6 -/* 0276BC 80026ABC 46082282 */ mul.s $f10, $f4, $f8 -/* 0276C0 80026AC0 00057080 */ sll $t6, $a1, 2 -/* 0276C4 80026AC4 3C0F8016 */ lui $t7, %hi(D_80165520) # 0x8016 -/* 0276C8 80026AC8 01EE7821 */ addu $t7, $t7, $t6 -/* 0276CC 80026ACC 46105483 */ div.s $f18, $f10, $f16 -/* 0276D0 80026AD0 46069002 */ mul.s $f0, $f18, $f6 -/* 0276D4 80026AD4 4602003E */ c.le.s $f0, $f2 -/* 0276D8 80026AD8 00000000 */ nop -/* 0276DC 80026ADC 45010005 */ bc1t .L80026AF4 -/* 0276E0 80026AE0 00000000 */ nop -/* 0276E4 80026AE4 8DEF5520 */ lw $t7, %lo(D_80165520)($t7) # 0x5520($t7) -/* 0276E8 80026AE8 24010001 */ li $at, 1 -/* 0276EC 80026AEC 55E10004 */ bnel $t7, $at, .L80026B00 -/* 0276F0 80026AF0 3C014140 */ lui $at, 0x4140 -.L80026AF4: -/* 0276F4 80026AF4 1000000E */ b .L80026B30 -/* 0276F8 80026AF8 AC800240 */ sw $zero, 0x240($a0) -/* 0276FC 80026AFC 3C014140 */ li $at, 0x41400000 # 12.000000 -.L80026B00: -/* 027700 80026B00 44812000 */ mtc1 $at, $f4 -/* 027704 80026B04 3C0A800E */ lui $t2, %hi(D_800DDE74) -/* 027708 80026B08 8C980240 */ lw $t8, 0x240($a0) -/* 02770C 80026B0C 46040203 */ div.s $f8, $f0, $f4 -/* 027710 80026B10 4600428D */ trunc.w.s $f10, $f8 -/* 027714 80026B14 44085000 */ mfc1 $t0, $f10 -/* 027718 80026B18 00000000 */ nop -/* 02771C 80026B1C 00084880 */ sll $t1, $t0, 2 -/* 027720 80026B20 01495021 */ addu $t2, $t2, $t1 -/* 027724 80026B24 8D4ADE74 */ lw $t2, %lo(D_800DDE74)($t2) -/* 027728 80026B28 030A5821 */ addu $t3, $t8, $t2 -/* 02772C 80026B2C AC8B0240 */ sw $t3, 0x240($a0) -.L80026B30: -/* 027730 80026B30 8C8C0240 */ lw $t4, 0x240($a0) -/* 027734 80026B34 29810400 */ slti $at, $t4, 0x400 -/* 027738 80026B38 14200002 */ bnez $at, .L80026B44 -/* 02773C 80026B3C 00000000 */ nop -/* 027740 80026B40 AC800240 */ sw $zero, 0x240($a0) -.L80026B44: -/* 027744 80026B44 03E00008 */ jr $ra -/* 027748 80026B48 00000000 */ nop diff --git a/data/data_0DD0A0_1_1.s b/data/data_0DD0A0_1_1.s index f2ff8e65a..2879a7977 100644 --- a/data/data_0DD0A0_1_1.s +++ b/data/data_0DD0A0_1_1.s @@ -116,12 +116,14 @@ glabel D_800DDE54 .word gKartMarioWheels1, gKartLuigiWheels1, gKartYoshiWheels1, gKartToadWheels1 .word gKartDKWheels1, gKartWarioWheels1, gKartPeachWheels1, gKartBowserWheels1 +# array size of 9? glabel D_800DDE74 .word 0x00000060, 0x00000080, 0x000000c0, 0x00000100 .word 0x00000120, 0x00000180, 0x00000200, 0x00000220 +.word 0x00000240 -glabel D_800DDE94 -.word 0x00000240, 0x00000000 +# padding? +.word 0x00000000 glabel D_800DDE9C .word 0x41100000, 0x40e00000, 0x40a00000 diff --git a/data/data_0DD0A0_2_0.s b/data/data_0DD0A0_2_0.s index 67fa59c90..54b812ade 100644 --- a/data/data_0DD0A0_2_0.s +++ b/data/data_0DD0A0_2_0.s @@ -372,19 +372,19 @@ vertex 9, 0, 0, 4032, 1984, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 0, 0, 0, 1984, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 0, 9, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF -glabel D_800E5210 +glabel D_800E5210 # probably compiler generated vertex 9, 0, 0, 4032, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex 9, 0, -9, 4032, 1984, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 0, -9, 0, 1984, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 0, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF -glabel D_800E5250 +glabel D_800E5250 # compiler gen vertex 9, 18, -6, 4032, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex 9, 9, -6, 4032, 1984, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 9, -6, 0, 1984, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 18, -6, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF -glabel D_800E5290 +glabel D_800E5290 # compiler gen vertex 9, 9, -6, 4032, 0, 0xFF, 0xFF, 0xFF, 0xFF vertex 9, 0, -6, 4032, 1792, 0xFF, 0xFF, 0xFF, 0xFF vertex -9, 0, -6, 0, 1792, 0xFF, 0xFF, 0xFF, 0xFF diff --git a/data/data_0DD0A0_3.s b/data/data_0DD0A0_3.s index 88fdae52f..a611d47cc 100644 --- a/data/data_0DD0A0_3.s +++ b/data/data_0DD0A0_3.s @@ -1628,751 +1628,11 @@ glabel D_800ED680 glabel D_800ED688 .double -0.001 -glabel D_800ED690 -.double 0.7 +#glabel D_800ED690 +#.double 0.7 -glabel D_800ED698 -.double 0.8 +#glabel D_800ED698 +#.double 0.8 -glabel D_800ED6A0 -.double 0.1 - -glabel D_800ED6A8 -.double 2.3 - -glabel D_800ED6B0 -.double 0.7 - -glabel D_800ED6B8 -.double 0.8 - -glabel D_800ED6C0 -.double 0.1 - -glabel D_800ED6C8 -.double 0.02 - -glabel D_800ED6D0 -.double 0.8 - -glabel D_800ED6D8 -.double 0.8 - -glabel D_800ED6E0 -.double 0.1 - -.word 0x00000000, 0x00000000 - -# start rodata for code_80027D00 - -glabel jpt_800ED6F0 -.word L80027F38, L80027FC0, L80028048, L800280D0 -.word L80028854, L80028854, L80028854, L80028854 -.word L80028158, L80028854, L800281E0, L80028854 -.word L8002825C, L80028854, L80028854, L80028854 -.word L80028854, L80028854, L800282E4 - -glabel jpt_800ED73C -.word L80028424 -.word L800284AC, L80028534, L800285BC, L80028854 -.word L80028854, L80028854, L80028854, L80028644 -.word L80028854, L800286CC, L80028854, L80028748 -.word L80028854, L80028854, L80028854, L80028854 -.word L80028854, L800287D0 - -glabel D_800ED788 -.double 1.6 - -glabel D_800ED790 -.double 0.9 - -glabel D_800ED798 -.double 3.6 - -glabel D_800ED7A0 -.double 3.6 - -glabel D_800ED7A8 -.double 2.6 - -glabel D_800ED7B0 -.double 2.6 - -glabel D_800ED7B8 -.float 3500.0 - -glabel D_800ED7BC -.float 1100.0 - -glabel D_800ED7C0 -.float 1500.0 - -glabel D_800ED7C4 -.float 1900.0 - -glabel D_800ED7C8 -.float 550.0 -.word 0x00000000 - -glabel D_800ED7D0 -.double 4.2 - -glabel D_800ED7D8 -.double 0.6 - -glabel D_800ED7E0 -.double 0.925 - -glabel D_800ED7E8 -.double 0.1 - -glabel D_800ED7F0 -.float 4500.0 -.word 0x00000000 - -glabel D_800ED7F8 -.double 0.12 - -glabel D_800ED800 -.double 6000.0 - -glabel D_800ED808 -.double 0.6 - -glabel D_800ED810 -.double 0.12 - -glabel D_800ED818 -.double 6000.0 - -glabel D_800ED820 -.double 0.12 - -glabel D_800ED828 -.double 6000.0 - -glabel D_800ED830 -.double 0.02 - -glabel D_800ED838 -.float 2.8 -.word 0x00000000 - -glabel D_800ED840 -.double 0.08 - -glabel D_800ED848 -.double 0.1 - -glabel D_800ED850 -.double 6000.0 - -glabel D_800ED858 -.double 0.12 - -glabel D_800ED860 -.double 6000.0 - -glabel D_800ED868 -.double 0.2 - -glabel D_800ED870 -.double 0.08 - -glabel D_800ED878 -.double 0.12 - -glabel D_800ED880 -.float 0.06 - -glabel D_800ED884 -.float 0.06 - -glabel D_800ED888 -.double 0.13 - -glabel D_800ED890 -.double 0.2 - -glabel D_800ED898 -.double 0.12 - -glabel D_800ED8A0 -.double 6000.0 - -glabel D_800ED8A8 -.double 780.0 - -glabel D_800ED8B0 -.double 6500.0 - -glabel D_800ED8B8 -.float -1100.0 -.word 0x00000000 - -glabel D_800ED8C0 -.double 0.13 - -glabel D_800ED8C8 -.double 0.2 - -glabel D_800ED8D0 -.double 0.018 - -glabel D_800ED8D8 -.double 1.1 - -glabel D_800ED8E0 -.double 1.1 - -glabel D_800ED8E8 -.double 0.0125 - -glabel D_800ED8F0 -.double 1.2 - -glabel D_800ED8F8 -.double 0.025 - -glabel D_800ED900 -.double 1.2 - -glabel D_800ED908 -.double 0.7 - -glabel D_800ED910 -.double 0.7 - -glabel D_800ED918 -.double 0.004 - -glabel D_800ED920 -.double 0.004 - -glabel D_800ED928 -.double 0.7 - -glabel D_800ED930 -.double 0.0126 - -glabel D_800ED938 -.double 0.026 - -glabel D_800ED940 -.double -0.2 - -glabel D_800ED948 -.double -0.55 - -glabel D_800ED950 -.double 0.004 - -glabel D_800ED958 -.double 0.004 - -glabel D_800ED960 -.double 0.01 - -glabel D_800ED968 -.double 0.01 - -glabel D_800ED970 -.double 0.008 - -glabel D_800ED978 -.double 0.008 - -glabel D_800ED980 -.double 0.3 - -glabel D_800ED988 -.double 0.15 - -glabel D_800ED990 -.double 0.05 - -glabel D_800ED998 -.double 0.04 - -glabel D_800ED9A0 -.double -0.85 - -glabel D_800ED9A8 -.double -0.55 - -glabel D_800ED9B0 -.double 0.05 - -glabel D_800ED9B8 -.float 0.35 - -glabel D_800ED9BC -.float 0.55 - -glabel D_800ED9C0 -.float 0.94 - -glabel D_800ED9C4 -.float 0.85 - -glabel D_800ED9C8 -.float 0.46 - -glabel D_800ED9CC -.float 0.48 - -glabel D_800ED9D0 -.float 0.3 - -glabel D_800ED9D4 -.float 0.54 - -glabel D_800ED9D8 -.double 0.1 - -glabel D_800ED9E0 -.double 0.05 - -glabel D_800ED9E8 -.double 0.05 - -glabel D_800ED9F0 -.double 0.1 - -glabel D_800ED9F8 -.double 0.2 - -glabel D_800EDA00 -.double 0.2 - -glabel D_800EDA08 -.double 0.3 - -glabel D_800EDA10 -.double 0.3 - -glabel D_800EDA18 -.double 0.4 - -glabel D_800EDA20 -.double 0.4 - -glabel D_800EDA28 -.double 0.6 - -glabel D_800EDA30 -.double 0.6 - -glabel D_800EDA38 -.double 0.7 - -glabel D_800EDA40 -.double 0.7 - -glabel D_800EDA48 -.double 0.8 - -glabel D_800EDA50 -.double 0.8 - -glabel D_800EDA58 -.double 0.9 - -glabel D_800EDA60 -.double 0.9 - -glabel D_800EDA68 -.double 0.1 - -glabel D_800EDA70 -.double 0.05 - -glabel D_800EDA78 -.double 0.05 - -glabel D_800EDA80 -.double 0.1 - -glabel D_800EDA88 -.double 0.2 - -glabel D_800EDA90 -.double 0.2 - -glabel D_800EDA98 -.double 0.3 - -glabel D_800EDAA0 -.double 0.3 - -glabel D_800EDAA8 -.double 0.4 - -glabel D_800EDAB0 -.double 0.4 - -glabel D_800EDAB8 -.double 0.6 - -glabel D_800EDAC0 -.double 0.6 - -glabel D_800EDAC8 -.double 0.7 - -glabel D_800EDAD0 -.double 0.7 - -glabel D_800EDAD8 -.double 0.8 - -glabel D_800EDAE0 -.double 0.8 - -glabel D_800EDAE8 -.double 0.9 - -glabel D_800EDAF0 -.double 0.9 - -glabel D_800EDAF8 -.double 0.2 - -glabel D_800EDB00 -.double 0.02 - -glabel D_800EDB08 -.double 1.2 - -glabel D_800EDB10 -.double 0.1 - -glabel D_800EDB18 -.double 0.1 - -glabel D_800EDB20 -.double 0.2 - -glabel D_800EDB28 -.double 0.2 - -glabel D_800EDB30 -.double 0.3 - -glabel D_800EDB38 -.double 0.3 - -glabel D_800EDB40 -.double 0.4 - -glabel D_800EDB48 -.double 0.4 - -glabel D_800EDB50 -.double 0.6 - -glabel D_800EDB58 -.double 0.6 - -glabel D_800EDB60 -.double 0.7 - -glabel D_800EDB68 -.double 0.7 - -glabel D_800EDB70 -.double 0.8 - -glabel D_800EDB78 -.double 0.8 - -glabel D_800EDB80 -.double 0.9 - -glabel D_800EDB88 -.double 0.9 - -glabel D_800EDB90 -.float 0.9 -.word 0x00000000 - -glabel D_800EDB98 -.double 0.2 - -glabel D_800EDBA0 -.double 0.7 - -glabel D_800EDBA8 -.double 0.1 - -glabel D_800EDBB0 -.double 3.2 - -glabel D_800EDBB8 -.double 3.2 - -glabel D_800EDBC0 -.double 0.1 - -glabel D_800EDBC8 -.double 0.2 - -glabel D_800EDBD0 -.double 0.2 - -glabel D_800EDBD8 -.double 0.3 - -glabel D_800EDBE0 -.double 0.3 - -glabel D_800EDBE8 -.double 0.4 - -glabel D_800EDBF0 -.double 0.4 - -glabel D_800EDBF8 -.double 0.6 - -glabel D_800EDC00 -.double 0.6 - -glabel D_800EDC08 -.double 0.7 - -glabel D_800EDC10 -.double 0.7 - -glabel D_800EDC18 -.double 0.8 - -glabel D_800EDC20 -.double 2.8 - -glabel D_800EDC28 -.double 2.8 - -glabel D_800EDC30 -.double 0.8 - -glabel D_800EDC38 -.double 0.9 - -glabel D_800EDC40 -.double 0.9 - -glabel D_800EDC48 -.double 0.1 - -glabel D_800EDC50 -.double 3.2 - -glabel D_800EDC58 -.double 3.2 - -glabel D_800EDC60 -.double 0.1 - -glabel D_800EDC68 -.double 0.2 - -glabel D_800EDC70 -.double 0.2 - -glabel D_800EDC78 -.double 0.3 - -glabel D_800EDC80 -.double 0.3 - -glabel D_800EDC88 -.double 0.4 - -glabel D_800EDC90 -.double 0.4 - -glabel D_800EDC98 -.double 0.6 - -glabel D_800EDCA0 -.double 0.6 - -glabel D_800EDCA8 -.double 0.7 - -glabel D_800EDCB0 -.double 0.7 - -glabel D_800EDCB8 -.double 0.8 - -glabel D_800EDCC0 -.double 2.8 - -glabel D_800EDCC8 -.double 2.8 - -glabel D_800EDCD0 -.double 0.8 - -glabel D_800EDCD8 -.double 0.9 - -glabel D_800EDCE0 -.double 0.9 - -glabel D_800EDCE8 -.double 1.2 - -glabel D_800EDCF0 -.double 1.05 - -glabel D_800EDCF8 -.float 0.9 - -glabel D_800EDCFC -.float 0.9 - -glabel D_800EDD00 -.float 0.9 - -glabel D_800EDD04 -.float 0.9 - -glabel D_800EDD08 -.float 0.9 - -glabel D_800EDD0C -.float 1.05 - -glabel D_800EDD10 -.float 1.05 - -glabel D_800EDD14 -.float 1.05 - -glabel D_800EDD18 -.float 1.05 - -glabel D_800EDD1C -.float 1.05 - -glabel D_800EDD20 -.float 1.2 - -glabel D_800EDD24 -.float 1.2 - -glabel D_800EDD28 -.float 1.2 - -glabel D_800EDD2C -.float 1.2 - -glabel D_800EDD30 -.float 1.2 - -glabel D_800EDD34 -.float 1.6 - -glabel D_800EDD38 -.float 1.6 - -glabel D_800EDD3C -.float 1.6 - -glabel D_800EDD40 -.float 1.6 - -glabel D_800EDD44 -.float 1.6 - -glabel D_800EDD48 -.float 1.9 - -glabel D_800EDD4C -.float 1.9 - -glabel D_800EDD50 -.float 1.9 - -glabel D_800EDD54 -.float 1.9 - -glabel D_800EDD58 -.float 1.9 - -glabel D_800EDD5C -.float 1.9 - -glabel D_800EDD60 -.double 0.15 - -glabel D_800EDD68 -.double 1.6 - -glabel D_800EDD70 -.double 0.9 - -glabel D_800EDD78 -.double 0.65 - -glabel D_800EDD80 -.double 1.7 - -glabel D_800EDD88 -.double 0.8 - -glabel D_800EDD90 -.double 0.02 - -glabel D_800EDD98 -.double 0.01 - -glabel D_800EDDA0 -.double 0.05 - -glabel D_800EDDA8 -.double 0.1 - -glabel D_800EDDB0 -.double 0.15 - -glabel D_800EDDB8 -.double 0.1 - -glabel D_800EDDC0 -.double 0.05 - -glabel D_800EDDC8 -.double 0.02 - -glabel D_800EDDD0 -.double 0.01 - -glabel D_800EDDD8 -.double 0.05 - -glabel D_800EDDE0 -.double 0.1 - -glabel D_800EDDE8 -.double 0.15 - -glabel D_800EDDF0 -.double 0.1 - -glabel D_800EDDF8 -.double 0.05 - -glabel D_800EDE00 -.double 0.12 - -glabel D_800EDE08 -.double 6000.0 - -glabel D_800EDE10 -.double 0.02 - -# end of rodata for code_80027D00 +#glabel D_800ED6A0 +#.double 0.1 diff --git a/data/data_0DD0A0_3_0_0.s b/data/data_0DD0A0_3_0_0.s new file mode 100644 index 000000000..4b91d48dc --- /dev/null +++ b/data/data_0DD0A0_3_0_0.s @@ -0,0 +1,740 @@ +.include "macros.inc" + +.section .rodata + +#glabel D_800ED6B0 +#.double 0.7 + +#glabel D_800ED6B8 +#.double 0.8 + +#glabel D_800ED6C0 +#.double 0.1 + +#glabel D_800ED6C8 +#.double 0.02 + +glabel D_800ED6D0 +.double 0.8 + +glabel D_800ED6D8 +.double 0.8 + +glabel D_800ED6E0 +.double 0.1 + +.word 0x00000000, 0x00000000 + +# start rodata for code_80027D00 + +glabel jpt_800ED6F0 +.word L80027F38, L80027FC0, L80028048, L800280D0 +.word L80028854, L80028854, L80028854, L80028854 +.word L80028158, L80028854, L800281E0, L80028854 +.word L8002825C, L80028854, L80028854, L80028854 +.word L80028854, L80028854, L800282E4 + +glabel jpt_800ED73C +.word L80028424 +.word L800284AC, L80028534, L800285BC, L80028854 +.word L80028854, L80028854, L80028854, L80028644 +.word L80028854, L800286CC, L80028854, L80028748 +.word L80028854, L80028854, L80028854, L80028854 +.word L80028854, L800287D0 + +glabel D_800ED788 +.double 1.6 + +glabel D_800ED790 +.double 0.9 + +glabel D_800ED798 +.double 3.6 + +glabel D_800ED7A0 +.double 3.6 + +glabel D_800ED7A8 +.double 2.6 + +glabel D_800ED7B0 +.double 2.6 + +glabel D_800ED7B8 +.float 3500.0 + +glabel D_800ED7BC +.float 1100.0 + +glabel D_800ED7C0 +.float 1500.0 + +glabel D_800ED7C4 +.float 1900.0 + +glabel D_800ED7C8 +.float 550.0 +.word 0x00000000 + +glabel D_800ED7D0 +.double 4.2 + +glabel D_800ED7D8 +.double 0.6 + +glabel D_800ED7E0 +.double 0.925 + +glabel D_800ED7E8 +.double 0.1 + +glabel D_800ED7F0 +.float 4500.0 +.word 0x00000000 + +glabel D_800ED7F8 +.double 0.12 + +glabel D_800ED800 +.double 6000.0 + +glabel D_800ED808 +.double 0.6 + +glabel D_800ED810 +.double 0.12 + +glabel D_800ED818 +.double 6000.0 + +glabel D_800ED820 +.double 0.12 + +glabel D_800ED828 +.double 6000.0 + +glabel D_800ED830 +.double 0.02 + +glabel D_800ED838 +.float 2.8 +.word 0x00000000 + +glabel D_800ED840 +.double 0.08 + +glabel D_800ED848 +.double 0.1 + +glabel D_800ED850 +.double 6000.0 + +glabel D_800ED858 +.double 0.12 + +glabel D_800ED860 +.double 6000.0 + +glabel D_800ED868 +.double 0.2 + +glabel D_800ED870 +.double 0.08 + +glabel D_800ED878 +.double 0.12 + +glabel D_800ED880 +.float 0.06 + +glabel D_800ED884 +.float 0.06 + +glabel D_800ED888 +.double 0.13 + +glabel D_800ED890 +.double 0.2 + +glabel D_800ED898 +.double 0.12 + +glabel D_800ED8A0 +.double 6000.0 + +glabel D_800ED8A8 +.double 780.0 + +glabel D_800ED8B0 +.double 6500.0 + +glabel D_800ED8B8 +.float -1100.0 +.word 0x00000000 + +glabel D_800ED8C0 +.double 0.13 + +glabel D_800ED8C8 +.double 0.2 + +glabel D_800ED8D0 +.double 0.018 + +glabel D_800ED8D8 +.double 1.1 + +glabel D_800ED8E0 +.double 1.1 + +glabel D_800ED8E8 +.double 0.0125 + +glabel D_800ED8F0 +.double 1.2 + +glabel D_800ED8F8 +.double 0.025 + +glabel D_800ED900 +.double 1.2 + +glabel D_800ED908 +.double 0.7 + +glabel D_800ED910 +.double 0.7 + +glabel D_800ED918 +.double 0.004 + +glabel D_800ED920 +.double 0.004 + +glabel D_800ED928 +.double 0.7 + +glabel D_800ED930 +.double 0.0126 + +glabel D_800ED938 +.double 0.026 + +glabel D_800ED940 +.double -0.2 + +glabel D_800ED948 +.double -0.55 + +glabel D_800ED950 +.double 0.004 + +glabel D_800ED958 +.double 0.004 + +glabel D_800ED960 +.double 0.01 + +glabel D_800ED968 +.double 0.01 + +glabel D_800ED970 +.double 0.008 + +glabel D_800ED978 +.double 0.008 + +glabel D_800ED980 +.double 0.3 + +glabel D_800ED988 +.double 0.15 + +glabel D_800ED990 +.double 0.05 + +glabel D_800ED998 +.double 0.04 + +glabel D_800ED9A0 +.double -0.85 + +glabel D_800ED9A8 +.double -0.55 + +glabel D_800ED9B0 +.double 0.05 + +glabel D_800ED9B8 +.float 0.35 + +glabel D_800ED9BC +.float 0.55 + +glabel D_800ED9C0 +.float 0.94 + +glabel D_800ED9C4 +.float 0.85 + +glabel D_800ED9C8 +.float 0.46 + +glabel D_800ED9CC +.float 0.48 + +glabel D_800ED9D0 +.float 0.3 + +glabel D_800ED9D4 +.float 0.54 + +glabel D_800ED9D8 +.double 0.1 + +glabel D_800ED9E0 +.double 0.05 + +glabel D_800ED9E8 +.double 0.05 + +glabel D_800ED9F0 +.double 0.1 + +glabel D_800ED9F8 +.double 0.2 + +glabel D_800EDA00 +.double 0.2 + +glabel D_800EDA08 +.double 0.3 + +glabel D_800EDA10 +.double 0.3 + +glabel D_800EDA18 +.double 0.4 + +glabel D_800EDA20 +.double 0.4 + +glabel D_800EDA28 +.double 0.6 + +glabel D_800EDA30 +.double 0.6 + +glabel D_800EDA38 +.double 0.7 + +glabel D_800EDA40 +.double 0.7 + +glabel D_800EDA48 +.double 0.8 + +glabel D_800EDA50 +.double 0.8 + +glabel D_800EDA58 +.double 0.9 + +glabel D_800EDA60 +.double 0.9 + +glabel D_800EDA68 +.double 0.1 + +glabel D_800EDA70 +.double 0.05 + +glabel D_800EDA78 +.double 0.05 + +glabel D_800EDA80 +.double 0.1 + +glabel D_800EDA88 +.double 0.2 + +glabel D_800EDA90 +.double 0.2 + +glabel D_800EDA98 +.double 0.3 + +glabel D_800EDAA0 +.double 0.3 + +glabel D_800EDAA8 +.double 0.4 + +glabel D_800EDAB0 +.double 0.4 + +glabel D_800EDAB8 +.double 0.6 + +glabel D_800EDAC0 +.double 0.6 + +glabel D_800EDAC8 +.double 0.7 + +glabel D_800EDAD0 +.double 0.7 + +glabel D_800EDAD8 +.double 0.8 + +glabel D_800EDAE0 +.double 0.8 + +glabel D_800EDAE8 +.double 0.9 + +glabel D_800EDAF0 +.double 0.9 + +glabel D_800EDAF8 +.double 0.2 + +glabel D_800EDB00 +.double 0.02 + +glabel D_800EDB08 +.double 1.2 + +glabel D_800EDB10 +.double 0.1 + +glabel D_800EDB18 +.double 0.1 + +glabel D_800EDB20 +.double 0.2 + +glabel D_800EDB28 +.double 0.2 + +glabel D_800EDB30 +.double 0.3 + +glabel D_800EDB38 +.double 0.3 + +glabel D_800EDB40 +.double 0.4 + +glabel D_800EDB48 +.double 0.4 + +glabel D_800EDB50 +.double 0.6 + +glabel D_800EDB58 +.double 0.6 + +glabel D_800EDB60 +.double 0.7 + +glabel D_800EDB68 +.double 0.7 + +glabel D_800EDB70 +.double 0.8 + +glabel D_800EDB78 +.double 0.8 + +glabel D_800EDB80 +.double 0.9 + +glabel D_800EDB88 +.double 0.9 + +glabel D_800EDB90 +.float 0.9 +.word 0x00000000 + +glabel D_800EDB98 +.double 0.2 + +glabel D_800EDBA0 +.double 0.7 + +glabel D_800EDBA8 +.double 0.1 + +glabel D_800EDBB0 +.double 3.2 + +glabel D_800EDBB8 +.double 3.2 + +glabel D_800EDBC0 +.double 0.1 + +glabel D_800EDBC8 +.double 0.2 + +glabel D_800EDBD0 +.double 0.2 + +glabel D_800EDBD8 +.double 0.3 + +glabel D_800EDBE0 +.double 0.3 + +glabel D_800EDBE8 +.double 0.4 + +glabel D_800EDBF0 +.double 0.4 + +glabel D_800EDBF8 +.double 0.6 + +glabel D_800EDC00 +.double 0.6 + +glabel D_800EDC08 +.double 0.7 + +glabel D_800EDC10 +.double 0.7 + +glabel D_800EDC18 +.double 0.8 + +glabel D_800EDC20 +.double 2.8 + +glabel D_800EDC28 +.double 2.8 + +glabel D_800EDC30 +.double 0.8 + +glabel D_800EDC38 +.double 0.9 + +glabel D_800EDC40 +.double 0.9 + +glabel D_800EDC48 +.double 0.1 + +glabel D_800EDC50 +.double 3.2 + +glabel D_800EDC58 +.double 3.2 + +glabel D_800EDC60 +.double 0.1 + +glabel D_800EDC68 +.double 0.2 + +glabel D_800EDC70 +.double 0.2 + +glabel D_800EDC78 +.double 0.3 + +glabel D_800EDC80 +.double 0.3 + +glabel D_800EDC88 +.double 0.4 + +glabel D_800EDC90 +.double 0.4 + +glabel D_800EDC98 +.double 0.6 + +glabel D_800EDCA0 +.double 0.6 + +glabel D_800EDCA8 +.double 0.7 + +glabel D_800EDCB0 +.double 0.7 + +glabel D_800EDCB8 +.double 0.8 + +glabel D_800EDCC0 +.double 2.8 + +glabel D_800EDCC8 +.double 2.8 + +glabel D_800EDCD0 +.double 0.8 + +glabel D_800EDCD8 +.double 0.9 + +glabel D_800EDCE0 +.double 0.9 + +glabel D_800EDCE8 +.double 1.2 + +glabel D_800EDCF0 +.double 1.05 + +glabel D_800EDCF8 +.float 0.9 + +glabel D_800EDCFC +.float 0.9 + +glabel D_800EDD00 +.float 0.9 + +glabel D_800EDD04 +.float 0.9 + +glabel D_800EDD08 +.float 0.9 + +glabel D_800EDD0C +.float 1.05 + +glabel D_800EDD10 +.float 1.05 + +glabel D_800EDD14 +.float 1.05 + +glabel D_800EDD18 +.float 1.05 + +glabel D_800EDD1C +.float 1.05 + +glabel D_800EDD20 +.float 1.2 + +glabel D_800EDD24 +.float 1.2 + +glabel D_800EDD28 +.float 1.2 + +glabel D_800EDD2C +.float 1.2 + +glabel D_800EDD30 +.float 1.2 + +glabel D_800EDD34 +.float 1.6 + +glabel D_800EDD38 +.float 1.6 + +glabel D_800EDD3C +.float 1.6 + +glabel D_800EDD40 +.float 1.6 + +glabel D_800EDD44 +.float 1.6 + +glabel D_800EDD48 +.float 1.9 + +glabel D_800EDD4C +.float 1.9 + +glabel D_800EDD50 +.float 1.9 + +glabel D_800EDD54 +.float 1.9 + +glabel D_800EDD58 +.float 1.9 + +glabel D_800EDD5C +.float 1.9 + +glabel D_800EDD60 +.double 0.15 + +glabel D_800EDD68 +.double 1.6 + +glabel D_800EDD70 +.double 0.9 + +glabel D_800EDD78 +.double 0.65 + +glabel D_800EDD80 +.double 1.7 + +glabel D_800EDD88 +.double 0.8 + +glabel D_800EDD90 +.double 0.02 + +glabel D_800EDD98 +.double 0.01 + +glabel D_800EDDA0 +.double 0.05 + +glabel D_800EDDA8 +.double 0.1 + +glabel D_800EDDB0 +.double 0.15 + +glabel D_800EDDB8 +.double 0.1 + +glabel D_800EDDC0 +.double 0.05 + +glabel D_800EDDC8 +.double 0.02 + +glabel D_800EDDD0 +.double 0.01 + +glabel D_800EDDD8 +.double 0.05 + +glabel D_800EDDE0 +.double 0.1 + +glabel D_800EDDE8 +.double 0.15 + +glabel D_800EDDF0 +.double 0.1 + +glabel D_800EDDF8 +.double 0.05 + +glabel D_800EDE00 +.double 0.12 + +glabel D_800EDE08 +.double 6000.0 + +glabel D_800EDE10 +.double 0.02 + +# end of rodata for code_80027D00 \ No newline at end of file diff --git a/include/common_structs.h b/include/common_structs.h index 66e668cb1..8ff13c8c0 100644 --- a/include/common_structs.h +++ b/include/common_structs.h @@ -226,16 +226,15 @@ typedef struct { /* 0x0020 */ f32 rotX; /* 0x0024 */ f32 rotY; /* 0x0028 */ f32 rotZ; - /* 0x002C */ s16 unk_02C; - /* 0x002E */ s16 unk_02E; - /* 0x0030 */ s16 unk_030; + /* 0x002C */ Vec3s unk_02C; /* 0x0032 */ char unk_032[0x2]; /* 0x0034 */ Vec3f unk_034; /* 0x0040 */ char unk_040[0x2]; /* 0x0042 */ s16 unk_042; /* 0x0044 */ s16 unk_044; /* 0x0046 */ u16 unk_046; - /* 0x0048 */ char unk_048[0x10]; + /* 0x0048 */ Vec3s unk_048; + /* 0x004E */ char unk_04E[0xA]; /* 0x0058 */ f32 unk_058; /* 0x005C */ f32 unk_05C; /* 0x0060 */ f32 unk_060; diff --git a/include/config.h b/include/config.h index 7763ab39a..67fa60410 100644 --- a/include/config.h +++ b/include/config.h @@ -10,6 +10,8 @@ #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 +#define STACKSIZE 0x2000 + // Border Height Define for NTSC Versions #define BORDER_HEIGHT 1 diff --git a/include/variables.h b/include/variables.h index 84a7ebc1f..480b9bc99 100644 --- a/include/variables.h +++ b/include/variables.h @@ -91,10 +91,10 @@ extern Mtx D_80183D60[]; extern struct_D_8018CE10 D_8018CE10[]; extern struct_D_802874D8 D_802874D8; -extern struct_D_802DFB80 D_802DFB80[][8]; -extern struct_D_802BFB80 D_802BFB80[][8]; +//extern struct_D_802DFB80 D_802DFB80[][8]; +//extern struct_D_802BFB80 D_802BFB80[][8]; -extern struct GfxPool *gGfxPool; // D_8014EF40 +//extern struct GfxPool *gGfxPool; // D_8014EF40 extern mk64_surface_map_ram *D_8015F580; // This is techinally a pointer to an array, but declaring it as such create regalloc issues elsewhere extern u16 D_8015F588; // Number of entires in D_8015F580 diff --git a/mk64.ld b/mk64.ld index 3db44d493..69c7bedc9 100644 --- a/mk64.ld +++ b/mk64.ld @@ -255,6 +255,8 @@ SECTIONS BUILD_DIR/src/main.o(.rodata); BUILD_DIR/src/code_800029B0.o(.rodata); BUILD_DIR/data/data_0DD0A0_3.o(.rodata); + BUILD_DIR/src/code_8001F980.o(.rodata); + BUILD_DIR/data/data_0DD0A0_3_0_0.o(.rodata); BUILD_DIR/src/spawn_players.o(.rodata); BUILD_DIR/src/code_8003DC40.o(.rodata); BUILD_DIR/data/data_0DD0A0_3_0_1.o(.rodata); diff --git a/src/actors_extended.c b/src/actors_extended.c index 887496614..3e31807c3 100644 --- a/src/actors_extended.c +++ b/src/actors_extended.c @@ -186,7 +186,7 @@ void func_802B0788(s16 rawStickY, struct BananaBunchParent *banana_bunch, Player var_f12 = (player->unk_094 * 0.75f) + 4.5f + var_f0; } vec3f_set(velocity, 0.0f, var_f0, var_f12); - func_802B64C4(velocity, player->unk_02E + player->unk_0C0); + func_802B64C4(velocity, player->unk_02C[1] + player->unk_0C0); banana->velocity[0] = velocity[0]; banana->velocity[1] = velocity[1]; banana->velocity[2] = velocity[2]; @@ -425,7 +425,7 @@ void update_obj_triple_shell(struct TripleShellParent *parent, s16 shellType) { someVelocity[0] = 0; someVelocity[1] = 0; someVelocity[2] = 8; - func_802B64C4(someVelocity, player->unk_02E + player->unk_0C0); + func_802B64C4(someVelocity, player->unk_02C[1] + player->unk_0C0); shell->velocity[0] = someVelocity[0]; shell->velocity[1] = someVelocity[1]; shell->velocity[2] = someVelocity[2]; @@ -450,7 +450,7 @@ void update_obj_triple_shell(struct TripleShellParent *parent, s16 shellType) { someVelocity[0] = 0; someVelocity[1] = 0; someVelocity[2] = 8; - func_802B64C4(someVelocity, player->unk_02E + player->unk_0C0); + func_802B64C4(someVelocity, player->unk_02C[1] + player->unk_0C0); shell->velocity[0] = someVelocity[0]; shell->velocity[1] = someVelocity[1]; shell->velocity[2] = someVelocity[2]; @@ -475,7 +475,7 @@ void update_obj_triple_shell(struct TripleShellParent *parent, s16 shellType) { someVelocity[0] = 0; someVelocity[1] = 0; someVelocity[2] = 8; - func_802B64C4(someVelocity, player->unk_02E + player->unk_0C0); + func_802B64C4(someVelocity, player->unk_02C[1] + player->unk_0C0); shell->velocity[0] = someVelocity[0]; shell->velocity[1] = someVelocity[1]; shell->velocity[2] = someVelocity[2]; @@ -649,7 +649,7 @@ s32 func_802B1E48(Player *player) { func_802B4E30(shell); shell->state = 0; shell->rotVelocity = 0; - shell->rotAngle = player->unk_02E - 0x8000; + shell->rotAngle = player->unk_02C[1] - 0x8000; shell->playerId = player - gPlayerOne; return actorIndex; } @@ -725,7 +725,7 @@ void update_obj_banana(struct BananaActor *banana) { temp_f0 = (player->unk_094 * 0.75f) + 3.5f + pad1; } vec3f_set(someVelocity, 0, pad1, temp_f0); - func_802B64C4(someVelocity, player->unk_02E + player->unk_0C0); + func_802B64C4(someVelocity, player->unk_02C[1] + player->unk_0C0); banana->velocity[0] = someVelocity[0]; banana->velocity[1] = someVelocity[1]; banana->velocity[2] = someVelocity[2]; @@ -771,7 +771,7 @@ void update_obj_banana(struct BananaActor *banana) { someVelocity[0] = 0.0f; someVelocity[1] = 0.0f; someVelocity[2] = -5.0f; - func_802B64C4(someVelocity, player->unk_02E + player->unk_0C0); + func_802B64C4(someVelocity, player->unk_02C[1] + player->unk_0C0); unkX = player->pos[0] + someVelocity[0]; unkY = player->pos[1] + someVelocity[1]; unkZ = player->pos[2] + someVelocity[2]; @@ -1151,7 +1151,7 @@ void update_obj_green_shell(struct ShellActor *shell) { somePosVel[0] = 0.0f; somePosVel[1] = 0.0f; somePosVel[2] = -var_f2; - func_802B64C4(somePosVel, player->unk_02E + player->unk_0C0); + func_802B64C4(somePosVel, player->unk_02C[1] + player->unk_0C0); shell->velocity[0] = somePosVel[0]; shell->velocity[1] = somePosVel[1]; shell->velocity[2] = somePosVel[2]; @@ -1200,7 +1200,7 @@ void update_obj_green_shell(struct ShellActor *shell) { somePosVel[0] = 0.0f; somePosVel[1] = 0.0f; somePosVel[2] = var_f2; - func_802B64C4(somePosVel, player->unk_02E + player->unk_0C0); + func_802B64C4(somePosVel, player->unk_02C[1] + player->unk_0C0); shell->velocity[0] = somePosVel[0]; shell->velocity[1] = somePosVel[1]; shell->velocity[2] = somePosVel[2]; @@ -1578,7 +1578,7 @@ void update_obj_red_blue_shell(struct ShellActor *shell) { somePosVel[0] = 0.0f; somePosVel[1] = 0.0f; somePosVel[2] = temp_f0; - func_802B64C4(somePosVel, (s16) (player->unk_02E + player->unk_0C0)); + func_802B64C4(somePosVel, (s16) (player->unk_02C[1] + player->unk_0C0)); shell->velocity[0] = somePosVel[0]; shell->velocity[1] = somePosVel[1]; shell->velocity[2] = somePosVel[2]; diff --git a/src/camera.c b/src/camera.c index fb9e39da1..e703fbb60 100644 --- a/src/camera.c +++ b/src/camera.c @@ -806,7 +806,7 @@ void func_8001E0C4(Camera *camera, Player *player, s8 arg2) { } else { var_a2 = (temp_v0 / 3) + 0x87; } - func_800224F0(&camera->unk_2C, player->unk_02E, var_a2); + func_800224F0(&camera->unk_2C, player->unk_02C[1], var_a2); func_8001CA78(player, camera, &sp60, &sp74, &sp70, &sp6C, (s32) camera->unk_2C, (s32) arg2); camera->rotZ = (u16) camera->rotZ & 0xFFFB; func_802ADDC8(&camera->unk_54, (f32) 3, sp74, sp70, sp6C); @@ -907,7 +907,7 @@ void func_8001E45C(Camera *camera, Player *player, s8 arg2) { } else { move_s16_towards(&camera->unk_B0, 0, 0.05f); temp_v1_2 = player->unk_078; - temp_a3_3 = ((s16) camera->unk_2C / 182) - ((s16) player->unk_02E / 182); + temp_a3_3 = ((s16) camera->unk_2C / 182) - ((s16) player->unk_02C[1] / 182); if (temp_v1_2 == 0) { if ((player->unk_0BC & 0x20) == 0x20) { var_a3 = 0x02D8; @@ -929,7 +929,7 @@ void func_8001E45C(Camera *camera, Player *player, s8 arg2) { if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) || ((player->unk_0BC & 0x4000) == 0x4000) || ((player->unk_0BC & 0x80000) == 0x80000) || ((player->unk_0BC & 0x800000) == 0x800000) || (((player->unk_0BC & 0x20) == 0x20) && (player->unk_078 != 0)) || (player->unk_110.unk3C <= 0.0f) || (player->unk_110.unk40 <= 0.0f) || ((player->unk_0BC & 0x20000) == 0x20000)) { func_8001CCEC(player, camera, &sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2); } else { - func_800224F0(&camera->unk_2C, (s16) (player->unk_02E + camera->unk_B0), var_a3); + func_800224F0(&camera->unk_2C, (s16) (player->unk_02C[1] + camera->unk_B0), var_a3); func_8001CCEC(player, camera, &sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2); } camera->rotZ = (u16) camera->rotZ & 0xFFFB; @@ -969,8 +969,8 @@ void func_8001E8E8(Camera *camera, Player *player, s8 arg2) { f32 temp_f14; camera->unk_B0 = 0; - camera->unk2C = (s16) player->unk_02E; - func_8001D53C(player, camera, &sp5C, &sp7C, &sp78, &sp74, (s32) player->unk_02E, (s32) arg2); + camera->unk2C = (s16) player->unk_02C[1]; + func_8001D53C(player, camera, &sp5C, &sp7C, &sp78, &sp74, (s32) player->unk_02C[1], (s32) arg2); func_802ADDC8(&camera->unk_54, 5.0f, sp7C, sp78, sp74); camera->lookAt[0] = sp5C; camera->lookAt[1] = sp60; @@ -1046,7 +1046,7 @@ void func_8001EA0C(Camera *camera, Player *player, s8 arg2) { } else { move_s16_towards(&camera->unk_B0, 0, 0.05f); temp_v1_2 = player->unk_078; - temp_a3_3 = ((s16) camera->unk_2C / 182) - ((s16) player->unk_02E / 182); + temp_a3_3 = ((s16) camera->unk_2C / 182) - ((s16) player->unk_02C[1] / 182); if (temp_v1_2 == 0) { if ((player->unk_0BC & 0x20) == 0x20) { var_a3 = 0x02D8; @@ -1068,7 +1068,7 @@ void func_8001EA0C(Camera *camera, Player *player, s8 arg2) { if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) || ((player->unk_0BC & 0x4000) == 0x4000) || ((player->unk_0BC & 0x80000) == 0x80000) || ((player->unk_0BC & 0x800000) == 0x800000) || (((player->unk_0BC & 0x20) == 0x20) && (player->unk_078 != 0)) || (player->unk_110.unk3C <= 0.0f) || (player->unk_110.unk40 <= 0.0f) || ((player->unk_0BC & 0x20000) == 0x20000)) { func_8001D944(player, camera, &sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2); } else { - func_800224F0(&camera->unk_2C, (s16) (player->unk_02E + camera->unk_B0), var_a3); + func_800224F0(&camera->unk_2C, (s16) (player->unk_02C[1] + camera->unk_B0), var_a3); func_8001D944(player, camera, &sp64, &sp84, &sp80, &sp7C, &sp58, (s32) camera->unk_2C, (s32) arg2); } camera->rotZ = (u16) camera->rotZ & 0xFFFB; diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index f29dc55bc..3f2efb62c 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -146,7 +146,7 @@ void func_800065D0(s32 arg0, Player *player) { u16 temp_t9; temp_v0 = arg0 * 2; - temp_t2 = (s16) ((s16) player->unk_02E / 182) - (s16) ((s16) D_80164590[(s16) gPathIndexByPlayerId[arg0]][gNearestWaypointByPlayerId[arg0]] / 182); + temp_t2 = (s16) ((s16) player->unk_02C[1] / 182) - (s16) ((s16) D_80164590[(s16) gPathIndexByPlayerId[arg0]][gNearestWaypointByPlayerId[arg0]] / 182); var_t1 = temp_t2; if (temp_t2 < 0) { var_t1 = temp_t2 * -1; @@ -2596,9 +2596,9 @@ block_63: } } sp3C = var_t0_2; - sp40->unk_02E = -func_802B5224(sp40->pos, &D_80162FA0); + sp40->unk_02C[1] = -func_802B5224(sp40->pos, &D_80162FA0); } else { - sp40->unk_02E = (s16) D_80164590[D_80163448][(s32) (D_801630E0 + 4) % (s32) D_80164430]; + sp40->unk_02C[1] = (s16) D_80164590[D_80163448][(s32) (D_801630E0 + 4) % (s32) D_80164430]; } } sp3C = var_t0_2; @@ -2716,7 +2716,7 @@ block_63: sp20 = temp_t0_2; *temp_v1_7 = D_80162FA0.unk8; temp_f2_2 = 1.5f * 182.0f; - temp_v1_8 = -func_802B5224(sp1C, &D_80162FA0) - sp40->unk_02E; + temp_v1_8 = -func_802B5224(sp1C, &D_80162FA0) - sp40->unk_02C[1]; temp_f10 = (s32) temp_f2_2; var_a2 = temp_v1_8; temp_f6 = (s32) (-1.5f * 182.0f); @@ -6068,41 +6068,37 @@ void func_80011A5C(void) { GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011A5C.s") #endif -#ifdef MIPS_TO_C +//#ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_801632B8; -extern ? D_801632D0; -extern ? D_801632E8; + +// Probably a struct but it matches so good enough for now. +extern s16 D_801632B8[]; +extern s16 D_801632D0[]; +extern s16 D_801632E8[]; void func_80011AB8(s32 arg0) { - s32 temp_v0; - - temp_v0 = arg0 * 2; - *(&D_801632B8 + temp_v0) = 0; - *(&D_801632D0 + temp_v0) = 0; - *(&D_801632E8 + temp_v0) = 0; + D_801632B8[arg0] = 0; + D_801632D0[arg0] = 0; + D_801632E8[arg0] = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011AB8.s") -#endif +//#else +//GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011AB8.s") +//#endif -#ifdef MIPS_TO_C +//#ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_801632B8; -extern ? D_801632D0; -extern ? D_801632E8; +//extern ? D_801632B8; +//extern ? D_801632D0; +//extern ? D_801632E8; void func_80011AE4(s32 arg0) { - s32 temp_v0; - - temp_v0 = arg0 * 2; - *(&D_801632B8 + temp_v0) = 0; - *(&D_801632D0 + temp_v0) = 0; - *(&D_801632E8 + temp_v0) = 1; + D_801632B8[arg0] = 0; + D_801632D0[arg0] = 0; + D_801632E8[arg0] = 1; } -#else -GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011AE4.s") -#endif +//#else +//GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011AE4.s") +//#endif #ifdef MIPS_TO_C //generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9 @@ -7965,12 +7961,12 @@ UNUSED void func_8001530C(void) { void func_80015390(Camera*, Player*, s32,s32); void func_80015314(s32 playerId, s32 arg1, s32 cameraId) { Camera *temp_a0 = &camera1[cameraId]; - Player *temp_a1 = &gPlayerOne[playerId]; + Player *player = &gPlayerOne[playerId]; //temp_a1 = &gPlayerOne[playerId]; //temp_a0 = &camera1[cameraId]; - temp_a0->unk_2C = temp_a1->unk_02E; - func_80015390(temp_a0, temp_a1, 0, playerId); + temp_a0->unk_2C = player->unk_02C[1]; + func_80015390(temp_a0, player, 0, playerId); } #else GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80015314.s") @@ -8006,7 +8002,7 @@ void func_80015390(Camera *camera, s32 arg1, s32 arg2) { } temp_v0_2 = temp_s1->unk_0BC; if (!(temp_v0_2 & 0x80) && !(temp_v0_2 & 0x40)) { - func_800224F0(&camera->unk_2C, temp_s1->unk_02E, var_a2); + func_800224F0(&camera->unk_2C, temp_s1->unk_02C[1], var_a2); } func_8001D794(temp_s1, camera, &sp64, &sp84, &sp80, &sp7C, (s32) camera->unk_2C); func_802ADDC8(&camera->unk_54, 10.0f, sp84, sp80, sp7C); diff --git a/src/code_8001F980.c b/src/code_8001F980.c index 46168199f..49148762a 100644 --- a/src/code_8001F980.c +++ b/src/code_8001F980.c @@ -5,8 +5,11 @@ #include "types.h" #include "variables.h" #include "math_util.h" +#include "math_util_2.h" #include "code_8001F980.h" #include "code_80057C60.h" +#include "framebuffers.h" +#include "main.h" // Not yet implemented. Needs more work to match. // Remove ifdef when matching. @@ -34,38 +37,25 @@ void func_8001F980(s32 *arg0, s32 *arg1) { *arg1 = 0; } -#ifdef MIPS_TO_C -//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de void func_8001F9E4(Player *player, Camera *camera, s8 arg2) { + s32 pad; s32 sp30; s32 sp2C; - s32 sp24; - s32 sp20; - s32 temp_t0; - s32 temp_t6; - s32 temp_v1; - u16 temp_t3; + s32 pad2; get_player_index_for_player(player); func_8001F980(&sp30, &sp2C); - temp_t6 = arg2 * 4; - temp_v1 = 2 << temp_t6; - temp_t0 = 8 << temp_t6; - temp_t3 = player->unk_002 & ~temp_v1; - player->unk_002 = temp_t3; - player->unk_002 = temp_t3 & ~temp_t0; - sp20 = temp_t0; - sp24 = temp_v1; + + player->unk_002 &= ~(2 << (arg2 * 4)); + player->unk_002 &= ~(8 << (arg2 * 4)); + if (func_8001FB0C(player, camera, (f32) (D_80165578 + sp30), (f32) (D_8016557A + sp2C)) == 1) { - player->unk_002 |= temp_v1; + player->unk_002 |= 2 << (arg2 * 4); } if (func_8001FB0C(player, camera, (f32) D_80165580, (f32) D_80165582) == 1) { - player->unk_002 |= sp20; + player->unk_002 |= 8 << (arg2 * 4); } } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_8001F9E4.s") -#endif u16 func_8001FB0C(Player *player, Camera *camera, f32 arg2, f32 arg3) { f32 pad[6]; @@ -126,12 +116,12 @@ u16 func_8001FD78(Player *player, f32 posX, f32 arg2, f32 posZ) { u16 ret; ret = 0; - sp58 = (70.0f * coss(((player->unk_0C0 - player->unk_02E) - 0x71C))) + player->pos[2]; - sp64 = (70.0f * sins(((player->unk_0C0 - player->unk_02E) - 0x71C))) + player->pos[0]; - sp54 = (70.0f * coss(((player->unk_0C0 - player->unk_02E) + 0x71C))) + player->pos[2]; - sp60 = (70.0f * sins(((player->unk_0C0 - player->unk_02E) + 0x71C))) + player->pos[0]; - sp50 = (10.0f * coss(((player->unk_0C0 - player->unk_02E) + 0x1C70))) + player->pos[2]; - sp5c = (10.0f * sins(((player->unk_0C0 - player->unk_02E) + 0x1C70))) + player->pos[0]; + sp58 = (70.0f * coss(((player->unk_0C0 - player->unk_02C[1]) - 0x71C))) + player->pos[2]; + sp64 = (70.0f * sins(((player->unk_0C0 - player->unk_02C[1]) - 0x71C))) + player->pos[0]; + sp54 = (70.0f * coss(((player->unk_0C0 - player->unk_02C[1]) + 0x71C))) + player->pos[2]; + sp60 = (70.0f * sins(((player->unk_0C0 - player->unk_02C[1]) + 0x71C))) + player->pos[0]; + sp50 = (10.0f * coss(((player->unk_0C0 - player->unk_02C[1]) + 0x1C70))) + player->pos[2]; + sp5c = (10.0f * sins(((player->unk_0C0 - player->unk_02C[1]) + 0x1C70))) + player->pos[0]; temp_f14 = ((sp58 - posZ) * (sp60 - posX)) - ((sp54 - posZ) * (sp64 - posX)); thing0 = ((sp54 - posZ) * (sp5c - posX)) - ((sp50 - posZ) * (sp60 - posX)); thing1 = ((sp50 - posZ) * (sp64 - posX)) - ((sp58 - posZ) * (sp5c - posX)); @@ -278,78 +268,44 @@ block_21: GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80020000.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_80027560(s32, s8, s8, s8, s32); // extern -? func_8006E5AC(Player *, ?, ?); // extern -extern s32 D_800DDB58; extern OSMesgQueue gDmaMesgQueue; extern void *gMainReceivedMesg; -extern ? D_80164AAE; -extern s16 D_80164AB0; -extern ? D_80164ABE; -extern s16 D_80164AC0; -extern s32 D_80164AD0; +extern s16 D_80164AAE[]; +extern s16 D_80164AB0[]; +extern s16 D_80164ABE[]; +extern s16 D_80164AC0[]; +extern s32 D_80164AD0[]; +void func_80027560(Player*, s8, s8, s8, s8); +void mio0decode(u8*, u8*); void func_80020524(void) { - s16 temp_a2; - s16 temp_a2_2; - s16 temp_s0; - s16 temp_t0; - s16 temp_t0_2; - s16 temp_v0; - s16 temp_v0_3; - s16 temp_v1; - s16 temp_v1_2; - s16 temp_v1_3; - s16 temp_v1_4; - s32 temp_a3; - s32 temp_v0_2; - void *temp_s1; - void *temp_s2; - s16 phi_s0; + s16 i; - temp_v1 = D_80164AC0; - temp_v0 = D_80164AB0; - func_80027560(D_80164AD0, temp_v0, temp_v1, temp_v1, *(&D_801651D0[temp_v1] + (temp_v0 * 2))); + func_80027560(D_80164AD0[0], D_80164AB0[0], D_80164AC0[0], D_80164AC0[0], D_801651D0[D_80164AC0[0]][D_80164AB0[0]]); func_8006E5AC(gPlayerOneCopy, 0, 0); func_8006E5AC(gPlayerTwo, 1, 0); func_8006E5AC(gPlayerThree, 2, 0); func_8006E5AC(gPlayerFour, 3, 0); - if (gActiveScreenMode != 3) { + if (gActiveScreenMode != SCREEN_MODE_3P_4P_SPLITSCREEN) { func_8006E5AC(gPlayerFive, 4, 0); func_8006E5AC(gPlayerSix, 5, 0); func_8006E5AC(gPlayerSeven, 6, 0); func_8006E5AC(gPlayerEight, 7, 0); } - osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, 1); - phi_s0 = 1; - if (D_800DDB58 >= 2) { - do { - temp_v0_2 = phi_s0 * 2; - temp_s2 = temp_v0_2 + &D_80164AC0; - temp_t0 = temp_s2->unk0; - temp_s1 = temp_v0_2 + &D_80164AB0; - temp_v1_2 = temp_s1->unk0; - func_80027560(*(&D_80164AD0 + (phi_s0 * 4)), temp_v1_2, temp_t0, temp_t0, *(&D_801651D0[temp_t0] + (temp_v1_2 * 2))); - temp_v0_3 = temp_s2->unk-2; - temp_v1_3 = temp_s1->unk-2; - temp_a2 = *(&D_801651D0[temp_v0_3] + (temp_v1_3 * 2)); - mio0decode(D_802DFB80 + (temp_a2 * 0x9200) + (temp_v0_3 * 0x4900) + (temp_v1_3 * 0x920), &D_802BFB80[(temp_a2 << 0x10) + (temp_v0_3 << 0xF) + (temp_v1_3 << 0xC)]); - osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, 1); - temp_s0 = phi_s0 + 1; - phi_s0 = temp_s0; - } while (temp_s0 < D_800DDB58); + osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); + + for (i = 1; i < D_800DDB58; i++) { + + func_80027560(D_80164AD0[i], D_80164AB0[i], D_80164AC0[i], D_80164AC0[i], D_801651D0[D_80164AC0[i]][D_80164AB0[i]]); + + mio0decode(&D_802DFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1] * 0x920], + &D_802BFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1] * 0x1000]); + osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } - temp_a3 = D_800DDB58 * 2; - temp_v1_4 = *(&D_80164ABE + temp_a3); - temp_a2_2 = *(&D_80164AAE + temp_a3); - temp_t0_2 = *(&D_801651D0[temp_v1_4] + (temp_a2_2 * 2)); - mio0decode(D_802DFB80 + (temp_t0_2 * 0x9200) + (temp_v1_4 * 0x4900) + (temp_a2_2 * 0x920), &D_802BFB80[(temp_t0_2 << 0x10) + (temp_v1_4 << 0xF) + (temp_a2_2 << 0xC)]); + + mio0decode(&D_802DFB80[D_801651D0[D_80164ABE[D_800DDB58]][D_80164AAE[D_800DDB58]]][D_80164ABE[D_800DDB58]][D_80164AAE[D_800DDB58] * 0x920], + &D_802BFB80[D_801651D0[D_80164ABE[D_800DDB58]][D_80164AAE[D_800DDB58]]][D_80164ABE[D_800DDB58]][D_80164AAE[D_800DDB58] * 0x1000]); } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80020524.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -558,23 +514,15 @@ void func_80020F1C(void) { GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80020F1C.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80021244(Player *arg0, s8 arg1, s8 arg2) { - s32 temp_v0_2; - u16 temp_v0; +void func_80021244(Player *player, s8 arg1, s8 arg2) { - temp_v0 = arg0->unk_000; - if (((temp_v0 & PLAYER_EXISTS) == PLAYER_EXISTS) && ((temp_v0 & 0x40) == 0)) { - temp_v0_2 = 2 << (arg2 * 4); - if (temp_v0_2 == (arg0->unk_002 & temp_v0_2)) { - func_800267AC(arg0, arg1, arg2); + if (((player->unk_000 & PLAYER_EXISTS) == PLAYER_EXISTS) + && ((player->unk_000 & 0x40) == 0)) { + if ((player->unk_002 & 2 << (arg2 * 4)) == 2 << (arg2 * 4)) { + func_800267AC(player, arg1, arg2); } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80021244.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -648,7 +596,7 @@ GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800212B4.s") #endif void func_800215DC(void) { - D_800DDB58[0] = 0; + D_800DDB58 = 0; func_80020000(gPlayerOneCopy, camera2, 0, 1); func_80020000(gPlayerTwo, camera2, 1, 1); func_80020000(gPlayerThree, camera2, 2, 1); @@ -669,7 +617,7 @@ void func_800215DC(void) { func_80021244(gPlayerSeven, 6, 1); func_80021244(gPlayerEight, 7, 1); } - if (D_800DDB58[0] != 0) { + if (D_800DDB58 != 0) { func_8002088C(); } else { func_8006E634(gPlayerOneCopy, 0, 1); @@ -683,13 +631,13 @@ void func_800215DC(void) { func_8006E634(gPlayerEight, 7, 1); } } - D_800DDB58[0] = 0; + D_800DDB58 = 0; } void func_8006E6BC(Player*, s8, s8); // extern void func_8002186C(void) { - D_800DDB58[0] = 0; + D_800DDB58 = 0; func_80020000(gPlayerOneCopy, camera3, 0, 2); func_80020000(gPlayerTwo, camera3, 1, 2); func_80020000(gPlayerThree, camera3, 2, 2); @@ -698,7 +646,7 @@ void func_8002186C(void) { func_80021244(gPlayerTwo, 1, 2); func_80021244(gPlayerThree, 2, 2); func_80021244(gPlayerFour, 3, 2); - if (D_800DDB58[0] != 0) { + if (D_800DDB58 != 0) { func_80020BF4(); } else { func_8006E6BC(gPlayerOneCopy, 0, 2); @@ -706,11 +654,11 @@ void func_8002186C(void) { func_8006E6BC(gPlayerThree, 2, 2); func_8006E6BC(gPlayerFour, 3, 2); } - D_800DDB58[0] = 0; + D_800DDB58 = 0; } void func_800219BC(void) { - *D_800DDB58 = 0; + D_800DDB58 = 0; func_80020000(gPlayerOneCopy, camera4, 0, 3); func_80020000(gPlayerTwo, camera4, 1, 3); func_80020000(gPlayerThree, camera4, 2, 3); @@ -719,7 +667,7 @@ void func_800219BC(void) { func_80021244(gPlayerTwo, 1, 3); func_80021244(gPlayerThree, 2, 3); func_80021244(gPlayerFour, 3, 3); - if (*D_800DDB58 != 0) { + if (D_800DDB58 != 0) { func_80020F1C(); } else { func_8006E744(gPlayerOneCopy, 0, 3); @@ -727,7 +675,7 @@ void func_800219BC(void) { func_8006E744(gPlayerThree, 2, 3); func_8006E744(gPlayerFour, 3, 3); } - *D_800DDB58 = 0; + D_800DDB58 = 0; } #ifdef MIPS_TO_C @@ -1045,719 +993,451 @@ void func_80022A98(Player* player, s8 arg1) { func_800235AC(player, arg1); if (((player->unk_0BC & 0x04000000) == 0x04000000) || ((player->unk_0BC & 0x08000000) == 0x08000000)) { if ((player->unk_0BC & 0x04000000) == 0x04000000) { - func_80022B50(player, arg1, 0x08000000); + func_80022B50(player, arg1); } if ((player->unk_0BC & 0x08000000) == 0x08000000) { - func_80022BC4(player, arg1, 0x08000000); + func_80022BC4(player, arg1); } } else { - func_80022DB4(player, arg1, 0x08000000); + func_80022DB4(player, arg1); } func_80030A34(player); } } -#ifdef MIPS_TO_C -//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de -extern f64 D_800ED690;// = 0.7; - -void func_80022B50(Player *player, s32 unused) { +void func_80022B50(Player *player, UNUSED s8 arg1) { f32 temp_f0; s16 var_v0; var_v0 = player->unk_DB6; temp_f0 = player->unk_DC4; if (var_v0 < 5) { - var_v0 += 1; + var_v0++; } + + player->unk_DA4 = (var_v0 * temp_f0) - (0.7 * (var_v0 * var_v0)); player->unk_DC4 = temp_f0; player->unk_DB6 = var_v0; - player->unk_DA4 = (s16) (s32) ((f64) ((f32) var_v0 * temp_f0) - (0.7 * (f64) (var_v0 * var_v0))); } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022B50.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern f64 D_800ED698; -extern f64 D_800ED6A0; +void func_80022BC4(Player *player, UNUSED s8 arg1) { + f32 temp_f0 = player->unk_DC4; + s16 temp_v0 = player->unk_DB6; + s16 temp_f16; -void func_80022BC4(void *arg0, ? arg1) { - f32 temp_f0; - f32 temp_f0_2; - s16 temp_v0; - s32 temp_f16; - s16 phi_v1; - f32 phi_f0; - s16 phi_v0; + temp_v0++; - temp_v0 = arg0->unkDB6 + 1; - temp_f0 = arg0->unkDC4; temp_f16 = (temp_v0 * temp_f0) - (0.5 * (temp_v0 * temp_v0)); - phi_v1 = temp_f16; - phi_f0 = temp_f0; - phi_v0 = temp_v0; + + if ((temp_v0 != 0) && (temp_f16 < 0)) { - temp_f0_2 = temp_f0 * D_800ED698; - phi_f0 = temp_f0_2; - phi_v0 = 0; - if (temp_f0_2 <= D_800ED6A0) { - arg0->unkBC = arg0->unkBC & 0xF7FFFFFF; - phi_f0 = 0.0f; + temp_f0 *= 0.8; + temp_v0 = 0; + if (temp_f0 <= 0.1) { + player->unk_0BC &= 0xF7FFFFFF; + temp_f0 = 0.0f; } } if (temp_f16 <= 0) { - phi_v1 = 0; + temp_f16 = 0; } - arg0->unkDA4 = phi_v1; - arg0->unkDC4 = phi_f0; - arg0->unkDB6 = phi_v0; + player->unk_DA4 = temp_f16; + player->unk_DC4 = temp_f0; + player->unk_DB6 = temp_v0; } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022BC4.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_800DDBB4; -extern f64 D_800ED6A8; +/* +Vtx D_800E49C0[] = { + {{9, 18, -6}, {4032, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 9, -6}, {4032, 1984}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 9, -6}, {0, 1984}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 18, -6}, {0, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 9, -6}, {4032, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 0, -6}, {4032, 1792}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 0, -6}, {0, 1792}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 9, -6}, {0, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 18, -6}, {0, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 9, -6}, {0, 1984}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 9, -6}, {4032, 1984}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 18, -6}, {4032, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 9, -6}, {0, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{9, 0, -6}, {0, 1792}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 0, -6}, {4032, 1792}, {0xFF, 0xFF, 0xFF, 0xFF}}, + {{-9, 9, -6}, {4032, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}, +}; +*/ -void func_80022CA8(void *arg0, s8 arg1, ? arg2, s8 arg3) { - s16 temp_t1; - s16 temp_v0; - s32 *temp_v1; - s32 temp_a2; - s32 temp_f4; +// uintptr_t derefereced to Vtx +// import me .data +extern Vtx *D_800DDBB4[]; - temp_v0 = arg0->unkDA4; - temp_v1 = (arg1 * 4) + &D_800DDBB4; - temp_a2 = arg3 * 0x10; - temp_t1 = 9 - temp_v0; - temp_f4 = 18.0 - (temp_v0 * D_800ED6A8); - (*temp_v1 + temp_a2)->unk2 = temp_f4; - (*temp_v1 + temp_a2)->unk12 = temp_t1; - (*temp_v1 + temp_a2)->unk22 = temp_t1; - (*temp_v1 + temp_a2)->unk32 = temp_f4; - (*temp_v1 + temp_a2)->unk42 = temp_t1; - (*temp_v1 + temp_a2)->unk72 = temp_t1; +// import me .data +extern f32 D_800ED6A8; + +void func_80022CA8(Player *player, s8 arg1, s8 arg2, s8 arg3) { + s16 temp_v0 = player->unk_DA4; + + D_800DDBB4[arg1][arg3 + 0x0].v.ob[1] = 18 - (temp_v0 * 2.3); + D_800DDBB4[arg1][arg3 + 0x1].v.ob[1] = 9 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x2].v.ob[1] = 9 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x3].v.ob[1] = 18 - (temp_v0 * 2.3); + D_800DDBB4[arg1][arg3 + 0x4].v.ob[1] = 9 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x7].v.ob[1] = 9 - temp_v0; } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022CA8.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_800DDBB4; - -void func_80022D60(s32 arg0, s8 arg1, ? arg2, s8 arg3) { - s32 *temp_v0; - s32 temp_v1; - - temp_v0 = (arg1 * 4) + &D_800DDBB4; - temp_v1 = arg3 * 0x10; - (*temp_v0 + temp_v1)->unk2 = 0x15; - (*temp_v0 + temp_v1)->unk32 = 0x15; +/** + * Seems to stretch/warp a specific players texture for a + * short period of time. Perhaps does not do anything + **/ +void func_80022D60(UNUSED Player *player, s8 arg1, s8 arg2, s8 arg3) { + D_800DDBB4[arg1][arg3].v.ob[1] = 21; + D_800DDBB4[arg1][arg3 + 0x3].v.ob[1] = 21; } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022D60.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern f64 D_800ED6B0; -extern f64 D_800ED6B8; -extern f64 D_800ED6C0; +void func_80022DB4(Player *player, UNUSED s8 arg1) { + f32 temp_f0 = player->unk_DC0; + s16 temp_v0 = player->unk_DCC; + s16 temp_f16; + + temp_v0++; + + temp_f16 = (temp_v0 * temp_f0) - (0.7 * (temp_v0 * temp_v0)); -void func_80022DB4(void *arg0, ? arg1) { - f32 temp_f0; - f32 temp_f0_2; - s16 temp_v0; - s32 temp_f16; - s16 phi_v1; - f32 phi_f0; - s16 phi_v0; - temp_v0 = arg0->unkDCC + 1; - temp_f0 = arg0->unkDC0; - temp_f16 = (temp_v0 * temp_f0) - (D_800ED6B0 * (temp_v0 * temp_v0)); - phi_v1 = temp_f16; - phi_f0 = temp_f0; - phi_v0 = temp_v0; if ((temp_v0 != 0) && (temp_f16 < 0)) { - temp_f0_2 = temp_f0 * D_800ED6B8; - phi_f0 = temp_f0_2; - phi_v0 = 0; - if (temp_f0_2 <= D_800ED6C0) { - phi_f0 = 0.0f; + temp_f0 *= 0.8; + temp_v0 = 0; + if (temp_f0 <= 0.1) { + temp_f0 = 0.0f; } } if (temp_f16 <= 0) { - phi_v1 = 0; + temp_f16 = 0; } - arg0->unkDD2 = phi_v1; - arg0->unkDC0 = phi_f0; - arg0->unkDCC = phi_v0; + player->unk_DD2 = temp_f16; + player->unk_DC0 = temp_f0; + player->unk_DCC = temp_v0; } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022DB4.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_800DDBB4; +void func_80022E84(Player *player, s8 arg1, s8 arg2, s8 arg3) { + s16 temp_v0 = player->unk_DD2; -void func_80022E84(void *arg0, s8 arg1, ? arg2, s8 arg3) { - s16 temp_t0; - s16 temp_t1; - s16 temp_v0; - s32 *temp_v1; - s32 temp_a2; - - temp_v1 = (arg1 * 4) + &D_800DDBB4; - temp_v0 = arg0->unkDD2; - temp_a2 = arg3 * 0x10; - temp_t0 = 0x12 - temp_v0; - (*temp_v1 + temp_a2)->unk2 = temp_t0; - temp_t1 = 9 - temp_v0; - (*temp_v1 + temp_a2)->unk12 = temp_t1; - (*temp_v1 + temp_a2)->unk22 = temp_t1; - (*temp_v1 + temp_a2)->unk32 = temp_t0; - (*temp_v1 + temp_a2)->unk42 = temp_t1; - (*temp_v1 + temp_a2)->unk72 = temp_t1; + D_800DDBB4[arg1][arg3 + 0x0].v.ob[1] = 18 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x1].v.ob[1] = 9 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x2].v.ob[1] = 9 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x3].v.ob[1] = 18 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x4].v.ob[1] = 9 - temp_v0; + D_800DDBB4[arg1][arg3 + 0x7].v.ob[1] = 9 - temp_v0; } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022E84.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_80164B10; -extern ? D_80164B20; -extern ? D_80164B30; +extern u16 D_80164B10[]; +extern u16 D_80164B20[]; +extern u16 D_80164B30[]; -void func_80022F14(s32 arg0, s8 arg1, s32 arg2, f32 arg3) { - f32 temp_f16; - f32 temp_f4; - s32 temp_v0; - u16 *temp_a3; - u16 *temp_t1; - u16 *temp_v1; - u16 temp_a0; - u16 temp_t0; - u16 temp_t2; - f32 phi_f16; - f32 phi_f4; +/** + * Sets player shading/colour. + */ +void func_80022F14(Player *player, s8 arg1, s32 arg2, f32 arg3) { + D_80164B10[arg1] = (s16) ((f32)D_80164B10[arg1] - ((D_80164B10[arg1] - ((arg2 >> 16) & 0xFF)) * arg3)); - temp_v0 = arg1 * 2; - temp_v1 = temp_v0 + &D_80164B10; - temp_a0 = *temp_v1; - temp_a3 = temp_v0 + &D_80164B20; - temp_t0 = *temp_a3; - temp_f16 = temp_t0; - *temp_v1 = temp_a0 - ((temp_a0 - ((arg2 >> 0x10) & 0xFF)) * arg3); - phi_f16 = temp_f16; - if (temp_t0 < 0) { - phi_f16 = temp_f16 + 4294967296.0f; - } - temp_t1 = temp_v0 + &D_80164B30; - temp_t2 = *temp_t1; - *temp_a3 = phi_f16 - ((temp_t0 - ((arg2 >> 8) & 0xFF)) * arg3); - temp_f4 = temp_t2; - phi_f4 = temp_f4; - if (temp_t2 < 0) { - phi_f4 = temp_f4 + 4294967296.0f; - } - *temp_t1 = phi_f4 - ((temp_t2 - (arg2 & 0xFF)) * arg3); + D_80164B20[arg1] = (s16) ((f32)D_80164B20[arg1] - ((D_80164B20[arg1] - ((arg2 >> 8) & 0xFF)) * arg3)); + + D_80164B30[arg1] = (s16) ((f32)D_80164B30[arg1] - ((D_80164B30[arg1] - (arg2 & 0xFF)) * arg3)); } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022F14.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? move_u16_towards(void *, s16, s32, s8); // extern -extern ? D_80164B40; -extern ? D_80164B50; -extern ? D_80164B60; +extern u16 D_80164B40[]; +extern u16 D_80164B50[]; +extern u16 D_80164B60[]; -void func_80023038(s32 arg0, s8 arg1, s32 arg2, s32 arg3) { - s32 sp1C; - s32 temp_v0; - - temp_v0 = arg1 * 2; - sp1C = temp_v0; - move_u16_towards(temp_v0 + &D_80164B40, (arg2 >> 0x10) & 0xFF, arg3, arg1); - move_u16_towards(sp1C + &D_80164B50, (arg2 >> 8) & 0xFF, arg3); - move_u16_towards(sp1C + &D_80164B60, arg2 & 0xFF, arg3); +void func_80023038(Player *player, s8 arg1, s32 arg2, f32 arg3) { + move_u16_towards(&D_80164B40[arg1], (arg2 >> 16) & 0xFF, arg3); + move_u16_towards(&D_80164B50[arg1], (arg2 >> 8) & 0xFF, arg3); + move_u16_towards(&D_80164B60[arg1], arg2 & 0xFF, arg3); } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80023038.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_80022F14(s32, s8, ?, ?); // extern -? func_80023038(s32, s8, ?, ?); // extern -extern ? gNearestWaypointByPlayerId; -extern ? D_80164B80; +extern u16 gNearestWaypointByPlayerId[]; +extern s32 D_80164B80[]; -? func_800230E4(s32 arg0, s8 arg1) { - s8 temp_a1; - u16 temp_v0; - - temp_a1 = arg1; - if (gCurrentCourseId == 8) { - temp_v0 = *(&gNearestWaypointByPlayerId + (arg1 * 2)); - if (((temp_v0 >= 0x14F) && (temp_v0 < 0x158)) || ((temp_v0 >= 0x15E) && (temp_v0 < 0x164)) || ((temp_v0 >= 0x169) && (temp_v0 < 0x170)) || ((temp_v0 >= 0x174) && (temp_v0 < 0x17A)) || ((temp_v0 >= 0x17E) && (temp_v0 < 0x184))) { - arg1 = temp_a1; - func_80022F14(arg0, temp_a1, 0x1C0000, 0x3E99999A); - func_80023038(arg0, arg1, 0xE0, 0x3E99999A); - *(&D_80164B80 + (arg1 * 4)) = 0; - return 1; - } - goto block_13; - } -block_13: - return 0; -} -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800230E4.s") -#endif - -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_80022F14(s8, ?, ?); // extern -? func_80023038(void *, s8, ?, ?); // extern -extern ? gNearestWaypointByPlayerId; -extern ? D_80164B80; - -void func_800231D8(void *arg0, s8 arg1) { - s16 temp_v0; - s8 temp_a1; - u16 temp_v0_2; - u16 temp_v0_3; - s32 *phi_at; - - temp_v0 = gCurrentCourseId; - temp_a1 = arg1; - if (temp_v0 != 2) { - if (temp_v0 != 3) { - arg1 = temp_a1; - func_80022F14(temp_a1, 0, 0x3E99999A); - func_80023038(arg0, arg1, 0, 0x3E99999A); - phi_at = &D_80164B80 + (arg1 * 4); - } else { - temp_v0_2 = *(&gNearestWaypointByPlayerId + (temp_a1 * 2)); - if (((temp_v0_2 >= 0xD) && (temp_v0_2 < 0x15)) || ((temp_v0_2 >= 0x29) && (temp_v0_2 < 0x39)) || ((temp_v0_2 >= 0x46) && (temp_v0_2 < 0x4E)) || ((temp_v0_2 >= 0x5F) && (temp_v0_2 < 0x67)) || ((temp_v0_2 >= 0x7B) && (temp_v0_2 < 0x86)) || ((temp_v0_2 >= 0x9D) && (temp_v0_2 < 0xA6)) || ((temp_v0_2 >= 0xB9) && (temp_v0_2 < 0xC3)) || ((temp_v0_2 >= 0xB9) && (temp_v0_2 < 0xC3)) || ((temp_v0_2 >= 0xD7) && (temp_v0_2 < 0xE1)) || ((temp_v0_2 >= 0x10E) && (temp_v0_2 < 0x119)) || ((temp_v0_2 >= 0x154) && (temp_v0_2 < 0x15F)) || ((temp_v0_2 >= 0x1EF) && (temp_v0_2 < 0x1F7)) || ((temp_v0_2 >= 0x202) && (temp_v0_2 < 0x209)) || ((temp_v0_2 >= 0x216) && (temp_v0_2 < 0x21D)) || ((temp_v0_2 >= 0x230) && (temp_v0_2 < 0x23A)) || ((temp_v0_2 >= 0x24C) && (temp_v0_2 < 0x256)) || ((temp_v0_2 >= 0x288) && (temp_v0_2 < 0x269)) || ((temp_v0_2 >= 0x274) && (temp_v0_2 < 0x27E))) { - arg1 = temp_a1; - func_80022F14(temp_a1, 0x1C0000, 0x3E99999A); - func_80023038(arg0, arg1, 0xE0, 0x3E99999A); - phi_at = &D_80164B80 + (arg1 * 4); - } else { - arg1 = temp_a1; - func_80022F14(temp_a1, 0, 0x3E99999A); - func_80023038(arg0, arg1, 0, 0x3E99999A); - phi_at = &D_80164B80 + (arg1 * 4); +/** + * Activates in the tunnel to shade the player a bit darker + * Sort of an atmospheric effect. + */ +s32 func_800230E4(s32 arg0, s8 arg1) { + switch (gCurrentCourseId) { + case 8: + if (((gNearestWaypointByPlayerId[arg1] >= 0x14F) && (gNearestWaypointByPlayerId[arg1] < 0x158)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x15E) && (gNearestWaypointByPlayerId[arg1] < 0x164)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x169) && (gNearestWaypointByPlayerId[arg1] < 0x170)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x174) && (gNearestWaypointByPlayerId[arg1] < 0x17A)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x17E) && (gNearestWaypointByPlayerId[arg1] < 0x184))) { + func_80022F14(arg0, arg1, 0x1C0000, 0.3f); + func_80023038(arg0, arg1, 0xE0, 0.3f); + D_80164B80[arg1] = 0; + return 1; } - } - } else { - temp_v0_3 = *(&gNearestWaypointByPlayerId + (temp_a1 * 2)); - if (((temp_v0_3 >= 0x15) && (temp_v0_3 < 0x2A)) || ((temp_v0_3 >= 0x14D) && (temp_v0_3 < 0x15C)) || ((temp_v0_3 >= 0x1D1) && (temp_v0_3 < 0x1E4)) || (arg0->unk124 >= 500.0f)) { - arg1 = temp_a1; - func_80022F14(temp_a1, 0x340000, 0x3E99999A); - func_80023038(arg0, arg1, 0x4040, 0x3E99999A); - phi_at = &D_80164B80 + (arg1 * 4); - } else if (((temp_v0_3 >= 0xF1) && (temp_v0_3 < 0xF5)) || ((temp_v0_3 >= 0xFB) && (temp_v0_3 < 0xFF)) || ((temp_v0_3 >= 0x105) && (temp_v0_3 < 0x109)) || ((temp_v0_3 >= 0x10F) && (temp_v0_3 < 0x113)) || ((temp_v0_3 >= 0x145) && (temp_v0_3 < 0x14A)) || ((temp_v0_3 >= 0x15E) && (temp_v0_3 < 0x163))) { - arg1 = temp_a1; - func_80022F14(temp_a1, 0x1C0000, 0x3E99999A); - func_80023038(arg0, arg1, 0xE0, 0x3E99999A); - phi_at = &D_80164B80 + (arg1 * 4); - } else { - arg1 = temp_a1; - func_80022F14(temp_a1, 0, 0x3E99999A); - func_80023038(arg0, arg1, 0, 0x3E99999A); - phi_at = &D_80164B80 + (arg1 * 4); - } + return 0; + + default: + return 0; } - *phi_at = 0; } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800231D8.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -? func_80022F14(s8, s8, ?, ?); /* extern */ -? func_80023038(Player *, s8, ?, ?); /* extern */ -s32 func_800230E4(Player *, s8); /* extern */ -? func_800231D8(Player *, s8); /* extern */ -extern ? D_80164B80; -extern ? D_8018D930; +void func_800231D8(Player *player, s8 arg1) { + switch(gCurrentCourseId) { + case 2: + if (((gNearestWaypointByPlayerId[arg1] >= 0x15) && (gNearestWaypointByPlayerId[arg1] < 0x2A)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x14D) && (gNearestWaypointByPlayerId[arg1] < 0x15C)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x1D1) && (gNearestWaypointByPlayerId[arg1] < 0x1E4)) + || (player->unk_110.unk44 >= 500.0f)) { + func_80022F14(player, arg1, 0x340000, 0.3f); + func_80023038(player, arg1, 0x4040, 0.3f); + D_80164B80[arg1] = 0; + } else if (((gNearestWaypointByPlayerId[arg1] >= 0xF1) && (gNearestWaypointByPlayerId[arg1] < 0xF5)) + || ((gNearestWaypointByPlayerId[arg1] >= 0xFB) && (gNearestWaypointByPlayerId[arg1] < 0xFF)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x105) && (gNearestWaypointByPlayerId[arg1] < 0x109)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x10F) && (gNearestWaypointByPlayerId[arg1] < 0x113)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x145) && (gNearestWaypointByPlayerId[arg1] < 0x14A)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x15E) && (gNearestWaypointByPlayerId[arg1] < 0x163))) { + func_80022F14(player, arg1, 0x1C0000, 0.3f); + func_80023038(player, arg1, 0xE0, 0.3f); + D_80164B80[arg1] = 0; + } else { + func_80022F14(player, arg1, 0, 0.3f); + func_80023038(player, arg1, 0, 0.3f); + D_80164B80[arg1] = 0; + } + break; + case 3: + if (((gNearestWaypointByPlayerId[arg1] >= 0xD) && (gNearestWaypointByPlayerId[arg1] < 0x15)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x29) && (gNearestWaypointByPlayerId[arg1] < 0x39)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x46) && (gNearestWaypointByPlayerId[arg1] < 0x4E)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x5F) && (gNearestWaypointByPlayerId[arg1] < 0x67)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x7B) && (gNearestWaypointByPlayerId[arg1] < 0x86)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x9D) && (gNearestWaypointByPlayerId[arg1] < 0xA6)) + || ((gNearestWaypointByPlayerId[arg1] >= 0xB9) && (gNearestWaypointByPlayerId[arg1] < 0xC3)) + || ((gNearestWaypointByPlayerId[arg1] >= 0xB9) && (gNearestWaypointByPlayerId[arg1] < 0xC3)) + || ((gNearestWaypointByPlayerId[arg1] >= 0xD7) && (gNearestWaypointByPlayerId[arg1] < 0xE1)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x10E) && (gNearestWaypointByPlayerId[arg1] < 0x119)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x154) && (gNearestWaypointByPlayerId[arg1] < 0x15F)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x1EF) && (gNearestWaypointByPlayerId[arg1] < 0x1F7)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x202) && (gNearestWaypointByPlayerId[arg1] < 0x209)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x216) && (gNearestWaypointByPlayerId[arg1] < 0x21D)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x230) && (gNearestWaypointByPlayerId[arg1] < 0x23A)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x24C) && (gNearestWaypointByPlayerId[arg1] < 0x256)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x288) && (gNearestWaypointByPlayerId[arg1] < 0x269)) + || ((gNearestWaypointByPlayerId[arg1] >= 0x274) && (gNearestWaypointByPlayerId[arg1] < 0x27E))) { + func_80022F14(player, arg1, 0x1C0000, 0.3f); + func_80023038(player, arg1, 0xE0, 0.3f); + D_80164B80[arg1] = 0; + } else { + func_80022F14(player, arg1, 0, 0.3f); + func_80023038(player, arg1, 0, 0.3f); + D_80164B80[arg1] = 0; + } + break; + default: + func_80022F14(player, arg1, 0, 0.3f); + func_80023038(player, arg1, 0, 0.3f); + D_80164B80[arg1] = 0; + break; + } +} -void func_800235AC(Player *arg0, s8 arg1) { - s32 *sp24; - s16 temp_v0; - s32 *temp_v1_2; - s32 *temp_v1_4; - s32 *temp_v1_5; - s32 temp_t6; - s32 temp_v0_2; - s32 temp_v0_3; - s32 temp_v0_4; - s32 temp_v0_5; - s32 temp_v0_6; - s32 temp_v1; - s32 temp_v1_3; - s32 phi_v0; - s32 phi_v0_2; - s32 phi_v0_3; - s32 *phi_v1; - s32 phi_v0_4; - s32 phi_v0_5; - s32 phi_v0_6; - s32 phi_v0_7; +extern s32 D_8018D930[]; - if (((arg0->unk_000 & 0x100) == 0x100) && (arg0 == gPlayerThree)) { - func_80022F14(arg1, 0x1C0000, 0x3E99999A); - func_80023038(arg0, arg1, 0xE0, 0x3E99999A); - *(&D_80164B80 + (arg1 * 4)) = 0; +void func_800235AC(Player *player, s8 arg1) { + s32 temp; + + if (((player->unk_000 & 0x100) == 0x100) && (player == gPlayerThree)) { + func_80022F14(player, arg1, 0x1C0000, 0.3f); + func_80023038(player, arg1, 0xE0, 0.3f); + D_80164B80[arg1] = 0; return; } - temp_v0 = arg0->unk_0CA; - temp_v1 = temp_v0 & 0x10; - if ((temp_v1 == 0x10) && ((temp_v0 & 4) == 4)) { - func_80022F14((s8) arg0, arg1, 0x646464, 0x3F000000); - func_80023038(arg0, arg1, 0xFF0000, 0x3DCCCCCD); + + if (((player->unk_0CA & 0x10) == 0x10) && ((player->unk_0CA & 4) == 4)) { + func_80022F14(player, arg1, 0x646464, 0.5f); + func_80023038(player, arg1, 0xFF0000, 0.1f); return; } - if ((temp_v0 & 4) == 4) { - func_80022F14((s8) arg0, arg1, 0, 0x3F800000); - func_80023038(arg0, arg1, 0, 0x3F800000); + if ((player->unk_0CA & 4) == 4) { + func_80022F14(player, arg1, 0, 1.0f); + func_80023038(player, arg1, 0, 1.0f); return; } - if (temp_v1 == 0x10) { - func_80022F14((s8) arg0, arg1, 0x646464, 0x3F000000); - func_80023038(arg0, arg1, 0xFF0000, 0x3DCCCCCD); + if ((player->unk_0CA & 0x10) == 0x10) { + func_80022F14(player, arg1, 0x646464, 0.5f); + func_80023038(player, arg1, 0xFF0000, 0.1f); return; } - if ((temp_v0 & 0x20) == 0x20) { - func_80022F14((s8) arg0, arg1, 0, 0x3DCCCCCD); - func_80023038(arg0, arg1, 0, 0x3DCCCCCD); + if ((player->unk_0CA & 0x20) == 0x20) { + func_80022F14(player, arg1, 0, 0.1f); + func_80023038(player, arg1, 0, 0.1f); return; } - temp_v0_2 = arg0->unk_0BC; - if (((temp_v0_2 & 0x40000000) == 0x40000000) && ((s32) arg0->unk_0B0 < 0x78)) { - temp_t6 = arg1 * 4; - temp_v1_2 = temp_t6 + &D_80164B80; - temp_v0_3 = *temp_v1_2 + 5; - *temp_v1_2 = temp_v0_3; - phi_v0 = temp_v0_3; - if (temp_v0_3 >= 0x1E) { - *temp_v1_2 = 0; - phi_v0 = 0; + + if (((player->unk_0BC & 0x40000000) == 0x40000000) && ((s32) player->unk_0B0 < 0x78)) { + D_80164B80[arg1] += 5; + if (D_80164B80[arg1] >= 0x1E) { + D_80164B80[arg1] = 0; } - phi_v0_2 = phi_v0; - if ((phi_v0 >= 0) && (phi_v0 < 0xB)) { - sp24 = temp_v1_2; - func_80022F14((s8) arg0, arg1, 0x808080, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); - phi_v0_2 = *temp_v1_2; + if ((D_80164B80[arg1] >= 0) && (D_80164B80[arg1] < 0xB)) { + func_80022F14(player, arg1, 0x808080, 0.8f); + func_80023038(player, arg1, 0, 0.8f); } - phi_v0_3 = phi_v0_2; - if ((phi_v0_2 >= 0xB) && (phi_v0_2 < 0x15)) { - sp24 = temp_t6 + &D_80164B80; - func_80022F14((s8) arg0, arg1, 0x70, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); - phi_v0_3 = *(temp_t6 + &D_80164B80); + if ((D_80164B80[arg1] >= 0xB) && (D_80164B80[arg1] < 0x15)) { + func_80022F14(player, arg1, 0x70, 0.8f); + func_80023038(player, arg1, 0, 0.8f); } - if ((phi_v0_3 >= 0x15) && (phi_v0_3 < 0x1F)) { - func_80022F14((s8) arg0, arg1, 0x8F8F00, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); + if ((D_80164B80[arg1] >= 0x15) && (D_80164B80[arg1] < 0x1F)) { + func_80022F14(player, arg1, 0x8F8F00, 0.8f); + func_80023038(player, arg1, 0, 0.8f); } - } else if (((temp_v0_2 & 0x200) != 0) && (temp_v0_4 = arg1 * 4, temp_v1_3 = (s32) gCourseTimer - *(&D_8018D930 + temp_v0_4), ((temp_v1_3 < 9) != 0))) { - if (temp_v1_3 >= 7) { - temp_v1_4 = temp_v0_4 + &D_80164B80; - *temp_v1_4 += 0xA; - phi_v1 = temp_v1_4; - } else { - temp_v1_5 = temp_v0_4 + &D_80164B80; - *temp_v1_5 += 5; - phi_v1 = temp_v1_5; - } - temp_v0_5 = *phi_v1; - phi_v0_4 = temp_v0_5; - if (temp_v0_5 >= 0x28) { - *phi_v1 = 0; - phi_v0_4 = 0; - } - phi_v0_5 = phi_v0_4; - if ((phi_v0_4 >= 0) && (phi_v0_4 < 0xB)) { - sp24 = phi_v1; - func_80022F14((s8) arg0, arg1, 0x70, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); - phi_v0_5 = *phi_v1; - } - phi_v0_6 = phi_v0_5; - if ((phi_v0_5 >= 0xB) && (phi_v0_5 < 0x15)) { - sp24 = phi_v1; - func_80022F14((s8) arg0, arg1, 0x707000, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); - phi_v0_6 = *phi_v1; - } - phi_v0_7 = phi_v0_6; - if ((phi_v0_6 >= 0x15) && (phi_v0_6 < 0x1F)) { - sp24 = phi_v1; - func_80022F14((s8) arg0, arg1, 0x700000, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); - phi_v0_7 = *phi_v1; - } - if (phi_v0_7 >= 0x1F) { - func_80022F14((s8) arg0, arg1, 0x7000, 0x3F4CCCCD); - func_80023038(arg0, arg1, 0, 0x3F4CCCCD); - } - } else if (func_800230E4(arg0, arg1) != 1) { - temp_v0_6 = arg0->boundingBoxCorners[3].unk_14; - if (((temp_v0_6 & 1) == 1) || ((temp_v0_6 & 2) == 2) || ((arg0->boundingBoxCorners[0].unk_14 & 3) == 3)) { - func_80022F14((s8) arg0, arg1, 0, 0x3E99999A); - func_80023038(arg0, arg1, 0x6F6F6F, 0x3E99999A); + return; + } + if ((player->unk_0BC & 0x200) != 0) { + temp = (s32)gCourseTimer - D_8018D930[arg1]; + if (temp <= 8) { + + if (temp >= 7) { + D_80164B80[arg1] += 10; + } else { + D_80164B80[arg1] += 5; + } + if (D_80164B80[arg1] >= 40) { + D_80164B80[arg1] = 0; + } + if ((D_80164B80[arg1] >= 0) && (D_80164B80[arg1] <= 10)) { + func_80022F14(player, arg1, 0x70, 0.8f); + func_80023038(player, arg1, 0, 0.8f); + } + if ((D_80164B80[arg1] >= 0xB) && (D_80164B80[arg1] <= 20)) { + func_80022F14(player, arg1, 0x707000, 0.8f); + func_80023038(player, arg1, 0, 0.8f); + } + if ((D_80164B80[arg1] >= 0x15) && (D_80164B80[arg1] <= 30)) { + func_80022F14(player, arg1, 0x700000, 0.8f); + func_80023038(player, arg1, 0, 0.8f); + } + if (D_80164B80[arg1] >= 0x1F) { + func_80022F14(player, arg1, 0x7000, 0.8f); + func_80023038(player, arg1, 0, 0.8f); + } return; } - func_800231D8(arg0, arg1); - if ((arg0->unk_0CA & 0x1000) == 0x1000) { - func_80022F14((s8) arg0, arg1, 0, 0x3E99999A); - func_80023038(arg0, arg1, 0xF0F0F0, 0x3E99999A); + } + if (func_800230E4(player, arg1) != 1) { + if (((player->boundingBoxCorners[3].unk_14 & 1) == 1) + || ((player->boundingBoxCorners[3].unk_14 & 2) == 2) + || ((player->boundingBoxCorners[0].unk_14 & 3) == 3)) { + func_80022F14(player, arg1, 0, 0.3f); + func_80023038(player, arg1, 0x6F6F6F, 0.3f); + return; + } + func_800231D8(player, arg1); + if ((player->unk_0CA & 0x1000) == 0x1000) { + func_80022F14(player, arg1, 0, 0.3f); + func_80023038(player, arg1, 0xF0F0F0, 0.3f); } } } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800235AC.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -? func_80022CA8(s8, s8, s8); // extern -? func_80022D60(void *, s8, s8, s8); // extern -? func_80022E84(s8, s8, s8); // extern - -void func_80023BF0(void *arg0, s8 arg1, s8 arg2, s8 arg3) { - s32 temp_v0; - - temp_v0 = arg0->unkBC; - if (((temp_v0 & 0x4000000) == 0x4000000) || ((temp_v0 & 0x8000000) == 0x8000000)) { - func_80022CA8(arg1, arg2, arg3); +void func_80023BF0(Player *player, s8 arg1, s8 arg2, s8 arg3) { + if (((player->unk_0BC & 0x4000000) == 0x4000000) || ((player->unk_0BC & 0x8000000) == 0x8000000)) { + func_80022CA8(player, arg1, arg2, arg3); } else { - func_80022E84(arg1, arg2, arg3); + func_80022E84(player, arg1, arg2, arg3); } - if ((arg0->unkCA & 2) == 2) { - func_80022D60(arg0, arg1, arg2, arg3); + if ((player->unk_0CA & 2) == 2) { + func_80022D60(player, arg1, arg2, arg3); } } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80023BF0.s") -#endif -#ifdef MIPS_TO_C +//#ifdef MIPS_TO_C //generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de -? func_8004B414(?, ?, ?, ?); /* extern */ -extern ? D_0D008C78; -extern ? D_0D008D58; +//? func_8004B414(?, ?, ?, ?); /* extern */ +extern Gfx D_0D008C78[]; +extern Gfx D_0D008D58[]; extern u32 D_8018D474; -static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f }; -static ? D_800E51D0; /* unable to generate initializer */ -static ? D_800E5210; /* unable to generate initializer */ +//static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f }; +extern Vtx D_800E51D0[]; //static? /* unable to generate initializer */ +extern f32 D_800DDBD4[]; + +#define SOME_TEXTURE_POINTER_MATH 0x800 void func_80023C84(Player *player, s8 arg1, s8 arg2) { - f32 spD4; - f32 spD0; - f32 spCC; - s16 spC8; - s16 spC6; - s16 spC4; + Mat4 sp118; + Mat4 pad; + Vec3f spCC; + Vec3s spC4; + s16 temp_t9; s16 spC0; - f32 spBC; - f32 spB8; - f32 spB4; + Vec3f spB4; f32 spB0; f32 spAC; + s32 pad2; f32 sp9C; f32 sp38; - Gfx *temp_v0_10; - Gfx *temp_v0_11; - Gfx *temp_v0_12; - Gfx *temp_v0_13; - Gfx *temp_v0_14; - Gfx *temp_v0_15; - Gfx *temp_v0_16; - Gfx *temp_v0_17; - Gfx *temp_v0_18; - Gfx *temp_v0_19; - Gfx *temp_v0_20; - Gfx *temp_v0_21; - Gfx *temp_v0_22; - Gfx *temp_v0_23; - Gfx *temp_v0_24; - Gfx *temp_v0_25; - Gfx *temp_v0_26; - 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 var_f2; - s16 temp_v0; - s16 temp_v1; - s32 temp_s0; - s32 temp_s0_2; - s32 temp_t9; - s32 temp_v0_2; - s32 temp_v1_2; - temp_v0 = player->unk_02E; - temp_v1 = player->unk_0C0; - temp_t9 = (((s32) ((temp_v0 + (player + (arg2 * 2))->unk48 + temp_v1) & 0xFFFF) / 128) << 7) & 0xFFFF; - spC0 = -temp_v0 - temp_v1; - temp_s0 = temp_t9; - spB0 = -coss(temp_t9 & 0xFFFF) * 2.0f; - spAC = -sins(temp_s0 & 0xFFFF) * 2.0f; - temp_v0_2 = player->unk_0BC; - temp_v1_2 = temp_v0_2 & 0x400; - if (((temp_v0_2 & 0x01000000) == 0x01000000) || (temp_v1_2 == 0x400) || ((temp_v0_2 & 0x80000) == 0x80000) || ((temp_v0_2 & 0x800000) == 0x800000) || (temp_v1_2 == 0x400) || ((player->unk_0CA & 2) == 2) || ((temp_v0_2 & 0x02000000) == 0x02000000) || ((temp_v0_2 & 0x10000) == 0x10000) || ((temp_v0_2 & 8) == 8)) { + temp_t9 = (u16)(player->unk_048[arg2] + player->unk_02C[1] + player->unk_0C0) / 128; // << 7) & 0xFFFF; + spC0 = -player->unk_02C[1] - player->unk_0C0; + + spB0 = -coss(temp_t9 << 7) * 2; + spAC = -sins(temp_t9 << 7) * 2; + + if (((player->unk_0BC & 0x01000000) == 0x01000000) + || ((player->unk_0BC & 0x400) == 0x400) + || ((player->unk_0BC & 0x80000) == 0x80000) + || ((player->unk_0BC & 0x800000) == 0x800000) + || ((player->unk_0BC & 0x400) == 0x400) + || ((player->unk_0CA & 2) == 2) + || ((player->unk_0BC & 0x02000000) == 0x02000000) + || ((player->unk_0BC & 0x10000) == 0x10000) + || ((player->unk_0BC & 8) == 8)) { + var_f2 = (f32) (1.0 - ((f64) player->unk_110.unk44 * 0.02)); - if (var_f2 < 0.0f) { - var_f2 = 0.0f; - } - if (var_f2 > 1.0f) { - var_f2 = 1.0f; - } - spB4 = player->unk_110.unk60[0]; - spBC = player->unk_110.unk60[2]; - sp9C = var_f2; - spB8 = player->unk_110.unk60[1]; - sp38 = sins((u16) spC0); - spCC = (coss((u16) spC0 & 0xFFFF) * spAC) + (spB0 * sp38) + player->pos[0]; - spD0 = player->unk_074 + 1.0f; - sp38 = coss((u16) spC0 & 0xFFFF); - spD4 = ((spB0 * sp38) - (sins((u16) spC0 & 0xFFFF) * spAC)) + player->pos[2]; - func_80042A20((f32 (*)[4]) &sp118[0], &spB4, &spCC, (spC0 + player->unk_042) & 0xFFFF, D_800DDBD4[player->characterId] * player->unk_224 * var_f2); + if (var_f2 < 0.0f) {var_f2 = 0.0f;} + if (var_f2 > 1.0f) {var_f2 = 1.0f;} + spB4[0] = player->unk_110.unk60[0]; + spB4[2] = player->unk_110.unk60[2]; + spB4[1] = player->unk_110.unk60[1]; + + spCC[0] = player->pos[0] + ((spB0 * sins(spC0)) + (spAC * coss(spC0))); + spCC[1] = player->unk_074 + 1.0f; + spCC[2] = player->pos[2] + ((spB0 * coss(spC0)) - (spAC * sins(spC0))); + func_80042A20(sp118, spB4, spCC, (spC0 + player->unk_042), D_800DDBD4[player->characterId] * player->unk_224 + * var_f2); } else { - spC4 = player->unk_0C4; - spC6 = spC0; - spC8 = player->unk_206 * 2; - sp38 = sins((u16) spC0); - spCC = (coss((u16) spC0 & 0xFFFF) * spAC) + (spB0 * sp38) + player->pos[0]; - spD0 = player->unk_074 + 1.0f; - sp38 = coss((u16) spC0 & 0xFFFF); - spD4 = ((spB0 * sp38) - (sins((u16) spC0 & 0xFFFF) * spAC)) + player->pos[2]; - func_80021E10((f32 (*)[4]) &sp118[0], &spCC, &spC4); - func_80021F84((f32 (*)[4]) &sp118[0], D_800DDBD4[player->characterId] * player->unk_224); + spC4[0] = player->unk_0C4; + spC4[1] = spC0; + spC4[2] = player->unk_206 * 2; + + spCC[0] = player->pos[0] + ((spB0 * sins(spC0)) + (spAC * coss(spC0))); + spCC[1] = player->unk_074 + 1.0f; + spCC[2] = player->pos[2] + ((spB0 * coss(spC0)) - (spAC * sins(spC0))); + func_80021E10(sp118, spCC, spC4); + func_80021F84(sp118, D_800DDBD4[player->characterId] * player->unk_224); } - temp_s0_2 = arg2 << 9; - func_80022180(&gGfxPool->mtxPool[arg1] + temp_s0_2 + 0xEAC0, (f32 (*)[4]) &sp118[0]); - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->words.w0 = 0x01020040; - temp_v0_3->words.w1 = (s32) (&gGfxPool->mtxPool[arg1] + temp_s0_2 + 0xEAC0) & 0x1FFFFFFF; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->words.w1 = (u32) &D_0D008D58; - temp_v0_4->words.w0 = 0x06000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->words.w1 = 0; - temp_v0_5->words.w0 = 0xBA000E02; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->words.w0 = 0xFD900000; - temp_v0_6->words.w1 = D_8018D474; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->words.w1 = 0x07080200; - temp_v0_7->words.w0 = 0xF5900000; - temp_v0_8 = gDisplayListHead; - gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->words.w1 = 0; - temp_v0_8->words.w0 = 0xE6000000; - temp_v0_9 = gDisplayListHead; - gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->words.w1 = 0x073FF100; - temp_v0_9->words.w0 = 0xF3000000; - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->words.w1 = 0; - temp_v0_10->words.w0 = 0xE7000000; - temp_v0_11 = gDisplayListHead; - gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->words.w0 = 0xF5881000; - temp_v0_11->words.w1 = 0x00080200; - temp_v0_12 = gDisplayListHead; - gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->words.w0 = 0xF2000000; - temp_v0_12->words.w1 = 0x000FC07C; + func_80022180(&gGfxPool->mtxPool[arg1 + (arg2 << 3) + 0x3AB], sp118); + + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[arg1 + (arg2 << 3) + 0x3AB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(gDisplayListHead++, D_0D008D58); + gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE); + gDPLoadTextureBlock(gDisplayListHead++, D_8018D474, G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR + | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); func_8004B414(0, 0, 0, 0xFF); - temp_v0_13 = gDisplayListHead; - gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->words.w0 = 0xB900031D; - temp_v0_13->words.w1 = 0x00504B50; - temp_v0_14 = gDisplayListHead; - gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->words.w1 = (u32) &D_800E51D0; - temp_v0_14->words.w0 = 0x0400103F; - temp_v0_15 = gDisplayListHead; - gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->words.w1 = (u32) &D_0D008C78; - temp_v0_15->words.w0 = 0x06000000; - temp_v0_16 = gDisplayListHead; - gDisplayListHead = temp_v0_16 + 8; - temp_v0_16->words.w0 = 0xFD900000; - temp_v0_16->words.w1 = D_8018D474 + 0x800; - temp_v0_17 = gDisplayListHead; - gDisplayListHead = temp_v0_17 + 8; - temp_v0_17->words.w1 = 0x07080200; - temp_v0_17->words.w0 = 0xF5900000; - temp_v0_18 = gDisplayListHead; - gDisplayListHead = temp_v0_18 + 8; - temp_v0_18->words.w1 = 0; - temp_v0_18->words.w0 = 0xE6000000; - temp_v0_19 = gDisplayListHead; - gDisplayListHead = temp_v0_19 + 8; - temp_v0_19->words.w1 = 0x073FF100; - temp_v0_19->words.w0 = 0xF3000000; - temp_v0_20 = gDisplayListHead; - gDisplayListHead = temp_v0_20 + 8; - temp_v0_20->words.w1 = 0; - temp_v0_20->words.w0 = 0xE7000000; - temp_v0_21 = gDisplayListHead; - gDisplayListHead = temp_v0_21 + 8; - temp_v0_21->words.w0 = 0xF5881000; - temp_v0_21->words.w1 = 0x00080200; - temp_v0_22 = gDisplayListHead; - gDisplayListHead = temp_v0_22 + 8; - temp_v0_22->words.w0 = 0xF2000000; - temp_v0_22->words.w1 = 0x000FC07C; + gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); + gSPVertex(gDisplayListHead++, &D_800E51D0[0], 4, 0); + gSPDisplayList(gDisplayListHead++, D_0D008C78); + gDPLoadTextureBlock(gDisplayListHead++, (D_8018D474 + SOME_TEXTURE_POINTER_MATH), G_IM_FMT_I, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR + | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); func_8004B414(0, 0, 0, 0xFF); - temp_v0_23 = gDisplayListHead; - gDisplayListHead = temp_v0_23 + 8; - temp_v0_23->words.w0 = 0xB900031D; - temp_v0_23->words.w1 = 0x00504B50; - temp_v0_24 = gDisplayListHead; - gDisplayListHead = temp_v0_24 + 8; - temp_v0_24->words.w1 = (u32) &D_800E5210; - temp_v0_24->words.w0 = 0x0400103F; - temp_v0_25 = gDisplayListHead; - gDisplayListHead = temp_v0_25 + 8; - temp_v0_25->words.w1 = (u32) &D_0D008C78; - temp_v0_25->words.w0 = 0x06000000; - temp_v0_26 = gDisplayListHead; - gDisplayListHead = temp_v0_26 + 8; - temp_v0_26->words.w1 = 0x00010001; - temp_v0_26->words.w0 = 0xBB000000; + gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2); + gSPVertex(gDisplayListHead++, &D_800E51D0[4], 4, 0); + gSPDisplayList(gDisplayListHead++, D_0D008C78); + gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF); } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80023C84.s") -#endif #ifdef MIPS_TO_C //generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de @@ -1770,7 +1450,7 @@ extern u32 D_8018D474; static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f }; static ? D_800DDE9C; /* unable to generate initializer */ static ? D_800E51D0; /* unable to generate initializer */ -static ? D_800E5210; /* unable to generate initializer */ +static ? D_800E5210; // COMPILER GENERATED [4] +0x40 /* unable to generate initializer */ void func_80024374(Player *player, s8 arg1, s8 arg2) { f32 spD4; @@ -1820,7 +1500,7 @@ void func_80024374(Player *player, s8 arg1, s8 arg2) { sp94.unk0 = (s32) D_800DDE9C.unk0; sp94.unk4 = (s32) D_800DDE9C.unk4; sp94.unk8 = (s32) D_800DDE9C.unk8; - temp_v0 = player->unk_02E; + temp_v0 = player->unk_02C[1]; temp_v1 = player->unk_0C0; temp_t9 = (((s32) ((temp_v0 + (player + (arg2 * 2))->unk48 + temp_v1) & 0xFFFF) / 128) << 7) & 0xFFFF; spC0 = -temp_v0 - temp_v1; @@ -2064,7 +1744,7 @@ void func_800248D0(Player *player, s8 arg1, s8 arg2, s8 arg3) { if ((player->unk_0BC & 8) == 8) { sp14C = *(cameras->rot + (arg2 * 0xB8)) - 0x4000; } else { - sp14C = (s16) (s32) ((f64) -(s16) (s32) (sins((player->unk_02E + temp_v0_2->unk48 + player->unk_0C0) & 0xFFFF) * (f32) temp_v0_2->unkCC) * 0.8); + sp14C = (s16) (s32) ((f64) -(s16) (s32) (sins((player->unk_02C[1] + temp_v0_2->unk48 + player->unk_0C0) & 0xFFFF) * (f32) temp_v0_2->unkCC) * 0.8); } sp14E = temp_v0_2->unk48; sp150 = temp_v0_2->unk50; @@ -2459,7 +2139,7 @@ void func_800256F4(Player *player, s8 arg1, s8 arg2, s8 arg3) { } temp_v0 = player + (arg2 * 2); sp44 = temp_v0; - spD4 = (s16) (s32) ((f64) -(s16) (s32) (sins((temp_v0->unk48 - player->unk_02E) & 0xFFFF) * 0.0f) * 0.8); + spD4 = (s16) (s32) ((f64) -(s16) (s32) (sins((temp_v0->unk48 - player->unk_02C[1]) & 0xFFFF) * 0.0f) * 0.8); spD6 = temp_v0->unk48; spD8 = temp_v0->unk50; func_80062B18(&spD0, &spCC, &spC8, 0.0f, 1.5f, 0.0f, (s32) -temp_v0->unk48, (s32) temp_v0->unk50); @@ -2679,9 +2359,9 @@ void func_80025DE8(Player *player, s8 arg1, s8 arg2, s8 arg3) { s32 temp_t9; void *temp_v0; - sp9C = (f32) (((f64) sins(-player->unk_02E & 0xFFFF) * -1.5) + (f64) player->pos[0]); + sp9C = (f32) (((f64) sins(-player->unk_02C[1] & 0xFFFF) * -1.5) + (f64) player->pos[0]); spA0 = (f32) ((f64) ((player->pos[1] - player->boundingBoxSize) + player->unk_108) + 0.1); - temp_f4 = (f64) coss(-player->unk_02E & 0xFFFF) * -1.5; + temp_f4 = (f64) coss(-player->unk_02C[1] & 0xFFFF) * -1.5; sp94 = -0x00B6; temp_v0 = player + (arg2 * 2); spA4 = (f32) (temp_f4 + (f64) player->pos[2]); @@ -3033,38 +2713,29 @@ void func_800267AC(Player *player, s8 arg1, s8 arg2) { GLOBAL_ASM("asm/non_matchings/code_8001F980/func_800267AC.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern ? D_800DDE74; -extern s32 D_800DDE94; +extern s32 D_800DDE74[]; -void func_80026A48(void *arg0, s8 arg1) { +void func_80026A48(Player *player, s8 arg1) { f32 temp_f0; - s32 temp_t4; - if (((arg0->unkBC & 0x4000) == 0x4000) && ((arg0->unk0 & 0x2000) == 0)) { - temp_t4 = arg0->unk240 + D_800DDE94; - arg0->unk240 = temp_t4; - if (temp_t4 >= 0x400) { - arg0->unk240 = 0; - return; + if (((player->unk_0BC & 0x4000) == 0x4000) && ((player->unk_000 & 0x2000) == 0)) { + player->unk_240 += D_800DDE74[8]; + if (player->unk_240 >= 0x400) { + player->unk_240 = 0; } - // Duplicate return node #10. Try simplifying control flow for better match return; } - temp_f0 = ((arg0->unk94 * (1.0f + arg0->unk104)) / 18.0f) * 216.0f; + + temp_f0 = ((player->unk_094 * (1.0f + player->unk_104)) / 18.0f) * 216.0f; if ((temp_f0 <= 1.0f) || (D_80165520[arg1] == 1)) { - arg0->unk240 = 0; + player->unk_240 = 0; } else { - arg0->unk240 = arg0->unk240 + *(&D_800DDE74 + ((temp_f0 / 12.0f) * 4)); + player->unk_240 += D_800DDE74[(s32)(temp_f0 / 12.0f)]; } - if (arg0->unk240 >= 0x400) { - arg0->unk240 = 0; + if (player->unk_240 >= 0x400) { + player->unk_240 = 0; } } -#else -GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80026A48.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 diff --git a/src/code_8001F980.h b/src/code_8001F980.h index d2b6c1c7d..a47dd528b 100644 --- a/src/code_8001F980.h +++ b/src/code_8001F980.h @@ -12,7 +12,7 @@ u16 func_8001FD78(Player*, f32, f32, f32); void func_80020000(Player*, Camera*, u8, u8); void func_8002088C(); void func_80020F1C(); -void func_80021244(Player*, u8, u8); +void func_80021244(Player*, s8, s8); void func_800215DC(); void func_800219BC(); void func_80021C78(); @@ -30,8 +30,9 @@ void move_f32_towards(f32*, f32, f32); void move_s16_towards(s16*, s16, f32); void move_u16_towards(u16*, s16, f32); void func_80022A98(Player*, s8); -void func_80022BC4(Player*, s8, s32); -void func_80022DB4(Player*, s8, s32); +void func_80022B50(Player*, s8); +void func_80022BC4(Player*, s8); +void func_80022DB4(Player*, s8); void func_800235AC(Player*, s8); void func_80026A48(Player*, s8); void func_80030A34(Player*); @@ -39,7 +40,7 @@ void func_80030A34(Player*); /* This is where I'd put my static data, if I had any */ extern u16 D_800DC51C; -extern s32 D_800DDB58[]; +extern s32 D_800DDB58; extern f64 D_800ED680; extern f64 D_800ED688; extern s32 D_80164A28; diff --git a/src/code_80027D00.c b/src/code_80027D00.c index fba965a62..800dc7b2a 100644 --- a/src/code_80027D00.c +++ b/src/code_80027D00.c @@ -906,7 +906,7 @@ void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) { temp_t7 = arg2 * 2; temp_a3 = player + temp_t7; temp_a3->unk48 = atan2s(player->posX - arg1->unk0, player->posZ - arg1->unk8); - player->unk_244[arg2] = ((player->unk_02E + temp_a3->unk48 + player->unk_0C0) & 0xFFFF) / 0x80; + player->unk_244[arg2] = ((player->unk_02C[1] + temp_a3->unk48 + player->unk_0C0) & 0xFFFF) / 0x80; temp_f6 = player->unk_224; temp_v1 = player->unk_0BC; temp_f4 = D_800DDBD4[player->characterId] * 18.0f; @@ -950,7 +950,7 @@ void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) { } sp24 = phi_a3; func_80029200(player, arg2); - temp_a0 = (player->unk_02E + phi_a3->unk48 + player->unk_0C0) & 0xFFFF; + temp_a0 = (player->unk_02C[1] + phi_a3->unk48 + player->unk_0C0) & 0xFFFF; sp20 = temp_a0; sp28 = sins(temp_a0); move_s16_towards(phi_a3 + 0x50, (coss(temp_a0) * phi_a3->unkCC) + (phi_a3->unkD4 * sp28), 0x3F000000, phi_a3); @@ -989,7 +989,7 @@ block_28: phi_a3->unk50 = 0; phi_v1_2 = player->unk_0BC; } - temp_t9 = (player->unk_02E + phi_a3->unk48 + player->unk_0C0) & 0xFFFF; + temp_t9 = (player->unk_02C[1] + phi_a3->unk48 + player->unk_0C0) & 0xFFFF; if (((phi_v1_2 & 0x80) == 0x80) || ((phi_v1_2 & 0x40) == 0x40) || (phi_t1 == (phi_v1_2 & phi_t1)) || (phi_a2 == (phi_v1_2 & phi_a2)) || (phi_t2 == (phi_v1_2 & phi_t2)) || ((player->unk_044 & 0x800) != 0)) { if (temp_t9 >= 0x7FF9) { temp_t6 = ((-temp_t9 & 0xFFFF) / phi_a1) & 0xFFFF; @@ -1117,7 +1117,7 @@ void func_80029B4C(Player *player, f32 arg1, f32 arg2, f32 arg3) { phi_f12 = (D_800DDBD4[player->characterId] / 2.0f) * 18.0f; } sp48 = phi_f12; - func_802B6540(phi_f12, &sp5C, 0, 0x3F800000, 0, player->unk_02E + player->unk_0C0); + func_802B6540(phi_f12, &sp5C, 0, 0x3F800000, 0, player->unk_02C[1] + player->unk_0C0); temp_f0 = (f64) sp48; temp_a0 = &sp8C; temp_f2 = sp48 - 2.0f; @@ -1264,7 +1264,7 @@ void func_8002A194(Player *player, f32 arg1, f32 arg2, f32 arg3) { f32 phi_f20; s16 phi_a1; - temp_v1 = -(s32) player->unk_02E - player->unk_0C0; + temp_v1 = -(s32) player->unk_02C[1] - player->unk_0C0; if ((player->unk_0BC & 0x40000000) == 0x40000000) { phi_f20 = (f32) (((f64) ((D_800DDBD4[player->characterId] * 18.0f) / 2.0f) * ((f64) player->unk_224 * 1.5)) - 1.0); } else { @@ -2888,7 +2888,7 @@ void func_8002D028(Player *player, s8 arg1) { sp50 = 0.0f; sp54 = D_80165230[temp_v0]; temp_f0 = 8.0f * 182.0f; - temp_v1 = -func_802B5224(player->pos, &sp4C) - player->unk_02E; + temp_v1 = -func_802B5224(player->pos, &sp4C) - player->unk_02C[1]; temp_f8 = (s32) temp_f0; var_a2 = temp_v1; temp_f18 = (s32) (-8.0f * 182.0f); @@ -2907,8 +2907,8 @@ void func_8002D028(Player *player, s8 arg1) { temp_f0_2 = sp54 - player->pos[2]; temp_f2 = sp4C - player->pos[0]; if (sqrtf((temp_f0_2 * temp_f0_2) + (temp_f2 * temp_f2)) <= 8.0f) { - func_800224F0(&player->unk_02E, -0x8000, 0x016C); - temp_v1_2 = player->unk_02E; + func_800224F0(&player->unk_02C[1], -0x8000, 0x016C); + temp_v1_2 = player->unk_02C[1]; if ((temp_v1_2 < -0x7F41) || (temp_v1_2 >= 0x7F42)) { player->unk_000 &= 0xFDFF; } @@ -3172,9 +3172,9 @@ void func_8002D268(Player *player, Camera *arg1, s8 arg2, s8 arg3) { spB0 = player->unk_100 * -1.0f; spAC = phi_f14 * 0.0f; } - sp60 = coss(phi_f12, phi_f14, (player->unk_02E + player->unk_0C0) & 0xFFFF, 1); + sp60 = coss(phi_f12, phi_f14, (player->unk_02C[1] + player->unk_0C0) & 0xFFFF, 1); temp_a1 = player->unk_174; - temp_f2_3 = (sins((player->unk_02E + player->unk_0C0) & 0xFFFF) * -(player->rotX - player->posX)) + ((player->rotZ - player->posZ) * sp60); + temp_f2_3 = (sins((player->unk_02C[1] + player->unk_0C0) & 0xFFFF) * -(player->rotX - player->posX)) + ((player->rotZ - player->posZ) * sp60); if (D_800ED7E8 < temp_f2_3) { player->unk_044 |= 8; } else { @@ -3270,9 +3270,9 @@ void func_8002D268(Player *player, Camera *arg1, s8 arg2, s8 arg3) { player->unk_060 = 0.0f; player->unk_05C = 1.0f; if ((player->unk_044 & 1) != 1) { - func_802B6540(sp58, player->unk_058, player->unk_05C, player->unk_060, player->unk_02E); + func_802B6540(sp58, player->unk_058, player->unk_05C, player->unk_060, player->unk_02C[1]); } else { - func_802B6540(sp58, player->unk_058, player->unk_05C, player->unk_060, player->unk_02E + 0x8000); + func_802B6540(sp58, player->unk_058, player->unk_05C, player->unk_060, player->unk_02C[1] + 0x8000); } player->unk_0BC |= 8; player->unk_0C2 += 1; diff --git a/src/code_80057C60.c b/src/code_80057C60.c index e187c8c19..6a89b7bd8 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -3154,43 +3154,43 @@ void func_8005D290(void) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005D290.s") #endif -void func_8005D6C0(Player* arg0) { +void func_8005D6C0(Player* player) { s32 temp_v0; for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { - arg0->unk_258[temp_v0].unk_01C = 0; - arg0->unk_258[temp_v0].unk_01E = 0; - arg0->unk_258[temp_v0].unk_012 = 0; + player->unk_258[temp_v0].unk_01C = 0; + player->unk_258[temp_v0].unk_01E = 0; + player->unk_258[temp_v0].unk_012 = 0; } for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { - arg0->unk_258[30 + temp_v0].unk_01C = 0; - arg0->unk_258[30 + temp_v0].unk_01E = 0; - arg0->unk_258[30 + temp_v0].unk_012 = 0; + player->unk_258[30 + temp_v0].unk_01C = 0; + player->unk_258[30 + temp_v0].unk_01E = 0; + player->unk_258[30 + temp_v0].unk_012 = 0; } for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { - arg0->unk_258[10 + temp_v0].unk_01C = 0; - arg0->unk_258[10 + temp_v0].unk_01E = 0; - arg0->unk_258[10 + temp_v0].unk_012 = 0; + player->unk_258[10 + temp_v0].unk_01C = 0; + player->unk_258[10 + temp_v0].unk_01E = 0; + player->unk_258[10 + temp_v0].unk_012 = 0; } for (temp_v0 = 0; temp_v0 < 10; ++temp_v0) { - arg0->unk_258[20 + temp_v0].unk_01C = 0; - arg0->unk_258[20 + temp_v0].unk_01E = 0; - arg0->unk_258[20 + temp_v0].unk_012 = 0; + player->unk_258[20 + temp_v0].unk_01C = 0; + player->unk_258[20 + temp_v0].unk_01E = 0; + player->unk_258[20 + temp_v0].unk_012 = 0; } } -void func_8005D794(Player* arg0, UnkPlayerStruct258* arg1, f32 arg2, f32 arg3, f32 arg4, s8 arg5, s8 arg6) { +void func_8005D794(Player* player, UnkPlayerStruct258* arg1, f32 arg2, f32 arg3, f32 arg4, s8 arg5, s8 arg6) { arg1->unk_000[2] = arg4; arg1->unk_000[0] = arg2; arg1->unk_000[1] = arg3; - arg1->unk_020 = -arg0->unk_02E; + arg1->unk_020 = -player->unk_02C[1]; arg1->unk_014 = arg5; arg1->unk_010 = arg6; } @@ -4652,43 +4652,43 @@ void func_80060BCC(void *arg0, s16 arg1, s32 arg2, ? arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80060BCC.s") #endif -void func_80060F50(Player* arg0, s16 arg1, UNUSED s8 arg2, s8 arg3) { - func_8005D794(arg0, &arg0->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(&arg0->unk_258[arg1], 5, 4.0f); +void func_80060F50(Player* player, s16 arg1, UNUSED s8 arg2, s8 arg3) { + func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); + func_8005D7D8(&player->unk_258[arg1], 5, 4.0f); if ((gCurrentCourseId == COURSE_BOWSER_CASTLE) || (gCurrentCourseId == COURSE_BIG_DONUT)) { - func_8005D800(&arg0->unk_258[arg1], 0xFF0000, 0xFF); + func_8005D800(&player->unk_258[arg1], 0xFF0000, 0xFF); } else { - func_8005D800(&arg0->unk_258[arg1], 0xFFFFFF, 0xFF); + func_8005D800(&player->unk_258[arg1], 0xFFFFFF, 0xFF); } - arg0->unk_258[arg1].unk_000[2] = arg0->pos[2] + (coss(arg0->unk_258[arg1].unk_020) * D_800EE5A8); - arg0->unk_258[arg1].unk_000[0] = arg0->pos[0] + (sins(arg0->unk_258[arg1].unk_020) * D_800EE5B0); - arg0->unk_258[arg1].unk_000[1] = D_801652A0[arg3]; - arg0->unk_0DE &= ~0x0008; + player->unk_258[arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[arg1].unk_020) * D_800EE5A8); + player->unk_258[arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[arg1].unk_020) * D_800EE5B0); + player->unk_258[arg1].unk_000[1] = D_801652A0[arg3]; + player->unk_0DE &= ~0x0008; } -void func_80061094(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_80061094(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { if (arg1 == 0) { - func_8005D794(arg0, &arg0->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(&arg0->unk_258[arg1], 6, 3.8f); - func_8005D800(&arg0->unk_258[arg1], 0xFFFFFF, 0xFF); - arg0->unk_258[arg1].unk_038 = 0; - arg0->unk_258[arg1].unk_03A = 0; - arg0->unk_258[arg1].unk_03C = 0; + func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); + func_8005D7D8(&player->unk_258[arg1], 6, 3.8f); + func_8005D800(&player->unk_258[arg1], 0xFFFFFF, 0xFF); + player->unk_258[arg1].unk_038 = 0; + player->unk_258[arg1].unk_03A = 0; + player->unk_258[arg1].unk_03C = 0; } } -void func_80061130(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - func_8005D794(arg0, &arg0->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); - func_8005D7D8(&arg0->unk_258[arg1], 7, 0.6f); - func_8005D800(&arg0->unk_258[arg1], 0xFFFFFF, 0xD0); +void func_80061130(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + func_8005D794(player, &player->unk_258[arg1], 0.0f, 0.0f, 0.0f, 0, 0); + func_8005D7D8(&player->unk_258[arg1], 7, 0.6f); + func_8005D800(&player->unk_258[arg1], 0xFFFFFF, 0xD0); - arg0->unk_258[arg1].unk_000[2] = arg0->pos[2] +(coss(arg0->unk_258[arg1].unk_020) * 6.0f); - arg0->unk_258[arg1].unk_000[0] = arg0->pos[0] + (sins(arg0->unk_258[arg1].unk_020) * 6.0f); - arg0->unk_258[arg1].unk_000[1] = arg0->pos[1] - 5.0f; - arg0->unk_258[arg1].unk_040 = 0; - arg0->unk_258[arg1].unk_024 = 0.0f; + player->unk_258[arg1].unk_000[2] = player->pos[2] +(coss(player->unk_258[arg1].unk_020) * 6.0f); + player->unk_258[arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[arg1].unk_020) * 6.0f); + player->unk_258[arg1].unk_000[1] = player->pos[1] - 5.0f; + player->unk_258[arg1].unk_040 = 0; + player->unk_258[arg1].unk_024 = 0.0f; } #ifdef MIPS_TO_C @@ -5115,7 +5115,7 @@ void func_80061EF4(void *arg0, s16 arg1, s32 arg2, ? arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80061EF4.s") #endif -void func_800621BC(Player* arg0, s16 arg1, s32 arg2, UNUSED s8 arg3) { +void func_800621BC(Player* player, s16 arg1, s32 arg2, UNUSED s8 arg3) { s32 temp_v1; s32 phi_t0; s32 phi_t1; @@ -5128,7 +5128,7 @@ void func_800621BC(Player* arg0, s16 arg1, s32 arg2, UNUSED s8 arg3) { if (temp_v1 == 1) { phi_t1 = 1; phi_t0 = 0; - phi_f2 = arg0->pos[1]; + phi_f2 = player->pos[1]; } if (temp_v1 == 0) { @@ -5136,28 +5136,28 @@ void func_800621BC(Player* arg0, s16 arg1, s32 arg2, UNUSED s8 arg3) { if (1) { phi_t0 = 0; } - phi_f2 = arg0->pos[1]; + phi_f2 = player->pos[1]; } if (phi_t0 == 0) { - if ((arg1 == 0) && ((arg0->unk_258[30 + arg2].unk_01E > 0) || (arg0->unk_258[30 + arg2].unk_01C == 0))) { - func_8005D794(arg0, &arg0->unk_258[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); - func_8005D7D8(&arg0->unk_258[30 + arg1], 8, 1.0f); - func_8005D800(&arg0->unk_258[30 + arg1], 0xFFFF20, 0xFF); + if ((arg1 == 0) && ((player->unk_258[30 + arg2].unk_01E > 0) || (player->unk_258[30 + arg2].unk_01C == 0))) { + func_8005D794(player, &player->unk_258[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); + func_8005D7D8(&player->unk_258[30 + arg1], 8, 1.0f); + func_8005D800(&player->unk_258[30 + arg1], 0xFFFF20, 0xFF); - arg0->unk_258[30 + arg1].unk_020 = 0; - if (arg0->unk_258[30 + arg1].unk_010 == 1) { - arg0->unk_258[30 + arg1].unk_020 += 2184; + player->unk_258[30 + arg1].unk_020 = 0; + if (player->unk_258[30 + arg1].unk_010 == 1) { + player->unk_258[30 + arg1].unk_020 += 2184; } else { - arg0->unk_258[30 + arg1].unk_020 -= 2184; + player->unk_258[30 + arg1].unk_020 -= 2184; } - arg0->unk_258[30 + arg1].unk_000[2] = arg0->pos[2] + (coss((arg0->unk_258[30 + arg1].unk_020 - arg0->unk_02E) - arg0->unk_0C0) * 5.0f); - arg0->unk_258[30 + arg1].unk_000[0] = arg0->pos[0] + (sins((arg0->unk_258[30 + arg1].unk_020 - arg0->unk_02E) - arg0->unk_0C0) * 5.0f); + player->unk_258[30 + arg1].unk_000[2] = player->pos[2] + (coss((player->unk_258[30 + arg1].unk_020 - player->unk_02C[1]) - player->unk_0C0) * 5.0f); + player->unk_258[30 + arg1].unk_000[0] = player->pos[0] + (sins((player->unk_258[30 + arg1].unk_020 - player->unk_02C[1]) - player->unk_0C0) * 5.0f); return; } - new_var2 = arg0; + new_var2 = player; if (new_var2->unk_258[30 + arg2].unk_01E > 0) { func_8005D794(new_var2, &new_var2->unk_258[30 + arg1], 0.0f, phi_f2, 0.0f, phi_t0, phi_t1); func_8005D7D8(&new_var2->unk_258[30 + arg1], 8, 1.0f); @@ -5170,18 +5170,18 @@ void func_800621BC(Player* arg0, s16 arg1, s32 arg2, UNUSED s8 arg3) { } new_var = new_var2; - new_var->unk_258[30 + arg1].unk_000[2] = new_var->pos[2] + (coss((new_var->unk_258[30 + arg1].unk_020 - new_var->unk_02E) - new_var->unk_0C0) * 5.0f); - new_var->unk_258[30 + arg1].unk_000[0] = new_var->pos[0] + (sins((new_var->unk_258[30 + arg1].unk_020 - new_var->unk_02E) - new_var->unk_0C0) * 5.0f); + new_var->unk_258[30 + arg1].unk_000[2] = new_var->pos[2] + (coss((new_var->unk_258[30 + arg1].unk_020 - new_var->unk_02C[1]) - new_var->unk_0C0) * 5.0f); + new_var->unk_258[30 + arg1].unk_000[0] = new_var->pos[0] + (sins((new_var->unk_258[30 + arg1].unk_020 - new_var->unk_02C[1]) - new_var->unk_0C0) * 5.0f); } } } -void func_80062484(Player* arg0, UnkPlayerStruct258* arg1, s32 arg2) { +void func_80062484(Player* player, UnkPlayerStruct258* arg1, s32 arg2) { arg1->unk_01C = 1; - arg1->unk_000[1] = arg0->unk_074 + 1.0f; - arg1->unk_000[2] = arg0->pos[2]; - arg1->unk_000[0] = arg0->pos[0]; - arg1->unk_020 = (arg2 * 0x1998) - arg0->unk_02E; + arg1->unk_000[1] = player->unk_074 + 1.0f; + arg1->unk_000[2] = player->pos[2]; + arg1->unk_000[0] = player->pos[0]; + arg1->unk_020 = (arg2 * 0x1998) - player->unk_02C[1]; arg1->unk_012 = 4; arg1->unk_01E = 0; } @@ -5378,57 +5378,57 @@ block_42: GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800624D8.s") #endif -void func_800628C0(Player* arg0, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_01C = 1; - arg0->unk_258[20 + arg3].unk_020 = -arg0->unk_02E; - arg0->unk_258[20 + arg3].unk_012 = 2; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_00C = D_800EE5FC; +void func_800628C0(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_01C = 1; + player->unk_258[20 + arg3].unk_020 = -player->unk_02C[1]; + player->unk_258[20 + arg3].unk_012 = 2; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_00C = D_800EE5FC; } -void func_80062914(Player* arg0, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_01C = 1; - arg0->unk_258[20 + arg3].unk_020 = -arg0->unk_02E; - arg0->unk_258[20 + arg3].unk_012 = 4; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_00C = 1.0f; +void func_80062914(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_01C = 1; + player->unk_258[20 + arg3].unk_020 = -player->unk_02C[1]; + player->unk_258[20 + arg3].unk_012 = 4; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_00C = 1.0f; } -void func_80062968(Player* arg0, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_01C = 1; - arg0->unk_258[20 + arg3].unk_020 = -arg0->unk_02E; - arg0->unk_258[20 + arg3].unk_012 = 5; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_00C = D_800EE600; +void func_80062968(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_01C = 1; + player->unk_258[20 + arg3].unk_020 = -player->unk_02C[1]; + player->unk_258[20 + arg3].unk_012 = 5; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_00C = D_800EE600; } -void func_800629BC(Player* arg0, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_01C = 1; - arg0->unk_258[20 + arg3].unk_020 = -arg0->unk_02E; - arg0->unk_258[20 + arg3].unk_012 = 6; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_00C = D_800EE604; - arg0->unk_258[20 + arg3].unk_000[1] = 0.0f; +void func_800629BC(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_01C = 1; + player->unk_258[20 + arg3].unk_020 = -player->unk_02C[1]; + player->unk_258[20 + arg3].unk_012 = 6; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_00C = D_800EE604; + player->unk_258[20 + arg3].unk_000[1] = 0.0f; } -void func_80062A18(Player* arg0, s8 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_01C = 1; - arg0->unk_258[20 + arg3].unk_012 = 3; - arg0->unk_258[20 + arg1 /* arg1 instead of arg3 */].unk_00C = D_800EE608; - arg0->unk_258[20 + arg3].unk_01E = 1; - arg0->unk_258[20 + arg3].unk_020 = 0; - arg0->unk_0B6 &= ~0x0080; - arg0->unk_258[20 + arg3].unk_000[2] = arg0->pos[2]; - arg0->unk_258[20 + arg3].unk_000[0] = arg0->pos[0]; - arg0->unk_258[20 + arg3].unk_000[1] = (arg0->pos[1] + 4.0f); +void func_80062A18(Player* player, s8 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_01C = 1; + player->unk_258[20 + arg3].unk_012 = 3; + player->unk_258[20 + arg1 /* arg1 instead of arg3 */].unk_00C = D_800EE608; + player->unk_258[20 + arg3].unk_01E = 1; + player->unk_258[20 + arg3].unk_020 = 0; + player->unk_0B6 &= ~0x0080; + player->unk_258[20 + arg3].unk_000[2] = player->pos[2]; + player->unk_258[20 + arg3].unk_000[0] = player->pos[0]; + player->unk_258[20 + arg3].unk_000[1] = (player->pos[1] + 4.0f); } -void func_80062AA8(Player* arg0, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_01C = 1; - 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->boundingBoxSize) - 2.5; +void func_80062AA8(Player* player, UNUSED s8 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_01C = 1; + player->unk_258[20 + arg3].unk_012 = 5; + player->unk_258[20 + arg3].unk_00C = D_800EE60C; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_000[1] = (player->pos[1] + player->boundingBoxSize) - 2.5; } void func_80062B18(f32 *arg0, f32 *arg1, f32 *arg2, f32 arg3, f32 arg4, f32 arg5, u16 arg6, u16 arg7) { @@ -5554,257 +5554,257 @@ void func_80062C74(void *arg0, s16 arg1, ? arg2, ? arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80062C74.s") #endif -void func_80062F98(Player* arg0, s16 arg1, s8 arg2, UNUSED s8 arg3) { +void func_80062F98(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { f32 temp_f0; - temp_f0 = arg0->unk_258[10 + arg1].unk_018 / 10.0f; - ++arg0->unk_258[10 + arg1].unk_01E; - arg0->unk_258[10 + arg1].unk_000[1] += temp_f0; - if ((arg0->unk_0CA & 1) == 1) { - arg0->unk_258[10 + arg1].unk_000[1] += (temp_f0 + D_800EE648); - if ((arg0->unk_258[10 + arg1].unk_01E == 0x10) || ((D_801652A0[arg2] - arg0->unk_258[10 + arg1].unk_000[1]) < 3.0f)) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + temp_f0 = player->unk_258[10 + arg1].unk_018 / 10.0f; + ++player->unk_258[10 + arg1].unk_01E; + player->unk_258[10 + arg1].unk_000[1] += temp_f0; + if ((player->unk_0CA & 1) == 1) { + player->unk_258[10 + arg1].unk_000[1] += (temp_f0 + D_800EE648); + if ((player->unk_258[10 + arg1].unk_01E == 0x10) || ((D_801652A0[arg2] - player->unk_258[10 + arg1].unk_000[1]) < 3.0f)) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - } else if ((arg0->unk_258[10 + arg1].unk_01E == 0xA) || ((D_801652A0[arg2] - arg0->unk_258[10 + arg1].unk_000[1]) < 3.0f)) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + } else if ((player->unk_258[10 + arg1].unk_01E == 0xA) || ((D_801652A0[arg2] - player->unk_258[10 + arg1].unk_000[1]) < 3.0f)) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } } -void func_800630C0(Player* arg0, s16 arg1, s8 arg2, UNUSED s8 arg3) { - ++arg0->unk_258[arg1].unk_01E; - arg0->unk_258[arg1].unk_000[2] = arg0->pos[2] + coss(arg0->unk_258[arg1].unk_020) * D_800EE650; - arg0->unk_258[arg1].unk_000[0] = arg0->pos[0] + sins(arg0->unk_258[arg1].unk_020) * D_800EE658; - arg0->unk_258[arg1].unk_000[1] = D_801652A0[arg2]; - if (arg0->unk_258[arg1].unk_01E == 15) { - arg0->unk_258[arg1].unk_01C = 0; - arg0->unk_258[arg1].unk_01E = 0; - arg0->unk_258[arg1].unk_012 = 0; +void func_800630C0(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { + ++player->unk_258[arg1].unk_01E; + player->unk_258[arg1].unk_000[2] = player->pos[2] + coss(player->unk_258[arg1].unk_020) * D_800EE650; + player->unk_258[arg1].unk_000[0] = player->pos[0] + sins(player->unk_258[arg1].unk_020) * D_800EE658; + player->unk_258[arg1].unk_000[1] = D_801652A0[arg2]; + if (player->unk_258[arg1].unk_01E == 15) { + player->unk_258[arg1].unk_01C = 0; + player->unk_258[arg1].unk_01E = 0; + player->unk_258[arg1].unk_012 = 0; } } -void func_800631A8(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++arg0->unk_258[arg1].unk_01E; - if ((s32) arg0->unk_258[arg1].unk_01E < 9) { - if ((arg0->unk_258[arg1].unk_01E & 1) != 0) { - arg0->unk_258[arg1].unk_038 = 8; +void func_800631A8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + ++player->unk_258[arg1].unk_01E; + if ((s32) player->unk_258[arg1].unk_01E < 9) { + if ((player->unk_258[arg1].unk_01E & 1) != 0) { + player->unk_258[arg1].unk_038 = 8; } else { - arg0->unk_258[arg1].unk_038 = 0; + player->unk_258[arg1].unk_038 = 0; } - } else if (((arg0->unk_258[arg1].unk_01E & 1) != 0) || ((arg0->unk_258[arg1].unk_01E >= 9) && (arg0->unk_258[arg1].unk_01E < 12))) { - arg0->unk_258[arg1].unk_038 = 0xFF; - } else if ((arg0->unk_258[arg1].unk_01E & 2) != 0) { - arg0->unk_258[arg1].unk_038 = 8; + } else if (((player->unk_258[arg1].unk_01E & 1) != 0) || ((player->unk_258[arg1].unk_01E >= 9) && (player->unk_258[arg1].unk_01E < 12))) { + player->unk_258[arg1].unk_038 = 0xFF; + } else if ((player->unk_258[arg1].unk_01E & 2) != 0) { + player->unk_258[arg1].unk_038 = 8; } else { - arg0->unk_258[arg1].unk_038 = 0; + player->unk_258[arg1].unk_038 = 0; } - arg0->unk_258[arg1].unk_03A = 0; - arg0->unk_258[arg1].unk_03C = 0; - if ((s32) arg0->unk_258[arg1].unk_01E >= 0x19) { - arg0->unk_258[arg1].unk_01C = 0; - arg0->unk_258[arg1].unk_01E = 0; - arg0->unk_258[arg1].unk_012 = 0; + player->unk_258[arg1].unk_03A = 0; + player->unk_258[arg1].unk_03C = 0; + if ((s32) player->unk_258[arg1].unk_01E >= 0x19) { + player->unk_258[arg1].unk_01C = 0; + player->unk_258[arg1].unk_01E = 0; + player->unk_258[arg1].unk_012 = 0; } } -void func_80063268(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (arg0->unk_258[arg1].unk_01E >= 0x1E) { - arg0->unk_258[arg1].unk_040 += 0x1FFE; +void func_80063268(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + if (player->unk_258[arg1].unk_01E >= 0x1E) { + player->unk_258[arg1].unk_040 += 0x1FFE; } else { - arg0->unk_258[arg1].unk_040 += 0x1554; + player->unk_258[arg1].unk_040 += 0x1554; } - arg0->unk_258[arg1].unk_024 += 0.25; - arg0->unk_258[arg1].unk_000[2] = arg0->pos[2] + (coss((arg0->unk_258[arg1].unk_020 + arg0->unk_258[arg1].unk_040)) * 5.5); - arg0->unk_258[arg1].unk_000[0] = arg0->pos[0] + (sins((arg0->unk_258[arg1].unk_020 + arg0->unk_258[arg1].unk_040)) * 5.5); - arg0->unk_258[arg1].unk_000[1] = ((arg0->pos[1] - 5.0f) + arg0->unk_258[arg1].unk_024); - ++arg0->unk_258[arg1].unk_01E; - arg0->unk_258[arg1].unk_00C += D_800EE660; - arg0->unk_258[arg1].unk_03E -= 5; + player->unk_258[arg1].unk_024 += 0.25; + player->unk_258[arg1].unk_000[2] = player->pos[2] + (coss((player->unk_258[arg1].unk_020 + player->unk_258[arg1].unk_040)) * 5.5); + player->unk_258[arg1].unk_000[0] = player->pos[0] + (sins((player->unk_258[arg1].unk_020 + player->unk_258[arg1].unk_040)) * 5.5); + player->unk_258[arg1].unk_000[1] = ((player->pos[1] - 5.0f) + player->unk_258[arg1].unk_024); + ++player->unk_258[arg1].unk_01E; + player->unk_258[arg1].unk_00C += D_800EE660; + player->unk_258[arg1].unk_03E -= 5; - if ((s32) arg0->unk_258[arg1].unk_03E <= 0) { - arg0->unk_258[arg1].unk_03E = 0; + if ((s32) player->unk_258[arg1].unk_03E <= 0) { + player->unk_258[arg1].unk_03E = 0; } - if ((s32) arg0->unk_258[arg1].unk_01E >= 0x28) { - arg0->unk_258[arg1].unk_01C = 0; - arg0->unk_258[arg1].unk_01E = 0; - arg0->unk_258[arg1].unk_012 = 0; + if ((s32) player->unk_258[arg1].unk_01E >= 0x28) { + player->unk_258[arg1].unk_01C = 0; + player->unk_258[arg1].unk_01E = 0; + player->unk_258[arg1].unk_012 = 0; } } -void func_80063408(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (arg0->unk_258[10 + arg1].unk_010 == 1) { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[2].cornerZ + (arg0->unk_258[10 + arg1].unk_01E * -7) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[2].cornerX + (arg0->unk_258[10 + arg1].unk_01E * -7) * sins(arg0->unk_258[10 + arg1].unk_020); +void func_80063408(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + if (player->unk_258[10 + arg1].unk_010 == 1) { + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[2].cornerZ + (player->unk_258[10 + arg1].unk_01E * -7) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[2].cornerX + (player->unk_258[10 + arg1].unk_01E * -7) * sins(player->unk_258[10 + arg1].unk_020); } else { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[3].cornerZ + (arg0->unk_258[10 + arg1].unk_01E * -7) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[3].cornerX + (arg0->unk_258[10 + arg1].unk_01E * -7) * sins(arg0->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[3].cornerZ + (player->unk_258[10 + arg1].unk_01E * -7) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[3].cornerX + (player->unk_258[10 + arg1].unk_01E * -7) * sins(player->unk_258[10 + arg1].unk_020); } - ++arg0->unk_258[10 + arg1].unk_01E; - arg0->unk_258[10 + arg1].unk_000[1] += 1.0f; + ++player->unk_258[10 + arg1].unk_01E; + player->unk_258[10 + arg1].unk_000[1] += 1.0f; - if (((arg0->unk_0BC & 0x80) != 0) || ((arg0->unk_0BC & 0x40) != 0)) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; + if (((player->unk_0BC & 0x80) != 0) || ((player->unk_0BC & 0x40) != 0)) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; } - if (arg0->unk_258[10 + arg1].unk_01E == 8) { - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + if (player->unk_258[10 + arg1].unk_01E == 8) { + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - arg0->unk_258[10 + arg1].unk_00C += D_800EE668; - if (arg0->unk_258[10 + arg1].unk_01E >= 4) { - arg0->unk_258[10 + arg1].unk_03E -= 16; + player->unk_258[10 + arg1].unk_00C += D_800EE668; + if (player->unk_258[10 + arg1].unk_01E >= 4) { + player->unk_258[10 + arg1].unk_03E -= 16; } - if (arg0->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + if (player->unk_258[10 + arg1].unk_03E <= 0) { + player->unk_258[10 + arg1].unk_03E = 0; } } -void func_800635D4(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_800635D4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { f32 sp44; f32 sp40; f32 sp3C; - if (arg0->unk_258[10 + arg1].unk_010 == 1) { - if ((arg0->unk_0BC * 2) < 0) { - func_80062B18(&sp44, &sp40, &sp3C, -2.0f, 0.0f, (-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 16, -arg0->unk_258[10 + arg1].unk_020, 2 * -arg0->unk_206); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[2].cornerX + sp44; - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[2].cornerZ + sp3C; + if (player->unk_258[10 + arg1].unk_010 == 1) { + if ((player->unk_0BC * 2) < 0) { + func_80062B18(&sp44, &sp40, &sp3C, -2.0f, 0.0f, (-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16, -player->unk_258[10 + arg1].unk_020, 2 * -player->unk_206); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[2].cornerX + sp44; + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[2].cornerZ + sp3C; } else { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[2].cornerZ + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 16) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[2].cornerX + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 16) * sins(arg0->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[2].cornerZ + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[2].cornerX + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * sins(player->unk_258[10 + arg1].unk_020); } - } else if ((arg0->unk_0BC * 2) < 0) { - func_80062B18(&sp44, &sp40, &sp3C, 2.0f, 0.0f, (-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 16, - arg0->unk_258[10 + arg1].unk_020, 2 * -arg0->unk_206); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[3].cornerX + sp44; - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[3].cornerZ + sp3C; + } else if ((player->unk_0BC * 2) < 0) { + func_80062B18(&sp44, &sp40, &sp3C, 2.0f, 0.0f, (-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16, - player->unk_258[10 + arg1].unk_020, 2 * -player->unk_206); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[3].cornerX + sp44; + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[3].cornerZ + sp3C; } else { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[3].cornerZ + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 16) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[3].cornerX + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 16) * sins(arg0->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[3].cornerZ + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[3].cornerX + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 16) * sins(player->unk_258[10 + arg1].unk_020); } - ++arg0->unk_258[10 + arg1].unk_01E; - arg0->unk_258[10 + arg1].unk_000[1] += D_800EE670; - if (((arg0->unk_0BC & 0x80) != 0) || ((arg0->unk_0BC & 0x40) != 0)) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; + ++player->unk_258[10 + arg1].unk_01E; + player->unk_258[10 + arg1].unk_000[1] += D_800EE670; + if (((player->unk_0BC & 0x80) != 0) || ((player->unk_0BC & 0x40) != 0)) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; } - if (arg0->unk_258[10 + arg1].unk_01E == 8) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + if (player->unk_258[10 + arg1].unk_01E == 8) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - arg0->unk_258[10 + arg1].unk_00C += D_800EE678; - if (arg0->unk_258[10 + arg1].unk_040 == 0) { - if (arg0->unk_258[10 + arg1].unk_01E >= 4) { - arg0->unk_258[10 + arg1].unk_03E -= 12; + player->unk_258[10 + arg1].unk_00C += D_800EE678; + if (player->unk_258[10 + arg1].unk_040 == 0) { + if (player->unk_258[10 + arg1].unk_01E >= 4) { + player->unk_258[10 + arg1].unk_03E -= 12; } - if (arg0->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + if (player->unk_258[10 + arg1].unk_03E <= 0) { + player->unk_258[10 + arg1].unk_03E = 0; } } else { - if (arg0->unk_258[10 + arg1].unk_01E >= 4) { - arg0->unk_258[10 + arg1].unk_03E -= 16; + if (player->unk_258[10 + arg1].unk_01E >= 4) { + player->unk_258[10 + arg1].unk_03E -= 16; } - if (arg0->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + if (player->unk_258[10 + arg1].unk_03E <= 0) { + player->unk_258[10 + arg1].unk_03E = 0; } } } -void func_800639DC(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (arg0->unk_258[10 + arg1].unk_010 == 1) { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[2].cornerZ + (D_800EE680 * arg0->unk_258[10 + arg1].unk_01E) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[2].cornerX + (D_800EE684 * arg0->unk_258[10 + arg1].unk_01E) * sins(arg0->unk_258[10 + arg1].unk_020); +void func_800639DC(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + if (player->unk_258[10 + arg1].unk_010 == 1) { + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[2].cornerZ + (D_800EE680 * player->unk_258[10 + arg1].unk_01E) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[2].cornerX + (D_800EE684 * player->unk_258[10 + arg1].unk_01E) * sins(player->unk_258[10 + arg1].unk_020); } else { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[3].cornerZ + (D_800EE688 * arg0->unk_258[10 + arg1].unk_01E) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[3].cornerX + (D_800EE68C * arg0->unk_258[10 + arg1].unk_01E) * sins(arg0->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[3].cornerZ + (D_800EE688 * player->unk_258[10 + arg1].unk_01E) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[3].cornerX + (D_800EE68C * player->unk_258[10 + arg1].unk_01E) * sins(player->unk_258[10 + arg1].unk_020); } - ++arg0->unk_258[10 + arg1].unk_01E; - arg0->unk_258[10 + arg1].unk_000[1] += D_800EE690; - if (arg0->unk_258[10 + arg1].unk_01E == 8) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + ++player->unk_258[10 + arg1].unk_01E; + player->unk_258[10 + arg1].unk_000[1] += D_800EE690; + if (player->unk_258[10 + arg1].unk_01E == 8) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - arg0->unk_258[10 + arg1].unk_00C += D_800EE698; - if (arg0->unk_258[10 + arg1].unk_040 == 0) { - if ((s32) arg0->unk_258[10 + arg1].unk_01E >= 4) { - --arg0->unk_258[10 + arg1].unk_03E; + player->unk_258[10 + arg1].unk_00C += D_800EE698; + if (player->unk_258[10 + arg1].unk_040 == 0) { + if ((s32) player->unk_258[10 + arg1].unk_01E >= 4) { + --player->unk_258[10 + arg1].unk_03E; } - if ((s32) arg0->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + if ((s32) player->unk_258[10 + arg1].unk_03E <= 0) { + player->unk_258[10 + arg1].unk_03E = 0; } } else { - if ((s32) arg0->unk_258[10 + arg1].unk_01E >= 4) { - arg0->unk_258[10 + arg1].unk_03E -= 16; + if ((s32) player->unk_258[10 + arg1].unk_01E >= 4) { + player->unk_258[10 + arg1].unk_03E -= 16; } - if ((s32) arg0->unk_258[10 + arg1].unk_03E <= 0) { + if ((s32) player->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + player->unk_258[10 + arg1].unk_03E = 0; } } } -void func_80063BD4(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (arg0->unk_258[10 + arg1].unk_010 == 1) { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[2].cornerZ + (-2 * arg0->unk_258[10 + arg1].unk_01E * coss(arg0->unk_258[10 + arg1].unk_020)); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[2].cornerX + (-2 * arg0->unk_258[10 + arg1].unk_01E * sins(arg0->unk_258[10 + arg1].unk_020)); +void func_80063BD4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + if (player->unk_258[10 + arg1].unk_010 == 1) { + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[2].cornerZ + (-2 * player->unk_258[10 + arg1].unk_01E * coss(player->unk_258[10 + arg1].unk_020)); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[2].cornerX + (-2 * player->unk_258[10 + arg1].unk_01E * sins(player->unk_258[10 + arg1].unk_020)); } else { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[3].cornerZ + (-2 * arg0->unk_258[10 + arg1].unk_01E * coss(arg0->unk_258[10 + arg1].unk_020)); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[3].cornerX + (-2 * arg0->unk_258[10 + arg1].unk_01E * sins(arg0->unk_258[10 + arg1].unk_020)); + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[3].cornerZ + (-2 * player->unk_258[10 + arg1].unk_01E * coss(player->unk_258[10 + arg1].unk_020)); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[3].cornerX + (-2 * player->unk_258[10 + arg1].unk_01E * sins(player->unk_258[10 + arg1].unk_020)); } - ++arg0->unk_258[10 + arg1].unk_01E; - arg0->unk_258[10 + arg1].unk_000[1] += D_800EE6A0; - if (arg0->unk_258[10 + arg1].unk_01E == 8) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + ++player->unk_258[10 + arg1].unk_01E; + player->unk_258[10 + arg1].unk_000[1] += D_800EE6A0; + if (player->unk_258[10 + arg1].unk_01E == 8) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - arg0->unk_258[10 + arg1].unk_018 = 2.0f; - arg0->unk_258[10 + arg1].unk_00C -= D_800EE6A8; + player->unk_258[10 + arg1].unk_018 = 2.0f; + player->unk_258[10 + arg1].unk_00C -= D_800EE6A8; } -void func_80063D58(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (arg0->unk_258[10 + arg1].unk_010 == 1) { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[2].cornerZ + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 20.0f) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[2].cornerX + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 20.0f) * sins(arg0->unk_258[10 + arg1].unk_020); +void func_80063D58(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + if (player->unk_258[10 + arg1].unk_010 == 1) { + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[2].cornerZ + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[2].cornerX + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * sins(player->unk_258[10 + arg1].unk_020); } else { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->boundingBoxCorners[3].cornerZ + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 20.0f) * coss(arg0->unk_258[10 + arg1].unk_020); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->boundingBoxCorners[3].cornerX + ((-arg0->unk_258[10 + arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 20.0f) * sins(arg0->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[2] = player->boundingBoxCorners[3].cornerZ + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * coss(player->unk_258[10 + arg1].unk_020); + player->unk_258[10 + arg1].unk_000[0] = player->boundingBoxCorners[3].cornerX + ((-player->unk_258[10 + arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 20.0f) * sins(player->unk_258[10 + arg1].unk_020); } - ++arg0->unk_258[10 + arg1].unk_01E; - if (arg0->unk_258[10 + arg1].unk_01E == 8) { - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + ++player->unk_258[10 + arg1].unk_01E; + if (player->unk_258[10 + arg1].unk_01E == 8) { + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - arg0->unk_258[10 + arg1].unk_00C += D_800EE6B0; - if (arg0->unk_258[10 + arg1].unk_01E >= 4) { - arg0->unk_258[10 + arg1].unk_03E -= 18; - arg0->unk_258[10 + arg1].unk_000[1] -= D_800EE6B8; + player->unk_258[10 + arg1].unk_00C += D_800EE6B0; + if (player->unk_258[10 + arg1].unk_01E >= 4) { + player->unk_258[10 + arg1].unk_03E -= 18; + player->unk_258[10 + arg1].unk_000[1] -= D_800EE6B8; } else { - arg0->unk_258[10 + arg1].unk_000[1] += D_800EE6C0; + player->unk_258[10 + arg1].unk_000[1] += D_800EE6C0; } - if (arg0->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + if (player->unk_258[10 + arg1].unk_03E <= 0) { + player->unk_258[10 + arg1].unk_03E = 0; } } @@ -5842,54 +5842,54 @@ UNUSED void func_80063FBC(void *arg0, s16 arg1, ? arg2, ? arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80063FBC.s") #endif -void func_80064184(Player* arg0, s16 arg1, s8 arg2, UNUSED s8 arg3) { +void func_80064184(Player* player, s16 arg1, s8 arg2, UNUSED s8 arg3) { f32 sp44; f32 sp40; f32 sp3C; - sp40 = D_801652A0[arg2] - arg0->pos[1] - 3.0f; - if (((arg0->unk_0DE & 1) != 0) && (gCurrentCourseId != COURSE_KOOPA_BEACH)) { - sp40 = D_801652A0[arg2] - arg0->pos[1] + D_800EE6C8; + sp40 = D_801652A0[arg2] - player->pos[1] - 3.0f; + if (((player->unk_0DE & 1) != 0) && (gCurrentCourseId != COURSE_KOOPA_BEACH)) { + sp40 = D_801652A0[arg2] - player->pos[1] + D_800EE6C8; } - func_80062B18(&sp44, &sp40, &sp3C, 0.0f, sp40, -4.0f + ((-arg0->unk_258[arg1].unk_01E * (arg0->unk_094 / 18.0f) * 216.0f) / 10.0f), -arg0->unk_258[arg1].unk_020, 2 * -arg0->unk_206); - arg0->unk_258[arg1].unk_000[0] = arg0->pos[0] + sp44; - 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->boundingBoxSize))) { - arg0->unk_258[arg1].unk_01C = 0; - arg0->unk_258[arg1].unk_01E = 0; - arg0->unk_258[arg1].unk_012 = 0; + func_80062B18(&sp44, &sp40, &sp3C, 0.0f, sp40, -4.0f + ((-player->unk_258[arg1].unk_01E * (player->unk_094 / 18.0f) * 216.0f) / 10.0f), -player->unk_258[arg1].unk_020, 2 * -player->unk_206); + player->unk_258[arg1].unk_000[0] = player->pos[0] + sp44; + player->unk_258[arg1].unk_000[2] = player->pos[2] + sp3C; + player->unk_258[arg1].unk_000[1] = player->pos[1] + sp40; + ++player->unk_258[arg1].unk_01E; + if ((player->unk_258[arg1].unk_01E == 12) || (D_801652A0[arg2] <= (player->pos[1] - player->boundingBoxSize))) { + player->unk_258[arg1].unk_01C = 0; + player->unk_258[arg1].unk_01E = 0; + player->unk_258[arg1].unk_012 = 0; } - arg0->unk_258[arg1].unk_018 = 2.0f; - arg0->unk_258[arg1].unk_00C -= D_800EE6D0; - if (arg0->unk_258[arg1].unk_00C < 0.0f) { - arg0->unk_258[arg1].unk_00C = 0.0f; + player->unk_258[arg1].unk_018 = 2.0f; + player->unk_258[arg1].unk_00C -= D_800EE6D0; + if (player->unk_258[arg1].unk_00C < 0.0f) { + player->unk_258[arg1].unk_00C = 0.0f; } - arg0->unk_258[arg1].unk_03E -= 22; - if (arg0->unk_258[arg1].unk_03E <= 0) { - arg0->unk_258[arg1].unk_03E = 0; + player->unk_258[arg1].unk_03E -= 22; + if (player->unk_258[arg1].unk_03E <= 0) { + player->unk_258[arg1].unk_03E = 0; } } -void func_800643A8(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - arg0->unk_258[10 + arg1].unk_000[2] = arg0->pos[2] + (D_800EE6D8 * arg0->unk_258[10 + arg1].unk_01E * coss(arg0->unk_258[10 + arg1].unk_020)); - arg0->unk_258[10 + arg1].unk_000[0] = arg0->pos[0] + (D_800EE6E0 * arg0->unk_258[10 + arg1].unk_01E * sins(arg0->unk_258[10 + arg1].unk_020)); - arg0->unk_258[10 + arg1].unk_000[1] = arg0->unk_258[10 + arg1].unk_000[1] + 0.5; +void func_800643A8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + player->unk_258[10 + arg1].unk_000[2] = player->pos[2] + (D_800EE6D8 * player->unk_258[10 + arg1].unk_01E * coss(player->unk_258[10 + arg1].unk_020)); + player->unk_258[10 + arg1].unk_000[0] = player->pos[0] + (D_800EE6E0 * player->unk_258[10 + arg1].unk_01E * sins(player->unk_258[10 + arg1].unk_020)); + player->unk_258[10 + arg1].unk_000[1] = player->unk_258[10 + arg1].unk_000[1] + 0.5; - ++arg0->unk_258[10 + arg1].unk_01E; - if (arg0->unk_258[10 + arg1].unk_01E == 10) { - arg0->unk_258[10 + arg1].unk_01C = 0; - arg0->unk_258[10 + arg1].unk_01E = 0; - arg0->unk_258[10 + arg1].unk_012 = 0; + ++player->unk_258[10 + arg1].unk_01E; + if (player->unk_258[10 + arg1].unk_01E == 10) { + player->unk_258[10 + arg1].unk_01C = 0; + player->unk_258[10 + arg1].unk_01E = 0; + player->unk_258[10 + arg1].unk_012 = 0; } - arg0->unk_258[10 + arg1].unk_00C += D_800EE6E8; - arg0->unk_258[10 + arg1].unk_03E -= 8; - if ( arg0->unk_258[10 + arg1].unk_03E <= 0) { - arg0->unk_258[10 + arg1].unk_03E = 0; + player->unk_258[10 + arg1].unk_00C += D_800EE6E8; + player->unk_258[10 + arg1].unk_03E -= 8; + if ( player->unk_258[10 + arg1].unk_03E <= 0) { + player->unk_258[10 + arg1].unk_03E = 0; } } @@ -5988,232 +5988,232 @@ void func_80064664(void *arg0, s16 arg1, ? arg2, ? arg3) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80064664.s") #endif -void func_800647C8(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_800647C8(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++arg0->unk_258[30 + arg1].unk_01E; - arg0->unk_258[30 + arg1].unk_000[2] = arg0->pos[2] + ((D_800EE710 * (arg0->unk_258[30 + arg1].unk_01E)) * coss(arg0->unk_258[30 + arg1].unk_020)); - arg0->unk_258[30 + arg1].unk_000[0] = arg0->pos[0] + ((D_800EE718 * (arg0->unk_258[30 + arg1].unk_01E)) * sins(arg0->unk_258[30 + arg1].unk_020)); - arg0->unk_258[30 + arg1].unk_000[1] = (arg0->unk_074 + 2.0f); + ++player->unk_258[30 + arg1].unk_01E; + player->unk_258[30 + arg1].unk_000[2] = player->pos[2] + ((D_800EE710 * (player->unk_258[30 + arg1].unk_01E)) * coss(player->unk_258[30 + arg1].unk_020)); + player->unk_258[30 + arg1].unk_000[0] = player->pos[0] + ((D_800EE718 * (player->unk_258[30 + arg1].unk_01E)) * sins(player->unk_258[30 + arg1].unk_020)); + player->unk_258[30 + arg1].unk_000[1] = (player->unk_074 + 2.0f); - if (arg0->unk_258[30 + arg1].unk_01E == 14) { - arg0->unk_258[30 + arg1].unk_01C = 0; - arg0->unk_258[30 + arg1].unk_01E = 0; - arg0->unk_258[30 + arg1].unk_012 = 0; + if (player->unk_258[30 + arg1].unk_01E == 14) { + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_012 = 0; } - arg0->unk_258[30 + arg1].unk_03E -= 12; - if (arg0->unk_258[30 + arg1].unk_03E <= 0) { - arg0->unk_258[30 + arg1].unk_03E = 0; + player->unk_258[30 + arg1].unk_03E -= 12; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } } -void func_800648E4(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++arg0->unk_258[30 + arg1].unk_01E; - arg0->unk_258[30 + arg1].unk_00C -= D_800EE720; - arg0->unk_258[30 + arg1].unk_000[1] += D_800EE728; - arg0->unk_258[30 + arg1].unk_03E -= 12; +void func_800648E4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + ++player->unk_258[30 + arg1].unk_01E; + player->unk_258[30 + arg1].unk_00C -= D_800EE720; + player->unk_258[30 + arg1].unk_000[1] += D_800EE728; + player->unk_258[30 + arg1].unk_03E -= 12; - if (arg0->unk_258[30 + arg1].unk_03E <= 0) { - arg0->unk_258[30 + arg1].unk_03E = 0; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } - if (arg0->unk_258[30 + arg1].unk_01E == 10) { - arg0->unk_258[30 + arg1].unk_01C = 0; - arg0->unk_258[30 + arg1].unk_01E = 0; - arg0->unk_258[30 + arg1].unk_012 = 0; + if (player->unk_258[30 + arg1].unk_01E == 10) { + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_012 = 0; } } -void func_80064988(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - ++arg0->unk_258[30 + arg1].unk_01E; - arg0->unk_258[30 + arg1].unk_000[1] -= D_800EE730; +void func_80064988(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { + ++player->unk_258[30 + arg1].unk_01E; + player->unk_258[30 + arg1].unk_000[1] -= D_800EE730; - if (arg0->unk_258[30 + arg1].unk_01E == 10) { - arg0->unk_258[30 + arg1].unk_01C = 0; - arg0->unk_258[30 + arg1].unk_01E = 0; - arg0->unk_258[30 + arg1].unk_012 = 0; + if (player->unk_258[30 + arg1].unk_01E == 10) { + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_012 = 0; } } -void func_800649F4(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_800649F4(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { f32 temp; - temp = arg0->unk_258[30 + arg1].unk_018; + temp = player->unk_258[30 + arg1].unk_018; - arg0->unk_258[30 + arg1].unk_000[2] = arg0->unk_21C + (((-temp) * arg0->unk_258[30 + arg1].unk_01E) * coss(arg0->unk_258[30 + arg1].unk_020)); - arg0->unk_258[30 + arg1].unk_000[0] = arg0->unk_218 + (((-temp) * arg0->unk_258[30 + arg1].unk_01E) * sins(arg0->unk_258[30 + arg1].unk_020)); - arg0->unk_258[30 + arg1].unk_000[1] = arg0->pos[1] + arg0->unk_258[30 + arg1].unk_014; - arg0->unk_258[30 + arg1].unk_00C += D_800EE738; + player->unk_258[30 + arg1].unk_000[2] = player->unk_21C + (((-temp) * player->unk_258[30 + arg1].unk_01E) * coss(player->unk_258[30 + arg1].unk_020)); + player->unk_258[30 + arg1].unk_000[0] = player->unk_218 + (((-temp) * player->unk_258[30 + arg1].unk_01E) * sins(player->unk_258[30 + arg1].unk_020)); + player->unk_258[30 + arg1].unk_000[1] = player->pos[1] + player->unk_258[30 + arg1].unk_014; + player->unk_258[30 + arg1].unk_00C += D_800EE738; - ++arg0->unk_258[30 + arg1].unk_01E; - if (arg0->unk_258[30 + arg1].unk_01E == 12) { - arg0->unk_258[30 + arg1].unk_01E = 0; - arg0->unk_258[30 + arg1].unk_01C = 0; - arg0->unk_258[30 + arg1].unk_012 = 0; + ++player->unk_258[30 + arg1].unk_01E; + if (player->unk_258[30 + arg1].unk_01E == 12) { + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_012 = 0; } - if (arg0->unk_258[30 + arg1].unk_01E >= 9) { - arg0->unk_258[30 + arg1].unk_03E -= 0x10; - if (arg0->unk_258[30 + arg1].unk_03E <= 0) { - arg0->unk_258[30 + arg1].unk_03E = 0; + if (player->unk_258[30 + arg1].unk_01E >= 9) { + player->unk_258[30 + arg1].unk_03E -= 0x10; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } } } -void func_80064B30(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_80064B30(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { f32 temp; - temp = arg0->unk_258[30 + arg1].unk_018 * D_800EE740; + temp = player->unk_258[30 + arg1].unk_018 * D_800EE740; - arg0->unk_258[30 + arg1].unk_000[2] = (arg0->pos[2] + (-temp * arg0->unk_258[30 + arg1].unk_01E) * (coss(arg0->unk_258[30 + arg1].unk_020))); - arg0->unk_258[30 + arg1].unk_000[0] = (arg0->pos[0] + (-temp * arg0->unk_258[30 + arg1].unk_01E) * (sins(arg0->unk_258[30 + arg1].unk_020))); - arg0->unk_258[30 + arg1].unk_000[1] += D_800EE748; + player->unk_258[30 + arg1].unk_000[2] = (player->pos[2] + (-temp * player->unk_258[30 + arg1].unk_01E) * (coss(player->unk_258[30 + arg1].unk_020))); + player->unk_258[30 + arg1].unk_000[0] = (player->pos[0] + (-temp * player->unk_258[30 + arg1].unk_01E) * (sins(player->unk_258[30 + arg1].unk_020))); + player->unk_258[30 + arg1].unk_000[1] += D_800EE748; - ++arg0->unk_258[30 + arg1].unk_01E; - if (arg0->unk_258[30 + arg1].unk_01E == 10) { - arg0->unk_258[30 + arg1].unk_01E = 0; - arg0->unk_258[30 + arg1].unk_01C = 0; - arg0->unk_258[30 + arg1].unk_012 = 0; + ++player->unk_258[30 + arg1].unk_01E; + if (player->unk_258[30 + arg1].unk_01E == 10) { + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_012 = 0; } - arg0->unk_258[30 + arg1].unk_038 += 1820; - if (arg0->unk_258[30 + arg1].unk_01E >= 6) { - arg0->unk_258[30 + arg1].unk_03E -= 16; - if (arg0->unk_258[30 + arg1].unk_03E <= 0) { - arg0->unk_258[30 + arg1].unk_03E = 0; + player->unk_258[30 + arg1].unk_038 += 1820; + if (player->unk_258[30 + arg1].unk_01E >= 6) { + player->unk_258[30 + arg1].unk_03E -= 16; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } } } -void func_80064C74(Player* arg0, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { +void func_80064C74(Player* player, s16 arg1, UNUSED s8 arg2, UNUSED s8 arg3) { - if (arg0->unk_258[30 + arg1].unk_010 == 1) { - arg0->unk_258[30 + arg1].unk_020 += 2184; + if (player->unk_258[30 + arg1].unk_010 == 1) { + player->unk_258[30 + arg1].unk_020 += 2184; } else { - arg0->unk_258[30 + arg1].unk_020 -= 2184; + player->unk_258[30 + arg1].unk_020 -= 2184; } - arg0->unk_258[30 + arg1].unk_000[2] = arg0->pos[2] + (coss(arg0->unk_258[30 + arg1].unk_020 - arg0->unk_02E - arg0->unk_0C0) * 5.0f); - arg0->unk_258[30 + arg1].unk_000[0] = arg0->pos[0] + (sins(arg0->unk_258[30 + arg1].unk_020 - arg0->unk_02E - arg0->unk_0C0) * 5.0f); - arg0->unk_258[30 + arg1].unk_000[1] = arg0->pos[1] - 1.0f; - arg0->unk_258[30 + arg1].unk_00C += D_800EE750; - ++arg0->unk_258[30 + arg1].unk_01E; + player->unk_258[30 + arg1].unk_000[2] = player->pos[2] + (coss(player->unk_258[30 + arg1].unk_020 - player->unk_02C[1] - player->unk_0C0) * 5.0f); + player->unk_258[30 + arg1].unk_000[0] = player->pos[0] + (sins(player->unk_258[30 + arg1].unk_020 - player->unk_02C[1] - player->unk_0C0) * 5.0f); + player->unk_258[30 + arg1].unk_000[1] = player->pos[1] - 1.0f; + player->unk_258[30 + arg1].unk_00C += D_800EE750; + ++player->unk_258[30 + arg1].unk_01E; - if (arg0->unk_258[30 + arg1].unk_01E == 10) { - arg0->unk_258[30 + arg1].unk_01E = 0; - arg0->unk_258[30 + arg1].unk_01C = 0; - arg0->unk_258[30 + arg1].unk_012 = 0; + if (player->unk_258[30 + arg1].unk_01E == 10) { + player->unk_258[30 + arg1].unk_01E = 0; + player->unk_258[30 + arg1].unk_01C = 0; + player->unk_258[30 + arg1].unk_012 = 0; } - if (arg0->unk_258[30 + arg1].unk_01E >= 5) { - arg0->unk_258[30 + arg1].unk_03E -= 20; - if (arg0->unk_258[30 + arg1].unk_03E <= 0) { - arg0->unk_258[30 + arg1].unk_03E = 0; + if (player->unk_258[30 + arg1].unk_01E >= 5) { + player->unk_258[30 + arg1].unk_03E -= 20; + if (player->unk_258[30 + arg1].unk_03E <= 0) { + player->unk_258[30 + arg1].unk_03E = 0; } } } -void func_80064DEC(Player* arg0, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { +void func_80064DEC(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_000[1] = arg0->pos[1]; - ++arg0->unk_258[20 + arg3].unk_01E; + player->unk_258[20 + arg3].unk_000[1] = player->pos[1]; + ++player->unk_258[20 + arg3].unk_01E; - if (arg0->unk_258[20 + arg3].unk_01E == 9) { - arg0->unk_0B6 &= ~0x0040; - arg0->unk_258[20 + arg3].unk_01C = 0; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_012 = 0; + if (player->unk_258[20 + arg3].unk_01E == 9) { + player->unk_0B6 &= ~0x0040; + player->unk_258[20 + arg3].unk_01C = 0; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_012 = 0; } - arg0->unk_258[20 + arg3].unk_00C += D_800EE758; - if (arg0->unk_258[20 + arg3].unk_00C >= (f64) 2.5) { - arg0->unk_258[20 + arg3].unk_00C = 2.5f; + player->unk_258[20 + arg3].unk_00C += D_800EE758; + if (player->unk_258[20 + arg3].unk_00C >= (f64) 2.5) { + player->unk_258[20 + arg3].unk_00C = 2.5f; } } -void func_80064EA4(Player* arg0, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { - ++arg0->unk_258[20 + arg3].unk_01E; - if (arg0->unk_258[20 + arg3].unk_01E < 4) { - arg0->unk_258[20 + arg3].unk_00C += D_800EE760; - if (arg0->unk_258[20 + arg3].unk_00C >= 3.5) { - arg0->unk_258[20 + arg3].unk_00C = 3.5f; +void func_80064EA4(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { + ++player->unk_258[20 + arg3].unk_01E; + if (player->unk_258[20 + arg3].unk_01E < 4) { + player->unk_258[20 + arg3].unk_00C += D_800EE760; + if (player->unk_258[20 + arg3].unk_00C >= 3.5) { + player->unk_258[20 + arg3].unk_00C = 3.5f; } } else { - arg0->unk_258[20 + arg3].unk_00C -= D_800EE768; - if (arg0->unk_258[20 + arg3].unk_00C <= 0.0f) { - arg0->unk_0B6 &= ~0x1000; - arg0->unk_258[20 + arg3].unk_01C = 0; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_012 = 0; + player->unk_258[20 + arg3].unk_00C -= D_800EE768; + if (player->unk_258[20 + arg3].unk_00C <= 0.0f) { + player->unk_0B6 &= ~0x1000; + player->unk_258[20 + arg3].unk_01C = 0; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_012 = 0; } } } -void func_80064F88(Player* arg0, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { - ++arg0->unk_258[20 + arg3].unk_01E; - arg0->unk_258[20 + arg3].unk_00C += D_800EE770; +void func_80064F88(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { + ++player->unk_258[20 + arg3].unk_01E; + player->unk_258[20 + arg3].unk_00C += D_800EE770; - if (D_800EE778 <= arg0->unk_258[20 + arg3].unk_00C) { - arg0->unk_258[20 + arg3].unk_00C = D_800EE780; + if (D_800EE778 <= player->unk_258[20 + arg3].unk_00C) { + player->unk_258[20 + arg3].unk_00C = D_800EE780; } - if (arg0->unk_258[20 + arg3].unk_01E >= 12) { - arg0->unk_0B6 &= ~0x0800; - arg0->unk_258[20 + arg3].unk_01C = 0; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_012 = 0; + if (player->unk_258[20 + arg3].unk_01E >= 12) { + player->unk_0B6 &= ~0x0800; + player->unk_258[20 + arg3].unk_01C = 0; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_012 = 0; } } -void func_80065030(Player* arg0, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { - ++arg0->unk_258[20 + arg3].unk_01E; +void func_80065030(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { + ++player->unk_258[20 + arg3].unk_01E; - arg0->unk_258[20 + arg3].unk_000[1] += D_800EE788; - arg0->unk_258[20 + arg3].unk_00C += D_800EE790; - if (arg0->unk_258[20 + arg3].unk_00C >= (f64) 1.5) { - arg0->unk_258[20 + arg3].unk_00C = 1.5f; + player->unk_258[20 + arg3].unk_000[1] += D_800EE788; + player->unk_258[20 + arg3].unk_00C += D_800EE790; + if (player->unk_258[20 + arg3].unk_00C >= (f64) 1.5) { + player->unk_258[20 + arg3].unk_00C = 1.5f; } - if (arg0->unk_258[20 + arg3].unk_01E >= 12) { - arg0->unk_0B6 &= ~0x0100; - arg0->unk_258[20 + arg3].unk_01C = 0; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_012 = 0; + if (player->unk_258[20 + arg3].unk_01E >= 12) { + player->unk_0B6 &= ~0x0100; + player->unk_258[20 + arg3].unk_01C = 0; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_012 = 0; } } -void func_800650FC(Player* arg0, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { - arg0->unk_258[20 + arg3].unk_000[2] = (f32) arg0->pos[2]; - arg0->unk_258[20 + arg3].unk_000[0] = (f32) arg0->pos[0]; - arg0->unk_258[20 + arg3].unk_000[1] = (f32) (arg0->pos[1] + 4.0f); - if ((arg0->unk_0BC & 0x80) == 0x80) { - arg0->unk_258[20 + arg3].unk_020 += 4732; +void func_800650FC(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { + player->unk_258[20 + arg3].unk_000[2] = (f32) player->pos[2]; + player->unk_258[20 + arg3].unk_000[0] = (f32) player->pos[0]; + player->unk_258[20 + arg3].unk_000[1] = (f32) (player->pos[1] + 4.0f); + if ((player->unk_0BC & 0x80) == 0x80) { + player->unk_258[20 + arg3].unk_020 += 4732; } else { - arg0->unk_258[20 + arg3].unk_020 -= 4732; + player->unk_258[20 + arg3].unk_020 -= 4732; } - if (((arg0->unk_0BC & 0x80) != 0x80) && ((arg0->unk_0BC & 0x40) != 0x40)) { - arg0->unk_258[20 + arg3].unk_01C = 0; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_012 = 0; + if (((player->unk_0BC & 0x80) != 0x80) && ((player->unk_0BC & 0x40) != 0x40)) { + player->unk_258[20 + arg3].unk_01C = 0; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_012 = 0; } - arg0->unk_258[20 + arg3].unk_00C += D_800EE798; - if (arg0->unk_258[20 + arg3].unk_00C >= 1.5) { - arg0->unk_258[20 + arg3].unk_00C = 1.5f; + player->unk_258[20 + arg3].unk_00C += D_800EE798; + if (player->unk_258[20 + arg3].unk_00C >= 1.5) { + player->unk_258[20 + arg3].unk_00C = 1.5f; } } -void func_800651F4(Player* arg0, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { - ++arg0->unk_258[20 + arg3].unk_01E; - if (arg0->unk_258[20 + arg3].unk_01E < 8) { - arg0->unk_258[20 + arg3].unk_00C += D_800EE7A0; - if (D_800EE7A8 <= arg0->unk_258[20 + arg3].unk_00C) { - arg0->unk_258[20 + arg3].unk_00C = D_800EE7B0; +void func_800651F4(Player* player, UNUSED s16 arg1, UNUSED s8 arg2, s8 arg3) { + ++player->unk_258[20 + arg3].unk_01E; + if (player->unk_258[20 + arg3].unk_01E < 8) { + player->unk_258[20 + arg3].unk_00C += D_800EE7A0; + if (D_800EE7A8 <= player->unk_258[20 + arg3].unk_00C) { + player->unk_258[20 + arg3].unk_00C = D_800EE7B0; } } else { - arg0->unk_258[20 + arg3].unk_00C -= D_800EE7B8; - if (arg0->unk_258[20 + arg3].unk_00C <= 0.0f) { - arg0->unk_0B6 &= ~0x0020; - arg0->unk_258[20 + arg3].unk_01C = 0; - arg0->unk_258[20 + arg3].unk_01E = 0; - arg0->unk_258[20 + arg3].unk_012 = 0; + player->unk_258[20 + arg3].unk_00C -= D_800EE7B8; + if (player->unk_258[20 + arg3].unk_00C <= 0.0f) { + player->unk_0B6 &= ~0x0020; + player->unk_258[20 + arg3].unk_01C = 0; + player->unk_258[20 + arg3].unk_01E = 0; + player->unk_258[20 + arg3].unk_012 = 0; } } } @@ -10287,30 +10287,30 @@ void func_8006B974(UNUSED s32 arg0, s8 playerIndex, s8 balloonIndex) { } } -void func_8006B9CC(Player* arg0, s8 arg1) { +void func_8006B9CC(Player* player, s8 arg1) { if (gPlayerBalloonStatus[arg1][0] != 0) { - func_8006A7C0(arg0, 0.0f, 0.0f, arg1, 0); + func_8006A7C0(player, 0.0f, 0.0f, arg1, 0); } if (gPlayerBalloonStatus[arg1][1] != 0) { - func_8006A7C0(arg0, 1.8f, 2.6f, arg1, 1); + func_8006A7C0(player, 1.8f, 2.6f, arg1, 1); } if (gPlayerBalloonStatus[arg1][2] != 0) { - func_8006A7C0(arg0, -1.8f, 2.6f, arg1, 2); + func_8006A7C0(player, -1.8f, 2.6f, arg1, 2); } } -void func_8006BA94(Player* arg0, s8 playerIndex, s8 arg2) { +void func_8006BA94(Player* player, s8 playerIndex, s8 arg2) { if (gPlayerBalloonStatus[playerIndex][0] != BALLOON_STATUS_GONE) { - func_8006AFD0(arg0, playerIndex, 0, arg2); + func_8006AFD0(player, playerIndex, 0, arg2); } if (gPlayerBalloonStatus[playerIndex][1] != BALLOON_STATUS_GONE) { - func_8006AFD0(arg0, playerIndex, 1, arg2); + func_8006AFD0(player, playerIndex, 1, arg2); } if (gPlayerBalloonStatus[playerIndex][2] != BALLOON_STATUS_GONE) { - func_8006AFD0(arg0, playerIndex, 2, arg2); + func_8006AFD0(player, playerIndex, 2, arg2); } } @@ -11339,15 +11339,15 @@ void func_8006D474(void *arg0, s8 arg1, s8 arg2) { GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006D474.s") #endif -void func_8006DC54(Player* arg0, s8 arg1, s8 arg2) { +void func_8006DC54(Player* player, s8 arg1, s8 arg2) { s16 temp_s0; s32 temp_v0; temp_v0 = 8 << (arg2 * 4); - if (temp_v0 == (arg0->unk_002 & temp_v0)) { + if (temp_v0 == (player->unk_002 & temp_v0)) { for (temp_s0 = 0; temp_s0 < 10; ++temp_s0) { - if (arg0->unk_258[temp_s0].unk_012 == 7) { - func_800658A0(arg0, arg1, temp_s0, arg2); + if (player->unk_258[temp_s0].unk_012 == 7) { + func_800658A0(player, arg1, temp_s0, arg2); } } } diff --git a/src/code_8008C1D0.c b/src/code_8008C1D0.c index d5690ed84..d9e46d379 100644 --- a/src/code_8008C1D0.c +++ b/src/code_8008C1D0.c @@ -288,7 +288,7 @@ void func_8008C73C(Player *player, s8 arg1) { } player->unk_0B6 |= 0x80; - player->unk_0C0 = 0; player->unk_07C = 0; player->unk_078 = 0; player->unk_0AE = player->unk_02E; player->unk_0B2 = 2; + player->unk_0C0 = 0; player->unk_07C = 0; player->unk_078 = 0; player->unk_0AE = player->unk_02C[1]; player->unk_0B2 = 2; D_80165190[0][arg1] = 1; D_80165190[1][arg1] = 1; D_80165190[2][arg1] = 1; @@ -312,7 +312,7 @@ void func_8008C8C4(Player* player, s8 arg1) { player->unk_0BC &= ~0x80; player->unk_0BC &= ~0x40; player->unk_0A8 = 0; - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; player->unk_07C = 0; player->unk_0C0 = 0; player->unk_0BC &= ~0x800; @@ -688,7 +688,7 @@ void func_8008D554(Player* player) { void func_8008D570(Player *player, s8 arg1) { func_8008C354(player, arg1); - player->unk_0AE = player->unk_02E; + player->unk_0AE = player->unk_02C[1]; player->unk_0BC |= 0x80000; player->unk_0BC &= ~0x10; player->unk_00C &= ~0x1000; @@ -714,10 +714,10 @@ void func_8008D698(Player* player, s8 arg1) { s16 temp; if (player->unk_0B2 == 0) { - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; temp = 0; } else { - player->unk_02E -= 1820; + player->unk_02C[1] -= 1820; D_8018D920[arg1] -= 1820; temp = ((u16) D_8018D920[arg1] / 1820); } @@ -736,7 +736,7 @@ void func_8008D760(Player* player) { player->unk_0A8 = 0; player->unk_07C = 0; player->unk_0C0 = 0; - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; player->unk_0BC &= 0xFFF7FFFF; player->unk_100 = gKartGravityTable[player->characterId]; player->unk_000 &= 0xFF7F; @@ -745,7 +745,7 @@ void func_8008D760(Player* player) { void func_8008D7B0(Player* player, s8 arg1) { func_8008C354(player, arg1); - player->unk_0AE = player->unk_02E; + player->unk_0AE = player->unk_02C[1]; player->unk_0BC |= 0x800000; player->unk_0BC &= ~0x10; player->unk_00C &= 0xFFFDFFFF; @@ -767,10 +767,10 @@ void func_8008D8B4(Player* player, s8 arg1) { s16 temp; if (player->unk_0B2 == 0) { - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; temp = 0; } else { - player->unk_02E -= 1820; + player->unk_02C[1] -= 1820; D_8018D920[arg1] -= 1820; temp = ((u16) (D_8018D920[arg1]) / 1820); } @@ -789,7 +789,7 @@ void func_8008D97C(Player *player) { player->unk_0A8 = 0; player->unk_07C = 0; player->unk_0C0 = 0; - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; player->unk_0BC &= 0xFF7FFFFF; player->unk_100 = gKartGravityTable[player->characterId]; } @@ -964,7 +964,7 @@ void func_8008DF98(Player* player, s8 arg1) { player->unk_0B0 = 0; player->unk_224 = 1.0f; D_8018D930[arg1] = gCourseTimer; - player->unk_0AE = player->unk_02E; + player->unk_0AE = player->unk_02C[1]; player->unk_0B2 = 2; player->unk_0C0 = 0; player->unk_07C = 0; @@ -1087,7 +1087,7 @@ void func_8008E3C0(Player* player, UNUSED s8 arg1) { player->unk_0BC |= 0x08000000; if ((player->unk_0BC & 0x20000) == 0x20000) { - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; } player->unk_0BC &= ~0x20000; @@ -1400,7 +1400,7 @@ void func_8008F0E8(Player* player) { void func_8008F104(Player* player, s8 arg1) { func_8008C354(player, arg1); - player->unk_0AE = player->unk_02E; + player->unk_0AE = player->unk_02C[1]; player->unk_0B2 = 2; player->unk_0C0 = 0; player->unk_07C = 0; @@ -1419,7 +1419,7 @@ void func_8008F1B8(Player* player, s8 arg1) { player->unk_08C = (player->unk_210 * D_800EF5A8); if (player->unk_0B2 < 0) { if ((player->unk_044 & 0x80) == 0x80) { - player->unk_02E += 182; + player->unk_02C[1] += 182; D_8018D920[arg1] += 182; temp = ((u16) D_8018D920[arg1] / 182); @@ -1430,7 +1430,7 @@ void func_8008F1B8(Player* player, s8 arg1) { } } else { - player->unk_02E -= 182; + player->unk_02C[1] -= 182; D_8018D920[arg1] -= 182; temp = ((u16) D_8018D920[arg1] / 182); if (temp == 180) { @@ -1441,7 +1441,7 @@ void func_8008F1B8(Player* player, s8 arg1) { } } else { if ((player->unk_0B2 & 1) != 0) { - player->unk_02E -= 364; + player->unk_02C[1] -= 364; D_8018D920[arg1] -= 364; temp = ((u16) D_8018D920[arg1] / 364); if (temp < 71) { @@ -1451,7 +1451,7 @@ void func_8008F1B8(Player* player, s8 arg1) { player->unk_044 &= ~0x40; return; } - player->unk_02E += 364; + player->unk_02C[1] += 364; D_8018D920[arg1] += 364; temp = ((u16) D_8018D920[arg1] / 364); if (temp >= 110) { @@ -2055,7 +2055,7 @@ void func_80090778(Player* player) { player->unk_0A8 = 0; player->unk_07C = 0; player->unk_0C0 = 0; - player->unk_02E = player->unk_0AE; + player->unk_02C[1] = player->unk_0AE; } func_8008E3C0(player, playerIndex); } @@ -2353,7 +2353,7 @@ GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_800910E4.s") void func_800911B4(Player* player, s8 arg1) { s32 temp_v0; - player->unk_0AE = player->unk_02E; + player->unk_0AE = player->unk_02C[1]; player->unk_044 |= 0x1800; player->unk_044 &= ~0x0400; player->unk_044 |= 0x2000; diff --git a/src/crash_screen.c b/src/crash_screen.c index 7d42e3f86..72b2cad31 100644 --- a/src/crash_screen.c +++ b/src/crash_screen.c @@ -2,44 +2,12 @@ #include #include "types.h" -/*void *__osGetCurrFaultedThread(); // extern -? osCreateMesgQueue(? *, ? *, ?); // extern -? osCreateThread(? *, ?, void (*)(s32 arg0), ?, ? *, s32); // extern -? osRecvMesg(? *, ? *, ?); // extern -? osSetEventMesg(?, ? *, ?); // extern -? osStartThread(? *); // extern -? osViSwapBuffer(s32); // extern -? osWritebackDCacheAll(s32, s32, s16, s16); // extern -? read_controllers(); // extern -void crash_screen_draw_info(uint_ptr arg0, void *arg1); // static -void crash_screen_draw_square(uint_ptr arg0); // static -void create_debug_thread(); // static -void func_800040C0(s32 arg0, s32 arg1, s32 arg2, u32 arg3); // static -void crash_screen_set_framebuffer(s32 arg0); // static -void *get_faulted_thread(); // static -void start_debug_thread(); // static -void thread9_crash_screen(s32 arg0); // static -extern void *gControllerOne; -extern s32 sCounter; - -extern ? sCrashScreenButtonSequence; -extern ? D_80162790; -extern ? D_80162D40; -extern ? D_80162D58; -extern uintptr_t pFramebuffer; -extern s32 buttonSequenceIndex; -extern void *D_80162D64; -*/ - - - OSThread D_80162790; ALIGNED8 u8 gDebugThreadStack[0x400]; OSMesgQueue D_80162D40; OSMesg D_80162D58; uintptr_t pFramebuffer; s32 sButtonSequenceIndex; -//void *D_80162D64; #define DRAW_CODE 0xFFFF #define CHARACTER_DASH 16 @@ -50,8 +18,6 @@ extern void read_controllers(); extern struct Controller *gControllerOne; -//s32 shift = 0; - s32 sCounter = 0; u8 crashScreenFont[][8] = { @@ -83,11 +49,13 @@ void crash_screen_draw_glyph(u16 *framebuffer, s32 x, s32 y, s32 glyph) { } } +// Functionally Equivallent. At least, visually equivallent. #ifdef NON_MATCHING //generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de +// 0xRGBA (I think A maybe not). #define WHITE_COLOUR 0xFFFF -#define RED_COLOUR 0xF801 +#define RED_COLOUR 0xF801 /** * The big mismatch is the handling of the '6' used in the if statement @@ -98,25 +66,38 @@ void crash_screen_draw_glyph(u16 *framebuffer, s32 x, s32 y, s32 glyph) { * 5 different registers instead of just re-using one * There's some stack related differences too, maybe that's related? **/ -void crash_screen_draw_square(u16 *framebuffer) { - s32 var_s0; - s32 var_s2; - s32 row; - s32 column; +void crash_screen_draw_square(u16 *framebuffer) +{ + // s32 new_var; - for (var_s0 = 0x2E, var_s2 = 0x28; var_s0 > 0x2C; var_s0--, var_s2++) { - for (row = var_s2; row < var_s0; row++) { - for (column = var_s2; column < var_s0; column++) { - if ((var_s0 - var_s2) == 6) { - framebuffer[(row * 320) + column] = RED_COLOUR; - } else { - framebuffer[(row * 320) + column] = WHITE_COLOUR; - } - } - } + s32 var_s0; + s32 var_s2; + s32 var_s3; + s32 row; + s32 column; + s32 i; + var_s0 = 0x2E; + var_s2 = 0x28; + var_s3 = 0x2C; + // new_var = i; + // for (i = 0; i < 2; i++) + do // (var_s0 = 0x2E; var_s0 != 0x2C; var_s0--) + { + row = 0x2E - i; + for (row = var_s2; row < var_s0; row++) + { + for (column = var_s2; column < var_s0; column++) + { + framebuffer[row * 320 + column] = i == 0 ? 0xF801 : 0xFFFF; + } } - osWritebackDCacheAll(); - osViSwapBuffer(framebuffer); + var_s0--; + var_s2 = 6 + i; + + } while(var_s0 != var_s3); + + osWritebackDCacheAll(); + osViSwapBuffer(framebuffer); } #else GLOBAL_ASM("asm/non_matchings/crash_screen/crash_screen_draw_square.s") @@ -133,6 +114,10 @@ GLOBAL_ASM("asm/non_matchings/crash_screen/crash_screen_draw_square.s") * @param framebuffer * @param faulted thread **/ + +// 0xRGBA +#define BLACK_COLOUR 0x0001 + void crash_screen_draw_info(u16 *framebuffer, OSThread *thread) { __OSThreadContext *context = &thread->context; s32 i, j, x, y, h; @@ -150,7 +135,7 @@ void crash_screen_draw_info(u16 *framebuffer, OSThread *thread) { for (i = 0; i < 16; i++) { for (j = 0; j < 120; j++) { // Set pixels to black - framebuffer[((i + math) * 320) + (j + 100)] = 0x0001; + framebuffer[((i + math) * 320) + (j + 100)] = BLACK_COLOUR; } } } @@ -230,7 +215,7 @@ void thread9_crash_screen(UNUSED void *arg0) while (1) { osRecvMesg(&D_80162D40, &mesg, 1); thread = get_faulted_thread(); - + if (thread) { // Run only on the first iteration. if (sCounter == 0) { diff --git a/src/framebuffers.h b/src/framebuffers.h index be06506cf..42515e3a7 100644 --- a/src/framebuffers.h +++ b/src/framebuffers.h @@ -4,8 +4,8 @@ #include #include "config.h" -extern u8 gRandomSeed16[22768]; -extern u8 D_802BFB80[77824]; +extern u16 gRandomSeed16; +extern u8 D_802BFB80[2][2][0x8000]; extern u8 D_802D2B80[32768]; extern u8 D_802DAB80[20480]; extern u8 D_802DFB80[2][2][18688]; diff --git a/src/main.c b/src/main.c index b5f25963b..9b2b84743 100644 --- a/src/main.c +++ b/src/main.c @@ -133,17 +133,17 @@ u16 D_80152308; UNUSED OSThread paddingThread; OSThread gIdleThread; -ALIGNED8 u8 gIdleThreadStack[0x2000]; // Based on sm64 and padding between bss symbols. +ALIGNED8 u8 gIdleThreadStack[STACKSIZE]; // Based on sm64 and padding between bss symbols. OSThread gVideoThread; -ALIGNED8 u8 gVideoThreadStack[0x2000]; -OSThread D_80156820; -ALIGNED8 u8 D_8015680_Stack[0x2000]; +ALIGNED8 u8 gVideoThreadStack[STACKSIZE]; +UNUSED OSThread D_80156820; +UNUSED ALIGNED8 u8 D_8015680_Stack[STACKSIZE]; OSThread gGameLoopThread; -ALIGNED8 u8 gGameLoopThreadStack[0x2000]; +ALIGNED8 u8 gGameLoopThreadStack[STACKSIZE]; OSThread gAudioThread; -ALIGNED8 u8 gAudioThreadStack[0x2000]; -OSThread D_8015CD30; -ALIGNED8 u8 D_8015CD30_Stack[0x1000]; +ALIGNED8 u8 gAudioThreadStack[STACKSIZE]; +UNUSED OSThread D_8015CD30; +UNUSED ALIGNED8 u8 D_8015CD30_Stack[STACKSIZE / 2]; u8 gGfxSPTaskYieldBuffer[4352]; u32 gGfxSPTaskStack[256]; diff --git a/src/math_util.c b/src/math_util.c index c76959e7d..2e2367047 100644 --- a/src/math_util.c +++ b/src/math_util.c @@ -3,6 +3,7 @@ #include #include #include +#include "framebuffers.h" // Location based from sm64. // This may need to be moved before framebuffers.c // If math_util has data that does not line-up with trig_tables. @@ -1189,7 +1190,7 @@ UNUSED s16 func_802B7D28(f32 arg0) { return func_802B79B8(sqrtf(1.0 - (f64)(arg0 * arg0)), arg0) * 32768.0f / 3.141592653589793; } -extern u16 gRandomSeed16; +//extern u16 gRandomSeed16; u16 random_u16(void) { u16 temp1, temp2; diff --git a/src/math_util_2.c b/src/math_util_2.c index c7d2ade71..b5bf241b8 100644 --- a/src/math_util_2.c +++ b/src/math_util_2.c @@ -627,7 +627,7 @@ void func_80041EF4(void) { } extern s32 D_8018D120; -void func_80022180(Mtx*, Mat4); +//void func_80022180(Mtx*, Mat4); UNUSED void func_80041F54(s32 arg0, s32 arg1) { Mat4 matrix; diff --git a/src/profiler.c b/src/profiler.c index c3d5cc636..05b7fd424 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -111,7 +111,10 @@ void draw_reference_profiler_bars(void) { gDPFillRectangle(gDisplayListHead++, 177, 220, 226, 222); } -void func_80003AFC(void) { +/** + * Likely identical to sm64 but in mk64 they likely commented it out. + */ +void draw_profiler_mode_1(void) { } diff --git a/src/spawn_players.c b/src/spawn_players.c index d159d8812..46b10717b 100644 --- a/src/spawn_players.c +++ b/src/spawn_players.c @@ -3,6 +3,7 @@ #include "kart_attributes.h" #include "memory.h" #include "waypoints.h" +#include "framebuffers.h" extern s16 D_80165560[]; extern s32* D_800E3C50[]; @@ -61,7 +62,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4, D_80164510[playerIndex] = ret; - player->unk_02C = 0; + player->unk_02C[0] = 0; player->rotZ = arg3; player->unk_05C = 1.0f; player->unk_058 = 0.0f; @@ -69,8 +70,8 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4, 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_02C[1] = arg5; + player->unk_02C[2] = 0; player->unk_0FA = 0; player->unk_002 = 0; @@ -303,8 +304,8 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4, if (gModeSelection == BATTLE) { func_8006B7E4(player, playerIndex); } - func_802B6540(player->unk_150, player->unk_058, player->unk_05C, player->unk_060, player->unk_02E); - func_802B6540(player->unk_174, player->unk_058, player->unk_05C, player->unk_060, player->unk_02E); + func_802B6540(player->unk_150, player->unk_058, player->unk_05C, player->unk_060, player->unk_02C[1]); + func_802B6540(player->unk_174, player->unk_058, player->unk_05C, player->unk_060, player->unk_02C[1]); } void func_80039AE4(void) { @@ -1020,12 +1021,13 @@ void func_8003CD98(Player *player, struct Camera *camera, s8 arg2, s8 arg3) { func_80027A20(player, arg2, arg3, 0); func_80027A20(player, arg2, arg3, 1); func_80027040(player, arg2, arg3, arg3, 0); - mio0decode((u8*)&D_802DFB80[arg3][arg2], (u8*)&D_802BFB80[arg3][arg2]); // [0x8000][0x1000] + // mio0decode((u8*)&D_802DFB80[arg3][arg2], (u8*)&D_802BFB80[arg3][arg2]); // [0x8000][0x1000] + mio0decode((u8*)&D_802DFB80[0][0][(arg3 * 0x4900) + (arg2 * 0x920)], (u8*)&D_802BFB80[0][0][(arg3 << 0xF) + (arg2 << 0xC)]); } else { func_80027A20(player, arg2, arg3, 0); func_80027A20(player, arg2, arg3, 1); func_80027040(player, (s8) (arg2 + 4), arg3, (s8) (arg3 - 2), 0); - mio0decode((u8*)&D_802DFB80[arg3][arg2] - 0x6D80, (u8*)&D_802BFB80[arg3][arg2] + 0xFFFF4000); + mio0decode((u8*)&D_802DFB80[0][0][(arg3 * 0x4900) + (arg2 * 0x920)] - 0x6D80, (u8*)&D_802BFB80[0][0][(arg3 << 0xF) + (arg2 << 0xC)] + 0xFFFF4000); } D_801650D0[arg3][arg2] = player->unk_244[arg3]; @@ -1052,18 +1054,18 @@ void func_8003D080(void) { switch (gModeSelection) { case 0: if (gCurrentCourseId == 10) { - func_8001C4D0(0.0f, ptr->pos[1], D_8016524C, ptr->unk_02E, 8, 0); + func_8001C4D0(0.0f, ptr->pos[1], D_8016524C, ptr->unk_02C[1], 8, 0); } else { - func_8001C4D0((D_80165210[7] + D_80165210[6]) / 2, ptr->pos[1], D_8016524C, ptr->unk_02E, 8, 0); + func_8001C4D0((D_80165210[7] + D_80165210[6]) / 2, ptr->pos[1], D_8016524C, ptr->unk_02C[1], 8, 0); } break; case 1: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0); break; default: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 10, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 10, 0); break; } break; @@ -1072,45 +1074,45 @@ void func_8003D080(void) { case 2: switch (gModeSelection) { case 0: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 1); break; case 3: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 1); break; default: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 1); break; } break; case 3: if (gModeSelection == 3) { - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 1); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 2); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 2); if (gPlayerCountSelection1 == 4) { ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 3); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 9, 3); } } else { - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 1); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 2); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 2); if (gPlayerCountSelection1 == 4) { ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 3); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 1, 3); } } break; @@ -1118,24 +1120,24 @@ void func_8003D080(void) { } else { switch (gActiveScreenMode) { case 0: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 0); break; case 1: case 2: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 1); break; case 3: - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 0); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 0); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 1); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 1); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 2); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 2); ptr++; - func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 3); + func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02C[1], 3, 3); break; } } @@ -1197,8 +1199,8 @@ void func_8003DB5C(void) { Player *player = gPlayerOne; s32 i; - func_8001C4D0(player->pos[0], player->pos[1], player->pos[2], player->unk_02E, 3, 0); - func_8001C4D0(player->pos[0], player->pos[1], player->pos[2], player->unk_02E, 3, 1); + func_8001C4D0(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 0); + func_8001C4D0(player->pos[0], player->pos[1], player->pos[2], player->unk_02C[1], 3, 1); for (i = 0; i < 8; i++, player++) { func_80027A20(player, i, 1, 0);