diff --git a/asm/non_matchings/code_800431B0/func_80043A84.s b/asm/non_matchings/code_800431B0/func_80043A84.s deleted file mode 100644 index 72143973c..000000000 --- a/asm/non_matchings/code_800431B0/func_80043A84.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_80043A84 -/* 044684 80043A84 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 044688 80043A88 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 04468C 80043A8C 8C620000 */ lw $v0, ($v1) -/* 044690 80043A90 3C0FFD18 */ lui $t7, 0xfd18 -/* 044694 80043A94 3C190708 */ lui $t9, (0x07080200 >> 16) # lui $t9, 0x708 -/* 044698 80043A98 244E0008 */ addiu $t6, $v0, 8 -/* 04469C 80043A9C AC6E0000 */ sw $t6, ($v1) -/* 0446A0 80043AA0 AC440004 */ sw $a0, 4($v0) -/* 0446A4 80043AA4 AC4F0000 */ sw $t7, ($v0) -/* 0446A8 80043AA8 8C620000 */ lw $v0, ($v1) -/* 0446AC 80043AAC 3C08F518 */ lui $t0, 0xf518 -/* 0446B0 80043AB0 37390200 */ ori $t9, (0x07080200 & 0xFFFF) # ori $t9, $t9, 0x200 -/* 0446B4 80043AB4 24580008 */ addiu $t8, $v0, 8 -/* 0446B8 80043AB8 AC780000 */ sw $t8, ($v1) -/* 0446BC 80043ABC 00A60019 */ multu $a1, $a2 -/* 0446C0 80043AC0 AC590004 */ sw $t9, 4($v0) -/* 0446C4 80043AC4 AC480000 */ sw $t0, ($v0) -/* 0446C8 80043AC8 8C6B0000 */ lw $t3, ($v1) -/* 0446CC 80043ACC 3C0FE600 */ lui $t7, 0xe600 -/* 0446D0 80043AD0 3C19F300 */ lui $t9, 0xf300 -/* 0446D4 80043AD4 256E0008 */ addiu $t6, $t3, 8 -/* 0446D8 80043AD8 AC6E0000 */ sw $t6, ($v1) -/* 0446DC 80043ADC AD600004 */ sw $zero, 4($t3) -/* 0446E0 80043AE0 AD6F0000 */ sw $t7, ($t3) -/* 0446E4 80043AE4 8C670000 */ lw $a3, ($v1) -/* 0446E8 80043AE8 00006012 */ mflo $t4 -/* 0446EC 80043AEC 258CFFFF */ addiu $t4, $t4, -1 -/* 0446F0 80043AF0 24F80008 */ addiu $t8, $a3, 8 -/* 0446F4 80043AF4 AC780000 */ sw $t8, ($v1) -/* 0446F8 80043AF8 298107FF */ slti $at, $t4, 0x7ff -/* 0446FC 80043AFC 10200003 */ beqz $at, .L80043B0C -/* 044700 80043B00 ACF90000 */ sw $t9, ($a3) -/* 044704 80043B04 10000002 */ b .L80043B10 -/* 044708 80043B08 01802025 */ move $a0, $t4 -.L80043B0C: -/* 04470C 80043B0C 240407FF */ li $a0, 2047 -.L80043B10: -/* 044710 80043B10 00051080 */ sll $v0, $a1, 2 -/* 044714 80043B14 04410003 */ bgez $v0, .L80043B24 -/* 044718 80043B18 000270C3 */ sra $t6, $v0, 3 -/* 04471C 80043B1C 24410007 */ addiu $at, $v0, 7 -/* 044720 80043B20 000170C3 */ sra $t6, $at, 3 -.L80043B24: -/* 044724 80043B24 1DC00003 */ bgtz $t6, .L80043B34 -/* 044728 80043B28 01C01025 */ move $v0, $t6 -/* 04472C 80043B2C 10000002 */ b .L80043B38 -/* 044730 80043B30 24090001 */ li $t1, 1 -.L80043B34: -/* 044734 80043B34 00404825 */ move $t1, $v0 -.L80043B38: -/* 044738 80043B38 1C400003 */ bgtz $v0, .L80043B48 -/* 04473C 80043B3C 252F07FF */ addiu $t7, $t1, 0x7ff -/* 044740 80043B40 10000002 */ b .L80043B4C -/* 044744 80043B44 240A0001 */ li $t2, 1 -.L80043B48: -/* 044748 80043B48 00405025 */ move $t2, $v0 -.L80043B4C: -/* 04474C 80043B4C 01EA001A */ div $zero, $t7, $t2 -/* 044750 80043B50 15400002 */ bnez $t2, .L80043B5C -/* 044754 80043B54 00000000 */ nop -/* 044758 80043B58 0007000D */ break 7 -.L80043B5C: -/* 04475C 80043B5C 2401FFFF */ li $at, -1 -/* 044760 80043B60 15410004 */ bne $t2, $at, .L80043B74 -/* 044764 80043B64 3C018000 */ lui $at, 0x8000 -/* 044768 80043B68 15E10002 */ bne $t7, $at, .L80043B74 -/* 04476C 80043B6C 00000000 */ nop -/* 044770 80043B70 0006000D */ break 6 -.L80043B74: -/* 044774 80043B74 0000C012 */ mflo $t8 -/* 044778 80043B78 33190FFF */ andi $t9, $t8, 0xfff -/* 04477C 80043B7C 3C010700 */ lui $at, 0x700 -/* 044780 80043B80 308F0FFF */ andi $t7, $a0, 0xfff -/* 044784 80043B84 000FC300 */ sll $t8, $t7, 0xc -/* 044788 80043B88 03217025 */ or $t6, $t9, $at -/* 04478C 80043B8C 01D8C825 */ or $t9, $t6, $t8 -/* 044790 80043B90 ACF90004 */ sw $t9, 4($a3) -/* 044794 80043B94 8C620000 */ lw $v0, ($v1) -/* 044798 80043B98 3C0EE700 */ lui $t6, 0xe700 -/* 04479C 80043B9C 0005C840 */ sll $t9, $a1, 1 -/* 0447A0 80043BA0 244F0008 */ addiu $t7, $v0, 8 -/* 0447A4 80043BA4 AC6F0000 */ sw $t7, ($v1) -/* 0447A8 80043BA8 AC400004 */ sw $zero, 4($v0) -/* 0447AC 80043BAC AC4E0000 */ sw $t6, ($v0) -/* 0447B0 80043BB0 00405825 */ move $t3, $v0 -/* 0447B4 80043BB4 8C620000 */ lw $v0, ($v1) -/* 0447B8 80043BB8 272F0007 */ addiu $t7, $t9, 7 -/* 0447BC 80043BBC 000F70C3 */ sra $t6, $t7, 3 -/* 0447C0 80043BC0 24580008 */ addiu $t8, $v0, 8 -/* 0447C4 80043BC4 AC780000 */ sw $t8, ($v1) -/* 0447C8 80043BC8 31D801FF */ andi $t8, $t6, 0x1ff -/* 0447CC 80043BCC 0018CA40 */ sll $t9, $t8, 9 -/* 0447D0 80043BD0 3C0E0008 */ lui $t6, (0x00080200 >> 16) # lui $t6, 8 -/* 0447D4 80043BD4 35CE0200 */ ori $t6, (0x00080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 0447D8 80043BD8 03287825 */ or $t7, $t9, $t0 -/* 0447DC 80043BDC AC4F0000 */ sw $t7, ($v0) -/* 0447E0 80043BE0 AC4E0004 */ sw $t6, 4($v0) -/* 0447E4 80043BE4 00406025 */ move $t4, $v0 -/* 0447E8 80043BE8 8C620000 */ lw $v0, ($v1) -/* 0447EC 80043BEC 24AFFFFF */ addiu $t7, $a1, -1 -/* 0447F0 80043BF0 000F7080 */ sll $t6, $t7, 2 -/* 0447F4 80043BF4 24580008 */ addiu $t8, $v0, 8 -/* 0447F8 80043BF8 AC780000 */ sw $t8, ($v1) -/* 0447FC 80043BFC 31D80FFF */ andi $t8, $t6, 0xfff -/* 044800 80043C00 3C19F200 */ lui $t9, 0xf200 -/* 044804 80043C04 24CFFFFF */ addiu $t7, $a2, -1 -/* 044808 80043C08 AC590000 */ sw $t9, ($v0) -/* 04480C 80043C0C 0018CB00 */ sll $t9, $t8, 0xc -/* 044810 80043C10 000F7080 */ sll $t6, $t7, 2 -/* 044814 80043C14 31D80FFF */ andi $t8, $t6, 0xfff -/* 044818 80043C18 03387825 */ or $t7, $t9, $t8 -/* 04481C 80043C1C AC4F0004 */ sw $t7, 4($v0) -/* 044820 80043C20 03E00008 */ jr $ra -/* 044824 80043C24 00406825 */ move $t5, $v0 diff --git a/asm/non_matchings/code_800431B0/func_80043D50.s b/asm/non_matchings/code_800431B0/func_80043D50.s deleted file mode 100644 index 6fbe3903b..000000000 --- a/asm/non_matchings/code_800431B0/func_80043D50.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_80043D50 -/* 044950 80043D50 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 044954 80043D54 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 044958 80043D58 8C620000 */ lw $v0, ($v1) -/* 04495C 80043D5C 3C0FFD10 */ lui $t7, 0xfd10 -/* 044960 80043D60 3C19070C */ lui $t9, (0x070C0300 >> 16) # lui $t9, 0x70c -/* 044964 80043D64 244E0008 */ addiu $t6, $v0, 8 -/* 044968 80043D68 AC6E0000 */ sw $t6, ($v1) -/* 04496C 80043D6C AC440004 */ sw $a0, 4($v0) -/* 044970 80043D70 AC4F0000 */ sw $t7, ($v0) -/* 044974 80043D74 8C620000 */ lw $v0, ($v1) -/* 044978 80043D78 3C08F510 */ lui $t0, 0xf510 -/* 04497C 80043D7C 37390300 */ ori $t9, (0x070C0300 & 0xFFFF) # ori $t9, $t9, 0x300 -/* 044980 80043D80 24580008 */ addiu $t8, $v0, 8 -/* 044984 80043D84 AC780000 */ sw $t8, ($v1) -/* 044988 80043D88 00A60019 */ multu $a1, $a2 -/* 04498C 80043D8C AC590004 */ sw $t9, 4($v0) -/* 044990 80043D90 AC480000 */ sw $t0, ($v0) -/* 044994 80043D94 8C620000 */ lw $v0, ($v1) -/* 044998 80043D98 3C0FE600 */ lui $t7, 0xe600 -/* 04499C 80043D9C 3C19F300 */ lui $t9, 0xf300 -/* 0449A0 80043DA0 244E0008 */ addiu $t6, $v0, 8 -/* 0449A4 80043DA4 AC6E0000 */ sw $t6, ($v1) -/* 0449A8 80043DA8 AC400004 */ sw $zero, 4($v0) -/* 0449AC 80043DAC AC4F0000 */ sw $t7, ($v0) -/* 0449B0 80043DB0 8C670000 */ lw $a3, ($v1) -/* 0449B4 80043DB4 00006012 */ mflo $t4 -/* 0449B8 80043DB8 258CFFFF */ addiu $t4, $t4, -1 -/* 0449BC 80043DBC 24F80008 */ addiu $t8, $a3, 8 -/* 0449C0 80043DC0 AC780000 */ sw $t8, ($v1) -/* 0449C4 80043DC4 298107FF */ slti $at, $t4, 0x7ff -/* 0449C8 80043DC8 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0449CC 80043DCC 10200003 */ beqz $at, .L80043DDC -/* 0449D0 80043DD0 ACF90000 */ sw $t9, ($a3) -/* 0449D4 80043DD4 10000002 */ b .L80043DE0 -/* 0449D8 80043DD8 01802025 */ move $a0, $t4 -.L80043DDC: -/* 0449DC 80043DDC 240407FF */ li $a0, 2047 -.L80043DE0: -/* 0449E0 80043DE0 00054840 */ sll $t1, $a1, 1 -/* 0449E4 80043DE4 05210003 */ bgez $t1, .L80043DF4 -/* 0449E8 80043DE8 000910C3 */ sra $v0, $t1, 3 -/* 0449EC 80043DEC 25210007 */ addiu $at, $t1, 7 -/* 0449F0 80043DF0 000110C3 */ sra $v0, $at, 3 -.L80043DF4: -/* 0449F4 80043DF4 1C400003 */ bgtz $v0, .L80043E04 -/* 0449F8 80043DF8 00405025 */ move $t2, $v0 -/* 0449FC 80043DFC 10000001 */ b .L80043E04 -/* 044A00 80043E00 240A0001 */ li $t2, 1 -.L80043E04: -/* 044A04 80043E04 1C400003 */ bgtz $v0, .L80043E14 -/* 044A08 80043E08 254E07FF */ addiu $t6, $t2, 0x7ff -/* 044A0C 80043E0C 10000002 */ b .L80043E18 -/* 044A10 80043E10 240B0001 */ li $t3, 1 -.L80043E14: -/* 044A14 80043E14 00405825 */ move $t3, $v0 -.L80043E18: -/* 044A18 80043E18 01CB001A */ div $zero, $t6, $t3 -/* 044A1C 80043E1C 15600002 */ bnez $t3, .L80043E28 -/* 044A20 80043E20 00000000 */ nop -/* 044A24 80043E24 0007000D */ break 7 -.L80043E28: -/* 044A28 80043E28 2401FFFF */ li $at, -1 -/* 044A2C 80043E2C 15610004 */ bne $t3, $at, .L80043E40 -/* 044A30 80043E30 3C018000 */ lui $at, 0x8000 -/* 044A34 80043E34 15C10002 */ bne $t6, $at, .L80043E40 -/* 044A38 80043E38 00000000 */ nop -/* 044A3C 80043E3C 0006000D */ break 6 -.L80043E40: -/* 044A40 80043E40 00007812 */ mflo $t7 -/* 044A44 80043E44 31F80FFF */ andi $t8, $t7, 0xfff -/* 044A48 80043E48 3C010700 */ lui $at, 0x700 -/* 044A4C 80043E4C 308E0FFF */ andi $t6, $a0, 0xfff -/* 044A50 80043E50 000E7B00 */ sll $t7, $t6, 0xc -/* 044A54 80043E54 0301C825 */ or $t9, $t8, $at -/* 044A58 80043E58 032FC025 */ or $t8, $t9, $t7 -/* 044A5C 80043E5C ACF80004 */ sw $t8, 4($a3) -/* 044A60 80043E60 8C620000 */ lw $v0, ($v1) -/* 044A64 80043E64 3C19E700 */ lui $t9, 0xe700 -/* 044A68 80043E68 25380007 */ addiu $t8, $t1, 7 -/* 044A6C 80043E6C 244E0008 */ addiu $t6, $v0, 8 -/* 044A70 80043E70 AC6E0000 */ sw $t6, ($v1) -/* 044A74 80043E74 AC400004 */ sw $zero, 4($v0) -/* 044A78 80043E78 AC590000 */ sw $t9, ($v0) -/* 044A7C 80043E7C 00406025 */ move $t4, $v0 -/* 044A80 80043E80 8C620000 */ lw $v0, ($v1) -/* 044A84 80043E84 001870C3 */ sra $t6, $t8, 3 -/* 044A88 80043E88 31D901FF */ andi $t9, $t6, 0x1ff -/* 044A8C 80043E8C 244F0008 */ addiu $t7, $v0, 8 -/* 044A90 80043E90 AC6F0000 */ sw $t7, ($v1) -/* 044A94 80043E94 00197A40 */ sll $t7, $t9, 9 -/* 044A98 80043E98 3C0E000C */ lui $t6, (0x000C0300 >> 16) # lui $t6, 0xc -/* 044A9C 80043E9C 35CE0300 */ ori $t6, (0x000C0300 & 0xFFFF) # ori $t6, $t6, 0x300 -/* 044AA0 80043EA0 01E8C025 */ or $t8, $t7, $t0 -/* 044AA4 80043EA4 AC580000 */ sw $t8, ($v0) -/* 044AA8 80043EA8 AC4E0004 */ sw $t6, 4($v0) -/* 044AAC 80043EAC 00406825 */ move $t5, $v0 -/* 044AB0 80043EB0 8C620000 */ lw $v0, ($v1) -/* 044AB4 80043EB4 24AEFFFF */ addiu $t6, $a1, -1 -/* 044AB8 80043EB8 3C0FF200 */ lui $t7, 0xf200 -/* 044ABC 80043EBC 24590008 */ addiu $t9, $v0, 8 -/* 044AC0 80043EC0 AC790000 */ sw $t9, ($v1) -/* 044AC4 80043EC4 AFA20004 */ sw $v0, 4($sp) -/* 044AC8 80043EC8 000EC880 */ sll $t9, $t6, 2 -/* 044ACC 80043ECC AC4F0000 */ sw $t7, ($v0) -/* 044AD0 80043ED0 332F0FFF */ andi $t7, $t9, 0xfff -/* 044AD4 80043ED4 000F7300 */ sll $t6, $t7, 0xc -/* 044AD8 80043ED8 24D9FFFF */ addiu $t9, $a2, -1 -/* 044ADC 80043EDC 00197880 */ sll $t7, $t9, 2 -/* 044AE0 80043EE0 31F90FFF */ andi $t9, $t7, 0xfff -/* 044AE4 80043EE4 01D97825 */ or $t7, $t6, $t9 -/* 044AE8 80043EE8 27BD0020 */ addiu $sp, $sp, 0x20 -/* 044AEC 80043EEC AC4F0004 */ sw $t7, 4($v0) -/* 044AF0 80043EF0 03E00008 */ jr $ra -/* 044AF4 80043EF4 0040C025 */ move $t8, $v0 diff --git a/asm/non_matchings/code_800431B0/func_80043EF8.s b/asm/non_matchings/code_800431B0/func_80043EF8.s deleted file mode 100644 index 20f1117c9..000000000 --- a/asm/non_matchings/code_800431B0/func_80043EF8.s +++ /dev/null @@ -1,121 +0,0 @@ -glabel func_80043EF8 -/* 044AF8 80043EF8 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 044AFC 80043EFC 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 044B00 80043F00 8C620000 */ lw $v0, ($v1) -/* 044B04 80043F04 3C0FFD10 */ lui $t7, 0xfd10 -/* 044B08 80043F08 30E8000F */ andi $t0, $a3, 0xf -/* 044B0C 80043F0C 244E0008 */ addiu $t6, $v0, 8 -/* 044B10 80043F10 AC6E0000 */ sw $t6, ($v1) -/* 044B14 80043F14 AC440004 */ sw $a0, 4($v0) -/* 044B18 80043F18 AC4F0000 */ sw $t7, ($v0) -/* 044B1C 80043F1C 8C620000 */ lw $v0, ($v1) -/* 044B20 80043F20 3C010708 */ lui $at, (0x07080100 >> 16) # lui $at, 0x708 -/* 044B24 80043F24 34210100 */ ori $at, (0x07080100 & 0xFFFF) # ori $at, $at, 0x100 -/* 044B28 80043F28 24580008 */ addiu $t8, $v0, 8 -/* 044B2C 80043F2C AC780000 */ sw $t8, ($v1) -/* 044B30 80043F30 0008C900 */ sll $t9, $t0, 4 -/* 044B34 80043F34 3C0AF510 */ lui $t2, 0xf510 -/* 044B38 80043F38 03217025 */ or $t6, $t9, $at -/* 044B3C 80043F3C AC4E0004 */ sw $t6, 4($v0) -/* 044B40 80043F40 AC4A0000 */ sw $t2, ($v0) -/* 044B44 80043F44 00A60019 */ multu $a1, $a2 -/* 044B48 80043F48 8C6D0000 */ lw $t5, ($v1) -/* 044B4C 80043F4C 3C18E600 */ lui $t8, 0xe600 -/* 044B50 80043F50 03204025 */ move $t0, $t9 -/* 044B54 80043F54 25AF0008 */ addiu $t7, $t5, 8 -/* 044B58 80043F58 AC6F0000 */ sw $t7, ($v1) -/* 044B5C 80043F5C ADA00004 */ sw $zero, 4($t5) -/* 044B60 80043F60 ADB80000 */ sw $t8, ($t5) -/* 044B64 80043F64 8C690000 */ lw $t1, ($v1) -/* 044B68 80043F68 3C0EF300 */ lui $t6, 0xf300 -/* 044B6C 80043F6C 00007812 */ mflo $t7 -/* 044B70 80043F70 25390008 */ addiu $t9, $t1, 8 -/* 044B74 80043F74 AC790000 */ sw $t9, ($v1) -/* 044B78 80043F78 25F8FFFF */ addiu $t8, $t7, -1 -/* 044B7C 80043F7C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 044B80 80043F80 2B0107FF */ slti $at, $t8, 0x7ff -/* 044B84 80043F84 AD2E0000 */ sw $t6, ($t1) -/* 044B88 80043F88 10200003 */ beqz $at, .L80043F98 -/* 044B8C 80043F8C AFB80000 */ sw $t8, ($sp) -/* 044B90 80043F90 10000002 */ b .L80043F9C -/* 044B94 80043F94 03002025 */ move $a0, $t8 -.L80043F98: -/* 044B98 80043F98 240407FF */ li $a0, 2047 -.L80043F9C: -/* 044B9C 80043F9C 00053840 */ sll $a3, $a1, 1 -/* 044BA0 80043FA0 04E10003 */ bgez $a3, .L80043FB0 -/* 044BA4 80043FA4 000710C3 */ sra $v0, $a3, 3 -/* 044BA8 80043FA8 24E10007 */ addiu $at, $a3, 7 -/* 044BAC 80043FAC 000110C3 */ sra $v0, $at, 3 -.L80043FB0: -/* 044BB0 80043FB0 1C400003 */ bgtz $v0, .L80043FC0 -/* 044BB4 80043FB4 00405825 */ move $t3, $v0 -/* 044BB8 80043FB8 10000001 */ b .L80043FC0 -/* 044BBC 80043FBC 240B0001 */ li $t3, 1 -.L80043FC0: -/* 044BC0 80043FC0 1C400003 */ bgtz $v0, .L80043FD0 -/* 044BC4 80043FC4 257907FF */ addiu $t9, $t3, 0x7ff -/* 044BC8 80043FC8 10000002 */ b .L80043FD4 -/* 044BCC 80043FCC 240C0001 */ li $t4, 1 -.L80043FD0: -/* 044BD0 80043FD0 00406025 */ move $t4, $v0 -.L80043FD4: -/* 044BD4 80043FD4 032C001A */ div $zero, $t9, $t4 -/* 044BD8 80043FD8 15800002 */ bnez $t4, .L80043FE4 -/* 044BDC 80043FDC 00000000 */ nop -/* 044BE0 80043FE0 0007000D */ break 7 -.L80043FE4: -/* 044BE4 80043FE4 2401FFFF */ li $at, -1 -/* 044BE8 80043FE8 15810004 */ bne $t4, $at, .L80043FFC -/* 044BEC 80043FEC 3C018000 */ lui $at, 0x8000 -/* 044BF0 80043FF0 17210002 */ bne $t9, $at, .L80043FFC -/* 044BF4 80043FF4 00000000 */ nop -/* 044BF8 80043FF8 0006000D */ break 6 -.L80043FFC: -/* 044BFC 80043FFC 00007012 */ mflo $t6 -/* 044C00 80044000 31CF0FFF */ andi $t7, $t6, 0xfff -/* 044C04 80044004 3C010700 */ lui $at, 0x700 -/* 044C08 80044008 30990FFF */ andi $t9, $a0, 0xfff -/* 044C0C 8004400C 00197300 */ sll $t6, $t9, 0xc -/* 044C10 80044010 01E1C025 */ or $t8, $t7, $at -/* 044C14 80044014 030E7825 */ or $t7, $t8, $t6 -/* 044C18 80044018 AD2F0004 */ sw $t7, 4($t1) -/* 044C1C 8004401C 8C620000 */ lw $v0, ($v1) -/* 044C20 80044020 3C18E700 */ lui $t8, 0xe700 -/* 044C24 80044024 24EF0007 */ addiu $t7, $a3, 7 -/* 044C28 80044028 24590008 */ addiu $t9, $v0, 8 -/* 044C2C 8004402C AC790000 */ sw $t9, ($v1) -/* 044C30 80044030 AC400004 */ sw $zero, 4($v0) -/* 044C34 80044034 AC580000 */ sw $t8, ($v0) -/* 044C38 80044038 00406825 */ move $t5, $v0 -/* 044C3C 8004403C 8C620000 */ lw $v0, ($v1) -/* 044C40 80044040 000FC8C3 */ sra $t9, $t7, 3 -/* 044C44 80044044 333801FF */ andi $t8, $t9, 0x1ff -/* 044C48 80044048 244E0008 */ addiu $t6, $v0, 8 -/* 044C4C 8004404C AC6E0000 */ sw $t6, ($v1) -/* 044C50 80044050 00187240 */ sll $t6, $t8, 9 -/* 044C54 80044054 3C010008 */ lui $at, (0x00080100 >> 16) # lui $at, 8 -/* 044C58 80044058 34210100 */ ori $at, (0x00080100 & 0xFFFF) # ori $at, $at, 0x100 -/* 044C5C 8004405C AFA20018 */ sw $v0, 0x18($sp) -/* 044C60 80044060 0101C025 */ or $t8, $t0, $at -/* 044C64 80044064 01CA7825 */ or $t7, $t6, $t2 -/* 044C68 80044068 AC4F0000 */ sw $t7, ($v0) -/* 044C6C 8004406C AC580004 */ sw $t8, 4($v0) -/* 044C70 80044070 8C620000 */ lw $v0, ($v1) -/* 044C74 80044074 3C0FF200 */ lui $t7, 0xf200 -/* 044C78 80044078 24B9FFFF */ addiu $t9, $a1, -1 -/* 044C7C 8004407C 244E0008 */ addiu $t6, $v0, 8 -/* 044C80 80044080 AC6E0000 */ sw $t6, ($v1) -/* 044C84 80044084 AFA20014 */ sw $v0, 0x14($sp) -/* 044C88 80044088 00197080 */ sll $t6, $t9, 2 -/* 044C8C 8004408C AC4F0000 */ sw $t7, ($v0) -/* 044C90 80044090 31CF0FFF */ andi $t7, $t6, 0xfff -/* 044C94 80044094 000FCB00 */ sll $t9, $t7, 0xc -/* 044C98 80044098 24CEFFFF */ addiu $t6, $a2, -1 -/* 044C9C 8004409C 000E7880 */ sll $t7, $t6, 2 -/* 044CA0 800440A0 31EE0FFF */ andi $t6, $t7, 0xfff -/* 044CA4 800440A4 032E7825 */ or $t7, $t9, $t6 -/* 044CA8 800440A8 27BD0030 */ addiu $sp, $sp, 0x30 -/* 044CAC 800440AC AC4F0004 */ sw $t7, 4($v0) -/* 044CB0 800440B0 03E00008 */ jr $ra -/* 044CB4 800440B4 0040C025 */ move $t8, $v0 diff --git a/asm/non_matchings/code_800431B0/func_800441E0.s b/asm/non_matchings/code_800431B0/func_800441E0.s deleted file mode 100644 index f82ce8b13..000000000 --- a/asm/non_matchings/code_800431B0/func_800441E0.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_800441E0 -/* 044DE0 800441E0 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 044DE4 800441E4 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 044DE8 800441E8 8C620000 */ lw $v0, ($v1) -/* 044DEC 800441EC 3C0FFD70 */ lui $t7, 0xfd70 -/* 044DF0 800441F0 3C190708 */ lui $t9, (0x07080200 >> 16) # lui $t9, 0x708 -/* 044DF4 800441F4 244E0008 */ addiu $t6, $v0, 8 -/* 044DF8 800441F8 AC6E0000 */ sw $t6, ($v1) -/* 044DFC 800441FC AC440004 */ sw $a0, 4($v0) -/* 044E00 80044200 AC4F0000 */ sw $t7, ($v0) -/* 044E04 80044204 8C620000 */ lw $v0, ($v1) -/* 044E08 80044208 3C08F570 */ lui $t0, 0xf570 -/* 044E0C 8004420C 37390200 */ ori $t9, (0x07080200 & 0xFFFF) # ori $t9, $t9, 0x200 -/* 044E10 80044210 24580008 */ addiu $t8, $v0, 8 -/* 044E14 80044214 AC780000 */ sw $t8, ($v1) -/* 044E18 80044218 00A60019 */ multu $a1, $a2 -/* 044E1C 8004421C AC590004 */ sw $t9, 4($v0) -/* 044E20 80044220 AC480000 */ sw $t0, ($v0) -/* 044E24 80044224 8C620000 */ lw $v0, ($v1) -/* 044E28 80044228 3C0FE600 */ lui $t7, 0xe600 -/* 044E2C 8004422C 3C19F300 */ lui $t9, 0xf300 -/* 044E30 80044230 244E0008 */ addiu $t6, $v0, 8 -/* 044E34 80044234 AC6E0000 */ sw $t6, ($v1) -/* 044E38 80044238 AC400004 */ sw $zero, 4($v0) -/* 044E3C 8004423C AC4F0000 */ sw $t7, ($v0) -/* 044E40 80044240 8C670000 */ lw $a3, ($v1) -/* 044E44 80044244 00006012 */ mflo $t4 -/* 044E48 80044248 258CFFFF */ addiu $t4, $t4, -1 -/* 044E4C 8004424C 24F80008 */ addiu $t8, $a3, 8 -/* 044E50 80044250 AC780000 */ sw $t8, ($v1) -/* 044E54 80044254 298107FF */ slti $at, $t4, 0x7ff -/* 044E58 80044258 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 044E5C 8004425C 10200003 */ beqz $at, .L8004426C -/* 044E60 80044260 ACF90000 */ sw $t9, ($a3) -/* 044E64 80044264 10000002 */ b .L80044270 -/* 044E68 80044268 01802025 */ move $a0, $t4 -.L8004426C: -/* 044E6C 8004426C 240407FF */ li $a0, 2047 -.L80044270: -/* 044E70 80044270 00054840 */ sll $t1, $a1, 1 -/* 044E74 80044274 05210003 */ bgez $t1, .L80044284 -/* 044E78 80044278 000910C3 */ sra $v0, $t1, 3 -/* 044E7C 8004427C 25210007 */ addiu $at, $t1, 7 -/* 044E80 80044280 000110C3 */ sra $v0, $at, 3 -.L80044284: -/* 044E84 80044284 1C400003 */ bgtz $v0, .L80044294 -/* 044E88 80044288 00405025 */ move $t2, $v0 -/* 044E8C 8004428C 10000001 */ b .L80044294 -/* 044E90 80044290 240A0001 */ li $t2, 1 -.L80044294: -/* 044E94 80044294 1C400003 */ bgtz $v0, .L800442A4 -/* 044E98 80044298 254E07FF */ addiu $t6, $t2, 0x7ff -/* 044E9C 8004429C 10000002 */ b .L800442A8 -/* 044EA0 800442A0 240B0001 */ li $t3, 1 -.L800442A4: -/* 044EA4 800442A4 00405825 */ move $t3, $v0 -.L800442A8: -/* 044EA8 800442A8 01CB001A */ div $zero, $t6, $t3 -/* 044EAC 800442AC 15600002 */ bnez $t3, .L800442B8 -/* 044EB0 800442B0 00000000 */ nop -/* 044EB4 800442B4 0007000D */ break 7 -.L800442B8: -/* 044EB8 800442B8 2401FFFF */ li $at, -1 -/* 044EBC 800442BC 15610004 */ bne $t3, $at, .L800442D0 -/* 044EC0 800442C0 3C018000 */ lui $at, 0x8000 -/* 044EC4 800442C4 15C10002 */ bne $t6, $at, .L800442D0 -/* 044EC8 800442C8 00000000 */ nop -/* 044ECC 800442CC 0006000D */ break 6 -.L800442D0: -/* 044ED0 800442D0 00007812 */ mflo $t7 -/* 044ED4 800442D4 31F80FFF */ andi $t8, $t7, 0xfff -/* 044ED8 800442D8 3C010700 */ lui $at, 0x700 -/* 044EDC 800442DC 308E0FFF */ andi $t6, $a0, 0xfff -/* 044EE0 800442E0 000E7B00 */ sll $t7, $t6, 0xc -/* 044EE4 800442E4 0301C825 */ or $t9, $t8, $at -/* 044EE8 800442E8 032FC025 */ or $t8, $t9, $t7 -/* 044EEC 800442EC ACF80004 */ sw $t8, 4($a3) -/* 044EF0 800442F0 8C620000 */ lw $v0, ($v1) -/* 044EF4 800442F4 3C19E700 */ lui $t9, 0xe700 -/* 044EF8 800442F8 25380007 */ addiu $t8, $t1, 7 -/* 044EFC 800442FC 244E0008 */ addiu $t6, $v0, 8 -/* 044F00 80044300 AC6E0000 */ sw $t6, ($v1) -/* 044F04 80044304 AC400004 */ sw $zero, 4($v0) -/* 044F08 80044308 AC590000 */ sw $t9, ($v0) -/* 044F0C 8004430C 00406025 */ move $t4, $v0 -/* 044F10 80044310 8C620000 */ lw $v0, ($v1) -/* 044F14 80044314 001870C3 */ sra $t6, $t8, 3 -/* 044F18 80044318 31D901FF */ andi $t9, $t6, 0x1ff -/* 044F1C 8004431C 244F0008 */ addiu $t7, $v0, 8 -/* 044F20 80044320 AC6F0000 */ sw $t7, ($v1) -/* 044F24 80044324 00197A40 */ sll $t7, $t9, 9 -/* 044F28 80044328 3C0E0008 */ lui $t6, (0x00080200 >> 16) # lui $t6, 8 -/* 044F2C 8004432C 35CE0200 */ ori $t6, (0x00080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 044F30 80044330 01E8C025 */ or $t8, $t7, $t0 -/* 044F34 80044334 AC580000 */ sw $t8, ($v0) -/* 044F38 80044338 AC4E0004 */ sw $t6, 4($v0) -/* 044F3C 8004433C 00406825 */ move $t5, $v0 -/* 044F40 80044340 8C620000 */ lw $v0, ($v1) -/* 044F44 80044344 24AEFFFF */ addiu $t6, $a1, -1 -/* 044F48 80044348 3C0FF200 */ lui $t7, 0xf200 -/* 044F4C 8004434C 24590008 */ addiu $t9, $v0, 8 -/* 044F50 80044350 AC790000 */ sw $t9, ($v1) -/* 044F54 80044354 AFA20004 */ sw $v0, 4($sp) -/* 044F58 80044358 000EC880 */ sll $t9, $t6, 2 -/* 044F5C 8004435C AC4F0000 */ sw $t7, ($v0) -/* 044F60 80044360 332F0FFF */ andi $t7, $t9, 0xfff -/* 044F64 80044364 000F7300 */ sll $t6, $t7, 0xc -/* 044F68 80044368 24D9FFFF */ addiu $t9, $a2, -1 -/* 044F6C 8004436C 00197880 */ sll $t7, $t9, 2 -/* 044F70 80044370 31F90FFF */ andi $t9, $t7, 0xfff -/* 044F74 80044374 01D97825 */ or $t7, $t6, $t9 -/* 044F78 80044378 27BD0020 */ addiu $sp, $sp, 0x20 -/* 044F7C 8004437C AC4F0004 */ sw $t7, 4($v0) -/* 044F80 80044380 03E00008 */ jr $ra -/* 044F84 80044384 0040C025 */ move $t8, $v0 diff --git a/asm/non_matchings/code_800431B0/func_800444B0.s b/asm/non_matchings/code_800431B0/func_800444B0.s deleted file mode 100644 index 314ceb769..000000000 --- a/asm/non_matchings/code_800431B0/func_800444B0.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_800444B0 -/* 0450B0 800444B0 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 0450B4 800444B4 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 0450B8 800444B8 8C620000 */ lw $v0, ($v1) -/* 0450BC 800444BC 3C0FFD70 */ lui $t7, 0xfd70 -/* 0450C0 800444C0 00A60019 */ multu $a1, $a2 -/* 0450C4 800444C4 244E0008 */ addiu $t6, $v0, 8 -/* 0450C8 800444C8 AC6E0000 */ sw $t6, ($v1) -/* 0450CC 800444CC AC440004 */ sw $a0, 4($v0) -/* 0450D0 800444D0 AC4F0000 */ sw $t7, ($v0) -/* 0450D4 800444D4 8C620000 */ lw $v0, ($v1) -/* 0450D8 800444D8 3C0E0708 */ lui $t6, (0x07080200 >> 16) # lui $t6, 0x708 -/* 0450DC 800444DC 35CE0200 */ ori $t6, (0x07080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 0450E0 800444E0 24580008 */ addiu $t8, $v0, 8 -/* 0450E4 800444E4 AC780000 */ sw $t8, ($v1) -/* 0450E8 800444E8 3C19F570 */ lui $t9, 0xf570 -/* 0450EC 800444EC AC590000 */ sw $t9, ($v0) -/* 0450F0 800444F0 AC4E0004 */ sw $t6, 4($v0) -/* 0450F4 800444F4 8C620000 */ lw $v0, ($v1) -/* 0450F8 800444F8 3C18E600 */ lui $t8, 0xe600 -/* 0450FC 800444FC 00005812 */ mflo $t3 -/* 045100 80044500 244F0008 */ addiu $t7, $v0, 8 -/* 045104 80044504 AC6F0000 */ sw $t7, ($v1) -/* 045108 80044508 AC400004 */ sw $zero, 4($v0) -/* 04510C 8004450C AC580000 */ sw $t8, ($v0) -/* 045110 80044510 8C670000 */ lw $a3, ($v1) -/* 045114 80044514 256B0001 */ addiu $t3, $t3, 1 -/* 045118 80044518 000B7843 */ sra $t7, $t3, 1 -/* 04511C 8004451C 25EBFFFF */ addiu $t3, $t7, -1 -/* 045120 80044520 24F90008 */ addiu $t9, $a3, 8 -/* 045124 80044524 AC790000 */ sw $t9, ($v1) -/* 045128 80044528 296107FF */ slti $at, $t3, 0x7ff -/* 04512C 8004452C 3C0EF300 */ lui $t6, 0xf300 -/* 045130 80044530 10200003 */ beqz $at, .L80044540 -/* 045134 80044534 ACEE0000 */ sw $t6, ($a3) -/* 045138 80044538 10000002 */ b .L80044544 -/* 04513C 8004453C 01602025 */ move $a0, $t3 -.L80044540: -/* 045140 80044540 240407FF */ li $a0, 2047 -.L80044544: -/* 045144 80044544 00A04025 */ move $t0, $a1 -/* 045148 80044548 05010003 */ bgez $t0, .L80044558 -/* 04514C 8004454C 000810C3 */ sra $v0, $t0, 3 -/* 045150 80044550 25010007 */ addiu $at, $t0, 7 -/* 045154 80044554 000110C3 */ sra $v0, $at, 3 -.L80044558: -/* 045158 80044558 1C400003 */ bgtz $v0, .L80044568 -/* 04515C 8004455C 00404825 */ move $t1, $v0 -/* 045160 80044560 10000001 */ b .L80044568 -/* 045164 80044564 24090001 */ li $t1, 1 -.L80044568: -/* 045168 80044568 1C400003 */ bgtz $v0, .L80044578 -/* 04516C 8004456C 253807FF */ addiu $t8, $t1, 0x7ff -/* 045170 80044570 10000002 */ b .L8004457C -/* 045174 80044574 240A0001 */ li $t2, 1 -.L80044578: -/* 045178 80044578 00405025 */ move $t2, $v0 -.L8004457C: -/* 04517C 8004457C 030A001A */ div $zero, $t8, $t2 -/* 045180 80044580 15400002 */ bnez $t2, .L8004458C -/* 045184 80044584 00000000 */ nop -/* 045188 80044588 0007000D */ break 7 -.L8004458C: -/* 04518C 8004458C 2401FFFF */ li $at, -1 -/* 045190 80044590 15410004 */ bne $t2, $at, .L800445A4 -/* 045194 80044594 3C018000 */ lui $at, 0x8000 -/* 045198 80044598 17010002 */ bne $t8, $at, .L800445A4 -/* 04519C 8004459C 00000000 */ nop -/* 0451A0 800445A0 0006000D */ break 6 -.L800445A4: -/* 0451A4 800445A4 0000C812 */ mflo $t9 -/* 0451A8 800445A8 332E0FFF */ andi $t6, $t9, 0xfff -/* 0451AC 800445AC 3C010700 */ lui $at, 0x700 -/* 0451B0 800445B0 30980FFF */ andi $t8, $a0, 0xfff -/* 0451B4 800445B4 0018CB00 */ sll $t9, $t8, 0xc -/* 0451B8 800445B8 01C17825 */ or $t7, $t6, $at -/* 0451BC 800445BC 01F97025 */ or $t6, $t7, $t9 -/* 0451C0 800445C0 ACEE0004 */ sw $t6, 4($a3) -/* 0451C4 800445C4 8C620000 */ lw $v0, ($v1) -/* 0451C8 800445C8 3C0FE700 */ lui $t7, 0xe700 -/* 0451CC 800445CC 250E0007 */ addiu $t6, $t0, 7 -/* 0451D0 800445D0 24580008 */ addiu $t8, $v0, 8 -/* 0451D4 800445D4 AC780000 */ sw $t8, ($v1) -/* 0451D8 800445D8 AC400004 */ sw $zero, 4($v0) -/* 0451DC 800445DC AC4F0000 */ sw $t7, ($v0) -/* 0451E0 800445E0 00405825 */ move $t3, $v0 -/* 0451E4 800445E4 8C620000 */ lw $v0, ($v1) -/* 0451E8 800445E8 000EC0C3 */ sra $t8, $t6, 3 -/* 0451EC 800445EC 330F01FF */ andi $t7, $t8, 0x1ff -/* 0451F0 800445F0 24590008 */ addiu $t9, $v0, 8 -/* 0451F4 800445F4 AC790000 */ sw $t9, ($v1) -/* 0451F8 800445F8 000FCA40 */ sll $t9, $t7, 9 -/* 0451FC 800445FC 3C180008 */ lui $t8, (0x00080200 >> 16) # lui $t8, 8 -/* 045200 80044600 3C01F568 */ lui $at, 0xf568 -/* 045204 80044604 03217025 */ or $t6, $t9, $at -/* 045208 80044608 37180200 */ ori $t8, (0x00080200 & 0xFFFF) # ori $t8, $t8, 0x200 -/* 04520C 8004460C AC580004 */ sw $t8, 4($v0) -/* 045210 80044610 AC4E0000 */ sw $t6, ($v0) -/* 045214 80044614 00406025 */ move $t4, $v0 -/* 045218 80044618 8C620000 */ lw $v0, ($v1) -/* 04521C 8004461C 24AEFFFF */ addiu $t6, $a1, -1 -/* 045220 80044620 000EC080 */ sll $t8, $t6, 2 -/* 045224 80044624 244F0008 */ addiu $t7, $v0, 8 -/* 045228 80044628 AC6F0000 */ sw $t7, ($v1) -/* 04522C 8004462C 330F0FFF */ andi $t7, $t8, 0xfff -/* 045230 80044630 3C19F200 */ lui $t9, 0xf200 -/* 045234 80044634 24CEFFFF */ addiu $t6, $a2, -1 -/* 045238 80044638 AC590000 */ sw $t9, ($v0) -/* 04523C 8004463C 000FCB00 */ sll $t9, $t7, 0xc -/* 045240 80044640 000EC080 */ sll $t8, $t6, 2 -/* 045244 80044644 330F0FFF */ andi $t7, $t8, 0xfff -/* 045248 80044648 032F7025 */ or $t6, $t9, $t7 -/* 04524C 8004464C AC4E0004 */ sw $t6, 4($v0) -/* 045250 80044650 03E00008 */ jr $ra -/* 045254 80044654 00406825 */ move $t5, $v0 diff --git a/asm/non_matchings/code_800431B0/func_8004477C.s b/asm/non_matchings/code_800431B0/func_8004477C.s deleted file mode 100644 index 279b50781..000000000 --- a/asm/non_matchings/code_800431B0/func_8004477C.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_8004477C -/* 04537C 8004477C 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 045380 80044780 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 045384 80044784 8C620000 */ lw $v0, ($v1) -/* 045388 80044788 3C0FFD90 */ lui $t7, 0xfd90 -/* 04538C 8004478C 00A60019 */ multu $a1, $a2 -/* 045390 80044790 244E0008 */ addiu $t6, $v0, 8 -/* 045394 80044794 AC6E0000 */ sw $t6, ($v1) -/* 045398 80044798 AC440004 */ sw $a0, 4($v0) -/* 04539C 8004479C AC4F0000 */ sw $t7, ($v0) -/* 0453A0 800447A0 8C620000 */ lw $v0, ($v1) -/* 0453A4 800447A4 3C0E0708 */ lui $t6, (0x07080200 >> 16) # lui $t6, 0x708 -/* 0453A8 800447A8 35CE0200 */ ori $t6, (0x07080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 0453AC 800447AC 24580008 */ addiu $t8, $v0, 8 -/* 0453B0 800447B0 AC780000 */ sw $t8, ($v1) -/* 0453B4 800447B4 3C19F590 */ lui $t9, 0xf590 -/* 0453B8 800447B8 AC590000 */ sw $t9, ($v0) -/* 0453BC 800447BC AC4E0004 */ sw $t6, 4($v0) -/* 0453C0 800447C0 8C620000 */ lw $v0, ($v1) -/* 0453C4 800447C4 3C18E600 */ lui $t8, 0xe600 -/* 0453C8 800447C8 00005812 */ mflo $t3 -/* 0453CC 800447CC 244F0008 */ addiu $t7, $v0, 8 -/* 0453D0 800447D0 AC6F0000 */ sw $t7, ($v1) -/* 0453D4 800447D4 AC400004 */ sw $zero, 4($v0) -/* 0453D8 800447D8 AC580000 */ sw $t8, ($v0) -/* 0453DC 800447DC 8C670000 */ lw $a3, ($v1) -/* 0453E0 800447E0 256B0001 */ addiu $t3, $t3, 1 -/* 0453E4 800447E4 000B7843 */ sra $t7, $t3, 1 -/* 0453E8 800447E8 25EBFFFF */ addiu $t3, $t7, -1 -/* 0453EC 800447EC 24F90008 */ addiu $t9, $a3, 8 -/* 0453F0 800447F0 AC790000 */ sw $t9, ($v1) -/* 0453F4 800447F4 296107FF */ slti $at, $t3, 0x7ff -/* 0453F8 800447F8 3C0EF300 */ lui $t6, 0xf300 -/* 0453FC 800447FC 10200003 */ beqz $at, .L8004480C -/* 045400 80044800 ACEE0000 */ sw $t6, ($a3) -/* 045404 80044804 10000002 */ b .L80044810 -/* 045408 80044808 01602025 */ move $a0, $t3 -.L8004480C: -/* 04540C 8004480C 240407FF */ li $a0, 2047 -.L80044810: -/* 045410 80044810 00A04025 */ move $t0, $a1 -/* 045414 80044814 05010003 */ bgez $t0, .L80044824 -/* 045418 80044818 000810C3 */ sra $v0, $t0, 3 -/* 04541C 8004481C 25010007 */ addiu $at, $t0, 7 -/* 045420 80044820 000110C3 */ sra $v0, $at, 3 -.L80044824: -/* 045424 80044824 1C400003 */ bgtz $v0, .L80044834 -/* 045428 80044828 00404825 */ move $t1, $v0 -/* 04542C 8004482C 10000001 */ b .L80044834 -/* 045430 80044830 24090001 */ li $t1, 1 -.L80044834: -/* 045434 80044834 1C400003 */ bgtz $v0, .L80044844 -/* 045438 80044838 253807FF */ addiu $t8, $t1, 0x7ff -/* 04543C 8004483C 10000002 */ b .L80044848 -/* 045440 80044840 240A0001 */ li $t2, 1 -.L80044844: -/* 045444 80044844 00405025 */ move $t2, $v0 -.L80044848: -/* 045448 80044848 030A001A */ div $zero, $t8, $t2 -/* 04544C 8004484C 15400002 */ bnez $t2, .L80044858 -/* 045450 80044850 00000000 */ nop -/* 045454 80044854 0007000D */ break 7 -.L80044858: -/* 045458 80044858 2401FFFF */ li $at, -1 -/* 04545C 8004485C 15410004 */ bne $t2, $at, .L80044870 -/* 045460 80044860 3C018000 */ lui $at, 0x8000 -/* 045464 80044864 17010002 */ bne $t8, $at, .L80044870 -/* 045468 80044868 00000000 */ nop -/* 04546C 8004486C 0006000D */ break 6 -.L80044870: -/* 045470 80044870 0000C812 */ mflo $t9 -/* 045474 80044874 332E0FFF */ andi $t6, $t9, 0xfff -/* 045478 80044878 3C010700 */ lui $at, 0x700 -/* 04547C 8004487C 30980FFF */ andi $t8, $a0, 0xfff -/* 045480 80044880 0018CB00 */ sll $t9, $t8, 0xc -/* 045484 80044884 01C17825 */ or $t7, $t6, $at -/* 045488 80044888 01F97025 */ or $t6, $t7, $t9 -/* 04548C 8004488C ACEE0004 */ sw $t6, 4($a3) -/* 045490 80044890 8C620000 */ lw $v0, ($v1) -/* 045494 80044894 3C0FE700 */ lui $t7, 0xe700 -/* 045498 80044898 250E0007 */ addiu $t6, $t0, 7 -/* 04549C 8004489C 24580008 */ addiu $t8, $v0, 8 -/* 0454A0 800448A0 AC780000 */ sw $t8, ($v1) -/* 0454A4 800448A4 AC400004 */ sw $zero, 4($v0) -/* 0454A8 800448A8 AC4F0000 */ sw $t7, ($v0) -/* 0454AC 800448AC 00405825 */ move $t3, $v0 -/* 0454B0 800448B0 8C620000 */ lw $v0, ($v1) -/* 0454B4 800448B4 000EC0C3 */ sra $t8, $t6, 3 -/* 0454B8 800448B8 330F01FF */ andi $t7, $t8, 0x1ff -/* 0454BC 800448BC 24590008 */ addiu $t9, $v0, 8 -/* 0454C0 800448C0 AC790000 */ sw $t9, ($v1) -/* 0454C4 800448C4 000FCA40 */ sll $t9, $t7, 9 -/* 0454C8 800448C8 3C180008 */ lui $t8, (0x00080200 >> 16) # lui $t8, 8 -/* 0454CC 800448CC 3C01F588 */ lui $at, 0xf588 -/* 0454D0 800448D0 03217025 */ or $t6, $t9, $at -/* 0454D4 800448D4 37180200 */ ori $t8, (0x00080200 & 0xFFFF) # ori $t8, $t8, 0x200 -/* 0454D8 800448D8 AC580004 */ sw $t8, 4($v0) -/* 0454DC 800448DC AC4E0000 */ sw $t6, ($v0) -/* 0454E0 800448E0 00406025 */ move $t4, $v0 -/* 0454E4 800448E4 8C620000 */ lw $v0, ($v1) -/* 0454E8 800448E8 24AEFFFF */ addiu $t6, $a1, -1 -/* 0454EC 800448EC 000EC080 */ sll $t8, $t6, 2 -/* 0454F0 800448F0 244F0008 */ addiu $t7, $v0, 8 -/* 0454F4 800448F4 AC6F0000 */ sw $t7, ($v1) -/* 0454F8 800448F8 330F0FFF */ andi $t7, $t8, 0xfff -/* 0454FC 800448FC 3C19F200 */ lui $t9, 0xf200 -/* 045500 80044900 24CEFFFF */ addiu $t6, $a2, -1 -/* 045504 80044904 AC590000 */ sw $t9, ($v0) -/* 045508 80044908 000FCB00 */ sll $t9, $t7, 0xc -/* 04550C 8004490C 000EC080 */ sll $t8, $t6, 2 -/* 045510 80044910 330F0FFF */ andi $t7, $t8, 0xfff -/* 045514 80044914 032F7025 */ or $t6, $t9, $t7 -/* 045518 80044918 AC4E0004 */ sw $t6, 4($v0) -/* 04551C 8004491C 03E00008 */ jr $ra -/* 045520 80044920 00406825 */ move $t5, $v0 diff --git a/asm/non_matchings/code_800431B0/func_80044AB8.s b/asm/non_matchings/code_800431B0/func_80044AB8.s deleted file mode 100644 index 6a11d52d6..000000000 --- a/asm/non_matchings/code_800431B0/func_80044AB8.s +++ /dev/null @@ -1,82 +0,0 @@ - -glabel func_80044AB8 -/* 0456B8 80044AB8 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 0456BC 80044ABC 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 0456C0 80044AC0 8C620000 */ lw $v0, ($v1) -/* 0456C4 80044AC4 00054043 */ sra $t0, $a1, 1 -/* 0456C8 80044AC8 250FFFFF */ addiu $t7, $t0, -1 -/* 0456CC 80044ACC 244E0008 */ addiu $t6, $v0, 8 -/* 0456D0 80044AD0 AC6E0000 */ sw $t6, ($v1) -/* 0456D4 80044AD4 31F80FFF */ andi $t8, $t7, 0xfff -/* 0456D8 80044AD8 3C01FD68 */ lui $at, 0xfd68 -/* 0456DC 80044ADC 0301C825 */ or $t9, $t8, $at -/* 0456E0 80044AE0 AC590000 */ sw $t9, ($v0) -/* 0456E4 80044AE4 AC440004 */ sw $a0, 4($v0) -/* 0456E8 80044AE8 8C620000 */ lw $v0, ($v1) -/* 0456EC 80044AEC 250A0007 */ addiu $t2, $t0, 7 -/* 0456F0 80044AF0 000A78C3 */ sra $t7, $t2, 3 -/* 0456F4 80044AF4 31F801FF */ andi $t8, $t7, 0x1ff -/* 0456F8 80044AF8 244E0008 */ addiu $t6, $v0, 8 -/* 0456FC 80044AFC AC6E0000 */ sw $t6, ($v1) -/* 045700 80044B00 00185240 */ sll $t2, $t8, 9 -/* 045704 80044B04 3C0F0708 */ lui $t7, (0x07080200 >> 16) # lui $t7, 0x708 -/* 045708 80044B08 3C01F568 */ lui $at, 0xf568 -/* 04570C 80044B0C 01417025 */ or $t6, $t2, $at -/* 045710 80044B10 35EF0200 */ ori $t7, (0x07080200 & 0xFFFF) # ori $t7, $t7, 0x200 -/* 045714 80044B14 AC4F0004 */ sw $t7, 4($v0) -/* 045718 80044B18 AC4E0000 */ sw $t6, ($v0) -/* 04571C 80044B1C 8C620000 */ lw $v0, ($v1) -/* 045720 80044B20 3C19E600 */ lui $t9, 0xe600 -/* 045724 80044B24 3C0FF400 */ lui $t7, 0xf400 -/* 045728 80044B28 24580008 */ addiu $t8, $v0, 8 -/* 04572C 80044B2C AC780000 */ sw $t8, ($v1) -/* 045730 80044B30 AC400004 */ sw $zero, 4($v0) -/* 045734 80044B34 AC590000 */ sw $t9, ($v0) -/* 045738 80044B38 8C620000 */ lw $v0, ($v1) -/* 04573C 80044B3C 24D8FFFF */ addiu $t8, $a2, -1 -/* 045740 80044B40 0018C880 */ sll $t9, $t8, 2 -/* 045744 80044B44 244E0008 */ addiu $t6, $v0, 8 -/* 045748 80044B48 AC6E0000 */ sw $t6, ($v1) -/* 04574C 80044B4C 24ADFFFF */ addiu $t5, $a1, -1 -/* 045750 80044B50 AC4F0000 */ sw $t7, ($v0) -/* 045754 80044B54 000D7840 */ sll $t7, $t5, 1 -/* 045758 80044B58 31F80FFF */ andi $t8, $t7, 0xfff -/* 04575C 80044B5C 332E0FFF */ andi $t6, $t9, 0xfff -/* 045760 80044B60 0018CB00 */ sll $t9, $t8, 0xc -/* 045764 80044B64 3C010700 */ lui $at, 0x700 -/* 045768 80044B68 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 04576C 80044B6C 03217825 */ or $t7, $t9, $at -/* 045770 80044B70 01EEC025 */ or $t8, $t7, $t6 -/* 045774 80044B74 AFAE0000 */ sw $t6, ($sp) -/* 045778 80044B78 AC580004 */ sw $t8, 4($v0) -/* 04577C 80044B7C 8C620000 */ lw $v0, ($v1) -/* 045780 80044B80 3C0FE700 */ lui $t7, 0xe700 -/* 045784 80044B84 3C0E0008 */ lui $t6, (0x00080200 >> 16) # lui $t6, 8 -/* 045788 80044B88 24590008 */ addiu $t9, $v0, 8 -/* 04578C 80044B8C AC790000 */ sw $t9, ($v1) -/* 045790 80044B90 AFA20014 */ sw $v0, 0x14($sp) -/* 045794 80044B94 AC400004 */ sw $zero, 4($v0) -/* 045798 80044B98 AC4F0000 */ sw $t7, ($v0) -/* 04579C 80044B9C 8C620000 */ lw $v0, ($v1) -/* 0457A0 80044BA0 3C01F560 */ lui $at, 0xf560 -/* 0457A4 80044BA4 0141C825 */ or $t9, $t2, $at -/* 0457A8 80044BA8 24580008 */ addiu $t8, $v0, 8 -/* 0457AC 80044BAC AC780000 */ sw $t8, ($v1) -/* 0457B0 80044BB0 AFA20010 */ sw $v0, 0x10($sp) -/* 0457B4 80044BB4 35CE0200 */ ori $t6, (0x00080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 0457B8 80044BB8 AC4E0004 */ sw $t6, 4($v0) -/* 0457BC 80044BBC AC590000 */ sw $t9, ($v0) -/* 0457C0 80044BC0 8C620000 */ lw $v0, ($v1) -/* 0457C4 80044BC4 3C19F200 */ lui $t9, 0xf200 -/* 0457C8 80044BC8 000D7880 */ sll $t7, $t5, 2 -/* 0457CC 80044BCC 24580008 */ addiu $t8, $v0, 8 -/* 0457D0 80044BD0 AC780000 */ sw $t8, ($v1) -/* 0457D4 80044BD4 AFA2000C */ sw $v0, 0xc($sp) -/* 0457D8 80044BD8 31F80FFF */ andi $t8, $t7, 0xfff -/* 0457DC 80044BDC AC590000 */ sw $t9, ($v0) -/* 0457E0 80044BE0 8FAF0000 */ lw $t7, ($sp) -/* 0457E4 80044BE4 0018CB00 */ sll $t9, $t8, 0xc -/* 0457E8 80044BE8 27BD0028 */ addiu $sp, $sp, 0x28 -/* 0457EC 80044BEC 032FC025 */ or $t8, $t9, $t7 -/* 0457F0 80044BF0 03E00008 */ jr $ra -/* 0457F4 80044BF4 AC580004 */ sw $t8, 4($v0) diff --git a/asm/non_matchings/code_800431B0/func_80044BF8.s b/asm/non_matchings/code_800431B0/func_80044BF8.s deleted file mode 100644 index afa9c927b..000000000 --- a/asm/non_matchings/code_800431B0/func_80044BF8.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_80044BF8 -/* 0457F8 80044BF8 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 0457FC 80044BFC 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 045800 80044C00 8C620000 */ lw $v0, ($v1) -/* 045804 80044C04 3C0FFD90 */ lui $t7, 0xfd90 -/* 045808 80044C08 00A60019 */ multu $a1, $a2 -/* 04580C 80044C0C 244E0008 */ addiu $t6, $v0, 8 -/* 045810 80044C10 AC6E0000 */ sw $t6, ($v1) -/* 045814 80044C14 AC440004 */ sw $a0, 4($v0) -/* 045818 80044C18 AC4F0000 */ sw $t7, ($v0) -/* 04581C 80044C1C 8C620000 */ lw $v0, ($v1) -/* 045820 80044C20 3C0E0708 */ lui $t6, (0x07080200 >> 16) # lui $t6, 0x708 -/* 045824 80044C24 35CE0200 */ ori $t6, (0x07080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 045828 80044C28 24580008 */ addiu $t8, $v0, 8 -/* 04582C 80044C2C AC780000 */ sw $t8, ($v1) -/* 045830 80044C30 3C19F590 */ lui $t9, 0xf590 -/* 045834 80044C34 AC590000 */ sw $t9, ($v0) -/* 045838 80044C38 AC4E0004 */ sw $t6, 4($v0) -/* 04583C 80044C3C 8C620000 */ lw $v0, ($v1) -/* 045840 80044C40 3C18E600 */ lui $t8, 0xe600 -/* 045844 80044C44 00005812 */ mflo $t3 -/* 045848 80044C48 244F0008 */ addiu $t7, $v0, 8 -/* 04584C 80044C4C AC6F0000 */ sw $t7, ($v1) -/* 045850 80044C50 AC400004 */ sw $zero, 4($v0) -/* 045854 80044C54 AC580000 */ sw $t8, ($v0) -/* 045858 80044C58 8C670000 */ lw $a3, ($v1) -/* 04585C 80044C5C 256B0001 */ addiu $t3, $t3, 1 -/* 045860 80044C60 000B7843 */ sra $t7, $t3, 1 -/* 045864 80044C64 25EBFFFF */ addiu $t3, $t7, -1 -/* 045868 80044C68 24F90008 */ addiu $t9, $a3, 8 -/* 04586C 80044C6C AC790000 */ sw $t9, ($v1) -/* 045870 80044C70 296107FF */ slti $at, $t3, 0x7ff -/* 045874 80044C74 3C0EF300 */ lui $t6, 0xf300 -/* 045878 80044C78 10200003 */ beqz $at, .L80044C88 -/* 04587C 80044C7C ACEE0000 */ sw $t6, ($a3) -/* 045880 80044C80 10000002 */ b .L80044C8C -/* 045884 80044C84 01602025 */ move $a0, $t3 -.L80044C88: -/* 045888 80044C88 240407FF */ li $a0, 2047 -.L80044C8C: -/* 04588C 80044C8C 00A04025 */ move $t0, $a1 -/* 045890 80044C90 05010003 */ bgez $t0, .L80044CA0 -/* 045894 80044C94 000810C3 */ sra $v0, $t0, 3 -/* 045898 80044C98 25010007 */ addiu $at, $t0, 7 -/* 04589C 80044C9C 000110C3 */ sra $v0, $at, 3 -.L80044CA0: -/* 0458A0 80044CA0 1C400003 */ bgtz $v0, .L80044CB0 -/* 0458A4 80044CA4 00404825 */ move $t1, $v0 -/* 0458A8 80044CA8 10000001 */ b .L80044CB0 -/* 0458AC 80044CAC 24090001 */ li $t1, 1 -.L80044CB0: -/* 0458B0 80044CB0 1C400003 */ bgtz $v0, .L80044CC0 -/* 0458B4 80044CB4 253807FF */ addiu $t8, $t1, 0x7ff -/* 0458B8 80044CB8 10000002 */ b .L80044CC4 -/* 0458BC 80044CBC 240A0001 */ li $t2, 1 -.L80044CC0: -/* 0458C0 80044CC0 00405025 */ move $t2, $v0 -.L80044CC4: -/* 0458C4 80044CC4 030A001A */ div $zero, $t8, $t2 -/* 0458C8 80044CC8 15400002 */ bnez $t2, .L80044CD4 -/* 0458CC 80044CCC 00000000 */ nop -/* 0458D0 80044CD0 0007000D */ break 7 -.L80044CD4: -/* 0458D4 80044CD4 2401FFFF */ li $at, -1 -/* 0458D8 80044CD8 15410004 */ bne $t2, $at, .L80044CEC -/* 0458DC 80044CDC 3C018000 */ lui $at, 0x8000 -/* 0458E0 80044CE0 17010002 */ bne $t8, $at, .L80044CEC -/* 0458E4 80044CE4 00000000 */ nop -/* 0458E8 80044CE8 0006000D */ break 6 -.L80044CEC: -/* 0458EC 80044CEC 0000C812 */ mflo $t9 -/* 0458F0 80044CF0 332E0FFF */ andi $t6, $t9, 0xfff -/* 0458F4 80044CF4 3C010700 */ lui $at, 0x700 -/* 0458F8 80044CF8 30980FFF */ andi $t8, $a0, 0xfff -/* 0458FC 80044CFC 0018CB00 */ sll $t9, $t8, 0xc -/* 045900 80044D00 01C17825 */ or $t7, $t6, $at -/* 045904 80044D04 01F97025 */ or $t6, $t7, $t9 -/* 045908 80044D08 ACEE0004 */ sw $t6, 4($a3) -/* 04590C 80044D0C 8C620000 */ lw $v0, ($v1) -/* 045910 80044D10 3C0FE700 */ lui $t7, 0xe700 -/* 045914 80044D14 250E0007 */ addiu $t6, $t0, 7 -/* 045918 80044D18 24580008 */ addiu $t8, $v0, 8 -/* 04591C 80044D1C AC780000 */ sw $t8, ($v1) -/* 045920 80044D20 AC400004 */ sw $zero, 4($v0) -/* 045924 80044D24 AC4F0000 */ sw $t7, ($v0) -/* 045928 80044D28 00405825 */ move $t3, $v0 -/* 04592C 80044D2C 8C620000 */ lw $v0, ($v1) -/* 045930 80044D30 000EC0C3 */ sra $t8, $t6, 3 -/* 045934 80044D34 330F01FF */ andi $t7, $t8, 0x1ff -/* 045938 80044D38 24590008 */ addiu $t9, $v0, 8 -/* 04593C 80044D3C AC790000 */ sw $t9, ($v1) -/* 045940 80044D40 000FCA40 */ sll $t9, $t7, 9 -/* 045944 80044D44 3C180008 */ lui $t8, (0x00080200 >> 16) # lui $t8, 8 -/* 045948 80044D48 3C01F588 */ lui $at, 0xf588 -/* 04594C 80044D4C 03217025 */ or $t6, $t9, $at -/* 045950 80044D50 37180200 */ ori $t8, (0x00080200 & 0xFFFF) # ori $t8, $t8, 0x200 -/* 045954 80044D54 AC580004 */ sw $t8, 4($v0) -/* 045958 80044D58 AC4E0000 */ sw $t6, ($v0) -/* 04595C 80044D5C 00406025 */ move $t4, $v0 -/* 045960 80044D60 8C620000 */ lw $v0, ($v1) -/* 045964 80044D64 24AEFFFF */ addiu $t6, $a1, -1 -/* 045968 80044D68 000EC080 */ sll $t8, $t6, 2 -/* 04596C 80044D6C 244F0008 */ addiu $t7, $v0, 8 -/* 045970 80044D70 AC6F0000 */ sw $t7, ($v1) -/* 045974 80044D74 330F0FFF */ andi $t7, $t8, 0xfff -/* 045978 80044D78 3C19F200 */ lui $t9, 0xf200 -/* 04597C 80044D7C 24CEFFFF */ addiu $t6, $a2, -1 -/* 045980 80044D80 AC590000 */ sw $t9, ($v0) -/* 045984 80044D84 000FCB00 */ sll $t9, $t7, 0xc -/* 045988 80044D88 000EC080 */ sll $t8, $t6, 2 -/* 04598C 80044D8C 330F0FFF */ andi $t7, $t8, 0xfff -/* 045990 80044D90 032F7025 */ or $t6, $t9, $t7 -/* 045994 80044D94 AC4E0004 */ sw $t6, 4($v0) -/* 045998 80044D98 03E00008 */ jr $ra -/* 04599C 80044D9C 00406825 */ move $t5, $v0 diff --git a/asm/non_matchings/code_800431B0/func_800452A4.s b/asm/non_matchings/code_800431B0/func_800452A4.s deleted file mode 100644 index 180ec777d..000000000 --- a/asm/non_matchings/code_800431B0/func_800452A4.s +++ /dev/null @@ -1,115 +0,0 @@ -glabel func_800452A4 -/* 045EA4 800452A4 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 045EA8 800452A8 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 045EAC 800452AC 8C620000 */ lw $v0, ($v1) -/* 045EB0 800452B0 3C0FFD50 */ lui $t7, 0xfd50 -/* 045EB4 800452B4 00A60019 */ multu $a1, $a2 -/* 045EB8 800452B8 244E0008 */ addiu $t6, $v0, 8 -/* 045EBC 800452BC AC6E0000 */ sw $t6, ($v1) -/* 045EC0 800452C0 AC440004 */ sw $a0, 4($v0) -/* 045EC4 800452C4 AC4F0000 */ sw $t7, ($v0) -/* 045EC8 800452C8 8C620000 */ lw $v0, ($v1) -/* 045ECC 800452CC 3C0E0708 */ lui $t6, (0x07080200 >> 16) # lui $t6, 0x708 -/* 045ED0 800452D0 35CE0200 */ ori $t6, (0x07080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 045ED4 800452D4 24580008 */ addiu $t8, $v0, 8 -/* 045ED8 800452D8 AC780000 */ sw $t8, ($v1) -/* 045EDC 800452DC 3C19F550 */ lui $t9, 0xf550 -/* 045EE0 800452E0 AC590000 */ sw $t9, ($v0) -/* 045EE4 800452E4 AC4E0004 */ sw $t6, 4($v0) -/* 045EE8 800452E8 8C620000 */ lw $v0, ($v1) -/* 045EEC 800452EC 3C18E600 */ lui $t8, 0xe600 -/* 045EF0 800452F0 00005812 */ mflo $t3 -/* 045EF4 800452F4 244F0008 */ addiu $t7, $v0, 8 -/* 045EF8 800452F8 AC6F0000 */ sw $t7, ($v1) -/* 045EFC 800452FC AC400004 */ sw $zero, 4($v0) -/* 045F00 80045300 AC580000 */ sw $t8, ($v0) -/* 045F04 80045304 8C670000 */ lw $a3, ($v1) -/* 045F08 80045308 256B0001 */ addiu $t3, $t3, 1 -/* 045F0C 8004530C 000B7843 */ sra $t7, $t3, 1 -/* 045F10 80045310 25EBFFFF */ addiu $t3, $t7, -1 -/* 045F14 80045314 24F90008 */ addiu $t9, $a3, 8 -/* 045F18 80045318 AC790000 */ sw $t9, ($v1) -/* 045F1C 8004531C 296107FF */ slti $at, $t3, 0x7ff -/* 045F20 80045320 3C0EF300 */ lui $t6, 0xf300 -/* 045F24 80045324 10200003 */ beqz $at, .L80045334 -/* 045F28 80045328 ACEE0000 */ sw $t6, ($a3) -/* 045F2C 8004532C 10000002 */ b .L80045338 -/* 045F30 80045330 01602025 */ move $a0, $t3 -.L80045334: -/* 045F34 80045334 240407FF */ li $a0, 2047 -.L80045338: -/* 045F38 80045338 00A04025 */ move $t0, $a1 -/* 045F3C 8004533C 05010003 */ bgez $t0, .L8004534C -/* 045F40 80045340 000810C3 */ sra $v0, $t0, 3 -/* 045F44 80045344 25010007 */ addiu $at, $t0, 7 -/* 045F48 80045348 000110C3 */ sra $v0, $at, 3 -.L8004534C: -/* 045F4C 8004534C 1C400003 */ bgtz $v0, .L8004535C -/* 045F50 80045350 00404825 */ move $t1, $v0 -/* 045F54 80045354 10000001 */ b .L8004535C -/* 045F58 80045358 24090001 */ li $t1, 1 -.L8004535C: -/* 045F5C 8004535C 1C400003 */ bgtz $v0, .L8004536C -/* 045F60 80045360 253807FF */ addiu $t8, $t1, 0x7ff -/* 045F64 80045364 10000002 */ b .L80045370 -/* 045F68 80045368 240A0001 */ li $t2, 1 -.L8004536C: -/* 045F6C 8004536C 00405025 */ move $t2, $v0 -.L80045370: -/* 045F70 80045370 030A001A */ div $zero, $t8, $t2 -/* 045F74 80045374 15400002 */ bnez $t2, .L80045380 -/* 045F78 80045378 00000000 */ nop -/* 045F7C 8004537C 0007000D */ break 7 -.L80045380: -/* 045F80 80045380 2401FFFF */ li $at, -1 -/* 045F84 80045384 15410004 */ bne $t2, $at, .L80045398 -/* 045F88 80045388 3C018000 */ lui $at, 0x8000 -/* 045F8C 8004538C 17010002 */ bne $t8, $at, .L80045398 -/* 045F90 80045390 00000000 */ nop -/* 045F94 80045394 0006000D */ break 6 -.L80045398: -/* 045F98 80045398 0000C812 */ mflo $t9 -/* 045F9C 8004539C 332E0FFF */ andi $t6, $t9, 0xfff -/* 045FA0 800453A0 3C010700 */ lui $at, 0x700 -/* 045FA4 800453A4 30980FFF */ andi $t8, $a0, 0xfff -/* 045FA8 800453A8 0018CB00 */ sll $t9, $t8, 0xc -/* 045FAC 800453AC 01C17825 */ or $t7, $t6, $at -/* 045FB0 800453B0 01F97025 */ or $t6, $t7, $t9 -/* 045FB4 800453B4 ACEE0004 */ sw $t6, 4($a3) -/* 045FB8 800453B8 8C620000 */ lw $v0, ($v1) -/* 045FBC 800453BC 3C0FE700 */ lui $t7, 0xe700 -/* 045FC0 800453C0 250E0007 */ addiu $t6, $t0, 7 -/* 045FC4 800453C4 24580008 */ addiu $t8, $v0, 8 -/* 045FC8 800453C8 AC780000 */ sw $t8, ($v1) -/* 045FCC 800453CC AC400004 */ sw $zero, 4($v0) -/* 045FD0 800453D0 AC4F0000 */ sw $t7, ($v0) -/* 045FD4 800453D4 00405825 */ move $t3, $v0 -/* 045FD8 800453D8 8C620000 */ lw $v0, ($v1) -/* 045FDC 800453DC 000EC0C3 */ sra $t8, $t6, 3 -/* 045FE0 800453E0 330F01FF */ andi $t7, $t8, 0x1ff -/* 045FE4 800453E4 24590008 */ addiu $t9, $v0, 8 -/* 045FE8 800453E8 AC790000 */ sw $t9, ($v1) -/* 045FEC 800453EC 000FCA40 */ sll $t9, $t7, 9 -/* 045FF0 800453F0 3C180008 */ lui $t8, (0x00080200 >> 16) # lui $t8, 8 -/* 045FF4 800453F4 3C01F548 */ lui $at, 0xf548 -/* 045FF8 800453F8 03217025 */ or $t6, $t9, $at -/* 045FFC 800453FC 37180200 */ ori $t8, (0x00080200 & 0xFFFF) # ori $t8, $t8, 0x200 -/* 046000 80045400 AC580004 */ sw $t8, 4($v0) -/* 046004 80045404 AC4E0000 */ sw $t6, ($v0) -/* 046008 80045408 00406025 */ move $t4, $v0 -/* 04600C 8004540C 8C620000 */ lw $v0, ($v1) -/* 046010 80045410 24AEFFFF */ addiu $t6, $a1, -1 -/* 046014 80045414 000EC080 */ sll $t8, $t6, 2 -/* 046018 80045418 244F0008 */ addiu $t7, $v0, 8 -/* 04601C 8004541C AC6F0000 */ sw $t7, ($v1) -/* 046020 80045420 330F0FFF */ andi $t7, $t8, 0xfff -/* 046024 80045424 3C19F200 */ lui $t9, 0xf200 -/* 046028 80045428 24CEFFFF */ addiu $t6, $a2, -1 -/* 04602C 8004542C AC590000 */ sw $t9, ($v0) -/* 046030 80045430 000FCB00 */ sll $t9, $t7, 0xc -/* 046034 80045434 000EC080 */ sll $t8, $t6, 2 -/* 046038 80045438 330F0FFF */ andi $t7, $t8, 0xfff -/* 04603C 8004543C 032F7025 */ or $t6, $t9, $t7 -/* 046040 80045440 AC4E0004 */ sw $t6, 4($v0) -/* 046044 80045444 03E00008 */ jr $ra -/* 046048 80045448 00406825 */ move $t5, $v0 diff --git a/asm/non_matchings/code_800431B0/func_8004544C.s b/asm/non_matchings/code_800431B0/func_8004544C.s deleted file mode 100644 index 3d1512f7d..000000000 --- a/asm/non_matchings/code_800431B0/func_8004544C.s +++ /dev/null @@ -1,123 +0,0 @@ -glabel func_8004544C -/* 04604C 8004544C 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 046050 80045450 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 046054 80045454 8C620000 */ lw $v0, ($v1) -/* 046058 80045458 3C0FFD50 */ lui $t7, 0xfd50 -/* 04605C 8004545C 30E8000F */ andi $t0, $a3, 0xf -/* 046060 80045460 244E0008 */ addiu $t6, $v0, 8 -/* 046064 80045464 AC6E0000 */ sw $t6, ($v1) -/* 046068 80045468 AC440004 */ sw $a0, 4($v0) -/* 04606C 8004546C AC4F0000 */ sw $t7, ($v0) -/* 046070 80045470 8C620000 */ lw $v0, ($v1) -/* 046074 80045474 3C010708 */ lui $at, (0x07080100 >> 16) # lui $at, 0x708 -/* 046078 80045478 00A60019 */ multu $a1, $a2 -/* 04607C 8004547C 24580008 */ addiu $t8, $v0, 8 -/* 046080 80045480 AC780000 */ sw $t8, ($v1) -/* 046084 80045484 34210100 */ ori $at, (0x07080100 & 0xFFFF) # ori $at, $at, 0x100 -/* 046088 80045488 00087100 */ sll $t6, $t0, 4 -/* 04608C 8004548C 01C17825 */ or $t7, $t6, $at -/* 046090 80045490 3C19F550 */ lui $t9, 0xf550 -/* 046094 80045494 AC590000 */ sw $t9, ($v0) -/* 046098 80045498 AC4F0004 */ sw $t7, 4($v0) -/* 04609C 8004549C 8C6C0000 */ lw $t4, ($v1) -/* 0460A0 800454A0 3C19E600 */ lui $t9, 0xe600 -/* 0460A4 800454A4 00006812 */ mflo $t5 -/* 0460A8 800454A8 25980008 */ addiu $t8, $t4, 8 -/* 0460AC 800454AC AC780000 */ sw $t8, ($v1) -/* 0460B0 800454B0 AD800004 */ sw $zero, 4($t4) -/* 0460B4 800454B4 AD990000 */ sw $t9, ($t4) -/* 0460B8 800454B8 8C690000 */ lw $t1, ($v1) -/* 0460BC 800454BC 25AD0001 */ addiu $t5, $t5, 1 -/* 0460C0 800454C0 000DC043 */ sra $t8, $t5, 1 -/* 0460C4 800454C4 01C04025 */ move $t0, $t6 -/* 0460C8 800454C8 270DFFFF */ addiu $t5, $t8, -1 -/* 0460CC 800454CC 252E0008 */ addiu $t6, $t1, 8 -/* 0460D0 800454D0 AC6E0000 */ sw $t6, ($v1) -/* 0460D4 800454D4 29A107FF */ slti $at, $t5, 0x7ff -/* 0460D8 800454D8 3C0FF300 */ lui $t7, 0xf300 -/* 0460DC 800454DC 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0460E0 800454E0 10200003 */ beqz $at, .L800454F0 -/* 0460E4 800454E4 AD2F0000 */ sw $t7, ($t1) -/* 0460E8 800454E8 10000002 */ b .L800454F4 -/* 0460EC 800454EC 01A02025 */ move $a0, $t5 -.L800454F0: -/* 0460F0 800454F0 240407FF */ li $a0, 2047 -.L800454F4: -/* 0460F4 800454F4 00A03825 */ move $a3, $a1 -/* 0460F8 800454F8 04E10003 */ bgez $a3, .L80045508 -/* 0460FC 800454FC 000710C3 */ sra $v0, $a3, 3 -/* 046100 80045500 24E10007 */ addiu $at, $a3, 7 -/* 046104 80045504 000110C3 */ sra $v0, $at, 3 -.L80045508: -/* 046108 80045508 1C400003 */ bgtz $v0, .L80045518 -/* 04610C 8004550C 00405025 */ move $t2, $v0 -/* 046110 80045510 10000001 */ b .L80045518 -/* 046114 80045514 240A0001 */ li $t2, 1 -.L80045518: -/* 046118 80045518 1C400003 */ bgtz $v0, .L80045528 -/* 04611C 8004551C 255907FF */ addiu $t9, $t2, 0x7ff -/* 046120 80045520 10000002 */ b .L8004552C -/* 046124 80045524 240B0001 */ li $t3, 1 -.L80045528: -/* 046128 80045528 00405825 */ move $t3, $v0 -.L8004552C: -/* 04612C 8004552C 032B001A */ div $zero, $t9, $t3 -/* 046130 80045530 15600002 */ bnez $t3, .L8004553C -/* 046134 80045534 00000000 */ nop -/* 046138 80045538 0007000D */ break 7 -.L8004553C: -/* 04613C 8004553C 2401FFFF */ li $at, -1 -/* 046140 80045540 15610004 */ bne $t3, $at, .L80045554 -/* 046144 80045544 3C018000 */ lui $at, 0x8000 -/* 046148 80045548 17210002 */ bne $t9, $at, .L80045554 -/* 04614C 8004554C 00000000 */ nop -/* 046150 80045550 0006000D */ break 6 -.L80045554: -/* 046154 80045554 00007012 */ mflo $t6 -/* 046158 80045558 31CF0FFF */ andi $t7, $t6, 0xfff -/* 04615C 8004555C 3C010700 */ lui $at, 0x700 -/* 046160 80045560 30990FFF */ andi $t9, $a0, 0xfff -/* 046164 80045564 00197300 */ sll $t6, $t9, 0xc -/* 046168 80045568 01E1C025 */ or $t8, $t7, $at -/* 04616C 8004556C 030E7825 */ or $t7, $t8, $t6 -/* 046170 80045570 AD2F0004 */ sw $t7, 4($t1) -/* 046174 80045574 8C620000 */ lw $v0, ($v1) -/* 046178 80045578 3C18E700 */ lui $t8, 0xe700 -/* 04617C 8004557C 24EF0007 */ addiu $t7, $a3, 7 -/* 046180 80045580 24590008 */ addiu $t9, $v0, 8 -/* 046184 80045584 AC790000 */ sw $t9, ($v1) -/* 046188 80045588 AC400004 */ sw $zero, 4($v0) -/* 04618C 8004558C AC580000 */ sw $t8, ($v0) -/* 046190 80045590 00406025 */ move $t4, $v0 -/* 046194 80045594 8C620000 */ lw $v0, ($v1) -/* 046198 80045598 000FC8C3 */ sra $t9, $t7, 3 -/* 04619C 8004559C 333801FF */ andi $t8, $t9, 0x1ff -/* 0461A0 800455A0 244E0008 */ addiu $t6, $v0, 8 -/* 0461A4 800455A4 AC6E0000 */ sw $t6, ($v1) -/* 0461A8 800455A8 00187240 */ sll $t6, $t8, 9 -/* 0461AC 800455AC 3C01F548 */ lui $at, 0xf548 -/* 0461B0 800455B0 01C17825 */ or $t7, $t6, $at -/* 0461B4 800455B4 3C010008 */ lui $at, (0x00080100 >> 16) # lui $at, 8 -/* 0461B8 800455B8 34210100 */ ori $at, (0x00080100 & 0xFFFF) # ori $at, $at, 0x100 -/* 0461BC 800455BC 0101C825 */ or $t9, $t0, $at -/* 0461C0 800455C0 AC590004 */ sw $t9, 4($v0) -/* 0461C4 800455C4 AC4F0000 */ sw $t7, ($v0) -/* 0461C8 800455C8 00406825 */ move $t5, $v0 -/* 0461CC 800455CC 8C620000 */ lw $v0, ($v1) -/* 0461D0 800455D0 24B9FFFF */ addiu $t9, $a1, -1 -/* 0461D4 800455D4 3C0EF200 */ lui $t6, 0xf200 -/* 0461D8 800455D8 24580008 */ addiu $t8, $v0, 8 -/* 0461DC 800455DC AC780000 */ sw $t8, ($v1) -/* 0461E0 800455E0 AFA20004 */ sw $v0, 4($sp) -/* 0461E4 800455E4 0019C080 */ sll $t8, $t9, 2 -/* 0461E8 800455E8 AC4E0000 */ sw $t6, ($v0) -/* 0461EC 800455EC 330E0FFF */ andi $t6, $t8, 0xfff -/* 0461F0 800455F0 000ECB00 */ sll $t9, $t6, 0xc -/* 0461F4 800455F4 24D8FFFF */ addiu $t8, $a2, -1 -/* 0461F8 800455F8 00187080 */ sll $t6, $t8, 2 -/* 0461FC 800455FC 31D80FFF */ andi $t8, $t6, 0xfff -/* 046200 80045600 03387025 */ or $t6, $t9, $t8 -/* 046204 80045604 27BD0020 */ addiu $sp, $sp, 0x20 -/* 046208 80045608 AC4E0004 */ sw $t6, 4($v0) -/* 04620C 8004560C 03E00008 */ jr $ra -/* 046210 80045610 00407825 */ move $t7, $v0 diff --git a/asm/non_matchings/code_800431B0/func_80045614.s b/asm/non_matchings/code_800431B0/func_80045614.s deleted file mode 100644 index 8edfd11fb..000000000 --- a/asm/non_matchings/code_800431B0/func_80045614.s +++ /dev/null @@ -1,74 +0,0 @@ -glabel func_80045614 -/* 046214 80045614 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 046218 80045618 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 04621C 8004561C 8C620000 */ lw $v0, ($v1) -/* 046220 80045620 24A8FFFF */ addiu $t0, $a1, -1 -/* 046224 80045624 310F0FFF */ andi $t7, $t0, 0xfff -/* 046228 80045628 244E0008 */ addiu $t6, $v0, 8 -/* 04622C 8004562C AC6E0000 */ sw $t6, ($v1) -/* 046230 80045630 3C01FD48 */ lui $at, 0xfd48 -/* 046234 80045634 01E1C025 */ or $t8, $t7, $at -/* 046238 80045638 AC580000 */ sw $t8, ($v0) -/* 04623C 8004563C AC440004 */ sw $a0, 4($v0) -/* 046240 80045640 8C620000 */ lw $v0, ($v1) -/* 046244 80045644 24AA0007 */ addiu $t2, $a1, 7 -/* 046248 80045648 000A70C3 */ sra $t6, $t2, 3 -/* 04624C 8004564C 31CF01FF */ andi $t7, $t6, 0x1ff -/* 046250 80045650 24590008 */ addiu $t9, $v0, 8 -/* 046254 80045654 AC790000 */ sw $t9, ($v1) -/* 046258 80045658 000FC240 */ sll $t8, $t7, 9 -/* 04625C 8004565C 3C0E0708 */ lui $t6, (0x07080200 >> 16) # lui $t6, 0x708 -/* 046260 80045660 3C01F548 */ lui $at, 0xf548 -/* 046264 80045664 03015025 */ or $t2, $t8, $at -/* 046268 80045668 35CE0200 */ ori $t6, (0x07080200 & 0xFFFF) # ori $t6, $t6, 0x200 -/* 04626C 8004566C AC4E0004 */ sw $t6, 4($v0) -/* 046270 80045670 AC4A0000 */ sw $t2, ($v0) -/* 046274 80045674 8C620000 */ lw $v0, ($v1) -/* 046278 80045678 3C18E600 */ lui $t8, 0xe600 -/* 04627C 8004567C 3C0EF400 */ lui $t6, 0xf400 -/* 046280 80045680 244F0008 */ addiu $t7, $v0, 8 -/* 046284 80045684 AC6F0000 */ sw $t7, ($v1) -/* 046288 80045688 AC400004 */ sw $zero, 4($v0) -/* 04628C 8004568C AC580000 */ sw $t8, ($v0) -/* 046290 80045690 8C620000 */ lw $v0, ($v1) -/* 046294 80045694 00086880 */ sll $t5, $t0, 2 -/* 046298 80045698 31AF0FFF */ andi $t7, $t5, 0xfff -/* 04629C 8004569C 24590008 */ addiu $t9, $v0, 8 -/* 0462A0 800456A0 AC790000 */ sw $t9, ($v1) -/* 0462A4 800456A4 24D9FFFF */ addiu $t9, $a2, -1 -/* 0462A8 800456A8 AC4E0000 */ sw $t6, ($v0) -/* 0462AC 800456AC 00197080 */ sll $t6, $t9, 2 -/* 0462B0 800456B0 000F6B00 */ sll $t5, $t7, 0xc -/* 0462B4 800456B4 31CF0FFF */ andi $t7, $t6, 0xfff -/* 0462B8 800456B8 3C010700 */ lui $at, 0x700 -/* 0462BC 800456BC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0462C0 800456C0 01A1C025 */ or $t8, $t5, $at -/* 0462C4 800456C4 030FC825 */ or $t9, $t8, $t7 -/* 0462C8 800456C8 AFAF0000 */ sw $t7, ($sp) -/* 0462CC 800456CC AC590004 */ sw $t9, 4($v0) -/* 0462D0 800456D0 8C620000 */ lw $v0, ($v1) -/* 0462D4 800456D4 3C18E700 */ lui $t8, 0xe700 -/* 0462D8 800456D8 244E0008 */ addiu $t6, $v0, 8 -/* 0462DC 800456DC AC6E0000 */ sw $t6, ($v1) -/* 0462E0 800456E0 AFA20014 */ sw $v0, 0x14($sp) -/* 0462E4 800456E4 AC400004 */ sw $zero, 4($v0) -/* 0462E8 800456E8 AC580000 */ sw $t8, ($v0) -/* 0462EC 800456EC 8C620000 */ lw $v0, ($v1) -/* 0462F0 800456F0 3C180008 */ lui $t8, (0x00080200 >> 16) # lui $t8, 8 -/* 0462F4 800456F4 37180200 */ ori $t8, (0x00080200 & 0xFFFF) # ori $t8, $t8, 0x200 -/* 0462F8 800456F8 24590008 */ addiu $t9, $v0, 8 -/* 0462FC 800456FC AC790000 */ sw $t9, ($v1) -/* 046300 80045700 AFA20010 */ sw $v0, 0x10($sp) -/* 046304 80045704 AC580004 */ sw $t8, 4($v0) -/* 046308 80045708 AC4A0000 */ sw $t2, ($v0) -/* 04630C 8004570C 8C620000 */ lw $v0, ($v1) -/* 046310 80045710 3C19F200 */ lui $t9, 0xf200 -/* 046314 80045714 244F0008 */ addiu $t7, $v0, 8 -/* 046318 80045718 AC6F0000 */ sw $t7, ($v1) -/* 04631C 8004571C AFA2000C */ sw $v0, 0xc($sp) -/* 046320 80045720 AC590000 */ sw $t9, ($v0) -/* 046324 80045724 8FAE0000 */ lw $t6, ($sp) -/* 046328 80045728 27BD0028 */ addiu $sp, $sp, 0x28 -/* 04632C 8004572C 01AE7825 */ or $t7, $t5, $t6 -/* 046330 80045730 03E00008 */ jr $ra -/* 046334 80045734 AC4F0004 */ sw $t7, 4($v0) diff --git a/asm/non_matchings/code_800431B0/func_80055EF4.s b/asm/non_matchings/code_800431B0/func_80055EF4.s deleted file mode 100644 index 8d57f1730..000000000 --- a/asm/non_matchings/code_800431B0/func_80055EF4.s +++ /dev/null @@ -1,23 +0,0 @@ -glabel func_80055EF4 -/* 056AF4 80055EF4 000470C0 */ sll $t6, $a0, 3 -/* 056AF8 80055EF8 01C47023 */ subu $t6, $t6, $a0 -/* 056AFC 80055EFC 3C0F8016 */ lui $t7, %hi(D_80165C18) # $t7, 0x8016 -/* 056B00 80055F00 25EF5C18 */ addiu $t7, %lo(D_80165C18) # addiu $t7, $t7, 0x5c18 -/* 056B04 80055F04 000E7140 */ sll $t6, $t6, 5 -/* 056B08 80055F08 01CF1021 */ addu $v0, $t6, $t7 -/* 056B0C 80055F0C 845800A6 */ lh $t8, 0xa6($v0) -/* 056B10 80055F10 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 056B14 80055F14 AFBF0014 */ sw $ra, 0x14($sp) -/* 056B18 80055F18 2B010002 */ slti $at, $t8, 2 -/* 056B1C 80055F1C 14200006 */ bnez $at, .L80055F38 -/* 056B20 80055F20 AFA5001C */ sw $a1, 0x1c($sp) -/* 056B24 80055F24 24440004 */ addiu $a0, $v0, 4 -/* 056B28 80055F28 244500BE */ addiu $a1, $v0, 0xbe -/* 056B2C 80055F2C 8C460000 */ lw $a2, ($v0) -/* 056B30 80055F30 0C010C88 */ jal func_80043220 -/* 056B34 80055F34 8C470070 */ lw $a3, 0x70($v0) -.L80055F38: -/* 056B38 80055F38 8FBF0014 */ lw $ra, 0x14($sp) -/* 056B3C 80055F3C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 056B40 80055F40 03E00008 */ jr $ra -/* 056B44 80055F44 00000000 */ nop diff --git a/asm/non_matchings/code_800431B0/func_80055FA0.s b/asm/non_matchings/code_800431B0/func_80055FA0.s deleted file mode 100644 index a068b83d5..000000000 --- a/asm/non_matchings/code_800431B0/func_80055FA0.s +++ /dev/null @@ -1,114 +0,0 @@ -glabel func_80055FA0 -/* 056BA0 80055FA0 000470C0 */ sll $t6, $a0, 3 -/* 056BA4 80055FA4 01C47023 */ subu $t6, $t6, $a0 -/* 056BA8 80055FA8 3C0F8016 */ lui $t7, %hi(D_80165C18) # $t7, 0x8016 -/* 056BAC 80055FAC 25EF5C18 */ addiu $t7, %lo(D_80165C18) # addiu $t7, $t7, 0x5c18 -/* 056BB0 80055FB0 000E7140 */ sll $t6, $t6, 5 -/* 056BB4 80055FB4 01CF4021 */ addu $t0, $t6, $t7 -/* 056BB8 80055FB8 851800A6 */ lh $t8, 0xa6($t0) -/* 056BBC 80055FBC 27BDFF40 */ addiu $sp, $sp, -0xc0 -/* 056BC0 80055FC0 AFBF0014 */ sw $ra, 0x14($sp) -/* 056BC4 80055FC4 2B010002 */ slti $at, $t8, 2 -/* 056BC8 80055FC8 14200061 */ bnez $at, .L80056150 -/* 056BCC 80055FCC AFA500C4 */ sw $a1, 0xc4($sp) -/* 056BD0 80055FD0 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 056BD4 80055FD4 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 056BD8 80055FD8 8C620000 */ lw $v0, ($v1) -/* 056BDC 80055FDC 3C0E0103 */ lui $t6, (0x01030040 >> 16) # lui $t6, 0x103 -/* 056BE0 80055FE0 3C0B8015 */ lui $t3, %hi(gGfxPool) # $t3, 0x8015 -/* 056BE4 80055FE4 24590008 */ addiu $t9, $v0, 8 -/* 056BE8 80055FE8 AC790000 */ sw $t9, ($v1) -/* 056BEC 80055FEC 35CE0040 */ ori $t6, (0x01030040 & 0xFFFF) # ori $t6, $t6, 0x40 -/* 056BF0 80055FF0 256BEF40 */ addiu $t3, %lo(gGfxPool) # addiu $t3, $t3, -0x10c0 -/* 056BF4 80055FF4 AC4E0000 */ sw $t6, ($v0) -/* 056BF8 80055FF8 8D6F0000 */ lw $t7, ($t3) -/* 056BFC 80055FFC 3C0C1FFF */ lui $t4, (0x1FFFFFFF >> 16) # lui $t4, 0x1fff -/* 056C00 80056000 358CFFFF */ ori $t4, (0x1FFFFFFF & 0xFFFF) # ori $t4, $t4, 0xffff -/* 056C04 80056004 25F80040 */ addiu $t8, $t7, 0x40 -/* 056C08 80056008 030CC824 */ and $t9, $t8, $t4 -/* 056C0C 8005600C AC590004 */ sw $t9, 4($v0) -/* 056C10 80056010 8C620000 */ lw $v0, ($v1) -/* 056C14 80056014 3C0F0102 */ lui $t7, (0x01020040 >> 16) # lui $t7, 0x102 -/* 056C18 80056018 35EF0040 */ ori $t7, (0x01020040 & 0xFFFF) # ori $t7, $t7, 0x40 -/* 056C1C 8005601C 244E0008 */ addiu $t6, $v0, 8 -/* 056C20 80056020 AC6E0000 */ sw $t6, ($v1) -/* 056C24 80056024 AC4F0000 */ sw $t7, ($v0) -/* 056C28 80056028 8D780000 */ lw $t8, ($t3) -/* 056C2C 8005602C 27A40080 */ addiu $a0, $sp, 0x80 -/* 056C30 80056030 25050004 */ addiu $a1, $t0, 4 -/* 056C34 80056034 271901C0 */ addiu $t9, $t8, 0x1c0 -/* 056C38 80056038 032C7024 */ and $t6, $t9, $t4 -/* 056C3C 8005603C AC4E0004 */ sw $t6, 4($v0) -/* 056C40 80056040 AFA80020 */ sw $t0, 0x20($sp) -/* 056C44 80056044 8D070000 */ lw $a3, ($t0) -/* 056C48 80056048 0C010974 */ jal func_800425D0 -/* 056C4C 8005604C 250600BE */ addiu $a2, $t0, 0xbe -/* 056C50 80056050 3C0A8019 */ lui $t2, %hi(D_8018D120) # $t2, 0x8019 -/* 056C54 80056054 254AD120 */ addiu $t2, %lo(D_8018D120) # addiu $t2, $t2, -0x2ee0 -/* 056C58 80056058 8D580000 */ lw $t8, ($t2) -/* 056C5C 8005605C 3C0F8015 */ lui $t7, %hi(gGfxPool) # $t7, 0x8015 -/* 056C60 80056060 8DEFEF40 */ lw $t7, %lo(gGfxPool)($t7) -/* 056C64 80056064 0018C980 */ sll $t9, $t8, 6 -/* 056C68 80056068 27A50080 */ addiu $a1, $sp, 0x80 -/* 056C6C 8005606C 01F92021 */ addu $a0, $t7, $t9 -/* 056C70 80056070 0C008860 */ jal func_80022180 -/* 056C74 80056074 248402C0 */ addiu $a0, $a0, 0x2c0 -/* 056C78 80056078 3C038015 */ lui $v1, %hi(gDisplayListHead) # $v1, 0x8015 -/* 056C7C 8005607C 24630298 */ addiu $v1, %lo(gDisplayListHead) # addiu $v1, $v1, 0x298 -/* 056C80 80056080 8C620000 */ lw $v0, ($v1) -/* 056C84 80056084 3C180100 */ lui $t8, (0x01000040 >> 16) # lui $t8, 0x100 -/* 056C88 80056088 8FA80020 */ lw $t0, 0x20($sp) -/* 056C8C 8005608C 244E0008 */ addiu $t6, $v0, 8 -/* 056C90 80056090 3C0A8019 */ lui $t2, %hi(D_8018D120) # $t2, 0x8019 -/* 056C94 80056094 AC6E0000 */ sw $t6, ($v1) -/* 056C98 80056098 37180040 */ ori $t8, (0x01000040 & 0xFFFF) # ori $t8, $t8, 0x40 -/* 056C9C 8005609C 254AD120 */ addiu $t2, %lo(D_8018D120) # addiu $t2, $t2, -0x2ee0 -/* 056CA0 800560A0 3C0C8015 */ lui $t4, %hi(gGfxPool) # $t4, 0x8015 -/* 056CA4 800560A4 AC580000 */ sw $t8, ($v0) -/* 056CA8 800560A8 8D590000 */ lw $t9, ($t2) -/* 056CAC 800560AC 258CEF40 */ addiu $t4, %lo(gGfxPool) # addiu $t4, $t4, -0x10c0 -/* 056CB0 800560B0 8D8F0000 */ lw $t7, ($t4) -/* 056CB4 800560B4 00197180 */ sll $t6, $t9, 6 -/* 056CB8 800560B8 3C0D1FFF */ lui $t5, (0x1FFFFFFF >> 16) # lui $t5, 0x1fff -/* 056CBC 800560BC 01EEC021 */ addu $t8, $t7, $t6 -/* 056CC0 800560C0 35ADFFFF */ ori $t5, (0x1FFFFFFF & 0xFFFF) # ori $t5, $t5, 0xffff -/* 056CC4 800560C4 271902C0 */ addiu $t9, $t8, 0x2c0 -/* 056CC8 800560C8 032D7824 */ and $t7, $t9, $t5 -/* 056CCC 800560CC AC4F0004 */ sw $t7, 4($v0) -/* 056CD0 800560D0 8D4E0000 */ lw $t6, ($t2) -/* 056CD4 800560D4 8C620000 */ lw $v0, ($v1) -/* 056CD8 800560D8 3C0F0D00 */ lui $t7, %hi(D_0D0077A0) # $t7, 0xd00 -/* 056CDC 800560DC 25D80001 */ addiu $t8, $t6, 1 -/* 056CE0 800560E0 24590008 */ addiu $t9, $v0, 8 -/* 056CE4 800560E4 AD580000 */ sw $t8, ($t2) -/* 056CE8 800560E8 AC790000 */ sw $t9, ($v1) -/* 056CEC 800560EC 3C0B0600 */ lui $t3, 0x600 -/* 056CF0 800560F0 25EF77A0 */ addiu $t7, %lo(D_0D0077A0) # addiu $t7, $t7, 0x77a0 -/* 056CF4 800560F4 AC4F0004 */ sw $t7, 4($v0) -/* 056CF8 800560F8 AC4B0000 */ sw $t3, ($v0) -/* 056CFC 800560FC 8C620000 */ lw $v0, ($v1) -/* 056D00 80056100 3C0F0101 */ lui $t7, (0x01010040 >> 16) # lui $t7, 0x101 -/* 056D04 80056104 35EF0040 */ ori $t7, (0x01010040 & 0xFFFF) # ori $t7, $t7, 0x40 -/* 056D08 80056108 244E0008 */ addiu $t6, $v0, 8 -/* 056D0C 8005610C AC6E0000 */ sw $t6, ($v1) -/* 056D10 80056110 AC4B0000 */ sw $t3, ($v0) -/* 056D14 80056114 8D180070 */ lw $t8, 0x70($t0) -/* 056D18 80056118 27A40040 */ addiu $a0, $sp, 0x40 -/* 056D1C 8005611C AC580004 */ sw $t8, 4($v0) -/* 056D20 80056120 8C620000 */ lw $v0, ($v1) -/* 056D24 80056124 24590008 */ addiu $t9, $v0, 8 -/* 056D28 80056128 AC790000 */ sw $t9, ($v1) -/* 056D2C 8005612C AC4F0000 */ sw $t7, ($v0) -/* 056D30 80056130 8D8E0000 */ lw $t6, ($t4) -/* 056D34 80056134 25D801C0 */ addiu $t8, $t6, 0x1c0 -/* 056D38 80056138 030DC824 */ and $t9, $t8, $t5 -/* 056D3C 8005613C 0C0AD4F2 */ jal mtxf_identity -/* 056D40 80056140 AC590004 */ sw $t9, 4($v0) -/* 056D44 80056144 27A40040 */ addiu $a0, $sp, 0x40 -/* 056D48 80056148 0C0AD3FE */ jal func_802B4FF8 -/* 056D4C 8005614C 00002825 */ move $a1, $zero -.L80056150: -/* 056D50 80056150 8FBF0014 */ lw $ra, 0x14($sp) -/* 056D54 80056154 27BD00C0 */ addiu $sp, $sp, 0xc0 -/* 056D58 80056158 03E00008 */ jr $ra -/* 056D5C 8005615C 00000000 */ nop diff --git a/include/objects.h b/include/objects.h index aa90e2125..f8f924be8 100644 --- a/include/objects.h +++ b/include/objects.h @@ -50,9 +50,7 @@ typedef struct /* 0xB4 */ u16 unk_0B4; /* 0xB6 */ u16 unk_0B6; /* 0xB8 */ Vec3s unk_0B8; - /* 0xBE */ u16 unk_0BE; - /* 0xC0 */ u16 unk_0C0; - /* 0xC2 */ u16 unk_0C2; + /* 0xBE */ Vec3su unk_0BE; /* 0xC4 */ u16 unk_0C4; /* 0xC6 */ u16 unk_0C6; /* 0xC8 */ u16 unk_0C8; diff --git a/src/code_800431B0.c b/src/code_800431B0.c index bcf03eb59..88a4909d8 100644 --- a/src/code_800431B0.c +++ b/src/code_800431B0.c @@ -5,128 +5,128 @@ #include #include #include "math_util_2.h" +#include "objects.h" #include "code_8001F980.h" #include "code_800431B0.h" #include "code_80071F00.h" #include "main.h" -void func_800431B0(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +void func_800431B0(Vec3f arg0, Vec3s arg1, f32 arg2, Vtx *vtx) { func_80042E00(arg0, arg1, arg2); - gSPVertex(gDisplayListHead++, arg3, 4, 0); + gSPVertex(gDisplayListHead++, vtx, 4, 0); gSPDisplayList(gDisplayListHead++, D_0D006940); } -void func_80043220(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +void func_80043220(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, &D_0D0077A0); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_800433288(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +UNUSED void func_800433288(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0077A0); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_80043328(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +void func_80043328(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0077D0); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void *func_80043390(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +UNUSED void func_80043390(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0077F8); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_800433F8(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +UNUSED void func_800433F8(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007828); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_80043460(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +UNUSED void func_80043460(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007828); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_80043500(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3) { +void func_80043500(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007850); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -void func_800435A0(s32 arg0, Vec3su arg1, f32 arg2, Gfx *arg3, s32 arg4) { +void func_800435A0(Vec3f arg0, Vec3su arg1, f32 arg2, Gfx *gfx, s32 arg4) { func_80042F70(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007878); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0xFF, 0xFF, 0xFF, arg4); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -UNUSED void func_80043668(Vec3f arg0, Vec3s arg1, f32 arg2, Vtx *arg3) { +UNUSED void func_80043668(Vec3f arg0, Vec3s arg1, f32 arg2, Gfx *gfx) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0078A0); - gSPDisplayList(gDisplayListHead++, arg3); + gSPDisplayList(gDisplayListHead++, gfx); } -UNUSED void func_800436D0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4) { +UNUSED void func_800436D0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); - gSPVertex(gDisplayListHead++, arg4, 3, 0); + gSPVertex(gDisplayListHead++, vtx, 3, 0); gSPDisplayList(gDisplayListHead++, D_0D006930); } -UNUSED void func_80043764(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *arg4) { +UNUSED void func_80043764(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); - gSPVertex(gDisplayListHead++, arg4, 4, 0); + gSPVertex(gDisplayListHead++, vtx, 4, 0); gSPDisplayList(gDisplayListHead++, D_0D006940); } -UNUSED void func_800437F8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, struct Vtx4_800431B0 *arg4, s32 arg5) { +UNUSED void func_800437F8(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 arg5) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); gDPSetRenderMode(gDisplayListHead++, G_RM_CLD_SURF, G_RM_CLD_SURF2); - arg4->vtx[0].v.cn[3] = arg5; - arg4->vtx[1].v.cn[3] = arg5; - arg4->vtx[2].v.cn[3] = arg5; - arg4->vtx[3].v.cn[3] = arg5; - gSPVertex(gDisplayListHead++, arg4, 4, 0); + vtx[0].v.cn[3] = arg5; + vtx[1].v.cn[3] = arg5; + vtx[2].v.cn[3] = arg5; + vtx[3].v.cn[3] = arg5; + gSPVertex(gDisplayListHead++, vtx, 4, 0); gSPDisplayList(gDisplayListHead++, D_0D006940); } -UNUSED void func_800438C4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, struct Vtx4_800431B0 *arg4, s32 arg5) { - arg4->vtx[1].v.ob[0] = arg5; - arg4->vtx[2].v.ob[0] = arg5; - func_80042330(arg0, arg1, arg2, arg3); - gSPDisplayList(gDisplayListHead++, D_0D0078A0); - gDPSetRenderMode(gDisplayListHead++, G_RM_CLD_SURF, G_RM_CLD_SURF2); - gSPVertex(gDisplayListHead++, arg4, 4, 0); - gSPDisplayList(gDisplayListHead++, D_0D006940); - -} - -UNUSED void func_8004398C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, struct Vtx4_800431B0 *arg4, s32 arg5) { - arg4->vtx[0].v.ob[0] = arg5; - arg4->vtx[3].v.ob[0] = arg5; +UNUSED void func_800438C4(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 arg5) { + vtx[1].v.ob[0] = arg5; + vtx[2].v.ob[0] = arg5; func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D0078A0); gDPSetRenderMode(gDisplayListHead++, G_RM_CLD_SURF, G_RM_CLD_SURF2); - gSPVertex(gDisplayListHead++, arg4, 4, 0); + gSPVertex(gDisplayListHead++, vtx, 4, 0); + gSPDisplayList(gDisplayListHead++, D_0D006940); +} + +UNUSED void func_8004398C(s32 arg0, s32 arg1, u16 arg2, f32 arg3, Vtx *vtx, s32 arg5) { + vtx[0].v.ob[0] = arg5; + vtx[3].v.ob[0] = arg5; + func_80042330(arg0, arg1, arg2, arg3); + gSPDisplayList(gDisplayListHead++, D_0D0078A0); + gDPSetRenderMode(gDisplayListHead++, G_RM_CLD_SURF, G_RM_CLD_SURF2); + gSPVertex(gDisplayListHead++, vtx, 4, 0); gSPDisplayList(gDisplayListHead++, D_0D006940); } @@ -144,469 +144,59 @@ s32 func_80043A54(s32 arg0) { return phi_v1; } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_80043A84(s32 arg0, s32 arg1, s32 arg2) { - s32 temp_t4; - s32 temp_t6; - void *temp_a3; - void *temp_t3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - s32 phi_t1; - s32 phi_t2; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD180000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = 0x7080200; - temp_v0_2->unk0 = 0xF5180000; - temp_t3 = gDisplayListHead; - gDisplayListHead = temp_t3 + 8; - temp_t3->unk4 = 0; - temp_t3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t4 = (arg1 * arg2) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t4 < 0x7FF) { - phi_a0 = temp_t4; - } else { - phi_a0 = 0x7FF; - } - temp_t6 = (arg1 * 4) / 8; - if (temp_t6 <= 0) { - phi_t1 = 1; - } else { - phi_t1 = temp_t6; - } - if (temp_t6 <= 0) { - phi_t2 = 1; - } else { - phi_t2 = temp_t6; - } - temp_a3->unk4 = (((phi_t1 + 0x7FF) / phi_t2) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE7000000; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = (((((arg1 * 2) + 7) >> 3) & 0x1FF) << 9) | 0xF5180000; - temp_v0_4->unk4 = 0x80200; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xF2000000; - temp_v0_5->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); -} -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80043A84.s") -#endif - -void func_80043C28(s8 *image, s32 width, s32 arg2) { - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_32b, (((width * 2) + 7) >> 3), 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gDisplayListHead++); - - gDPLoadTile(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); - gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_32b, (((width * 2) + 7) >> 3), 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); +void func_80043A84(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 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); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_80043D50(s32 arg0, s32 arg1, s32 arg2) { - void *sp4; - s32 temp_t1; - s32 temp_t4; - s32 temp_v0_4; - void *temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - s32 phi_t2; - s32 phi_t3; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD100000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = 0x70C0300; - temp_v0_2->unk0 = 0xF5100000; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t4 = (arg1 * arg2) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t4 < 0x7FF) { - phi_a0 = temp_t4; - } else { - phi_a0 = 0x7FF; - } - temp_t1 = arg1 * 2; - temp_v0_4 = temp_t1 / 8; - phi_t2 = temp_v0_4; - if (temp_v0_4 <= 0) { - phi_t2 = 1; - } - if (temp_v0_4 <= 0) { - phi_t3 = 1; - } else { - phi_t3 = temp_v0_4; - } - temp_a3->unk4 = (((phi_t2 + 0x7FF) / phi_t3) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = ((((temp_t1 + 7) >> 3) & 0x1FF) << 9) | 0xF5100000; - temp_v0_6->unk4 = 0xC0300; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - sp4 = temp_v0_7; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); -} -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80043D50.s") -#endif - -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_80043EF8(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - void *sp18; - void *sp14; - s32 sp0; - s32 temp_a3; - s32 temp_t8; - s32 temp_t9; - s32 temp_v0_3; - void *temp_t1; - void *temp_t5; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - s32 phi_t3; - s32 phi_t4; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD100000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_t9 = (arg3 & 0xF) * 0x10; - temp_v0_2->unk4 = temp_t9 | 0x7080100; - temp_v0_2->unk0 = 0xF5100000; - temp_t5 = gDisplayListHead; - gDisplayListHead = temp_t5 + 8; - temp_t5->unk4 = 0; - temp_t5->unk0 = 0xE6000000; - temp_t1 = gDisplayListHead; - gDisplayListHead = temp_t1 + 8; - temp_t8 = (arg1 * arg2) - 1; - temp_t1->unk0 = 0xF3000000; - sp0 = temp_t8; - if (temp_t8 < 0x7FF) { - phi_a0 = temp_t8; - } else { - phi_a0 = 0x7FF; - } - temp_a3 = arg1 * 2; - temp_v0_3 = temp_a3 / 8; - phi_t3 = temp_v0_3; - if (temp_v0_3 <= 0) { - phi_t3 = 1; - } - if (temp_v0_3 <= 0) { - phi_t4 = 1; - } else { - phi_t4 = temp_v0_3; - } - temp_t1->unk4 = (((phi_t3 + 0x7FF) / phi_t4) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0; - temp_v0_4->unk0 = 0xE7000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - sp18 = temp_v0_5; - temp_v0_5->unk0 = ((((temp_a3 + 7) >> 3) & 0x1FF) << 9) | 0xF5100000; - temp_v0_5->unk4 = temp_t9 | 0x80100; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - sp14 = temp_v0_6; - temp_v0_6->unk0 = 0xF2000000; - temp_v0_6->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); -} -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80043EF8.s") -#endif - -void func_800440B8(s8 *image, s32 width, s32 arg2) { - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, (((width * 2) + 7) >> 3), 0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gDisplayListHead++); - - gDPLoadTile(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); - gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_RGBA, G_IM_SIZ_16b, (((width * 2) + 7) >> 3), 0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); +void func_80043C28(s8 *image, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, image, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, + 0, 0, width -1, height -1, 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); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_800441E0(s32 arg0, s32 arg1, s32 arg2) { - void *sp4; - s32 temp_t1; - s32 temp_t4; - s32 temp_v0_4; - void *temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - s32 phi_t2; - s32 phi_t3; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD700000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = 0x7080200; - temp_v0_2->unk0 = 0xF5700000; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t4 = (arg1 * arg2) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t4 < 0x7FF) { - phi_a0 = temp_t4; - } else { - phi_a0 = 0x7FF; - } - temp_t1 = arg1 * 2; - temp_v0_4 = temp_t1 / 8; - phi_t2 = temp_v0_4; - if (temp_v0_4 <= 0) { - phi_t2 = 1; - } - if (temp_v0_4 <= 0) { - phi_t3 = 1; - } else { - phi_t3 = temp_v0_4; - } - temp_a3->unk4 = (((phi_t2 + 0x7FF) / phi_t3) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = ((((temp_t1 + 7) >> 3) & 0x1FF) << 9) | 0xF5700000; - temp_v0_6->unk4 = 0x80200; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - sp4 = temp_v0_7; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); -} -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800441E0.s") -#endif - -void func_80044388(s8 *image, s32 width, s32 arg2) { - - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, width, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, (((width * 2) + 7) >> 3), 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gDisplayListHead++); - gDPLoadTile(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); - gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, (((width * 2) + 7) >> 3), 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); +void func_80043D50(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, + G_TX_MIRROR | G_TX_CLAMP, G_TX_MIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_800444B0(s32 arg0, s32 arg1, s32 arg2) { - s32 temp_t3; - s32 temp_v0_4; - void *temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - s32 phi_t1; - s32 phi_t2; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD700000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xF5700000; - temp_v0_2->unk4 = 0x7080200; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t3 = (((arg1 * arg2) + 1) >> 1) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t3 < 0x7FF) { - phi_a0 = temp_t3; - } else { - phi_a0 = 0x7FF; - } - temp_v0_4 = arg1 / 8; - phi_t1 = temp_v0_4; - if (temp_v0_4 <= 0) { - phi_t1 = 1; - } - if (temp_v0_4 <= 0) { - phi_t2 = 1; - } else { - phi_t2 = temp_v0_4; - } - temp_a3->unk4 = (((phi_t1 + 0x7FF) / phi_t2) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x80200; - temp_v0_6->unk0 = ((((arg1 + 7) >> 3) & 0x1FF) << 9) | 0xF5680000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); -} -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800444B0.s") -#endif - -void func_80044658(s8 *image, s32 width, s32 arg2) { - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, width, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, (((width) + 7) >> 3), 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gDisplayListHead++); - gDPLoadTile(gDisplayListHead++, G_TX_LOADTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); - gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, (((width) + 7) >> 3), 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, (width - 1) << 0x2, (arg2 - 1) << 0x2); +void func_80043EF8(s8 *image, s32 width, s32 height, s32 someMask) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_8004477C(s32 arg0, s32 arg1, s32 arg2) { - s32 temp_t3; - s32 temp_v0_4; - void *temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - s32 phi_t1; - s32 phi_t2; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD900000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xF5900000; - temp_v0_2->unk4 = 0x7080200; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t3 = (((arg1 * arg2) + 1) >> 1) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t3 < 0x7FF) { - phi_a0 = temp_t3; - } else { - phi_a0 = 0x7FF; - } - temp_v0_4 = arg1 / 8; - phi_t1 = temp_v0_4; - if (temp_v0_4 <= 0) { - phi_t1 = 1; - } - if (temp_v0_4 <= 0) { - phi_t2 = 1; - } else { - phi_t2 = temp_v0_4; - } - temp_a3->unk4 = (((phi_t1 + 0x7FF) / phi_t2) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x80200; - temp_v0_6->unk0 = ((((arg1 + 7) >> 3) & 0x1FF) << 9) | 0xF5880000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); +void func_800440B8(s8 *image, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, image, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, + 0, 0, width -1, height -1, 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); +} + +void func_800441E0(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 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); +} + +void func_80044388(s8 *image, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, image, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, + 0, 0, width -1, height -1, 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); +} + +void func_800444B0(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 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); +} + +void func_80044658(s8 *image, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, image, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, + 0, 0, width -1, height -1, 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); +} + +void func_8004477C(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 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); } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004477C.s") -#endif #ifdef NON_MATCHING @@ -638,87 +228,16 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80044924.s") //gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0x00000000); //gDPLoadTile(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0, 0); -#ifdef NON_MATCHING -UNUSED void func_80044AB8(s8 *image, s32 width, s32 arg2) { - gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, width, image); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, (((width >> 1) + 7) >> 3), 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPLoadSync(gDisplayListHead++); - gDPLoadTile(gDisplayListHead++, G_TX_LOADTILE, 0, 0, ((width - 1) * 2) << 0x2, (arg2 - 1) << 0x2); - gDPPipeSync(gDisplayListHead++); - gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_4b, (((width >> 1) + 7) >> 3), 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); - gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, ((width - 1) * 2) << 0x2, (arg2 - 1) << 0x2); +UNUSED void func_80044AB8(s8 *image, s32 width, s32 height) { + gDPLoadTextureTile_4b(gDisplayListHead++, image, G_IM_FMT_IA, width, height, + 0, 0, width -1, height -1, 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); } -#else -//gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_4b, 0, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD); -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80044AB8.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_80044BF8(s32 arg0, s32 arg1, s32 arg2) { - s32 temp_t3; - s32 temp_v0_4; - void *temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - s32 phi_t1; - s32 phi_t2; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD900000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xF5900000; - temp_v0_2->unk4 = 0x7080200; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t3 = (((arg1 * arg2) + 1) >> 1) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t3 < 0x7FF) { - phi_a0 = temp_t3; - } else { - phi_a0 = 0x7FF; - } - temp_v0_4 = arg1 / 8; - phi_t1 = temp_v0_4; - if (temp_v0_4 <= 0) { - phi_t1 = 1; - } - if (temp_v0_4 <= 0) { - phi_t2 = 1; - } else { - phi_t2 = temp_v0_4; - } - temp_a3->unk4 = (((phi_t1 + 0x7FF) / phi_t2) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x80200; - temp_v0_6->unk0 = ((((arg1 + 7) >> 3) & 0x1FF) << 9) | 0xF5880000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); +void func_80044BF8(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_I, G_IM_SIZ_8b, width, height, 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); } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80044BF8.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -893,233 +412,50 @@ void func_800450C8(s32 arg0, s32 arg1, s32 arg2) { GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800450C8.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_800452A4(s32 arg0, s32 arg1, s32 arg2) { - s32 temp_t3; - s32 temp_v0_4; - void *temp_a3; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - s32 phi_t1; - s32 phi_t2; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD500000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xF5500000; - temp_v0_2->unk4 = 0x7080200; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_a3 = gDisplayListHead; - temp_t3 = (((arg1 * arg2) + 1) >> 1) - 1; - gDisplayListHead = temp_a3 + 8; - temp_a3->unk0 = 0xF3000000; - if (temp_t3 < 0x7FF) { - phi_a0 = temp_t3; - } else { - phi_a0 = 0x7FF; - } - temp_v0_4 = arg1 / 8; - phi_t1 = temp_v0_4; - if (temp_v0_4 <= 0) { - phi_t1 = 1; - } - if (temp_v0_4 <= 0) { - phi_t2 = 1; - } else { - phi_t2 = temp_v0_4; - } - temp_a3->unk4 = (((phi_t1 + 0x7FF) / phi_t2) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0x80200; - temp_v0_6->unk0 = ((((arg1 + 7) >> 3) & 0x1FF) << 9) | 0xF5480000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); +void func_800452A4(s8 *image, s32 width, s32 height) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 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); } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800452A4.s") -#endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - -void func_8004544C(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - void *sp4; - s32 temp_t5; - s32 temp_t6; - s32 temp_v0_3; - void *temp_t1; - void *temp_t4; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - s32 phi_t2; - s32 phi_t3; - s32 phi_a0; - - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = arg0; - temp_v0->unk0 = 0xFD500000; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_t6 = (arg3 & 0xF) * 0x10; - temp_v0_2->unk0 = 0xF5500000; - temp_v0_2->unk4 = temp_t6 | 0x7080100; - temp_t4 = gDisplayListHead; - gDisplayListHead = temp_t4 + 8; - temp_t4->unk4 = 0; - temp_t4->unk0 = 0xE6000000; - temp_t1 = gDisplayListHead; - temp_t5 = (((arg1 * arg2) + 1) >> 1) - 1; - gDisplayListHead = temp_t1 + 8; - temp_t1->unk0 = 0xF3000000; - if (temp_t5 < 0x7FF) { - phi_a0 = temp_t5; - } else { - phi_a0 = 0x7FF; - } - temp_v0_3 = arg1 / 8; - phi_t2 = temp_v0_3; - if (temp_v0_3 <= 0) { - phi_t2 = 1; - } - if (temp_v0_3 <= 0) { - phi_t3 = 1; - } else { - phi_t3 = temp_v0_3; - } - temp_t1->unk4 = (((phi_t2 + 0x7FF) / phi_t3) & 0xFFF) | 0x7000000 | ((phi_a0 & 0xFFF) << 0xC); - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0; - temp_v0_4->unk0 = 0xE7000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = temp_t6 | 0x80100; - temp_v0_5->unk0 = ((((arg1 + 7) >> 3) & 0x1FF) << 9) | 0xF5480000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - sp4 = temp_v0_6; - temp_v0_6->unk0 = 0xF2000000; - temp_v0_6->unk4 = ((((arg1 - 1) * 4) & 0xFFF) << 0xC) | (((arg2 - 1) * 4) & 0xFFF); +void func_8004544C(s8 *image, s32 width, s32 height, s32 someMask) { + gDPLoadTextureBlock(gDisplayListHead++, image, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 0, + G_TX_MIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, someMask, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004544C.s") -#endif -#ifdef MIPS_TO_C -UNUSED void func_80045614(s32 arg0, s32 arg1, s32 arg2) { - void *sp14; - void *sp10; - void *spC; - s32 sp0; - s32 temp_t0; - s32 temp_t2; - s32 temp_t5; - s32 temp_t7; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - - temp_v0 = gDisplayListHead; - temp_t0 = arg1 - 1; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk0 = (s32) ((temp_t0 & 0xFFF) | 0xFD480000); - temp_v0->unk4 = arg0; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_t2 = ((((s32) (arg1 + 7) >> 3) & 0x1FF) << 9) | 0xF5480000; - temp_v0_2->unk4 = 0x07080200; - temp_v0_2->unk0 = temp_t2; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = 0; - temp_v0_3->unk0 = 0xE6000000; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk0 = 0xF4000000; - temp_t5 = ((temp_t0 * 4) & 0xFFF) << 0xC; - temp_t7 = ((arg2 - 1) * 4) & 0xFFF; - sp0 = temp_t7; - temp_v0_4->unk4 = (s32) (temp_t5 | 0x07000000 | temp_t7); - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - sp14 = temp_v0_5; - temp_v0_5->unk4 = 0; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - sp10 = temp_v0_6; - temp_v0_6->unk4 = 0x80200; - temp_v0_6->unk0 = temp_t2; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - spC = temp_v0_7; - temp_v0_7->unk0 = 0xF2000000; - temp_v0_7->unk4 = (s32) (temp_t5 | sp0); +UNUSED void func_80045614(s8 *image, s32 width, s32 height) { + gDPLoadTextureTile(gDisplayListHead++, image, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, + 0, 0, width - 1, height -1, 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); } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80045614.s") -#endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern s32 *gDisplayListHead; - -void func_80045738(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - s32 *sp4C; - s32 *sp28; - s32 *sp24; - s32 *sp20; - s32 *sp1C; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +void func_80045738(s8 *image1, s8 *image2, s32 width, s32 height) { + Gfx *sp4C; + Gfx *sp28; + Gfx *sp24; + Gfx *sp20; + Gfx *sp1C; s32 spC; s32 sp4; s32 sp0; - s32 *temp_t0; - s32 *temp_t1; - s32 *temp_v0; - s32 *temp_v0_10; - s32 *temp_v0_11; - s32 *temp_v0_13; - s32 *temp_v0_14; - s32 *temp_v0_15; - s32 *temp_v0_16; - s32 *temp_v0_17; - s32 *temp_v0_2; - s32 *temp_v0_3; - s32 *temp_v0_5; - s32 *temp_v0_6; - s32 *temp_v0_7; - s32 *temp_v0_8; - s32 *temp_v0_9; + Gfx *temp_t0; + Gfx *temp_t1; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_13; + Gfx *temp_v0_14; + Gfx *temp_v0_15; + Gfx *temp_v0_16; + Gfx *temp_v0_17; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; s32 temp_a0; s32 temp_a0_2; s32 temp_lo; @@ -1128,123 +464,123 @@ void func_80045738(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { s32 temp_t8; s32 temp_v0_12; s32 temp_v0_4; - s32 phi_t3; - s32 phi_t2; - s32 phi_t4; - s32 phi_t3_2; - s32 phi_t2_2; - s32 phi_t4_2; + s32 var_t2; + s32 var_t2_2; + s32 var_t3; + s32 var_t3_2; + s32 var_t4; + s32 var_t4_2; temp_t0 = gDisplayListHead; gDisplayListHead = temp_t0 + 8; - temp_t0->unk0 = 0xFCFFFFFF; - temp_t0->unk4 = 0xFFFCF438; + temp_t0->words.w0 = 0xFCFFFFFF; + temp_t0->words.w1 = 0xFFFCF438; temp_t1 = gDisplayListHead; gDisplayListHead = temp_t1 + 8; - temp_t1->unk4 = arg1; - temp_t1->unk0 = 0xFD900000; + temp_t1->words.w1 = (u32) image2; + temp_t1->words.w0 = 0xFD900000; temp_v0 = gDisplayListHead; gDisplayListHead = temp_v0 + 8; - temp_v0->unk0 = 0xF5900100; - temp_v0->unk4 = 0x70C0300; + temp_v0->words.w0 = 0xF5900100; + temp_v0->words.w1 = 0x070C0300; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0xE6000000; - temp_v0_2->unk4 = 0; + temp_v0_2->words.w0 = 0xE6000000; + temp_v0_2->words.w1 = 0; temp_v0_3 = gDisplayListHead; + var_t4 = 0x7FF; gDisplayListHead = temp_v0_3 + 8; sp4C = temp_v0_3; - temp_v0_3->unk0 = 0xF3000000; - temp_lo = arg2 * arg3; - temp_t5 = ((temp_lo + 1) >> 1) - 1; + temp_v0_3->words.w0 = 0xF3000000; + temp_lo = width * height; + temp_t5 = ((s32) (temp_lo + 1) >> 1) - 1; spC = temp_lo; - phi_t4 = 0x7FF; - phi_t4_2 = 0x7FF; if (temp_t5 < 0x7FF) { - phi_t4 = temp_t5; + var_t4 = temp_t5; } - temp_v0_4 = arg2 / 8; - phi_t3 = temp_v0_4; + temp_v0_4 = width / 8; + var_t3 = temp_v0_4; if (temp_v0_4 <= 0) { - phi_t3 = 1; + var_t3 = 1; } if (temp_v0_4 <= 0) { - phi_t2 = 1; + var_t2 = 1; } else { - phi_t2 = temp_v0_4; + var_t2 = temp_v0_4; } - sp4C->unk4 = (((phi_t3 + 0x7FF) / phi_t2) & 0xFFF) | 0x7000000 | ((phi_t4 & 0xFFF) << 0xC); + sp4C->words.w1 = (((s32) (var_t3 + 0x7FF) / var_t2) & 0xFFF) | 0x07000000 | ((var_t4 & 0xFFF) << 0xC); temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk0 = 0xE7000000; - temp_v0_5->unk4 = 0; + temp_v0_5->words.w0 = 0xE7000000; + temp_v0_5->words.w1 = 0; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk0 = ((((arg2 + 7) >> 3) & 0x1FF) << 9) | 0xF5880000 | 0x100; - temp_v0_6->unk4 = 0xC0300; + temp_v0_6->words.w0 = ((((s32) (width + 7) >> 3) & 0x1FF) << 9) | 0xF5880000 | 0x100; + temp_v0_6->words.w1 = 0x000C0300; temp_v0_7 = gDisplayListHead; + var_t4_2 = 0x7FF; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk0 = 0xF2000000; - temp_t6 = (((arg2 - 1) * 4) & 0xFFF) << 0xC; - temp_t8 = ((arg3 - 1) * 4) & 0xFFF; + temp_v0_7->words.w0 = 0xF2000000; + temp_t6 = (((width - 1) * 4) & 0xFFF) << 0xC; + temp_t8 = ((height - 1) * 4) & 0xFFF; sp0 = temp_t8; sp4 = temp_t6; - temp_v0_7->unk4 = temp_t6 | temp_t8; + temp_v0_7->words.w1 = temp_t6 | temp_t8; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk0 = 0xFD100000; - temp_v0_8->unk4 = arg0; + temp_v0_8->words.w0 = 0xFD100000; + temp_v0_8->words.w1 = (u32) image1; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk0 = 0xF5100000; - temp_v0_9->unk4 = 0x70C0300; + temp_v0_9->words.w0 = 0xF5100000; + temp_v0_9->words.w1 = 0x070C0300; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0xE6000000; - temp_v0_10->unk4 = 0; + temp_v0_10->words.w0 = 0xE6000000; + temp_v0_10->words.w1 = 0; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk0 = 0xF3000000; + temp_v0_11->words.w0 = 0xF3000000; temp_a0 = spC - 1; if (temp_a0 < 0x7FF) { - phi_t4_2 = temp_a0; + var_t4_2 = temp_a0; } - temp_a0_2 = arg2 * 2; + temp_a0_2 = width * 2; temp_v0_12 = temp_a0_2 / 8; - phi_t3_2 = temp_v0_12; + var_t3_2 = temp_v0_12; if (temp_v0_12 <= 0) { - phi_t3_2 = 1; + var_t3_2 = 1; } if (temp_v0_12 <= 0) { - phi_t2_2 = 1; + var_t2_2 = 1; } else { - phi_t2_2 = temp_v0_12; + var_t2_2 = temp_v0_12; } - temp_v0_11->unk4 = (((phi_t3_2 + 0x7FF) / phi_t2_2) & 0xFFF) | 0x7000000 | ((phi_t4_2 & 0xFFF) << 0xC); + temp_v0_11->words.w1 = (((s32) (var_t3_2 + 0x7FF) / var_t2_2) & 0xFFF) | 0x07000000 | ((var_t4_2 & 0xFFF) << 0xC); temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk0 = 0xE7000000; - temp_v0_13->unk4 = 0; + temp_v0_13->words.w0 = 0xE7000000; + temp_v0_13->words.w1 = 0; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; sp28 = temp_v0_14; - temp_v0_14->unk4 = 0xC0300; - temp_v0_14->unk0 = ((((temp_a0_2 + 7) >> 3) & 0x1FF) << 9) | 0xF5100000; + temp_v0_14->words.w1 = 0x000C0300; + temp_v0_14->words.w0 = ((((s32) (temp_a0_2 + 7) >> 3) & 0x1FF) << 9) | 0xF5100000; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; sp24 = temp_v0_15; - temp_v0_15->unk0 = 0xF2000000; - temp_v0_15->unk4 = sp4 | sp0; + temp_v0_15->words.w0 = 0xF2000000; + temp_v0_15->words.w1 = sp4 | sp0; temp_v0_16 = gDisplayListHead; gDisplayListHead = temp_v0_16 + 8; sp20 = temp_v0_16; - temp_v0_16->unk0 = ((((arg2 + 7) >> 3) & 0x1FF) << 9) | 0xF5880000 | 0x100; - sp20->unk4 = 0x1000000; + temp_v0_16->words.w0 = ((((s32) (width + 7) >> 3) & 0x1FF) << 9) | 0xF5880000 | 0x100; + sp20->words.w1 = 0x01000000; temp_v0_17 = gDisplayListHead; gDisplayListHead = temp_v0_17 + 8; sp1C = temp_v0_17; - temp_v0_17->unk0 = 0xF2000000; - sp1C->unk4 = sp4 | 0x1000000 | sp0; + temp_v0_17->words.w0 = 0xF2000000; + sp1C->words.w1 = sp4 | 0x01000000 | sp0; } #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80045738.s") @@ -1558,7 +894,7 @@ UNUSED void func_80046634(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, s32 void func_800466B0(s32 arg0, s32 arg1, u16 arg2, f32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) { func_80042330(arg0, arg1, arg2, arg3); gSPDisplayList(gDisplayListHead++, D_0D007948); - func_80043D50(arg4, arg6, arg7, &gDisplayListHead); + func_80043D50(arg4, arg6, arg7); func_80045B74(arg5); } @@ -1586,14 +922,13 @@ UNUSED void func_80046874(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3, s32 arg4, func_80045E10(arg3, arg4, arg5, arg6, arg8); } -void func_800468E0(s32 arg0, s32 arg1, f32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { +void func_800468E0(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0079C8); func_80045F18(arg3, arg4, arg5, arg6, arg8, arg9); } -UNUSED void func_80046954(s32 arg0, s32 arg1, f32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { - +UNUSED void func_80046954(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D0079C8); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); @@ -1604,7 +939,7 @@ UNUSED void func_80046954(s32 arg0, s32 arg1, f32 arg2, s32 arg3, s32 arg4, s32 void func_80046A00(Vec3f arg0, Vec3s arg1, f32 arg2, s32 arg3, Vtx *arg4, s32 arg5, s32 arg6) { func_80042E00(arg0, arg1, arg2); gSPDisplayList(gDisplayListHead++, D_0D007948); - func_80043D50(arg3, arg5, arg6, &gDisplayListHead); + func_80043D50(arg3, arg5, arg6); func_80045B74(arg4); } @@ -3191,62 +2526,44 @@ void func_8004B72C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 - - +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b void func_8004B7DC(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { - void *temp_v1; - void *temp_v1_2; - void *temp_v1_3; - void *temp_v1_4; - void *temp_v1_5; - void *temp_v1_6; + Gfx *temp_v1; + Gfx *temp_v1_2; + Gfx *temp_v1_3; + Gfx *temp_v1_4; + Gfx *temp_v1_5; + Gfx *temp_v1_6; + + // These look like they should be gSPTextureRectangle, but that's not quite right... if (arg6 == 0) { - - gSPTextureRectangle - //gTexRect(gDisplayListHead++, ((arg0 + arg2) - 1) << 0xC, (arg1 + arg3) - 1, arg0, arg1, G_TX_RENDERTILE); - //gDPHalf2(gDisplayListHead++, arg4); - //gSPModifyVertex(gDisplayListHead++, 0, arg5, 0x10000400); - -/* temp_v1 = gDisplayListHead; gDisplayListHead = temp_v1 + 8; - temp_v1->unk4 = (((arg0 * 4) & 0xFFF) << 0xC) | ((arg1 * 4) & 0xFFF); - temp_v1->unk0 = (((((arg0 + arg2) - 1) * 4) & 0xFFF) << 0xC) | 0xE4000000 | ((((arg1 + arg3) - 1) * 4) & 0xFFF); + temp_v1->words.w0 = (((((arg0 + arg2) - 1) * 4) & 0xFFF) << 0xC) | 0xE4000000 | ((((arg1 + arg3) - 1) * 4) & 0xFFF); + temp_v1->words.w1 = (((arg0 * 4) & 0xFFF) << 0xC) | ((arg1 * 4) & 0xFFF); temp_v1_2 = gDisplayListHead; gDisplayListHead = temp_v1_2 + 8; - temp_v1_2->unk0 = 0xB3000000; - temp_v1_2->unk4 = (arg4 << 0x15) | ((arg5 << 5) & 0xFFFF); + temp_v1_2->words.w0 = 0xB3000000; + temp_v1_2->words.w1 = (arg4 << 0x15) | ((arg5 << 5) & 0xFFFF); temp_v1_3 = gDisplayListHead; gDisplayListHead = temp_v1_3 + 8; - temp_v1_3->unk0 = 0xB2000000; - temp_v1_3->unk4 = 0x10000400; - */ - - } else { - - //gSPTextureRectangle(gDisplayListHead++, arg0 << 0xC, arg1, arg0 + arg2 << 0xC, arg3, arg4, arg5); -/* - gTexRect(gDisplayListHead++, ((arg0 + arg2) - 1) << 0xC, (arg1 + arg3) - 1, arg0, arg1, G_TX_RENDERTILE); - gDPHalf2(gDisplayListHead++, arg4); - gSPModifyVertex(gDisplayListHead++, 0, arg5, 0x10000400); - */ -/* - temp_v1_4 = gDisplayListHead; - gDisplayListHead = temp_v1_4 + 8; - temp_v1_4->unk4 = (((arg0 * 4) & 0xFFF) << 0xC) | ((arg1 * 4) & 0xFFF); - temp_v1_4->unk0 = ((((arg0 + arg2) * 4) & 0xFFF) << 0xC) | 0xE4000000 | (((arg1 + arg3) * 4) & 0xFFF); - temp_v1_5 = gDisplayListHead; - gDisplayListHead = temp_v1_5 + 8; - temp_v1_5->unk0 = 0xB3000000; - temp_v1_5->unk4 = (arg4 << 0x15) | ((arg5 << 5) & 0xFFFF); - temp_v1_6 = gDisplayListHead; - gDisplayListHead = temp_v1_6 + 8; - temp_v1_6->unk0 = 0xB2000000; - temp_v1_6->unk4 = 0x4000400; - */ + temp_v1_3->words.w0 = 0xB2000000; + temp_v1_3->words.w1 = 0x10000400; + return; } + temp_v1_4 = gDisplayListHead; + gDisplayListHead = temp_v1_4 + 8; + temp_v1_4->words.w1 = (((arg0 * 4) & 0xFFF) << 0xC) | ((arg1 * 4) & 0xFFF); + temp_v1_4->words.w0 = ((((arg0 + arg2) * 4) & 0xFFF) << 0xC) | 0xE4000000 | (((arg1 + arg3) * 4) & 0xFFF); + temp_v1_5 = gDisplayListHead; + gDisplayListHead = temp_v1_5 + 8; + temp_v1_5->words.w0 = 0xB3000000; + temp_v1_5->words.w1 = (arg4 << 0x15) | ((arg5 << 5) & 0xFFFF); + temp_v1_6 = gDisplayListHead; + gDisplayListHead = temp_v1_6 + 8; + temp_v1_6->words.w0 = 0xB2000000; + temp_v1_6->words.w1 = 0x04000400; } #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004B7DC.s") @@ -4701,9 +4018,8 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004EF9C.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_8004CAD0(s32, s32, ? *); // extern -extern s8 D_0D02CC58; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +extern ? D_0D02CC58; extern s16 D_8018D2B0; extern s16 D_8018D2B8; extern s16 D_8018D2C0; @@ -4712,35 +4028,31 @@ extern s16 D_8018D2E0; extern s16 D_8018D2E8; extern s16 D_8018D2F0; extern s16 D_8018D2F8; +s16 gCurrentCourseId; /* unable to generate initializer */ void func_8004F020(s32 arg0) { - f32 temp_f0; + f32 var_f0; + f64 var_f16; s16 temp_v1; s32 temp_v0; - f32 phi_f0; - f64 phi_f16; temp_v0 = arg0 * 2; temp_v1 = gCurrentCourseId; - temp_f0 = ((*(&D_8018D2D8 + temp_v0) + D_8018D2F8) - (D_8018D2B8 / 2)) + D_8018D2E8; - phi_f0 = temp_f0; - if (temp_v1 != 0) { - if (temp_v1 != 1) { - if (temp_v1 != 0xB) { - - } else { - phi_f16 = temp_f0 + 4.0; - goto block_7; - } - } else { - phi_f0 = temp_f0 - 16.0; - } - } else { - phi_f16 = temp_f0 - 2.0; + var_f0 = (f32) (((*(&D_8018D2D8 + temp_v0) + D_8018D2F8) - ((s16) D_8018D2B8 / 2)) + D_8018D2E8); + switch (temp_v1) { /* irregular */ + case 0: + var_f16 = (f64) var_f0 - 2.0; block_7: - phi_f0 = phi_f16; + var_f0 = (f32) var_f16; + break; + case 1: + var_f0 = (f32) ((f64) var_f0 - 16.0); + break; + case 11: + var_f16 = (f64) var_f0 + 4.0; + goto block_7; } - func_8004CAD0(((*(&D_8018D2C0 + temp_v0) + D_8018D2F0) - (D_8018D2B0 / 2)) + D_8018D2E0, phi_f0, &D_0D02CC58); + func_8004CAD0((s32) (f32) (((*(&D_8018D2C0 + temp_v0) + D_8018D2F0) - ((s16) D_8018D2B0 / 2)) + D_8018D2E0), (s32) var_f0, (s32) &D_0D02CC58); } #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_8004F020.s") @@ -5039,67 +4351,62 @@ void func_8004F9CC(s32 arg0, s32 arg1, s32 arg2) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 792017ad9d422c2467bd42686f383a5c41f41c75 -void func_8004CB90(s32, s32, ? *); /* extern */ -void func_8004F9CC(s16, s16, u32); /* extern */ -void print_timer(s16, s16, u32); /* extern */ -extern s8 D_0D00BD58; -extern s8 D_0D00C158; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +extern ? D_0D00BD58; +extern ? D_0D00C158; extern s32 D_80165658; extern s8 D_801657E3; extern s8 D_801657E5; extern s32 D_8018D320; void func_8004FA78(s32 playerId) { - s32 temp_s0; + s32 *var_s3; s32 temp_v0; + s32 var_s0; struct_8018CA70_entry *temp_s4; - s32 *phi_s3; - struct_8018CA70_entry *phi_s1; - s32 phi_s0; - struct_8018CA70_entry *phi_s2; + struct_8018CA70_entry *var_s1; + struct_8018CA70_entry *var_s2; temp_v0 = gModeSelection; if ((temp_v0 != VERSUS) && (temp_v0 != BATTLE)) { temp_s4 = &D_8018CA70[playerId]; if (D_8018D320 == temp_s4->lapCount) { - phi_s3 = &D_80165658; - phi_s1 = temp_s4; + var_s3 = &D_80165658; + var_s1 = temp_s4; if (D_8015F890 == 0) { - phi_s0 = 0; - phi_s2 = temp_s4; + var_s0 = 0; + var_s2 = temp_s4; do { - if (*phi_s3 == 0) { - print_timer(phi_s1->lap1CompletionTimeX, temp_s4->timerY + phi_s0, phi_s2->lap1Duration); + if (*var_s3 == 0) { + print_timer((s32) var_s1->lap1CompletionTimeX, temp_s4->timerY + var_s0, (s32) var_s2->lap1Duration); } else { - func_8004F9CC(phi_s1->lap1CompletionTimeX, temp_s4->timerY + phi_s0, phi_s2->lap1Duration); + func_8004F9CC((s32) var_s1->lap1CompletionTimeX, temp_s4->timerY + var_s0, (s32) var_s2->lap1Duration); } - temp_s0 = phi_s0 + 0x10; - phi_s3 += 4; - phi_s1 += 2; - phi_s0 = temp_s0; - phi_s2 += 4; - } while (temp_s0 != 0x30); - func_8004CB90(temp_s4->totalTimeX - 0x13, temp_s4->timerY + 0x38, &D_0D00BD58); + var_s0 += 0x10; + var_s3 += 4; + var_s1 += 2; + var_s2 += 4; + } while (var_s0 != 0x30); + func_8004CB90(temp_s4->totalTimeX - 0x13, temp_s4->timerY + 0x38, (s32) &D_0D00BD58); if (D_801657E5 != 0) { - func_8004F9CC(temp_s4->totalTimeX, temp_s4->timerY + 0x30, temp_s4->someTimer); + func_8004F9CC((s32) temp_s4->totalTimeX, temp_s4->timerY + 0x30, (s32) temp_s4->someTimer); return; } - print_timer(temp_s4->totalTimeX, temp_s4->timerY + 0x30, temp_s4->someTimer); + print_timer((s32) temp_s4->totalTimeX, temp_s4->timerY + 0x30, (s32) temp_s4->someTimer); } } else { if (temp_s4->blinkTimer == 0) { - func_8004CB90(temp_s4->timerX - 0x13, temp_s4->timerY + 8, &D_0D00C158); - print_timer(temp_s4->timerX, temp_s4->timerY, temp_s4->someTimer); + func_8004CB90(temp_s4->timerX - 0x13, temp_s4->timerY + 8, (s32) &D_0D00C158); + print_timer((s32) temp_s4->timerX, (s32) temp_s4->timerY, (s32) temp_s4->someTimer); return; } - func_8004CB90(temp_s4->timerX - 0x13, temp_s4->timerY + 8, (? *)0x0D00AD58); + func_8004CB90(temp_s4->timerX - 0x13, temp_s4->timerY + 8, 0x0D00AD58); if (D_801657E3 != 0) { - func_8004F9CC(temp_s4->timerX, temp_s4->timerY, temp_s4->someTimer1); + func_8004F9CC((s32) temp_s4->timerX, (s32) temp_s4->timerY, (s32) temp_s4->someTimer1); return; } if (temp_s4->blinkState == 0) { - print_timer(temp_s4->timerX, temp_s4->timerY, temp_s4->someTimer1); + print_timer((s32) temp_s4->timerX, (s32) temp_s4->timerY, (s32) temp_s4->someTimer1); } } } @@ -5427,59 +4734,52 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80050320.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -extern f32 gLapCompletionPercentByPlayerId; -extern s32 gLapCountByPlayerId; - -s32 func_80050644(s32 arg0, s32 *arg1, s32 *arg2) { +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +s32 func_80050644(s32 playerId, s32 *arg1, s32 *arg2) { s32 temp_a3; - s32 temp_t0; s32 temp_t6; - s32 phi_v0; - s32 phi_v0_2; + s32 var_v0; - temp_t6 = arg0 & 0xFFFF; - temp_t0 = temp_t6 * 4; - temp_a3 = *(&gLapCountByPlayerId + temp_t0); - phi_v0 = 0; - phi_v0_2 = 0; + temp_t6 = playerId & 0xFFFF; + temp_a3 = gLapCountByPlayerId[temp_t6]; + var_v0 = 0; if (temp_a3 < 3) { if (gPlayerCountSelection1 == 1) { if (temp_a3 >= 0) { - phi_v0 = *(&gLapCompletionPercentByPlayerId + temp_t0) * 928.0f; + var_v0 = (s32) (gLapCompletionPercentByPlayerId[temp_t6] * 928.0f); } - if (phi_v0 < 0x104) { - *arg1 = phi_v0; + if (var_v0 < 0x104) { + *arg1 = var_v0; *arg2 = 0; return 1; } - if (phi_v0 < 0x1D0) { - *arg1 = 0x104; - *arg2 = phi_v0 - 0x104; + if (var_v0 < 0x1D0) { + *arg1 = 0x00000104; + *arg2 = var_v0 - 0x104; return 2; } - if (phi_v0 < 0x2D4) { - *arg1 = 0x2D4 - phi_v0; - *arg2 = 0xCC; + if (var_v0 < 0x2D4) { + *arg1 = 0x2D4 - var_v0; + *arg2 = 0x000000CC; return 3; } *arg1 = 0; - *arg2 = 0x3A0 - phi_v0; + *arg2 = 0x3A0 - var_v0; return 4; } if (temp_a3 >= 0) { - phi_v0_2 = *(&gLapCompletionPercentByPlayerId + temp_t0) * 260.0f; + var_v0 = (s32) (gLapCompletionPercentByPlayerId[temp_t6] * 260.0f); } - *arg1 = phi_v0_2; + *arg1 = var_v0; *arg2 = 0; return 0; } if (gPlayerCountSelection1 == 1) { - *arg1 = 0x20; + *arg1 = 0x00000020; *arg2 = (gPlayerPositions[temp_t6] * 0x14) + 0x20; return 0; } - *arg1 = *(&gLapCompletionPercentByPlayerId + temp_t0) * 260.0f; + *arg1 = (s32) (gLapCompletionPercentByPlayerId[temp_t6] * 260.0f); *arg2 = 0; return 0; } @@ -5524,9 +4824,9 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800507D8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -void func_8004C024(s16, ?, s16, s32, s32, s32, s32); /* extern */ -void func_8004C148(?, s16, s16, s32, s32, s32, s32); /* extern */ +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +u32 func_80050644(s32, s32 *, s32 *); /* extern */ +extern s16 D_80164378; void func_800508C0(void) { s32 sp54; @@ -5536,91 +4836,89 @@ void func_800508C0(void) { u16 sp42; u16 sp40; u16 sp3E; + s16 var_s0; s32 temp_v1; - s16 phi_s0; - u16 phi_s0_2; - s32 phi_s1; - s32 phi_s2; - u16 phi_s0_3; - s32 phi_s1_2; - s32 phi_s2_2; + s32 var_s1; + s32 var_s2; + u16 var_s0_2; + u16 var_s0_3; + u16 var_s1_2; + u16 var_s2_2; - if (gModeSelection == TIME_TRIALS) { - phi_s0 = D_80164378; + if (gModeSelection == 1) { + var_s0 = D_80164378; } else { - phi_s0 = gGPCurrentRacePlayerIdByRank; + var_s0 = *gGPCurrentRacePlayerIdByRank; } - temp_v1 = gLapCountByPlayerId[phi_s0]; - sp4C = func_80050644(phi_s0 & 0xFFFF, &sp54, &sp50); + temp_v1 = gLapCountByPlayerId[var_s0]; + sp4C = func_80050644(var_s0 & 0xFFFF, &sp54, &sp50); if (temp_v1 > 0) { if (temp_v1 == 1) { - phi_s0_2 = 0; - phi_s1 = 0; - phi_s2 = 0xFF; + var_s0_2 = 0; + var_s1 = 0; + var_s2 = 0x000000FF; } else { + var_s0_2 = 0x00FF; if (temp_v1 == 2) { - phi_s1 = 0xFF; + var_s0_2 = 0x00FF; + var_s1 = 0x000000FF; } else { - phi_s1 = 0; + var_s1 = 0; } - phi_s0_2 = 0xFF; - phi_s2 = 0; + var_s2 = 0; } sp48 = temp_v1; - func_8004C024(0x20, 0x12, 0x104, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); - func_8004C148(0x124, 0x12, 0xCC, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); - func_8004C024(0x20, 0xDE, 0x104, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); - func_8004C148(0x20, 0x12, 0xCC, phi_s0_2 & 0xFFFF, phi_s1, phi_s2, 0xFF); - sp42 = phi_s0_2; - sp40 = phi_s1; - sp3E = phi_s2; + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_2 & 0xFFFF, (u16) var_s1, (u16) var_s2, (u16) 0x000000FF); + func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_2 & 0xFFFF, (u16) var_s1, (u16) var_s2, (u16) 0x000000FF); + func_8004C024(0x0020, 0x00DE, 0x0104, var_s0_2 & 0xFFFF, (u16) var_s1, (u16) var_s2, (u16) 0x000000FF); + func_8004C148(0x0020, 0x0012, 0x00CC, var_s0_2 & 0xFFFF, (u16) var_s1, (u16) var_s2, (u16) 0x000000FF); + sp42 = var_s0_2; + sp40 = (u16) var_s1; + sp3E = (u16) var_s2; } - phi_s0_3 = sp42; - phi_s1_2 = sp40; - phi_s2_2 = sp3E; - if ((gLapCountByPlayerId[phi_s0] >= 0) && (gLapCountByPlayerId[phi_s0] < 3)) { - if (gLapCountByPlayerId[phi_s0] != 0) { - if (gLapCountByPlayerId[phi_s0] != 1) { - if (gLapCountByPlayerId[phi_s0] != 2) { - - } else { - phi_s1_2 = 0; - goto block_20; - } - } else { - phi_s1_2 = 0xFF; -block_20: - phi_s0_3 = 0xFF; - phi_s2_2 = 0; - } - } else { - phi_s0_3 = 0; - phi_s1_2 = 0; - phi_s2_2 = 0xFF; - } + var_s0_3 = sp42; + var_s1_2 = sp40; + var_s2_2 = sp3E; + switch (temp_v1) { /* switch 1; irregular */ + case 0: /* switch 1 */ + var_s0_3 = 0; + var_s1_2 = 0; + var_s2_2 = 0x00FF; + default: /* switch 1 */ +block_21: switch (sp4C) { case 1: - func_8004C024(0x20, 0x12, sp54, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C024(0x0020, 0x0012, (s16) sp54, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); return; case 2: - func_8004C024(0x20, 0x12, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - func_8004C148(0x124, 0x12, sp50, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + func_8004C148(0x0124, 0x0012, (s16) sp50, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); return; case 3: - func_8004C024(0x20, 0x12, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - func_8004C148(0x124, 0x12, 0xCC, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - func_8004C024(sp54 + 0x20, 0xDE, 0x104 - sp54, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + func_8004C024((s16) (sp54 + 0x20), 0x00DE, (s16) (0x104 - sp54), var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); return; case 4: - func_8004C024(0x20, 0x12, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - func_8004C148(0x124, 0x12, 0xCC, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - func_8004C024(0x20, 0xDE, 0x104, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - func_8004C148(0x20, sp50 + 0x12, 0xCC - sp50, phi_s0_3 & 0xFFFF, phi_s1_2, phi_s2_2, 0xFF); - /* Duplicate return node #27. Try simplifying control flow for better match */ + func_8004C024(0x0020, 0x0012, 0x0104, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + func_8004C148(0x0124, 0x0012, 0x00CC, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + func_8004C024(0x0020, 0x00DE, 0x0104, var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + func_8004C148(0x0020, (s16) (sp50 + 0x12), (s16) (0xCC - sp50), var_s0_3 & 0xFFFF, (u16) (s32) var_s1_2, (u16) (s32) var_s2_2, (u16) 0x000000FF); + /* fallthrough */ + default: return; } - } else { - default: + break; + case 1: /* switch 1 */ + var_s0_3 = 0x00FF; + var_s1_2 = 0x00FF; +block_20: + var_s2_2 = 0; + goto block_21; + case 2: /* switch 1 */ + var_s0_3 = 0x00FF; + var_s1_2 = 0; + goto block_20; } } #else @@ -6481,107 +5779,102 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800520C0.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80042E00(void *, void *, s32, s32); // extern -void func_800520C0(s32); // extern -s32 func_8007223C(s32, ?, s32); // extern +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +? func_800520C0(s32); /* extern */ extern ? D_06007650; extern ? D_060078C0; extern ? D_06007978; extern ? D_06007B38; -extern Gfx D_0D007828; -extern ? D_800E45C0; -extern ? D_800E45C8; -extern ? D_800E45D8; -extern ? D_800E45E0; -extern ? D_800E45F0; -extern ? D_800E45F8; -extern ? D_800E4608; -extern ? D_800E4610; -extern struct_80165C18_entry D_80165C18; -extern s32 D_80183F28; - +extern ? D_0D007828; +static ? D_800E45C0; /* unable to generate initializer */ +static ? D_800E45C8; /* unable to generate initializer */ +static ? D_800E45D8; /* unable to generate initializer */ +static ? D_800E45E0; /* unable to generate initializer */ +static ? D_800E45F0; /* unable to generate initializer */ +static ? D_800E45F8; /* unable to generate initializer */ +static ? D_800E4608; /* unable to generate initializer */ +static ? D_800E4610; /* unable to generate initializer */ void func_8005217C(s32 arg0) { s32 sp50; - void *sp18; + struct_80165C18_entry *sp18; + Gfx *temp_v0; + Gfx *temp_v0_10; + Gfx *temp_v0_11; + Gfx *temp_v0_12; + Gfx *temp_v0_13; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + Gfx *temp_v0_4; + Gfx *temp_v0_5; + Gfx *temp_v0_6; + Gfx *temp_v0_7; + Gfx *temp_v0_8; + Gfx *temp_v0_9; s32 temp_a3; - void *temp_v0; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - void *temp_v1; + struct_80165C18_entry *temp_v1; - temp_a3 = D_80183F28; - temp_v1 = (temp_a3 * 0xE0) + &D_80165C18; - if (temp_v1->unkA6 >= 2) { + temp_a3 = *D_80183F28; + temp_v1 = &D_80165C18[temp_a3]; + if (temp_v1->unk_0A6 >= 2) { sp18 = temp_v1; sp50 = temp_a3; - if (func_8007223C(temp_a3, 0x10, temp_a3) != 0) { + if (func_8007223C(temp_a3, 0x00000010) != 0) { sp50 = temp_a3; - func_80042E00(temp_v1 + 4, temp_v1 + 0xBE, temp_v1->unk0, temp_a3); + func_80042E00(temp_v1->unk_004, (s16 *) temp_v1->unk_0BE, temp_v1->unk_000); func_800520C0(sp50); temp_v0 = gDisplayListHead; gDisplayListHead = temp_v0 + 8; - temp_v0->unk4 = &D_0D007828; - temp_v0->unk0 = 0x6000000; + temp_v0->words.w1 = (u32) &D_0D007828; + temp_v0->words.w0 = 0x06000000; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = &D_800E45C8; - temp_v0_2->unk0 = 0x3860010; + temp_v0_2->words.w1 = (u32) &D_800E45C8; + temp_v0_2->words.w0 = 0x03860010; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk4 = &D_800E45C0; - temp_v0_3->unk0 = 0x3880010; + temp_v0_3->words.w1 = (u32) &D_800E45C0; + temp_v0_3->words.w0 = 0x03880010; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = &D_06007B38; - temp_v0_4->unk0 = 0x6000000; + temp_v0_4->words.w1 = (u32) &D_06007B38; + temp_v0_4->words.w0 = 0x06000000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = &D_800E45E0; - temp_v0_5->unk0 = 0x3860010; + temp_v0_5->words.w1 = (u32) &D_800E45E0; + temp_v0_5->words.w0 = 0x03860010; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = &D_800E45D8; - temp_v0_6->unk0 = 0x3880010; + temp_v0_6->words.w1 = (u32) &D_800E45D8; + temp_v0_6->words.w0 = 0x03880010; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = &D_06007978; - temp_v0_7->unk0 = 0x6000000; + temp_v0_7->words.w1 = (u32) &D_06007978; + temp_v0_7->words.w0 = 0x06000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = &D_800E45F8; - temp_v0_8->unk0 = 0x3860010; + temp_v0_8->words.w1 = (u32) &D_800E45F8; + temp_v0_8->words.w0 = 0x03860010; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk4 = &D_800E45F0; - temp_v0_9->unk0 = 0x3880010; + temp_v0_9->words.w1 = (u32) &D_800E45F0; + temp_v0_9->words.w0 = 0x03880010; temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk4 = &D_060078C0; - temp_v0_10->unk0 = 0x6000000; + temp_v0_10->words.w1 = (u32) &D_060078C0; + temp_v0_10->words.w0 = 0x06000000; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = &D_800E4610; - temp_v0_11->unk0 = 0x3860010; + temp_v0_11->words.w1 = (u32) &D_800E4610; + temp_v0_11->words.w0 = 0x03860010; temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = &D_800E4608; - temp_v0_12->unk0 = 0x3880010; + temp_v0_12->words.w1 = (u32) &D_800E4608; + temp_v0_12->words.w0 = 0x03880010; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = &D_06007650; - temp_v0_13->unk0 = 0x6000000; + temp_v0_13->words.w1 = (u32) &D_06007650; + temp_v0_13->words.w0 = 0x06000000; } } } @@ -7145,76 +6438,54 @@ void func_8005327C(s32 arg0) { } #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s16 func_800418AC(f32, f32, s32); // extern -void func_800480B4(void *, void *, s32, s32, s32, s32, s32, s32, s32, s32); // extern -void func_800485C4(void *, void *, s32, s16, s32, s32, s32, s32, s32, s32, s32); // extern -void func_8004A630(f32, void *, void *, ?); // extern -s32 func_8007223C(s32, ?, s32); // extern -s32 func_80072354(s32, ?); // extern -extern struct_80165C18_entry D_80165C18; -extern s32 D_80183DB8; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +? func_8004A630(f32, void *, f32 *, ?); /* extern */ +extern ? D_80183DB8; extern ? D_8018C0B0; extern void *D_8018CF14; -void func_800532A4(s32 arg0) { +void func_800532A4(s32 cameraId) { s32 sp44; - f32 temp_f0; - f32 temp_f2; + Camera *temp_s1; + f32 var_f0; + f32 var_f2; s32 temp_a0; - s32 temp_a2; - s32 temp_s1; - s32 temp_t7; + struct_80165C18_entry *temp_s0; u8 temp_v0; u8 temp_v0_2; u8 temp_v1; u8 temp_v1_2; - void *temp_s0; - void *temp_s1_2; - void *temp_s1_3; void *temp_v0_3; - f32 phi_f0; - f32 phi_f2; - void *phi_s1; - temp_a2 = arg0; - temp_a0 = *(&D_80183DB8 + (arg0 * 4)); - temp_t7 = temp_a2 * 0xB8; - arg0 = temp_a2; + temp_a0 = *(&D_80183DB8 + (cameraId * 4)); sp44 = temp_a0; - temp_s1 = temp_t7 + camera1; - if (func_8007223C(temp_a0, 0x10, temp_a2) != 0) { - temp_s0 = (sp44 * 0xE0) + &D_80165C18; - temp_s0->unkB2 = 0; - temp_s0->unkB4 = func_800418AC(temp_s0->unk4, temp_s0->unkC, temp_s1); - temp_s0->unkB6 = 0x8000; - temp_s1_2 = temp_s0 + 4; - phi_s1 = temp_s1_2; + temp_s1 = &camera1[cameraId]; + if (func_8007223C(temp_a0, 0x00000010) != 0) { + temp_s0 = &D_80165C18[sp44]; + temp_s0->unk_0B2 = 0; + temp_s0->unk_0B4 = func_800418AC(temp_s0->unk_004[0], temp_s0->unk_004[2], temp_s1->pos); + temp_s0->unk_0B6 = 0x8000; if (func_80072354(sp44, 2) != 0) { - temp_v1 = temp_s0->unkDA; - temp_v0 = temp_s0->unkD9; - temp_s1_3 = temp_s0 + 4; - func_800480B4(temp_s1_3, temp_s0 + 0xB2, temp_s0->unk0, temp_s0->unk60, temp_s0->unk64, temp_s0->unk74, temp_v0, temp_v1, temp_v0, temp_v1 / 2); - phi_s1 = temp_s1_3; + temp_v1 = temp_s0->unk_0DA; + temp_v0 = temp_s0->unk_0D9; + func_800480B4((s32) temp_s0->unk_004, (s32) &temp_s0->unk_0B2, temp_s0->unk_000, (s32) temp_s0->unk_060, (s32) temp_s0->unk_064, temp_s0->unk_074, (s32) temp_v0, (s32) temp_v1, (s32) temp_v0, (s32) temp_v1 / 2); } else { - temp_v1_2 = temp_s0->unkDA; - temp_v0_2 = temp_s0->unkD9; - func_800485C4(temp_s1_2, temp_s0 + 0xB2, temp_s0->unk0, temp_s0->unkA0, temp_s0->unk60, temp_s0->unk64, temp_s0->unk74, temp_v0_2, temp_v1_2, temp_v0_2, temp_v1_2 / 2); + temp_v1_2 = temp_s0->unk_0DA; + temp_v0_2 = temp_s0->unk_0D9; + func_800485C4((s32) temp_s0->unk_004, (s32) &temp_s0->unk_0B2, temp_s0->unk_000, (s32) temp_s0->unk_0A0, (s32) temp_s0->unk_060, (s32) temp_s0->unk_064, temp_s0->unk_074, (s32) temp_v0_2, (s32) temp_v1_2, (s32) temp_v0_2, (s32) temp_v1_2 / 2); } - if (gScreenModeSelection == SCREEN_MODE_1P) { + if (gScreenModeSelection == 0) { temp_v0_3 = D_8018CF14; - temp_f0 = temp_s0->unk4 - temp_v0_3->unk0; - temp_f2 = temp_s0->unkC - temp_v0_3->unk8; - phi_f0 = temp_f0; - phi_f2 = temp_f2; - if (temp_f0 < 0.0f) { - phi_f0 = -temp_f0; + var_f0 = temp_s0->unk_004[0] - temp_v0_3->unk0; + var_f2 = temp_s0->unk_004[2] - temp_v0_3->unk8; + if (var_f0 < 0.0f) { + var_f0 = -var_f0; } - if (temp_f2 < 0.0f) { - phi_f2 = -temp_f2; + if (var_f2 < 0.0f) { + var_f2 = -var_f2; } - if ((phi_f0 + phi_f2) <= 200.0) { - func_8004A630(0.0f, (arg0 << 6) + &D_8018C0B0, phi_s1, 0x3EB33333); + if ((f64) (var_f0 + var_f2) <= 200.0) { + func_8004A630(0.0f, (cameraId << 6) + &D_8018C0B0, temp_s0->unk_004, 0x3EB33333); } } } @@ -7239,23 +6510,50 @@ void func_800534A4(s32 arg0) { GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800534A4.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 -extern ? D_80165CBC; -static ? D_800E4638; /* unable to generate initializer; const */ -static ? D_800E4640; /* unable to generate initializer; const */ -static ? D_800E4650; /* unable to generate initializer; const */ -static ? D_800E4658; /* unable to generate initializer; const */ -static ? D_800E4668; /* unable to generate initializer; const */ -static ? D_800E4670; /* unable to generate initializer; const */ -static ? D_800E4680; /* unable to generate initializer; const */ -static ? D_800E4688; /* unable to generate initializer; const */ -static ? D_800E4698; /* unable to generate initializer; const */ -static ? D_800E46A0; /* unable to generate initializer; const */ +#ifdef NEEDS_RODATA +// jpt_800EE068 +// I guess this also needs all those Light1's too, which are plain data (I think) -void func_800534E8(s32 arg0) { +void func_800534E8(s32 objectIndex) { + // I don't get why all of theses weren't just `gSPSetLights1` calls... + switch (D_80165C18[objectIndex].unk_0A4) { + case 0: + gSPLight(gDisplayListHead++, &D_800E4638.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4638.a, LIGHT_2); + break; + case 1: + gSPLight(gDisplayListHead++, &D_800E4650.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4650.a, LIGHT_2); + break; + case 2: + gSPLight(gDisplayListHead++, &D_800E4668.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4668.a, LIGHT_2); + break; + case 3: + gSPLight(gDisplayListHead++, &D_800E4680.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4680.a, LIGHT_2); + break; + case 4: + gSPLight(gDisplayListHead++, &D_800E4698.l[0], LIGHT_1); + gSPLight(gDisplayListHead++, &D_800E4698.a, LIGHT_2); + break; + default: + break; + } +} +#else +GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800534E8.s") +#endif + +#ifdef MIPS_TO_C +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +? func_8004A7AC(s32, ?); /* extern */ +extern ? D_06006F38; +extern ? D_0D007828; + +void func_800536C8(s32 objectIndex) { + Gfx *sp20; Gfx *temp_v0; - Gfx *temp_v0_10; Gfx *temp_v0_2; Gfx *temp_v0_3; Gfx *temp_v0_4; @@ -7264,136 +6562,51 @@ void func_800534E8(s32 arg0) { Gfx *temp_v0_7; Gfx *temp_v0_8; Gfx *temp_v0_9; - u16 temp_t7; + struct_80165C18_entry *temp_s0; - temp_t7 = *(&D_80165CBC + (arg0 * 0xE0)); - switch (temp_t7) { - case 0: + temp_s0 = &D_80165C18[objectIndex]; + if ((temp_s0->unk_0A6 >= 2) && (func_80072354(objectIndex, 0x00000040) != 0)) { + func_8004A7AC(objectIndex, 0x3FE00000); + func_80042E00(temp_s0->unk_004, (s16 *) &temp_s0->unk_0B2, temp_s0->unk_000); + func_800534E8(objectIndex); temp_v0 = gDisplayListHead; gDisplayListHead = temp_v0 + 8; - temp_v0->words.w0 = 0x3860010; - temp_v0->words.w1 = &D_800E4640; + temp_v0->words.w0 = 0x06000000; + temp_v0->words.w1 = (u32) &D_0D007828; temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->words.w0 = 0x3880010; - temp_v0_2->words.w1 = &D_800E4638; - return; - case 1: + temp_v0_2->words.w1 = 0x00008000; + temp_v0_2->words.w0 = 0xBA000E02; temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->words.w0 = 0x3860010; - temp_v0_3->words.w1 = &D_800E4658; + temp_v0_3->words.w0 = 0xFD100000; + temp_v0_3->words.w1 = (u32) &D_06006F38; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->words.w0 = 0x3880010; - temp_v0_4->words.w1 = &D_800E4650; - return; - case 2: + temp_v0_4->words.w1 = 0; + temp_v0_4->words.w0 = 0xE8000000; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->words.w0 = 0x3860010; - temp_v0_5->words.w1 = &D_800E4670; + temp_v0_5->words.w1 = 0x07000000; + temp_v0_5->words.w0 = 0xF5000100; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->words.w0 = 0x3880010; - temp_v0_6->words.w1 = &D_800E4668; - return; - case 3: + temp_v0_6->words.w1 = 0; + temp_v0_6->words.w0 = 0xE6000000; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->words.w0 = 0x3860010; - temp_v0_7->words.w1 = &D_800E4688; - temp_v0_8 = gDisplayListHead; - gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->words.w0 = 0x3880010; - temp_v0_8->words.w1 = &D_800E4680; - return; - case 4: - temp_v0_9 = gDisplayListHead; - gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->words.w0 = 0x3860010; - temp_v0_9->words.w1 = &D_800E46A0; - temp_v0_10 = gDisplayListHead; - gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->words.w0 = 0x3880010; - temp_v0_10->words.w1 = &D_800E4698; - /* fallthrough */ - default: - return; - } -} -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800534E8.s") -#endif - -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80042E00(void *, void *, s32); // extern -void func_8004544C(s32, ?, ?, ?); // extern -void func_8004A7AC(s32, ?); // extern -void func_800534E8(s32); // extern -s32 func_80072354(?); // extern -extern s32 D_06006F38; -extern Gfx D_0D007828; -extern struct_80165C18_entry D_80165C18; - - -void func_800536C8(s32 arg0) { - void *sp20; - void *temp_s0; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - - temp_s0 = (arg0 * 0xE0) + &D_80165C18; - if ((temp_s0->unkA6 >= 2) && (func_80072354(0x40) != 0)) { - func_8004A7AC(arg0, 0x3FE00000); - func_80042E00(temp_s0 + 4, temp_s0 + 0xB2, temp_s0->unk0); - func_800534E8(arg0); - temp_v0 = gDisplayListHead; - gDisplayListHead = temp_v0 + 8; - temp_v0->unk0 = 0x6000000; - temp_v0->unk4 = &D_0D007828; - temp_v0_2 = gDisplayListHead; - gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk4 = 0x8000; - temp_v0_2->unk0 = 0xBA000E02; - temp_v0_3 = gDisplayListHead; - gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0xFD100000; - temp_v0_3->unk4 = &D_06006F38; - temp_v0_4 = gDisplayListHead; - gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0; - temp_v0_4->unk0 = 0xE8000000; - temp_v0_5 = gDisplayListHead; - gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x7000000; - temp_v0_5->unk0 = 0xF5000100; - temp_v0_6 = gDisplayListHead; - gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = 0; - temp_v0_6->unk0 = 0xE6000000; - temp_v0_7 = gDisplayListHead; - gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = 0x73FC000; - temp_v0_7->unk0 = 0xF0000000; + temp_v0_7->words.w1 = 0x073FC000; + temp_v0_7->words.w0 = 0xF0000000; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; sp20 = temp_v0_8; - temp_v0_8->unk4 = 0; - temp_v0_8->unk0 = 0xE7000000; - func_8004544C(temp_s0->unk64, 0x10, 0x40, 4); + temp_v0_8->words.w1 = 0; + temp_v0_8->words.w0 = 0xE7000000; + func_8004544C((s8 *) temp_s0->unk_064, 0x00000010, 0x00000040, 4); temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk0 = 0x6000000; - temp_v0_9->unk4 = temp_s0->unk70; + temp_v0_9->words.w0 = 0x06000000; + temp_v0_9->words.w1 = (u32) temp_s0->unk_070; } } #else @@ -7401,232 +6614,204 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_800536C8.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s16 func_800418AC(f32, f32, s32); // extern -void func_80042E00(void *, void *, s32, s32 *); // extern -void func_800431B0(void *, ? *, s32, ? *); // extern -void func_80043D50(? *, ?, ?); // extern -void func_800444B0(s32, ?, ?, u32); // extern -void func_8004B138(?, ?, ?, s16); // extern -void func_8004B3C8(?); // extern -void func_800534A4(s32); // extern -void func_800536C8(s32); // extern -void func_800721E8(s32, ?); // extern -void func_800722CC(s32, ?); // extern -s32 func_8008A140(s32, s32, ?); // extern -extern ? D_06006738; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +? func_800534A4(s32); /* extern */ +? func_800536C8(s32); /* extern */ +extern s8 D_06006738; extern Vtx D_0D005AE0; -extern Vtx D_0D005C00; -extern Gfx D_0D006930; -extern Gfx D_0D0079C8; -extern Gfx D_0D007AE0; -extern ? D_800E4668; -extern ? D_800E4670; +extern ? D_0D005C00; +extern ? D_0D006930; +extern ? D_0D0079C8; +extern ? D_0D007AE0; extern s16 D_80165750; -extern struct_80165C18_entry D_80165C18; extern s16 D_80183E80; -extern s32 D_80183EA0; extern s32 D_8018C3F0; extern ? D_8018C5F0; extern s32 D_8018C630; extern ? D_8018C830; -extern s16 D_8018CF68; -extern s32 D_8018D120; -extern s32 D_8018D490; +extern s8 *D_8018D490; +extern s32 gGamestate; +static ? D_800E4668; /* unable to generate initializer */ +static ? D_800E4670; /* unable to generate initializer */ - -void func_80053870(s32 arg0) { +void func_80053870(s32 cameraId) { s32 sp94; - s32 sp84; + Camera *sp84; s32 *sp44; + 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_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; s16 temp_v0_2; - s32 *temp_s0; - s32 *temp_s3; + s32 *var_a3; + s32 *var_s0; + s32 *var_s0_2; + s32 *var_s3; + s32 *var_v1; s32 temp_s1; s32 temp_s1_2; s32 temp_s1_3; s32 temp_s1_4; - s32 temp_s2; - u32 temp_a3; + s32 var_s2; + struct_80165C18_entry *temp_s0; + struct_80165C18_entry *temp_s0_2; u8 temp_v0; - void *temp_s0_2; - void *temp_s0_3; - void *temp_v0_10; - void *temp_v0_11; - void *temp_v0_12; - void *temp_v0_13; - void *temp_v0_14; - void *temp_v0_15; - void *temp_v0_3; - void *temp_v0_4; - void *temp_v0_5; - void *temp_v0_6; - void *temp_v0_7; - void *temp_v0_8; - void *temp_v0_9; - s32 *phi_s0; - s32 phi_s2; - s32 *phi_s0_2; - u32 phi_v1; - s32 *phi_a3; - s32 *phi_s3; - sp84 = (arg0 * 0xB8) + camera1; - if (arg0 == 0) { - phi_s0 = &D_80183EA0; - phi_s2 = 0; + sp84 = &camera1[cameraId]; + if (cameraId == 0) { + var_s0 = D_80183EA0; + var_s2 = 0; if (D_80165750 > 0) { do { - temp_s1 = *phi_s0; - func_800721E8(temp_s1, 0x70000); - func_800722CC(temp_s1, 0x110); - temp_s2 = phi_s2 + 1; - phi_s0 += 4; - phi_s2 = temp_s2; - } while (temp_s2 < D_80165750); + temp_s1 = *var_s0; + func_800721E8(temp_s1, 0x00070000); + func_800722CC(temp_s1, 0x00000110); + var_s2 += 1; + var_s0 += 4; + } while (var_s2 < D_80165750); sp94 = temp_s1; } } func_800534A4(sp94); - phi_s0_2 = &D_80183EA0; + var_s0_2 = D_80183EA0; if (D_80165750 > 0) { do { - temp_s1_2 = *phi_s0_2; - temp_v0 = (&D_80165C18 + (temp_s1_2 * 0xE0))->unkDF; - if (gGamestate != CREDITS_SEQUENCE) { - temp_v0_2 = *(&D_8018CF68 + (arg0 * 2)); - if ((temp_v0_2 >= (temp_v0 - 1)) && ((temp_v0 + 1) >= temp_v0_2) && (func_8008A140(temp_s1_2, sp84, 0x8000) != 0)) { + temp_s1_2 = *var_s0_2; + temp_v0 = D_80165C18[temp_s1_2].unk_0DF; + if (gGamestate != 9) { + temp_v0_2 = D_8018CF68[cameraId]; + if ((temp_v0_2 >= (s16) (temp_v0 - 1)) && ((s16) (temp_v0 + 1) >= temp_v0_2) && (func_8008A140(temp_s1_2, sp84, 0x8000U) != 0)) { func_800536C8(temp_s1_2); } - phi_v1 = (D_80165750 * 4) + &D_80183EA0; + var_v1 = &D_80183EA0[D_80165750]; } else { func_800536C8(temp_s1_2); - phi_v1 = (D_80165750 * 4) + &D_80183EA0; + var_v1 = &D_80183EA0[D_80165750]; } - temp_s0 = phi_s0_2 + 4; - phi_s0_2 = temp_s0; - } while (temp_s0 < phi_v1); + var_s0_2 += 4; + } while ((u32) var_s0_2 < (u32) var_v1); } temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0x6000000; - temp_v0_3->unk4 = &D_0D0079C8; + temp_v0_3->words.w0 = 0x06000000; + temp_v0_3->words.w1 = (u32) &D_0D0079C8; temp_v0_4 = gDisplayListHead; gDisplayListHead = temp_v0_4 + 8; - temp_v0_4->unk4 = 0xFF33FFFF; - temp_v0_4->unk0 = 0xFC121824; + temp_v0_4->words.w1 = 0xFF33FFFF; + temp_v0_4->words.w0 = 0xFC121824; temp_v0_5 = gDisplayListHead; gDisplayListHead = temp_v0_5 + 8; - temp_v0_5->unk4 = 0x80000040; - temp_v0_5->unk0 = 0xBC000002; + temp_v0_5->words.w1 = 0x80000040; + temp_v0_5->words.w0 = 0xBC000002; temp_v0_6 = gDisplayListHead; gDisplayListHead = temp_v0_6 + 8; - temp_v0_6->unk4 = &D_800E4670; - temp_v0_6->unk0 = 0x3860010; + temp_v0_6->words.w1 = (u32) &D_800E4670; + temp_v0_6->words.w0 = 0x03860010; temp_v0_7 = gDisplayListHead; gDisplayListHead = temp_v0_7 + 8; - temp_v0_7->unk4 = &D_800E4668; - temp_v0_7->unk0 = 0x3880010; + temp_v0_7->words.w1 = (u32) &D_800E4668; + temp_v0_7->words.w0 = 0x03880010; temp_v0_8 = gDisplayListHead; gDisplayListHead = temp_v0_8 + 8; - temp_v0_8->unk4 = 0x3000; - temp_v0_8->unk0 = 0xB6000000; + temp_v0_8->words.w1 = 0x00003000; + temp_v0_8->words.w0 = 0xB6000000; temp_v0_9 = gDisplayListHead; gDisplayListHead = temp_v0_9 + 8; - temp_v0_9->unk0 = 0xB7000000; - temp_v0_9->unk4 = 0x20204; - func_80043D50(&D_06006738, 0x20, 0x20); - phi_a3 = &D_8018C630; + temp_v0_9->words.w0 = 0xB7000000; + temp_v0_9->words.w1 = 0x00020204; + func_80043D50(&D_06006738, 0x00000020, 0x00000020); + var_a3 = &D_8018C630; do { - temp_s1_3 = *phi_a3; + temp_s1_3 = *var_a3; if (temp_s1_3 != -1) { - temp_s0_2 = &D_80165C18 + (temp_s1_3 * 0xE0); - if ((temp_s0_2->unkA6 > 0) && (temp_s0_2->unkD5 == 3) && (D_8018D120 < 0x2EF)) { - sp44 = phi_a3; - func_80042E00(temp_s0_2 + 4, temp_s0_2 + 0xB2, temp_s0_2->unk0, phi_a3); + temp_s0 = &D_80165C18[temp_s1_3]; + if ((temp_s0->unk_0A6 > 0) && (temp_s0->unk_0D5 == 3) && (D_8018D120 < 0x2EF)) { + sp44 = var_a3; + func_80042E00(temp_s0->unk_004, (s16 *) &temp_s0->unk_0B2, temp_s0->unk_000); temp_v0_10 = gDisplayListHead; gDisplayListHead = temp_v0_10 + 8; - temp_v0_10->unk0 = 0x4000C2F; - temp_v0_10->unk4 = &D_0D005C00; + temp_v0_10->words.w0 = 0x04000C2F; + temp_v0_10->words.w1 = (u32) &D_0D005C00; temp_v0_11 = gDisplayListHead; gDisplayListHead = temp_v0_11 + 8; - temp_v0_11->unk4 = &D_0D006930; - temp_v0_11->unk0 = 0x6000000; + temp_v0_11->words.w1 = (u32) &D_0D006930; + temp_v0_11->words.w0 = 0x06000000; } } - temp_a3 = phi_a3 + 4; - phi_a3 = temp_a3; - } while (temp_a3 < &D_8018C830); + var_a3 += 4; + } while ((u32) var_a3 < (u32) &D_8018C830); temp_v0_12 = gDisplayListHead; gDisplayListHead = temp_v0_12 + 8; - temp_v0_12->unk4 = 0x2000; - temp_v0_12->unk0 = 0xB7000000; + temp_v0_12->words.w1 = 0x00002000; + temp_v0_12->words.w0 = 0xB7000000; temp_v0_13 = gDisplayListHead; gDisplayListHead = temp_v0_13 + 8; - temp_v0_13->unk4 = 0x20000; - temp_v0_13->unk0 = 0xB6000000; + temp_v0_13->words.w1 = 0x00020000; + temp_v0_13->words.w0 = 0xB6000000; temp_v0_14 = gDisplayListHead; gDisplayListHead = temp_v0_14 + 8; - temp_v0_14->unk0 = 0xBB000000; - temp_v0_14->unk4 = 0x10001; + temp_v0_14->words.w0 = 0xBB000000; + temp_v0_14->words.w1 = 0x00010001; temp_v0_15 = gDisplayListHead; gDisplayListHead = temp_v0_15 + 8; - temp_v0_15->unk0 = 0x6000000; - temp_v0_15->unk4 = &D_0D007AE0; - func_800444B0(D_8018D490, 0x20, 0x20, temp_a3); + temp_v0_15->words.w0 = 0x06000000; + temp_v0_15->words.w1 = (u32) &D_0D007AE0; + func_800444B0(D_8018D490, 0x00000020, 0x00000020); func_8004B3C8(0); D_80183E80.unk0 = 0; D_80183E80.unk4 = 0x8000; - phi_s3 = &D_8018C3F0; + var_s3 = &D_8018C3F0; do { - temp_s1_4 = *phi_s3; + temp_s1_4 = *var_s3; if (temp_s1_4 != -1) { - temp_s0_3 = &D_80165C18 + (temp_s1_4 * 0xE0); - if ((temp_s0_3->unkA6 >= 2) && (temp_s0_3->unkD5 == 2) && (D_8018D120 < 0x2EF)) { - func_8004B138(0xFF, 0xFF, 0xFF, temp_s0_3->unkA0); - D_80183E80.unk2 = func_800418AC(temp_s0_3->unk4, temp_s0_3->unkC, sp84); - func_800431B0(temp_s0_3 + 4, &D_80183E80, temp_s0_3->unk0, &D_0D005AE0); + temp_s0_2 = &D_80165C18[temp_s1_4]; + if ((temp_s0_2->unk_0A6 >= 2) && (temp_s0_2->unk_0D5 == 2) && (D_8018D120 < 0x2EF)) { + func_8004B138(0x000000FF, 0x000000FF, 0x000000FF, (s32) temp_s0_2->unk_0A0); + D_80183E80.unk2 = func_800418AC(temp_s0_2->unk_004[0], temp_s0_2->unk_004[2], sp84->pos); + func_800431B0(temp_s0_2->unk_004, &D_80183E80, temp_s0_2->unk_000, &D_0D005AE0); } } - temp_s3 = phi_s3 + 4; - phi_s3 = temp_s3; - } while (temp_s3 != &D_8018C5F0); + var_s3 += 4; + } while (var_s3 != &D_8018C5F0); } #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80053870.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80042E00(void *, ? *, s32); // extern -void func_8004B1C8(s16, s16, s16, s16, s32, s32, s32); // extern -extern Vtx D_0D0060B0; -extern Gfx D_0D006940; -extern struct_80165C18_entry D_80165C18; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +extern ? D_0D0060B0; extern s16 D_80183E80; -extern s32 D_8018D120; - -void func_80053D74(s32 arg0, ? arg1, s32 arg2) { - void *sp28; - void *temp_v0; - void *temp_v0_2; - void *temp_v0_3; +void func_80053D74(s32 objectIndex, s32 arg1, s32 arg2) { + struct_80165C18_entry *sp28; + Gfx *temp_v0_2; + Gfx *temp_v0_3; + struct_80165C18_entry *temp_v0; if (D_8018D120 < 0x2EF) { - temp_v0 = (arg0 * 0xE0) + &D_80165C18; - D_80183E80.unk4 = temp_v0->unk90 + 0x8000; + temp_v0 = &D_80165C18[objectIndex]; + D_80183E80.unk4 = (s16) (temp_v0->unk_084[6] + 0x8000); sp28 = temp_v0; - func_80042E00(temp_v0 + 4, &D_80183E80, temp_v0->unk0); - func_8004B1C8(temp_v0->unk84, temp_v0->unk86, temp_v0->unk88, temp_v0->unk8A, temp_v0->unk8C, temp_v0->unk8E, temp_v0->unkA0); + func_80042E00(temp_v0->unk_004, &D_80183E80, temp_v0->unk_000); + func_8004B1C8((s32) temp_v0->unk_084[0], (s32) temp_v0->unk_084[1], (s32) temp_v0->unk_084[2], (s32) temp_v0->unk_084[3], (s32) temp_v0->unk_084[4], (s32) temp_v0->unk_084[5], (s32) temp_v0->unk_0A0); temp_v0_2 = gDisplayListHead; gDisplayListHead = temp_v0_2 + 8; - temp_v0_2->unk0 = 0x400103F; - temp_v0_2->unk4 = (arg2 * 0x10) + &D_0D0060B0; + temp_v0_2->words.w0 = 0x0400103F; + temp_v0_2->words.w1 = (u32) ((arg2 * 0x10) + &D_0D0060B0); temp_v0_3 = gDisplayListHead; gDisplayListHead = temp_v0_3 + 8; - temp_v0_3->unk0 = 0x6000000; - temp_v0_3->unk4 = &D_0D006940; + temp_v0_3->words.w0 = 0x06000000; + temp_v0_3->words.w1 = (u32) D_0D006940; } } #else @@ -7993,52 +7178,39 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80054664.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s16 func_800418AC(f32, f32, s32); // extern -void func_800431B0(void *, ? *, s32, ? *); // extern -void func_8004B1C8(?, ?, ?, ?, s32, s32, s32); // extern -extern Vtx D_0D005AE0; -extern struct_80165C18_entry D_80165C18; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +extern ? D_0D005AE0; extern s16 D_80183E80; -extern s32 D_8018D120; -void func_8005477C(s32 arg0, s32 arg1, s32 arg2) { +void func_8005477C(s32 objectIndex, s32 arg1, f32 *arg2) { s32 temp_t6; - void *temp_s0; - void *temp_s0_2; - void *temp_s0_3; - void *temp_s0_4; - void *phi_s0; + struct_80165C18_entry *var_s0; temp_t6 = arg1 & 0xFF; if (D_8018D120 < 0x2EF) { - if (temp_t6 != 0) { - if (temp_t6 != 1) { - if (temp_t6 != 2) { - if (temp_t6 != 3) { - phi_s0 = (arg0 * 0xE0) + &D_80165C18; - } else { - temp_s0 = (arg0 * 0xE0) + &D_80165C18; - func_8004B1C8(0xFF, 0xFF, 0x1E, 0xFF, 0, 0, temp_s0->unkA0); - phi_s0 = temp_s0; - } - } else { - temp_s0_2 = (arg0 * 0xE0) + &D_80165C18; - func_8004B1C8(0xFF, 0xE6, 0xFF, 0xFF, 0, 0x96, temp_s0_2->unkA0); - phi_s0 = temp_s0_2; - } - } else { - temp_s0_3 = (arg0 * 0xE0) + &D_80165C18; - func_8004B1C8(0xFF, 0xFF, 0x96, 0xFF, 0, 0, temp_s0_3->unkA0); - phi_s0 = temp_s0_3; - } - } else { - temp_s0_4 = (arg0 * 0xE0) + &D_80165C18; - func_8004B1C8(0xE6, 0xFF, 0xFF, 0, 0, 0xFF, temp_s0_4->unkA0); - phi_s0 = temp_s0_4; + switch (temp_t6) { /* irregular */ + default: + var_s0 = &D_80165C18[objectIndex]; + break; + case 0: + var_s0 = &D_80165C18[objectIndex]; + func_8004B1C8(0x000000E6, 0x000000FF, 0x000000FF, 0, 0, 0x000000FF, (s32) var_s0->unk_0A0); + break; + case 1: + var_s0 = &D_80165C18[objectIndex]; + func_8004B1C8(0x000000FF, 0x000000FF, 0x00000096, 0x000000FF, 0, 0, (s32) var_s0->unk_0A0); + break; + case 2: + var_s0 = &D_80165C18[objectIndex]; + func_8004B1C8(0x000000FF, 0x000000E6, 0x000000FF, 0x000000FF, 0, 0x00000096, (s32) var_s0->unk_0A0); + break; + case 3: + var_s0 = &D_80165C18[objectIndex]; + func_8004B1C8(0x000000FF, 0x000000FF, 0x0000001E, 0x000000FF, 0, 0, (s32) var_s0->unk_0A0); + break; } - D_80183E80.unk2 = func_800418AC(phi_s0->unk4, phi_s0->unkC, arg2); - func_800431B0(phi_s0 + 4, &D_80183E80, phi_s0->unk0, &D_0D005AE0); + D_80183E80.unk2 = func_800418AC(var_s0->unk_004[0], var_s0->unk_004[2], arg2); + func_800431B0(var_s0->unk_004, &D_80183E80, var_s0->unk_000, (s32) &D_0D005AE0); } } #else @@ -8829,53 +8001,44 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80055C38.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -s32 func_800418AC(f32, f32, void *, ? *, s32); // extern -void func_80043328(void *, ? *, s32, ? *); // extern -void func_8004A6EC(s32, f32); // extern -s32 func_80072270(s32, ?); // extern -void func_8008A454(?); // extern +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +? func_8004A6EC(s32, f32); /* extern */ extern ? D_0600F650; -extern ? D_0600F960; +extern Gfx D_0600F960; extern ? D_0600FA20; -extern ? D_0600FBE0; -extern struct_80165C18_entry D_80165C18; +extern Gfx D_0600FBE0; extern s16 D_80183E80; +void func_80055CCC(s32 objectIndex, s32 cameraId) { + Camera *sp24; + Gfx *temp_v1; + Gfx *temp_v1_2; + struct_80165C18_entry *temp_s0; -void func_80055CCC(s32 arg0, s32 arg1) { - s32 sp24; - void *temp_a0; - void *temp_s0; - void *temp_v1; - void *temp_v1_2; - - temp_s0 = (arg0 * 0xE0) + &D_80165C18; - sp24 = (arg1 * 0xB8) + camera1; - if (temp_s0->unkA6 >= 2) { - func_8008A454(0x12C); - func_8004A6EC(arg0, (20.0 / (temp_s0->unk8 - temp_s0->unk44)) + 0.5); - temp_a0 = temp_s0 + 4; - if (func_80072270(arg0, 0x100000) != 0) { - func_80043328(temp_a0, temp_s0 + 0xBE, temp_s0->unk0, &D_0600F960); + temp_s0 = &D_80165C18[objectIndex]; + sp24 = &camera1[cameraId]; + if (temp_s0->unk_0A6 >= 2) { + func_8008A454(objectIndex, cameraId, 0x0000012C); + func_8004A6EC(objectIndex, (f32) ((20.0 / (f64) (temp_s0->unk_004[1] - temp_s0->unk_044)) + 0.5)); + if (func_80072270(objectIndex, 0x00100000) != 0) { + func_80043328(temp_s0->unk_004, (s16 *) temp_s0->unk_0BE, temp_s0->unk_000, &D_0600F960); temp_v1 = gDisplayListHead; gDisplayListHead = temp_v1 + 8; - temp_v1->unk0 = 0x6000000; - temp_v1->unk4 = &D_0600F650; + temp_v1->words.w0 = 0x06000000; + temp_v1->words.w1 = (u32) &D_0600F650; return; } - D_80183E80.unk0 = temp_s0->unkBE; - D_80183E80.unk2 = func_800418AC(temp_s0->unk4, temp_s0->unkC, temp_a0, &D_80183E80, sp24) + 0x8000; - D_80183E80.unk4 = temp_s0->unkC2; - func_80043328(temp_s0 + 4, &D_80183E80, temp_s0->unk0, &D_0600FBE0); + D_80183E80.unk0 = (s16) temp_s0->unk_0BE[0]; + D_80183E80.unk2 = (s16) (func_800418AC(temp_s0->unk_004[0], temp_s0->unk_004[2], sp24->pos) + 0x8000); + D_80183E80.unk4 = (u16) temp_s0->unk_0BE[2]; + func_80043328(temp_s0->unk_004, &D_80183E80, temp_s0->unk_000, &D_0600FBE0); temp_v1_2 = gDisplayListHead; gDisplayListHead = temp_v1_2 + 8; - temp_v1_2->unk0 = 0x6000000; - temp_v1_2->unk4 = &D_0600FA20; + temp_v1_2->words.w0 = 0x06000000; + temp_v1_2->words.w1 = (u32) &D_0600FA20; if (gPlayerCountSelection1 == 1) { - temp_s0->unkC0 = 0; + temp_s0->unk_0BE[1] = 0; } - // Duplicate return node #5. Try simplifying control flow for better match } } #else @@ -8883,49 +8046,36 @@ GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80055CCC.s") #endif #ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80055CCC(s32, s32); // extern -void func_800721E8(s32, ?); // extern -s32 func_8007223C(s32, ?); // extern -void func_8008A1D0(s32, s32, ?, ?); // extern -extern s32 D_80183EA0; +//generated by m2c commit 6b6e1390bf30013247343623194964ff13d0c45b +? func_80055CCC(s32, s32); /* extern */ +extern s32 gGamestate; void func_80055E68(s32 arg0) { s32 temp_s0; - temp_s0 = D_80183EA0; - if (gGamestate != CREDITS_SEQUENCE) { - func_8008A1D0(temp_s0, arg0, 0x5DC, 0xBB8); - if (func_8007223C(temp_s0, 0x40000) != 0) { + temp_s0 = *D_80183EA0; + if (gGamestate != 9) { + func_8008A1D0(temp_s0, arg0, 0x000005DC, 0x00000BB8); + if (func_8007223C(temp_s0, 0x00040000) != 0) { func_80055CCC(temp_s0, arg0); - return; } - // Duplicate return node #4. Try simplifying control flow for better match - return; + } else { + func_800721E8(temp_s0, 0x00100000); + func_80055CCC(temp_s0, arg0); } - func_800721E8(temp_s0, 0x100000); - func_80055CCC(temp_s0, arg0); } #else GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80055E68.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 -void func_80043220(void *, void *, s32, s32); // extern -extern struct_80165C18_entry D_80165C18; +void func_80055EF4(s32 objectIndex, s32 arg1) { + struct_80165C18_entry *object; -void func_80055EF4(s32 arg0, ? arg1) { - void *temp_v0; - - temp_v0 = (arg0 * 0xE0) + &D_80165C18; - if (temp_v0->unkA6 >= 2) { - func_80043220(temp_v0 + 4, temp_v0 + 0xBE, temp_v0->unk0, temp_v0->unk70); + object = &D_80165C18[objectIndex]; + if (object->unk_0A6 >= 2) { + func_80043220(object->unk_004, object->unk_0BE, object->unk_000, object->unk_070); } } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80055EF4.s") -#endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 @@ -8948,43 +8098,26 @@ void func_80055F48(s32 arg0) { GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80055F48.s") #endif -#ifdef MIPS_TO_C -//generated by mips_to_c commit 5bd751fca3befef73d6a2e20d84a88cc918a77fe -void func_80022180(Mtx *, ? *); /* extern */ -void func_800425D0(? *, void *, void *, s32); /* extern */ -s32 func_802B4FF8(? *, ?); /* extern */ -void mtxf_identity(? *); /* extern */ -extern Gfx D_0D0077A0[]; -extern struct_80165C18_entry D_80165C18; -extern s32 D_8018D120; +void func_80055FA0(s32 objectIndex, s32 arg1) { + Mat4 someMatrix1; + Mat4 someMatrix2; + struct_80165C18_entry *object; -void func_80055FA0(s32 arg0, s32 arg1) { - ? sp80; - ? sp40; - void *sp20; - void *temp_t0; - - temp_t0 = (arg0 * 0xE0) + &D_80165C18; - if ((s32) temp_t0->unkA6 >= 2) { + object = &D_80165C18[objectIndex]; + if (object->unk_0A6 >= 2) { gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[1]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[7]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - sp20 = temp_t0; - func_800425D0(&sp80, temp_t0 + 4, temp_t0 + 0xBE, temp_t0->unk0); - func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], &sp80); + func_800425D0(someMatrix1,object->unk_004, object->unk_0BE, object->unk_000); + func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], someMatrix1); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); D_8018D120++; gSPDisplayList(gDisplayListHead++, D_0D0077A0); - gSPDisplayList(gDisplayListHead++, sp20->unk70); + gSPDisplayList(gDisplayListHead++, object->unk_070); gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[7]), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); - mtxf_identity(&sp40); - func_802B4FF8(&sp40, 0); + mtxf_identity(someMatrix2); + func_802B4FF8(someMatrix2, 0); } } -#else -GLOBAL_ASM("asm/non_matchings/code_800431B0/func_80055FA0.s") -#endif - -extern s32 D_80183EAC; void func_80056160(s32 arg0) { func_80055FA0(D_80183EAC, arg0); diff --git a/src/code_800431B0.h b/src/code_800431B0.h index 88dec4280..801665c73 100644 --- a/src/code_800431B0.h +++ b/src/code_800431B0.h @@ -3,32 +3,39 @@ #include "common_structs.h" -struct Vtx4_800431B0 { - Vtx vtx[4]; -}; - -void func_800431B0(Vec3f, Vec3s, f32, s32); -void func_80043220(Vec3f, Vec3s, f32, s32); -void func_80043328(Vec3f, Vec3s, f32, s32); -void func_800433288(Vec3f, Vec3s, f32, s32); -void *func_80043390(Vec3f, Vec3s, f32, s32); -void func_800433F8(Vec3f, Vec3s, f32, s32); -void func_80043460(Vec3f, Vec3s, f32, s32); -void func_80043500(Vec3f, Vec3s, f32, s32); -void func_800435A0(s32, Vec3su, f32, Gfx*, s32); -void func_80043668(Vec3f, Vec3s, f32, Vtx*); -void func_800436D0(s32, s32, u16, f32, s32); +void func_800431B0(Vec3f, Vec3s, f32, Vtx*); +void func_80043220(Vec3f, Vec3s, f32, Gfx*); +void func_80043328(Vec3f, Vec3s, f32, Gfx*); +void func_800433288(Vec3f, Vec3s, f32, Gfx*); +void func_80043390(Vec3f, Vec3s, f32, Gfx*); +void func_800433F8(Vec3f, Vec3s, f32, Gfx*); +void func_80043460(Vec3f, Vec3s, f32, Gfx*); +void func_80043500(Vec3f, Vec3s, f32, Gfx*); +void func_800435A0(Vec3f, Vec3su, f32, Gfx*, s32); +void func_80043668(Vec3f, Vec3s, f32, Gfx*); +void func_800436D0(s32, s32, u16, f32, Vtx*); void func_80043764(s32, s32, u16, f32, Vtx*); -void func_800437F8(s32, s32, u16, f32, struct Vtx4_800431B0*, s32); -void func_800438C4(s32, s32, u16, f32, struct Vtx4_800431B0*, s32); -void func_8004398C(s32, s32, u16, f32, struct Vtx4_800431B0*, s32); +void func_800437F8(s32, s32, u16, f32, Vtx*, s32); +void func_800438C4(s32, s32, u16, f32, Vtx*, s32); +void func_8004398C(s32, s32, u16, f32, Vtx*, s32); s32 func_80043A54(s32); +void func_80043A84(s8*, s32, s32); void func_80043C28(s8*, s32, s32); +void func_80043D50(s8*, s32, s32); +void func_80043EF8(s8*, s32, s32, s32); void func_800440B8(s8*, s32, s32); +void func_800441E0(s8*, s32, s32); void func_80044388(s8*, s32, s32); +void func_800444B0(s8*, s32, s32); void func_80044658(s8*, s32, s32); +void func_8004477C(s8*, s32, s32); +void func_80044AB8(s8*, s32, s32); +void func_80044BF8(s8*, s32, s32); +void func_800452A4(s8*, s32, s32); +void func_8004544C(s8*, s32, s32, s32); +void func_80045614(s8*, s32, s32); void func_80045B2C(Vtx*); void func_80045B74(Vtx*); void func_80045BBC(Vec3f, Vec3s, f32, Vtx*); @@ -46,8 +53,8 @@ void func_80046720(s32, s32, u16, f32, s32, s32, s32, s32, s32, s32); void func_80046794(s32, s32, u16, f32, s32, s32, s32, s32, s32, s32); void func_80046808(Vec3f, Vec3s, f32, s32, s32, s32, s32, s32, s32); void func_80046874(Vec3f, Vec3s, f32, s32, s32, s32, s32, s32, s32); -void func_800468E0(s32, s32, f32, s32, s32, s32, s32, s32, s32, s32); -void func_80046954(s32, s32, f32, s32, s32, s32, s32, s32, s32); +void func_800468E0(Vec3f, Vec3s, f32, s32, s32, s32, s32, s32, s32, s32); +void func_80046954(Vec3f, Vec3s, f32, s32, s32, s32, s32, s32, s32); void func_80046A00(Vec3f, Vec3s, f32, s32, Vtx*, s32, s32); void func_80046A68(Vec3f, Vec3s, f32, s32, s32, s32, s32, s32, s32); void func_80046AD4(s32, s32, u16, f32, s32); @@ -281,6 +288,7 @@ void func_80052E30(s32); void func_8005327C(s32); void func_800532A4(s32); +void func_800534E8(s32); void func_80053870(s32); void func_80053E6C(s32); @@ -299,7 +307,9 @@ void func_800557AC(); void func_8005592C(s32); void func_80055C38(s32); void func_80055E68(s32); +void func_80055EF4(s32, s32); void func_80055F48(s32); +void func_80055FA0(s32, s32); void func_80056160(s32); void func_80056188(s32); @@ -350,6 +360,12 @@ extern Vec3f D_80183E70; extern s32 D_80183EAC; extern s32 D_8018D1E0; +extern Lights1 D_800E4638; +extern Lights1 D_800E4650; +extern Lights1 D_800E4668; +extern Lights1 D_800E4680; +extern Lights1 D_800E4698; + extern s8 D_800E5670[]; extern s8 D_800E566A[]; diff --git a/src/code_80071F00.c b/src/code_80071F00.c index 1c3e4b912..4c5f993cd 100644 --- a/src/code_80071F00.c +++ b/src/code_80071F00.c @@ -1524,7 +1524,7 @@ void func_80074FD8(s32 objectIndex) { switch (temp_v0) { /* irregular */ case 1: sp28 = temp_v1; - if (func_80087E08(objectIndex, temp_v1->unk_038[1], 0.12f, temp_v1->unk_034, (s16) (s32) temp_v1->unk_0C0, 0x00000064) != 0) { + if (func_80087E08(objectIndex, temp_v1->unk_038[1], 0.12f, temp_v1->unk_034, (s16) (s32) temp_v1->unk_0BE[1], 0x00000064) != 0) { sp28 = temp_v1; func_80072488(objectIndex); } @@ -1565,7 +1565,7 @@ void func_800750D8(s32 objectIndex, s32 arg1, f32 *arg2, s32 arg3, s32 arg4) { temp_v1->unk_0D5 = (s8) arg3; temp_v1->unk_000 = (f32) (((f64) (f32) sp24 * 0.0005) + 0.05); temp_v1->unk_03C = (f32) (((f64) (f32) temp_v0 * 0.05) + 2.0); - temp_v1->unk_0C0 = (u16) ((s32) (arg1 << 0x10) / arg4); + temp_v1->unk_0BE[1] = (u16) ((s32) (arg1 << 0x10) / arg4); temp_v1->unk_034 = (f32) (((f64) (f32) ((s32) temp_v0 % 5) * 0.1) + 1.0); sp20 = (s32) temp_v0; sp18 = temp_v1; @@ -1749,7 +1749,7 @@ void func_80075698(s32 arg0) { D_80165C18[arg0].unk_064 = D_8018D490; D_80165C18[arg0].unk_06C = D_8018D490; D_80165C18[arg0].unk_0A0 = 0xFF; - D_80165C18[arg0].unk_0C0 = 0; + D_80165C18[arg0].unk_0BE[1] = 0; D_80165C18[arg0].unk_0B2 = 0; D_80165C18[arg0].unk_0B6 = 0; D_80165C18[arg0].unk_028[0] = 0.0f; @@ -1896,7 +1896,7 @@ void func_80075B08(s32 arg0) { D_80165C18[arg0].unk_064 = D_8018D490; D_80165C18[arg0].unk_06C = D_8018D490; D_80165C18[arg0].unk_0A0 = 0xFF; - D_80165C18[arg0].unk_0C0 = 0; + D_80165C18[arg0].unk_0BE[1] = 0; D_80165C18[arg0].unk_0B2 = 0; D_80165C18[arg0].unk_0B6 = 0; D_80165C18[arg0].unk_028[0] = 0.0f; @@ -2017,10 +2017,10 @@ void func_80075E5C(s32 objectIndex, Vec3f arg1, u16 arg2, f32 arg3, s32 arg4) { temp_v0->unk_010[0] = arg1[0]; temp_v0->unk_010[1] = arg1[1]; temp_v0->unk_010[2] = arg1[2]; - temp_v0->unk_0BE = 0x0C00; - temp_v0->unk_0C2 = 0; + temp_v0->unk_0BE[0] = 0x0C00; + temp_v0->unk_0BE[2] = 0; temp_v0->unk_034 = arg3 * 4.0; - temp_v0->unk_0C0 = arg2; + temp_v0->unk_0BE[1] = arg2; temp_v0->unk_0A4 = 0x00FF; temp_v0->unk_0A2 = 0x00FF; temp_v0->unk_048 = arg4 * 2; @@ -2073,7 +2073,7 @@ void func_8007601C(s32 arg0) { func_8008A6DC(arg0, 300.0f); if ((func_8007223C(arg0, 0x40000) != 0) && (func_80072354(arg0, 1) != 0)) { func_800722A4(arg0, 1); - func_80075F98(D_80165C18[arg0].unk_004, (u16) D_80165C18[arg0].unk_0C0, 1.0f); + func_80075F98(D_80165C18[arg0].unk_004, (u16) D_80165C18[arg0].unk_0BE[1], 1.0f); func_800C9D80(D_80165C18[arg0].unk_004, &D_80165C18[arg0].unk_038, 0x5102800A); if (D_80165C18[arg0].unk_0A4 > 0) { --D_80165C18[arg0].unk_0A4; @@ -2118,11 +2118,11 @@ void func_80076194(s32 objectIndex, Vec3f arg1, f32 arg2, s32 arg3) { temp_v0->unk_010[0] = arg1[0]; temp_v0->unk_010[1] = arg1[1]; temp_v0->unk_010[2] = arg1[2]; - temp_v0->unk_0BE = 0x0C00; - temp_v0->unk_0C2 = 0; - temp_v0->unk_0C0 = 0x2100; + temp_v0->unk_0BE[0] = 0x0C00; + temp_v0->unk_0BE[2] = 0; + temp_v0->unk_0BE[1] = 0x2100; if (gIsMirrorMode != 0) { - temp_v0->unk_0C0 += -0x4000; + temp_v0->unk_0BE[1] += -0x4000; } temp_v0->unk_0A4 = 0x00FF; temp_v0->unk_0A2 = 0x00FF; @@ -2254,7 +2254,7 @@ void func_80076538(s32 objectIndex) { } break; case 2: - u16_step_down_towards(&D_80165C18[objectIndex].unk_0BE, 0, 0x00000400); + u16_step_down_towards(&D_80165C18[objectIndex].unk_0BE[0], 0, 0x00000400); break; } if (D_80165C18[objectIndex].unk_0AE > 0) { @@ -2331,9 +2331,9 @@ void func_8007675C(s32 objectIndex, Vec3s arg1, s32 arg2) { temp_v0->unk_010[0] = arg1[0]; temp_v0->unk_010[1] = arg1[1]; temp_v0->unk_010[2] = arg1[2]; - temp_v0->unk_0BE = 0x0C00; - temp_v0->unk_0C0 = 0x2100; - temp_v0->unk_0C2 = 0; + temp_v0->unk_0BE[0] = 0x0C00; + temp_v0->unk_0BE[1] = 0x2100; + temp_v0->unk_0BE[2] = 0; temp_v0->unk_0A4 = 0x00FF; temp_v0->unk_0A2 = 0x00FF; temp_v0->unk_034 = 8.0f; @@ -2726,7 +2726,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) { var_f10 += 4294967296.0; } temp_s0->unk_034 = (f32) ((var_f10 * 0.01) + 0.25); - temp_s0->unk_0C0 = random_int(0x0040U) << 0xA; + temp_s0->unk_0BE[1] = random_int(0x0040U) << 0xA; func_8008751C(objectIndex); temp_s0->unk_084[5] = 0x001E; break; @@ -2738,7 +2738,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) { var_f4 += 4294967296.0; } temp_s0->unk_034 = (f32) ((var_f4 * 0.01) + 0.5); - temp_s0->unk_0C0 = random_int(0x0040U) << 0xA; + temp_s0->unk_0BE[1] = random_int(0x0040U) << 0xA; func_8008751C(objectIndex); temp_s0->unk_084[5] = 0x0032; break; @@ -2761,7 +2761,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) { temp_s0->unk_084[4] = (s16) sp37; } temp_s0->unk_0A0 = 0x00FF; - temp_v1 = temp_s0->unk_0C0; + temp_v1 = temp_s0->unk_0BE[1]; temp_s0->unk_084[3] = random_int(0x0800U) + 0x400; if (((s32) temp_v1 < 0x3000) || ((s32) temp_v1 >= 0xB001)) { temp_s0->unk_084[3] = -temp_s0->unk_084[3]; @@ -3011,7 +3011,7 @@ void func_80077B3C(s32 objectIndex) { void func_80077BCC(s32 objectIndex) { switch (D_80165C18[objectIndex].unk_0AE) { case 1: - func_80087E08(objectIndex, D_80165C18[objectIndex].unk_038[1], 0.2f, D_80165C18[objectIndex].unk_034, (s16) (s32) D_80165C18[objectIndex].unk_0C0, 0x0000000A); + func_80087E08(objectIndex, D_80165C18[objectIndex].unk_038[1], 0.2f, D_80165C18[objectIndex].unk_034, (s16) (s32) D_80165C18[objectIndex].unk_0BE[1], 0x0000000A); break; case 2: if (func_80087B84(objectIndex, 0.4f, D_80165C18[objectIndex].unk_044) != 0) { @@ -3153,7 +3153,7 @@ void func_80077F64(s32 objectIndex, Camera *camera) { temp_v0 = temp_s0->unk_0AE; switch (temp_v0) { /* irregular */ case 1: - temp_s0->unk_0C0 = (random_int(0x4000U) + camera->rot[1]) - 0x2000; + temp_s0->unk_0BE[1] = (random_int(0x4000U) + camera->rot[1]) - 0x2000; func_8008BAB4(objectIndex, 0x00B4, 0x0014U); temp_v0_2 = random_int(0x0064U); var_f6 = (f64) temp_v0_2; @@ -3166,7 +3166,7 @@ void func_80077F64(s32 objectIndex, Camera *camera) { func_80086FD4(objectIndex); return; case 2: - func_80077EB8(objectIndex, temp_s0->unk_0C0, camera, camera); + func_80077EB8(objectIndex, temp_s0->unk_0BE[1], camera, camera); func_800877C4(objectIndex); func_8008BF18(objectIndex); func_8008BFC0(objectIndex); @@ -3367,8 +3367,8 @@ void func_80078288(s32 objectIndex) { return; case 2: func_800877C4(objectIndex); - temp_t1 = temp_s0->unk_0BE + temp_s0->unk_0C4; - temp_s0->unk_0BE = temp_t1; + temp_t1 = temp_s0->unk_0BE[0] + temp_s0->unk_0C4; + temp_s0->unk_0BE[0] = temp_t1; temp_s0->unk_028[0] = temp_s0->unk_01C[0] * sins(temp_t1 & 0xFFFF); func_8008BF18(objectIndex); if ((f64) temp_s0->unk_004[1] <= 0.0) { @@ -5330,7 +5330,7 @@ void func_8007BBBC(s32 objectIndex) { } else { var_f14 = temp_f0; } - temp_s1->unk_0BE = func_80041658(temp_s1->unk_038[1], var_f14); + temp_s1->unk_0BE[0] = func_80041658(temp_s1->unk_038[1], var_f14); func_8007278C(objectIndex, 0x00000046); return; case 3: @@ -5472,10 +5472,10 @@ void func_8007BFB0(s32 objectIndex) { break; case 3: temp_s0->unk_000 = (f32) ((f64) temp_s0->unk_000 - 0.0015); - if ((s32) temp_s0->unk_0BE >= 0xA01) { + if ((s32) temp_s0->unk_0BE[0] >= 0xA01) { temp_s0->unk_084[7] -= 4; } - if (u16_step_up_towards(&temp_s0->unk_0BE, 0x0C00U, (u16) temp_s0->unk_084[7]) != 0) { + if (u16_step_up_towards(&temp_s0->unk_0BE[0], 0x0C00U, (u16) temp_s0->unk_084[7]) != 0) { func_80086FD4(objectIndex); } break; @@ -5492,7 +5492,7 @@ void func_8007BFB0(s32 objectIndex) { } temp_s0->unk_000 += temp_s0->unk_034; s16_step_up_towards(&temp_s0->unk_084[7], 0x0100, 0x0010); - temp_s0->unk_0BE -= temp_s0->unk_084[7]; + temp_s0->unk_0BE[0] -= temp_s0->unk_084[7]; if (func_80087060(objectIndex, 0x00000035) != 0) { func_80086FD4(objectIndex); } @@ -5588,7 +5588,7 @@ void func_8007C360(s32 objectIndex, void *arg1) { struct_80165C18_entry *temp_a2; temp_a2 = &D_80165C18[objectIndex]; - temp_t0 = (((temp_a2->unk_0C0 - arg1->unk26) + 0x8000) & 0xFFFF) * 0x24; + temp_t0 = (((temp_a2->unk_0BE[1] - arg1->unk26) + 0x8000) & 0xFFFF) * 0x24; var_t1 = temp_t0 >> 0x10; if (temp_t0 < 0) { var_t1 = (s32) (temp_t0 + 0xFFFF) >> 0x10; @@ -5621,7 +5621,7 @@ void func_8007C420(s32 objectIndex, void *arg1, s32 arg2) { temp_v1 = &D_80165C18[objectIndex]; sp18 = temp_v1; - temp_v1->unk_0C0 = func_800417B4(temp_v1->unk_0C0, atan2s(arg1->unk14 - temp_v1->unk_004[0], arg1->unk1C - temp_v1->unk_004[2]) & 0xFFFF); + temp_v1->unk_0BE[1] = func_800417B4(temp_v1->unk_0BE[1], atan2s(arg1->unk14 - temp_v1->unk_004[0], arg1->unk1C - temp_v1->unk_004[2]) & 0xFFFF); func_8007C360(objectIndex, arg2); } #else @@ -5643,7 +5643,7 @@ void func_8007C4A4(s32 objectIndex) { struct_80165C18_entry *temp_v1; temp_v1 = &D_80165C18[objectIndex]; - temp_t8 = temp_v1->unk_0C0 * 0x24; + temp_t8 = temp_v1->unk_0BE[1] * 0x24; var_t9 = temp_t8 >> 0x10; if (temp_t8 < 0) { var_t9 = (s32) (temp_t8 + 0xFFFF) >> 0x10; @@ -5676,7 +5676,7 @@ void func_8007C550(s32 objectIndex) { temp_v1 = &D_80165C18[objectIndex]; sp18 = temp_v1; - temp_v1->unk_0C0 = func_800417B4(temp_v1->unk_0C0, atan2s(temp_v1->unk_038, temp_v1->unk_040) & 0xFFFF); + temp_v1->unk_0BE[1] = func_800417B4(temp_v1->unk_0BE[1], atan2s(temp_v1->unk_038, temp_v1->unk_040) & 0xFFFF); func_8007C4A4(objectIndex); } #else @@ -6013,9 +6013,9 @@ void func_8007CE0C(s32 objectIndex) { temp_s0->unk_0A0 = 0; func_80073844(objectIndex); func_80086EF0(objectIndex); - temp_s0->unk_0C2 = 0x8000; + temp_s0->unk_0BE[2] = 0x8000; temp_v0 = D_8018CF1C; - temp_s0->unk_0C0 = atan2s(temp_v0->unk14 - temp_s0->unk_010[0], temp_v0->unk1C - temp_s0->unk_010[2]); + temp_s0->unk_0BE[1] = atan2s(temp_v0->unk14 - temp_s0->unk_010[0], temp_v0->unk1C - temp_s0->unk_010[2]); } #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_8007CE0C.s") @@ -6135,7 +6135,7 @@ loop_5: temp_s2 = random_int(0x012CU); temp_s3 = (random_int(0x1000U) - 0x800) & 0xFFFF; temp_t5 = (random_int(0x000FU) - 5) << 0x10; - temp_s0->unk_0C0 = D_8018CF1C->unk2E + 0x8000; + temp_s0->unk_0BE[1] = D_8018CF1C->unk2E + 0x8000; temp_t2 = (D_8018CF14->unk26 + temp_s3) & 0xFFFF; temp_f2 = (f32) temp_s2; temp_f6 = sins(temp_t2 & 0xFFFF) * temp_f2; @@ -6224,7 +6224,7 @@ void func_8007D360(s32 objectIndex, s32 arg1) { if (temp_v0_4 < 0) { var_f16_2 += 4294967296.0; } - temp_s0->unk_0BE = 0xDC00; + temp_s0->unk_0BE[0] = 0xDC00; temp_s0->unkC6 = 0x0800; temp_s0->unk_01C[2] = (f32) (220.0 - var_f16_2); } @@ -6240,12 +6240,12 @@ void func_8007D360(s32 objectIndex, s32 arg1) { if (temp_v0_5 < 0) { var_f16_3 += 4294967296.0; } - temp_s0_2->unk_0BE = 0; + temp_s0_2->unk_0BE[0] = 0; temp_s0_2->unkC6 = 0; temp_s0_2->unk_01C[2] = (f32) (var_f16_3 + -290.0); } - temp_s0_2->unk_0C0 = func_80041770(temp_s0_2->unk_010[0], temp_s0_2->unk_01C[0], temp_s0_2->unk_010[2], temp_s0_2->unk_01C[2]); - temp_s0_2->unk_0C2 = 0; + temp_s0_2->unk_0BE[1] = func_80041770(temp_s0_2->unk_010[0], temp_s0_2->unk_01C[0], temp_s0_2->unk_010[2], temp_s0_2->unk_01C[2]); + temp_s0_2->unk_0BE[2] = 0; func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f); temp_s0_2->unk_0B0 = 0; if (gCCSelection < 2) { @@ -6412,7 +6412,7 @@ void func_8007DA74(s32 objectIndex) { D_80165C18[objectIndex].unk_0C6 = 0U; } } - D_80165C18[objectIndex].unk_0BE = func_800417B4(D_80165C18[objectIndex].unk_0BE, D_80165C18[objectIndex].unk_0C6); + D_80165C18[objectIndex].unk_0BE[0] = func_800417B4(D_80165C18[objectIndex].unk_0BE[0], D_80165C18[objectIndex].unk_0C6); func_80087844(objectIndex); func_8008BF18(objectIndex); } @@ -7141,7 +7141,7 @@ void func_8007ED6C(s32 objectIndex) { } func_8007E63C(objectIndex); func_8008BF18(objectIndex); - sp24->unk_0C0 = (u16) sp24->unk_0B4; + sp24->unk_0BE[1] = (u16) sp24->unk_0B4; func_80073514(objectIndex); } #else @@ -7601,7 +7601,7 @@ void func_8007FA08(s32 objectIndex) { temp_s0->unk_038 = (bitwise f32) 0; temp_s0->unk_0DD = 1; temp_s0->unk_0DF = 8; - temp_s0->unk_0C0 = (u16) temp_s0->unk_0B4; + temp_s0->unk_0BE[1] = (u16) temp_s0->unk_0B4; temp_s0->unk_028[1] = 15.0f; temp_s0->unk20 = 15.0f; func_80072488(objectIndex); @@ -7661,7 +7661,7 @@ void func_8007FB48(s32 objectIndex) { if (var_a0 < 0x65) { sp18 = temp_v1; var_a0 = temp_v1->unk_0B0; - temp_v1->unk_0B4 = func_800417B4(temp_v1->unk_0B4, (temp_v1->unk_0C0 + 0x8000) & 0xFFFF); + temp_v1->unk_0B4 = func_800417B4(temp_v1->unk_0B4, (temp_v1->unk_0BE[1] + 0x8000) & 0xFFFF); if (var_a0 == 0x0064) { temp_v1->unk_0D2 = 1; var_a0 = temp_v1->unk_0B0; @@ -7696,9 +7696,9 @@ block_20: break; case 5: sp18 = temp_v1; - temp_v0_2 = func_800417B4(temp_v1->unk_0B4, temp_v1->unk_0C0); + temp_v0_2 = func_800417B4(temp_v1->unk_0B4, temp_v1->unk_0BE[1]); temp_v1->unk_0B4 = temp_v0_2; - if ((temp_v0_2 & 0xFFFF) == temp_v1->unk_0C0) { + if ((temp_v0_2 & 0xFFFF) == temp_v1->unk_0BE[1]) { sp18 = temp_v1; func_800722CC(objectIndex, 8); func_80086FD4(objectIndex); @@ -8266,13 +8266,13 @@ void func_80080E8C(s32 objectIndex1, s32 objectIndex2, s32 arg2) { sp24 = temp_v1; sp28 = temp_t1; temp_v0 = &D_80165C18[objectIndex2]; - temp_s1 = temp_v0->unk_0C0; + temp_s1 = temp_v0->unk_0BE[1]; sp2C = temp_v0; sp38 = func_800416D8(temp_v1->unk4, temp_v1->unk0, temp_s1); temp_s0->unk_010[0] = temp_v0->unk_004[0] + func_80041724(temp_v1->unk4, temp_v1->unk0, temp_s1 & 0xFFFF); temp_s0->unk_010[1] = (f32) ((f64) temp_v0->unk_044 - 9.0); temp_s0->unk_010[2] = temp_v0->unk_004[2] + sp38; - temp_t7 = (*(&D_800E597C + sp28) + temp_v0->unk_0C0) & 0xFFFF; + temp_t7 = (*(&D_800E597C + sp28) + temp_v0->unk_0BE[1]) & 0xFFFF; temp_s0->unk_038 = (f32) ((f64) sins(temp_t7 & 0xFFFF) * 0.6); temp_s0->unk_040 = (f32) ((f64) coss(temp_t7 & 0xFFFF) * 0.6); } @@ -8319,7 +8319,7 @@ void func_80081080(s32 objectIndex) { temp_v1 = D_8018D490; temp_v0 = &D_80165C18[objectIndex]; temp_v0->unk_0A0 = 0x00FF; - temp_v0->unk_0C0 = 0; + temp_v0->unk_0BE[1] = 0; temp_v0->unk_0B2 = 0; temp_v0->unk_0B6 = 0; temp_v0->unk_064 = temp_v1; @@ -8804,7 +8804,7 @@ void func_80081D34(s32 objectIndex) { } else { var_s1->unk_00C |= 2; } - temp_s0->unk_0C0 = (u16) var_s4->rot[1]; + temp_s0->unk_0BE[1] = (u16) var_s4->rot[1]; temp_s0->unk_03C = (f32) ((f64) (var_s1->unk_094 / 2.0f) + 3.0); temp_s0->unk_034 = (f32) ((f64) var_s1->unk_094 + 1.0); if ((f64) temp_s0->unk_03C >= 5.0) { @@ -9116,7 +9116,7 @@ void func_8008275C(s32 objectIndex) { temp_s0->unk_028[1] = (f32) ((f64) temp_s0->unk_028[1] * 2.5); temp_s0->unk_028[2] = (f32) (2.0 * (f64) temp_s0->unk_028[2]); func_8008BF18(objectIndex); - temp_s0->unk_0C0 = func_802B5224(temp_a0, temp_a1); + temp_s0->unk_0BE[1] = func_802B5224(temp_a0, temp_a1); break; } func_800873F4(objectIndex); @@ -9589,7 +9589,7 @@ void func_80083538(s32 objectIndex, f32 *arg1, s32 arg2, s32 arg3) { temp_s0->unk_000 = (f32) (((f64) var_f6 * 0.001) + 0.05); temp_s0->unk_03C = (f32) (((f64) (f32) random_int(0x0014U) * 0.5) + 2.6); temp_f16 = (f64) (f32) random_int(0x000AU) * 0.1; - temp_s0->unk_0C0 = (u16) ((s32) (arg2 << 0x10) / arg3); + temp_s0->unk_0BE[1] = (u16) ((s32) (arg2 << 0x10) / arg3); temp_s0->unk_034 = (f32) (temp_f16 + 4.5); temp_s0->unk_010[0] = arg1->unk0; temp_s0->unk_010[1] = arg1->unk4; @@ -9636,7 +9636,7 @@ void func_8008379C(s32 objectIndex) { case 0: break; case 1: - if (func_80087E08(objectIndex, D_80165C18[objectIndex].unk_038[1], 0.74f, D_80165C18[objectIndex].unk_034, D_80165C18[objectIndex].unk_0C0, 0x00000064) != 0) { + if (func_80087E08(objectIndex, D_80165C18[objectIndex].unk_038[1], 0.74f, D_80165C18[objectIndex].unk_034, D_80165C18[objectIndex].unk_0BE[1], 0x00000064) != 0) { func_80072488(objectIndex); } break; @@ -9889,7 +9889,7 @@ void func_80083F18(s32 objectIndex) { case 0: break; case 1: - if (func_80087E08(objectIndex, D_80165C18[objectIndex].unk_038[1], 0.12f, D_80165C18[objectIndex].unk_034, D_80165C18[objectIndex].unk_0C0, 0x00000064) != 0) { + if (func_80087E08(objectIndex, D_80165C18[objectIndex].unk_038[1], 0.12f, D_80165C18[objectIndex].unk_034, D_80165C18[objectIndex].unk_0BE[1], 0x00000064) != 0) { func_80072488(objectIndex); } func_8008BF18(objectIndex); @@ -9935,7 +9935,7 @@ void func_80083FD0(s32 objectIndex, s32 arg1, s16 playerId) { var_f8 += 4294967296.0f; } temp_s0->unk_034 = (f32) (((f64) var_f8 * 0.1) + 1.0); - temp_s0->unk_0C0 = D_801657A2 * arg1; + temp_s0->unk_0BE[1] = D_801657A2 * arg1; temp_s0->unk_010[0] = ((f32) random_int(0x0014U) + sp20->pos[0]) - 10.0f; temp_v0_3 = random_int(0x000AU); var_f10 = (f64) temp_v0_3; @@ -10300,8 +10300,8 @@ void func_80084D2C(s32 objectIndex, s32 arg1) { temp_t8 = (u16) temp_s0->unk_0AE; switch (temp_t8) { case 1: - temp_v0 = func_800417B4(temp_s0->unk_0C0, temp_s0->unkC6); - temp_s0->unk_0C0 = temp_v0; + temp_v0 = func_800417B4(temp_s0->unk_0BE[1], temp_s0->unkC6); + temp_s0->unk_0BE[1] = temp_v0; if ((temp_v0 & 0xFFFF) == temp_s0->unkC6) { temp_s0->unk9C = 4; temp_s0->unk_034 = 0.4f; @@ -10440,13 +10440,13 @@ void func_800850B0(s32 objectIndex) { } temp_s0->unk_084[7] = temp_v0 - 1; temp_s0->unk_0B4 = (u16) temp_s0->unk_0B4 + 0x2000; - temp_s0->unk_0B2 = (s16) temp_s0->unk_0BE; - temp_s0->unk_0B6 = (s16) temp_s0->unk_0C2; + temp_s0->unk_0B2 = (s16) temp_s0->unk_0BE[0]; + temp_s0->unk_0B6 = (s16) temp_s0->unk_0BE[2]; return; } - temp_s0->unk_0B2 = (s16) temp_s0->unk_0BE; - temp_s0->unk_0B4 = (s16) temp_s0->unk_0C0; - temp_s0->unk_0B6 = (s16) temp_s0->unk_0C2; + temp_s0->unk_0B2 = (s16) temp_s0->unk_0BE[0]; + temp_s0->unk_0B4 = (s16) temp_s0->unk_0BE[1]; + temp_s0->unk_0B6 = (s16) temp_s0->unk_0BE[2]; } #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_800850B0.s") @@ -10577,7 +10577,7 @@ void func_80085534(s32 objectIndex) { break; } func_800877C4(objectIndex); - D_80165C18[objectIndex].unk_0C0 += 0x100; + D_80165C18[objectIndex].unk_0BE[1] += 0x100; } #else GLOBAL_ASM("asm/non_matchings/code_80071F00/func_80085534.s") @@ -10723,7 +10723,7 @@ void func_80085AA8(void) { temp_s1 = temp_s0->unk_028; func_80040EC4(temp_s3, temp_s1); func_8000D940(temp_s1, &temp_s0->unk_084[8], temp_s0->unk_034, (bitwise f32) temp_s0->unk_044, 0); - temp_s0->unk_0C0 = func_802B5224(temp_s3, temp_s1); + temp_s0->unk_0BE[1] = func_802B5224(temp_s3, temp_s1); func_8008BF18(temp_s2); func_80089CBC(temp_s2, 0x41F00000); } @@ -11297,12 +11297,12 @@ void func_80086940(s32 objectIndex) { break; } if (D_801658D6 != 0) { - temp_s0->unk_0C0 = 0xE800; - temp_s0->unk_0C2 = 0xDA00; - temp_s0->unk_0BE += 0x400; + temp_s0->unk_0BE[1] = 0xE800; + temp_s0->unk_0BE[2] = 0xDA00; + temp_s0->unk_0BE[0] += 0x400; } else { - temp_s0->unk_0BE += 0x400; - temp_s0->unk_0C0 -= 0x200; + temp_s0->unk_0BE[0] += 0x400; + temp_s0->unk_0BE[1] -= 0x200; } func_8008BF18(objectIndex); } diff --git a/src/code_80086E70.c b/src/code_80086E70.c index 3c115fecd..41a3e2ae1 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -127,48 +127,48 @@ s32 func_80087368(s32 objectIndex) { } UNUSED void func_800873A4(s32 objectIndex) { - D_80165C18[objectIndex].unk_0BE = func_800417B4(D_80165C18[objectIndex].unk_0BE, func_80087324(objectIndex)); + D_80165C18[objectIndex].unk_0BE[0] = func_800417B4(D_80165C18[objectIndex].unk_0BE[0], func_80087324(objectIndex)); } void func_800873F4(s32 objectIndex) { - D_80165C18[objectIndex].unk_0C0 = func_800417B4(D_80165C18[objectIndex].unk_0C0, func_80087368(objectIndex)); + D_80165C18[objectIndex].unk_0BE[1] = func_800417B4(D_80165C18[objectIndex].unk_0BE[1], func_80087368(objectIndex)); } UNUSED void func_80087444(s32 objectIndex) { - D_80165C18[objectIndex].unk_038[0] = D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0C0); + D_80165C18[objectIndex].unk_038[0] = D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0BE[1]); } UNUSED void func_8008748C(s32 objectIndex) { - D_80165C18[objectIndex].unk_038[1] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0BE); + D_80165C18[objectIndex].unk_038[1] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0BE[0]); } UNUSED void func_800874D4(s32 objectIndex) { - D_80165C18[objectIndex].unk_038[2] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0C0); + D_80165C18[objectIndex].unk_038[2] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0BE[1]); } void func_8008751C(s32 objectIndex) { - D_80165C18[objectIndex].unk_038[0] = D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0C0); - D_80165C18[objectIndex].unk_038[2] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0C0); + D_80165C18[objectIndex].unk_038[0] = D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0BE[1]); + D_80165C18[objectIndex].unk_038[2] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0BE[1]); } void func_8008757C(s32 objectIndex) { f32 sp24; - sp24 = coss(D_80165C18[objectIndex].unk_0BE); - D_80165C18[objectIndex].unk_038[0] = (D_80165C18[objectIndex].unk_034 * sp24) * sins(D_80165C18[objectIndex].unk_0C0); - D_80165C18[objectIndex].unk_038[1] = -D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0BE); - sp24 = coss(D_80165C18[objectIndex].unk_0BE); - D_80165C18[objectIndex].unk_038[2] = (D_80165C18[objectIndex].unk_034 * sp24) * coss(D_80165C18[objectIndex].unk_0C0); + sp24 = coss(D_80165C18[objectIndex].unk_0BE[0]); + D_80165C18[objectIndex].unk_038[0] = (D_80165C18[objectIndex].unk_034 * sp24) * sins(D_80165C18[objectIndex].unk_0BE[1]); + D_80165C18[objectIndex].unk_038[1] = -D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0BE[0]); + sp24 = coss(D_80165C18[objectIndex].unk_0BE[0]); + D_80165C18[objectIndex].unk_038[2] = (D_80165C18[objectIndex].unk_034 * sp24) * coss(D_80165C18[objectIndex].unk_0BE[1]); } void func_80087620(s32 objectIndex) { - D_80165C18[objectIndex].unk_038[0] = D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0C0 + 0x8000); - D_80165C18[objectIndex].unk_038[2] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0C0 + 0x8000); + D_80165C18[objectIndex].unk_038[0] = D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0BE[1] + 0x8000); + D_80165C18[objectIndex].unk_038[2] = D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0BE[1] + 0x8000); } void func_800876A0(s32 objectIndex) { - D_80165C18[objectIndex].unk_028[0] += D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0C0); - D_80165C18[objectIndex].unk_028[2] += D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0C0); + D_80165C18[objectIndex].unk_028[0] += D_80165C18[objectIndex].unk_034 * sins(D_80165C18[objectIndex].unk_0BE[1]); + D_80165C18[objectIndex].unk_028[2] += D_80165C18[objectIndex].unk_034 * coss(D_80165C18[objectIndex].unk_0BE[1]); } void func_80087710(s32 objectIndex) { @@ -259,7 +259,7 @@ s32 func_80087A0C(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s16 arg4) { temp_a0 = arg4 - arg3; sp36 = sqrtf((temp_v0 * temp_v0) + (temp_a0 * temp_a0)); D_80165C18[objectIndex].unk_010[1] = 0.0f; - D_80165C18[objectIndex].unk_0C0 = atan2s(temp_v0, temp_a0); + D_80165C18[objectIndex].unk_0BE[1] = atan2s(temp_v0, temp_a0); func_8008751C(objectIndex); D_80165C18[objectIndex].unk_0B0 = sp36 / D_80165C18[objectIndex].unk_034; } @@ -342,7 +342,7 @@ s32 func_80087E08(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s32 a D_80165C18[objectIndex].unk_028[0] = 0.0f; D_80165C18[objectIndex].unk_034 = arg3; D_80165C18[objectIndex].unk_038[1] = arg1; - D_80165C18[objectIndex].unk_0C0 = arg4; + D_80165C18[objectIndex].unk_0BE[1] = arg4; func_8008751C(objectIndex); D_80165C18[objectIndex].unk_0B0 = arg5; } @@ -370,7 +370,7 @@ UNUSED s32 func_80087F14(s32 objectIndex, f32 arg1, f32 arg2, f32 arg3, s16 arg4 D_80165C18[objectIndex].unk_028[0] = 0.0f; D_80165C18[objectIndex].unk_034 = arg3; D_80165C18[objectIndex].unk_038[1] = arg1; - D_80165C18[objectIndex].unk_0C0 = arg4; + D_80165C18[objectIndex].unk_0BE[1] = arg4; func_8008751C(objectIndex); D_80165C18[objectIndex].unk_0B0 = gVBlankTimer; } @@ -457,14 +457,14 @@ void func_80088178(s32 objectIndex, s32 arg1) { u16 temp_a0; temp_v1 = &D_80165C18[objectIndex]; - temp_a0 = temp_v1->unk_0C0; + temp_a0 = temp_v1->unk_0BE[1]; temp_a1 = atan2s((f32) (D_80165760.unk2 - D_80165760.unk0), (f32) (D_80165780.unk2 - D_80165780.unk0)) - temp_a0; if (temp_a1 > 0) { - temp_v1->unk_0C0 = temp_a0 + (arg1 << 8); + temp_v1->unk_0BE[1] = temp_a0 + (arg1 << 8); return; } if (temp_a1 < 0) { - temp_v1->unk_0C0 = temp_a0 - (arg1 << 8); + temp_v1->unk_0BE[1] = temp_a0 - (arg1 << 8); } } #else @@ -1221,7 +1221,7 @@ s32 func_8008A060(s32 objectIndex, Camera *camera, u16 arg2) { s32 var_v1; var_v1 = 0; - temp_t3 = (((u16)camera->rot[1] - D_80165C18[objectIndex].unk_0C0) + (arg2 >> 1)); + temp_t3 = (((u16)camera->rot[1] - D_80165C18[objectIndex].unk_0BE[1]) + (arg2 >> 1)); if ((temp_t3 >= 0) && (arg2 >= temp_t3)) { var_v1 = 1; } @@ -2016,9 +2016,9 @@ void func_8008B844(s32 arg0) { } void func_8008B888(s32 arg0, u16 arg1, u16 arg2, u16 arg3) { - D_80165C18[arg0].unk_0BE = arg1; - D_80165C18[arg0].unk_0C0 = arg2; - D_80165C18[arg0].unk_0C2 = arg3; + D_80165C18[arg0].unk_0BE[0] = arg1; + D_80165C18[arg0].unk_0BE[1] = arg2; + D_80165C18[arg0].unk_0BE[2] = arg3; } void func_8008B8BC(s32 arg0, u16 arg1, u16 arg2, u16 arg3) { @@ -2050,9 +2050,9 @@ void func_8008B928(s32 objectIndex, s16 arg1, s16 arg2, s16 arg3, s32 arg4) { temp_s0->unk_038[1] = (f32) (arg4->unkC - arg4->unk4); temp_s0->unk_038[2] = (f32) (arg4->unkE - arg4->unk6); temp_v0 = func_80087368(objectIndex); - temp_s0->unk_0C0 = (u16) temp_v0; + temp_s0->unk_0BE[1] = (u16) temp_v0; temp_s0->unk_038[2] = func_800416D8(temp_s0->unk_038[2], temp_s0->unk_038[0], -temp_v0 & 0xFFFF); - temp_s0->unk_0BE = func_80087324(objectIndex); + temp_s0->unk_0BE[0] = func_80087324(objectIndex); } #else GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008B928.s") @@ -2144,9 +2144,9 @@ void func_8008BF64(s32 objectIndex) { D_80183E40.unk0 = (f32) temp_v0->unk_004[0]; D_80183E40.unk4 = (f32) temp_v0->unk_004[1]; D_80183E40.unk8 = (f32) temp_v0->unk_004[2]; - D_80183E80.unk0 = (u16) temp_v0->unk_0BE; - D_80183E80.unk2 = (u16) temp_v0->unk_0C0; - D_80183E80.unk4 = (u16) temp_v0->unk_0C2; + D_80183E80.unk0 = (u16) temp_v0->unk_0BE[0]; + D_80183E80.unk2 = (u16) temp_v0->unk_0BE[1]; + D_80183E80.unk4 = (u16) temp_v0->unk_0BE[2]; } #else GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008BF64.s")