diff --git a/README.md b/README.md index 46554e7c..64eeb4da 100755 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ The `NON_MATCHING` define will include the functions that don't exactly match on ## Style Guide -This repo is following the same style guide as the SM64 decomp project, which can be found here: https://docs.google.com/document/d/1T_6dUj32QOscrMOMDsr7bY0esohswEAstKCO4gFn6t0 +The style guide for the project can be found here: https://docs.google.com/document/d/1euQf8nwynGcCZL1MfoMaLs-XRvx3ejjj8fIfykUZ-NQ If you see variables/functions/structs/etc. that doesn't follow these rules, then file an issue and we'll try to fix them. @@ -113,32 +113,31 @@ s32 is_drumstick_unlocked(void) { } ``` -As of October 25th 2021, this is our current score: +As of Feburary 8th, 2022, this is our current score: ``` - ================================================================== - ADVENTURE ONE (ASM -> C Decompilation) - ------------------------ 18.87% Complete ------------------------- - # Decompiled functions: 996 - # GLOBAL_ASM remaining: 760 - # NON_MATCHING functions: 101 - -------------------------- Game Status --------------------------- - Balloons: 10/47, Keys: 1/4, Trophies: 0/5 - T.T. Amulets: 1/4, Wizpig Amulets: 0/4 - ------------------------------------------------------------------ - We are collecting silver coins in Jungle Falls. (4/8 silver coins) - ================================================================== - ADVENTURE TWO (Cleanup & Documentation) - ------------------------ 0.80% Complete ------------------------- - # Documented functions: 65 - # Undocumented remaining: 1691 - -------------------------- Game Status --------------------------- - Balloons: 0/47, Keys: 0/4, Trophies: 0/5 - T.T. Amulets: 0/4, Wizpig Amulets: 0/4 - ------------------------------------------------------------------ - We are collecting the first balloon on Timber's Island. - ================================================================== - - + ===================================================================== + ADVENTURE ONE (ASM -> C Decompilation) + -------------------------- 20.02% Complete -------------------------- + # Decompiled functions: 1026 + # GLOBAL_ASM remaining: 722 + # NON_MATCHING functions: 3 + # NON_EQUIVALENT WIP functions: 93 + ---------------------------- Game Status ---------------------------- + Balloons: 11/47, Keys: 1/4, Trophies: 0/5 + T.T. Amulets: 1/4, Wizpig Amulets: 0/4 + --------------------------------------------------------------------- + We are collecting silver coins in Hot Top Volcano. (1/8 silver coins) + ===================================================================== + ADVENTURE TWO (Cleanup & Documentation) + -------------------------- 2.54% Complete -------------------------- + # Documented functions: 134 + # Undocumented remaining: 1614 + ---------------------------- Game Status ---------------------------- + Balloons: 1/47, Keys: 0/4, Trophies: 0/5 + T.T. Amulets: 0/4, Wizpig Amulets: 0/4 + --------------------------------------------------------------------- + We are collecting the second balloon on Timber's Island. + ===================================================================== ``` --- diff --git a/asm/non_matchings/camera/func_8006A1C4.s b/asm/non_matchings/camera/func_8006A1C4.s index 783ea0e0..00c8c3a0 100644 --- a/asm/non_matchings/camera/func_8006A1C4.s +++ b/asm/non_matchings/camera/func_8006A1C4.s @@ -41,7 +41,7 @@ glabel func_8006A1C4 /* 06AE5C 8006A25C 10600004 */ beqz $v1, .L8006A270 /* 06AE60 8006A260 AFA2004C */ sw $v0, 0x4c($sp) /* 06AE64 8006A264 00402025 */ move $a0, $v0 -/* 06AE68 8006A268 0C01D174 */ jal func_800745D0 +/* 06AE68 8006A268 0C01D174 */ jal read_eeprom_data /* 06AE6C 8006A26C 306500FF */ andi $a1, $v1, 0xff .L8006A270: /* 06AE70 8006A270 32580008 */ andi $t8, $s2, 8 @@ -73,7 +73,7 @@ glabel func_8006A1C4 /* 06AECC 8006A2CC 11A00005 */ beqz $t5, .L8006A2E4 /* 06AED0 8006A2D0 324E0040 */ andi $t6, $s2, 0x40 /* 06AED4 8006A2D4 8FA4004C */ lw $a0, 0x4c($sp) -/* 06AED8 8006A2D8 0C01D1BC */ jal func_800746F0 +/* 06AED8 8006A2D8 0C01D1BC */ jal write_eeprom_data /* 06AEDC 8006A2DC 31A500FF */ andi $a1, $t5, 0xff /* 06AEE0 8006A2E0 324E0040 */ andi $t6, $s2, 0x40 .L8006A2E4: @@ -81,7 +81,7 @@ glabel func_8006A1C4 /* 06AEE8 8006A2E8 00122283 */ sra $a0, $s2, 0xa /* 06AEEC 8006A2EC 308F0003 */ andi $t7, $a0, 3 /* 06AEF0 8006A2F0 8FA5004C */ lw $a1, 0x4c($sp) -/* 06AEF4 8006A2F4 0C01D137 */ jal func_800744DC +/* 06AEF4 8006A2F4 0C01D137 */ jal write_save_data /* 06AEF8 8006A2F8 01E02025 */ move $a0, $t7 .L8006A2FC: /* 06AEFC 8006A2FC 32580080 */ andi $t8, $s2, 0x80 @@ -95,17 +95,17 @@ glabel func_8006A1C4 /* 06AF18 8006A318 324C0100 */ andi $t4, $s2, 0x100 /* 06AF1C 8006A31C 11800006 */ beqz $t4, .L8006A338 /* 06AF20 8006A320 324D0200 */ andi $t5, $s2, 0x200 -/* 06AF24 8006A324 0C027A9B */ jal func_8009EA6C +/* 06AF24 8006A324 0C027A9B */ jal get_eeprom_settings_pointer /* 06AF28 8006A328 00000000 */ nop -/* 06AF2C 8006A32C 0C01D21D */ jal func_80074874 +/* 06AF2C 8006A32C 0C01D21D */ jal read_eeprom_settings /* 06AF30 8006A330 00402025 */ move $a0, $v0 /* 06AF34 8006A334 324D0200 */ andi $t5, $s2, 0x200 .L8006A338: /* 06AF38 8006A338 11A00006 */ beqz $t5, .L8006A354 /* 06AF3C 8006A33C 00009025 */ move $s2, $zero -/* 06AF40 8006A340 0C027A9B */ jal func_8009EA6C +/* 06AF40 8006A340 0C027A9B */ jal get_eeprom_settings_pointer /* 06AF44 8006A344 00000000 */ nop -/* 06AF48 8006A348 0C01D25F */ jal func_8007497C +/* 06AF48 8006A348 0C01D25F */ jal write_eeprom_settings /* 06AF4C 8006A34C 00402025 */ move $a0, $v0 /* 06AF50 8006A350 00009025 */ move $s2, $zero .L8006A354: @@ -117,7 +117,7 @@ glabel func_8006A1C4 /* 06AF64 8006A364 0C0333F8 */ jal osContStartReadData /* 06AF68 8006A368 248410E0 */ addiu $a0, %lo(sSIMesgQueue) # addiu $a0, $a0, 0x10e0 .L8006A36C: -/* 06AF6C 8006A36C 3C0A800E */ lui $t2, %hi(D_800DD300) # $t2, 0x800e +/* 06AF6C 8006A36C 3C0A800E */ lui $t2, %hi(sNoControllerPluggedIn) # $t2, 0x800e /* 06AF70 8006A370 3C09800E */ lui $t1, %hi(gButtonMask) # $t1, 0x800e /* 06AF74 8006A374 3C068012 */ lui $a2, %hi(sControllerData+24) # $a2, 0x8012 /* 06AF78 8006A378 3C028012 */ lui $v0, %hi(sControllerData) # $v0, 0x8012 @@ -125,7 +125,7 @@ glabel func_8006A1C4 /* 06AF80 8006A380 3C078012 */ lui $a3, %hi(D_80121148) # $a3, 0x8012 /* 06AF84 8006A384 3C0B8012 */ lui $t3, %hi(sPlayerID) # $t3, 0x8012 /* 06AF88 8006A388 9529D304 */ lhu $t1, %lo(gButtonMask)($t1) -/* 06AF8C 8006A38C 8D4AD300 */ lw $t2, %lo(D_800DD300)($t2) +/* 06AF8C 8006A38C 8D4AD300 */ lw $t2, %lo(sNoControllerPluggedIn)($t2) /* 06AF90 8006A390 256B1150 */ addiu $t3, %lo(sPlayerID) # addiu $t3, $t3, 0x1150 /* 06AF94 8006A394 24E71148 */ addiu $a3, %lo(D_80121148) # addiu $a3, $a3, 0x1148 /* 06AF98 8006A398 25081140 */ addiu $t0, %lo(sControllerButtonsPressed) # addiu $t0, $t0, 0x1140 diff --git a/asm/non_matchings/controller_pak/func_800722E8.s b/asm/non_matchings/controller_pak/func_800722E8.s deleted file mode 100644 index a0f5cee2..00000000 --- a/asm/non_matchings/controller_pak/func_800722E8.s +++ /dev/null @@ -1,29 +0,0 @@ -glabel func_800722E8 -/* 072EE8 800722E8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 072EEC 800722EC 00047400 */ sll $t6, $a0, 0x10 -/* 072EF0 800722F0 000E7C03 */ sra $t7, $t6, 0x10 -/* 072EF4 800722F4 AFA40018 */ sw $a0, 0x18($sp) -/* 072EF8 800722F8 01E02025 */ move $a0, $t7 -/* 072EFC 800722FC 05E00004 */ bltz $t7, .L80072310 -/* 072F00 80072300 AFBF0014 */ sw $ra, 0x14($sp) -/* 072F04 80072304 29E10004 */ slti $at, $t7, 4 -/* 072F08 80072308 14200003 */ bnez $at, .L80072318 -/* 072F0C 8007230C 00000000 */ nop -.L80072310: -/* 072F10 80072310 10000009 */ b .L80072338 -/* 072F14 80072314 00001025 */ move $v0, $zero -.L80072318: -/* 072F18 80072318 0C01C894 */ jal func_80072250 -/* 072F1C 8007231C 00000000 */ nop -/* 072F20 80072320 3C188012 */ lui $t8, %hi(D_801241E5) # $t8, 0x8012 -/* 072F24 80072324 24190001 */ li $t9, 1 -/* 072F28 80072328 931841E5 */ lbu $t8, %lo(D_801241E5)($t8) -/* 072F2C 8007232C 00594004 */ sllv $t0, $t9, $v0 -/* 072F30 80072330 310900FF */ andi $t1, $t0, 0xff -/* 072F34 80072334 03091024 */ and $v0, $t8, $t1 -.L80072338: -/* 072F38 80072338 8FBF0014 */ lw $ra, 0x14($sp) -/* 072F3C 8007233C 27BD0018 */ addiu $sp, $sp, 0x18 -/* 072F40 80072340 03E00008 */ jr $ra -/* 072F44 80072344 00000000 */ nop - diff --git a/asm/non_matchings/controller_pak/func_80073E1C.s b/asm/non_matchings/controller_pak/func_80073E1C.s deleted file mode 100644 index 6c798f7d..00000000 --- a/asm/non_matchings/controller_pak/func_80073E1C.s +++ /dev/null @@ -1,88 +0,0 @@ -glabel func_80073E1C -/* 074A1C 80073E1C 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 074A20 80073E20 AFBF001C */ sw $ra, 0x1c($sp) -/* 074A24 80073E24 AFB00018 */ sw $s0, 0x18($sp) -/* 074A28 80073E28 00808025 */ move $s0, $a0 -/* 074A2C 80073E2C AFA50034 */ sw $a1, 0x34($sp) -/* 074A30 80073E30 0C01D637 */ jal func_800758DC -/* 074A34 80073E34 AFA60038 */ sw $a2, 0x38($sp) -/* 074A38 80073E38 10400008 */ beqz $v0, .L80073E5C -/* 074A3C 80073E3C 02002025 */ move $a0, $s0 -/* 074A40 80073E40 02002025 */ move $a0, $s0 -/* 074A44 80073E44 0C01D6BB */ jal func_80075AEC -/* 074A48 80073E48 AFA20028 */ sw $v0, 0x28($sp) -/* 074A4C 80073E4C 8FA30028 */ lw $v1, 0x28($sp) -/* 074A50 80073E50 00107780 */ sll $t6, $s0, 0x1e -/* 074A54 80073E54 1000003D */ b .L80073F4C -/* 074A58 80073E58 01C31025 */ or $v0, $t6, $v1 -.L80073E5C: -/* 074A5C 80073E5C 3C05800E */ lui $a1, %hi(D_800E7670) # $a1, 0x800e -/* 074A60 80073E60 8FA60034 */ lw $a2, 0x34($sp) -/* 074A64 80073E64 24A57670 */ addiu $a1, %lo(D_800E7670) # addiu $a1, $a1, 0x7670 -/* 074A68 80073E68 0C01D93A */ jal func_800764E8 -/* 074A6C 80073E6C 27A70024 */ addiu $a3, $sp, 0x24 -/* 074A70 80073E70 1440002D */ bnez $v0, .L80073F28 -/* 074A74 80073E74 00401825 */ move $v1, $v0 -/* 074A78 80073E78 8FA50024 */ lw $a1, 0x24($sp) -/* 074A7C 80073E7C 02002025 */ move $a0, $s0 -/* 074A80 80073E80 0C01DA49 */ jal func_80076924 -/* 074A84 80073E84 27A60020 */ addiu $a2, $sp, 0x20 -/* 074A88 80073E88 8FA40020 */ lw $a0, 0x20($sp) -/* 074A8C 80073E8C 00401825 */ move $v1, $v0 -/* 074A90 80073E90 14800002 */ bnez $a0, .L80073E9C -/* 074A94 80073E94 00000000 */ nop -/* 074A98 80073E98 24030009 */ li $v1, 9 -.L80073E9C: -/* 074A9C 80073E9C 14600022 */ bnez $v1, .L80073F28 -/* 074AA0 80073EA0 00000000 */ nop -/* 074AA4 80073EA4 0C01C327 */ jal allocate_from_main_pool_safe -/* 074AA8 80073EA8 240500FF */ li $a1, 255 -/* 074AAC 80073EAC 8FA50024 */ lw $a1, 0x24($sp) -/* 074AB0 80073EB0 8FA70020 */ lw $a3, 0x20($sp) -/* 074AB4 80073EB4 AFA2002C */ sw $v0, 0x2c($sp) -/* 074AB8 80073EB8 02002025 */ move $a0, $s0 -/* 074ABC 80073EBC 0C01D984 */ jal read_data_from_controller_pak -/* 074AC0 80073EC0 00403025 */ move $a2, $v0 -/* 074AC4 80073EC4 14400013 */ bnez $v0, .L80073F14 -/* 074AC8 80073EC8 00401825 */ move $v1, $v0 -/* 074ACC 80073ECC 8FA6002C */ lw $a2, 0x2c($sp) -/* 074AD0 80073ED0 3C014741 */ lui $at, (0x47414D44 >> 16) # lui $at, 0x4741 -/* 074AD4 80073ED4 8CCF0000 */ lw $t7, ($a2) -/* 074AD8 80073ED8 34214D44 */ ori $at, (0x47414D44 & 0xFFFF) # ori $at, $at, 0x4d44 -/* 074ADC 80073EDC 15E1000D */ bne $t7, $at, .L80073F14 -/* 074AE0 80073EE0 24030009 */ li $v1, 9 -/* 074AE4 80073EE4 8FA40038 */ lw $a0, 0x38($sp) -/* 074AE8 80073EE8 24C50004 */ addiu $a1, $a2, 4 -/* 074AEC 80073EEC 0C01CC1B */ jal func_8007306C -/* 074AF0 80073EF0 AFA20028 */ sw $v0, 0x28($sp) -/* 074AF4 80073EF4 8FB80038 */ lw $t8, 0x38($sp) -/* 074AF8 80073EF8 8FA30028 */ lw $v1, 0x28($sp) -/* 074AFC 80073EFC 9319004B */ lbu $t9, 0x4b($t8) -/* 074B00 80073F00 00000000 */ nop -/* 074B04 80073F04 13200004 */ beqz $t9, .L80073F18 -/* 074B08 80073F08 8FA4002C */ lw $a0, 0x2c($sp) -/* 074B0C 80073F0C 10000001 */ b .L80073F14 -/* 074B10 80073F10 24030005 */ li $v1, 5 -.L80073F14: -/* 074B14 80073F14 8FA4002C */ lw $a0, 0x2c($sp) -.L80073F18: -/* 074B18 80073F18 0C01C450 */ jal free_from_memory_pool -/* 074B1C 80073F1C AFA30028 */ sw $v1, 0x28($sp) -/* 074B20 80073F20 8FA30028 */ lw $v1, 0x28($sp) -/* 074B24 80073F24 00000000 */ nop -.L80073F28: -/* 074B28 80073F28 02002025 */ move $a0, $s0 -/* 074B2C 80073F2C 0C01D6BB */ jal func_80075AEC -/* 074B30 80073F30 AFA30028 */ sw $v1, 0x28($sp) -/* 074B34 80073F34 8FA30028 */ lw $v1, 0x28($sp) -/* 074B38 80073F38 00104780 */ sll $t0, $s0, 0x1e -/* 074B3C 80073F3C 10600003 */ beqz $v1, .L80073F4C -/* 074B40 80073F40 00601025 */ move $v0, $v1 -/* 074B44 80073F44 00681825 */ or $v1, $v1, $t0 -/* 074B48 80073F48 00601025 */ move $v0, $v1 -.L80073F4C: -/* 074B4C 80073F4C 8FBF001C */ lw $ra, 0x1c($sp) -/* 074B50 80073F50 8FB00018 */ lw $s0, 0x18($sp) -/* 074B54 80073F54 03E00008 */ jr $ra -/* 074B58 80073F58 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/controller_pak/func_80074018.s b/asm/non_matchings/controller_pak/func_80074018.s deleted file mode 100644 index 5dc74c34..00000000 --- a/asm/non_matchings/controller_pak/func_80074018.s +++ /dev/null @@ -1,84 +0,0 @@ -glabel func_80074018 -/* 074C18 80074018 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 074C1C 8007401C AFBF001C */ sw $ra, 0x1c($sp) -/* 074C20 80074020 AFB00018 */ sw $s0, 0x18($sp) -/* 074C24 80074024 00808025 */ move $s0, $a0 -/* 074C28 80074028 AFA50034 */ sw $a1, 0x34($sp) -/* 074C2C 8007402C 0C01D637 */ jal func_800758DC -/* 074C30 80074030 AFA60038 */ sw $a2, 0x38($sp) -/* 074C34 80074034 10400008 */ beqz $v0, .L80074058 -/* 074C38 80074038 02002025 */ move $a0, $s0 -/* 074C3C 8007403C 02002025 */ move $a0, $s0 -/* 074C40 80074040 0C01D6BB */ jal func_80075AEC -/* 074C44 80074044 AFA20028 */ sw $v0, 0x28($sp) -/* 074C48 80074048 8FA30028 */ lw $v1, 0x28($sp) -/* 074C4C 8007404C 00107780 */ sll $t6, $s0, 0x1e -/* 074C50 80074050 10000039 */ b .L80074138 -/* 074C54 80074054 01C31025 */ or $v0, $t6, $v1 -.L80074058: -/* 074C58 80074058 3C05800E */ lui $a1, %hi(D_800E7690) # $a1, 0x800e -/* 074C5C 8007405C 8FA60034 */ lw $a2, 0x34($sp) -/* 074C60 80074060 24A57690 */ addiu $a1, %lo(D_800E7690) # addiu $a1, $a1, 0x7690 -/* 074C64 80074064 0C01D93A */ jal func_800764E8 -/* 074C68 80074068 27A70024 */ addiu $a3, $sp, 0x24 -/* 074C6C 8007406C 14400029 */ bnez $v0, .L80074114 -/* 074C70 80074070 00401825 */ move $v1, $v0 -/* 074C74 80074074 8FA50024 */ lw $a1, 0x24($sp) -/* 074C78 80074078 02002025 */ move $a0, $s0 -/* 074C7C 8007407C 0C01DA49 */ jal func_80076924 -/* 074C80 80074080 27A60020 */ addiu $a2, $sp, 0x20 -/* 074C84 80074084 8FA40020 */ lw $a0, 0x20($sp) -/* 074C88 80074088 00401825 */ move $v1, $v0 -/* 074C8C 8007408C 14800002 */ bnez $a0, .L80074098 -/* 074C90 80074090 00000000 */ nop -/* 074C94 80074094 24030009 */ li $v1, 9 -.L80074098: -/* 074C98 80074098 1460001E */ bnez $v1, .L80074114 -/* 074C9C 8007409C 00000000 */ nop -/* 074CA0 800740A0 0C01C327 */ jal allocate_from_main_pool_safe -/* 074CA4 800740A4 240500FF */ li $a1, 255 -/* 074CA8 800740A8 8FA50024 */ lw $a1, 0x24($sp) -/* 074CAC 800740AC 8FA70020 */ lw $a3, 0x20($sp) -/* 074CB0 800740B0 AFA2002C */ sw $v0, 0x2c($sp) -/* 074CB4 800740B4 02002025 */ move $a0, $s0 -/* 074CB8 800740B8 0C01D984 */ jal read_data_from_controller_pak -/* 074CBC 800740BC 00403025 */ move $a2, $v0 -/* 074CC0 800740C0 1440000F */ bnez $v0, .L80074100 -/* 074CC4 800740C4 00401825 */ move $v1, $v0 -/* 074CC8 800740C8 8FA7002C */ lw $a3, 0x2c($sp) -/* 074CCC 800740CC 3C015449 */ lui $at, (0x54494D44 >> 16) # lui $at, 0x5449 -/* 074CD0 800740D0 8CEF0000 */ lw $t7, ($a3) -/* 074CD4 800740D4 34214D44 */ ori $at, (0x54494D44 & 0xFFFF) # ori $at, $at, 0x4d44 -/* 074CD8 800740D8 15E10009 */ bne $t7, $at, .L80074100 -/* 074CDC 800740DC 24030009 */ li $v1, 9 -/* 074CE0 800740E0 8FA40038 */ lw $a0, 0x38($sp) -/* 074CE4 800740E4 24E50004 */ addiu $a1, $a3, 4 -/* 074CE8 800740E8 24060003 */ li $a2, 3 -/* 074CEC 800740EC 0C01CD62 */ jal func_80073588 -/* 074CF0 800740F0 AFA20028 */ sw $v0, 0x28($sp) -/* 074CF4 800740F4 8FA30028 */ lw $v1, 0x28($sp) -/* 074CF8 800740F8 10000002 */ b .L80074104 -/* 074CFC 800740FC 8FA4002C */ lw $a0, 0x2c($sp) -.L80074100: -/* 074D00 80074100 8FA4002C */ lw $a0, 0x2c($sp) -.L80074104: -/* 074D04 80074104 0C01C450 */ jal free_from_memory_pool -/* 074D08 80074108 AFA30028 */ sw $v1, 0x28($sp) -/* 074D0C 8007410C 8FA30028 */ lw $v1, 0x28($sp) -/* 074D10 80074110 00000000 */ nop -.L80074114: -/* 074D14 80074114 02002025 */ move $a0, $s0 -/* 074D18 80074118 0C01D6BB */ jal func_80075AEC -/* 074D1C 8007411C AFA30028 */ sw $v1, 0x28($sp) -/* 074D20 80074120 8FA30028 */ lw $v1, 0x28($sp) -/* 074D24 80074124 0010C780 */ sll $t8, $s0, 0x1e -/* 074D28 80074128 10600003 */ beqz $v1, .L80074138 -/* 074D2C 8007412C 00601025 */ move $v0, $v1 -/* 074D30 80074130 00781825 */ or $v1, $v1, $t8 -/* 074D34 80074134 00601025 */ move $v0, $v1 -.L80074138: -/* 074D38 80074138 8FBF001C */ lw $ra, 0x1c($sp) -/* 074D3C 8007413C 8FB00018 */ lw $s0, 0x18($sp) -/* 074D40 80074140 03E00008 */ jr $ra -/* 074D44 80074144 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/controller_pak/func_800744DC.s b/asm/non_matchings/controller_pak/func_800744DC.s deleted file mode 100644 index 08dd48ce..00000000 --- a/asm/non_matchings/controller_pak/func_800744DC.s +++ /dev/null @@ -1,70 +0,0 @@ -glabel func_800744DC -/* 0750DC 800744DC 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 0750E0 800744E0 AFBF0024 */ sw $ra, 0x24($sp) -/* 0750E4 800744E4 AFB10018 */ sw $s1, 0x18($sp) -/* 0750E8 800744E8 AFB00014 */ sw $s0, 0x14($sp) -/* 0750EC 800744EC 00808025 */ move $s0, $a0 -/* 0750F0 800744F0 00A08825 */ move $s1, $a1 -/* 0750F4 800744F4 AFB30020 */ sw $s3, 0x20($sp) -/* 0750F8 800744F8 0C01A840 */ jal func_8006A100 -/* 0750FC 800744FC AFB2001C */ sw $s2, 0x1c($sp) -/* 075100 80074500 0C033884 */ jal osEepromProbe -/* 075104 80074504 00402025 */ move $a0, $v0 -/* 075108 80074508 14400003 */ bnez $v0, .L80074518 -/* 07510C 8007450C 24120005 */ li $s2, 5 -/* 075110 80074510 10000028 */ b .L800745B4 -/* 075114 80074514 2402FFFF */ li $v0, -1 -.L80074518: -/* 075118 80074518 12000008 */ beqz $s0, .L8007453C -/* 07511C 8007451C 24040028 */ li $a0, 40 -/* 075120 80074520 24010001 */ li $at, 1 -/* 075124 80074524 12010007 */ beq $s0, $at, .L80074544 -/* 075128 80074528 24010002 */ li $at, 2 -/* 07512C 8007452C 12010007 */ beq $s0, $at, .L8007454C -/* 075130 80074530 2403000A */ li $v1, 10 -/* 075134 80074534 10000005 */ b .L8007454C -/* 075138 80074538 2403000A */ li $v1, 10 -.L8007453C: -/* 07513C 8007453C 10000003 */ b .L8007454C -/* 075140 80074540 00001825 */ move $v1, $zero -.L80074544: -/* 075144 80074544 10000001 */ b .L8007454C -/* 075148 80074548 24030005 */ li $v1, 5 -.L8007454C: -/* 07514C 8007454C 2405FFFF */ li $a1, -1 -/* 075150 80074550 0C01C327 */ jal allocate_from_main_pool_safe -/* 075154 80074554 AFA3002C */ sw $v1, 0x2c($sp) -/* 075158 80074558 00409825 */ move $s3, $v0 -/* 07515C 8007455C 02202025 */ move $a0, $s1 -/* 075160 80074560 0C01CCBA */ jal func_800732E8 -/* 075164 80074564 00402825 */ move $a1, $v0 -/* 075168 80074568 0C01BAB0 */ jal is_reset_pressed -/* 07516C 8007456C 00000000 */ nop -/* 075170 80074570 8FA3002C */ lw $v1, 0x2c($sp) -/* 075174 80074574 1440000C */ bnez $v0, .L800745A8 -/* 075178 80074578 00008025 */ move $s0, $zero -/* 07517C 8007457C 00608825 */ move $s1, $v1 -.L80074580: -/* 075180 80074580 0C01A840 */ jal func_8006A100 -/* 075184 80074584 00000000 */ nop -/* 075188 80074588 001070C0 */ sll $t6, $s0, 3 -/* 07518C 8007458C 01D33021 */ addu $a2, $t6, $s3 -/* 075190 80074590 00402025 */ move $a0, $v0 -/* 075194 80074594 0C033960 */ jal osEepromWrite -/* 075198 80074598 322500FF */ andi $a1, $s1, 0xff -/* 07519C 8007459C 26100001 */ addiu $s0, $s0, 1 -/* 0751A0 800745A0 1612FFF7 */ bne $s0, $s2, .L80074580 -/* 0751A4 800745A4 26310001 */ addiu $s1, $s1, 1 -.L800745A8: -/* 0751A8 800745A8 0C01C450 */ jal free_from_memory_pool -/* 0751AC 800745AC 02602025 */ move $a0, $s3 -/* 0751B0 800745B0 00001025 */ move $v0, $zero -.L800745B4: -/* 0751B4 800745B4 8FBF0024 */ lw $ra, 0x24($sp) -/* 0751B8 800745B8 8FB00014 */ lw $s0, 0x14($sp) -/* 0751BC 800745BC 8FB10018 */ lw $s1, 0x18($sp) -/* 0751C0 800745C0 8FB2001C */ lw $s2, 0x1c($sp) -/* 0751C4 800745C4 8FB30020 */ lw $s3, 0x20($sp) -/* 0751C8 800745C8 03E00008 */ jr $ra -/* 0751CC 800745CC 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/controller_pak/func_800745D0.s b/asm/non_matchings/controller_pak/func_800745D0.s deleted file mode 100644 index 303b3400..00000000 --- a/asm/non_matchings/controller_pak/func_800745D0.s +++ /dev/null @@ -1,80 +0,0 @@ -glabel func_800745D0 -/* 0751D0 800745D0 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 0751D4 800745D4 AFBF0024 */ sw $ra, 0x24($sp) -/* 0751D8 800745D8 AFB00018 */ sw $s0, 0x18($sp) -/* 0751DC 800745DC 30B000FF */ andi $s0, $a1, 0xff -/* 0751E0 800745E0 AFB20020 */ sw $s2, 0x20($sp) -/* 0751E4 800745E4 AFB1001C */ sw $s1, 0x1c($sp) -/* 0751E8 800745E8 AFA40040 */ sw $a0, 0x40($sp) -/* 0751EC 800745EC 0C01A840 */ jal func_8006A100 -/* 0751F0 800745F0 AFA50044 */ sw $a1, 0x44($sp) -/* 0751F4 800745F4 0C033884 */ jal osEepromProbe -/* 0751F8 800745F8 00402025 */ move $a0, $v0 -/* 0751FC 800745FC 14400003 */ bnez $v0, .L8007460C -/* 075200 80074600 24040200 */ li $a0, 512 -/* 075204 80074604 10000034 */ b .L800746D8 -/* 075208 80074608 2402FFFF */ li $v0, -1 -.L8007460C: -/* 07520C 8007460C 0C01C327 */ jal allocate_from_main_pool_safe -/* 075210 80074610 2405FFFF */ li $a1, -1 -/* 075214 80074614 320F0001 */ andi $t7, $s0, 1 -/* 075218 80074618 00409025 */ move $s2, $v0 -/* 07521C 8007461C 11E00014 */ beqz $t7, .L80074670 -/* 075220 80074620 AFB00028 */ sw $s0, 0x28($sp) -/* 075224 80074624 24110018 */ li $s1, 24 -/* 075228 80074628 00008025 */ move $s0, $zero -.L8007462C: -/* 07522C 8007462C 0C01A840 */ jal func_8006A100 -/* 075230 80074630 00000000 */ nop -/* 075234 80074634 26050010 */ addiu $a1, $s0, 0x10 -/* 075238 80074638 30B800FF */ andi $t8, $a1, 0xff -/* 07523C 8007463C 0010C8C0 */ sll $t9, $s0, 3 -/* 075240 80074640 03323021 */ addu $a2, $t9, $s2 -/* 075244 80074644 03002825 */ move $a1, $t8 -/* 075248 80074648 0C0338A0 */ jal osEepromRead -/* 07524C 8007464C 00402025 */ move $a0, $v0 -/* 075250 80074650 26100001 */ addiu $s0, $s0, 1 -/* 075254 80074654 0211082A */ slt $at, $s0, $s1 -/* 075258 80074658 1420FFF4 */ bnez $at, .L8007462C -/* 07525C 8007465C 00000000 */ nop -/* 075260 80074660 8FA40040 */ lw $a0, 0x40($sp) -/* 075264 80074664 02402825 */ move $a1, $s2 -/* 075268 80074668 0C01CD62 */ jal func_80073588 -/* 07526C 8007466C 24060001 */ li $a2, 1 -.L80074670: -/* 075270 80074670 8FA80028 */ lw $t0, 0x28($sp) -/* 075274 80074674 24110018 */ li $s1, 24 -/* 075278 80074678 31090002 */ andi $t1, $t0, 2 -/* 07527C 8007467C 11200013 */ beqz $t1, .L800746CC -/* 075280 80074680 00008025 */ move $s0, $zero -.L80074684: -/* 075284 80074684 0C01A840 */ jal func_8006A100 -/* 075288 80074688 00000000 */ nop -/* 07528C 8007468C 26050028 */ addiu $a1, $s0, 0x28 -/* 075290 80074690 001058C0 */ sll $t3, $s0, 3 -/* 075294 80074694 024B3021 */ addu $a2, $s2, $t3 -/* 075298 80074698 30AA00FF */ andi $t2, $a1, 0xff -/* 07529C 8007469C 01402825 */ move $a1, $t2 -/* 0752A0 800746A0 24C600C0 */ addiu $a2, $a2, 0xc0 -/* 0752A4 800746A4 0C0338A0 */ jal osEepromRead -/* 0752A8 800746A8 00402025 */ move $a0, $v0 -/* 0752AC 800746AC 26100001 */ addiu $s0, $s0, 1 -/* 0752B0 800746B0 0211082A */ slt $at, $s0, $s1 -/* 0752B4 800746B4 1420FFF3 */ bnez $at, .L80074684 -/* 0752B8 800746B8 00000000 */ nop -/* 0752BC 800746BC 8FA40040 */ lw $a0, 0x40($sp) -/* 0752C0 800746C0 02402825 */ move $a1, $s2 -/* 0752C4 800746C4 0C01CD62 */ jal func_80073588 -/* 0752C8 800746C8 24060002 */ li $a2, 2 -.L800746CC: -/* 0752CC 800746CC 0C01C450 */ jal free_from_memory_pool -/* 0752D0 800746D0 02402025 */ move $a0, $s2 -/* 0752D4 800746D4 00001025 */ move $v0, $zero -.L800746D8: -/* 0752D8 800746D8 8FBF0024 */ lw $ra, 0x24($sp) -/* 0752DC 800746DC 8FB00018 */ lw $s0, 0x18($sp) -/* 0752E0 800746E0 8FB1001C */ lw $s1, 0x1c($sp) -/* 0752E4 800746E4 8FB20020 */ lw $s2, 0x20($sp) -/* 0752E8 800746E8 03E00008 */ jr $ra -/* 0752EC 800746EC 27BD0040 */ addiu $sp, $sp, 0x40 - diff --git a/asm/non_matchings/controller_pak/func_800746F0.s b/asm/non_matchings/controller_pak/func_800746F0.s deleted file mode 100644 index c22faf6e..00000000 --- a/asm/non_matchings/controller_pak/func_800746F0.s +++ /dev/null @@ -1,79 +0,0 @@ -glabel func_800746F0 -/* 0752F0 800746F0 27BDFFC0 */ addiu $sp, $sp, -0x40 -/* 0752F4 800746F4 AFBF0024 */ sw $ra, 0x24($sp) -/* 0752F8 800746F8 AFB1001C */ sw $s1, 0x1c($sp) -/* 0752FC 800746FC AFB00018 */ sw $s0, 0x18($sp) -/* 075300 80074700 00808025 */ move $s0, $a0 -/* 075304 80074704 30B100FF */ andi $s1, $a1, 0xff -/* 075308 80074708 AFB20020 */ sw $s2, 0x20($sp) -/* 07530C 8007470C 0C01A840 */ jal func_8006A100 -/* 075310 80074710 AFA50044 */ sw $a1, 0x44($sp) -/* 075314 80074714 0C033884 */ jal osEepromProbe -/* 075318 80074718 00402025 */ move $a0, $v0 -/* 07531C 8007471C 14400003 */ bnez $v0, .L8007472C -/* 075320 80074720 24040200 */ li $a0, 512 -/* 075324 80074724 10000033 */ b .L800747F4 -/* 075328 80074728 2402FFFF */ li $v0, -1 -.L8007472C: -/* 07532C 8007472C 0C01C327 */ jal allocate_from_main_pool_safe -/* 075330 80074730 2405FFFF */ li $a1, -1 -/* 075334 80074734 00409025 */ move $s2, $v0 -/* 075338 80074738 02002025 */ move $a0, $s0 -/* 07533C 8007473C 0C01CE29 */ jal func_800738A4 -/* 075340 80074740 00402825 */ move $a1, $v0 -/* 075344 80074744 322F0001 */ andi $t7, $s1, 1 -/* 075348 80074748 11E00011 */ beqz $t7, .L80074790 -/* 07534C 8007474C AFB10028 */ sw $s1, 0x28($sp) -/* 075350 80074750 0C01BAB0 */ jal is_reset_pressed -/* 075354 80074754 24110018 */ li $s1, 24 -/* 075358 80074758 1440000D */ bnez $v0, .L80074790 -/* 07535C 8007475C 00008025 */ move $s0, $zero -.L80074760: -/* 075360 80074760 0C01A840 */ jal func_8006A100 -/* 075364 80074764 00000000 */ nop -/* 075368 80074768 26050010 */ addiu $a1, $s0, 0x10 -/* 07536C 8007476C 30B800FF */ andi $t8, $a1, 0xff -/* 075370 80074770 0010C8C0 */ sll $t9, $s0, 3 -/* 075374 80074774 03323021 */ addu $a2, $t9, $s2 -/* 075378 80074778 03002825 */ move $a1, $t8 -/* 07537C 8007477C 0C033960 */ jal osEepromWrite -/* 075380 80074780 00402025 */ move $a0, $v0 -/* 075384 80074784 26100001 */ addiu $s0, $s0, 1 -/* 075388 80074788 1611FFF5 */ bne $s0, $s1, .L80074760 -/* 07538C 8007478C 00000000 */ nop -.L80074790: -/* 075390 80074790 8FA80028 */ lw $t0, 0x28($sp) -/* 075394 80074794 00000000 */ nop -/* 075398 80074798 31090002 */ andi $t1, $t0, 2 -/* 07539C 8007479C 11200012 */ beqz $t1, .L800747E8 -/* 0753A0 800747A0 00000000 */ nop -/* 0753A4 800747A4 0C01BAB0 */ jal is_reset_pressed -/* 0753A8 800747A8 24110018 */ li $s1, 24 -/* 0753AC 800747AC 1440000E */ bnez $v0, .L800747E8 -/* 0753B0 800747B0 00008025 */ move $s0, $zero -.L800747B4: -/* 0753B4 800747B4 0C01A840 */ jal func_8006A100 -/* 0753B8 800747B8 00000000 */ nop -/* 0753BC 800747BC 26050028 */ addiu $a1, $s0, 0x28 -/* 0753C0 800747C0 001058C0 */ sll $t3, $s0, 3 -/* 0753C4 800747C4 024B3021 */ addu $a2, $s2, $t3 -/* 0753C8 800747C8 30AA00FF */ andi $t2, $a1, 0xff -/* 0753CC 800747CC 01402825 */ move $a1, $t2 -/* 0753D0 800747D0 24C600C0 */ addiu $a2, $a2, 0xc0 -/* 0753D4 800747D4 0C033960 */ jal osEepromWrite -/* 0753D8 800747D8 00402025 */ move $a0, $v0 -/* 0753DC 800747DC 26100001 */ addiu $s0, $s0, 1 -/* 0753E0 800747E0 1611FFF4 */ bne $s0, $s1, .L800747B4 -/* 0753E4 800747E4 00000000 */ nop -.L800747E8: -/* 0753E8 800747E8 0C01C450 */ jal free_from_memory_pool -/* 0753EC 800747EC 02402025 */ move $a0, $s2 -/* 0753F0 800747F0 00001025 */ move $v0, $zero -.L800747F4: -/* 0753F4 800747F4 8FBF0024 */ lw $ra, 0x24($sp) -/* 0753F8 800747F8 8FB00018 */ lw $s0, 0x18($sp) -/* 0753FC 800747FC 8FB1001C */ lw $s1, 0x1c($sp) -/* 075400 80074800 8FB20020 */ lw $s2, 0x20($sp) -/* 075404 80074804 03E00008 */ jr $ra -/* 075408 80074808 27BD0040 */ addiu $sp, $sp, 0x40 - diff --git a/asm/non_matchings/controller_pak/func_8007480C.s b/asm/non_matchings/controller_pak/func_8007480C.s deleted file mode 100644 index 72b412c6..00000000 --- a/asm/non_matchings/controller_pak/func_8007480C.s +++ /dev/null @@ -1,29 +0,0 @@ -glabel func_8007480C -/* 07540C 8007480C 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 075410 80074810 AFB20020 */ sw $s2, 0x20($sp) -/* 075414 80074814 AFB1001C */ sw $s1, 0x1c($sp) -/* 075418 80074818 AFB00018 */ sw $s0, 0x18($sp) -/* 07541C 8007481C AFBF0024 */ sw $ra, 0x24($sp) -/* 075420 80074820 AFA40028 */ sw $a0, 0x28($sp) -/* 075424 80074824 AFA5002C */ sw $a1, 0x2c($sp) -/* 075428 80074828 24110005 */ li $s1, 5 -/* 07542C 8007482C 00008025 */ move $s0, $zero -/* 075430 80074830 2412000E */ li $s2, 14 -.L80074834: -/* 075434 80074834 8FA40028 */ lw $a0, 0x28($sp) -/* 075438 80074838 8FA5002C */ lw $a1, 0x2c($sp) -/* 07543C 8007483C 00103880 */ sll $a3, $s0, 2 -/* 075440 80074840 0C033A98 */ jal __ull_rshift -/* 075444 80074844 000737C3 */ sra $a2, $a3, 0x1f -/* 075448 80074848 26100001 */ addiu $s0, $s0, 1 -/* 07544C 8007484C 3079000F */ andi $t9, $v1, 0xf -/* 075450 80074850 1612FFF8 */ bne $s0, $s2, .L80074834 -/* 075454 80074854 02398821 */ addu $s1, $s1, $t9 -/* 075458 80074858 8FBF0024 */ lw $ra, 0x24($sp) -/* 07545C 8007485C 02201025 */ move $v0, $s1 -/* 075460 80074860 8FB1001C */ lw $s1, 0x1c($sp) -/* 075464 80074864 8FB00018 */ lw $s0, 0x18($sp) -/* 075468 80074868 8FB20020 */ lw $s2, 0x20($sp) -/* 07546C 8007486C 03E00008 */ jr $ra -/* 075470 80074870 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/controller_pak/func_80074874.s b/asm/non_matchings/controller_pak/func_80074874.s deleted file mode 100644 index a9cb0884..00000000 --- a/asm/non_matchings/controller_pak/func_80074874.s +++ /dev/null @@ -1,71 +0,0 @@ -glabel func_80074874 -/* 075474 80074874 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 075478 80074878 AFBF001C */ sw $ra, 0x1c($sp) -/* 07547C 8007487C AFB00018 */ sw $s0, 0x18($sp) -/* 075480 80074880 0C01A840 */ jal func_8006A100 -/* 075484 80074884 00808025 */ move $s0, $a0 -/* 075488 80074888 0C033884 */ jal osEepromProbe -/* 07548C 8007488C 00402025 */ move $a0, $v0 -/* 075490 80074890 14400003 */ bnez $v0, .L800748A0 -/* 075494 80074894 00000000 */ nop -/* 075498 80074898 10000034 */ b .L8007496C -/* 07549C 8007489C 2402FFFF */ li $v0, -1 -.L800748A0: -/* 0754A0 800748A0 0C01A840 */ jal func_8006A100 -/* 0754A4 800748A4 00000000 */ nop -/* 0754A8 800748A8 00402025 */ move $a0, $v0 -/* 0754AC 800748AC 2405000F */ li $a1, 15 -/* 0754B0 800748B0 0C0338A0 */ jal osEepromRead -/* 0754B4 800748B4 02003025 */ move $a2, $s0 -/* 0754B8 800748B8 8E040000 */ lw $a0, ($s0) -/* 0754BC 800748BC 8E050004 */ lw $a1, 4($s0) -/* 0754C0 800748C0 0C01D203 */ jal func_8007480C -/* 0754C4 800748C4 00000000 */ nop -/* 0754C8 800748C8 AFA20020 */ sw $v0, 0x20($sp) -/* 0754CC 800748CC 8E050004 */ lw $a1, 4($s0) -/* 0754D0 800748D0 8E040000 */ lw $a0, ($s0) -/* 0754D4 800748D4 24060000 */ li $a2, 0 -/* 0754D8 800748D8 0C033A98 */ jal __ull_rshift -/* 0754DC 800748DC 24070038 */ li $a3, 56 -/* 0754E0 800748E0 8FAE0020 */ lw $t6, 0x20($sp) -/* 0754E4 800748E4 24180000 */ li $t8, 0 -/* 0754E8 800748E8 11C3001F */ beq $t6, $v1, .L80074968 -/* 0754EC 800748EC 3C190300 */ lui $t9, 0x300 -/* 0754F0 800748F0 AE180000 */ sw $t8, ($s0) -/* 0754F4 800748F4 AE190004 */ sw $t9, 4($s0) -/* 0754F8 800748F8 24040000 */ li $a0, 0 -/* 0754FC 800748FC 3C050300 */ lui $a1, 0x300 -/* 075500 80074900 24060000 */ li $a2, 0 -/* 075504 80074904 0C033AC1 */ jal __ll_lshift -/* 075508 80074908 24070008 */ li $a3, 8 -/* 07550C 8007490C AE020000 */ sw $v0, ($s0) -/* 075510 80074910 AE030004 */ sw $v1, 4($s0) -/* 075514 80074914 00402025 */ move $a0, $v0 -/* 075518 80074918 00602825 */ move $a1, $v1 -/* 07551C 8007491C 24060000 */ li $a2, 0 -/* 075520 80074920 0C033A98 */ jal __ull_rshift -/* 075524 80074924 24070008 */ li $a3, 8 -/* 075528 80074928 AE020000 */ sw $v0, ($s0) -/* 07552C 8007492C AE030004 */ sw $v1, 4($s0) -/* 075530 80074930 00402025 */ move $a0, $v0 -/* 075534 80074934 0C01D203 */ jal func_8007480C -/* 075538 80074938 00602825 */ move $a1, $v1 -/* 07553C 8007493C 00402825 */ move $a1, $v0 -/* 075540 80074940 000227C3 */ sra $a0, $v0, 0x1f -/* 075544 80074944 24060000 */ li $a2, 0 -/* 075548 80074948 0C033AC1 */ jal __ll_lshift -/* 07554C 8007494C 24070038 */ li $a3, 56 -/* 075550 80074950 8E080000 */ lw $t0, ($s0) -/* 075554 80074954 8E090004 */ lw $t1, 4($s0) -/* 075558 80074958 01025025 */ or $t2, $t0, $v0 -/* 07555C 8007495C 01235825 */ or $t3, $t1, $v1 -/* 075560 80074960 AE0B0004 */ sw $t3, 4($s0) -/* 075564 80074964 AE0A0000 */ sw $t2, ($s0) -.L80074968: -/* 075568 80074968 24020001 */ li $v0, 1 -.L8007496C: -/* 07556C 8007496C 8FBF001C */ lw $ra, 0x1c($sp) -/* 075570 80074970 8FB00018 */ lw $s0, 0x18($sp) -/* 075574 80074974 03E00008 */ jr $ra -/* 075578 80074978 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/controller_pak/func_8007497C.s b/asm/non_matchings/controller_pak/func_8007497C.s deleted file mode 100644 index d02bc25e..00000000 --- a/asm/non_matchings/controller_pak/func_8007497C.s +++ /dev/null @@ -1,56 +0,0 @@ -glabel func_8007497C -/* 07557C 8007497C 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 075580 80074980 AFBF001C */ sw $ra, 0x1c($sp) -/* 075584 80074984 AFB00018 */ sw $s0, 0x18($sp) -/* 075588 80074988 0C01A840 */ jal func_8006A100 -/* 07558C 8007498C 00808025 */ move $s0, $a0 -/* 075590 80074990 0C033884 */ jal osEepromProbe -/* 075594 80074994 00402025 */ move $a0, $v0 -/* 075598 80074998 14400003 */ bnez $v0, .L800749A8 -/* 07559C 8007499C 24060000 */ li $a2, 0 -/* 0755A0 800749A0 10000026 */ b .L80074A3C -/* 0755A4 800749A4 2402FFFF */ li $v0, -1 -.L800749A8: -/* 0755A8 800749A8 8E040000 */ lw $a0, ($s0) -/* 0755AC 800749AC 8E050004 */ lw $a1, 4($s0) -/* 0755B0 800749B0 0C033AC1 */ jal __ll_lshift -/* 0755B4 800749B4 24070008 */ li $a3, 8 -/* 0755B8 800749B8 AE020000 */ sw $v0, ($s0) -/* 0755BC 800749BC AE030004 */ sw $v1, 4($s0) -/* 0755C0 800749C0 00402025 */ move $a0, $v0 -/* 0755C4 800749C4 00602825 */ move $a1, $v1 -/* 0755C8 800749C8 24060000 */ li $a2, 0 -/* 0755CC 800749CC 0C033A98 */ jal __ull_rshift -/* 0755D0 800749D0 24070008 */ li $a3, 8 -/* 0755D4 800749D4 AE020000 */ sw $v0, ($s0) -/* 0755D8 800749D8 AE030004 */ sw $v1, 4($s0) -/* 0755DC 800749DC 00402025 */ move $a0, $v0 -/* 0755E0 800749E0 0C01D203 */ jal func_8007480C -/* 0755E4 800749E4 00602825 */ move $a1, $v1 -/* 0755E8 800749E8 00402825 */ move $a1, $v0 -/* 0755EC 800749EC 000227C3 */ sra $a0, $v0, 0x1f -/* 0755F0 800749F0 24060000 */ li $a2, 0 -/* 0755F4 800749F4 0C033AC1 */ jal __ll_lshift -/* 0755F8 800749F8 24070038 */ li $a3, 56 -/* 0755FC 800749FC 8E0E0000 */ lw $t6, ($s0) -/* 075600 80074A00 8E0F0004 */ lw $t7, 4($s0) -/* 075604 80074A04 01C2C025 */ or $t8, $t6, $v0 -/* 075608 80074A08 01E3C825 */ or $t9, $t7, $v1 -/* 07560C 80074A0C AE190004 */ sw $t9, 4($s0) -/* 075610 80074A10 0C01BAB0 */ jal is_reset_pressed -/* 075614 80074A14 AE180000 */ sw $t8, ($s0) -/* 075618 80074A18 14400008 */ bnez $v0, .L80074A3C -/* 07561C 80074A1C 24020001 */ li $v0, 1 -/* 075620 80074A20 0C01A840 */ jal func_8006A100 -/* 075624 80074A24 00000000 */ nop -/* 075628 80074A28 00402025 */ move $a0, $v0 -/* 07562C 80074A2C 2405000F */ li $a1, 15 -/* 075630 80074A30 0C033960 */ jal osEepromWrite -/* 075634 80074A34 02003025 */ move $a2, $s0 -/* 075638 80074A38 24020001 */ li $v0, 1 -.L80074A3C: -/* 07563C 80074A3C 8FBF001C */ lw $ra, 0x1c($sp) -/* 075640 80074A40 8FB00018 */ lw $s0, 0x18($sp) -/* 075644 80074A44 03E00008 */ jr $ra -/* 075648 80074A48 27BD0020 */ addiu $sp, $sp, 0x20 - diff --git a/asm/non_matchings/controller_pak/func_80074A4C.s b/asm/non_matchings/controller_pak/func_80074A4C.s deleted file mode 100644 index c0472d1a..00000000 --- a/asm/non_matchings/controller_pak/func_80074A4C.s +++ /dev/null @@ -1,27 +0,0 @@ -glabel func_80074A4C -/* 07564C 80074A4C 84820006 */ lh $v0, 6($a0) -/* 075650 80074A50 00001825 */ move $v1, $zero -/* 075654 80074A54 00027080 */ sll $t6, $v0, 2 -/* 075658 80074A58 01C27023 */ subu $t6, $t6, $v0 -/* 07565C 80074A5C 000EC080 */ sll $t8, $t6, 2 -/* 075660 80074A60 27020008 */ addiu $v0, $t8, 8 -/* 075664 80074A64 0002CC00 */ sll $t9, $v0, 0x10 -/* 075668 80074A68 00191403 */ sra $v0, $t9, 0x10 -/* 07566C 80074A6C 28410003 */ slti $at, $v0, 3 -/* 075670 80074A70 1420000B */ bnez $at, .L80074AA0 -/* 075674 80074A74 24050002 */ li $a1, 2 -.L80074A78: -/* 075678 80074A78 00854821 */ addu $t1, $a0, $a1 -/* 07567C 80074A7C 912A0000 */ lbu $t2, ($t1) -/* 075680 80074A80 24A50001 */ addiu $a1, $a1, 1 -/* 075684 80074A84 00056C00 */ sll $t5, $a1, 0x10 -/* 075688 80074A88 000D2C03 */ sra $a1, $t5, 0x10 -/* 07568C 80074A8C 006A1821 */ addu $v1, $v1, $t2 -/* 075690 80074A90 00A2082A */ slt $at, $a1, $v0 -/* 075694 80074A94 00035C00 */ sll $t3, $v1, 0x10 -/* 075698 80074A98 1420FFF7 */ bnez $at, .L80074A78 -/* 07569C 80074A9C 000B1C03 */ sra $v1, $t3, 0x10 -.L80074AA0: -/* 0756A0 80074AA0 03E00008 */ jr $ra -/* 0756A4 80074AA4 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/controller_pak/func_80074B1C.s b/asm/non_matchings/controller_pak/func_80074B1C.s deleted file mode 100644 index 41034853..00000000 --- a/asm/non_matchings/controller_pak/func_80074B1C.s +++ /dev/null @@ -1,8 +0,0 @@ -glabel func_80074B1C -/* 07571C 80074B1C 24031100 */ li $v1, 4352 -/* 075720 80074B20 00031080 */ sll $v0, $v1, 2 -/* 075724 80074B24 00431023 */ subu $v0, $v0, $v1 -/* 075728 80074B28 00021040 */ sll $v0, $v0, 1 -/* 07572C 80074B2C 03E00008 */ jr $ra -/* 075730 80074B30 24420100 */ addiu $v0, $v0, 0x100 - diff --git a/asm/non_matchings/controller_pak/func_800758DC.s b/asm/non_matchings/controller_pak/func_800758DC.s deleted file mode 100644 index 5b31d09b..00000000 --- a/asm/non_matchings/controller_pak/func_800758DC.s +++ /dev/null @@ -1,151 +0,0 @@ -glabel func_800758DC -/* 0764DC 800758DC 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 0764E0 800758E0 AFB40024 */ sw $s4, 0x24($sp) -/* 0764E4 800758E4 3C148012 */ lui $s4, %hi(D_80124010) # $s4, 0x8012 -/* 0764E8 800758E8 26944010 */ addiu $s4, %lo(D_80124010) # addiu $s4, $s4, 0x4010 -/* 0764EC 800758EC AFB00014 */ sw $s0, 0x14($sp) -/* 0764F0 800758F0 8E900000 */ lw $s0, ($s4) -/* 0764F4 800758F4 AFBF002C */ sw $ra, 0x2c($sp) -/* 0764F8 800758F8 AFB50028 */ sw $s5, 0x28($sp) -/* 0764FC 800758FC AFB30020 */ sw $s3, 0x20($sp) -/* 076500 80075900 AFB2001C */ sw $s2, 0x1c($sp) -/* 076504 80075904 AFB10018 */ sw $s1, 0x18($sp) -/* 076508 80075908 8E0E0008 */ lw $t6, 8($s0) -/* 07650C 8007590C 0080A825 */ move $s5, $a0 -/* 076510 80075910 15C0000F */ bnez $t6, .L80075950 -/* 076514 80075914 02002025 */ move $a0, $s0 -/* 076518 80075918 00157880 */ sll $t7, $s5, 2 -/* 07651C 8007591C 01F57823 */ subu $t7, $t7, $s5 -/* 076520 80075920 000F7880 */ sll $t7, $t7, 2 -/* 076524 80075924 01F57821 */ addu $t7, $t7, $s5 -/* 076528 80075928 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 -/* 07652C 8007592C 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 -/* 076530 80075930 000F78C0 */ sll $t7, $t7, 3 -/* 076534 80075934 01F82821 */ addu $a1, $t7, $t8 -/* 076538 80075938 0C01C837 */ jal osMotorInit -/* 07653C 8007593C 02A03025 */ move $a2, $s5 -/* 076540 80075940 14400004 */ bnez $v0, .L80075954 -/* 076544 80075944 0015C880 */ sll $t9, $s5, 2 -/* 076548 80075948 1000005F */ b .L80075AC8 -/* 07654C 8007594C 24020007 */ li $v0, 7 -.L80075950: -/* 076550 80075950 0015C880 */ sll $t9, $s5, 2 -.L80075954: -/* 076554 80075954 8E900000 */ lw $s0, ($s4) -/* 076558 80075958 0335C823 */ subu $t9, $t9, $s5 -/* 07655C 8007595C 0019C880 */ sll $t9, $t9, 2 -/* 076560 80075960 8E090008 */ lw $t1, 8($s0) -/* 076564 80075964 0335C821 */ addu $t9, $t9, $s5 -/* 076568 80075968 3C088012 */ lui $t0, %hi(pfs) # $t0, 0x8012 -/* 07656C 8007596C 25084018 */ addiu $t0, %lo(pfs) # addiu $t0, $t0, 0x4018 -/* 076570 80075970 0019C8C0 */ sll $t9, $t9, 3 -/* 076574 80075974 00008825 */ move $s1, $zero -/* 076578 80075978 1120000E */ beqz $t1, .L800759B4 -/* 07657C 8007597C 03289821 */ addu $s3, $t9, $t0 -/* 076580 80075980 2412000A */ li $s2, 10 -/* 076584 80075984 02002025 */ move $a0, $s0 -.L80075988: -/* 076588 80075988 27A50044 */ addiu $a1, $sp, 0x44 -/* 07658C 8007598C 0C0322EC */ jal osRecvMesg -/* 076590 80075990 00003025 */ move $a2, $zero -/* 076594 80075994 8E900000 */ lw $s0, ($s4) -/* 076598 80075998 26310001 */ addiu $s1, $s1, 1 -/* 07659C 8007599C 8E0A0008 */ lw $t2, 8($s0) -/* 0765A0 800759A0 00000000 */ nop -/* 0765A4 800759A4 11400003 */ beqz $t2, .L800759B4 -/* 0765A8 800759A8 00000000 */ nop -/* 0765AC 800759AC 1632FFF6 */ bne $s1, $s2, .L80075988 -/* 0765B0 800759B0 02002025 */ move $a0, $s0 -.L800759B4: -/* 0765B4 800759B4 2412000A */ li $s2, 10 -/* 0765B8 800759B8 00008825 */ move $s1, $zero -/* 0765BC 800759BC 24100005 */ li $s0, 5 -/* 0765C0 800759C0 02602025 */ move $a0, $s3 -.L800759C4: -/* 0765C4 800759C4 0C033CF8 */ jal osPfsFreeBlocks -/* 0765C8 800759C8 27A5003C */ addiu $a1, $sp, 0x3c -/* 0765CC 800759CC 14500006 */ bne $v0, $s0, .L800759E8 -/* 0765D0 800759D0 00401825 */ move $v1, $v0 -/* 0765D4 800759D4 8E840000 */ lw $a0, ($s4) -/* 0765D8 800759D8 02602825 */ move $a1, $s3 -/* 0765DC 800759DC 0C033B48 */ jal osPfsInit -/* 0765E0 800759E0 02A03025 */ move $a2, $s5 -/* 0765E4 800759E4 00401825 */ move $v1, $v0 -.L800759E8: -/* 0765E8 800759E8 1452000A */ bne $v0, $s2, .L80075A14 -/* 0765EC 800759EC 02602825 */ move $a1, $s3 -/* 0765F0 800759F0 8E840000 */ lw $a0, ($s4) -/* 0765F4 800759F4 02A03025 */ move $a2, $s5 -/* 0765F8 800759F8 0C01C837 */ jal osMotorInit -/* 0765FC 800759FC AFA30040 */ sw $v1, 0x40($sp) -/* 076600 80075A00 8FA30040 */ lw $v1, 0x40($sp) -/* 076604 80075A04 14400004 */ bnez $v0, .L80075A18 -/* 076608 80075A08 24010002 */ li $at, 2 -/* 07660C 80075A0C 1000002E */ b .L80075AC8 -/* 076610 80075A10 24020007 */ li $v0, 7 -.L80075A14: -/* 076614 80075A14 24010002 */ li $at, 2 -.L80075A18: -/* 076618 80075A18 14610011 */ bne $v1, $at, .L80075A60 -/* 07661C 80075A1C 24010001 */ li $at, 1 -/* 076620 80075A20 8E840000 */ lw $a0, ($s4) -/* 076624 80075A24 02602825 */ move $a1, $s3 -/* 076628 80075A28 0C033B48 */ jal osPfsInit -/* 07662C 80075A2C 02A03025 */ move $a2, $s5 -/* 076630 80075A30 14520008 */ bne $v0, $s2, .L80075A54 -/* 076634 80075A34 02602825 */ move $a1, $s3 -/* 076638 80075A38 8E840000 */ lw $a0, ($s4) -/* 07663C 80075A3C 0C01C837 */ jal osMotorInit -/* 076640 80075A40 02A03025 */ move $a2, $s5 -/* 076644 80075A44 14400003 */ bnez $v0, .L80075A54 -/* 076648 80075A48 00000000 */ nop -/* 07664C 80075A4C 1000001E */ b .L80075AC8 -/* 076650 80075A50 24020007 */ li $v0, 7 -.L80075A54: -/* 076654 80075A54 1000001C */ b .L80075AC8 -/* 076658 80075A58 24020005 */ li $v0, 5 -/* 07665C 80075A5C 24010001 */ li $at, 1 -.L80075A60: -/* 076660 80075A60 10610003 */ beq $v1, $at, .L80075A70 -/* 076664 80075A64 2401000B */ li $at, 11 -/* 076668 80075A68 14610003 */ bne $v1, $at, .L80075A78 -/* 07666C 80075A6C 26310001 */ addiu $s1, $s1, 1 -.L80075A70: -/* 076670 80075A70 10000015 */ b .L80075AC8 -/* 076674 80075A74 24020001 */ li $v0, 1 -.L80075A78: -/* 076678 80075A78 24010006 */ li $at, 6 -/* 07667C 80075A7C 14610003 */ bne $v1, $at, .L80075A8C -/* 076680 80075A80 00000000 */ nop -/* 076684 80075A84 10000010 */ b .L80075AC8 -/* 076688 80075A88 24020009 */ li $v0, 9 -.L80075A8C: -/* 07668C 80075A8C 14720003 */ bne $v1, $s2, .L80075A9C -/* 076690 80075A90 24010003 */ li $at, 3 -/* 076694 80075A94 1000000C */ b .L80075AC8 -/* 076698 80075A98 24020003 */ li $v0, 3 -.L80075A9C: -/* 07669C 80075A9C 14610003 */ bne $v1, $at, .L80075AAC -/* 0766A0 80075AA0 00000000 */ nop -/* 0766A4 80075AA4 10000008 */ b .L80075AC8 -/* 0766A8 80075AA8 24020002 */ li $v0, 2 -.L80075AAC: -/* 0766AC 80075AAC 14600003 */ bnez $v1, .L80075ABC -/* 0766B0 80075AB0 00000000 */ nop -/* 0766B4 80075AB4 10000004 */ b .L80075AC8 -/* 0766B8 80075AB8 00001025 */ move $v0, $zero -.L80075ABC: -/* 0766BC 80075ABC 1630FFC1 */ bne $s1, $s0, .L800759C4 -/* 0766C0 80075AC0 02602025 */ move $a0, $s3 -/* 0766C4 80075AC4 24020001 */ li $v0, 1 -.L80075AC8: -/* 0766C8 80075AC8 8FBF002C */ lw $ra, 0x2c($sp) -/* 0766CC 80075ACC 8FB00014 */ lw $s0, 0x14($sp) -/* 0766D0 80075AD0 8FB10018 */ lw $s1, 0x18($sp) -/* 0766D4 80075AD4 8FB2001C */ lw $s2, 0x1c($sp) -/* 0766D8 80075AD8 8FB30020 */ lw $s3, 0x20($sp) -/* 0766DC 80075ADC 8FB40024 */ lw $s4, 0x24($sp) -/* 0766E0 80075AE0 8FB50028 */ lw $s5, 0x28($sp) -/* 0766E4 80075AE4 03E00008 */ jr $ra -/* 0766E8 80075AE8 27BD0048 */ addiu $sp, $sp, 0x48 - diff --git a/asm/non_matchings/controller_pak/func_80075E60.s b/asm/non_matchings/controller_pak/func_80075E60.s deleted file mode 100644 index 738319eb..00000000 --- a/asm/non_matchings/controller_pak/func_80075E60.s +++ /dev/null @@ -1,211 +0,0 @@ -glabel func_80075E60 -/* 076A60 80075E60 27BDFF70 */ addiu $sp, $sp, -0x90 -/* 076A64 80075E64 AFBF0034 */ sw $ra, 0x34($sp) -/* 076A68 80075E68 AFB70030 */ sw $s7, 0x30($sp) -/* 076A6C 80075E6C AFB50028 */ sw $s5, 0x28($sp) -/* 076A70 80075E70 AFB40024 */ sw $s4, 0x24($sp) -/* 076A74 80075E74 00A0A025 */ move $s4, $a1 -/* 076A78 80075E78 00C0A825 */ move $s5, $a2 -/* 076A7C 80075E7C 0080B825 */ move $s7, $a0 -/* 076A80 80075E80 AFB6002C */ sw $s6, 0x2c($sp) -/* 076A84 80075E84 AFB30020 */ sw $s3, 0x20($sp) -/* 076A88 80075E88 AFB2001C */ sw $s2, 0x1c($sp) -/* 076A8C 80075E8C AFB10018 */ sw $s1, 0x18($sp) -/* 076A90 80075E90 AFB00014 */ sw $s0, 0x14($sp) -/* 076A94 80075E94 0C01D637 */ jal func_800758DC -/* 076A98 80075E98 AFA7009C */ sw $a3, 0x9c($sp) -/* 076A9C 80075E9C 10400006 */ beqz $v0, .L80075EB8 -/* 076AA0 80075EA0 00408025 */ move $s0, $v0 -/* 076AA4 80075EA4 0C01D6BB */ jal func_80075AEC -/* 076AA8 80075EA8 02E02025 */ move $a0, $s7 -/* 076AAC 80075EAC 00177780 */ sll $t6, $s7, 0x1e -/* 076AB0 80075EB0 100000A1 */ b .L80076138 -/* 076AB4 80075EB4 01D01025 */ or $v0, $t6, $s0 -.L80075EB8: -/* 076AB8 80075EB8 00177880 */ sll $t7, $s7, 2 -/* 076ABC 80075EBC 01F77823 */ subu $t7, $t7, $s7 -/* 076AC0 80075EC0 000F7880 */ sll $t7, $t7, 2 -/* 076AC4 80075EC4 01F77821 */ addu $t7, $t7, $s7 -/* 076AC8 80075EC8 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 -/* 076ACC 80075ECC 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 -/* 076AD0 80075ED0 000F78C0 */ sll $t7, $t7, 3 -/* 076AD4 80075ED4 01F82021 */ addu $a0, $t7, $t8 -/* 076AD8 80075ED8 AFA40054 */ sw $a0, 0x54($sp) -/* 076ADC 80075EDC 27A50068 */ addiu $a1, $sp, 0x68 -/* 076AE0 80075EE0 0C0340E4 */ jal osPfsNumFiles -/* 076AE4 80075EE4 27A60064 */ addiu $a2, $sp, 0x64 -/* 076AE8 80075EE8 10400007 */ beqz $v0, .L80075F08 -/* 076AEC 80075EEC 00000000 */ nop -/* 076AF0 80075EF0 0C01D6BB */ jal func_80075AEC -/* 076AF4 80075EF4 02E02025 */ move $a0, $s7 -/* 076AF8 80075EF8 00171780 */ sll $v0, $s7, 0x1e -/* 076AFC 80075EFC 34590009 */ ori $t9, $v0, 9 -/* 076B00 80075F00 1000008D */ b .L80076138 -/* 076B04 80075F04 03201025 */ move $v0, $t9 -.L80075F08: -/* 076B08 80075F08 0C027AC8 */ jal get_language -/* 076B0C 80075F0C 00000000 */ nop -/* 076B10 80075F10 24010003 */ li $at, 3 -/* 076B14 80075F14 8FA90068 */ lw $t1, 0x68($sp) -/* 076B18 80075F18 14410004 */ bne $v0, $at, .L80075F2C -/* 076B1C 80075F1C 3C10800E */ lui $s0, %hi(D_800DE440) # $s0, 0x800e -/* 076B20 80075F20 3C164E44 */ lui $s6, (0x4E44594A >> 16) # lui $s6, 0x4e44 -/* 076B24 80075F24 10000009 */ b .L80075F4C -/* 076B28 80075F28 36D6594A */ ori $s6, (0x4E44594A & 0xFFFF) # ori $s6, $s6, 0x594a -.L80075F2C: -/* 076B2C 80075F2C 3C088000 */ lui $t0, %hi(osTvType) # $t0, 0x8000 -/* 076B30 80075F30 8D080300 */ lw $t0, %lo(osTvType)($t0) -/* 076B34 80075F34 3C164E44 */ lui $s6, (0x4E445945 >> 16) # lui $s6, 0x4e44 -/* 076B38 80075F38 15000004 */ bnez $t0, .L80075F4C -/* 076B3C 80075F3C 36D65945 */ ori $s6, (0x4E445945 & 0xFFFF) # ori $s6, $s6, 0x5945 -/* 076B40 80075F40 3C164E44 */ lui $s6, (0x4E445950 >> 16) # lui $s6, 0x4e44 -/* 076B44 80075F44 10000001 */ b .L80075F4C -/* 076B48 80075F48 36D65950 */ ori $s6, (0x4E445950 & 0xFFFF) # ori $s6, $s6, 0x5950 -.L80075F4C: -/* 076B4C 80075F4C 0289082A */ slt $at, $s4, $t1 -/* 076B50 80075F50 10200002 */ beqz $at, .L80075F5C -/* 076B54 80075F54 2610E440 */ addiu $s0, %lo(D_800DE440) # addiu $s0, $s0, -0x1bc0 -/* 076B58 80075F58 AFB40068 */ sw $s4, 0x68($sp) -.L80075F5C: -/* 076B5C 80075F5C 8E040000 */ lw $a0, ($s0) -/* 076B60 80075F60 00000000 */ nop -/* 076B64 80075F64 10800004 */ beqz $a0, .L80075F78 -/* 076B68 80075F68 8FA60068 */ lw $a2, 0x68($sp) -/* 076B6C 80075F6C 0C01C450 */ jal free_from_memory_pool -/* 076B70 80075F70 00000000 */ nop -/* 076B74 80075F74 8FA60068 */ lw $a2, 0x68($sp) -.L80075F78: -/* 076B78 80075F78 240500FF */ li $a1, 255 -/* 076B7C 80075F7C 00065080 */ sll $t2, $a2, 2 -/* 076B80 80075F80 01465023 */ subu $t2, $t2, $a2 -/* 076B84 80075F84 000A20C0 */ sll $a0, $t2, 3 -/* 076B88 80075F88 0C01C327 */ jal allocate_from_main_pool_safe -/* 076B8C 80075F8C AFA40064 */ sw $a0, 0x64($sp) -/* 076B90 80075F90 8FA50064 */ lw $a1, 0x64($sp) -/* 076B94 80075F94 AE020000 */ sw $v0, ($s0) -/* 076B98 80075F98 0C034138 */ jal bzero -/* 076B9C 80075F9C 00402025 */ move $a0, $v0 -/* 076BA0 80075FA0 8FAB0068 */ lw $t3, 0x68($sp) -/* 076BA4 80075FA4 8E030000 */ lw $v1, ($s0) -/* 076BA8 80075FA8 19600014 */ blez $t3, .L80075FFC -/* 076BAC 80075FAC 00009825 */ move $s3, $zero -/* 076BB0 80075FB0 8FB000A0 */ lw $s0, 0xa0($sp) -/* 076BB4 80075FB4 8FB1009C */ lw $s1, 0x9c($sp) -/* 076BB8 80075FB8 8FB200A4 */ lw $s2, 0xa4($sp) -/* 076BBC 80075FBC 02A01025 */ move $v0, $s5 -/* 076BC0 80075FC0 240400FF */ li $a0, 255 -.L80075FC4: -/* 076BC4 80075FC4 AC430000 */ sw $v1, ($v0) -/* 076BC8 80075FC8 24630012 */ addiu $v1, $v1, 0x12 -/* 076BCC 80075FCC AE230000 */ sw $v1, ($s1) -/* 076BD0 80075FD0 AE000000 */ sw $zero, ($s0) -/* 076BD4 80075FD4 A2440000 */ sb $a0, ($s2) -/* 076BD8 80075FD8 8FAC0068 */ lw $t4, 0x68($sp) -/* 076BDC 80075FDC 26730001 */ addiu $s3, $s3, 1 -/* 076BE0 80075FE0 026C082A */ slt $at, $s3, $t4 -/* 076BE4 80075FE4 24420004 */ addiu $v0, $v0, 4 -/* 076BE8 80075FE8 26310004 */ addiu $s1, $s1, 4 -/* 076BEC 80075FEC 26100004 */ addiu $s0, $s0, 4 -/* 076BF0 80075FF0 26520001 */ addiu $s2, $s2, 1 -/* 076BF4 80075FF4 1420FFF3 */ bnez $at, .L80075FC4 -/* 076BF8 80075FF8 24630006 */ addiu $v1, $v1, 6 -.L80075FFC: -/* 076BFC 80075FFC 8FA700A0 */ lw $a3, 0xa0($sp) -/* 076C00 80076000 0274082A */ slt $at, $s3, $s4 -/* 076C04 80076004 10200014 */ beqz $at, .L80076058 -/* 076C08 80076008 240400FF */ li $a0, 255 -/* 076C0C 8007600C 00131880 */ sll $v1, $s3, 2 -/* 076C10 80076010 8FAD009C */ lw $t5, 0x9c($sp) -/* 076C14 80076014 8FAE00A4 */ lw $t6, 0xa4($sp) -/* 076C18 80076018 00147880 */ sll $t7, $s4, 2 -/* 076C1C 8007601C 01E72821 */ addu $a1, $t7, $a3 -/* 076C20 80076020 02A31021 */ addu $v0, $s5, $v1 -/* 076C24 80076024 00E38021 */ addu $s0, $a3, $v1 -/* 076C28 80076028 01A38821 */ addu $s1, $t5, $v1 -/* 076C2C 8007602C 01D39021 */ addu $s2, $t6, $s3 -.L80076030: -/* 076C30 80076030 AE200000 */ sw $zero, ($s1) -/* 076C34 80076034 AC400000 */ sw $zero, ($v0) -/* 076C38 80076038 26100004 */ addiu $s0, $s0, 4 -/* 076C3C 8007603C AE00FFFC */ sw $zero, -4($s0) -/* 076C40 80076040 0205082B */ sltu $at, $s0, $a1 -/* 076C44 80076044 A2440000 */ sb $a0, ($s2) -/* 076C48 80076048 24420004 */ addiu $v0, $v0, 4 -/* 076C4C 8007604C 26310004 */ addiu $s1, $s1, 4 -/* 076C50 80076050 1420FFF7 */ bnez $at, .L80076030 -/* 076C54 80076054 26520001 */ addiu $s2, $s2, 1 -.L80076058: -/* 076C58 80076058 8FB80068 */ lw $t8, 0x68($sp) -/* 076C5C 8007605C 00009825 */ move $s3, $zero -/* 076C60 80076060 1B000032 */ blez $t8, .L8007612C -/* 076C64 80076064 00000000 */ nop -/* 076C68 80076068 8FA40054 */ lw $a0, 0x54($sp) -.L8007606C: -/* 076C6C 8007606C 02602825 */ move $a1, $s3 -/* 076C70 80076070 0C034160 */ jal osPfsFileState -/* 076C74 80076074 27A60070 */ addiu $a2, $sp, 0x70 -/* 076C78 80076078 24010005 */ li $at, 5 -/* 076C7C 8007607C 14410004 */ bne $v0, $at, .L80076090 -/* 076C80 80076080 0013C880 */ sll $t9, $s3, 2 -/* 076C84 80076084 02B94021 */ addu $t0, $s5, $t9 -/* 076C88 80076088 10000023 */ b .L80076118 -/* 076C8C 8007608C AD000000 */ sw $zero, ($t0) -.L80076090: -/* 076C90 80076090 10400005 */ beqz $v0, .L800760A8 -/* 076C94 80076094 27A4007E */ addiu $a0, $sp, 0x7e -/* 076C98 80076098 0C01D6BB */ jal func_80075AEC -/* 076C9C 8007609C 02E02025 */ move $a0, $s7 -/* 076CA0 800760A0 10000025 */ b .L80076138 -/* 076CA4 800760A4 24020009 */ li $v0, 9 -.L800760A8: -/* 076CA8 800760A8 00131880 */ sll $v1, $s3, 2 -/* 076CAC 800760AC 8FAA009C */ lw $t2, 0x9c($sp) -/* 076CB0 800760B0 8FAB00A0 */ lw $t3, 0xa0($sp) -/* 076CB4 800760B4 8FAC00A4 */ lw $t4, 0xa4($sp) -/* 076CB8 800760B8 02A34821 */ addu $t1, $s5, $v1 -/* 076CBC 800760BC 8D250000 */ lw $a1, ($t1) -/* 076CC0 800760C0 24060010 */ li $a2, 16 -/* 076CC4 800760C4 01438821 */ addu $s1, $t2, $v1 -/* 076CC8 800760C8 01638021 */ addu $s0, $t3, $v1 -/* 076CCC 800760CC 0C01DA63 */ jal func_8007698C -/* 076CD0 800760D0 01939021 */ addu $s2, $t4, $s3 -/* 076CD4 800760D4 8E250000 */ lw $a1, ($s1) -/* 076CD8 800760D8 27A4007A */ addiu $a0, $sp, 0x7a -/* 076CDC 800760DC 0C01DA63 */ jal func_8007698C -/* 076CE0 800760E0 24060004 */ li $a2, 4 -/* 076CE4 800760E4 8FAD0070 */ lw $t5, 0x70($sp) -/* 076CE8 800760E8 240E0006 */ li $t6, 6 -/* 076CEC 800760EC AE0D0000 */ sw $t5, ($s0) -/* 076CF0 800760F0 A24E0000 */ sb $t6, ($s2) -/* 076CF4 800760F4 8FAF0074 */ lw $t7, 0x74($sp) -/* 076CF8 800760F8 97B80078 */ lhu $t8, 0x78($sp) -/* 076CFC 800760FC 15F60006 */ bne $t7, $s6, .L80076118 -/* 076D00 80076100 24013459 */ li $at, 13401 -/* 076D04 80076104 17010004 */ bne $t8, $at, .L80076118 -/* 076D08 80076108 02E02025 */ move $a0, $s7 -/* 076D0C 8007610C 0C01DABD */ jal func_80076AF4 -/* 076D10 80076110 02602825 */ move $a1, $s3 -/* 076D14 80076114 A2420000 */ sb $v0, ($s2) -.L80076118: -/* 076D18 80076118 8FB90068 */ lw $t9, 0x68($sp) -/* 076D1C 8007611C 26730001 */ addiu $s3, $s3, 1 -/* 076D20 80076120 0279082A */ slt $at, $s3, $t9 -/* 076D24 80076124 1420FFD1 */ bnez $at, .L8007606C -/* 076D28 80076128 8FA40054 */ lw $a0, 0x54($sp) -.L8007612C: -/* 076D2C 8007612C 0C01D6BB */ jal func_80075AEC -/* 076D30 80076130 02E02025 */ move $a0, $s7 -/* 076D34 80076134 00001025 */ move $v0, $zero -.L80076138: -/* 076D38 80076138 8FBF0034 */ lw $ra, 0x34($sp) -/* 076D3C 8007613C 8FB00014 */ lw $s0, 0x14($sp) -/* 076D40 80076140 8FB10018 */ lw $s1, 0x18($sp) -/* 076D44 80076144 8FB2001C */ lw $s2, 0x1c($sp) -/* 076D48 80076148 8FB30020 */ lw $s3, 0x20($sp) -/* 076D4C 8007614C 8FB40024 */ lw $s4, 0x24($sp) -/* 076D50 80076150 8FB50028 */ lw $s5, 0x28($sp) -/* 076D54 80076154 8FB6002C */ lw $s6, 0x2c($sp) -/* 076D58 80076158 8FB70030 */ lw $s7, 0x30($sp) -/* 076D5C 8007615C 03E00008 */ jr $ra -/* 076D60 80076160 27BD0090 */ addiu $sp, $sp, 0x90 - diff --git a/asm/non_matchings/controller_pak/func_80076388.s b/asm/non_matchings/controller_pak/func_80076388.s deleted file mode 100644 index e83d3fa0..00000000 --- a/asm/non_matchings/controller_pak/func_80076388.s +++ /dev/null @@ -1,95 +0,0 @@ -glabel func_80076388 -/* 076F88 80076388 27BDFF90 */ addiu $sp, $sp, -0x70 -/* 076F8C 8007638C AFBF0024 */ sw $ra, 0x24($sp) -/* 076F90 80076390 AFB00020 */ sw $s0, 0x20($sp) -/* 076F94 80076394 00808025 */ move $s0, $a0 -/* 076F98 80076398 AFA50074 */ sw $a1, 0x74($sp) -/* 076F9C 8007639C 0C01D637 */ jal func_800758DC -/* 076FA0 800763A0 AFA60078 */ sw $a2, 0x78($sp) -/* 076FA4 800763A4 10400008 */ beqz $v0, .L800763C8 -/* 076FA8 800763A8 00107880 */ sll $t7, $s0, 2 -/* 076FAC 800763AC 02002025 */ move $a0, $s0 -/* 076FB0 800763B0 0C01D6BB */ jal func_80075AEC -/* 076FB4 800763B4 AFA20030 */ sw $v0, 0x30($sp) -/* 076FB8 800763B8 8FA30030 */ lw $v1, 0x30($sp) -/* 076FBC 800763BC 00107780 */ sll $t6, $s0, 0x1e -/* 076FC0 800763C0 10000045 */ b .L800764D8 -/* 076FC4 800763C4 01C31025 */ or $v0, $t6, $v1 -.L800763C8: -/* 076FC8 800763C8 01F07823 */ subu $t7, $t7, $s0 -/* 076FCC 800763CC 000F7880 */ sll $t7, $t7, 2 -/* 076FD0 800763D0 01F07821 */ addu $t7, $t7, $s0 -/* 076FD4 800763D4 3C188012 */ lui $t8, %hi(pfs) # $t8, 0x8012 -/* 076FD8 800763D8 27184018 */ addiu $t8, %lo(pfs) # addiu $t8, $t8, 0x4018 -/* 076FDC 800763DC 000F78C0 */ sll $t7, $t7, 3 -/* 076FE0 800763E0 8FA50074 */ lw $a1, 0x74($sp) -/* 076FE4 800763E4 01F82021 */ addu $a0, $t7, $t8 -/* 076FE8 800763E8 0C034160 */ jal osPfsFileState -/* 076FEC 800763EC 27A60034 */ addiu $a2, $sp, 0x34 -/* 076FF0 800763F0 10400008 */ beqz $v0, .L80076414 -/* 076FF4 800763F4 8FA40034 */ lw $a0, 0x34($sp) -/* 076FF8 800763F8 0C01D6BB */ jal func_80075AEC -/* 076FFC 800763FC 02002025 */ move $a0, $s0 -/* 077000 80076400 00101780 */ sll $v0, $s0, 0x1e -/* 077004 80076404 34590009 */ ori $t9, $v0, 9 -/* 077008 80076408 10000033 */ b .L800764D8 -/* 07700C 8007640C 03201025 */ move $v0, $t9 -/* 077010 80076410 8FA40034 */ lw $a0, 0x34($sp) -.L80076414: -/* 077014 80076414 0C01C327 */ jal allocate_from_main_pool_safe -/* 077018 80076418 240500FF */ li $a1, 255 -/* 07701C 8007641C 8FA50074 */ lw $a1, 0x74($sp) -/* 077020 80076420 8FA70034 */ lw $a3, 0x34($sp) -/* 077024 80076424 AFA2002C */ sw $v0, 0x2c($sp) -/* 077028 80076428 02002025 */ move $a0, $s0 -/* 07702C 8007642C 0C01D984 */ jal read_data_from_controller_pak -/* 077030 80076430 00403025 */ move $a2, $v0 -/* 077034 80076434 02002025 */ move $a0, $s0 -/* 077038 80076438 0C01D6BB */ jal func_80075AEC -/* 07703C 8007643C AFA20030 */ sw $v0, 0x30($sp) -/* 077040 80076440 8FA30030 */ lw $v1, 0x30($sp) -/* 077044 80076444 27A40042 */ addiu $a0, $sp, 0x42 -/* 077048 80076448 10600008 */ beqz $v1, .L8007646C -/* 07704C 8007644C 24060010 */ li $a2, 16 -/* 077050 80076450 8FA4002C */ lw $a0, 0x2c($sp) -/* 077054 80076454 0C01C450 */ jal free_from_memory_pool -/* 077058 80076458 AFA30030 */ sw $v1, 0x30($sp) -/* 07705C 8007645C 8FA30030 */ lw $v1, 0x30($sp) -/* 077060 80076460 00104780 */ sll $t0, $s0, 0x1e -/* 077064 80076464 1000001C */ b .L800764D8 -/* 077068 80076468 01031025 */ or $v0, $t0, $v1 -.L8007646C: -/* 07706C 8007646C 27B0005C */ addiu $s0, $sp, 0x5c -/* 077070 80076470 0C01DA63 */ jal func_8007698C -/* 077074 80076474 02002825 */ move $a1, $s0 -/* 077078 80076478 27A4003E */ addiu $a0, $sp, 0x3e -/* 07707C 8007647C 27A50054 */ addiu $a1, $sp, 0x54 -/* 077080 80076480 0C01DA63 */ jal func_8007698C -/* 077084 80076484 24060004 */ li $a2, 4 -/* 077088 80076488 8FA9002C */ lw $t1, 0x2c($sp) -/* 07708C 8007648C 8FAA0034 */ lw $t2, 0x34($sp) -/* 077090 80076490 8FA40078 */ lw $a0, 0x78($sp) -/* 077094 80076494 2405FFFF */ li $a1, -1 -/* 077098 80076498 02003025 */ move $a2, $s0 -/* 07709C 8007649C 27A70054 */ addiu $a3, $sp, 0x54 -/* 0770A0 800764A0 AFA90010 */ sw $t1, 0x10($sp) -/* 0770A4 800764A4 0C01D9B5 */ jal func_800766D4 -/* 0770A8 800764A8 AFAA0014 */ sw $t2, 0x14($sp) -/* 0770AC 800764AC 10400005 */ beqz $v0, .L800764C4 -/* 0770B0 800764B0 00401825 */ move $v1, $v0 -/* 0770B4 800764B4 8FAB0078 */ lw $t3, 0x78($sp) -/* 0770B8 800764B8 00000000 */ nop -/* 0770BC 800764BC 000B6780 */ sll $t4, $t3, 0x1e -/* 0770C0 800764C0 004C1825 */ or $v1, $v0, $t4 -.L800764C4: -/* 0770C4 800764C4 8FA4002C */ lw $a0, 0x2c($sp) -/* 0770C8 800764C8 0C01C450 */ jal free_from_memory_pool -/* 0770CC 800764CC AFA30030 */ sw $v1, 0x30($sp) -/* 0770D0 800764D0 8FA20030 */ lw $v0, 0x30($sp) -/* 0770D4 800764D4 00000000 */ nop -.L800764D8: -/* 0770D8 800764D8 8FBF0024 */ lw $ra, 0x24($sp) -/* 0770DC 800764DC 8FB00020 */ lw $s0, 0x20($sp) -/* 0770E0 800764E0 03E00008 */ jr $ra -/* 0770E4 800764E4 27BD0070 */ addiu $sp, $sp, 0x70 - diff --git a/asm/non_matchings/controller_pak/func_800764E8.s b/asm/non_matchings/controller_pak/func_800764E8.s deleted file mode 100644 index 73a5d361..00000000 --- a/asm/non_matchings/controller_pak/func_800764E8.s +++ /dev/null @@ -1,84 +0,0 @@ -glabel func_800764E8 -/* 0770E8 800764E8 27BDFFB8 */ addiu $sp, $sp, -0x48 -/* 0770EC 800764EC AFA40048 */ sw $a0, 0x48($sp) -/* 0770F0 800764F0 AFBF001C */ sw $ra, 0x1c($sp) -/* 0770F4 800764F4 AFA5004C */ sw $a1, 0x4c($sp) -/* 0770F8 800764F8 AFA60050 */ sw $a2, 0x50($sp) -/* 0770FC 800764FC 00A02025 */ move $a0, $a1 -/* 077100 80076500 AFA70054 */ sw $a3, 0x54($sp) -/* 077104 80076504 27A50034 */ addiu $a1, $sp, 0x34 -/* 077108 80076508 0C01DA8E */ jal func_80076A38 -/* 07710C 8007650C 24060010 */ li $a2, 16 -/* 077110 80076510 8FA40050 */ lw $a0, 0x50($sp) -/* 077114 80076514 27A5002C */ addiu $a1, $sp, 0x2c -/* 077118 80076518 0C01DA8E */ jal func_80076A38 -/* 07711C 8007651C 24060004 */ li $a2, 4 -/* 077120 80076520 0C027AC8 */ jal get_language -/* 077124 80076524 00000000 */ nop -/* 077128 80076528 24010003 */ li $at, 3 -/* 07712C 8007652C 14410004 */ bne $v0, $at, .L80076540 -/* 077130 80076530 3C198012 */ lui $t9, %hi(pfs) # $t9, 0x8012 -/* 077134 80076534 3C064E44 */ lui $a2, (0x4E44594A >> 16) # lui $a2, 0x4e44 -/* 077138 80076538 10000009 */ b .L80076560 -/* 07713C 8007653C 34C6594A */ ori $a2, (0x4E44594A & 0xFFFF) # ori $a2, $a2, 0x594a -.L80076540: -/* 077140 80076540 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 -/* 077144 80076544 8DCE0300 */ lw $t6, %lo(osTvType)($t6) -/* 077148 80076548 3C064E44 */ lui $a2, (0x4E445945 >> 16) # lui $a2, 0x4e44 -/* 07714C 8007654C 15C00004 */ bnez $t6, .L80076560 -/* 077150 80076550 34C65945 */ ori $a2, (0x4E445945 & 0xFFFF) # ori $a2, $a2, 0x5945 -/* 077154 80076554 3C064E44 */ lui $a2, (0x4E445950 >> 16) # lui $a2, 0x4e44 -/* 077158 80076558 10000001 */ b .L80076560 -/* 07715C 8007655C 34C65950 */ ori $a2, (0x4E445950 & 0xFFFF) # ori $a2, $a2, 0x5950 -.L80076560: -/* 077160 80076560 8FAF0048 */ lw $t7, 0x48($sp) -/* 077164 80076564 8FA90054 */ lw $t1, 0x54($sp) -/* 077168 80076568 000FC080 */ sll $t8, $t7, 2 -/* 07716C 8007656C 030FC023 */ subu $t8, $t8, $t7 -/* 077170 80076570 0018C080 */ sll $t8, $t8, 2 -/* 077174 80076574 030FC021 */ addu $t8, $t8, $t7 -/* 077178 80076578 0018C0C0 */ sll $t8, $t8, 3 -/* 07717C 8007657C 27394018 */ addiu $t9, %lo(pfs) # addiu $t9, $t9, 0x4018 -/* 077180 80076580 27A8002C */ addiu $t0, $sp, 0x2c -/* 077184 80076584 AFA80010 */ sw $t0, 0x10($sp) -/* 077188 80076588 03192021 */ addu $a0, $t8, $t9 -/* 07718C 8007658C 24053459 */ li $a1, 13401 -/* 077190 80076590 27A70034 */ addiu $a3, $sp, 0x34 -/* 077194 80076594 0C0343A0 */ jal osPfsFindFile -/* 077198 80076598 AFA90014 */ sw $t1, 0x14($sp) -/* 07719C 8007659C 8FBF001C */ lw $ra, 0x1c($sp) -/* 0771A0 800765A0 14400003 */ bnez $v0, .L800765B0 -/* 0771A4 800765A4 24010001 */ li $at, 1 -/* 0771A8 800765A8 10000017 */ b .L80076608 -/* 0771AC 800765AC 00001025 */ move $v0, $zero -.L800765B0: -/* 0771B0 800765B0 10410003 */ beq $v0, $at, .L800765C0 -/* 0771B4 800765B4 2401000B */ li $at, 11 -/* 0771B8 800765B8 14410004 */ bne $v0, $at, .L800765CC -/* 0771BC 800765BC 24010003 */ li $at, 3 -.L800765C0: -/* 0771C0 800765C0 10000011 */ b .L80076608 -/* 0771C4 800765C4 24020001 */ li $v0, 1 -/* 0771C8 800765C8 24010003 */ li $at, 3 -.L800765CC: -/* 0771CC 800765CC 14410004 */ bne $v0, $at, .L800765E0 -/* 0771D0 800765D0 2401000A */ li $at, 10 -/* 0771D4 800765D4 1000000C */ b .L80076608 -/* 0771D8 800765D8 24020002 */ li $v0, 2 -/* 0771DC 800765DC 2401000A */ li $at, 10 -.L800765E0: -/* 0771E0 800765E0 14410004 */ bne $v0, $at, .L800765F4 -/* 0771E4 800765E4 24010005 */ li $at, 5 -/* 0771E8 800765E8 10000007 */ b .L80076608 -/* 0771EC 800765EC 24020003 */ li $v0, 3 -/* 0771F0 800765F0 24010005 */ li $at, 5 -.L800765F4: -/* 0771F4 800765F4 14410004 */ bne $v0, $at, .L80076608 -/* 0771F8 800765F8 24020009 */ li $v0, 9 -/* 0771FC 800765FC 10000002 */ b .L80076608 -/* 077200 80076600 24020005 */ li $v0, 5 -/* 077204 80076604 24020009 */ li $v0, 9 -.L80076608: -/* 077208 80076608 03E00008 */ jr $ra -/* 07720C 8007660C 27BD0048 */ addiu $sp, $sp, 0x48 - diff --git a/asm/non_matchings/controller_pak/func_800766D4.s b/asm/non_matchings/controller_pak/func_800766D4.s deleted file mode 100644 index e9022116..00000000 --- a/asm/non_matchings/controller_pak/func_800766D4.s +++ /dev/null @@ -1,166 +0,0 @@ -glabel func_800766D4 -/* 0772D4 800766D4 27BDFFA8 */ addiu $sp, $sp, -0x58 -/* 0772D8 800766D8 AFBF0024 */ sw $ra, 0x24($sp) -/* 0772DC 800766DC AFA40058 */ sw $a0, 0x58($sp) -/* 0772E0 800766E0 AFA5005C */ sw $a1, 0x5c($sp) -/* 0772E4 800766E4 AFA60060 */ sw $a2, 0x60($sp) -/* 0772E8 800766E8 0C01D637 */ jal func_800758DC -/* 0772EC 800766EC AFA70064 */ sw $a3, 0x64($sp) -/* 0772F0 800766F0 10400007 */ beqz $v0, .L80076710 -/* 0772F4 800766F4 27A50044 */ addiu $a1, $sp, 0x44 -/* 0772F8 800766F8 8FA40058 */ lw $a0, 0x58($sp) -/* 0772FC 800766FC 0C01D6BB */ jal func_80075AEC -/* 077300 80076700 AFA20038 */ sw $v0, 0x38($sp) -/* 077304 80076704 8FA20038 */ lw $v0, 0x38($sp) -/* 077308 80076708 10000083 */ b .L80076918 -/* 07730C 8007670C 8FBF0024 */ lw $ra, 0x24($sp) -.L80076710: -/* 077310 80076710 8FA3006C */ lw $v1, 0x6c($sp) -/* 077314 80076714 8FA40060 */ lw $a0, 0x60($sp) -/* 077318 80076718 306200FF */ andi $v0, $v1, 0xff -/* 07731C 8007671C 10400003 */ beqz $v0, .L8007672C -/* 077320 80076720 00603825 */ move $a3, $v1 -/* 077324 80076724 00623823 */ subu $a3, $v1, $v0 -/* 077328 80076728 24E70100 */ addiu $a3, $a3, 0x100 -.L8007672C: -/* 07732C 8007672C 24060010 */ li $a2, 16 -/* 077330 80076730 0C01DA8E */ jal func_80076A38 -/* 077334 80076734 AFA70030 */ sw $a3, 0x30($sp) -/* 077338 80076738 8FA40064 */ lw $a0, 0x64($sp) -/* 07733C 8007673C 27A5003C */ addiu $a1, $sp, 0x3c -/* 077340 80076740 0C01DA8E */ jal func_80076A38 -/* 077344 80076744 24060004 */ li $a2, 4 -/* 077348 80076748 0C027AC8 */ jal get_language -/* 07734C 8007674C 00000000 */ nop -/* 077350 80076750 24010003 */ li $at, 3 -/* 077354 80076754 14410005 */ bne $v0, $at, .L8007676C -/* 077358 80076758 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 -/* 07735C 8007675C 3C0E4E44 */ lui $t6, (0x4E44594A >> 16) # lui $t6, 0x4e44 -/* 077360 80076760 35CE594A */ ori $t6, (0x4E44594A & 0xFFFF) # ori $t6, $t6, 0x594a -/* 077364 80076764 1000000A */ b .L80076790 -/* 077368 80076768 AFAE002C */ sw $t6, 0x2c($sp) -.L8007676C: -/* 07736C 8007676C 8DEF0300 */ lw $t7, %lo(osTvType)($t7) -/* 077370 80076770 3C194E44 */ lui $t9, (0x4E445945 >> 16) # lui $t9, 0x4e44 -/* 077374 80076774 15E00005 */ bnez $t7, .L8007678C -/* 077378 80076778 37395945 */ ori $t9, (0x4E445945 & 0xFFFF) # ori $t9, $t9, 0x5945 -/* 07737C 8007677C 3C184E44 */ lui $t8, (0x4E445950 >> 16) # lui $t8, 0x4e44 -/* 077380 80076780 37185950 */ ori $t8, (0x4E445950 & 0xFFFF) # ori $t8, $t8, 0x5950 -/* 077384 80076784 10000002 */ b .L80076790 -/* 077388 80076788 AFB8002C */ sw $t8, 0x2c($sp) -.L8007678C: -/* 07738C 8007678C AFB9002C */ sw $t9, 0x2c($sp) -.L80076790: -/* 077390 80076790 8FA40058 */ lw $a0, 0x58($sp) -/* 077394 80076794 8FA50060 */ lw $a1, 0x60($sp) -/* 077398 80076798 8FA60064 */ lw $a2, 0x64($sp) -/* 07739C 8007679C 0C01D93A */ jal func_800764E8 -/* 0773A0 800767A0 27A70034 */ addiu $a3, $sp, 0x34 -/* 0773A4 800767A4 1440000B */ bnez $v0, .L800767D4 -/* 0773A8 800767A8 00401825 */ move $v1, $v0 -/* 0773AC 800767AC 8FA2005C */ lw $v0, 0x5c($sp) -/* 0773B0 800767B0 2401FFFF */ li $at, -1 -/* 0773B4 800767B4 1041002C */ beq $v0, $at, .L80076868 -/* 0773B8 800767B8 00000000 */ nop -/* 0773BC 800767BC 8FA80034 */ lw $t0, 0x34($sp) -/* 0773C0 800767C0 00000000 */ nop -/* 0773C4 800767C4 10480028 */ beq $v0, $t0, .L80076868 -/* 0773C8 800767C8 00000000 */ nop -/* 0773CC 800767CC 10000026 */ b .L80076868 -/* 0773D0 800767D0 24030009 */ li $v1, 9 -.L800767D4: -/* 0773D4 800767D4 24010005 */ li $at, 5 -/* 0773D8 800767D8 14410023 */ bne $v0, $at, .L80076868 -/* 0773DC 800767DC 00000000 */ nop -/* 0773E0 800767E0 8FA9005C */ lw $t1, 0x5c($sp) -/* 0773E4 800767E4 2401FFFF */ li $at, -1 -/* 0773E8 800767E8 11210003 */ beq $t1, $at, .L800767F8 -/* 0773EC 800767EC 3C0C8012 */ lui $t4, %hi(pfs) # $t4, 0x8012 -/* 0773F0 800767F0 1000001D */ b .L80076868 -/* 0773F4 800767F4 24030009 */ li $v1, 9 -.L800767F8: -/* 0773F8 800767F8 8FAA0058 */ lw $t2, 0x58($sp) -/* 0773FC 800767FC 8FAE0030 */ lw $t6, 0x30($sp) -/* 077400 80076800 000A5880 */ sll $t3, $t2, 2 -/* 077404 80076804 016A5823 */ subu $t3, $t3, $t2 -/* 077408 80076808 000B5880 */ sll $t3, $t3, 2 -/* 07740C 8007680C 016A5821 */ addu $t3, $t3, $t2 -/* 077410 80076810 000B58C0 */ sll $t3, $t3, 3 -/* 077414 80076814 258C4018 */ addiu $t4, %lo(pfs) # addiu $t4, $t4, 0x4018 -/* 077418 80076818 8FA6002C */ lw $a2, 0x2c($sp) -/* 07741C 8007681C 27AD003C */ addiu $t5, $sp, 0x3c -/* 077420 80076820 27AF0034 */ addiu $t7, $sp, 0x34 -/* 077424 80076824 AFAF0018 */ sw $t7, 0x18($sp) -/* 077428 80076828 AFAD0010 */ sw $t5, 0x10($sp) -/* 07742C 8007682C 016C2021 */ addu $a0, $t3, $t4 -/* 077430 80076830 24053459 */ li $a1, 13401 -/* 077434 80076834 27A70044 */ addiu $a3, $sp, 0x44 -/* 077438 80076838 0C034410 */ jal osPfsAllocateFile -/* 07743C 8007683C AFAE0014 */ sw $t6, 0x14($sp) -/* 077440 80076840 14400003 */ bnez $v0, .L80076850 -/* 077444 80076844 24010007 */ li $at, 7 -/* 077448 80076848 10000007 */ b .L80076868 -/* 07744C 8007684C 00001825 */ move $v1, $zero -.L80076850: -/* 077450 80076850 10410003 */ beq $v0, $at, .L80076860 -/* 077454 80076854 24010008 */ li $at, 8 -/* 077458 80076858 14410003 */ bne $v0, $at, .L80076868 -/* 07745C 8007685C 24030009 */ li $v1, 9 -.L80076860: -/* 077460 80076860 10000001 */ b .L80076868 -/* 077464 80076864 24030004 */ li $v1, 4 -.L80076868: -/* 077468 80076868 14600025 */ bnez $v1, .L80076900 -/* 07746C 8007686C 3C088012 */ lui $t0, %hi(pfs) # $t0, 0x8012 -/* 077470 80076870 8FB80058 */ lw $t8, 0x58($sp) -/* 077474 80076874 8FA90030 */ lw $t1, 0x30($sp) -/* 077478 80076878 0018C880 */ sll $t9, $t8, 2 -/* 07747C 8007687C 0338C823 */ subu $t9, $t9, $t8 -/* 077480 80076880 0019C880 */ sll $t9, $t9, 2 -/* 077484 80076884 8FAA0068 */ lw $t2, 0x68($sp) -/* 077488 80076888 0338C821 */ addu $t9, $t9, $t8 -/* 07748C 8007688C 0019C8C0 */ sll $t9, $t9, 3 -/* 077490 80076890 25084018 */ addiu $t0, %lo(pfs) # addiu $t0, $t0, 0x4018 -/* 077494 80076894 8FA50034 */ lw $a1, 0x34($sp) -/* 077498 80076898 03282021 */ addu $a0, $t9, $t0 -/* 07749C 8007689C 24060001 */ li $a2, 1 -/* 0774A0 800768A0 00003825 */ move $a3, $zero -/* 0774A4 800768A4 AFA90010 */ sw $t1, 0x10($sp) -/* 0774A8 800768A8 0C033BF7 */ jal osPfsReadWriteFile -/* 0774AC 800768AC AFAA0014 */ sw $t2, 0x14($sp) -/* 0774B0 800768B0 14400003 */ bnez $v0, .L800768C0 -/* 0774B4 800768B4 24010001 */ li $at, 1 -/* 0774B8 800768B8 10000011 */ b .L80076900 -/* 0774BC 800768BC 00001825 */ move $v1, $zero -.L800768C0: -/* 0774C0 800768C0 10410003 */ beq $v0, $at, .L800768D0 -/* 0774C4 800768C4 2401000B */ li $at, 11 -/* 0774C8 800768C8 14410004 */ bne $v0, $at, .L800768DC -/* 0774CC 800768CC 24010003 */ li $at, 3 -.L800768D0: -/* 0774D0 800768D0 1000000B */ b .L80076900 -/* 0774D4 800768D4 24030001 */ li $v1, 1 -/* 0774D8 800768D8 24010003 */ li $at, 3 -.L800768DC: -/* 0774DC 800768DC 14410004 */ bne $v0, $at, .L800768F0 -/* 0774E0 800768E0 2401000A */ li $at, 10 -/* 0774E4 800768E4 10000006 */ b .L80076900 -/* 0774E8 800768E8 24030002 */ li $v1, 2 -/* 0774EC 800768EC 2401000A */ li $at, 10 -.L800768F0: -/* 0774F0 800768F0 14410003 */ bne $v0, $at, .L80076900 -/* 0774F4 800768F4 24030009 */ li $v1, 9 -/* 0774F8 800768F8 10000001 */ b .L80076900 -/* 0774FC 800768FC 24030003 */ li $v1, 3 -.L80076900: -/* 077500 80076900 8FA40058 */ lw $a0, 0x58($sp) -/* 077504 80076904 0C01D6BB */ jal func_80075AEC -/* 077508 80076908 AFA30038 */ sw $v1, 0x38($sp) -/* 07750C 8007690C 8FA20038 */ lw $v0, 0x38($sp) -/* 077510 80076910 00000000 */ nop -/* 077514 80076914 8FBF0024 */ lw $ra, 0x24($sp) -.L80076918: -/* 077518 80076918 27BD0058 */ addiu $sp, $sp, 0x58 -/* 07751C 8007691C 03E00008 */ jr $ra -/* 077520 80076920 00000000 */ nop - diff --git a/asm/non_matchings/controller_pak/func_8007698C.s b/asm/non_matchings/controller_pak/func_8007698C.s deleted file mode 100644 index 000cc36f..00000000 --- a/asm/non_matchings/controller_pak/func_8007698C.s +++ /dev/null @@ -1,52 +0,0 @@ -glabel func_8007698C -/* 07758C 8007698C 90820000 */ lbu $v0, ($a0) -/* 077590 80076990 00A01825 */ move $v1, $a1 -/* 077594 80076994 10400014 */ beqz $v0, .L800769E8 -/* 077598 80076998 00000000 */ nop -/* 07759C 8007699C 10C00012 */ beqz $a2, .L800769E8 -/* 0775A0 800769A0 2408002D */ li $t0, 45 -/* 0775A4 800769A4 3C07800E */ lui $a3, %hi(gN64FontCodes) # $a3, 0x800e -/* 0775A8 800769A8 24E7E444 */ addiu $a3, %lo(gN64FontCodes) # addiu $a3, $a3, -0x1bbc -/* 0775AC 800769AC 28410042 */ slti $at, $v0, 66 -.L800769B0: -/* 0775B0 800769B0 10200005 */ beqz $at, .L800769C8 -/* 0775B4 800769B4 00E27021 */ addu $t6, $a3, $v0 -/* 0775B8 800769B8 91CF0000 */ lbu $t7, ($t6) -/* 0775BC 800769BC 24A50001 */ addiu $a1, $a1, 1 -/* 0775C0 800769C0 10000003 */ b .L800769D0 -/* 0775C4 800769C4 A0AFFFFF */ sb $t7, -1($a1) -.L800769C8: -/* 0775C8 800769C8 A0A80000 */ sb $t0, ($a1) -/* 0775CC 800769CC 24A50001 */ addiu $a1, $a1, 1 -.L800769D0: -/* 0775D0 800769D0 90820001 */ lbu $v0, 1($a0) -/* 0775D4 800769D4 24840001 */ addiu $a0, $a0, 1 -/* 0775D8 800769D8 10400003 */ beqz $v0, .L800769E8 -/* 0775DC 800769DC 24C6FFFF */ addiu $a2, $a2, -1 -/* 0775E0 800769E0 14C0FFF3 */ bnez $a2, .L800769B0 -/* 0775E4 800769E4 28410042 */ slti $at, $v0, 66 -.L800769E8: -/* 0775E8 800769E8 10C00010 */ beqz $a2, .L80076A2C -/* 0775EC 800769EC 30C40003 */ andi $a0, $a2, 3 -/* 0775F0 800769F0 00042023 */ negu $a0, $a0 -/* 0775F4 800769F4 10800006 */ beqz $a0, .L80076A10 -/* 0775F8 800769F8 00861021 */ addu $v0, $a0, $a2 -.L800769FC: -/* 0775FC 800769FC 24C6FFFF */ addiu $a2, $a2, -1 -/* 077600 80076A00 A0A00000 */ sb $zero, ($a1) -/* 077604 80076A04 1446FFFD */ bne $v0, $a2, .L800769FC -/* 077608 80076A08 24A50001 */ addiu $a1, $a1, 1 -/* 07760C 80076A0C 10C00007 */ beqz $a2, .L80076A2C -.L80076A10: -/* 077610 80076A10 24C6FFFC */ addiu $a2, $a2, -4 -/* 077614 80076A14 A0A00000 */ sb $zero, ($a1) -/* 077618 80076A18 A0A00001 */ sb $zero, 1($a1) -/* 07761C 80076A1C A0A00002 */ sb $zero, 2($a1) -/* 077620 80076A20 A0A00003 */ sb $zero, 3($a1) -/* 077624 80076A24 14C0FFFA */ bnez $a2, .L80076A10 -/* 077628 80076A28 24A50004 */ addiu $a1, $a1, 4 -.L80076A2C: -/* 07762C 80076A2C A0A00000 */ sb $zero, ($a1) -/* 077630 80076A30 03E00008 */ jr $ra -/* 077634 80076A34 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/controller_pak/func_80076A38.s b/asm/non_matchings/controller_pak/func_80076A38.s deleted file mode 100644 index f08e05d9..00000000 --- a/asm/non_matchings/controller_pak/func_80076A38.s +++ /dev/null @@ -1,57 +0,0 @@ -glabel func_80076A38 -/* 077638 80076A38 908E0000 */ lbu $t6, ($a0) -/* 07763C 80076A3C 00A01825 */ move $v1, $a1 -/* 077640 80076A40 11C00018 */ beqz $t6, .L80076AA4 -/* 077644 80076A44 00000000 */ nop -/* 077648 80076A48 10C00016 */ beqz $a2, .L80076AA4 -/* 07764C 80076A4C 24090041 */ li $t1, 65 -.L80076A50: -/* 077650 80076A50 A0A00000 */ sb $zero, ($a1) -/* 077654 80076A54 3C08800E */ lui $t0, %hi(gN64FontCodes) # $t0, 0x800e -/* 077658 80076A58 90870000 */ lbu $a3, ($a0) -/* 07765C 80076A5C 2508E444 */ addiu $t0, %lo(gN64FontCodes) # addiu $t0, $t0, -0x1bbc -/* 077660 80076A60 00001025 */ move $v0, $zero -.L80076A64: -/* 077664 80076A64 910F0000 */ lbu $t7, ($t0) -/* 077668 80076A68 00000000 */ nop -/* 07766C 80076A6C 14EF0004 */ bne $a3, $t7, .L80076A80 -/* 077670 80076A70 00000000 */ nop -/* 077674 80076A74 A0A20000 */ sb $v0, ($a1) -/* 077678 80076A78 10000004 */ b .L80076A8C -/* 07767C 80076A7C 24A50001 */ addiu $a1, $a1, 1 -.L80076A80: -/* 077680 80076A80 24420001 */ addiu $v0, $v0, 1 -/* 077684 80076A84 1449FFF7 */ bne $v0, $t1, .L80076A64 -/* 077688 80076A88 25080001 */ addiu $t0, $t0, 1 -.L80076A8C: -/* 07768C 80076A8C 90980001 */ lbu $t8, 1($a0) -/* 077690 80076A90 24840001 */ addiu $a0, $a0, 1 -/* 077694 80076A94 13000003 */ beqz $t8, .L80076AA4 -/* 077698 80076A98 24C6FFFF */ addiu $a2, $a2, -1 -/* 07769C 80076A9C 14C0FFEC */ bnez $a2, .L80076A50 -/* 0776A0 80076AA0 00000000 */ nop -.L80076AA4: -/* 0776A4 80076AA4 10C00010 */ beqz $a2, .L80076AE8 -/* 0776A8 80076AA8 30C40003 */ andi $a0, $a2, 3 -/* 0776AC 80076AAC 00042023 */ negu $a0, $a0 -/* 0776B0 80076AB0 10800006 */ beqz $a0, .L80076ACC -/* 0776B4 80076AB4 00861021 */ addu $v0, $a0, $a2 -.L80076AB8: -/* 0776B8 80076AB8 24C6FFFF */ addiu $a2, $a2, -1 -/* 0776BC 80076ABC A0A00000 */ sb $zero, ($a1) -/* 0776C0 80076AC0 1446FFFD */ bne $v0, $a2, .L80076AB8 -/* 0776C4 80076AC4 24A50001 */ addiu $a1, $a1, 1 -/* 0776C8 80076AC8 10C00007 */ beqz $a2, .L80076AE8 -.L80076ACC: -/* 0776CC 80076ACC 24C6FFFC */ addiu $a2, $a2, -4 -/* 0776D0 80076AD0 A0A00000 */ sb $zero, ($a1) -/* 0776D4 80076AD4 A0A00001 */ sb $zero, 1($a1) -/* 0776D8 80076AD8 A0A00002 */ sb $zero, 2($a1) -/* 0776DC 80076ADC A0A00003 */ sb $zero, 3($a1) -/* 0776E0 80076AE0 14C0FFFA */ bnez $a2, .L80076ACC -/* 0776E4 80076AE4 24A50004 */ addiu $a1, $a1, 4 -.L80076AE8: -/* 0776E8 80076AE8 A0A00000 */ sb $zero, ($a1) -/* 0776EC 80076AEC 03E00008 */ jr $ra -/* 0776F0 80076AF0 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/unknown_06B2B0/func_8006A6B0.s b/asm/non_matchings/game/func_8006A6B0.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006A6B0.s rename to asm/non_matchings/game/func_8006A6B0.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006AC00.s b/asm/non_matchings/game/func_8006AC00.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006AC00.s rename to asm/non_matchings/game/func_8006AC00.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006AE2C.s b/asm/non_matchings/game/func_8006AE2C.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006AE2C.s rename to asm/non_matchings/game/func_8006AE2C.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006CCF0.s b/asm/non_matchings/game/func_8006CCF0.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006CCF0.s rename to asm/non_matchings/game/func_8006CCF0.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006DCF8.s b/asm/non_matchings/game/func_8006DCF8.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006DCF8.s rename to asm/non_matchings/game/func_8006DCF8.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006ECFC.s b/asm/non_matchings/game/func_8006ECFC.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006ECFC.s rename to asm/non_matchings/game/func_8006ECFC.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006EFDC.s b/asm/non_matchings/game/func_8006EFDC.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006EFDC.s rename to asm/non_matchings/game/func_8006EFDC.s diff --git a/asm/non_matchings/unknown_06B2B0/load_level.s b/asm/non_matchings/game/load_level.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/load_level.s rename to asm/non_matchings/game/load_level.s diff --git a/asm/non_matchings/unknown_09F8F0/func_8009ECF0.s b/asm/non_matchings/game_ui/func_8009ECF0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_8009ECF0.s rename to asm/non_matchings/game_ui/func_8009ECF0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_8009F034.s b/asm/non_matchings/game_ui/func_8009F034.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_8009F034.s rename to asm/non_matchings/game_ui/func_8009F034.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A003C.s b/asm/non_matchings/game_ui/func_800A003C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A003C.s rename to asm/non_matchings/game_ui/func_800A003C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A01A0.s b/asm/non_matchings/game_ui/func_800A01A0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A01A0.s rename to asm/non_matchings/game_ui/func_800A01A0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A0BD4.s b/asm/non_matchings/game_ui/func_800A0BD4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A0BD4.s rename to asm/non_matchings/game_ui/func_800A0BD4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A0EB4.s b/asm/non_matchings/game_ui/func_800A0EB4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A0EB4.s rename to asm/non_matchings/game_ui/func_800A0EB4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1248.s b/asm/non_matchings/game_ui/func_800A1248.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A1248.s rename to asm/non_matchings/game_ui/func_800A1248.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A14F0.s b/asm/non_matchings/game_ui/func_800A14F0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A14F0.s rename to asm/non_matchings/game_ui/func_800A14F0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A19A4.s b/asm/non_matchings/game_ui/func_800A19A4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A19A4.s rename to asm/non_matchings/game_ui/func_800A19A4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1C04.s b/asm/non_matchings/game_ui/func_800A1C04.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A1C04.s rename to asm/non_matchings/game_ui/func_800A1C04.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1E48.s b/asm/non_matchings/game_ui/func_800A1E48.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A1E48.s rename to asm/non_matchings/game_ui/func_800A1E48.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A22F4.s b/asm/non_matchings/game_ui/func_800A22F4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A22F4.s rename to asm/non_matchings/game_ui/func_800A22F4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A277C.s b/asm/non_matchings/game_ui/func_800A277C.s similarity index 99% rename from asm/non_matchings/unknown_09F8F0/func_800A277C.s rename to asm/non_matchings/game_ui/func_800A277C.s index 94521038..12dc2f5f 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A277C.s +++ b/asm/non_matchings/game_ui/func_800A277C.s @@ -940,7 +940,7 @@ glabel func_800A277C /* 0A40F0 800A34F0 00002025 */ move $a0, $zero /* 0A40F4 800A34F4 00002825 */ move $a1, $zero /* 0A40F8 800A34F8 00003025 */ move $a2, $zero -/* 0A40FC 800A34FC 0C0310E1 */ jal set_text_color +/* 0A40FC 800A34FC 0C0310E1 */ jal set_text_colour /* 0A4100 800A3500 240700FF */ li $a3, 255 /* 0A4104 800A3504 3C108012 */ lui $s0, %hi(D_8012718C) # $s0, 0x8012 /* 0A4108 800A3508 3C118012 */ lui $s1, %hi(D_80126D24) # $s1, 0x8012 @@ -998,7 +998,7 @@ glabel func_800A277C /* 0A41D8 800A35D8 90440010 */ lbu $a0, 0x10($v0) /* 0A41DC 800A35DC 90450011 */ lbu $a1, 0x11($v0) /* 0A41E0 800A35E0 90460012 */ lbu $a2, 0x12($v0) -/* 0A41E4 800A35E4 0C0310E1 */ jal set_text_color +/* 0A41E4 800A35E4 0C0310E1 */ jal set_text_colour /* 0A41E8 800A35E8 AFAE0010 */ sw $t6, 0x10($sp) /* 0A41EC 800A35EC 8E190000 */ lw $t9, ($s0) /* 0A41F0 800A35F0 8E2B0000 */ lw $t3, ($s1) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A36CC.s b/asm/non_matchings/game_ui/func_800A36CC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A36CC.s rename to asm/non_matchings/game_ui/func_800A36CC.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A3884.s b/asm/non_matchings/game_ui/func_800A3884.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A3884.s rename to asm/non_matchings/game_ui/func_800A3884.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A3CE4.s b/asm/non_matchings/game_ui/func_800A3CE4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A3CE4.s rename to asm/non_matchings/game_ui/func_800A3CE4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A4154.s b/asm/non_matchings/game_ui/func_800A4154.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A4154.s rename to asm/non_matchings/game_ui/func_800A4154.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A45F0.s b/asm/non_matchings/game_ui/func_800A45F0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A45F0.s rename to asm/non_matchings/game_ui/func_800A45F0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A47A0.s b/asm/non_matchings/game_ui/func_800A47A0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A47A0.s rename to asm/non_matchings/game_ui/func_800A47A0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A497C.s b/asm/non_matchings/game_ui/func_800A497C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A497C.s rename to asm/non_matchings/game_ui/func_800A497C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A4C44.s b/asm/non_matchings/game_ui/func_800A4C44.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A4C44.s rename to asm/non_matchings/game_ui/func_800A4C44.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A4F50.s b/asm/non_matchings/game_ui/func_800A4F50.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A4F50.s rename to asm/non_matchings/game_ui/func_800A4F50.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A5A64.s b/asm/non_matchings/game_ui/func_800A5A64.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A5A64.s rename to asm/non_matchings/game_ui/func_800A5A64.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A5F18.s b/asm/non_matchings/game_ui/func_800A5F18.s similarity index 99% rename from asm/non_matchings/unknown_09F8F0/func_800A5F18.s rename to asm/non_matchings/game_ui/func_800A5F18.s index 0a9ba68e..8034f21b 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800A5F18.s +++ b/asm/non_matchings/game_ui/func_800A5F18.s @@ -72,7 +72,7 @@ glabel func_800A5F18 /* 0A6C00 800A6000 240400FF */ li $a0, 255 /* 0A6C04 800A6004 240500FF */ li $a1, 255 /* 0A6C08 800A6008 240600FF */ li $a2, 255 -/* 0A6C0C 800A600C 0C0310E1 */ jal set_text_color +/* 0A6C0C 800A600C 0C0310E1 */ jal set_text_colour /* 0A6C10 800A6010 00003825 */ move $a3, $zero /* 0A6C14 800A6014 3C028012 */ lui $v0, %hi(D_80126CDC) # $v0, 0x8012 /* 0A6C18 800A6018 8C426CDC */ lw $v0, %lo(D_80126CDC)($v0) diff --git a/asm/non_matchings/unknown_09F8F0/func_800A6254.s b/asm/non_matchings/game_ui/func_800A6254.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A6254.s rename to asm/non_matchings/game_ui/func_800A6254.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A6E30.s b/asm/non_matchings/game_ui/func_800A6E30.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A6E30.s rename to asm/non_matchings/game_ui/func_800A6E30.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A718C.s b/asm/non_matchings/game_ui/func_800A718C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A718C.s rename to asm/non_matchings/game_ui/func_800A718C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7520.s b/asm/non_matchings/game_ui/func_800A7520.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7520.s rename to asm/non_matchings/game_ui/func_800A7520.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7A60.s b/asm/non_matchings/game_ui/func_800A7A60.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7A60.s rename to asm/non_matchings/game_ui/func_800A7A60.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7B68.s b/asm/non_matchings/game_ui/func_800A7B68.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7B68.s rename to asm/non_matchings/game_ui/func_800A7B68.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7FBC.s b/asm/non_matchings/game_ui/func_800A7FBC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7FBC.s rename to asm/non_matchings/game_ui/func_800A7FBC.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A8474.s b/asm/non_matchings/game_ui/func_800A8474.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A8474.s rename to asm/non_matchings/game_ui/func_800A8474.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AA3EC.s b/asm/non_matchings/game_ui/func_800AA3EC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AA3EC.s rename to asm/non_matchings/game_ui/func_800AA3EC.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AA600.s b/asm/non_matchings/game_ui/func_800AA600.s similarity index 99% rename from asm/non_matchings/unknown_09F8F0/func_800AA600.s rename to asm/non_matchings/game_ui/func_800AA600.s index 07132549..16013755 100644 --- a/asm/non_matchings/unknown_09F8F0/func_800AA600.s +++ b/asm/non_matchings/game_ui/func_800AA600.s @@ -305,7 +305,7 @@ glabel func_800AA600 /* 0AB65C 800AAA5C 24846CFC */ addiu $a0, %lo(D_80126CFC) # addiu $a0, $a0, 0x6cfc /* 0AB660 800AAA60 27A50088 */ addiu $a1, $sp, 0x88 /* 0AB664 800AAA64 E7B20010 */ swc1 $f18, 0x10($sp) -/* 0AB668 800AAA68 0C01E340 */ jal func_80078D00 +/* 0AB668 800AAA68 0C01E340 */ jal render_texture_rectangle_scaled /* 0AB66C 800AAA6C E7A80014 */ swc1 $f8, 0x14($sp) /* 0AB670 800AAA70 10000018 */ b .L800AAAD4 /* 0AB674 800AAA74 00000000 */ nop @@ -387,7 +387,7 @@ glabel func_800AA600 /* 0AB790 800AAB90 AFB80018 */ sw $t8, 0x18($sp) /* 0AB794 800AAB94 E7A00010 */ swc1 $f0, 0x10($sp) /* 0AB798 800AAB98 46204420 */ cvt.s.d $f16, $f8 -/* 0AB79C 800AAB9C 0C01E340 */ jal func_80078D00 +/* 0AB79C 800AAB9C 0C01E340 */ jal render_texture_rectangle_scaled /* 0AB7A0 800AABA0 E7B00014 */ swc1 $f16, 0x14($sp) /* 0AB7A4 800AABA4 100000D7 */ b .L800AAF04 /* 0AB7A8 800AABA8 86080006 */ lh $t0, 6($s0) @@ -513,7 +513,7 @@ glabel func_800AA600 /* 0AB97C 800AAD7C AFAF001C */ sw $t7, 0x1c($sp) /* 0AB980 800AAD80 AFAE0018 */ sw $t6, 0x18($sp) /* 0AB984 800AAD84 E7A00014 */ swc1 $f0, 0x14($sp) -/* 0AB988 800AAD88 0C01E340 */ jal func_80078D00 +/* 0AB988 800AAD88 0C01E340 */ jal render_texture_rectangle_scaled /* 0AB98C 800AAD8C E7A00010 */ swc1 $f0, 0x10($sp) /* 0AB990 800AAD90 3C048012 */ lui $a0, %hi(D_80126CFC) # $a0, 0x8012 /* 0AB994 800AAD94 0C01ECF4 */ jal func_8007B3D0 diff --git a/asm/non_matchings/unknown_09F8F0/func_800AAFD0.s b/asm/non_matchings/game_ui/func_800AAFD0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AAFD0.s rename to asm/non_matchings/game_ui/func_800AAFD0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB1F0.s b/asm/non_matchings/game_ui/func_800AB1F0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AB1F0.s rename to asm/non_matchings/game_ui/func_800AB1F0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB35C.s b/asm/non_matchings/game_ui/func_800AB35C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AB35C.s rename to asm/non_matchings/game_ui/func_800AB35C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB4A8.s b/asm/non_matchings/game_ui/func_800AB4A8.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AB4A8.s rename to asm/non_matchings/game_ui/func_800AB4A8.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ABB34.s b/asm/non_matchings/game_ui/func_800ABB34.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ABB34.s rename to asm/non_matchings/game_ui/func_800ABB34.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ABC5C.s b/asm/non_matchings/game_ui/func_800ABC5C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ABC5C.s rename to asm/non_matchings/game_ui/func_800ABC5C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ABE68.s b/asm/non_matchings/game_ui/func_800ABE68.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ABE68.s rename to asm/non_matchings/game_ui/func_800ABE68.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC0C8.s b/asm/non_matchings/game_ui/func_800AC0C8.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC0C8.s rename to asm/non_matchings/game_ui/func_800AC0C8.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC21C.s b/asm/non_matchings/game_ui/func_800AC21C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC21C.s rename to asm/non_matchings/game_ui/func_800AC21C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC5A4.s b/asm/non_matchings/game_ui/func_800AC5A4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC5A4.s rename to asm/non_matchings/game_ui/func_800AC5A4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC8A8.s b/asm/non_matchings/game_ui/func_800AC8A8.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC8A8.s rename to asm/non_matchings/game_ui/func_800AC8A8.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ACA20.s b/asm/non_matchings/game_ui/func_800ACA20.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ACA20.s rename to asm/non_matchings/game_ui/func_800ACA20.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD030.s b/asm/non_matchings/game_ui/func_800AD030.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AD030.s rename to asm/non_matchings/game_ui/func_800AD030.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD144.s b/asm/non_matchings/game_ui/func_800AD144.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AD144.s rename to asm/non_matchings/game_ui/func_800AD144.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD658.s b/asm/non_matchings/game_ui/func_800AD658.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AD658.s rename to asm/non_matchings/game_ui/func_800AD658.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ADCBC.s b/asm/non_matchings/game_ui/func_800ADCBC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ADCBC.s rename to asm/non_matchings/game_ui/func_800ADCBC.s diff --git a/asm/non_matchings/memory/free_memory_pool_slot.s b/asm/non_matchings/memory/free_memory_pool_slot.s index 7665006f..79de2c3f 100644 --- a/asm/non_matchings/memory/free_memory_pool_slot.s +++ b/asm/non_matchings/memory/free_memory_pool_slot.s @@ -78,10 +78,3 @@ glabel free_memory_pool_slot /* 07236C 8007176C 03E00008 */ jr $ra /* 072370 80071770 00000000 */ nop -/* 072374 80071774 00047100 */ sll $t6, $a0, 4 -/* 072378 80071778 3C028012 */ lui $v0, %hi(gMemoryPools+8) # $v0, 0x8012 -/* 07237C 8007177C 004E1021 */ addu $v0, $v0, $t6 -/* 072380 80071780 8C423588 */ lw $v0, %lo(gMemoryPools+8)($v0) -/* 072384 80071784 03E00008 */ jr $ra -/* 072388 80071788 00000000 */ nop - diff --git a/asm/non_matchings/memory/get_memory_color_tag_count.s b/asm/non_matchings/memory/get_memory_colour_tag_count.s similarity index 98% rename from asm/non_matchings/memory/get_memory_color_tag_count.s rename to asm/non_matchings/memory/get_memory_colour_tag_count.s index c8904487..50d98469 100644 --- a/asm/non_matchings/memory/get_memory_color_tag_count.s +++ b/asm/non_matchings/memory/get_memory_colour_tag_count.s @@ -1,4 +1,4 @@ -glabel get_memory_color_tag_count +glabel get_memory_colour_tag_count /* 072624 80071A24 3C028012 */ lui $v0, %hi(gMemoryPools+8) # $v0, 0x8012 /* 072628 80071A28 8C423588 */ lw $v0, %lo(gMemoryPools+8)($v0) /* 07262C 80071A2C 00001825 */ move $v1, $zero diff --git a/asm/non_matchings/menu/MenuBootLoop.s b/asm/non_matchings/menu/MenuBootLoop.s deleted file mode 100644 index 7334a874..00000000 --- a/asm/non_matchings/menu/MenuBootLoop.s +++ /dev/null @@ -1,124 +0,0 @@ -glabel menu_boot_loop -/* 08920C 8008860C 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 -/* 089210 80088610 8DCE0300 */ lw $t6, %lo(osTvType)($t6) -/* 089214 80088614 27BDFFD0 */ addiu $sp, $sp, -0x30 -/* 089218 80088618 AFBF0024 */ sw $ra, 0x24($sp) -/* 08921C 8008861C 00802825 */ move $a1, $a0 -/* 089220 80088620 AFA0002C */ sw $zero, 0x2c($sp) -/* 089224 80088624 15C00002 */ bnez $t6, .L80088630 -/* 089228 80088628 24030078 */ li $v1, 120 -/* 08922C 8008862C 24030084 */ li $v1, 132 -.L80088630: -/* 089230 80088630 3C028012 */ lui $v0, %hi(D_80126C20) # $v0, 0x8012 -/* 089234 80088634 8C426C20 */ lw $v0, %lo(D_80126C20)($v0) -/* 089238 80088638 00603825 */ move $a3, $v1 -/* 08923C 8008863C 10400009 */ beqz $v0, .L80088664 -/* 089240 80088640 3C038012 */ lui $v1, %hi(D_80126C18) # $v1, 0x8012 -/* 089244 80088644 24010001 */ li $at, 1 -/* 089248 80088648 10410019 */ beq $v0, $at, .L800886B0 -/* 08924C 8008864C 3C038012 */ lui $v1, %hi(D_80126C18) # $v1, 0x8012 -/* 089250 80088650 24010002 */ li $at, 2 -/* 089254 80088654 10410030 */ beq $v0, $at, .L80088718 -/* 089258 80088658 3C0C800E */ lui $t4, %hi(gMenuDelay) # $t4, 0x800e -/* 08925C 8008865C 10000043 */ b .L8008876C -/* 089260 80088660 28E1012C */ slti $at, $a3, 0x12c -.L80088664: -/* 089264 80088664 24636C18 */ addiu $v1, %lo(D_80126C18) # addiu $v1, $v1, 0x6c18 -/* 089268 80088668 8C620000 */ lw $v0, ($v1) -/* 08926C 8008866C 00000000 */ nop -/* 089270 80088670 28410020 */ slti $at, $v0, 0x20 -/* 089274 80088674 10200007 */ beqz $at, .L80088694 -/* 089278 80088678 00457821 */ addu $t7, $v0, $a1 -/* 08927C 8008867C 29E10021 */ slti $at, $t7, 0x21 -/* 089280 80088680 14200039 */ bnez $at, .L80088768 -/* 089284 80088684 AC6F0000 */ sw $t7, ($v1) -/* 089288 80088688 24190020 */ li $t9, 32 -/* 08928C 8008868C 10000036 */ b .L80088768 -/* 089290 80088690 AC790000 */ sw $t9, ($v1) -.L80088694: -/* 089294 80088694 0C0221FA */ jal func_800887E8 -/* 089298 80088698 AFA70028 */ sw $a3, 0x28($sp) -/* 08929C 8008869C 8FA70028 */ lw $a3, 0x28($sp) -/* 0892A0 800886A0 24080001 */ li $t0, 1 -/* 0892A4 800886A4 3C018012 */ lui $at, %hi(D_80126C20) # $at, 0x8012 -/* 0892A8 800886A8 1000002F */ b .L80088768 -/* 0892AC 800886AC AC286C20 */ sw $t0, %lo(D_80126C20)($at) -.L800886B0: -/* 0892B0 800886B0 24636C18 */ addiu $v1, $v1, %lo(D_80126C18) -/* 0892B4 800886B4 8C620000 */ lw $v0, ($v1) -/* 0892B8 800886B8 00000000 */ nop -/* 0892BC 800886BC 2841008C */ slti $at, $v0, 0x8c -/* 0892C0 800886C0 10200008 */ beqz $at, .L800886E4 -/* 0892C4 800886C4 00454821 */ addu $t1, $v0, $a1 -/* 0892C8 800886C8 2921008D */ slti $at, $t1, 0x8d -/* 0892CC 800886CC AC690000 */ sw $t1, ($v1) -/* 0892D0 800886D0 1420000C */ bnez $at, .L80088704 -/* 0892D4 800886D4 01201025 */ move $v0, $t1 -/* 0892D8 800886D8 2402008C */ li $v0, 140 -/* 0892DC 800886DC 10000009 */ b .L80088704 -/* 0892E0 800886E0 AC620000 */ sw $v0, ($v1) -.L800886E4: -/* 0892E4 800886E4 0C0221F1 */ jal func_800887C4 -/* 0892E8 800886E8 AFA70028 */ sw $a3, 0x28($sp) -/* 0892EC 800886EC 3C028012 */ lui $v0, %hi(D_80126C18) # $v0, 0x8012 -/* 0892F0 800886F0 240B0002 */ li $t3, 2 -/* 0892F4 800886F4 3C018012 */ lui $at, %hi(D_80126C20) # $at, 0x8012 -/* 0892F8 800886F8 8FA70028 */ lw $a3, 0x28($sp) -/* 0892FC 800886FC 8C426C18 */ lw $v0, %lo(D_80126C18)($v0) -/* 089300 80088700 AC2B6C20 */ sw $t3, %lo(D_80126C20)($at) -.L80088704: -/* 089304 80088704 28410081 */ slti $at, $v0, 0x81 -/* 089308 80088708 14200018 */ bnez $at, .L8008876C -/* 08930C 8008870C 28E1012C */ slti $at, $a3, 0x12c -/* 089310 80088710 10000015 */ b .L80088768 -/* 089314 80088714 2407012C */ li $a3, 300 -.L80088718: -/* 089318 80088718 8D8CF47C */ lw $t4, %lo(gMenuDelay)($t4) -/* 08931C 8008871C 00000000 */ nop -/* 089320 80088720 1180000C */ beqz $t4, .L80088754 -/* 089324 80088724 2407012C */ li $a3, 300 -/* 089328 80088728 0C030063 */ jal func_800C018C -/* 08932C 8008872C AFA50030 */ sw $a1, 0x30($sp) -/* 089330 80088730 8FA50030 */ lw $a1, 0x30($sp) -/* 089334 80088734 14400006 */ bnez $v0, .L80088750 -/* 089338 80088738 3C04800E */ lui $a0, %hi(sMenuTransitionFadeInFast) # $a0, 0x800e -/* 08933C 8008873C 2484F76C */ addiu $a0, %lo(sMenuTransitionFadeInFast) # addiu $a0, $a0, -0x894 -/* 089340 80088740 0C030076 */ jal func_800C01D8 -/* 089344 80088744 AFA50030 */ sw $a1, 0x30($sp) -/* 089348 80088748 8FA50030 */ lw $a1, 0x30($sp) -/* 08934C 8008874C 00000000 */ nop -.L80088750: -/* 089350 80088750 2407012C */ li $a3, 300 -.L80088754: -/* 089354 80088754 AFA70028 */ sw $a3, 0x28($sp) -/* 089358 80088758 0C02242B */ jal func_800890AC -/* 08935C 8008875C 00A02025 */ move $a0, $a1 -/* 089360 80088760 8FA70028 */ lw $a3, 0x28($sp) -/* 089364 80088764 AFA2002C */ sw $v0, 0x2c($sp) -.L80088768: -/* 089368 80088768 28E1012C */ slti $at, $a3, 0x12c -.L8008876C: -/* 08936C 8008876C 10200011 */ beqz $at, .L800887B4 -/* 089370 80088770 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 -/* 089374 80088774 3C05800E */ lui $a1, %hi(sGameTitleTileOffsets) # $a1, 0x800e -/* 089378 80088778 240D00FF */ li $t5, 255 -/* 08937C 8008877C 240E00FF */ li $t6, 255 -/* 089380 80088780 240F00FF */ li $t7, 255 -/* 089384 80088784 241800FF */ li $t8, 255 -/* 089388 80088788 AFB8001C */ sw $t8, 0x1c($sp) -/* 08938C 8008878C AFAF0018 */ sw $t7, 0x18($sp) -/* 089390 80088790 AFAE0014 */ sw $t6, 0x14($sp) -/* 089394 80088794 AFAD0010 */ sw $t5, 0x10($sp) -/* 089398 80088798 24A5F7DC */ addiu $a1, %lo(sGameTitleTileOffsets) # addiu $a1, $a1, -0x824 -/* 08939C 8008879C 248463A0 */ addiu $a0, %lo(D_801263A0) # addiu $a0, $a0, 0x63a0 -/* 0893A0 800887A0 0C01E2AE */ jal render_textured_rectangle -/* 0893A4 800887A4 240600A0 */ li $a2, 160 -/* 0893A8 800887A8 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 -/* 0893AC 800887AC 0C01ECF4 */ jal func_8007B3D0 -/* 0893B0 800887B0 248463A0 */ addiu $a0, %lo(D_801263A0) # addiu $a0, $a0, 0x63a0 -.L800887B4: -/* 0893B4 800887B4 8FBF0024 */ lw $ra, 0x24($sp) -/* 0893B8 800887B8 8FA2002C */ lw $v0, 0x2c($sp) -/* 0893BC 800887BC 03E00008 */ jr $ra -/* 0893C0 800887C0 27BD0030 */ addiu $sp, $sp, 0x30 - diff --git a/asm/non_matchings/menu/calculate_and_display_rom_checksum.s b/asm/non_matchings/menu/calculate_and_display_rom_checksum.s index ba5899af..71cdd5cd 100644 --- a/asm/non_matchings/menu/calculate_and_display_rom_checksum.s +++ b/asm/non_matchings/menu/calculate_and_display_rom_checksum.s @@ -80,7 +80,7 @@ glabel calculate_and_display_rom_checksum /* 08BA5C 8008AE5C 00002025 */ move $a0, $zero /* 08BA60 8008AE60 00002825 */ move $a1, $zero /* 08BA64 8008AE64 00003025 */ move $a2, $zero -/* 08BA68 8008AE68 0C02D8AD */ jal set_render_printf_background_color +/* 08BA68 8008AE68 0C02D8AD */ jal set_render_printf_background_colour /* 08BA6C 8008AE6C 24070080 */ li $a3, 128 /* 08BA70 8008AE70 24040020 */ li $a0, 32 /* 08BA74 8008AE74 0C02D8D7 */ jal set_render_printf_position diff --git a/asm/non_matchings/menu/draw_menu_elements.s b/asm/non_matchings/menu/draw_menu_elements.s index 41c146e0..e6233292 100644 --- a/asm/non_matchings/menu/draw_menu_elements.s +++ b/asm/non_matchings/menu/draw_menu_elements.s @@ -141,14 +141,14 @@ glabel L800823E8 /* 082FEC 800823EC 8605001A */ lh $a1, 0x1a($s0) /* 082FF0 800823F0 8606001C */ lh $a2, 0x1c($s0) /* 082FF4 800823F4 8607001E */ lh $a3, 0x1e($s0) -/* 082FF8 800823F8 0C0310F3 */ jal set_text_background_color +/* 082FF8 800823F8 0C0310F3 */ jal set_text_background_colour /* 082FFC 800823FC 00000000 */ nop /* 083000 80082400 920D0010 */ lbu $t5, 0x10($s0) /* 083004 80082404 9204000C */ lbu $a0, 0xc($s0) /* 083008 80082408 9205000D */ lbu $a1, 0xd($s0) /* 08300C 8008240C 9206000E */ lbu $a2, 0xe($s0) /* 083010 80082410 9207000F */ lbu $a3, 0xf($s0) -/* 083014 80082414 0C0310E1 */ jal set_text_color +/* 083014 80082414 0C0310E1 */ jal set_text_colour /* 083018 80082418 AFAD0010 */ sw $t5, 0x10($sp) /* 08301C 8008241C 92040011 */ lbu $a0, 0x11($s0) /* 083020 80082420 0C0310BB */ jal set_text_font @@ -274,7 +274,7 @@ glabel L8008256C /* 0831E8 800825E8 03194025 */ or $t0, $t8, $t9 /* 0831EC 800825EC AFA80018 */ sw $t0, 0x18($sp) /* 0831F0 800825F0 92090012 */ lbu $t1, 0x12($s0) -/* 0831F4 800825F4 0C01E340 */ jal func_80078D00 +/* 0831F4 800825F4 0C01E340 */ jal render_texture_rectangle_scaled /* 0831F8 800825F8 AFA9001C */ sw $t1, 0x1c($sp) /* 0831FC 800825FC 8FA40070 */ lw $a0, 0x70($sp) /* 083200 80082600 1000008A */ b .L8008282C diff --git a/asm/non_matchings/menu/func_80083098.s b/asm/non_matchings/menu/func_80083098.s index e9f7b04b..fcb4f0fa 100644 --- a/asm/non_matchings/menu/func_80083098.s +++ b/asm/non_matchings/menu/func_80083098.s @@ -34,7 +34,7 @@ glabel func_80083098 /* 083D18 80083118 00002025 */ move $a0, $zero /* 083D1C 8008311C 00002825 */ move $a1, $zero /* 083D20 80083120 00003025 */ move $a2, $zero -/* 083D24 80083124 0C0310F3 */ jal set_text_background_color +/* 083D24 80083124 0C0310F3 */ jal set_text_background_colour /* 083D28 80083128 00003825 */ move $a3, $zero /* 083D2C 8008312C 3C12800E */ lui $s2, %hi(D_800DF9F4) # $s2, 0x800e /* 083D30 80083130 2652F9F4 */ addiu $s2, %lo(D_800DF9F4) # addiu $s2, $s2, -0x60c @@ -59,7 +59,7 @@ glabel func_80083098 /* 083D78 80083178 90450001 */ lbu $a1, 1($v0) /* 083D7C 8008317C 90460002 */ lbu $a2, 2($v0) /* 083D80 80083180 90470003 */ lbu $a3, 3($v0) -/* 083D84 80083184 0C0310E1 */ jal set_text_color +/* 083D84 80083184 0C0310E1 */ jal set_text_colour /* 083D88 80083188 AFB90010 */ sw $t9, 0x10($sp) /* 083D8C 8008318C 86050004 */ lh $a1, 4($s0) /* 083D90 80083190 86060006 */ lh $a2, 6($s0) @@ -288,7 +288,7 @@ glabel func_80083098 .L800834E8: /* 0840E8 800834E8 240D00FF */ li $t5, 255 /* 0840EC 800834EC AFAD0010 */ sw $t5, 0x10($sp) -/* 0840F0 800834F0 0C0310E1 */ jal set_text_color +/* 0840F0 800834F0 0C0310E1 */ jal set_text_colour /* 0840F4 800834F4 240400FF */ li $a0, 255 /* 0840F8 800834F8 8FA50068 */ lw $a1, 0x68($sp) /* 0840FC 800834FC 8FA60064 */ lw $a2, 0x64($sp) diff --git a/asm/non_matchings/menu/func_8008377C.s b/asm/non_matchings/menu/func_8008377C.s index 9da16249..cee8d981 100644 --- a/asm/non_matchings/menu/func_8008377C.s +++ b/asm/non_matchings/menu/func_8008377C.s @@ -53,7 +53,7 @@ glabel func_8008377C /* 084448 80083848 3C064320 */ lui $a2, 0x4320 /* 08444C 8008384C 3C074250 */ lui $a3, 0x4250 /* 084450 80083850 E7A00010 */ swc1 $f0, 0x10($sp) -/* 084454 80083854 0C01E340 */ jal func_80078D00 +/* 084454 80083854 0C01E340 */ jal render_texture_rectangle_scaled /* 084458 80083858 E7A00014 */ swc1 $f0, 0x14($sp) /* 08445C 8008385C 1000000C */ b .L80083890 /* 084460 80083860 00000000 */ nop @@ -86,7 +86,7 @@ glabel func_8008377C /* 0844C0 800838C0 00002025 */ move $a0, $zero /* 0844C4 800838C4 00002825 */ move $a1, $zero /* 0844C8 800838C8 00003025 */ move $a2, $zero -/* 0844CC 800838CC 0C0310F3 */ jal set_text_background_color +/* 0844CC 800838CC 0C0310F3 */ jal set_text_background_colour /* 0844D0 800838D0 00003825 */ move $a3, $zero /* 0844D4 800838D4 3C0E800E */ lui $t6, %hi(gTitleMenuStrings) # $t6, 0x800e /* 0844D8 800838D8 8DCEF7A4 */ lw $t6, %lo(gTitleMenuStrings)($t6) @@ -119,7 +119,7 @@ glabel func_8008377C .L8008393C: /* 08453C 8008393C 8EEA0000 */ lw $t2, ($s7) /* 084540 80083940 240600FF */ li $a2, 255 -/* 084544 80083944 0C0310E1 */ jal set_text_color +/* 084544 80083944 0C0310E1 */ jal set_text_colour /* 084548 80083948 AFAA0010 */ sw $t2, 0x10($sp) /* 08454C 8008394C 8E070000 */ lw $a3, ($s0) /* 084550 80083950 240B000C */ li $t3, 12 diff --git a/asm/non_matchings/menu/func_80084854.s b/asm/non_matchings/menu/func_80084854.s index 58de7a46..65f30c1a 100644 --- a/asm/non_matchings/menu/func_80084854.s +++ b/asm/non_matchings/menu/func_80084854.s @@ -197,7 +197,7 @@ glabel func_80084854 /* 085744 80084B44 00002025 */ move $a0, $zero /* 085748 80084B48 00002825 */ move $a1, $zero /* 08574C 80084B4C 00003025 */ move $a2, $zero -/* 085750 80084B50 0C0310F3 */ jal set_text_background_color +/* 085750 80084B50 0C0310F3 */ jal set_text_background_colour /* 085754 80084B54 00003825 */ move $a3, $zero /* 085758 80084B58 3C0C8012 */ lui $t4, %hi(D_801263E0) # $t4, 0x8012 /* 08575C 80084B5C 8D8C63E0 */ lw $t4, %lo(D_801263E0)($t4) @@ -245,7 +245,7 @@ glabel func_80084854 /* 0857F4 80084BF4 240900FF */ li $t1, 255 /* 0857F8 80084BF8 AFA90010 */ sw $t1, 0x10($sp) /* 0857FC 80084BFC 240600FF */ li $a2, 255 -/* 085800 80084C00 0C0310E1 */ jal set_text_color +/* 085800 80084C00 0C0310E1 */ jal set_text_colour /* 085804 80084C04 02603825 */ move $a3, $s3 /* 085808 80084C08 10000009 */ b .L80084C30 /* 08580C 80084C0C 860A000A */ lh $t2, 0xa($s0) @@ -255,7 +255,7 @@ glabel func_80084854 /* 085818 80084C18 92050005 */ lbu $a1, 5($s0) /* 08581C 80084C1C 92060006 */ lbu $a2, 6($s0) /* 085820 80084C20 92070007 */ lbu $a3, 7($s0) -/* 085824 80084C24 0C0310E1 */ jal set_text_color +/* 085824 80084C24 0C0310E1 */ jal set_text_colour /* 085828 80084C28 AFAB0010 */ sw $t3, 0x10($sp) /* 08582C 80084C2C 860A000A */ lh $t2, 0xa($s0) .L80084C30: diff --git a/asm/non_matchings/menu/func_800853D0.s b/asm/non_matchings/menu/func_800853D0.s index 5a83ac16..068e3208 100644 --- a/asm/non_matchings/menu/func_800853D0.s +++ b/asm/non_matchings/menu/func_800853D0.s @@ -457,7 +457,7 @@ glabel L80085828 /* 086670 80085A70 00002025 */ move $a0, $zero /* 086674 80085A74 00002825 */ move $a1, $zero /* 086678 80085A78 00003025 */ move $a2, $zero -/* 08667C 80085A7C 0C0310E1 */ jal set_text_color +/* 08667C 80085A7C 0C0310E1 */ jal set_text_colour /* 086680 80085A80 240700FF */ li $a3, 255 /* 086684 80085A84 8FA50084 */ lw $a1, 0x84($sp) /* 086688 80085A88 8FA60088 */ lw $a2, 0x88($sp) @@ -474,7 +474,7 @@ glabel L80085828 /* 0866B4 80085AB4 240400FF */ li $a0, 255 /* 0866B8 80085AB8 24050040 */ li $a1, 64 /* 0866BC 80085ABC 240600FF */ li $a2, 255 -/* 0866C0 80085AC0 0C0310E1 */ jal set_text_color +/* 0866C0 80085AC0 0C0310E1 */ jal set_text_colour /* 0866C4 80085AC4 24070040 */ li $a3, 64 /* 0866C8 80085AC8 8FA50084 */ lw $a1, 0x84($sp) /* 0866CC 80085ACC 8FA60088 */ lw $a2, 0x88($sp) @@ -498,7 +498,7 @@ glabel L80085828 /* 086710 80085B10 00002025 */ move $a0, $zero /* 086714 80085B14 00002825 */ move $a1, $zero /* 086718 80085B18 00003025 */ move $a2, $zero -/* 08671C 80085B1C 0C0310E1 */ jal set_text_color +/* 08671C 80085B1C 0C0310E1 */ jal set_text_colour /* 086720 80085B20 240700FF */ li $a3, 255 /* 086724 80085B24 8FA50084 */ lw $a1, 0x84($sp) /* 086728 80085B28 8FA60088 */ lw $a2, 0x88($sp) @@ -515,7 +515,7 @@ glabel L80085828 /* 086754 80085B54 240400FF */ li $a0, 255 /* 086758 80085B58 240500FF */ li $a1, 255 /* 08675C 80085B5C 240600FF */ li $a2, 255 -/* 086760 80085B60 0C0310E1 */ jal set_text_color +/* 086760 80085B60 0C0310E1 */ jal set_text_colour /* 086764 80085B64 240700FF */ li $a3, 255 /* 086768 80085B68 8FA60088 */ lw $a2, 0x88($sp) /* 08676C 80085B6C 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 diff --git a/asm/non_matchings/menu/func_80085B9C.s b/asm/non_matchings/menu/func_80085B9C.s index 925765af..13ef785b 100644 --- a/asm/non_matchings/menu/func_80085B9C.s +++ b/asm/non_matchings/menu/func_80085B9C.s @@ -64,7 +64,7 @@ glabel L80085C30 /* 086860 80085C60 00002025 */ move $a0, $zero /* 086864 80085C64 00002825 */ move $a1, $zero /* 086868 80085C68 00003025 */ move $a2, $zero -/* 08686C 80085C6C 0C0310F3 */ jal set_text_background_color +/* 08686C 80085C6C 0C0310F3 */ jal set_text_background_colour /* 086870 80085C70 00003825 */ move $a3, $zero /* 086874 80085C74 0C0310BB */ jal set_text_font /* 086878 80085C78 24040002 */ li $a0, 2 @@ -73,7 +73,7 @@ glabel L80085C30 /* 086884 80085C84 00002025 */ move $a0, $zero /* 086888 80085C88 00002825 */ move $a1, $zero /* 08688C 80085C8C 00003025 */ move $a2, $zero -/* 086890 80085C90 0C0310E1 */ jal set_text_color +/* 086890 80085C90 0C0310E1 */ jal set_text_colour /* 086894 80085C94 240700FF */ li $a3, 255 /* 086898 80085C98 3C19800E */ lui $t9, %hi(gMenuText) # $t9, 0x800e /* 08689C 80085C9C 8F39F4A0 */ lw $t9, %lo(gMenuText)($t9) @@ -90,7 +90,7 @@ glabel L80085C30 /* 0868C8 80085CC8 240400FF */ li $a0, 255 /* 0868CC 80085CCC 240500FF */ li $a1, 255 /* 0868D0 80085CD0 240600FF */ li $a2, 255 -/* 0868D4 80085CD4 0C0310E1 */ jal set_text_color +/* 0868D4 80085CD4 0C0310E1 */ jal set_text_colour /* 0868D8 80085CD8 00003825 */ move $a3, $zero /* 0868DC 80085CDC 3C0C800E */ lui $t4, %hi(gMenuText) # $t4, 0x800e /* 0868E0 80085CE0 8D8CF4A0 */ lw $t4, %lo(gMenuText)($t4) @@ -305,7 +305,7 @@ glabel L80085C30 /* 086BF0 80085FF0 240400FF */ li $a0, 255 /* 086BF4 80085FF4 240500FF */ li $a1, 255 /* 086BF8 80085FF8 240600FF */ li $a2, 255 -/* 086BFC 80085FFC 0C0310E1 */ jal set_text_color +/* 086BFC 80085FFC 0C0310E1 */ jal set_text_colour /* 086C00 80086000 00003825 */ move $a3, $zero /* 086C04 80086004 8FAF0044 */ lw $t7, 0x44($sp) /* 086C08 80086008 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 diff --git a/asm/non_matchings/menu/func_800862C4.s b/asm/non_matchings/menu/func_800862C4.s index 3047b9b1..988f9e8a 100644 --- a/asm/non_matchings/menu/func_800862C4.s +++ b/asm/non_matchings/menu/func_800862C4.s @@ -55,7 +55,7 @@ glabel func_800862C4 /* 086F94 80086394 8E8D0000 */ lw $t5, ($s4) /* 086F98 80086398 000E7900 */ sll $t7, $t6, 4 /* 086F9C 8008639C 01AFC821 */ addu $t9, $t5, $t7 -/* 086FA0 800863A0 0C01CF13 */ jal get_s32_256 +/* 086FA0 800863A0 0C01CF13 */ jal get_game_data_file_size /* 086FA4 800863A4 A3300006 */ sb $s0, 6($t9) /* 086FA8 800863A8 8E490000 */ lw $t1, ($s2) /* 086FAC 800863AC 8E8A0000 */ lw $t2, ($s4) @@ -81,7 +81,7 @@ glabel func_800862C4 /* 086FF8 800863F8 8E8C0000 */ lw $t4, ($s4) /* 086FFC 800863FC 00185900 */ sll $t3, $t8, 4 /* 087000 80086400 018B7021 */ addu $t6, $t4, $t3 -/* 087004 80086404 0C01CF15 */ jal get_s32_512 +/* 087004 80086404 0C01CF15 */ jal get_time_data_file_size /* 087008 80086408 A1D30001 */ sb $s3, 1($t6) /* 08700C 8008640C 8E4F0000 */ lw $t7, ($s2) /* 087010 80086410 8E990000 */ lw $t9, ($s4) @@ -118,7 +118,7 @@ glabel func_800862C4 /* 087084 80086484 00002025 */ move $a0, $zero /* 087088 80086488 24050010 */ li $a1, 16 /* 08708C 8008648C 27A600F4 */ addiu $a2, $sp, 0xf4 -/* 087090 80086490 0C01D798 */ jal func_80075E60 +/* 087090 80086490 0C01D798 */ jal get_controller_pak_file_list /* 087094 80086494 03C03825 */ move $a3, $fp /* 087098 80086498 304300FF */ andi $v1, $v0, 0xff /* 08709C 8008649C 24010005 */ li $at, 5 @@ -175,7 +175,7 @@ glabel func_800862C4 /* 087160 80086560 03C78821 */ addu $s1, $fp, $a3 /* 087164 80086564 8E250000 */ lw $a1, ($s1) /* 087168 80086568 AFA80138 */ sw $t0, 0x138($sp) -/* 08716C 8008656C 0C01CF87 */ jal func_80073E1C +/* 08716C 8008656C 0C01CF87 */ jal read_game_data_from_controller_pak /* 087170 80086570 02C03025 */ move $a2, $s6 /* 087174 80086574 8FA80138 */ lw $t0, 0x138($sp) /* 087178 80086578 14400021 */ bnez $v0, .L80086600 diff --git a/asm/non_matchings/menu/func_800867D4.s b/asm/non_matchings/menu/func_800867D4.s index b9b7e2b8..150d4377 100644 --- a/asm/non_matchings/menu/func_800867D4.s +++ b/asm/non_matchings/menu/func_800867D4.s @@ -36,7 +36,7 @@ glabel L80086834 /* 087444 80086844 8C846A04 */ lw $a0, %lo(D_80126A04)($a0) /* 087448 80086848 0C021872 */ jal func_800861C8 /* 08744C 8008684C 02002825 */ move $a1, $s0 -/* 087450 80086850 0C01CF13 */ jal get_s32_256 +/* 087450 80086850 0C01CF13 */ jal get_game_data_file_size /* 087454 80086854 00000000 */ nop /* 087458 80086858 3C068012 */ lui $a2, %hi(D_80126A04) # $a2, 0x8012 /* 08745C 8008685C 8CC66A04 */ lw $a2, %lo(D_80126A04)($a2) @@ -51,7 +51,7 @@ glabel L80086834 /* 087480 80086880 10000062 */ b .L80086A0C /* 087484 80086884 00401825 */ move $v1, $v0 glabel L80086888 -/* 087488 80086888 0C01CF15 */ jal get_s32_512 +/* 087488 80086888 0C01CF15 */ jal get_time_data_file_size /* 08748C 8008688C 00000000 */ nop /* 087490 80086890 3C068012 */ lui $a2, %hi(D_80126A04) # $a2, 0x8012 /* 087494 80086894 8CC66A04 */ lw $a2, %lo(D_80126A04)($a2) @@ -70,7 +70,7 @@ glabel L800868C0 /* 0874C4 800868C4 8C846A04 */ lw $a0, %lo(D_80126A04)($a0) /* 0874C8 800868C8 0C021872 */ jal func_800861C8 /* 0874CC 800868CC 02002825 */ move $a1, $s0 -/* 0874D0 800868D0 0C01CF13 */ jal get_s32_256 +/* 0874D0 800868D0 0C01CF13 */ jal get_game_data_file_size /* 0874D4 800868D4 00000000 */ nop /* 0874D8 800868D8 3C0C8012 */ lui $t4, %hi(D_80126BD4) # $t4, 0x8012 /* 0874DC 800868DC 8D8C6BD4 */ lw $t4, %lo(D_80126BD4)($t4) @@ -101,7 +101,7 @@ glabel L80086920 /* 08753C 8008693C 8E0C0000 */ lw $t4, ($s0) /* 087540 80086940 00000000 */ nop /* 087544 80086944 258B0001 */ addiu $t3, $t4, 1 -/* 087548 80086948 0C01CF15 */ jal get_s32_512 +/* 087548 80086948 0C01CF15 */ jal get_time_data_file_size /* 08754C 8008694C AE0B0000 */ sw $t3, ($s0) /* 087550 80086950 3C0F8012 */ lui $t7, %hi(D_80126BD4) # $t7, 0x8012 /* 087554 80086954 8DEF6BD4 */ lw $t7, %lo(D_80126BD4)($t7) diff --git a/asm/non_matchings/menu/func_80086A48.s b/asm/non_matchings/menu/func_80086A48.s deleted file mode 100644 index ff8d6527..00000000 --- a/asm/non_matchings/menu/func_80086A48.s +++ /dev/null @@ -1,56 +0,0 @@ -.late_rodata -glabel D_800E8414 -.float 0.1 - -.text -glabel func_80086A48 -/* 087648 80086A48 3C0E8012 */ lui $t6, %hi(D_80126BD4) # $t6, 0x8012 -/* 08764C 80086A4C 8DCE6BD4 */ lw $t6, %lo(D_80126BD4)($t6) -/* 087650 80086A50 3C0F8012 */ lui $t7, %hi(D_80126BE4) # $t7, 0x8012 -/* 087654 80086A54 448E9000 */ mtc1 $t6, $f18 -/* 087658 80086A58 8DEF6BE4 */ lw $t7, %lo(D_80126BE4)($t7) -/* 08765C 80086A5C 46809020 */ cvt.s.w $f0, $f18 -/* 087660 80086A60 448F9000 */ mtc1 $t7, $f18 -/* 087664 80086A64 18800023 */ blez $a0, .L80086AF4 -/* 087668 80086A68 468090A0 */ cvt.s.w $f2, $f18 -/* 08766C 80086A6C 3C028012 */ lui $v0, %hi(D_80126A08) # $v0, 0x8012 -/* 087670 80086A70 3C038012 */ lui $v1, %hi(D_801263E0) # $v1, 0x8012 -/* 087674 80086A74 3C01800F */ lui $at, %hi(D_800E8414) # $at, 0x800f -/* 087678 80086A78 3C078012 */ lui $a3, %hi(D_80126BEC) # $a3, 0x8012 -/* 08767C 80086A7C 3C068012 */ lui $a2, %hi(D_80126A00) # $a2, 0x8012 -/* 087680 80086A80 3C058012 */ lui $a1, %hi(D_80126BDC) # $a1, 0x8012 -/* 087684 80086A84 C4308414 */ lwc1 $f16, %lo(D_800E8414)($at) -/* 087688 80086A88 8C6363E0 */ lw $v1, %lo(D_801263E0)($v1) -/* 08768C 80086A8C 8C426A08 */ lw $v0, %lo(D_80126A08)($v0) -/* 087690 80086A90 24A56BDC */ addiu $a1, %lo(D_80126BDC) # addiu $a1, $a1, 0x6bdc -/* 087694 80086A94 24C66A00 */ addiu $a2, %lo(D_80126A00) # addiu $a2, $a2, 0x6a00 -/* 087698 80086A98 24E76BEC */ addiu $a3, %lo(D_80126BEC) # addiu $a3, $a3, 0x6bec -.L80086A9C: -/* 08769C 80086A9C 18400007 */ blez $v0, .L80086ABC -/* 0876A0 80086AA0 2484FFFF */ addiu $a0, $a0, -1 -/* 0876A4 80086AA4 C4AE0000 */ lwc1 $f14, ($a1) -/* 0876A8 80086AA8 00000000 */ nop -/* 0876AC 80086AAC 460E0301 */ sub.s $f12, $f0, $f14 -/* 0876B0 80086AB0 460C8202 */ mul.s $f8, $f16, $f12 -/* 0876B4 80086AB4 46087280 */ add.s $f10, $f14, $f8 -/* 0876B8 80086AB8 E4AA0000 */ swc1 $f10, ($a1) -.L80086ABC: -/* 0876BC 80086ABC 1860000B */ blez $v1, .L80086AEC -/* 0876C0 80086AC0 00000000 */ nop -/* 0876C4 80086AC4 8CD80000 */ lw $t8, ($a2) -/* 0876C8 80086AC8 00000000 */ nop -/* 0876CC 80086ACC 1B000007 */ blez $t8, .L80086AEC -/* 0876D0 80086AD0 00000000 */ nop -/* 0876D4 80086AD4 C4EE0000 */ lwc1 $f14, ($a3) -/* 0876D8 80086AD8 00000000 */ nop -/* 0876DC 80086ADC 460E1301 */ sub.s $f12, $f2, $f14 -/* 0876E0 80086AE0 460C8482 */ mul.s $f18, $f16, $f12 -/* 0876E4 80086AE4 46127100 */ add.s $f4, $f14, $f18 -/* 0876E8 80086AE8 E4E40000 */ swc1 $f4, ($a3) -.L80086AEC: -/* 0876EC 80086AEC 1C80FFEB */ bgtz $a0, .L80086A9C -/* 0876F0 80086AF0 00000000 */ nop -.L80086AF4: -/* 0876F4 80086AF4 03E00008 */ jr $ra -/* 0876F8 80086AF8 00000000 */ nop - diff --git a/asm/non_matchings/menu/func_80086AFC.s b/asm/non_matchings/menu/func_80086AFC.s index cef7c622..447528df 100644 --- a/asm/non_matchings/menu/func_80086AFC.s +++ b/asm/non_matchings/menu/func_80086AFC.s @@ -105,7 +105,7 @@ glabel L80086B54 /* 08787C 80086C7C ADEB0050 */ sw $t3, 0x50($t7) .L80086C80: /* 087880 80086C80 90640006 */ lbu $a0, 6($v1) -/* 087884 80086C84 0C01CFD7 */ jal func_80073F5C +/* 087884 80086C84 0C01CFD7 */ jal write_game_data_to_controller_pak /* 087888 80086C88 00C02825 */ move $a1, $a2 /* 08788C 80086C8C 1000014E */ b .L800871C8 /* 087890 80086C90 AFA20038 */ sw $v0, 0x38($sp) @@ -145,7 +145,7 @@ glabel L80086CDC /* 087910 80086D10 1441012E */ bne $v0, $at, .L800871CC /* 087914 80086D14 8FBF0014 */ lw $ra, 0x14($sp) /* 087918 80086D18 90640006 */ lbu $a0, 6($v1) -/* 08791C 80086D1C 0C01D052 */ jal func_80074148 +/* 08791C 80086D1C 0C01D052 */ jal write_time_data_to_controller_pak /* 087920 80086D20 00C02825 */ move $a1, $a2 /* 087924 80086D24 10000128 */ b .L800871C8 /* 087928 80086D28 AFA20038 */ sw $v0, 0x38($sp) @@ -156,7 +156,7 @@ glabel L80086CDC /* 087938 80086D38 00000000 */ nop /* 08793C 80086D3C 3C0500FF */ lui $a1, (0x00FFFFF0 >> 16) # lui $a1, 0xff /* 087940 80086D40 34A5FFF0 */ ori $a1, (0x00FFFFF0 & 0xFFFF) # ori $a1, $a1, 0xfff0 -/* 087944 80086D44 0C027AAF */ jal func_8009EABC +/* 087944 80086D44 0C027AAF */ jal unset_eeprom_settings_value /* 087948 80086D48 24040000 */ li $a0, 0 /* 08794C 80086D4C 1000011F */ b .L800871CC /* 087950 80086D50 8FBF0014 */ lw $ra, 0x14($sp) @@ -182,7 +182,7 @@ glabel L80086D54 .L80086D9C: /* 08799C 80086D9C 90E40006 */ lbu $a0, 6($a3) /* 0879A0 80086DA0 8CE50008 */ lw $a1, 8($a3) -/* 0879A4 80086DA4 0C01CF87 */ jal func_80073E1C +/* 0879A4 80086DA4 0C01CF87 */ jal read_game_data_from_controller_pak /* 0879A8 80086DA8 AFA60028 */ sw $a2, 0x28($sp) /* 0879AC 80086DAC 8FA60028 */ lw $a2, 0x28($sp) /* 0879B0 80086DB0 AFA20038 */ sw $v0, 0x38($sp) @@ -274,7 +274,7 @@ glabel L80086D54 /* 087B00 80086F00 8C66000C */ lw $a2, 0xc($v1) /* 087B04 80086F04 90E40006 */ lbu $a0, 6($a3) /* 087B08 80086F08 8CE50008 */ lw $a1, 8($a3) -/* 087B0C 80086F0C 0C01CF87 */ jal func_80073E1C +/* 087B0C 80086F0C 0C01CF87 */ jal read_game_data_from_controller_pak /* 087B10 80086F10 00000000 */ nop /* 087B14 80086F14 3C038012 */ lui $v1, %hi(D_80126530) # $v1, 0x8012 /* 087B18 80086F18 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -290,14 +290,14 @@ glabel L80086D54 /* 087B40 80086F40 01AE5821 */ addu $t3, $t5, $t6 /* 087B44 80086F44 91640006 */ lbu $a0, 6($t3) /* 087B48 80086F48 8C65000C */ lw $a1, 0xc($v1) -/* 087B4C 80086F4C 0C01CFD7 */ jal func_80073F5C +/* 087B4C 80086F4C 0C01CFD7 */ jal write_game_data_to_controller_pak /* 087B50 80086F50 00000000 */ nop /* 087B54 80086F54 1000009C */ b .L800871C8 /* 087B58 80086F58 AFA20038 */ sw $v0, 0x38($sp) .L80086F5C: /* 087B5C 80086F5C 90E40006 */ lbu $a0, 6($a3) /* 087B60 80086F60 90E50007 */ lbu $a1, 7($a3) -/* 087B64 80086F64 0C01D8B2 */ jal func_800762C8 +/* 087B64 80086F64 0C01D8B2 */ jal delete_file /* 087B68 80086F68 00000000 */ nop /* 087B6C 80086F6C 10000096 */ b .L800871C8 /* 087B70 80086F70 AFA20038 */ sw $v0, 0x38($sp) @@ -343,13 +343,13 @@ glabel L80086F74 /* 087BFC 80086FFC 8FBF0014 */ lw $ra, 0x14($sp) .L80087000: /* 087C00 80087000 90E40006 */ lbu $a0, 6($a3) -/* 087C04 80087004 0C01D006 */ jal func_80074018 +/* 087C04 80087004 0C01D006 */ jal read_time_data_from_controller_pak /* 087C08 80087008 27A5002C */ addiu $a1, $sp, 0x2c /* 087C0C 8008700C 1000006E */ b .L800871C8 /* 087C10 80087010 AFA20038 */ sw $v0, 0x38($sp) .L80087014: /* 087C14 80087014 90E40006 */ lbu $a0, 6($a3) -/* 087C18 80087018 0C01D006 */ jal func_80074018 +/* 087C18 80087018 0C01D006 */ jal read_time_data_from_controller_pak /* 087C1C 8008701C AFA60028 */ sw $a2, 0x28($sp) /* 087C20 80087020 8FA60028 */ lw $a2, 0x28($sp) /* 087C24 80087024 3C088012 */ lui $t0, %hi(D_80126A04) # $t0, 0x8012 @@ -363,7 +363,7 @@ glabel L80086F74 /* 087C44 80087044 000FC900 */ sll $t9, $t7, 4 /* 087C48 80087048 0159C021 */ addu $t8, $t2, $t9 /* 087C4C 8008704C 93040006 */ lbu $a0, 6($t8) -/* 087C50 80087050 0C01D052 */ jal func_80074148 +/* 087C50 80087050 0C01D052 */ jal write_time_data_to_controller_pak /* 087C54 80087054 00C02825 */ move $a1, $a2 /* 087C58 80087058 AFA20038 */ sw $v0, 0x38($sp) .L8008705C: @@ -374,7 +374,7 @@ glabel L80086F74 .L8008706C: /* 087C6C 8008706C 90E40006 */ lbu $a0, 6($a3) /* 087C70 80087070 90E50007 */ lbu $a1, 7($a3) -/* 087C74 80087074 0C01D8B2 */ jal func_800762C8 +/* 087C74 80087074 0C01D8B2 */ jal delete_file /* 087C78 80087078 00000000 */ nop /* 087C7C 8008707C 10000052 */ b .L800871C8 /* 087C80 80087080 AFA20038 */ sw $v0, 0x38($sp) @@ -405,14 +405,14 @@ glabel L80087084 /* 087CDC 800870DC 90E40006 */ lbu $a0, 6($a3) /* 087CE0 800870E0 90E50007 */ lbu $a1, 7($a3) /* 087CE4 800870E4 90660006 */ lbu $a2, 6($v1) -/* 087CE8 800870E8 0C01D8E2 */ jal func_80076388 +/* 087CE8 800870E8 0C01D8E2 */ jal copy_controller_pak_data /* 087CEC 800870EC 00000000 */ nop /* 087CF0 800870F0 10000035 */ b .L800871C8 /* 087CF4 800870F4 AFA20038 */ sw $v0, 0x38($sp) .L800870F8: /* 087CF8 800870F8 90E40006 */ lbu $a0, 6($a3) /* 087CFC 800870FC 90E50007 */ lbu $a1, 7($a3) -/* 087D00 80087100 0C01D8B2 */ jal func_800762C8 +/* 087D00 80087100 0C01D8B2 */ jal delete_file /* 087D04 80087104 00000000 */ nop /* 087D08 80087108 1000002F */ b .L800871C8 /* 087D0C 8008710C AFA20038 */ sw $v0, 0x38($sp) @@ -431,7 +431,7 @@ glabel L80087110 /* 087D3C 8008713C 8FBF0014 */ lw $ra, 0x14($sp) /* 087D40 80087140 90E40006 */ lbu $a0, 6($a3) /* 087D44 80087144 90E50007 */ lbu $a1, 7($a3) -/* 087D48 80087148 0C01D8B2 */ jal func_800762C8 +/* 087D48 80087148 0C01D8B2 */ jal delete_file /* 087D4C 8008714C 00000000 */ nop /* 087D50 80087150 1000001D */ b .L800871C8 /* 087D54 80087154 AFA20038 */ sw $v0, 0x38($sp) @@ -449,7 +449,7 @@ glabel L80087158 /* 087D80 80087180 15410011 */ bne $t2, $at, .L800871C8 /* 087D84 80087184 24040000 */ li $a0, 0 /* 087D88 80087188 3C0500FF */ lui $a1, (0x00FFFFF3 >> 16) # lui $a1, 0xff -/* 087D8C 8008718C 0C027AAF */ jal func_8009EABC +/* 087D8C 8008718C 0C027AAF */ jal unset_eeprom_settings_value /* 087D90 80087190 34A5FFF3 */ ori $a1, (0x00FFFFF3 & 0xFFFF) # ori $a1, $a1, 0xfff3 /* 087D94 80087194 3C03800E */ lui $v1, %hi(gActiveMagicCodes) # $v1, 0x800e /* 087D98 80087198 3C05800E */ lui $a1, %hi(gUnlockedMagicCodes) # $a1, 0x800e diff --git a/asm/non_matchings/menu/func_800871D8.s b/asm/non_matchings/menu/func_800871D8.s index 91c02c01..41db8cd4 100644 --- a/asm/non_matchings/menu/func_800871D8.s +++ b/asm/non_matchings/menu/func_800871D8.s @@ -199,5 +199,4 @@ glabel func_800871D8 /* 0880C0 800874C0 352A0008 */ ori $t2, $t1, 8 /* 0880C4 800874C4 AC4A0000 */ sw $t2, ($v0) /* 0880C8 800874C8 03E00008 */ jr $ra -/* 0880CC 800874CC 27BD0038 */ addiu $sp, $sp, 0x38 - +/* 0880CC 800874CC 27BD0038 */ addiu $sp, $sp, 0x38 \ No newline at end of file diff --git a/asm/non_matchings/menu/func_80087734.s b/asm/non_matchings/menu/func_80087734.s index 51220c5f..74a6fcdf 100644 --- a/asm/non_matchings/menu/func_80087734.s +++ b/asm/non_matchings/menu/func_80087734.s @@ -224,7 +224,7 @@ glabel L800879BC .L80087A2C: /* 08862C 80087A2C 3C04800E */ lui $a0, %hi(D_800DFAE0) # $a0, 0x800e /* 088630 80087A30 8C84FAE0 */ lw $a0, %lo(D_800DFAE0)($a0) -/* 088634 80087A34 0C01D771 */ jal func_80075DC4 +/* 088634 80087A34 0C01D771 */ jal reformat_controller_pak /* 088638 80087A38 AFA8001C */ sw $t0, 0x1c($sp) /* 08863C 80087A3C 8FA8001C */ lw $t0, 0x1c($sp) /* 088640 80087A40 24020004 */ li $v0, 4 @@ -240,7 +240,7 @@ glabel L800879BC /* 088664 80087A64 AC206A18 */ sw $zero, %lo(D_80126A18)($at) .L80087A68: /* 088668 80087A68 8C84FAE0 */ lw $a0, %lo(D_800DFAE0)($a0) -/* 08866C 80087A6C 0C01D74E */ jal func_80075D38 +/* 08866C 80087A6C 0C01D74E */ jal repair_controller_pak /* 088670 80087A70 AFA8001C */ sw $t0, 0x1c($sp) /* 088674 80087A74 8FA8001C */ lw $t0, 0x1c($sp) /* 088678 80087A78 24020004 */ li $v0, 4 diff --git a/asm/non_matchings/menu/func_80087F14.s b/asm/non_matchings/menu/func_80087F14.s index 54685ed2..4bf7fff1 100644 --- a/asm/non_matchings/menu/func_80087F14.s +++ b/asm/non_matchings/menu/func_80087F14.s @@ -9,10 +9,10 @@ glabel func_80087F14 /* 088B30 80087F30 AFB60038 */ sw $s6, 0x38($sp) /* 088B34 80087F34 AFB50034 */ sw $s5, 0x34($sp) /* 088B38 80087F38 AFB10024 */ sw $s1, 0x24($sp) -/* 088B3C 80087F3C 3C108012 */ lui $s0, %hi(D_80126A30) # $s0, 0x8012 -/* 088B40 80087F40 3C128012 */ lui $s2, %hi(D_80126A34) # $s2, 0x8012 -/* 088B44 80087F44 3C138012 */ lui $s3, %hi(D_80126A38) # $s3, 0x8012 -/* 088B48 80087F48 3C148012 */ lui $s4, %hi(D_80126A3C) # $s4, 0x8012 +/* 088B3C 80087F3C 3C108012 */ lui $s0, %hi(sControllerPakIssueNotFound) # $s0, 0x8012 +/* 088B40 80087F40 3C128012 */ lui $s2, %hi(sControllerPakFatalErrorFound) # $s2, 0x8012 +/* 088B44 80087F44 3C138012 */ lui $s3, %hi(sControllerPakNoFreeSpace) # $s3, 0x8012 +/* 088B48 80087F48 3C148012 */ lui $s4, %hi(sControllerPakBadData) # $s4, 0x8012 /* 088B4C 80087F4C AFBF0044 */ sw $ra, 0x44($sp) /* 088B50 80087F50 AFA40090 */ sw $a0, 0x90($sp) /* 088B54 80087F54 AFA50094 */ sw $a1, 0x94($sp) @@ -20,10 +20,10 @@ glabel func_80087F14 /* 088B5C 80087F5C 0000B825 */ move $s7, $zero /* 088B60 80087F60 00001825 */ move $v1, $zero /* 088B64 80087F64 0000F025 */ move $fp, $zero -/* 088B68 80087F68 26946A3C */ addiu $s4, %lo(D_80126A3C) # addiu $s4, $s4, 0x6a3c -/* 088B6C 80087F6C 26736A38 */ addiu $s3, %lo(D_80126A38) # addiu $s3, $s3, 0x6a38 -/* 088B70 80087F70 26526A34 */ addiu $s2, %lo(D_80126A34) # addiu $s2, $s2, 0x6a34 -/* 088B74 80087F74 26106A30 */ addiu $s0, %lo(D_80126A30) # addiu $s0, $s0, 0x6a30 +/* 088B68 80087F68 26946A3C */ addiu $s4, %lo(sControllerPakBadData) # addiu $s4, $s4, 0x6a3c +/* 088B6C 80087F6C 26736A38 */ addiu $s3, %lo(sControllerPakNoFreeSpace) # addiu $s3, $s3, 0x6a38 +/* 088B70 80087F70 26526A34 */ addiu $s2, %lo(sControllerPakFatalErrorFound) # addiu $s2, $s2, 0x6a34 +/* 088B74 80087F74 26106A30 */ addiu $s0, %lo(sControllerPakIssueNotFound) # addiu $s0, $s0, 0x6a30 /* 088B78 80087F78 00008825 */ move $s1, $zero /* 088B7C 80087F7C 24150001 */ li $s5, 1 .L80087F80: @@ -33,7 +33,7 @@ glabel func_80087F14 /* 088B8C 80087F8C 02202025 */ move $a0, $s1 /* 088B90 80087F90 27A50074 */ addiu $a1, $sp, 0x74 /* 088B94 80087F94 27A60070 */ addiu $a2, $sp, 0x70 -/* 088B98 80087F98 0C01D865 */ jal func_80076194 +/* 088B98 80087F98 0C01D865 */ jal get_free_space /* 088B9C 80087F9C AFA30064 */ sw $v1, 0x64($sp) /* 088BA0 80087FA0 8FA30064 */ lw $v1, 0x64($sp) /* 088BA4 80087FA4 14400012 */ bnez $v0, .L80087FF0 @@ -41,7 +41,7 @@ glabel func_80087F14 /* 088BAC 80087FAC 8FAE0074 */ lw $t6, 0x74($sp) /* 088BB0 80087FB0 A2150000 */ sb $s5, ($s0) /* 088BB4 80087FB4 11C00005 */ beqz $t6, .L80087FCC -/* 088BB8 80087FB8 3C188012 */ lui $t8, %hi(D_80126A60) # $t8, 0x8012 +/* 088BB8 80087FB8 3C188012 */ lui $t8, %hi(sControllerPakDataPresent) # $t8, 0x8012 /* 088BBC 80087FBC 8FAF0070 */ lw $t7, 0x70($sp) /* 088BC0 80087FC0 00000000 */ nop /* 088BC4 80087FC4 15E00008 */ bnez $t7, .L80087FE8 @@ -49,7 +49,7 @@ glabel func_80087F14 .L80087FCC: /* 088BCC 80087FCC A2750000 */ sb $s5, ($s3) /* 088BD0 80087FD0 0311C021 */ addu $t8, $t8, $s1 -/* 088BD4 80087FD4 93186A60 */ lbu $t8, %lo(D_80126A60)($t8) +/* 088BD4 80087FD4 93186A60 */ lbu $t8, %lo(sControllerPakDataPresent)($t8) /* 088BD8 80087FD8 00000000 */ nop /* 088BDC 80087FDC 17000002 */ bnez $t8, .L80087FE8 /* 088BE0 80087FE0 00000000 */ nop @@ -68,7 +68,7 @@ glabel func_80087F14 /* 088C08 80088008 15410007 */ bne $t2, $at, .L80088028 /* 088C0C 8008800C 02202025 */ move $a0, $s1 /* 088C10 80088010 AFA30064 */ sw $v1, 0x64($sp) -/* 088C14 80088014 0C01D74E */ jal func_80075D38 +/* 088C14 80088014 0C01D74E */ jal repair_controller_pak /* 088C18 80088018 AFAA0078 */ sw $t2, 0x78($sp) /* 088C1C 8008801C 8FA30064 */ lw $v1, 0x64($sp) /* 088C20 80088020 8FAA0078 */ lw $t2, 0x78($sp) @@ -99,13 +99,13 @@ glabel func_80087F14 /* 088C78 80088078 24020001 */ li $v0, 1 .L8008807C: /* 088C7C 8008807C 8FB90090 */ lw $t9, 0x90($sp) -/* 088C80 80088080 3C068012 */ lui $a2, %hi(D_80126AE0) # $a2, 0x8012 +/* 088C80 80088080 3C068012 */ lui $a2, %hi(sCurrentControllerPakAllFileNames) # $a2, 0x8012 /* 088C84 80088084 8F220000 */ lw $v0, ($t9) -/* 088C88 80088088 24C66AE0 */ addiu $a2, %lo(D_80126AE0) # addiu $a2, $a2, 0x6ae0 +/* 088C88 80088088 24C66AE0 */ addiu $a2, %lo(sCurrentControllerPakAllFileNames) # addiu $a2, $a2, 0x6ae0 /* 088C8C 8008808C 0441000F */ bgez $v0, .L800880CC /* 088C90 80088090 00408825 */ move $s1, $v0 -/* 088C94 80088094 3C0E8012 */ lui $t6, %hi(D_80126A30) # $t6, 0x8012 -/* 088C98 80088098 25CE6A30 */ addiu $t6, %lo(D_80126A30) # addiu $t6, $t6, 0x6a30 +/* 088C94 80088094 3C0E8012 */ lui $t6, %hi(sControllerPakIssueNotFound) # $t6, 0x8012 +/* 088C98 80088098 25CE6A30 */ addiu $t6, %lo(sControllerPakIssueNotFound) # addiu $t6, $t6, 0x6a30 /* 088C9C 8008809C 022E8021 */ addu $s0, $s1, $t6 .L800880A0: /* 088CA0 800880A0 26310001 */ addiu $s1, $s1, 1 @@ -121,15 +121,15 @@ glabel func_80087F14 /* 088CC4 800880C4 10000024 */ b .L80088158 /* 088CC8 800880C8 8FAF0090 */ lw $t7, 0x90($sp) .L800880CC: -/* 088CCC 800880CC 3C188012 */ lui $t8, %hi(D_80126A30) # $t8, 0x8012 +/* 088CCC 800880CC 3C188012 */ lui $t8, %hi(sControllerPakIssueNotFound) # $t8, 0x8012 /* 088CD0 800880D0 0302C021 */ addu $t8, $t8, $v0 -/* 088CD4 800880D4 93186A30 */ lbu $t8, %lo(D_80126A30)($t8) +/* 088CD4 800880D4 93186A30 */ lbu $t8, %lo(sControllerPakIssueNotFound)($t8) /* 088CD8 800880D8 8FB90094 */ lw $t9, 0x94($sp) /* 088CDC 800880DC 13000002 */ beqz $t8, .L800880E8 -/* 088CE0 800880E0 3C0E8012 */ lui $t6, %hi(D_80126A30) # $t6, 0x8012 +/* 088CE0 800880E0 3C0E8012 */ lui $t6, %hi(sControllerPakIssueNotFound) # $t6, 0x8012 /* 088CE4 800880E4 1B20000D */ blez $t9, .L8008811C .L800880E8: -/* 088CE8 800880E8 25CE6A30 */ addiu $t6, %lo(D_80126A30) # addiu $t6, $t6, 0x6a30 +/* 088CE8 800880E8 25CE6A30 */ addiu $t6, %lo(sControllerPakIssueNotFound) # addiu $t6, $t6, 0x6a30 /* 088CEC 800880EC 022E8021 */ addu $s0, $s1, $t6 .L800880F0: /* 088CF0 800880F0 26310001 */ addiu $s1, $s1, 1 @@ -146,9 +146,9 @@ glabel func_80087F14 /* 088D18 80088118 8FAF0090 */ lw $t7, 0x90($sp) .L8008811C: /* 088D1C 8008811C 8FB80094 */ lw $t8, 0x94($sp) -/* 088D20 80088120 3C198012 */ lui $t9, %hi(D_80126A30) # $t9, 0x8012 +/* 088D20 80088120 3C198012 */ lui $t9, %hi(sControllerPakIssueNotFound) # $t9, 0x8012 /* 088D24 80088124 0701000B */ bgez $t8, .L80088154 -/* 088D28 80088128 27396A30 */ addiu $t9, %lo(D_80126A30) # addiu $t9, $t9, 0x6a30 +/* 088D28 80088128 27396A30 */ addiu $t9, %lo(sControllerPakIssueNotFound) # addiu $t9, $t9, 0x6a30 /* 088D2C 8008812C 02398021 */ addu $s0, $s1, $t9 .L80088130: /* 088D30 80088130 2631FFFF */ addiu $s1, $s1, -1 @@ -164,27 +164,27 @@ glabel func_80087F14 .L80088154: /* 088D54 80088154 8FAF0090 */ lw $t7, 0x90($sp) .L80088158: -/* 088D58 80088158 3C188012 */ lui $t8, %hi(D_80126B70) # $t8, 0x8012 -/* 088D5C 8008815C 3C198012 */ lui $t9, %hi(D_80126B60) # $t9, 0x8012 -/* 088D60 80088160 27396B60 */ addiu $t9, %lo(D_80126B60) # addiu $t9, $t9, 0x6b60 -/* 088D64 80088164 27186B70 */ addiu $t8, %lo(D_80126B70) # addiu $t8, $t8, 0x6b70 -/* 088D68 80088168 3C078012 */ lui $a3, %hi(D_80126B20) # $a3, 0x8012 +/* 088D58 80088158 3C188012 */ lui $t8, %hi(sCurrentControllerPakAllFileSizes) # $t8, 0x8012 +/* 088D5C 8008815C 3C198012 */ lui $t9, %hi(sCurrentControllerPakAllFileTypes) # $t9, 0x8012 +/* 088D60 80088160 27396B60 */ addiu $t9, %lo(sCurrentControllerPakAllFileTypes) # addiu $t9, $t9, 0x6b60 +/* 088D64 80088164 27186B70 */ addiu $t8, %lo(sCurrentControllerPakAllFileSizes) # addiu $t8, $t8, 0x6b70 +/* 088D68 80088168 3C078012 */ lui $a3, %hi(sCurrentControllerPakAllFileExtensions) # $a3, 0x8012 /* 088D6C 8008816C ADF10000 */ sw $s1, ($t7) /* 088D70 80088170 AFB90014 */ sw $t9, 0x14($sp) /* 088D74 80088174 AFB80010 */ sw $t8, 0x10($sp) -/* 088D78 80088178 24E76B20 */ addiu $a3, %lo(D_80126B20) # addiu $a3, $a3, 0x6b20 -/* 088D7C 8008817C 0C01D798 */ jal func_80075E60 +/* 088D78 80088178 24E76B20 */ addiu $a3, %lo(sCurrentControllerPakAllFileExtensions) # addiu $a3, $a3, 0x6b20 +/* 088D7C 8008817C 0C01D798 */ jal get_controller_pak_file_list /* 088D80 80088180 02202025 */ move $a0, $s1 /* 088D84 80088184 1440005C */ bnez $v0, .L800882F8 /* 088D88 80088188 00405025 */ move $t2, $v0 -/* 088D8C 8008818C 3C098012 */ lui $t1, %hi(D_80126B70) # $t1, 0x8012 -/* 088D90 80088190 3C088012 */ lui $t0, %hi(D_80126AE0) # $t0, 0x8012 +/* 088D8C 8008818C 3C098012 */ lui $t1, %hi(sCurrentControllerPakAllFileSizes) # $t1, 0x8012 +/* 088D90 80088190 3C088012 */ lui $t0, %hi(sCurrentControllerPakAllFileNames) # $t0, 0x8012 /* 088D94 80088194 3C058012 */ lui $a1, %hi(D_80126AA0) # $a1, 0x8012 -/* 088D98 80088198 3C1F8012 */ lui $ra, %hi(D_80126AE0) # $ra, 0x8012 -/* 088D9C 8008819C 27FF6AE0 */ addiu $ra, %lo(D_80126AE0) # addiu $ra, $ra, 0x6ae0 +/* 088D98 80088198 3C1F8012 */ lui $ra, %hi(sCurrentControllerPakAllFileNames) # $ra, 0x8012 +/* 088D9C 8008819C 27FF6AE0 */ addiu $ra, %lo(sCurrentControllerPakAllFileNames) # addiu $ra, $ra, 0x6ae0 /* 088DA0 800881A0 24A56AA0 */ addiu $a1, %lo(D_80126AA0) # addiu $a1, $a1, 0x6aa0 -/* 088DA4 800881A4 25086AE0 */ addiu $t0, %lo(D_80126AE0) # addiu $t0, $t0, 0x6ae0 -/* 088DA8 800881A8 25296B70 */ addiu $t1, %lo(D_80126B70) # addiu $t1, $t1, 0x6b70 +/* 088DA4 800881A4 25086AE0 */ addiu $t0, %lo(sCurrentControllerPakAllFileNames) # addiu $t0, $t0, 0x6ae0 +/* 088DA8 800881A8 25296B70 */ addiu $t1, %lo(sCurrentControllerPakAllFileSizes) # addiu $t1, $t1, 0x6b70 /* 088DAC 800881AC 00005825 */ move $t3, $zero /* 088DB0 800881B0 240D002D */ li $t5, 45 /* 088DB4 800881B4 240C002E */ li $t4, 46 @@ -196,8 +196,8 @@ glabel func_80087F14 /* 088DC8 800881C8 10E00030 */ beqz $a3, .L8008828C /* 088DCC 800881CC 00002025 */ move $a0, $zero /* 088DD0 800881D0 90F90000 */ lbu $t9, ($a3) -/* 088DD4 800881D4 3C188012 */ lui $t8, %hi(D_80126B20) # $t8, 0x8012 -/* 088DD8 800881D8 27186B20 */ addiu $t8, %lo(D_80126B20) # addiu $t8, $t8, 0x6b20 +/* 088DD4 800881D4 3C188012 */ lui $t8, %hi(sCurrentControllerPakAllFileExtensions) # $t8, 0x8012 +/* 088DD8 800881D8 27186B20 */ addiu $t8, %lo(sCurrentControllerPakAllFileExtensions) # addiu $t8, $t8, 0x6b20 /* 088DDC 800881DC 00001025 */ move $v0, $zero /* 088DE0 800881E0 1320000D */ beqz $t9, .L80088218 /* 088DE4 800881E4 01783021 */ addu $a2, $t3, $t8 @@ -264,11 +264,11 @@ glabel func_80087F14 /* 088EC4 800882C4 0C01D859 */ jal func_80076164 /* 088EC8 800882C8 AFAA0078 */ sw $t2, 0x78($sp) /* 088ECC 800882CC 8FAE0090 */ lw $t6, 0x90($sp) -/* 088ED0 800882D0 3C108012 */ lui $s0, %hi(D_80126BB0) # $s0, 0x8012 -/* 088ED4 800882D4 26106BB0 */ addiu $s0, %lo(D_80126BB0) # addiu $s0, $s0, 0x6bb0 +/* 088ED0 800882D0 3C108012 */ lui $s0, %hi(sCurrentControllerPakFreeSpace) # $s0, 0x8012 +/* 088ED4 800882D4 26106BB0 */ addiu $s0, %lo(sCurrentControllerPakFreeSpace) # addiu $s0, $s0, 0x6bb0 /* 088ED8 800882D8 8DC40000 */ lw $a0, ($t6) /* 088EDC 800882DC 02002825 */ move $a1, $s0 -/* 088EE0 800882E0 0C01D865 */ jal func_80076194 +/* 088EE0 800882E0 0C01D865 */ jal get_free_space /* 088EE4 800882E4 00003025 */ move $a2, $zero /* 088EE8 800882E8 8E0F0000 */ lw $t7, ($s0) /* 088EEC 800882EC 8FAA0078 */ lw $t2, 0x78($sp) diff --git a/asm/non_matchings/menu/func_8008832C.s b/asm/non_matchings/menu/func_8008832C.s index 832f43c6..e0c6abc0 100644 --- a/asm/non_matchings/menu/func_8008832C.s +++ b/asm/non_matchings/menu/func_8008832C.s @@ -2,23 +2,23 @@ glabel func_8008832C /* 088F2C 8008832C 27BDFFF0 */ addiu $sp, $sp, -0x10 /* 088F30 80088330 AFB10008 */ sw $s1, 8($sp) /* 088F34 80088334 3C078012 */ lui $a3, %hi(D_80126BC8) # $a3, 0x8012 -/* 088F38 80088338 3C0E8012 */ lui $t6, %hi(D_80126A34) # $t6, 0x8012 +/* 088F38 80088338 3C0E8012 */ lui $t6, %hi(sControllerPakFatalErrorFound) # $t6, 0x8012 /* 088F3C 8008833C 24E76BC8 */ addiu $a3, %lo(D_80126BC8) # addiu $a3, $a3, 0x6bc8 /* 088F40 80088340 AFB2000C */ sw $s2, 0xc($sp) /* 088F44 80088344 AFB00004 */ sw $s0, 4($sp) -/* 088F48 80088348 25CE6A34 */ addiu $t6, %lo(D_80126A34) # addiu $t6, $t6, 0x6a34 -/* 088F4C 8008834C 3C118012 */ lui $s1, %hi(D_80126A3C) # $s1, 0x8012 -/* 088F50 80088350 3C0C8012 */ lui $t4, %hi(D_80126A60) # $t4, 0x8012 -/* 088F54 80088354 3C0B8012 */ lui $t3, %hi(D_80126A38) # $t3, 0x8012 +/* 088F48 80088348 25CE6A34 */ addiu $t6, %lo(sControllerPakFatalErrorFound) # addiu $t6, $t6, 0x6a34 +/* 088F4C 8008834C 3C118012 */ lui $s1, %hi(sControllerPakBadData) # $s1, 0x8012 +/* 088F50 80088350 3C0C8012 */ lui $t4, %hi(sControllerPakDataPresent) # $t4, 0x8012 +/* 088F54 80088354 3C0B8012 */ lui $t3, %hi(sControllerPakNoFreeSpace) # $t3, 0x8012 /* 088F58 80088358 3C09800E */ lui $t1, %hi(gMenuText) # $t1, 0x800e /* 088F5C 8008835C 3C08800E */ lui $t0, %hi(D_800DFCB4) # $t0, 0x800e /* 088F60 80088360 00001025 */ move $v0, $zero /* 088F64 80088364 ACE00000 */ sw $zero, ($a3) /* 088F68 80088368 2508FCB4 */ addiu $t0, %lo(D_800DFCB4) # addiu $t0, $t0, -0x34c /* 088F6C 8008836C 2529F4A0 */ addiu $t1, %lo(gMenuText) # addiu $t1, $t1, -0xb60 -/* 088F70 80088370 256B6A38 */ addiu $t3, %lo(D_80126A38) # addiu $t3, $t3, 0x6a38 -/* 088F74 80088374 258C6A60 */ addiu $t4, %lo(D_80126A60) # addiu $t4, $t4, 0x6a60 -/* 088F78 80088378 26316A3C */ addiu $s1, %lo(D_80126A3C) # addiu $s1, $s1, 0x6a3c +/* 088F70 80088370 256B6A38 */ addiu $t3, %lo(sControllerPakNoFreeSpace) # addiu $t3, $t3, 0x6a38 +/* 088F74 80088374 258C6A60 */ addiu $t4, %lo(sControllerPakDataPresent) # addiu $t4, $t4, 0x6a60 +/* 088F78 80088378 26316A3C */ addiu $s1, %lo(sControllerPakBadData) # addiu $s1, $s1, 0x6a3c /* 088F7C 8008837C 000E2021 */ addu $a0, $zero, $t6 /* 088F80 80088380 24100002 */ li $s0, 2 /* 088F84 80088384 24120003 */ li $s2, 3 diff --git a/asm/non_matchings/menu/func_80088938.s b/asm/non_matchings/menu/func_80088938.s index 1690ff75..313993a6 100644 --- a/asm/non_matchings/menu/func_80088938.s +++ b/asm/non_matchings/menu/func_80088938.s @@ -13,7 +13,7 @@ glabel func_80088938 /* 089564 80088964 00002025 */ move $a0, $zero /* 089568 80088968 00002825 */ move $a1, $zero /* 08956C 8008896C 00003025 */ move $a2, $zero -/* 089570 80088970 0C0310F3 */ jal set_text_background_color +/* 089570 80088970 0C0310F3 */ jal set_text_background_colour /* 089574 80088974 00003825 */ move $a3, $zero /* 089578 80088978 3C168012 */ lui $s6, %hi(D_801263BC) # $s6, 0x8012 /* 08957C 8008897C 8ED663BC */ lw $s6, %lo(D_801263BC)($s6) @@ -47,7 +47,7 @@ glabel func_80088938 /* 0895E4 800889E4 00002025 */ move $a0, $zero /* 0895E8 800889E8 00002825 */ move $a1, $zero /* 0895EC 800889EC 00003025 */ move $a2, $zero -/* 0895F0 800889F0 0C0310E1 */ jal set_text_color +/* 0895F0 800889F0 0C0310E1 */ jal set_text_colour /* 0895F4 800889F4 240700FF */ li $a3, 255 /* 0895F8 800889F8 3C17800E */ lui $s7, %hi(gMenuText) # $s7, 0x800e /* 0895FC 800889FC 26F7F4A0 */ addiu $s7, %lo(gMenuText) # addiu $s7, $s7, -0xb60 @@ -65,7 +65,7 @@ glabel func_80088938 /* 08962C 80088A2C 240400FF */ li $a0, 255 /* 089630 80088A30 240500FF */ li $a1, 255 /* 089634 80088A34 240600FF */ li $a2, 255 -/* 089638 80088A38 0C0310E1 */ jal set_text_color +/* 089638 80088A38 0C0310E1 */ jal set_text_colour /* 08963C 80088A3C 00003825 */ move $a3, $zero /* 089640 80088A40 8EEC0000 */ lw $t4, ($s7) /* 089644 80088A44 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 @@ -141,8 +141,8 @@ glabel func_80088938 /* 089754 80088B54 0C03145A */ jal render_dialogue_text /* 089758 80088B58 24060002 */ li $a2, 2 /* 08975C 80088B5C 8EF80000 */ lw $t8, ($s7) -/* 089760 80088B60 3C198012 */ lui $t9, %hi(D_80126BB0) # $t9, 0x8012 -/* 089764 80088B64 8F396BB0 */ lw $t9, %lo(D_80126BB0)($t9) +/* 089760 80088B60 3C198012 */ lui $t9, %hi(sCurrentControllerPakFreeSpace) # $t9, 0x8012 +/* 089764 80088B64 8F396BB0 */ lw $t9, %lo(sCurrentControllerPakFreeSpace)($t9) /* 089768 80088B68 8F0701C8 */ lw $a3, 0x1c8($t8) /* 08976C 80088B6C 24080004 */ li $t0, 4 /* 089770 80088B70 AFA80014 */ sw $t0, 0x14($sp) @@ -251,11 +251,11 @@ glabel func_80088938 /* 0898FC 80088CFC 3C108012 */ lui $s0, %hi(D_80126AA0) # $s0, 0x8012 /* 089900 80088D00 01B11821 */ addu $v1, $t5, $s1 /* 089904 80088D04 00031080 */ sll $v0, $v1, 2 -/* 089908 80088D08 3C138012 */ lui $s3, %hi(D_80126B70) # $s3, 0x8012 +/* 089908 80088D08 3C138012 */ lui $s3, %hi(sCurrentControllerPakAllFileSizes) # $s3, 0x8012 /* 08990C 80088D0C 02028021 */ addu $s0, $s0, $v0 /* 089910 80088D10 02629821 */ addu $s3, $s3, $v0 /* 089914 80088D14 8E106AA0 */ lw $s0, %lo(D_80126AA0)($s0) -/* 089918 80088D18 8E736B70 */ lw $s3, %lo(D_80126B70)($s3) +/* 089918 80088D18 8E736B70 */ lw $s3, %lo(sCurrentControllerPakAllFileSizes)($s3) /* 08991C 80088D1C 00000000 */ nop .L80088D20: /* 089920 80088D20 246E0001 */ addiu $t6, $v1, 1 @@ -339,7 +339,7 @@ glabel func_80088938 /* 089A50 80088E50 240400FF */ li $a0, 255 /* 089A54 80088E54 240500FF */ li $a1, 255 /* 089A58 80088E58 240600FF */ li $a2, 255 -/* 089A5C 80088E5C 0C0310E1 */ jal set_text_color +/* 089A5C 80088E5C 0C0310E1 */ jal set_text_colour /* 089A60 80088E60 02C03825 */ move $a3, $s6 /* 089A64 80088E64 10000007 */ b .L80088E84 /* 089A68 80088E68 8EE90000 */ lw $t1, ($s7) @@ -347,7 +347,7 @@ glabel func_80088938 /* 089A6C 80088E6C 240800FF */ li $t0, 255 /* 089A70 80088E70 AFA80010 */ sw $t0, 0x10($sp) /* 089A74 80088E74 240600FF */ li $a2, 255 -/* 089A78 80088E78 0C0310E1 */ jal set_text_color +/* 089A78 80088E78 0C0310E1 */ jal set_text_colour /* 089A7C 80088E7C 00003825 */ move $a3, $zero /* 089A80 80088E80 8EE90000 */ lw $t1, ($s7) .L80088E84: @@ -474,7 +474,7 @@ glabel func_80088938 /* 089C40 80089040 241900FF */ li $t9, 255 /* 089C44 80089044 AFB90010 */ sw $t9, 0x10($sp) /* 089C48 80089048 240600FF */ li $a2, 255 -/* 089C4C 8008904C 0C0310E1 */ jal set_text_color +/* 089C4C 8008904C 0C0310E1 */ jal set_text_colour /* 089C50 80089050 00003825 */ move $a3, $zero /* 089C54 80089054 0C0310BB */ jal set_text_font /* 089C58 80089058 24040002 */ li $a0, 2 diff --git a/asm/non_matchings/menu/func_800890AC.s b/asm/non_matchings/menu/func_800890AC.s index 13cd5c84..4780bba6 100644 --- a/asm/non_matchings/menu/func_800890AC.s +++ b/asm/non_matchings/menu/func_800890AC.s @@ -118,7 +118,7 @@ glabel func_800890AC /* 089E68 80089268 3C048012 */ lui $a0, %hi(D_80126A68) # $a0, 0x8012 /* 089E6C 8008926C 8C846A68 */ lw $a0, %lo(D_80126A68)($a0) /* 089E70 80089270 8D250000 */ lw $a1, ($t1) -/* 089E74 80089274 0C01D8B2 */ jal func_800762C8 +/* 089E74 80089274 0C01D8B2 */ jal delete_file /* 089E78 80089278 AFA7003C */ sw $a3, 0x3c($sp) /* 089E7C 8008927C 8FA7003C */ lw $a3, 0x3c($sp) /* 089E80 80089280 1040000C */ beqz $v0, .L800892B4 @@ -236,9 +236,9 @@ glabel func_800890AC /* 08A010 80089410 AFB80034 */ sw $t8, 0x34($sp) .L80089414: /* 08A014 80089414 10400013 */ beqz $v0, .L80089464 -/* 08A018 80089418 3C028012 */ lui $v0, %hi(D_80126B60) # $v0, 0x8012 +/* 08A018 80089418 3C028012 */ lui $v0, %hi(sCurrentControllerPakAllFileTypes) # $v0, 0x8012 /* 08A01C 8008941C 00431021 */ addu $v0, $v0, $v1 -/* 08A020 80089420 90426B60 */ lbu $v0, %lo(D_80126B60)($v0) +/* 08A020 80089420 90426B60 */ lbu $v0, %lo(sCurrentControllerPakAllFileTypes)($v0) /* 08A024 80089424 00000000 */ nop /* 08A028 80089428 28410003 */ slti $at, $v0, 3 /* 08A02C 8008942C 1420000A */ bnez $at, .L80089458 diff --git a/asm/non_matchings/menu/func_8008FA54.s b/asm/non_matchings/menu/func_8008FA54.s index eef02572..7cc8785d 100644 --- a/asm/non_matchings/menu/func_8008FA54.s +++ b/asm/non_matchings/menu/func_8008FA54.s @@ -34,7 +34,7 @@ glabel func_8008FA54 /* 0906B4 8008FAB4 00002025 */ move $a0, $zero /* 0906B8 8008FAB8 00002825 */ move $a1, $zero /* 0906BC 8008FABC 00003025 */ move $a2, $zero -/* 0906C0 8008FAC0 0C0310F3 */ jal set_text_background_color +/* 0906C0 8008FAC0 0C0310F3 */ jal set_text_background_colour /* 0906C4 8008FAC4 00003825 */ move $a3, $zero /* 0906C8 8008FAC8 3C02800E */ lui $v0, %hi(gMenuDelay) # $v0, 0x800e /* 0906CC 8008FACC 8C42F47C */ lw $v0, %lo(gMenuDelay)($v0) @@ -71,7 +71,7 @@ glabel func_8008FA54 /* 090740 8008FB40 26210001 */ addiu $at, $s1, 1 /* 090744 8008FB44 00015043 */ sra $t2, $at, 1 .L8008FB48: -/* 090748 8008FB48 0C0310E1 */ jal set_text_color +/* 090748 8008FB48 0C0310E1 */ jal set_text_colour /* 09074C 8008FB4C AFAA0010 */ sw $t2, 0x10($sp) /* 090750 8008FB50 8FAB006C */ lw $t3, 0x6c($sp) /* 090754 8008FB54 3C138012 */ lui $s3, %hi(D_801263A0) # $s3, 0x8012 @@ -88,7 +88,7 @@ glabel func_8008FA54 /* 090780 8008FB80 240500FF */ li $a1, 255 /* 090784 8008FB84 240600FF */ li $a2, 255 /* 090788 8008FB88 00003825 */ move $a3, $zero -/* 09078C 8008FB8C 0C0310E1 */ jal set_text_color +/* 09078C 8008FB8C 0C0310E1 */ jal set_text_colour /* 090790 8008FB90 AFB10010 */ sw $s1, 0x10($sp) /* 090794 8008FB94 240D000C */ li $t5, 12 /* 090798 8008FB98 AFAD0010 */ sw $t5, 0x10($sp) @@ -108,7 +108,7 @@ glabel func_8008FA54 /* 0907CC 8008FBCC 240500FF */ li $a1, 255 /* 0907D0 8008FBD0 240600FF */ li $a2, 255 /* 0907D4 8008FBD4 00003825 */ move $a3, $zero -/* 0907D8 8008FBD8 0C0310E1 */ jal set_text_color +/* 0907D8 8008FBD8 0C0310E1 */ jal set_text_colour /* 0907DC 8008FBDC AFB10010 */ sw $s1, 0x10($sp) /* 0907E0 8008FBE0 8FAE006C */ lw $t6, 0x6c($sp) /* 0907E4 8008FBE4 8FA7008C */ lw $a3, 0x8c($sp) @@ -197,7 +197,7 @@ glabel func_8008FA54 /* 090924 8008FD24 E7A20010 */ swc1 $f2, 0x10($sp) /* 090928 8008FD28 E7A00014 */ swc1 $f0, 0x14($sp) /* 09092C 8008FD2C E7A00054 */ swc1 $f0, 0x54($sp) -/* 090930 8008FD30 0C01E340 */ jal func_80078D00 +/* 090930 8008FD30 0C01E340 */ jal render_texture_rectangle_scaled /* 090934 8008FD34 E7A20058 */ swc1 $f2, 0x58($sp) /* 090938 8008FD38 C7A00054 */ lwc1 $f0, 0x54($sp) /* 09093C 8008FD3C C7A20058 */ lwc1 $f2, 0x58($sp) @@ -222,7 +222,7 @@ glabel func_8008FA54 /* 090984 8008FD84 AFAC0018 */ sw $t4, 0x18($sp) /* 090988 8008FD88 E7A20010 */ swc1 $f2, 0x10($sp) /* 09098C 8008FD8C E7A00014 */ swc1 $f0, 0x14($sp) -/* 090990 8008FD90 0C01E340 */ jal func_80078D00 +/* 090990 8008FD90 0C01E340 */ jal render_texture_rectangle_scaled /* 090994 8008FD94 AFA0001C */ sw $zero, 0x1c($sp) .L8008FD98: /* 090998 8008FD98 0C01ECF4 */ jal func_8007B3D0 diff --git a/asm/non_matchings/menu/func_80092E94.s b/asm/non_matchings/menu/func_80092E94.s index c899695f..11fb5e04 100644 --- a/asm/non_matchings/menu/func_80092E94.s +++ b/asm/non_matchings/menu/func_80092E94.s @@ -58,14 +58,14 @@ glabel func_80092E94 /* 093B70 80092F70 00002025 */ move $a0, $zero /* 093B74 80092F74 00002825 */ move $a1, $zero /* 093B78 80092F78 00003025 */ move $a2, $zero -/* 093B7C 80092F7C 0C0310F3 */ jal set_text_background_color +/* 093B7C 80092F7C 0C0310F3 */ jal set_text_background_colour /* 093B80 80092F80 00003825 */ move $a3, $zero /* 093B84 80092F84 240C0080 */ li $t4, 128 /* 093B88 80092F88 AFAC0010 */ sw $t4, 0x10($sp) /* 093B8C 80092F8C 00002025 */ move $a0, $zero /* 093B90 80092F90 00002825 */ move $a1, $zero /* 093B94 80092F94 00003025 */ move $a2, $zero -/* 093B98 80092F98 0C0310E1 */ jal set_text_color +/* 093B98 80092F98 0C0310E1 */ jal set_text_colour /* 093B9C 80092F9C 240700FF */ li $a3, 255 /* 093BA0 80092FA0 240D000C */ li $t5, 12 /* 093BA4 80092FA4 AFAD0010 */ sw $t5, 0x10($sp) @@ -79,7 +79,7 @@ glabel func_80092E94 /* 093BC4 80092FC4 240400FF */ li $a0, 255 /* 093BC8 80092FC8 240500FF */ li $a1, 255 /* 093BCC 80092FCC 240600FF */ li $a2, 255 -/* 093BD0 80092FD0 0C0310E1 */ jal set_text_color +/* 093BD0 80092FD0 0C0310E1 */ jal set_text_colour /* 093BD4 80092FD4 00003825 */ move $a3, $zero /* 093BD8 80092FD8 240F000C */ li $t7, 12 /* 093BDC 80092FDC AFAF0010 */ sw $t7, 0x10($sp) @@ -128,7 +128,7 @@ glabel func_80092E94 /* 093C84 80093084 240400FF */ li $a0, 255 /* 093C88 80093088 24050040 */ li $a1, 64 /* 093C8C 8009308C 24060040 */ li $a2, 64 -/* 093C90 80093090 0C0310E1 */ jal set_text_color +/* 093C90 80093090 0C0310E1 */ jal set_text_colour /* 093C94 80093094 24070060 */ li $a3, 96 /* 093C98 80093098 3C0C800E */ lui $t4, %hi(gMenuText) # $t4, 0x800e /* 093C9C 8009309C 8D8CF4A0 */ lw $t4, %lo(gMenuText)($t4) @@ -157,7 +157,7 @@ glabel func_80092E94 /* 093CF8 800930F8 240400FF */ li $a0, 255 /* 093CFC 800930FC 24050080 */ li $a1, 128 /* 093D00 80093100 240600FF */ li $a2, 255 -/* 093D04 80093104 0C0310E1 */ jal set_text_color +/* 093D04 80093104 0C0310E1 */ jal set_text_colour /* 093D08 80093108 24070060 */ li $a3, 96 /* 093D0C 8009310C 3C098012 */ lui $t1, %hi(gPlayerSelectVehicle) # $t1, 0x8012 /* 093D10 80093110 812969C0 */ lb $t1, %lo(gPlayerSelectVehicle)($t1) @@ -404,14 +404,14 @@ glabel func_80092E94 /* 0940B8 800934B8 00002025 */ move $a0, $zero /* 0940BC 800934BC 00002825 */ move $a1, $zero /* 0940C0 800934C0 00003025 */ move $a2, $zero -/* 0940C4 800934C4 0C0310F3 */ jal set_text_background_color +/* 0940C4 800934C4 0C0310F3 */ jal set_text_background_colour /* 0940C8 800934C8 00003825 */ move $a3, $zero /* 0940CC 800934CC 240800FF */ li $t0, 255 /* 0940D0 800934D0 AFA80010 */ sw $t0, 0x10($sp) /* 0940D4 800934D4 240400FF */ li $a0, 255 /* 0940D8 800934D8 240500FF */ li $a1, 255 /* 0940DC 800934DC 240600FF */ li $a2, 255 -/* 0940E0 800934E0 0C0310E1 */ jal set_text_color +/* 0940E0 800934E0 0C0310E1 */ jal set_text_colour /* 0940E4 800934E4 00003825 */ move $a3, $zero /* 0940E8 800934E8 8FA60060 */ lw $a2, 0x60($sp) /* 0940EC 800934EC 3C07800F */ lui $a3, %hi(D_800E8240) # $a3, 0x800f @@ -430,14 +430,14 @@ glabel func_80092E94 /* 09411C 8009351C 00002025 */ move $a0, $zero /* 094120 80093520 00002825 */ move $a1, $zero /* 094124 80093524 00003025 */ move $a2, $zero -/* 094128 80093528 0C0310F3 */ jal set_text_background_color +/* 094128 80093528 0C0310F3 */ jal set_text_background_colour /* 09412C 8009352C 00003825 */ move $a3, $zero /* 094130 80093530 241800FF */ li $t8, 255 /* 094134 80093534 AFB80010 */ sw $t8, 0x10($sp) /* 094138 80093538 240400FF */ li $a0, 255 /* 09413C 8009353C 240500FF */ li $a1, 255 /* 094140 80093540 240600FF */ li $a2, 255 -/* 094144 80093544 0C0310E1 */ jal set_text_color +/* 094144 80093544 0C0310E1 */ jal set_text_colour /* 094148 80093548 00003825 */ move $a3, $zero /* 09414C 8009354C 8FB00060 */ lw $s0, 0x60($sp) /* 094150 80093550 00000000 */ nop diff --git a/asm/non_matchings/menu/func_80096978.s b/asm/non_matchings/menu/func_80096978.s index b3c0fd93..463af79c 100644 --- a/asm/non_matchings/menu/func_80096978.s +++ b/asm/non_matchings/menu/func_80096978.s @@ -66,14 +66,14 @@ glabel func_80096978 /* 09766C 80096A6C 00002025 */ move $a0, $zero /* 097670 80096A70 00002825 */ move $a1, $zero /* 097674 80096A74 00003025 */ move $a2, $zero -/* 097678 80096A78 0C0310F3 */ jal set_text_background_color +/* 097678 80096A78 0C0310F3 */ jal set_text_background_colour /* 09767C 80096A7C 00003825 */ move $a3, $zero /* 097680 80096A80 8E190000 */ lw $t9, ($s0) /* 097684 80096A84 240400FF */ li $a0, 255 /* 097688 80096A88 240500FF */ li $a1, 255 /* 09768C 80096A8C 240600FF */ li $a2, 255 /* 097690 80096A90 00003825 */ move $a3, $zero -/* 097694 80096A94 0C0310E1 */ jal set_text_color +/* 097694 80096A94 0C0310E1 */ jal set_text_colour /* 097698 80096A98 AFB90010 */ sw $t9, 0x10($sp) /* 09769C 80096A9C 3C08800E */ lui $t0, %hi(gMenuText) # $t0, 0x800e /* 0976A0 80096AA0 8D08F4A0 */ lw $t0, %lo(gMenuText)($t0) @@ -208,7 +208,7 @@ glabel func_80096978 /* 09788C 80096C8C 00002825 */ move $a1, $zero /* 097890 80096C90 00003025 */ move $a2, $zero /* 097894 80096C94 240700FF */ li $a3, 255 -/* 097898 80096C98 0C0310E1 */ jal set_text_color +/* 097898 80096C98 0C0310E1 */ jal set_text_colour /* 09789C 80096C9C 0000B025 */ move $s6, $zero /* 0978A0 80096CA0 8FAB0078 */ lw $t3, 0x78($sp) /* 0978A4 80096CA4 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 @@ -224,7 +224,7 @@ glabel func_80096978 /* 0978CC 80096CCC 240400FF */ li $a0, 255 /* 0978D0 80096CD0 240500FF */ li $a1, 255 /* 0978D4 80096CD4 240600C0 */ li $a2, 192 -/* 0978D8 80096CD8 0C0310E1 */ jal set_text_color +/* 0978D8 80096CD8 0C0310E1 */ jal set_text_colour /* 0978DC 80096CDC 24070060 */ li $a3, 96 /* 0978E0 80096CE0 8FAE0078 */ lw $t6, 0x78($sp) /* 0978E4 80096CE4 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 diff --git a/asm/non_matchings/menu/func_80097918.s b/asm/non_matchings/menu/func_80097918.s index 547a4587..d653a0ac 100644 --- a/asm/non_matchings/menu/func_80097918.s +++ b/asm/non_matchings/menu/func_80097918.s @@ -40,7 +40,7 @@ glabel func_80097918 /* 0985B0 800979B0 00002825 */ move $a1, $zero /* 0985B4 800979B4 00003025 */ move $a2, $zero /* 0985B8 800979B8 00003825 */ move $a3, $zero -/* 0985BC 800979BC 0C0310F3 */ jal set_text_background_color +/* 0985BC 800979BC 0C0310F3 */ jal set_text_background_colour /* 0985C0 800979C0 AFA2005C */ sw $v0, 0x5c($sp) /* 0985C4 800979C4 0C0310BB */ jal set_text_font /* 0985C8 800979C8 00002025 */ move $a0, $zero @@ -49,7 +49,7 @@ glabel func_80097918 /* 0985D4 800979D4 00002025 */ move $a0, $zero /* 0985D8 800979D8 00002825 */ move $a1, $zero /* 0985DC 800979DC 00003025 */ move $a2, $zero -/* 0985E0 800979E0 0C0310E1 */ jal set_text_color +/* 0985E0 800979E0 0C0310E1 */ jal set_text_colour /* 0985E4 800979E4 240700FF */ li $a3, 255 /* 0985E8 800979E8 3C11800E */ lui $s1, %hi(gMenuText) # $s1, 0x800e /* 0985EC 800979EC 2631F4A0 */ addiu $s1, %lo(gMenuText) # addiu $s1, $s1, -0xb60 @@ -71,7 +71,7 @@ glabel func_80097918 /* 09862C 80097A2C 240400FF */ li $a0, 255 /* 098630 80097A30 24050080 */ li $a1, 128 /* 098634 80097A34 240600FF */ li $a2, 255 -/* 098638 80097A38 0C0310E1 */ jal set_text_color +/* 098638 80097A38 0C0310E1 */ jal set_text_colour /* 09863C 80097A3C 24070060 */ li $a3, 96 /* 098640 80097A40 8E2D0000 */ lw $t5, ($s1) /* 098644 80097A44 8E060000 */ lw $a2, ($s0) @@ -132,12 +132,12 @@ glabel func_80097918 /* 098708 80097B08 240400FF */ li $a0, 255 /* 09870C 80097B0C 240500FF */ li $a1, 255 /* 098710 80097B10 240600FF */ li $a2, 255 -/* 098714 80097B14 0C0310E1 */ jal set_text_color +/* 098714 80097B14 0C0310E1 */ jal set_text_colour /* 098718 80097B18 00003825 */ move $a3, $zero /* 09871C 80097B1C 10000004 */ b .L80097B30 /* 098720 80097B20 2A01001C */ slti $at, $s0, 0x1c .L80097B24: -/* 098724 80097B24 0C0310E1 */ jal set_text_color +/* 098724 80097B24 0C0310E1 */ jal set_text_colour /* 098728 80097B28 AFA90010 */ sw $t1, 0x10($sp) /* 09872C 80097B2C 2A01001C */ slti $at, $s0, 0x1c .L80097B30: @@ -226,7 +226,7 @@ glabel func_80097918 /* 098860 80097C60 00002025 */ move $a0, $zero /* 098864 80097C64 00002825 */ move $a1, $zero /* 098868 80097C68 00003025 */ move $a2, $zero -/* 09886C 80097C6C 0C0310E1 */ jal set_text_color +/* 09886C 80097C6C 0C0310E1 */ jal set_text_colour /* 098870 80097C70 240700FF */ li $a3, 255 /* 098874 80097C74 3C11800E */ lui $s1, %hi(D_800E0F94) # $s1, 0x800e /* 098878 80097C78 3C12800E */ lui $s2, %hi(D_800E0F98) # $s2, 0x800e @@ -246,7 +246,7 @@ glabel func_80097918 /* 0988B0 80097CB0 240400FF */ li $a0, 255 /* 0988B4 80097CB4 240500FF */ li $a1, 255 /* 0988B8 80097CB8 240600FF */ li $a2, 255 -/* 0988BC 80097CBC 0C0310E1 */ jal set_text_color +/* 0988BC 80097CBC 0C0310E1 */ jal set_text_colour /* 0988C0 80097CC0 00003825 */ move $a3, $zero /* 0988C4 80097CC4 8E250000 */ lw $a1, ($s1) /* 0988C8 80097CC8 8E460000 */ lw $a2, ($s2) diff --git a/asm/non_matchings/menu/func_80099E8C.s b/asm/non_matchings/menu/func_80099E8C.s index 95fd3a3f..7c2ab3d1 100644 --- a/asm/non_matchings/menu/func_80099E8C.s +++ b/asm/non_matchings/menu/func_80099E8C.s @@ -39,14 +39,14 @@ glabel func_80099E8C /* 09AB04 80099F04 00002025 */ move $a0, $zero /* 09AB08 80099F08 00002825 */ move $a1, $zero /* 09AB0C 80099F0C 00003025 */ move $a2, $zero -/* 09AB10 80099F10 0C0310F3 */ jal set_text_background_color +/* 09AB10 80099F10 0C0310F3 */ jal set_text_background_colour /* 09AB14 80099F14 00003825 */ move $a3, $zero /* 09AB18 80099F18 24190080 */ li $t9, 128 /* 09AB1C 80099F1C AFB90010 */ sw $t9, 0x10($sp) /* 09AB20 80099F20 00002025 */ move $a0, $zero /* 09AB24 80099F24 00002825 */ move $a1, $zero /* 09AB28 80099F28 00003025 */ move $a2, $zero -/* 09AB2C 80099F2C 0C0310E1 */ jal set_text_color +/* 09AB2C 80099F2C 0C0310E1 */ jal set_text_colour /* 09AB30 80099F30 240700FF */ li $a3, 255 /* 09AB34 80099F34 3C09800E */ lui $t1, %hi(gMenuText) # $t1, 0x800e /* 09AB38 80099F38 8D29F4A0 */ lw $t1, %lo(gMenuText)($t1) @@ -62,7 +62,7 @@ glabel func_80099E8C /* 09AB60 80099F60 240400FF */ li $a0, 255 /* 09AB64 80099F64 240500FF */ li $a1, 255 /* 09AB68 80099F68 240600FF */ li $a2, 255 -/* 09AB6C 80099F6C 0C0310E1 */ jal set_text_color +/* 09AB6C 80099F6C 0C0310E1 */ jal set_text_colour /* 09AB70 80099F70 00003825 */ move $a3, $zero /* 09AB74 80099F74 3C0C800E */ lui $t4, %hi(gMenuText) # $t4, 0x800e /* 09AB78 80099F78 8D8CF4A0 */ lw $t4, %lo(gMenuText)($t4) @@ -83,7 +83,7 @@ glabel func_80099E8C /* 09ABB4 80099FB4 240400FF */ li $a0, 255 /* 09ABB8 80099FB8 240500FF */ li $a1, 255 /* 09ABBC 80099FBC 240600FF */ li $a2, 255 -/* 09ABC0 80099FC0 0C0310E1 */ jal set_text_color +/* 09ABC0 80099FC0 0C0310E1 */ jal set_text_colour /* 09ABC4 80099FC4 00003825 */ move $a3, $zero /* 09ABC8 80099FC8 3C18800E */ lui $t8, %hi(gMenuText) # $t8, 0x800e /* 09ABCC 80099FCC 8F18F4A0 */ lw $t8, %lo(gMenuText)($t8) @@ -206,7 +206,7 @@ glabel func_80099E8C /* 09AD80 8009A180 00008025 */ move $s0, $zero /* 09AD84 8009A184 02E02025 */ move $a0, $s7 /* 09AD88 8009A188 E7AA0010 */ swc1 $f10, 0x10($sp) -/* 09AD8C 8009A18C 0C01E340 */ jal func_80078D00 +/* 09AD8C 8009A18C 0C01E340 */ jal render_texture_rectangle_scaled /* 09AD90 8009A190 E7B00014 */ swc1 $f16, 0x14($sp) /* 09AD94 8009A194 240A0034 */ li $t2, 52 /* 09AD98 8009A198 240B0020 */ li $t3, 32 @@ -249,7 +249,7 @@ glabel func_80099E8C /* 09AE28 8009A228 00002025 */ move $a0, $zero /* 09AE2C 8009A22C 00002825 */ move $a1, $zero /* 09AE30 8009A230 00003025 */ move $a2, $zero -/* 09AE34 8009A234 0C0310E1 */ jal set_text_color +/* 09AE34 8009A234 0C0310E1 */ jal set_text_colour /* 09AE38 8009A238 240700FF */ li $a3, 255 /* 09AE3C 8009A23C 00105040 */ sll $t2, $s0, 1 .L8009A240: @@ -275,7 +275,7 @@ glabel func_80099E8C /* 09AE8C 8009A28C 240400C8 */ li $a0, 200 /* 09AE90 8009A290 240500E4 */ li $a1, 228 /* 09AE94 8009A294 24060050 */ li $a2, 80 -/* 09AE98 8009A298 0C0310E1 */ jal set_text_color +/* 09AE98 8009A298 0C0310E1 */ jal set_text_colour /* 09AE9C 8009A29C 240700FF */ li $a3, 255 /* 09AEA0 8009A2A0 86250000 */ lh $a1, ($s1) /* 09AEA4 8009A2A4 86290002 */ lh $t1, 2($s1) @@ -340,7 +340,7 @@ glabel func_80099E8C /* 09AF84 8009A384 44069000 */ mfc1 $a2, $f18 /* 09AF88 8009A388 AFA0001C */ sw $zero, 0x1c($sp) /* 09AF8C 8009A38C E7A00010 */ swc1 $f0, 0x10($sp) -/* 09AF90 8009A390 0C01E340 */ jal func_80078D00 +/* 09AF90 8009A390 0C01E340 */ jal render_texture_rectangle_scaled /* 09AF94 8009A394 E7A00014 */ swc1 $f0, 0x14($sp) /* 09AF98 8009A398 0C01ECF4 */ jal func_8007B3D0 /* 09AF9C 8009A39C 02E02025 */ move $a0, $s7 diff --git a/asm/non_matchings/menu/load_menu_text.s b/asm/non_matchings/menu/load_menu_text.s index ece35e70..02572835 100644 --- a/asm/non_matchings/menu/load_menu_text.s +++ b/asm/non_matchings/menu/load_menu_text.s @@ -126,7 +126,7 @@ glabel load_menu_text /* 0806D0 8007FAD0 00000000 */ nop /* 0806D4 8007FAD4 AD2B0114 */ sw $t3, 0x114($t1) /* 0806D8 8007FAD8 8C8C007C */ lw $t4, 0x7c($a0) -/* 0806DC 8007FADC 3C0B8012 */ lui $t3, %hi(D_80126448+4) # $t3, 0x8012 +/* 0806DC 8007FADC 3C0B8012 */ lui $t3, %hi(sEepromSettings+4) # $t3, 0x8012 /* 0806E0 8007FAE0 AD2C0134 */ sw $t4, 0x134($t1) /* 0806E4 8007FAE4 8C8D0080 */ lw $t5, 0x80($a0) /* 0806E8 8007FAE8 00000000 */ nop @@ -143,7 +143,7 @@ glabel load_menu_text /* 080714 8007FB14 8C990088 */ lw $t9, 0x88($a0) /* 080718 8007FB18 00000000 */ nop /* 08071C 8007FB1C AC590000 */ sw $t9, ($v0) -/* 080720 8007FB20 8D6B644C */ lw $t3, %lo(D_80126448+4)($t3) +/* 080720 8007FB20 8D6B644C */ lw $t3, %lo(sEepromSettings+4)($t3) /* 080724 8007FB24 00000000 */ nop /* 080728 8007FB28 01616824 */ and $t5, $t3, $at /* 08072C 8007FB2C 11A00004 */ beqz $t5, .L8007FB40 diff --git a/asm/non_matchings/menu/menu_character_select_loop.s b/asm/non_matchings/menu/menu_character_select_loop.s index 23dd58e1..90e0e6b8 100644 --- a/asm/non_matchings/menu/menu_character_select_loop.s +++ b/asm/non_matchings/menu/menu_character_select_loop.s @@ -114,7 +114,7 @@ glabel menu_character_select_loop /* 08CAC8 8008BEC8 24420001 */ addiu $v0, $v0, 1 /* 08CACC 8008BECC 1449FFF0 */ bne $v0, $t1, .L8008BE90 /* 08CAD0 8008BED0 24630001 */ addiu $v1, $v1, 1 -/* 08CAD4 8008BED4 0C022ECF */ jal randomize_ai_racer_slots +/* 08CAD4 8008BED4 0C022ECF */ jal randomise_ai_racer_slots /* 08CAD8 8008BED8 AFAB0024 */ sw $t3, 0x24($sp) /* 08CADC 8008BEDC 3C048012 */ lui $a0, %hi(gActivePlayersArray) # $a0, 0x8012 /* 08CAE0 8008BEE0 0C01A916 */ jal assign_player_ids diff --git a/asm/non_matchings/menu/menu_credits_loop.s b/asm/non_matchings/menu/menu_credits_loop.s index e8e750a3..fec0b357 100644 --- a/asm/non_matchings/menu/menu_credits_loop.s +++ b/asm/non_matchings/menu/menu_credits_loop.s @@ -444,7 +444,7 @@ glabel menu_credits_loop /* 09C57C 8009B97C 0014C140 */ sll $t8, $s4, 5 /* 09C580 8009B980 03194821 */ addu $t1, $t8, $t9 # Setting D_800E1B50[1].source? Not sure why adding $t1 then -/* 09C584 8009B984 3C01800E */ lui $at, 0x800e +/* 09C584 8009B984 3C01800E */ lui $at, %hi(D_800E1B50+0x34) /* 09C588 8009B988 448A8000 */ mtc1 $t2, $f16 /* 09C58C 8009B98C 00290821 */ addu $at, $at, $t1 /* 09C590 8009B990 AC201B84 */ sw $zero, %lo(D_800E1B50+0x34)($at) diff --git a/asm/non_matchings/menu/menu_game_select_loop.s b/asm/non_matchings/menu/menu_game_select_loop.s deleted file mode 100644 index d3e9260f..00000000 --- a/asm/non_matchings/menu/menu_game_select_loop.s +++ /dev/null @@ -1,214 +0,0 @@ -glabel menu_game_select_loop -/* 08D3BC 8008C7BC 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 08D3C0 8008C7C0 AFBF0014 */ sw $ra, 0x14($sp) -/* 08D3C4 8008C7C4 0C02305A */ jal func_8008C168 -/* 08D3C8 8008C7C8 AFA40028 */ sw $a0, 0x28($sp) -/* 08D3CC 8008C7CC 3C038012 */ lui $v1, %hi(D_801263BC) # $v1, 0x8012 -/* 08D3D0 8008C7D0 246363BC */ addiu $v1, %lo(D_801263BC) # addiu $v1, $v1, 0x63bc -/* 08D3D4 8008C7D4 8FA40028 */ lw $a0, 0x28($sp) -/* 08D3D8 8008C7D8 8C6E0000 */ lw $t6, ($v1) -/* 08D3DC 8008C7DC 3C058012 */ lui $a1, %hi(D_801263D8) # $a1, 0x8012 -/* 08D3E0 8008C7E0 24A563D8 */ addiu $a1, %lo(D_801263D8) # addiu $a1, $a1, 0x63d8 -/* 08D3E4 8008C7E4 8CA20000 */ lw $v0, ($a1) -/* 08D3E8 8008C7E8 01C47821 */ addu $t7, $t6, $a0 -/* 08D3EC 8008C7EC 31F8003F */ andi $t8, $t7, 0x3f -/* 08D3F0 8008C7F0 1040000B */ beqz $v0, .L8008C820 -/* 08D3F4 8008C7F4 AC780000 */ sw $t8, ($v1) -/* 08D3F8 8008C7F8 24590001 */ addiu $t9, $v0, 1 -/* 08D3FC 8008C7FC 2B210003 */ slti $at, $t9, 3 -/* 08D400 8008C800 14200007 */ bnez $at, .L8008C820 -/* 08D404 8008C804 ACB90000 */ sw $t9, ($a1) -/* 08D408 8008C808 0C020A2E */ jal func_800828B8 -/* 08D40C 8008C80C AFA40028 */ sw $a0, 0x28($sp) -/* 08D410 8008C810 3C058012 */ lui $a1, %hi(D_801263D8) # $a1, 0x8012 -/* 08D414 8008C814 24A563D8 */ addiu $a1, %lo(D_801263D8) # addiu $a1, $a1, 0x63d8 -/* 08D418 8008C818 8FA40028 */ lw $a0, 0x28($sp) -/* 08D41C 8008C81C ACA00000 */ sw $zero, ($a1) -.L8008C820: -/* 08D420 8008C820 3C03800E */ lui $v1, %hi(gMenuDelay) # $v1, 0x800e -/* 08D424 8008C824 2463F47C */ addiu $v1, %lo(gMenuDelay) # addiu $v1, $v1, -0xb84 -/* 08D428 8008C828 8C620000 */ lw $v0, ($v1) -/* 08D42C 8008C82C 00000000 */ nop -/* 08D430 8008C830 1040000A */ beqz $v0, .L8008C85C -/* 08D434 8008C834 2841001F */ slti $at, $v0, 0x1f -/* 08D438 8008C838 04410005 */ bgez $v0, .L8008C850 -/* 08D43C 8008C83C 00445021 */ addu $t2, $v0, $a0 -/* 08D440 8008C840 00444823 */ subu $t1, $v0, $a0 -/* 08D444 8008C844 AC690000 */ sw $t1, ($v1) -/* 08D448 8008C848 10000003 */ b .L8008C858 -/* 08D44C 8008C84C 01201025 */ move $v0, $t1 -.L8008C850: -/* 08D450 8008C850 AC6A0000 */ sw $t2, ($v1) -/* 08D454 8008C854 01401025 */ move $v0, $t2 -.L8008C858: -/* 08D458 8008C858 2841001F */ slti $at, $v0, 0x1f -.L8008C85C: -/* 08D45C 8008C85C 14200023 */ bnez $at, .L8008C8EC -/* 08D460 8008C860 2841FFE2 */ slti $at, $v0, -0x1e -/* 08D464 8008C864 0C0232B3 */ jal func_8008CACC -/* 08D468 8008C868 00000000 */ nop -/* 08D46C 8008C86C 3C02800E */ lui $v0, %hi(D_800DF460) # $v0, 0x800e -/* 08D470 8008C870 3C0B8012 */ lui $t3, %hi(D_801263E0) # $t3, 0x8012 -/* 08D474 8008C874 8D6B63E0 */ lw $t3, %lo(D_801263E0)($t3) -/* 08D478 8008C878 8C42F460 */ lw $v0, %lo(D_800DF460)($v0) -/* 08D47C 8008C87C 3C01800E */ lui $at, %hi(gIsInAdventureTwo) # $at, 0x800e -/* 08D480 8008C880 1562000F */ bne $t3, $v0, .L8008C8C0 -/* 08D484 8008C884 00002025 */ move $a0, $zero -/* 08D488 8008C888 0C0002CA */ jal func_80000B28 -/* 08D48C 8008C88C 00000000 */ nop -/* 08D490 8008C890 240C0001 */ li $t4, 1 -/* 08D494 8008C894 3C01800E */ lui $at, %hi(gIsInAdventureTwo) # $at, 0x800e -/* 08D498 8008C898 0C01B96F */ jal func_8006E5BC -/* 08D49C 8008C89C AC2CF4B8 */ sw $t4, %lo(gIsInTracksMode)($at) -/* 08D4A0 8008C8A0 2404FFFF */ li $a0, -1 -/* 08D4A4 8008C8A4 2405FFFF */ li $a1, -1 -/* 08D4A8 8008C8A8 0C01B8BA */ jal load_level_for_menu -/* 08D4AC 8008C8AC 00003025 */ move $a2, $zero -/* 08D4B0 8008C8B0 0C0204F4 */ jal menu_init -/* 08D4B4 8008C8B4 2404000F */ li $a0, 15 -/* 08D4B8 8008C8B8 10000080 */ b .L8008CABC -/* 08D4BC 8008C8BC 00001025 */ move $v0, $zero -.L8008C8C0: -/* 08D4C0 8008C8C0 AC22F494 */ sw $v0, %lo(gIsInAdventureTwo)($at) -/* 08D4C4 8008C8C4 3C01800E */ lui $at, %hi(gIsInTracksMode) # $at, 0x800e -/* 08D4C8 8008C8C8 AC20F4B8 */ sw $zero, %lo(gIsInTracksMode)($at) -/* 08D4CC 8008C8CC 3C018012 */ lui $at, %hi(gPlayerSelectVehicle) # $at, 0x8012 -/* 08D4D0 8008C8D0 0C01B6C5 */ jal func_8006DB14 -/* 08D4D4 8008C8D4 A02069C0 */ sb $zero, %lo(gPlayerSelectVehicle)($at) -/* 08D4D8 8008C8D8 0C0204F4 */ jal menu_init -/* 08D4DC 8008C8DC 24040006 */ li $a0, 6 -/* 08D4E0 8008C8E0 10000076 */ b .L8008CABC -/* 08D4E4 8008C8E4 00001025 */ move $v0, $zero -/* 08D4E8 8008C8E8 2841FFE2 */ slti $at, $v0, -0x1e -.L8008C8EC: -/* 08D4EC 8008C8EC 10200019 */ beqz $at, .L8008C954 -/* 08D4F0 8008C8F0 00000000 */ nop -/* 08D4F4 8008C8F4 0C0232B3 */ jal func_8008CACC -/* 08D4F8 8008C8F8 00000000 */ nop -/* 08D4FC 8008C8FC 0C027B34 */ jal is_drumstick_unlocked -/* 08D500 8008C900 AFA0001C */ sw $zero, 0x1c($sp) -/* 08D504 8008C904 8FA6001C */ lw $a2, 0x1c($sp) -/* 08D508 8008C908 10400002 */ beqz $v0, .L8008C914 -/* 08D50C 8008C90C 00000000 */ nop -/* 08D510 8008C910 24060001 */ li $a2, 1 -.L8008C914: -/* 08D514 8008C914 0C027B2E */ jal is_tt_unlocked -/* 08D518 8008C918 AFA6001C */ sw $a2, 0x1c($sp) -/* 08D51C 8008C91C 8FA6001C */ lw $a2, 0x1c($sp) -/* 08D520 8008C920 10400003 */ beqz $v0, .L8008C930 -/* 08D524 8008C924 24040016 */ li $a0, 22 -/* 08D528 8008C928 38CD0003 */ xori $t5, $a2, 3 -/* 08D52C 8008C92C 01A03025 */ move $a2, $t5 -.L8008C930: -/* 08D530 8008C930 0C01B8BA */ jal load_level_for_menu -/* 08D534 8008C934 2405FFFF */ li $a1, -1 -/* 08D538 8008C938 00002025 */ move $a0, $zero -/* 08D53C 8008C93C 0C022BAD */ jal func_8008AEB4 -/* 08D540 8008C940 00002825 */ move $a1, $zero -/* 08D544 8008C944 0C0204F4 */ jal menu_init -/* 08D548 8008C948 24040003 */ li $a0, 3 -/* 08D54C 8008C94C 1000005B */ b .L8008CABC -/* 08D550 8008C950 00001025 */ move $v0, $zero -.L8008C954: -/* 08D554 8008C954 0C0231A6 */ jal func_8008C698 -/* 08D558 8008C958 00000000 */ nop -/* 08D55C 8008C95C 3C0E800E */ lui $t6, %hi(gMenuDelay) # $t6, 0x800e -/* 08D560 8008C960 8DCEF47C */ lw $t6, %lo(gMenuDelay)($t6) -/* 08D564 8008C964 3C058012 */ lui $a1, %hi(D_801263D8) # $a1, 0x8012 -/* 08D568 8008C968 15C00051 */ bnez $t6, .L8008CAB0 -/* 08D56C 8008C96C 24A563D8 */ addiu $a1, %lo(D_801263D8) # addiu $a1, $a1, 0x63d8 -/* 08D570 8008C970 8CAF0000 */ lw $t7, ($a1) -/* 08D574 8008C974 00000000 */ nop -/* 08D578 8008C978 15E0004D */ bnez $t7, .L8008CAB0 -/* 08D57C 8008C97C 00000000 */ nop -/* 08D580 8008C980 0C01A955 */ jal get_buttons_pressed_from_player -/* 08D584 8008C984 00002025 */ move $a0, $zero -/* 08D588 8008C988 3C18800E */ lui $t8, %hi(gNumberOfActivePlayers) # $t8, 0x800e -/* 08D58C 8008C98C 8F18F4BC */ lw $t8, %lo(gNumberOfActivePlayers)($t8) -/* 08D590 8008C990 3C068012 */ lui $a2, %hi(gControllersYAxisDirection) # $a2, 0x8012 -/* 08D594 8008C994 80C66464 */ lb $a2, %lo(gControllersYAxisDirection)($a2) -/* 08D598 8008C998 24010002 */ li $at, 2 -/* 08D59C 8008C99C 1701000B */ bne $t8, $at, .L8008C9CC -/* 08D5A0 8008C9A0 00401825 */ move $v1, $v0 -/* 08D5A4 8008C9A4 24040001 */ li $a0, 1 -/* 08D5A8 8008C9A8 AFA20024 */ sw $v0, 0x24($sp) -/* 08D5AC 8008C9AC 0C01A955 */ jal get_buttons_pressed_from_player -/* 08D5B0 8008C9B0 AFA60020 */ sw $a2, 0x20($sp) -/* 08D5B4 8008C9B4 3C198012 */ lui $t9, %hi(gControllersYAxisDirection+1) # $t9, 0x8012 -/* 08D5B8 8008C9B8 8FA30024 */ lw $v1, 0x24($sp) -/* 08D5BC 8008C9BC 8FA60020 */ lw $a2, 0x20($sp) -/* 08D5C0 8008C9C0 83396465 */ lb $t9, %lo(gControllersYAxisDirection+1)($t9) -/* 08D5C4 8008C9C4 00621825 */ or $v1, $v1, $v0 -/* 08D5C8 8008C9C8 00D93021 */ addu $a2, $a2, $t9 -.L8008C9CC: -/* 08D5CC 8008C9CC 30689000 */ andi $t0, $v1, 0x9000 -/* 08D5D0 8008C9D0 11000015 */ beqz $t0, .L8008CA28 -/* 08D5D4 8008C9D4 306C4000 */ andi $t4, $v1, 0x4000 -/* 08D5D8 8008C9D8 3C098012 */ lui $t1, %hi(D_801263E0) # $t1, 0x8012 -/* 08D5DC 8008C9DC 3C0A800E */ lui $t2, %hi(D_800DF460) # $t2, 0x800e -/* 08D5E0 8008C9E0 8D4AF460 */ lw $t2, %lo(D_800DF460)($t2) -/* 08D5E4 8008C9E4 8D2963E0 */ lw $t1, %lo(D_801263E0)($t1) -/* 08D5E8 8008C9E8 00000000 */ nop -/* 08D5EC 8008C9EC 152A0003 */ bne $t1, $t2, .L8008C9FC -/* 08D5F0 8008C9F0 00000000 */ nop -/* 08D5F4 8008C9F4 0C000326 */ jal set_music_fade_timer -/* 08D5F8 8008C9F8 2404FF80 */ li $a0, -128 -.L8008C9FC: -/* 08D5FC 8008C9FC 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e -/* 08D600 8008CA00 0C030076 */ jal func_800C01D8 -/* 08D604 8008CA04 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c -/* 08D608 8008CA08 240B0001 */ li $t3, 1 -/* 08D60C 8008CA0C 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 08D610 8008CA10 AC2BF47C */ sw $t3, %lo(gMenuDelay)($at) -/* 08D614 8008CA14 240400EF */ li $a0, 239 -/* 08D618 8008CA18 0C000741 */ jal func_80001D04 -/* 08D61C 8008CA1C 00002825 */ move $a1, $zero -/* 08D620 8008CA20 10000023 */ b .L8008CAB0 -/* 08D624 8008CA24 00000000 */ nop -.L8008CA28: -/* 08D628 8008CA28 11800007 */ beqz $t4, .L8008CA48 -/* 08D62C 8008CA2C 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e -/* 08D630 8008CA30 0C030076 */ jal func_800C01D8 -/* 08D634 8008CA34 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c -/* 08D638 8008CA38 240DFFFF */ li $t5, -1 -/* 08D63C 8008CA3C 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 08D640 8008CA40 1000001B */ b .L8008CAB0 -/* 08D644 8008CA44 AC2DF47C */ sw $t5, %lo(gMenuDelay)($at) -.L8008CA48: -/* 08D648 8008CA48 04C1000F */ bgez $a2, .L8008CA88 -/* 08D64C 8008CA4C 3C03800E */ lui $v1, %hi(D_800DF460) # $v1, 0x800e -/* 08D650 8008CA50 2463F460 */ addiu $v1, %lo(D_800DF460) # addiu $v1, $v1, -0xba0 -/* 08D654 8008CA54 3C0E8012 */ lui $t6, %hi(D_801263E0) # $t6, 0x8012 -/* 08D658 8008CA58 8DCE63E0 */ lw $t6, %lo(D_801263E0)($t6) -/* 08D65C 8008CA5C 8C620000 */ lw $v0, ($v1) -/* 08D660 8008CA60 240400EB */ li $a0, 235 -/* 08D664 8008CA64 004E082A */ slt $at, $v0, $t6 -/* 08D668 8008CA68 10200007 */ beqz $at, .L8008CA88 -/* 08D66C 8008CA6C 244F0001 */ addiu $t7, $v0, 1 -/* 08D670 8008CA70 AC6F0000 */ sw $t7, ($v1) -/* 08D674 8008CA74 00002825 */ move $a1, $zero -/* 08D678 8008CA78 0C000741 */ jal func_80001D04 -/* 08D67C 8008CA7C AFA60020 */ sw $a2, 0x20($sp) -/* 08D680 8008CA80 8FA60020 */ lw $a2, 0x20($sp) -/* 08D684 8008CA84 00000000 */ nop -.L8008CA88: -/* 08D688 8008CA88 3C03800E */ lui $v1, %hi(D_800DF460) # $v1, 0x800e -/* 08D68C 8008CA8C 18C00008 */ blez $a2, .L8008CAB0 -/* 08D690 8008CA90 2463F460 */ addiu $v1, %lo(D_800DF460) # addiu $v1, $v1, -0xba0 -/* 08D694 8008CA94 8C620000 */ lw $v0, ($v1) -/* 08D698 8008CA98 240400EB */ li $a0, 235 -/* 08D69C 8008CA9C 18400004 */ blez $v0, .L8008CAB0 -/* 08D6A0 8008CAA0 2458FFFF */ addiu $t8, $v0, -1 -/* 08D6A4 8008CAA4 AC780000 */ sw $t8, ($v1) -/* 08D6A8 8008CAA8 0C000741 */ jal func_80001D04 -/* 08D6AC 8008CAAC 00002825 */ move $a1, $zero -.L8008CAB0: -/* 08D6B0 8008CAB0 3C018012 */ lui $at, %hi(gIgnorePlayerInput) # $at, 0x8012 -/* 08D6B4 8008CAB4 AC2063C4 */ sw $zero, %lo(gIgnorePlayerInput)($at) -/* 08D6B8 8008CAB8 00001025 */ move $v0, $zero -.L8008CABC: -/* 08D6BC 8008CABC 8FBF0014 */ lw $ra, 0x14($sp) -/* 08D6C0 8008CAC0 27BD0028 */ addiu $sp, $sp, 0x28 -/* 08D6C4 8008CAC4 03E00008 */ jr $ra -/* 08D6C8 8008CAC8 00000000 */ nop - diff --git a/asm/non_matchings/menu/menu_options_loop.s b/asm/non_matchings/menu/menu_options_loop.s index 76f449b5..daa7b7a9 100644 --- a/asm/non_matchings/menu/menu_options_loop.s +++ b/asm/non_matchings/menu/menu_options_loop.s @@ -147,8 +147,8 @@ glabel menu_options_loop /* 085174 80084574 14410028 */ bne $v0, $at, .L80084618 /* 085178 80084578 00000000 */ nop /* 08517C 8008457C 10E00026 */ beqz $a3, .L80084618 -/* 085180 80084580 3C0F8012 */ lui $t7, %hi(D_80126448+4) # $t7, 0x8012 -/* 085184 80084584 8DEF644C */ lw $t7, %lo(D_80126448+4)($t7) +/* 085180 80084580 3C0F8012 */ lui $t7, %hi(sEepromSettings+4) # $t7, 0x8012 +/* 085184 80084584 8DEF644C */ lw $t7, %lo(sEepromSettings+4)($t7) /* 085188 80084588 3C010200 */ lui $at, 0x200 /* 08518C 8008458C 01E1C824 */ and $t9, $t7, $at /* 085190 80084590 1320000F */ beqz $t9, .L800845D0 @@ -157,7 +157,7 @@ glabel menu_options_loop /* 08519C 8008459C 0C000741 */ jal func_80001D04 /* 0851A0 800845A0 00002825 */ move $a1, $zero /* 0851A4 800845A4 24040000 */ li $a0, 0 -/* 0851A8 800845A8 0C027AAF */ jal func_8009EABC +/* 0851A8 800845A8 0C027AAF */ jal unset_eeprom_settings_value /* 0851AC 800845AC 3C050200 */ lui $a1, 0x200 /* 0851B0 800845B0 0C030ABD */ jal func_800C2AF4 /* 0851B4 800845B4 00002025 */ move $a0, $zero @@ -171,7 +171,7 @@ glabel menu_options_loop /* 0851D0 800845D0 0C000741 */ jal func_80001D04 /* 0851D4 800845D4 00002825 */ move $a1, $zero /* 0851D8 800845D8 24040000 */ li $a0, 0 -/* 0851DC 800845DC 0C027A9E */ jal func_8009EA78 +/* 0851DC 800845DC 0C027A9E */ jal set_eeprom_settings_value /* 0851E0 800845E0 3C050200 */ lui $a1, 0x200 /* 0851E4 800845E4 0C030ABD */ jal func_800C2AF4 /* 0851E8 800845E8 24040001 */ li $a0, 1 diff --git a/asm/non_matchings/menu/randomize_ai_racer_slots.s b/asm/non_matchings/menu/randomise_ai_racer_slots.s similarity index 99% rename from asm/non_matchings/menu/randomize_ai_racer_slots.s rename to asm/non_matchings/menu/randomise_ai_racer_slots.s index db9e1802..2a486db6 100644 --- a/asm/non_matchings/menu/randomize_ai_racer_slots.s +++ b/asm/non_matchings/menu/randomise_ai_racer_slots.s @@ -1,4 +1,4 @@ -glabel randomize_ai_racer_slots +glabel randomise_ai_racer_slots /* 08C73C 8008BB3C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 08C740 8008BB40 AFBF0034 */ sw $ra, 0x34($sp) /* 08C744 8008BB44 AFB60030 */ sw $s6, 0x30($sp) diff --git a/asm/non_matchings/menu/render_file_select_menu.s b/asm/non_matchings/menu/render_file_select_menu.s index 90bc01d5..43a4173d 100644 --- a/asm/non_matchings/menu/render_file_select_menu.s +++ b/asm/non_matchings/menu/render_file_select_menu.s @@ -84,7 +84,7 @@ glabel render_file_select_menu /* 08DAA8 8008CEA8 00002025 */ move $a0, $zero /* 08DAAC 8008CEAC 00002825 */ move $a1, $zero /* 08DAB0 8008CEB0 00003025 */ move $a2, $zero -/* 08DAB4 8008CEB4 0C0310F3 */ jal set_text_background_color +/* 08DAB4 8008CEB4 0C0310F3 */ jal set_text_background_colour /* 08DAB8 8008CEB8 00003825 */ move $a3, $zero /* 08DABC 8008CEBC 3C118012 */ lui $s1, %hi(gSavefileInfo) # $s1, 0x8012 /* 08DAC0 8008CEC0 3C10800E */ lui $s0, %hi(D_800E03CC) # $s0, 0x800e @@ -215,7 +215,7 @@ glabel render_file_select_menu /* 08DC98 8008D098 240D00FF */ li $t5, 255 /* 08DC9C 8008D09C AFAD0010 */ sw $t5, 0x10($sp) /* 08DCA0 8008D0A0 240600FF */ li $a2, 255 -/* 08DCA4 8008D0A4 0C0310E1 */ jal set_text_color +/* 08DCA4 8008D0A4 0C0310E1 */ jal set_text_colour /* 08DCA8 8008D0A8 24070040 */ li $a3, 64 /* 08DCAC 8008D0AC 3C09800E */ lui $t1, %hi(gMenuText) # $t1, 0x800e /* 08DCB0 8008D0B0 8D29F4A0 */ lw $t1, %lo(gMenuText)($t1) @@ -255,14 +255,14 @@ glabel render_file_select_menu /* 08DD2C 8008D12C 00002025 */ move $a0, $zero /* 08DD30 8008D130 00002825 */ move $a1, $zero /* 08DD34 8008D134 00003025 */ move $a2, $zero -/* 08DD38 8008D138 0C0310F3 */ jal set_text_background_color +/* 08DD38 8008D138 0C0310F3 */ jal set_text_background_colour /* 08DD3C 8008D13C 00003825 */ move $a3, $zero /* 08DD40 8008D140 240E00FF */ li $t6, 255 /* 08DD44 8008D144 AFAE0010 */ sw $t6, 0x10($sp) /* 08DD48 8008D148 240400FF */ li $a0, 255 /* 08DD4C 8008D14C 240500FF */ li $a1, 255 /* 08DD50 8008D150 240600FF */ li $a2, 255 -/* 08DD54 8008D154 0C0310E1 */ jal set_text_color +/* 08DD54 8008D154 0C0310E1 */ jal set_text_colour /* 08DD58 8008D158 00003825 */ move $a3, $zero /* 08DD5C 8008D15C 00009825 */ move $s3, $zero /* 08DD60 8008D160 27B50064 */ addiu $s5, $sp, 0x64 @@ -395,7 +395,7 @@ glabel render_file_select_menu /* 08DF38 8008D338 00002025 */ move $a0, $zero /* 08DF3C 8008D33C 00002825 */ move $a1, $zero /* 08DF40 8008D340 00003025 */ move $a2, $zero -/* 08DF44 8008D344 0C0310E1 */ jal set_text_color +/* 08DF44 8008D344 0C0310E1 */ jal set_text_colour /* 08DF48 8008D348 240700FF */ li $a3, 255 /* 08DF4C 8008D34C 3C0E800E */ lui $t6, %hi(gMenuText) # $t6, 0x800e /* 08DF50 8008D350 8DCEF4A0 */ lw $t6, %lo(gMenuText)($t6) @@ -411,7 +411,7 @@ glabel render_file_select_menu /* 08DF78 8008D378 240400FF */ li $a0, 255 /* 08DF7C 8008D37C 240500FF */ li $a1, 255 /* 08DF80 8008D380 240600FF */ li $a2, 255 -/* 08DF84 8008D384 0C0310E1 */ jal set_text_color +/* 08DF84 8008D384 0C0310E1 */ jal set_text_colour /* 08DF88 8008D388 00003825 */ move $a3, $zero /* 08DF8C 8008D38C 3C19800E */ lui $t9, %hi(gMenuText) # $t9, 0x800e /* 08DF90 8008D390 8F39F4A0 */ lw $t9, %lo(gMenuText)($t9) @@ -427,7 +427,7 @@ glabel render_file_select_menu /* 08DFB8 8008D3B8 240400FF */ li $a0, 255 /* 08DFBC 8008D3BC 240500FF */ li $a1, 255 /* 08DFC0 8008D3C0 240600FF */ li $a2, 255 -/* 08DFC4 8008D3C4 0C0310E1 */ jal set_text_color +/* 08DFC4 8008D3C4 0C0310E1 */ jal set_text_colour /* 08DFC8 8008D3C8 00003825 */ move $a3, $zero /* 08DFCC 8008D3CC 3C0A8012 */ lui $t2, %hi(D_80126484) # $t2, 0x8012 /* 08DFD0 8008D3D0 8D4A6484 */ lw $t2, %lo(D_80126484)($t2) @@ -522,7 +522,7 @@ glabel render_file_select_menu /* 08E120 8008D520 240D00FF */ li $t5, 255 /* 08E124 8008D524 AFAD0010 */ sw $t5, 0x10($sp) /* 08E128 8008D528 240500FF */ li $a1, 255 -/* 08E12C 8008D52C 0C0310E1 */ jal set_text_color +/* 08E12C 8008D52C 0C0310E1 */ jal set_text_colour /* 08E130 8008D530 240600FF */ li $a2, 255 .L8008D534: /* 08E134 8008D534 3C0E800E */ lui $t6, %hi(gMenuText) # $t6, 0x800e @@ -544,7 +544,7 @@ glabel render_file_select_menu /* 08E174 8008D574 AFB90010 */ sw $t9, 0x10($sp) /* 08E178 8008D578 240400FF */ li $a0, 255 /* 08E17C 8008D57C 240500FF */ li $a1, 255 -/* 08E180 8008D580 0C0310E1 */ jal set_text_color +/* 08E180 8008D580 0C0310E1 */ jal set_text_colour /* 08E184 8008D584 240600FF */ li $a2, 255 /* 08E188 8008D588 10000007 */ b .L8008D5A8 /* 08E18C 8008D58C 00000000 */ nop @@ -553,7 +553,7 @@ glabel render_file_select_menu /* 08E194 8008D594 AFA80010 */ sw $t0, 0x10($sp) /* 08E198 8008D598 240500FF */ li $a1, 255 /* 08E19C 8008D59C 240600FF */ li $a2, 255 -/* 08E1A0 8008D5A0 0C0310E1 */ jal set_text_color +/* 08E1A0 8008D5A0 0C0310E1 */ jal set_text_colour /* 08E1A4 8008D5A4 00003825 */ move $a3, $zero .L8008D5A8: /* 08E1A8 8008D5A8 3C09800E */ lui $t1, %hi(gMenuText) # $t1, 0x800e diff --git a/asm/non_matchings/menu/render_magic_codes_list_menu_text.s b/asm/non_matchings/menu/render_magic_codes_list_menu_text.s index c8439aae..7f755f03 100644 --- a/asm/non_matchings/menu/render_magic_codes_list_menu_text.s +++ b/asm/non_matchings/menu/render_magic_codes_list_menu_text.s @@ -14,7 +14,7 @@ glabel render_magic_codes_list_menu_text /* 08B19C 8008A59C 00002025 */ move $a0, $zero /* 08B1A0 8008A5A0 00002825 */ move $a1, $zero /* 08B1A4 8008A5A4 00003025 */ move $a2, $zero -/* 08B1A8 8008A5A8 0C0310F3 */ jal set_text_background_color +/* 08B1A8 8008A5A8 0C0310F3 */ jal set_text_background_colour /* 08B1AC 8008A5AC 00003825 */ move $a3, $zero /* 08B1B0 8008A5B0 0C0310BB */ jal set_text_font /* 08B1B4 8008A5B4 24040002 */ li $a0, 2 @@ -23,7 +23,7 @@ glabel render_magic_codes_list_menu_text /* 08B1C0 8008A5C0 00002025 */ move $a0, $zero /* 08B1C4 8008A5C4 00002825 */ move $a1, $zero /* 08B1C8 8008A5C8 00003025 */ move $a2, $zero -/* 08B1CC 8008A5CC 0C0310E1 */ jal set_text_color +/* 08B1CC 8008A5CC 0C0310E1 */ jal set_text_colour /* 08B1D0 8008A5D0 240700FF */ li $a3, 255 /* 08B1D4 8008A5D4 3C17800E */ lui $s7, %hi(gMenuText) # $s7, 0x800e /* 08B1D8 8008A5D8 26F7F4A0 */ addiu $s7, %lo(gMenuText) # addiu $s7, $s7, -0xb60 @@ -42,7 +42,7 @@ glabel render_magic_codes_list_menu_text /* 08B20C 8008A60C 240400FF */ li $a0, 255 /* 08B210 8008A610 240500FF */ li $a1, 255 /* 08B214 8008A614 240600FF */ li $a2, 255 -/* 08B218 8008A618 0C0310E1 */ jal set_text_color +/* 08B218 8008A618 0C0310E1 */ jal set_text_colour /* 08B21C 8008A61C 00003825 */ move $a3, $zero /* 08B220 8008A620 8EE80000 */ lw $t0, ($s7) /* 08B224 8008A624 2409000C */ li $t1, 12 @@ -89,7 +89,7 @@ glabel render_magic_codes_list_menu_text /* 08B2BC 8008A6BC 240400FF */ li $a0, 255 /* 08B2C0 8008A6C0 240500FF */ li $a1, 255 /* 08B2C4 8008A6C4 240600FF */ li $a2, 255 -/* 08B2C8 8008A6C8 0C0310E1 */ jal set_text_color +/* 08B2C8 8008A6C8 0C0310E1 */ jal set_text_colour /* 08B2CC 8008A6CC 00003825 */ move $a3, $zero /* 08B2D0 8008A6D0 3C038012 */ lui $v1, %hi(D_801263E0) # $v1, 0x8012 /* 08B2D4 8008A6D4 3C198012 */ lui $t9, %hi(D_80126C70) # $t9, 0x8012 @@ -118,7 +118,7 @@ glabel render_magic_codes_list_menu_text /* 08B32C 8008A72C 240B00FF */ li $t3, 255 /* 08B330 8008A730 AFAB0010 */ sw $t3, 0x10($sp) /* 08B334 8008A734 240600FF */ li $a2, 255 -/* 08B338 8008A738 0C0310E1 */ jal set_text_color +/* 08B338 8008A738 0C0310E1 */ jal set_text_colour /* 08B33C 8008A73C 03C03825 */ move $a3, $fp .L8008A740: /* 08B340 8008A740 862D0000 */ lh $t5, ($s1) @@ -165,7 +165,7 @@ glabel render_magic_codes_list_menu_text /* 08B3DC 8008A7DC 241800FF */ li $t8, 255 /* 08B3E0 8008A7E0 AFB80010 */ sw $t8, 0x10($sp) /* 08B3E4 8008A7E4 240600FF */ li $a2, 255 -/* 08B3E8 8008A7E8 0C0310E1 */ jal set_text_color +/* 08B3E8 8008A7E8 0C0310E1 */ jal set_text_colour /* 08B3EC 8008A7EC 00003825 */ move $a3, $zero .L8008A7F0: /* 08B3F0 8008A7F0 3C198012 */ lui $t9, %hi(D_801263E0) # $t9, 0x8012 @@ -193,7 +193,7 @@ glabel render_magic_codes_list_menu_text /* 08B444 8008A844 240A00FF */ li $t2, 255 /* 08B448 8008A848 AFAA0010 */ sw $t2, 0x10($sp) /* 08B44C 8008A84C 240600FF */ li $a2, 255 -/* 08B450 8008A850 0C0310E1 */ jal set_text_color +/* 08B450 8008A850 0C0310E1 */ jal set_text_colour /* 08B454 8008A854 03C03825 */ move $a3, $fp .L8008A858: /* 08B458 8008A858 8EEB0000 */ lw $t3, ($s7) diff --git a/asm/non_matchings/menu/render_magic_codes_ui.s b/asm/non_matchings/menu/render_magic_codes_ui.s index 40be4168..d47062c7 100644 --- a/asm/non_matchings/menu/render_magic_codes_ui.s +++ b/asm/non_matchings/menu/render_magic_codes_ui.s @@ -14,7 +14,7 @@ glabel render_magic_codes_ui /* 08A2D4 800896D4 00002025 */ move $a0, $zero /* 08A2D8 800896D8 00002825 */ move $a1, $zero /* 08A2DC 800896DC 00003025 */ move $a2, $zero -/* 08A2E0 800896E0 0C0310F3 */ jal set_text_background_color +/* 08A2E0 800896E0 0C0310F3 */ jal set_text_background_colour /* 08A2E4 800896E4 00003825 */ move $a3, $zero /* 08A2E8 800896E8 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 /* 08A2EC 800896EC 248463A0 */ addiu $a0, %lo(D_801263A0) # addiu $a0, $a0, 0x63a0 @@ -29,7 +29,7 @@ glabel render_magic_codes_ui /* 08A310 80089710 00002025 */ move $a0, $zero /* 08A314 80089714 00002825 */ move $a1, $zero /* 08A318 80089718 00003025 */ move $a2, $zero -/* 08A31C 8008971C 0C0310E1 */ jal set_text_color +/* 08A31C 8008971C 0C0310E1 */ jal set_text_colour /* 08A320 80089720 240700FF */ li $a3, 255 /* 08A324 80089724 3C0F800E */ lui $t7, %hi(gMenuText) # $t7, 0x800e /* 08A328 80089728 8DEFF4A0 */ lw $t7, %lo(gMenuText)($t7) @@ -46,7 +46,7 @@ glabel render_magic_codes_ui /* 08A354 80089754 240400FF */ li $a0, 255 /* 08A358 80089758 240500FF */ li $a1, 255 /* 08A35C 8008975C 240600FF */ li $a2, 255 -/* 08A360 80089760 0C0310E1 */ jal set_text_color +/* 08A360 80089760 0C0310E1 */ jal set_text_colour /* 08A364 80089764 00003825 */ move $a3, $zero /* 08A368 80089768 3C09800E */ lui $t1, %hi(gMenuText) # $t1, 0x800e /* 08A36C 8008976C 8D29F4A0 */ lw $t1, %lo(gMenuText)($t1) @@ -66,7 +66,7 @@ glabel render_magic_codes_ui /* 08A3A4 800897A4 240400FF */ li $a0, 255 /* 08A3A8 800897A8 240500FF */ li $a1, 255 /* 08A3AC 800897AC 240600FF */ li $a2, 255 -/* 08A3B0 800897B0 0C0310E1 */ jal set_text_color +/* 08A3B0 800897B0 0C0310E1 */ jal set_text_colour /* 08A3B4 800897B4 00003825 */ move $a3, $zero /* 08A3B8 800897B8 3C168012 */ lui $s6, %hi(gCheatInputCurrentRow) # $s6, 0x8012 /* 08A3BC 800897BC 3C158012 */ lui $s5, %hi(gCheatInputCurrentColumn) # $s5, 0x8012 @@ -105,7 +105,7 @@ glabel render_magic_codes_ui /* 08A434 80089834 240900FF */ li $t1, 255 /* 08A438 80089838 27270080 */ addiu $a3, $t9, 0x80 /* 08A43C 8008983C AFA90010 */ sw $t1, 0x10($sp) -/* 08A440 80089840 0C0310E1 */ jal set_text_color +/* 08A440 80089840 0C0310E1 */ jal set_text_colour /* 08A444 80089844 240600C0 */ li $a2, 192 .L80089848: /* 08A448 80089848 2A61005B */ slti $at, $s3, 0x5b @@ -163,7 +163,7 @@ glabel render_magic_codes_ui /* 08A508 80089908 241800FF */ li $t8, 255 /* 08A50C 8008990C AFB80010 */ sw $t8, 0x10($sp) /* 08A510 80089910 240600FF */ li $a2, 255 -/* 08A514 80089914 0C0310E1 */ jal set_text_color +/* 08A514 80089914 0C0310E1 */ jal set_text_colour /* 08A518 80089918 00003825 */ move $a3, $zero .L8008991C: /* 08A51C 8008991C 26730001 */ addiu $s3, $s3, 1 @@ -224,7 +224,7 @@ glabel render_magic_codes_ui /* 08A5E4 800899E4 AFB90010 */ sw $t9, 0x10($sp) /* 08A5E8 800899E8 240500FF */ li $a1, 255 /* 08A5EC 800899EC 240600FF */ li $a2, 255 -/* 08A5F0 800899F0 0C0310E1 */ jal set_text_color +/* 08A5F0 800899F0 0C0310E1 */ jal set_text_colour /* 08A5F4 800899F4 02003825 */ move $a3, $s0 /* 08A5F8 800899F8 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 /* 08A5FC 800899FC 8E270000 */ lw $a3, ($s1) @@ -249,12 +249,12 @@ glabel render_magic_codes_ui /* 08A644 80089A44 240400FF */ li $a0, 255 /* 08A648 80089A48 240500FF */ li $a1, 255 /* 08A64C 80089A4C 24060080 */ li $a2, 128 -/* 08A650 80089A50 0C0310E1 */ jal set_text_color +/* 08A650 80089A50 0C0310E1 */ jal set_text_colour /* 08A654 80089A54 24070080 */ li $a3, 128 /* 08A658 80089A58 00002025 */ move $a0, $zero /* 08A65C 80089A5C 00002825 */ move $a1, $zero /* 08A660 80089A60 24060080 */ li $a2, 128 -/* 08A664 80089A64 0C0310F3 */ jal set_text_background_color +/* 08A664 80089A64 0C0310F3 */ jal set_text_background_colour /* 08A668 80089A68 24070080 */ li $a3, 128 /* 08A66C 80089A6C 3C028012 */ lui $v0, %hi(gOptionsMenuItemIndex) # $v0, 0x8012 /* 08A670 80089A70 84426C46 */ lh $v0, %lo(gOptionsMenuItemIndex)($v0) diff --git a/asm/non_matchings/menu/render_track_select_setup_ui.s b/asm/non_matchings/menu/render_track_select_setup_ui.s index 430154f4..f2ef20ad 100644 --- a/asm/non_matchings/menu/render_track_select_setup_ui.s +++ b/asm/non_matchings/menu/render_track_select_setup_ui.s @@ -144,12 +144,12 @@ glabel render_track_select_setup_ui /* 091D2C 8009112C 240500C0 */ li $a1, 192 /* 091D30 80091130 240600FF */ li $a2, 255 /* 091D34 80091134 00003825 */ move $a3, $zero -/* 091D38 80091138 0C0310E1 */ jal set_text_color +/* 091D38 80091138 0C0310E1 */ jal set_text_colour /* 091D3C 8009113C AFAB0010 */ sw $t3, 0x10($sp) /* 091D40 80091140 00002025 */ move $a0, $zero /* 091D44 80091144 00002825 */ move $a1, $zero /* 091D48 80091148 00003025 */ move $a2, $zero -/* 091D4C 8009114C 0C0310F3 */ jal set_text_background_color +/* 091D4C 8009114C 0C0310F3 */ jal set_text_background_colour /* 091D50 80091150 00003825 */ move $a3, $zero /* 091D54 80091154 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 /* 091D58 80091158 240C000C */ li $t4, 12 @@ -267,7 +267,7 @@ glabel render_track_select_setup_ui /* 091EFC 800912FC AFAC0010 */ sw $t4, 0x10($sp) /* 091F00 80091300 00002825 */ move $a1, $zero /* 091F04 80091304 00003025 */ move $a2, $zero -/* 091F08 80091308 0C0310E1 */ jal set_text_color +/* 091F08 80091308 0C0310E1 */ jal set_text_colour /* 091F0C 8009130C 240700FF */ li $a3, 255 /* 091F10 80091310 1000000C */ b .L80091344 /* 091F14 80091314 00000000 */ nop @@ -282,7 +282,7 @@ glabel render_track_select_setup_ui /* 091F30 80091330 8FCE0000 */ lw $t6, ($fp) /* 091F34 80091334 240600FF */ li $a2, 255 /* 091F38 80091338 02A03825 */ move $a3, $s5 -/* 091F3C 8009133C 0C0310E1 */ jal set_text_color +/* 091F3C 8009133C 0C0310E1 */ jal set_text_colour /* 091F40 80091340 AFAE0010 */ sw $t6, 0x10($sp) .L80091344: /* 091F44 80091344 3C0F800E */ lui $t7, %hi(gMenuText) # $t7, 0x800e @@ -319,7 +319,7 @@ glabel render_track_select_setup_ui /* 091FBC 800913BC 24050040 */ li $a1, 64 /* 091FC0 800913C0 24060040 */ li $a2, 64 /* 091FC4 800913C4 24070060 */ li $a3, 96 -/* 091FC8 800913C8 0C0310E1 */ jal set_text_color +/* 091FC8 800913C8 0C0310E1 */ jal set_text_colour /* 091FCC 800913CC AFAA0010 */ sw $t2, 0x10($sp) /* 091FD0 800913D0 3C09800E */ lui $t1, %hi(gMenuText) # $t1, 0x800e /* 091FD4 800913D4 8D29F4A0 */ lw $t1, %lo(gMenuText)($t1) @@ -350,7 +350,7 @@ glabel render_track_select_setup_ui /* 092038 80091438 24050080 */ li $a1, 128 /* 09203C 8009143C 240600FF */ li $a2, 255 /* 092040 80091440 24070060 */ li $a3, 96 -/* 092044 80091444 0C0310E1 */ jal set_text_color +/* 092044 80091444 0C0310E1 */ jal set_text_colour /* 092048 80091448 AFAE0010 */ sw $t6, 0x10($sp) /* 09204C 8009144C 3C188012 */ lui $t8, %hi(gPlayerSelectVehicle) # $t8, 0x8012 /* 092050 80091450 831869C0 */ lb $t8, %lo(gPlayerSelectVehicle)($t8) @@ -964,7 +964,7 @@ glabel render_track_select_setup_ui /* 092950 80091D50 00002025 */ move $a0, $zero /* 092954 80091D54 00002825 */ move $a1, $zero /* 092958 80091D58 00003025 */ move $a2, $zero -/* 09295C 80091D5C 0C0310E1 */ jal set_text_color +/* 09295C 80091D5C 0C0310E1 */ jal set_text_colour /* 092960 80091D60 240700FF */ li $a3, 255 /* 092964 80091D64 864F000E */ lh $t7, 0xe($s2) /* 092968 80091D68 864E0002 */ lh $t6, 2($s2) @@ -989,7 +989,7 @@ glabel render_track_select_setup_ui /* 0929B4 80091DB4 240400FF */ li $a0, 255 /* 0929B8 80091DB8 240500FF */ li $a1, 255 /* 0929BC 80091DBC 240600FF */ li $a2, 255 -/* 0929C0 80091DC0 0C0310E1 */ jal set_text_color +/* 0929C0 80091DC0 0C0310E1 */ jal set_text_colour /* 0929C4 80091DC4 00003825 */ move $a3, $zero /* 0929C8 80091DC8 8658000E */ lh $t8, 0xe($s2) /* 0929CC 80091DCC 864F0002 */ lh $t7, 2($s2) @@ -1212,7 +1212,7 @@ glabel render_track_select_setup_ui /* 092CF4 800920F4 240500FF */ li $a1, 255 /* 092CF8 800920F8 240600FF */ li $a2, 255 /* 092CFC 800920FC 00003825 */ move $a3, $zero -/* 092D00 80092100 0C0310E1 */ jal set_text_color +/* 092D00 80092100 0C0310E1 */ jal set_text_colour /* 092D04 80092104 AFAA0010 */ sw $t2, 0x10($sp) /* 092D08 80092108 3C088012 */ lui $t0, %hi(D_801269C8) # $t0, 0x8012 /* 092D0C 8009210C 8D0869C8 */ lw $t0, %lo(D_801269C8)($t0) diff --git a/asm/non_matchings/menu/tt_menu_loop.s b/asm/non_matchings/menu/tt_menu_loop.s index 69a093d5..14899740 100644 --- a/asm/non_matchings/menu/tt_menu_loop.s +++ b/asm/non_matchings/menu/tt_menu_loop.s @@ -68,10 +68,10 @@ glabel tt_menu_loop /* 09E814 8009DC14 3C018012 */ lui $at, %hi(sDialogueOptionMax) # $at, 0x8012 /* 09E818 8009DC18 A0206504 */ sb $zero, %lo(sDialogueOptionMax)($at) /* 09E81C 8009DC1C 3C088012 */ lui $t0, %hi(sCurrentMenuID) # $t0, 0x8012 -/* 09E820 8009DC20 3C018012 */ lui $at, %hi(gDialogOptionYOffset) # $at, 0x8012 +/* 09E820 8009DC20 3C018012 */ lui $at, %hi(gDialogueOptionYOffset) # $at, 0x8012 /* 09E824 8009DC24 240E0020 */ li $t6, 32 /* 09E828 8009DC28 250864E2 */ addiu $t0, %lo(sCurrentMenuID) # addiu $t0, $t0, 0x64e2 -/* 09E82C 8009DC2C A02E650E */ sb $t6, %lo(gDialogOptionYOffset)($at) +/* 09E82C 8009DC2C A02E650E */ sb $t6, %lo(gDialogueOptionYOffset)($at) /* 09E830 8009DC30 81030000 */ lb $v1, ($t0) /* 09E834 8009DC34 00402025 */ move $a0, $v0 /* 09E838 8009DC38 2C61000B */ sltiu $at, $v1, 0xb diff --git a/asm/non_matchings/particles/func_800AF1E0.s b/asm/non_matchings/particles/func_800AF1E0.s index 60a98f1c..1ef4d1f0 100644 --- a/asm/non_matchings/particles/func_800AF1E0.s +++ b/asm/non_matchings/particles/func_800AF1E0.s @@ -1,12 +1,12 @@ glabel func_800AF1E0 -/* 0AFDE0 800AF1E0 3C0E800E */ lui $t6, %hi(gParticleBehaviorsAssetTableCount) # $t6, 0x800e -/* 0AFDE4 800AF1E4 8DCE2CF4 */ lw $t6, %lo(gParticleBehaviorsAssetTableCount)($t6) +/* 0AFDE0 800AF1E0 3C0E800E */ lui $t6, %hi(gParticleBehavioursAssetTableCount) # $t6, 0x800e +/* 0AFDE4 800AF1E4 8DCE2CF4 */ lw $t6, %lo(gParticleBehavioursAssetTableCount)($t6) /* 0AFDE8 800AF1E8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 0AFDEC 800AF1EC 00AE082A */ slt $at, $a1, $t6 /* 0AFDF0 800AF1F0 10200026 */ beqz $at, .L800AF28C /* 0AFDF4 800AF1F4 AFBF001C */ sw $ra, 0x1c($sp) -/* 0AFDF8 800AF1F8 3C0F800E */ lui $t7, %hi(gParticleBehaviorsAssetTable) # $t7, 0x800e -/* 0AFDFC 800AF1FC 8DEF2CFC */ lw $t7, %lo(gParticleBehaviorsAssetTable)($t7) +/* 0AFDF8 800AF1F8 3C0F800E */ lui $t7, %hi(gParticleBehavioursAssetTable) # $t7, 0x800e +/* 0AFDFC 800AF1FC 8DEF2CFC */ lw $t7, %lo(gParticleBehavioursAssetTable)($t7) /* 0AFE00 800AF200 4448F800 */ cfc1 $t0, $31 /* 0AFE04 800AF204 0005C080 */ sll $t8, $a1, 2 /* 0AFE08 800AF208 01F8C821 */ addu $t9, $t7, $t8 diff --git a/asm/non_matchings/particles/init_particle_assets.s b/asm/non_matchings/particles/init_particle_assets.s index 0badad9a..825c1820 100644 --- a/asm/non_matchings/particles/init_particle_assets.s +++ b/asm/non_matchings/particles/init_particle_assets.s @@ -62,10 +62,10 @@ glabel init_particle_assets /* 0AF210 800AE610 0C01DB16 */ jal load_asset_section_from_rom /* 0AF214 800AE614 2404002A */ li $a0, 42 /* 0AF218 800AE618 2406FFFF */ li $a2, -1 -/* 0AF21C 800AE61C 3C12800E */ lui $s2, %hi(gParticleBehaviorsAssetTableCount) # $s2, 0x800e -/* 0AF220 800AE620 3C13800E */ lui $s3, %hi(gParticleBehaviorsAssetTable) # $s3, 0x800e -/* 0AF224 800AE624 26732CFC */ addiu $s3, %lo(gParticleBehaviorsAssetTable) # addiu $s3, $s3, 0x2cfc -/* 0AF228 800AE628 26522CF4 */ addiu $s2, %lo(gParticleBehaviorsAssetTableCount) # addiu $s2, $s2, 0x2cf4 +/* 0AF21C 800AE61C 3C12800E */ lui $s2, %hi(gParticleBehavioursAssetTableCount) # $s2, 0x800e +/* 0AF220 800AE620 3C13800E */ lui $s3, %hi(gParticleBehavioursAssetTable) # $s3, 0x800e +/* 0AF224 800AE624 26732CFC */ addiu $s3, %lo(gParticleBehavioursAssetTable) # addiu $s3, $s3, 0x2cfc +/* 0AF228 800AE628 26522CF4 */ addiu $s2, %lo(gParticleBehavioursAssetTableCount) # addiu $s2, $s2, 0x2cf4 /* 0AF22C 800AE62C 0006C880 */ sll $t9, $a2, 2 /* 0AF230 800AE630 AE620000 */ sw $v0, ($s3) /* 0AF234 800AE634 AE460000 */ sw $a2, ($s2) @@ -87,8 +87,8 @@ glabel init_particle_assets /* 0AF26C 800AE66C 0C01DB16 */ jal load_asset_section_from_rom /* 0AF270 800AE670 2404002B */ li $a0, 43 /* 0AF274 800AE674 8E4E0000 */ lw $t6, ($s2) -/* 0AF278 800AE678 3C15800E */ lui $s5, %hi(gParticleBehaviorsAssets) # $s5, 0x800e -/* 0AF27C 800AE67C 26B52CF8 */ addiu $s5, %lo(gParticleBehaviorsAssets) # addiu $s5, $s5, 0x2cf8 +/* 0AF278 800AE678 3C15800E */ lui $s5, %hi(gParticleBehavioursAssets) # $s5, 0x800e +/* 0AF27C 800AE67C 26B52CF8 */ addiu $s5, %lo(gParticleBehavioursAssets) # addiu $s5, $s5, 0x2cf8 /* 0AF280 800AE680 19C00020 */ blez $t6, .L800AE704 /* 0AF284 800AE684 AEA20000 */ sw $v0, ($s5) /* 0AF288 800AE688 00008025 */ move $s0, $zero diff --git a/asm/non_matchings/printf/func_800B3E64.s b/asm/non_matchings/printf/func_800B3E64.s index 048977fb..3995cd5c 100644 --- a/asm/non_matchings/printf/func_800B3E64.s +++ b/asm/non_matchings/printf/func_800B3E64.s @@ -467,13 +467,13 @@ glabel func_800B3E64 /* 0B5170 800B4570 03E00008 */ jr $ra /* 0B5174 800B4574 00000000 */ nop -/* 0B5178 800B4578 3C03800E */ lui $v1, %hi(gParticleBehaviorsAssetTableCount) # $v1, 0x800e -/* 0B517C 800B457C 8C632CF4 */ lw $v1, %lo(gParticleBehaviorsAssetTableCount)($v1) -/* 0B5180 800B4580 3C0E800E */ lui $t6, %hi(gParticleBehaviorsAssetTable) # $t6, 0x800e +/* 0B5178 800B4578 3C03800E */ lui $v1, %hi(gParticleBehavioursAssetTableCount) # $v1, 0x800e +/* 0B517C 800B457C 8C632CF4 */ lw $v1, %lo(gParticleBehavioursAssetTableCount)($v1) +/* 0B5180 800B4580 3C0E800E */ lui $t6, %hi(gParticleBehavioursAssetTable) # $t6, 0x800e /* 0B5184 800B4584 0083082A */ slt $at, $a0, $v1 /* 0B5188 800B4588 10200007 */ beqz $at, .L800B45A8 -/* 0B518C 800B458C 3C19800E */ lui $t9, %hi(gParticleBehaviorsAssetTable) # $t9, 0x800e -/* 0B5190 800B4590 8DCE2CFC */ lw $t6, %lo(gParticleBehaviorsAssetTable)($t6) +/* 0B518C 800B458C 3C19800E */ lui $t9, %hi(gParticleBehavioursAssetTable) # $t9, 0x800e +/* 0B5190 800B4590 8DCE2CFC */ lw $t6, %lo(gParticleBehavioursAssetTable)($t6) /* 0B5194 800B4594 00047880 */ sll $t7, $a0, 2 /* 0B5198 800B4598 01CFC021 */ addu $t8, $t6, $t7 /* 0B519C 800B459C 8F020000 */ lw $v0, ($t8) @@ -481,7 +481,7 @@ glabel func_800B3E64 /* 0B51A4 800B45A4 00000000 */ nop .L800B45A8: -/* 0B51A8 800B45A8 8F392CFC */ lw $t9, %lo(gParticleBehaviorsAssetTable)($t9) +/* 0B51A8 800B45A8 8F392CFC */ lw $t9, %lo(gParticleBehavioursAssetTable)($t9) /* 0B51AC 800B45AC 00034080 */ sll $t0, $v1, 2 /* 0B51B0 800B45B0 03284821 */ addu $t1, $t9, $t0 /* 0B51B4 800B45B4 8D22FFFC */ lw $v0, -4($t1) @@ -490,12 +490,12 @@ glabel func_800B3E64 /* 0B51C0 800B45C0 00000000 */ nop /* 0B51C4 800B45C4 8C8E0000 */ lw $t6, ($a0) -/* 0B51C8 800B45C8 3C05800E */ lui $a1, %hi(gParticleBehaviorsAssetTableCount) # $a1, 0x800e +/* 0B51C8 800B45C8 3C05800E */ lui $a1, %hi(gParticleBehavioursAssetTableCount) # $a1, 0x800e /* 0B51CC 800B45CC 25C30001 */ addiu $v1, $t6, 1 -/* 0B51D0 800B45D0 24A52CF4 */ addiu $a1, %lo(gParticleBehaviorsAssetTableCount) # addiu $a1, $a1, 0x2cf4 +/* 0B51D0 800B45D0 24A52CF4 */ addiu $a1, %lo(gParticleBehavioursAssetTableCount) # addiu $a1, $a1, 0x2cf4 /* 0B51D4 800B45D4 AC830000 */ sw $v1, ($a0) /* 0B51D8 800B45D8 8CA20000 */ lw $v0, ($a1) -/* 0B51DC 800B45DC 3C19800E */ lui $t9, %hi(gParticleBehaviorsAssetTable) # $t9, 0x800e +/* 0B51DC 800B45DC 3C19800E */ lui $t9, %hi(gParticleBehavioursAssetTable) # $t9, 0x800e /* 0B51E0 800B45E0 0062082A */ slt $at, $v1, $v0 /* 0B51E4 800B45E4 14200007 */ bnez $at, .L800B4604 /* 0B51E8 800B45E8 0062C023 */ subu $t8, $v1, $v0 @@ -507,7 +507,7 @@ glabel func_800B3E64 /* 0B51FC 800B45FC 1020FFFB */ beqz $at, .L800B45EC /* 0B5200 800B4600 0062C023 */ subu $t8, $v1, $v0 .L800B4604: -/* 0B5204 800B4604 8F392CFC */ lw $t9, %lo(gParticleBehaviorsAssetTable)($t9) +/* 0B5204 800B4604 8F392CFC */ lw $t9, %lo(gParticleBehavioursAssetTable)($t9) /* 0B5208 800B4608 00034080 */ sll $t0, $v1, 2 /* 0B520C 800B460C 03284821 */ addu $t1, $t9, $t0 /* 0B5210 800B4610 8D220000 */ lw $v0, ($t1) @@ -515,12 +515,12 @@ glabel func_800B3E64 /* 0B5218 800B4618 00000000 */ nop /* 0B521C 800B461C 8C8E0000 */ lw $t6, ($a0) -/* 0B5220 800B4620 3C08800E */ lui $t0, %hi(gParticleBehaviorsAssetTable) # $t0, 0x800e +/* 0B5220 800B4620 3C08800E */ lui $t0, %hi(gParticleBehavioursAssetTable) # $t0, 0x800e /* 0B5224 800B4624 25C3FFFF */ addiu $v1, $t6, -1 /* 0B5228 800B4628 04610009 */ bgez $v1, .L800B4650 /* 0B522C 800B462C AC830000 */ sw $v1, ($a0) -/* 0B5230 800B4630 3C02800E */ lui $v0, %hi(gParticleBehaviorsAssetTableCount) # $v0, 0x800e -/* 0B5234 800B4634 24422CF4 */ addiu $v0, %lo(gParticleBehaviorsAssetTableCount) # addiu $v0, $v0, 0x2cf4 +/* 0B5230 800B4630 3C02800E */ lui $v0, %hi(gParticleBehavioursAssetTableCount) # $v0, 0x800e +/* 0B5234 800B4634 24422CF4 */ addiu $v0, %lo(gParticleBehavioursAssetTableCount) # addiu $v0, $v0, 0x2cf4 .L800B4638: /* 0B5238 800B4638 8C580000 */ lw $t8, ($v0) /* 0B523C 800B463C 00000000 */ nop @@ -529,7 +529,7 @@ glabel func_800B3E64 /* 0B5248 800B4648 0720FFFB */ bltz $t9, .L800B4638 /* 0B524C 800B464C 03201825 */ move $v1, $t9 .L800B4650: -/* 0B5250 800B4650 8D082CFC */ lw $t0, %lo(gParticleBehaviorsAssetTable)($t0) +/* 0B5250 800B4650 8D082CFC */ lw $t0, %lo(gParticleBehavioursAssetTable)($t0) /* 0B5254 800B4654 00034880 */ sll $t1, $v1, 2 /* 0B5258 800B4658 01095021 */ addu $t2, $t0, $t1 /* 0B525C 800B465C 8D420000 */ lw $v0, ($t2) diff --git a/asm/non_matchings/unknown_043920/func_80042D20.s b/asm/non_matchings/racer/func_80042D20.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80042D20.s rename to asm/non_matchings/racer/func_80042D20.s diff --git a/asm/non_matchings/unknown_043920/func_80043ECC.s b/asm/non_matchings/racer/func_80043ECC.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80043ECC.s rename to asm/non_matchings/racer/func_80043ECC.s diff --git a/asm/non_matchings/unknown_043920/func_8004447C.s b/asm/non_matchings/racer/func_8004447C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004447C.s rename to asm/non_matchings/racer/func_8004447C.s diff --git a/asm/non_matchings/unknown_043920/func_80045128.s b/asm/non_matchings/racer/func_80045128.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80045128.s rename to asm/non_matchings/racer/func_80045128.s diff --git a/asm/non_matchings/unknown_043920/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800452A0.s rename to asm/non_matchings/racer/func_800452A0.s diff --git a/asm/non_matchings/unknown_043920/func_80045C48.s b/asm/non_matchings/racer/func_80045C48.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80045C48.s rename to asm/non_matchings/racer/func_80045C48.s diff --git a/asm/non_matchings/unknown_043920/func_80046524.s b/asm/non_matchings/racer/func_80046524.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80046524.s rename to asm/non_matchings/racer/func_80046524.s diff --git a/asm/non_matchings/unknown_043920/func_80048C7C.s b/asm/non_matchings/racer/func_80048C7C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80048C7C.s rename to asm/non_matchings/racer/func_80048C7C.s diff --git a/asm/non_matchings/unknown_043920/func_80048E64.s b/asm/non_matchings/racer/func_80048E64.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80048E64.s rename to asm/non_matchings/racer/func_80048E64.s diff --git a/asm/non_matchings/unknown_043920/func_800494E0.s b/asm/non_matchings/racer/func_800494E0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800494E0.s rename to asm/non_matchings/racer/func_800494E0.s diff --git a/asm/non_matchings/unknown_043920/func_80049794.s b/asm/non_matchings/racer/func_80049794.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80049794.s rename to asm/non_matchings/racer/func_80049794.s diff --git a/asm/non_matchings/unknown_043920/func_8004C2B0.s b/asm/non_matchings/racer/func_8004C2B0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004C2B0.s rename to asm/non_matchings/racer/func_8004C2B0.s diff --git a/asm/non_matchings/unknown_043920/func_8004CC20.s b/asm/non_matchings/racer/func_8004CC20.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004CC20.s rename to asm/non_matchings/racer/func_8004CC20.s diff --git a/asm/non_matchings/unknown_043920/func_8004D590.s b/asm/non_matchings/racer/func_8004D590.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004D590.s rename to asm/non_matchings/racer/func_8004D590.s diff --git a/asm/non_matchings/unknown_043920/func_8004DE38.s b/asm/non_matchings/racer/func_8004DE38.s similarity index 99% rename from asm/non_matchings/unknown_043920/func_8004DE38.s rename to asm/non_matchings/racer/func_8004DE38.s index e5f10c4a..05175cc1 100644 --- a/asm/non_matchings/unknown_043920/func_8004DE38.s +++ b/asm/non_matchings/racer/func_8004DE38.s @@ -252,7 +252,7 @@ glabel func_8004DE38 .L8004E168: /* 04ED68 8004E168 00002825 */ move $a1, $zero /* 04ED6C 8004E16C 00003025 */ move $a2, $zero -/* 04ED70 8004E170 0C02D8AD */ jal set_render_printf_background_color +/* 04ED70 8004E170 0C02D8AD */ jal set_render_printf_background_colour /* 04ED74 8004E174 24070080 */ li $a3, 128 /* 04ED78 8004E178 0C008D07 */ jal func_8002341C /* 04ED7C 8004E17C 00000000 */ nop diff --git a/asm/non_matchings/unknown_043920/func_8004F7F4.s b/asm/non_matchings/racer/func_8004F7F4.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004F7F4.s rename to asm/non_matchings/racer/func_8004F7F4.s diff --git a/asm/non_matchings/unknown_043920/func_80050754.s b/asm/non_matchings/racer/func_80050754.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80050754.s rename to asm/non_matchings/racer/func_80050754.s diff --git a/asm/non_matchings/unknown_043920/func_80050850.s b/asm/non_matchings/racer/func_80050850.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80050850.s rename to asm/non_matchings/racer/func_80050850.s diff --git a/asm/non_matchings/unknown_043920/func_80050A28.s b/asm/non_matchings/racer/func_80050A28.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80050A28.s rename to asm/non_matchings/racer/func_80050A28.s diff --git a/asm/non_matchings/unknown_043920/func_800521C4.s b/asm/non_matchings/racer/func_800521C4.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800521C4.s rename to asm/non_matchings/racer/func_800521C4.s diff --git a/asm/non_matchings/unknown_043920/func_80052388.s b/asm/non_matchings/racer/func_80052388.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80052388.s rename to asm/non_matchings/racer/func_80052388.s diff --git a/asm/non_matchings/unknown_043920/func_8005250C.s b/asm/non_matchings/racer/func_8005250C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005250C.s rename to asm/non_matchings/racer/func_8005250C.s diff --git a/asm/non_matchings/unknown_043920/func_80052B64.s b/asm/non_matchings/racer/func_80052B64.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80052B64.s rename to asm/non_matchings/racer/func_80052B64.s diff --git a/asm/non_matchings/unknown_043920/func_80052D7C.s b/asm/non_matchings/racer/func_80052D7C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80052D7C.s rename to asm/non_matchings/racer/func_80052D7C.s diff --git a/asm/non_matchings/unknown_043920/func_80053750.s b/asm/non_matchings/racer/func_80053750.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80053750.s rename to asm/non_matchings/racer/func_80053750.s diff --git a/asm/non_matchings/unknown_043920/func_80053E9C.s b/asm/non_matchings/racer/func_80053E9C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80053E9C.s rename to asm/non_matchings/racer/func_80053E9C.s diff --git a/asm/non_matchings/unknown_043920/func_80054110.s b/asm/non_matchings/racer/func_80054110.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80054110.s rename to asm/non_matchings/racer/func_80054110.s diff --git a/asm/non_matchings/unknown_043920/func_8005492C.s b/asm/non_matchings/racer/func_8005492C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005492C.s rename to asm/non_matchings/racer/func_8005492C.s diff --git a/asm/non_matchings/unknown_043920/func_80054FD0.s b/asm/non_matchings/racer/func_80054FD0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80054FD0.s rename to asm/non_matchings/racer/func_80054FD0.s diff --git a/asm/non_matchings/unknown_043920/func_80055A84.s b/asm/non_matchings/racer/func_80055A84.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80055A84.s rename to asm/non_matchings/racer/func_80055A84.s diff --git a/asm/non_matchings/unknown_043920/func_80055EC0.s b/asm/non_matchings/racer/func_80055EC0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80055EC0.s rename to asm/non_matchings/racer/func_80055EC0.s diff --git a/asm/non_matchings/unknown_043920/func_8005698C.s b/asm/non_matchings/racer/func_8005698C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005698C.s rename to asm/non_matchings/racer/func_8005698C.s diff --git a/asm/non_matchings/unknown_043920/func_80056E2C.s b/asm/non_matchings/racer/func_80056E2C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80056E2C.s rename to asm/non_matchings/racer/func_80056E2C.s diff --git a/asm/non_matchings/unknown_043920/func_800570B8.s b/asm/non_matchings/racer/func_800570B8.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800570B8.s rename to asm/non_matchings/racer/func_800570B8.s diff --git a/asm/non_matchings/unknown_043920/func_80057220.s b/asm/non_matchings/racer/func_80057220.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80057220.s rename to asm/non_matchings/racer/func_80057220.s diff --git a/asm/non_matchings/unknown_043920/func_800576E0.s b/asm/non_matchings/racer/func_800576E0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800576E0.s rename to asm/non_matchings/racer/func_800576E0.s diff --git a/asm/non_matchings/unknown_043920/func_80057A40.s b/asm/non_matchings/racer/func_80057A40.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80057A40.s rename to asm/non_matchings/racer/func_80057A40.s diff --git a/asm/non_matchings/unknown_043920/func_800581E8.s b/asm/non_matchings/racer/func_800581E8.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800581E8.s rename to asm/non_matchings/racer/func_800581E8.s diff --git a/asm/non_matchings/unknown_043920/func_80058B84.s b/asm/non_matchings/racer/func_80058B84.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80058B84.s rename to asm/non_matchings/racer/func_80058B84.s diff --git a/asm/non_matchings/unknown_043920/func_80058D5C.s b/asm/non_matchings/racer/func_80058D5C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80058D5C.s rename to asm/non_matchings/racer/func_80058D5C.s diff --git a/asm/non_matchings/unknown_043920/func_80058F44.s b/asm/non_matchings/racer/func_80058F44.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80058F44.s rename to asm/non_matchings/racer/func_80058F44.s diff --git a/asm/non_matchings/unknown_043920/func_80059080.s b/asm/non_matchings/racer/func_80059080.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80059080.s rename to asm/non_matchings/racer/func_80059080.s diff --git a/asm/non_matchings/unknown_043920/func_80059208.s b/asm/non_matchings/racer/func_80059208.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80059208.s rename to asm/non_matchings/racer/func_80059208.s diff --git a/asm/non_matchings/unknown_043920/func_80059BF0.s b/asm/non_matchings/racer/func_80059BF0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80059BF0.s rename to asm/non_matchings/racer/func_80059BF0.s diff --git a/asm/non_matchings/unknown_043920/func_8005A424.s b/asm/non_matchings/racer/func_8005A424.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005A424.s rename to asm/non_matchings/racer/func_8005A424.s diff --git a/asm/non_matchings/unknown_043920/func_8005A6F0.s b/asm/non_matchings/racer/func_8005A6F0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005A6F0.s rename to asm/non_matchings/racer/func_8005A6F0.s diff --git a/asm/non_matchings/unknown_043920/func_8005B818.s b/asm/non_matchings/racer/func_8005B818.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005B818.s rename to asm/non_matchings/racer/func_8005B818.s diff --git a/asm/non_matchings/unknown_043920/func_8004DAB0.s b/asm/non_matchings/racer/obj_init_racer.s similarity index 99% rename from asm/non_matchings/unknown_043920/func_8004DAB0.s rename to asm/non_matchings/racer/obj_init_racer.s index d1ba1b8a..b46ba17c 100644 --- a/asm/non_matchings/unknown_043920/func_8004DAB0.s +++ b/asm/non_matchings/racer/obj_init_racer.s @@ -1,4 +1,4 @@ -glabel func_8004DAB0 +glabel obj_init_racer /* 04E6B0 8004DAB0 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 04E6B4 8004DAB4 44811000 */ mtc1 $at, $f2 /* 04E6B8 8004DAB8 27BDFFD0 */ addiu $sp, $sp, -0x30 diff --git a/asm/non_matchings/unknown_043920/set_ghost_position_and_rotation.s b/asm/non_matchings/racer/set_ghost_position_and_rotation.s similarity index 100% rename from asm/non_matchings/unknown_043920/set_ghost_position_and_rotation.s rename to asm/non_matchings/racer/set_ghost_position_and_rotation.s diff --git a/asm/non_matchings/controller_pak/func_80072348.s b/asm/non_matchings/save_data/func_80072348.s similarity index 90% rename from asm/non_matchings/controller_pak/func_80072348.s rename to asm/non_matchings/save_data/func_80072348.s index 6bf6d196..14741616 100644 --- a/asm/non_matchings/controller_pak/func_80072348.s +++ b/asm/non_matchings/save_data/func_80072348.s @@ -27,14 +27,14 @@ glabel func_80072348 /* 072FAC 800723AC 846A0000 */ lh $t2, ($v1) /* 072FB0 800723B0 87A40022 */ lh $a0, 0x22($sp) /* 072FB4 800723B4 14CA000C */ bne $a2, $t2, .L800723E8 -/* 072FB8 800723B8 3C088012 */ lui $t0, %hi(D_801241E0) # $t0, 0x8012 +/* 072FB8 800723B8 3C088012 */ lui $t0, %hi(sUnkMiscAsset19) # $t0, 0x8012 /* 072FBC 800723BC 846B0008 */ lh $t3, 8($v1) /* 072FC0 800723C0 240CFED4 */ li $t4, -300 /* 072FC4 800723C4 05610002 */ bgez $t3, .L800723D0 -/* 072FC8 800723C8 3C0D8012 */ lui $t5, %hi(D_801241E0) # $t5, 0x8012 +/* 072FC8 800723C8 3C0D8012 */ lui $t5, %hi(sUnkMiscAsset19) # $t5, 0x8012 /* 072FCC 800723CC A46C0008 */ sh $t4, 8($v1) .L800723D0: -/* 072FD0 800723D0 8DAD41E0 */ lw $t5, %lo(D_801241E0)($t5) +/* 072FD0 800723D0 8DAD41E0 */ lw $t5, %lo(sUnkMiscAsset19)($t5) /* 072FD4 800723D4 00067880 */ sll $t7, $a2, 2 /* 072FD8 800723D8 01AFC021 */ addu $t8, $t5, $t7 /* 072FDC 800723DC 87190002 */ lh $t9, 2($t8) @@ -42,7 +42,7 @@ glabel func_80072348 /* 072FE4 800723E4 A4790004 */ sh $t9, 4($v1) .L800723E8: /* 072FE8 800723E8 A4660000 */ sh $a2, ($v1) -/* 072FEC 800723EC 8D0841E0 */ lw $t0, %lo(D_801241E0)($t0) +/* 072FEC 800723EC 8D0841E0 */ lw $t0, %lo(sUnkMiscAsset19)($t0) /* 072FF0 800723F0 00065080 */ sll $t2, $a2, 2 /* 072FF4 800723F4 010A1021 */ addu $v0, $t0, $t2 /* 072FF8 800723F8 84450000 */ lh $a1, ($v0) diff --git a/asm/non_matchings/controller_pak/func_80072424.s b/asm/non_matchings/save_data/func_80072424.s similarity index 93% rename from asm/non_matchings/controller_pak/func_80072424.s rename to asm/non_matchings/save_data/func_80072424.s index 0f57e167..1928b7c0 100644 --- a/asm/non_matchings/controller_pak/func_80072424.s +++ b/asm/non_matchings/save_data/func_80072424.s @@ -34,10 +34,10 @@ glabel func_80072424 /* 0730A4 800724A4 846B0008 */ lh $t3, 8($v1) /* 0730A8 800724A8 240CFED4 */ li $t4, -300 /* 0730AC 800724AC 05610002 */ bgez $t3, .L800724B8 -/* 0730B0 800724B0 3C0D8012 */ lui $t5, %hi(D_801241E0) # $t5, 0x8012 +/* 0730B0 800724B0 3C0D8012 */ lui $t5, %hi(sUnkMiscAsset19) # $t5, 0x8012 /* 0730B4 800724B4 A46C0008 */ sh $t4, 8($v1) .L800724B8: -/* 0730B8 800724B8 8DAD41E0 */ lw $t5, %lo(D_801241E0)($t5) +/* 0730B8 800724B8 8DAD41E0 */ lw $t5, %lo(sUnkMiscAsset19)($t5) /* 0730BC 800724BC 00067880 */ sll $t7, $a2, 2 /* 0730C0 800724C0 01AFC021 */ addu $t8, $t5, $t7 /* 0730C4 800724C4 87190002 */ lh $t9, 2($t8) @@ -45,7 +45,7 @@ glabel func_80072424 /* 0730CC 800724CC A4790004 */ sh $t9, 4($v1) .L800724D0: /* 0730D0 800724D0 44800000 */ mtc1 $zero, $f0 -/* 0730D4 800724D4 3C088012 */ lui $t0, %hi(D_801241E0) # $t0, 0x8012 +/* 0730D4 800724D4 3C088012 */ lui $t0, %hi(sUnkMiscAsset19) # $t0, 0x8012 /* 0730D8 800724D8 4600603C */ c.lt.s $f12, $f0 /* 0730DC 800724DC 00000000 */ nop /* 0730E0 800724E0 45000002 */ bc1f .L800724EC @@ -61,7 +61,7 @@ glabel func_80072424 /* 073104 80072504 46000306 */ mov.s $f12, $f0 .L80072508: /* 073108 80072508 A4660000 */ sh $a2, ($v1) -/* 07310C 8007250C 8D0841E0 */ lw $t0, %lo(D_801241E0)($t0) +/* 07310C 8007250C 8D0841E0 */ lw $t0, %lo(sUnkMiscAsset19)($t0) /* 073110 80072510 00065080 */ sll $t2, $a2, 2 /* 073114 80072514 010A1021 */ addu $v0, $t0, $t2 /* 073118 80072518 84470000 */ lh $a3, ($v0) diff --git a/asm/non_matchings/controller_pak/func_80072578.s b/asm/non_matchings/save_data/func_80072578.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072578.s rename to asm/non_matchings/save_data/func_80072578.s diff --git a/asm/non_matchings/controller_pak/func_80072718.s b/asm/non_matchings/save_data/func_80072718.s similarity index 89% rename from asm/non_matchings/controller_pak/func_80072718.s rename to asm/non_matchings/save_data/func_80072718.s index 00d08135..462c4441 100644 --- a/asm/non_matchings/controller_pak/func_80072718.s +++ b/asm/non_matchings/save_data/func_80072718.s @@ -35,13 +35,13 @@ glabel func_80072718 /* 07337C 8007277C 244241E8 */ addiu $v0, %lo(D_801241E8) # addiu $v0, $v0, 0x41e8 /* 073380 80072780 8C580000 */ lw $t8, ($v0) /* 073384 80072784 8FB90078 */ lw $t9, 0x78($sp) -/* 073388 80072788 3C048012 */ lui $a0, %hi(D_80124010) # $a0, 0x8012 +/* 073388 80072788 3C048012 */ lui $a0, %hi(sControllerMesgQueue) # $a0, 0x8012 /* 07338C 8007278C 03194021 */ addu $t0, $t8, $t9 /* 073390 80072790 29010079 */ slti $at, $t0, 0x79 /* 073394 80072794 1420003B */ bnez $at, .L80072884 /* 073398 80072798 AC480000 */ sw $t0, ($v0) /* 07339C 8007279C AC400000 */ sw $zero, ($v0) -/* 0733A0 800727A0 8C844010 */ lw $a0, %lo(D_80124010)($a0) +/* 0733A0 800727A0 8C844010 */ lw $a0, %lo(sControllerMesgQueue)($a0) /* 0733A4 800727A4 0C0334A4 */ jal osPfsIsPlug /* 0733A8 800727A8 27A5006D */ addiu $a1, $sp, 0x6d /* 0733AC 800727AC 3C168012 */ lui $s6, %hi(pfs) # $s6, 0x8012 @@ -56,24 +56,24 @@ glabel func_80072718 /* 0733CC 800727CC 00608825 */ move $s1, $v1 /* 0733D0 800727D0 01435824 */ and $t3, $t2, $v1 /* 0733D4 800727D4 11600023 */ beqz $t3, .L80072864 -/* 0733D8 800727D8 3C0E8012 */ lui $t6, %hi(D_801241E5) # $t6, 0x8012 +/* 0733D8 800727D8 3C0E8012 */ lui $t6, %hi(sRumblePaksPresent) # $t6, 0x8012 /* 0733DC 800727DC 93CC0000 */ lbu $t4, ($fp) -/* 0733E0 800727E0 91CE41E5 */ lbu $t6, %lo(D_801241E5)($t6) +/* 0733E0 800727E0 91CE41E5 */ lbu $t6, %lo(sRumblePaksPresent)($t6) /* 0733E4 800727E4 01806827 */ not $t5, $t4 /* 0733E8 800727E8 01AE7824 */ and $t7, $t5, $t6 /* 0733EC 800727EC 01E3C024 */ and $t8, $t7, $v1 /* 0733F0 800727F0 1700001C */ bnez $t8, .L80072864 /* 0733F4 800727F4 00000000 */ nop /* 0733F8 800727F8 02770019 */ multu $s3, $s7 -/* 0733FC 800727FC 3C048012 */ lui $a0, %hi(D_80124010) # $a0, 0x8012 -/* 073400 80072800 8C844010 */ lw $a0, %lo(D_80124010)($a0) +/* 0733FC 800727FC 3C048012 */ lui $a0, %hi(sControllerMesgQueue) # $a0, 0x8012 +/* 073400 80072800 8C844010 */ lw $a0, %lo(sControllerMesgQueue)($a0) /* 073404 80072804 02603025 */ move $a2, $s3 /* 073408 80072808 0000C812 */ mflo $t9 /* 07340C 8007280C 02D92821 */ addu $a1, $s6, $t9 /* 073410 80072810 0C01C837 */ jal osMotorInit /* 073414 80072814 00000000 */ nop /* 073418 80072818 1040000E */ beqz $v0, .L80072854 -/* 07341C 8007281C 3C0E8012 */ lui $t6, %hi(D_801241E5) # $t6, 0x8012 +/* 07341C 8007281C 3C0E8012 */ lui $t6, %hi(sRumblePaksPresent) # $t6, 0x8012 /* 073420 80072820 93C80000 */ lbu $t0, ($fp) /* 073424 80072824 928A0000 */ lbu $t2, ($s4) /* 073428 80072828 02201027 */ not $v0, $s1 @@ -81,17 +81,17 @@ glabel func_80072718 /* 073430 80072830 01425824 */ and $t3, $t2, $v0 /* 073434 80072834 A3C90000 */ sb $t1, ($fp) /* 073438 80072838 A28B0000 */ sb $t3, ($s4) -/* 07343C 8007283C 3C0C8012 */ lui $t4, %hi(D_801241E5) # $t4, 0x8012 -/* 073440 80072840 918C41E5 */ lbu $t4, %lo(D_801241E5)($t4) -/* 073444 80072844 3C018012 */ lui $at, %hi(D_801241E5) # $at, 0x8012 +/* 07343C 8007283C 3C0C8012 */ lui $t4, %hi(sRumblePaksPresent) # $t4, 0x8012 +/* 073440 80072840 918C41E5 */ lbu $t4, %lo(sRumblePaksPresent)($t4) +/* 073444 80072844 3C018012 */ lui $at, %hi(sRumblePaksPresent) # $at, 0x8012 /* 073448 80072848 01826824 */ and $t5, $t4, $v0 /* 07344C 8007284C 10000005 */ b .L80072864 -/* 073450 80072850 A02D41E5 */ sb $t5, %lo(D_801241E5)($at) +/* 073450 80072850 A02D41E5 */ sb $t5, %lo(sRumblePaksPresent)($at) .L80072854: -/* 073454 80072854 91CE41E5 */ lbu $t6, %lo(D_801241E5)($t6) -/* 073458 80072858 3C018012 */ lui $at, %hi(D_801241E5) # $at, 0x8012 +/* 073454 80072854 91CE41E5 */ lbu $t6, %lo(sRumblePaksPresent)($t6) +/* 073458 80072858 3C018012 */ lui $at, %hi(sRumblePaksPresent) # $at, 0x8012 /* 07345C 8007285C 01D17825 */ or $t7, $t6, $s1 -/* 073460 80072860 A02F41E5 */ sb $t7, %lo(D_801241E5)($at) +/* 073460 80072860 A02F41E5 */ sb $t7, %lo(sRumblePaksPresent)($at) .L80072864: /* 073464 80072864 26730001 */ addiu $s3, $s3, 1 /* 073468 80072868 327800FF */ andi $t8, $s3, 0xff @@ -102,8 +102,8 @@ glabel func_80072718 /* 07347C 8007287C 1420FFD2 */ bnez $at, .L800727C8 /* 073480 80072880 03009825 */ move $s3, $t8 .L80072884: -/* 073484 80072884 3C088012 */ lui $t0, %hi(D_801241E5) # $t0, 0x8012 -/* 073488 80072888 910841E5 */ lbu $t0, %lo(D_801241E5)($t0) +/* 073484 80072884 3C088012 */ lui $t0, %hi(sRumblePaksPresent) # $t0, 0x8012 +/* 073488 80072888 910841E5 */ lbu $t0, %lo(sRumblePaksPresent)($t0) /* 07348C 8007288C 3C04800E */ lui $a0, %hi(D_800DE48C) # $a0, 0x800e /* 073490 80072890 3C148012 */ lui $s4, %hi(D_801241E7) # $s4, 0x8012 /* 073494 80072894 3C168012 */ lui $s6, %hi(pfs) # $s6, 0x8012 @@ -117,8 +117,8 @@ glabel func_80072718 .L800728B4: /* 0734B4 800728B4 10800008 */ beqz $a0, .L800728D8 /* 0734B8 800728B8 0000A825 */ move $s5, $zero -/* 0734BC 800728BC 3C048012 */ lui $a0, %hi(D_80124010) # $a0, 0x8012 -/* 0734C0 800728C0 8C844010 */ lw $a0, %lo(D_80124010)($a0) +/* 0734BC 800728BC 3C048012 */ lui $a0, %hi(sControllerMesgQueue) # $a0, 0x8012 +/* 0734C0 800728C0 8C844010 */ lw $a0, %lo(sControllerMesgQueue)($a0) /* 0734C4 800728C4 0C0334A4 */ jal osPfsIsPlug /* 0734C8 800728C8 27A5006D */ addiu $a1, $sp, 0x6d /* 0734CC 800728CC 3C04800E */ lui $a0, %hi(D_800DE48C) # $a0, 0x800e @@ -137,7 +137,7 @@ glabel func_80072718 /* 0734FC 800728FC 24030001 */ li $v1, 1 .L80072900: /* 073500 80072900 1080001F */ beqz $a0, .L80072980 -/* 073504 80072904 3C0D8012 */ lui $t5, %hi(D_801241E5) # $t5, 0x8012 +/* 073504 80072904 3C0D8012 */ lui $t5, %hi(sRumblePaksPresent) # $t5, 0x8012 /* 073508 80072908 2409FFFF */ li $t1, -1 /* 07350C 8007290C A6090004 */ sh $t1, 4($s0) /* 073510 80072910 86020004 */ lh $v0, 4($s0) @@ -154,8 +154,8 @@ glabel func_80072718 /* 07353C 8007293C 26730001 */ addiu $s3, $s3, 1 .L80072940: /* 073540 80072940 02770019 */ multu $s3, $s7 -/* 073544 80072944 3C048012 */ lui $a0, %hi(D_80124010) # $a0, 0x8012 -/* 073548 80072948 8C844010 */ lw $a0, %lo(D_80124010)($a0) +/* 073544 80072944 3C048012 */ lui $a0, %hi(sControllerMesgQueue) # $a0, 0x8012 +/* 073548 80072948 8C844010 */ lw $a0, %lo(sControllerMesgQueue)($a0) /* 07354C 8007294C 02603025 */ move $a2, $s3 /* 073550 80072950 00006012 */ mflo $t4 /* 073554 80072954 02CC9021 */ addu $s2, $s6, $t4 @@ -172,7 +172,7 @@ glabel func_80072718 /* 07357C 8007297C 26730001 */ addiu $s3, $s3, 1 .L80072980: /* 073580 80072980 93C20000 */ lbu $v0, ($fp) -/* 073584 80072984 91AD41E5 */ lbu $t5, %lo(D_801241E5)($t5) +/* 073584 80072984 91AD41E5 */ lbu $t5, %lo(sRumblePaksPresent)($t5) /* 073588 80072988 00608825 */ move $s1, $v1 /* 07358C 8007298C 004D7024 */ and $t6, $v0, $t5 /* 073590 80072990 01C37824 */ and $t7, $t6, $v1 @@ -341,8 +341,8 @@ glabel func_80072718 /* 0737F0 80072BF0 1420FF43 */ bnez $at, .L80072900 /* 0737F4 80072BF4 2610000A */ addiu $s0, $s0, 0xa /* 0737F8 80072BF8 12A00002 */ beqz $s5, .L80072C04 -/* 0737FC 80072BFC 3C018012 */ lui $at, %hi(D_801241E5) # $at, 0x8012 -/* 073800 80072C00 A02041E5 */ sb $zero, %lo(D_801241E5)($at) +/* 0737FC 80072BFC 3C018012 */ lui $at, %hi(sRumblePaksPresent) # $at, 0x8012 +/* 073800 80072C00 A02041E5 */ sb $zero, %lo(sRumblePaksPresent)($at) .L80072C04: /* 073804 80072C04 10800003 */ beqz $a0, .L80072C14 /* 073808 80072C08 2488FFFF */ addiu $t0, $a0, -1 diff --git a/asm/non_matchings/controller_pak/func_80072C54.s b/asm/non_matchings/save_data/func_80072C54.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072C54.s rename to asm/non_matchings/save_data/func_80072C54.s diff --git a/asm/non_matchings/controller_pak/func_80072E28.s b/asm/non_matchings/save_data/func_80072E28.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072E28.s rename to asm/non_matchings/save_data/func_80072E28.s diff --git a/asm/non_matchings/controller_pak/func_8007306C.s b/asm/non_matchings/save_data/func_8007306C.s similarity index 100% rename from asm/non_matchings/controller_pak/func_8007306C.s rename to asm/non_matchings/save_data/func_8007306C.s diff --git a/asm/non_matchings/controller_pak/func_800732E8.s b/asm/non_matchings/save_data/func_800732E8.s similarity index 100% rename from asm/non_matchings/controller_pak/func_800732E8.s rename to asm/non_matchings/save_data/func_800732E8.s diff --git a/asm/non_matchings/controller_pak/func_80073588.s b/asm/non_matchings/save_data/func_80073588.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80073588.s rename to asm/non_matchings/save_data/func_80073588.s diff --git a/asm/non_matchings/controller_pak/func_800738A4.s b/asm/non_matchings/save_data/func_800738A4.s similarity index 100% rename from asm/non_matchings/controller_pak/func_800738A4.s rename to asm/non_matchings/save_data/func_800738A4.s diff --git a/asm/non_matchings/controller_pak/func_80073C5C.s b/asm/non_matchings/save_data/func_80073C5C.s similarity index 98% rename from asm/non_matchings/controller_pak/func_80073C5C.s rename to asm/non_matchings/save_data/func_80073C5C.s index d099c820..2c172a8a 100644 --- a/asm/non_matchings/controller_pak/func_80073C5C.s +++ b/asm/non_matchings/save_data/func_80073C5C.s @@ -20,7 +20,7 @@ glabel func_80073C5C /* 0748A4 80073CA4 AFAE0010 */ sw $t6, 0x10($sp) /* 0748A8 80073CA8 27A60100 */ addiu $a2, $sp, 0x100 /* 0748AC 80073CAC 24050010 */ li $a1, 16 -/* 0748B0 80073CB0 0C01D798 */ jal func_80075E60 +/* 0748B0 80073CB0 0C01D798 */ jal get_controller_pak_file_list /* 0748B4 80073CB4 27A700C0 */ addiu $a3, $sp, 0xc0 /* 0748B8 80073CB8 1440004B */ bnez $v0, .L80073DE8 /* 0748BC 80073CBC AFA20060 */ sw $v0, 0x60($sp) diff --git a/asm/non_matchings/controller_pak/func_80074204.s b/asm/non_matchings/save_data/func_80074204.s similarity index 96% rename from asm/non_matchings/controller_pak/func_80074204.s rename to asm/non_matchings/save_data/func_80074204.s index 7dd1f9be..f1284619 100644 --- a/asm/non_matchings/controller_pak/func_80074204.s +++ b/asm/non_matchings/save_data/func_80074204.s @@ -6,7 +6,7 @@ glabel func_80074204 /* 074E14 80074214 AFB10018 */ sw $s1, 0x18($sp) /* 074E18 80074218 AFB00014 */ sw $s0, 0x14($sp) /* 074E1C 8007421C AFA40030 */ sw $a0, 0x30($sp) -/* 074E20 80074220 0C01A840 */ jal func_8006A100 +/* 074E20 80074220 0C01A840 */ jal get_si_mesg_queue /* 074E24 80074224 AFA50034 */ sw $a1, 0x34($sp) /* 074E28 80074228 0C033884 */ jal osEepromProbe /* 074E2C 8007422C 00402025 */ move $a0, $v0 @@ -39,7 +39,7 @@ glabel func_80074204 /* 074E88 80074288 00409025 */ move $s2, $v0 /* 074E8C 8007428C 00008025 */ move $s0, $zero .L80074290: -/* 074E90 80074290 0C01A840 */ jal func_8006A100 +/* 074E90 80074290 0C01A840 */ jal get_si_mesg_queue /* 074E94 80074294 00000000 */ nop /* 074E98 80074298 001070C0 */ sll $t6, $s0, 3 /* 074E9C 8007429C 01D23021 */ addu $a2, $t6, $s2 diff --git a/asm/non_matchings/controller_pak/func_8007431C.s b/asm/non_matchings/save_data/func_8007431C.s similarity index 98% rename from asm/non_matchings/controller_pak/func_8007431C.s rename to asm/non_matchings/save_data/func_8007431C.s index f24a91ea..781483c0 100644 --- a/asm/non_matchings/controller_pak/func_8007431C.s +++ b/asm/non_matchings/save_data/func_8007431C.s @@ -6,7 +6,7 @@ glabel func_8007431C /* 074F2C 8007432C 00A08825 */ move $s1, $a1 /* 074F30 80074330 00809025 */ move $s2, $a0 /* 074F34 80074334 AFB30020 */ sw $s3, 0x20($sp) -/* 074F38 80074338 0C01A840 */ jal func_8006A100 +/* 074F38 80074338 0C01A840 */ jal get_si_mesg_queue /* 074F3C 8007433C AFB00014 */ sw $s0, 0x14($sp) /* 074F40 80074340 0C033884 */ jal osEepromProbe /* 074F44 80074344 00402025 */ move $a0, $v0 @@ -104,7 +104,7 @@ glabel func_8007431C /* 075088 80074488 00008025 */ move $s0, $zero /* 07508C 8007448C 00C08825 */ move $s1, $a2 .L80074490: -/* 075090 80074490 0C01A840 */ jal func_8006A100 +/* 075090 80074490 0C01A840 */ jal get_si_mesg_queue /* 075094 80074494 00000000 */ nop /* 075098 80074498 001068C0 */ sll $t5, $s0, 3 /* 07509C 8007449C 01B33021 */ addu $a2, $t5, $s3 diff --git a/asm/non_matchings/controller_pak/func_80074B34.s b/asm/non_matchings/save_data/func_80074B34.s similarity index 95% rename from asm/non_matchings/controller_pak/func_80074B34.s rename to asm/non_matchings/save_data/func_80074B34.s index 62679033..5dcb1b68 100644 --- a/asm/non_matchings/controller_pak/func_80074B34.s +++ b/asm/non_matchings/save_data/func_80074B34.s @@ -5,12 +5,12 @@ glabel func_80074B34 /* 075740 80074B40 AFA5005C */ sw $a1, 0x5c($sp) /* 075744 80074B44 AFA60060 */ sw $a2, 0x60($sp) /* 075748 80074B48 AFA70064 */ sw $a3, 0x64($sp) -/* 07574C 80074B4C 0C01D637 */ jal func_800758DC +/* 07574C 80074B4C 0C01D637 */ jal get_si_device_status /* 075750 80074B50 AFA00040 */ sw $zero, 0x40($sp) /* 075754 80074B54 10400007 */ beqz $v0, .L80074B74 /* 075758 80074B58 3C05800E */ lui $a1, %hi(D_800E773C) # $a1, 0x800e /* 07575C 80074B5C 8FA40058 */ lw $a0, 0x58($sp) -/* 075760 80074B60 0C01D6BB */ jal func_80075AEC +/* 075760 80074B60 0C01D6BB */ jal start_reading_controller_data /* 075764 80074B64 AFA2004C */ sw $v0, 0x4c($sp) /* 075768 80074B68 8FA2004C */ lw $v0, 0x4c($sp) /* 07576C 80074B6C 100000CF */ b .L80074EAC @@ -28,7 +28,7 @@ glabel func_80074B34 .L80074B98: /* 075798 80074B98 8FA40058 */ lw $a0, 0x58($sp) /* 07579C 80074B9C 24C6774C */ addiu $a2, %lo(D_800E774C) # addiu $a2, $a2, 0x774c -/* 0757A0 80074BA0 0C01D93A */ jal func_800764E8 +/* 0757A0 80074BA0 0C01D93A */ jal get_file_number /* 0757A4 80074BA4 27A70048 */ addiu $a3, $sp, 0x48 /* 0757A8 80074BA8 144000A1 */ bnez $v0, .L80074E30 /* 0757AC 80074BAC 00403825 */ move $a3, $v0 @@ -50,8 +50,8 @@ glabel func_80074B34 /* 0757EC 80074BEC 01802825 */ move $a1, $t4 /* 0757F0 80074BF0 31AE0001 */ andi $t6, $t5, 1 /* 0757F4 80074BF4 15C00004 */ bnez $t6, .L80074C08 -/* 0757F8 80074BF8 3C048012 */ lui $a0, %hi(D_80124010) # $a0, 0x8012 -/* 0757FC 80074BFC 8C844010 */ lw $a0, %lo(D_80124010)($a0) +/* 0757F8 80074BF8 3C048012 */ lui $a0, %hi(sControllerMesgQueue) # $a0, 0x8012 +/* 0757FC 80074BFC 8C844010 */ lw $a0, %lo(sControllerMesgQueue)($a0) /* 075800 80074C00 0C033B48 */ jal osPfsInit /* 075804 80074C04 03203025 */ move $a2, $t9 .L80074C08: @@ -162,7 +162,7 @@ glabel func_80074B34 /* 07597C 80074D7C 14400020 */ bnez $v0, .L80074E00 /* 075980 80074D80 24070009 */ li $a3, 9 /* 075984 80074D84 8FA40050 */ lw $a0, 0x50($sp) -/* 075988 80074D88 0C01D293 */ jal func_80074A4C +/* 075988 80074D88 0C01D293 */ jal calculate_ghost_header_checksum /* 07598C 80074D8C 00000000 */ nop /* 075990 80074D90 8FAA0050 */ lw $t2, 0x50($sp) /* 075994 80074D94 8FAE0064 */ lw $t6, 0x64($sp) @@ -211,7 +211,7 @@ glabel func_80074B34 .L80074E30: /* 075A30 80074E30 8FA40058 */ lw $a0, 0x58($sp) .L80074E34: -/* 075A34 80074E34 0C01D6BB */ jal func_80075AEC +/* 075A34 80074E34 0C01D6BB */ jal start_reading_controller_data /* 075A38 80074E38 AFA7004C */ sw $a3, 0x4c($sp) /* 075A3C 80074E3C 8FA7004C */ lw $a3, 0x4c($sp) /* 075A40 80074E40 24010005 */ li $at, 5 @@ -219,7 +219,7 @@ glabel func_80074B34 /* 075A48 80074E48 27A50038 */ addiu $a1, $sp, 0x38 /* 075A4C 80074E4C 8FA40058 */ lw $a0, 0x58($sp) /* 075A50 80074E50 27A60034 */ addiu $a2, $sp, 0x34 -/* 075A54 80074E54 0C01D865 */ jal func_80076194 +/* 075A54 80074E54 0C01D865 */ jal get_free_space /* 075A58 80074E58 AFA7004C */ sw $a3, 0x4c($sp) /* 075A5C 80074E5C 8FA7004C */ lw $a3, 0x4c($sp) /* 075A60 80074E60 1440000E */ bnez $v0, .L80074E9C diff --git a/asm/non_matchings/controller_pak/func_80074EB8.s b/asm/non_matchings/save_data/func_80074EB8.s similarity index 98% rename from asm/non_matchings/controller_pak/func_80074EB8.s rename to asm/non_matchings/save_data/func_80074EB8.s index a32f5bb0..6e6b117f 100644 --- a/asm/non_matchings/controller_pak/func_80074EB8.s +++ b/asm/non_matchings/save_data/func_80074EB8.s @@ -79,7 +79,7 @@ glabel func_80074EB8 /* 075BD0 80074FD0 24E77778 */ addiu $a3, %lo(D_800E7778) # addiu $a3, $a3, 0x7778 /* 075BD4 80074FD4 24C67768 */ addiu $a2, %lo(D_800E7768) # addiu $a2, $a2, 0x7768 /* 075BD8 80074FD8 2405FFFF */ li $a1, -1 -/* 075BDC 80074FDC 0C01D9B5 */ jal func_800766D4 +/* 075BDC 80074FDC 0C01D9B5 */ jal write_controller_pak_file /* 075BE0 80074FE0 AFAD0010 */ sw $t5, 0x10($sp) /* 075BE4 80074FE4 8FA40038 */ lw $a0, 0x38($sp) /* 075BE8 80074FE8 0C01C450 */ jal free_from_memory_pool diff --git a/asm/non_matchings/controller_pak/func_80075000.s b/asm/non_matchings/save_data/func_80075000.s similarity index 95% rename from asm/non_matchings/controller_pak/func_80075000.s rename to asm/non_matchings/save_data/func_80075000.s index 6862d71a..bbe2e44d 100644 --- a/asm/non_matchings/controller_pak/func_80075000.s +++ b/asm/non_matchings/save_data/func_80075000.s @@ -18,12 +18,12 @@ glabel func_80075000 /* 075C14 80075014 AFA40078 */ sw $a0, 0x78($sp) /* 075C18 80075018 AFA5007C */ sw $a1, 0x7c($sp) /* 075C1C 8007501C AFA60080 */ sw $a2, 0x80($sp) -/* 075C20 80075020 0C01D637 */ jal func_800758DC +/* 075C20 80075020 0C01D637 */ jal get_si_device_status /* 075C24 80075024 AFA70084 */ sw $a3, 0x84($sp) /* 075C28 80075028 10400006 */ beqz $v0, .L80075044 /* 075C2C 8007502C 00408025 */ move $s0, $v0 /* 075C30 80075030 8FA40078 */ lw $a0, 0x78($sp) -/* 075C34 80075034 0C01D6BB */ jal func_80075AEC +/* 075C34 80075034 0C01D6BB */ jal start_reading_controller_data /* 075C38 80075038 00000000 */ nop /* 075C3C 8007503C 100000E0 */ b .L800753C0 /* 075C40 80075040 02001025 */ move $v0, $s0 @@ -34,13 +34,13 @@ glabel func_80075000 /* 075C50 80075050 24111100 */ li $s1, 4352 /* 075C54 80075054 24C6778C */ addiu $a2, %lo(D_800E778C) # addiu $a2, $a2, 0x778c /* 075C58 80075058 24A5777C */ addiu $a1, %lo(D_800E777C) # addiu $a1, $a1, 0x777c -/* 075C5C 8007505C 0C01D93A */ jal func_800764E8 +/* 075C5C 8007505C 0C01D93A */ jal get_file_number /* 075C60 80075060 27A7004C */ addiu $a3, $sp, 0x4c /* 075C64 80075064 24010005 */ li $at, 5 /* 075C68 80075068 14410011 */ bne $v0, $at, .L800750B0 /* 075C6C 8007506C 00408025 */ move $s0, $v0 /* 075C70 80075070 8FA40078 */ lw $a0, 0x78($sp) -/* 075C74 80075074 0C01D6BB */ jal func_80075AEC +/* 075C74 80075074 0C01D6BB */ jal start_reading_controller_data /* 075C78 80075078 00000000 */ nop /* 075C7C 8007507C 87AE008A */ lh $t6, 0x8a($sp) /* 075C80 80075080 87AF008E */ lh $t7, 0x8e($sp) @@ -59,19 +59,19 @@ glabel func_80075000 /* 075CB0 800750B0 10400007 */ beqz $v0, .L800750D0 /* 075CB4 800750B4 8FA40078 */ lw $a0, 0x78($sp) /* 075CB8 800750B8 8FA40078 */ lw $a0, 0x78($sp) -/* 075CBC 800750BC 0C01D6BB */ jal func_80075AEC +/* 075CBC 800750BC 0C01D6BB */ jal start_reading_controller_data /* 075CC0 800750C0 00000000 */ nop /* 075CC4 800750C4 100000BE */ b .L800753C0 /* 075CC8 800750C8 02001025 */ move $v0, $s0 /* 075CCC 800750CC 8FA40078 */ lw $a0, 0x78($sp) .L800750D0: /* 075CD0 800750D0 8FA5004C */ lw $a1, 0x4c($sp) -/* 075CD4 800750D4 0C01DA49 */ jal func_80076924 +/* 075CD4 800750D4 0C01DA49 */ jal get_file_size /* 075CD8 800750D8 27A60054 */ addiu $a2, $sp, 0x54 /* 075CDC 800750DC 10400006 */ beqz $v0, .L800750F8 /* 075CE0 800750E0 00408025 */ move $s0, $v0 /* 075CE4 800750E4 8FA40078 */ lw $a0, 0x78($sp) -/* 075CE8 800750E8 0C01D6BB */ jal func_80075AEC +/* 075CE8 800750E8 0C01D6BB */ jal start_reading_controller_data /* 075CEC 800750EC 00000000 */ nop /* 075CF0 800750F0 100000B3 */ b .L800753C0 /* 075CF4 800750F4 02001025 */ move $v0, $s0 @@ -87,7 +87,7 @@ glabel func_80075000 /* 075D18 80075118 0C01D984 */ jal read_data_from_controller_pak /* 075D1C 8007511C 00403025 */ move $a2, $v0 /* 075D20 80075120 8FA40078 */ lw $a0, 0x78($sp) -/* 075D24 80075124 0C01D6BB */ jal func_80075AEC +/* 075D24 80075124 0C01D6BB */ jal start_reading_controller_data /* 075D28 80075128 00408025 */ move $s0, $v0 /* 075D2C 8007512C 12000005 */ beqz $s0, .L80075144 /* 075D30 80075130 3C014748 */ lui $at, (0x47485353 >> 16) # lui $at, 0x4748 @@ -257,7 +257,7 @@ glabel func_80075000 /* 075F8C 8007538C 24E777A0 */ addiu $a3, %lo(D_800E77A0) # addiu $a3, $a3, 0x77a0 /* 075F90 80075390 24C67790 */ addiu $a2, %lo(D_800E7790) # addiu $a2, $a2, 0x7790 /* 075F94 80075394 AFAE0014 */ sw $t6, 0x14($sp) -/* 075F98 80075398 0C01D9B5 */ jal func_800766D4 +/* 075F98 80075398 0C01D9B5 */ jal write_controller_pak_file /* 075F9C 8007539C AFAD0010 */ sw $t5, 0x10($sp) /* 075FA0 800753A0 8FA40068 */ lw $a0, 0x68($sp) /* 075FA4 800753A4 0C01C450 */ jal free_from_memory_pool diff --git a/asm/non_matchings/controller_pak/func_800753D8.s b/asm/non_matchings/save_data/func_800753D8.s similarity index 95% rename from asm/non_matchings/controller_pak/func_800753D8.s rename to asm/non_matchings/save_data/func_800753D8.s index 40737298..895d50a7 100644 --- a/asm/non_matchings/controller_pak/func_800753D8.s +++ b/asm/non_matchings/save_data/func_800753D8.s @@ -13,12 +13,12 @@ glabel func_800753D8 /* 075FD8 800753D8 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 075FDC 800753DC AFBF001C */ sw $ra, 0x1c($sp) /* 075FE0 800753E0 AFA40050 */ sw $a0, 0x50($sp) -/* 075FE4 800753E4 0C01D637 */ jal func_800758DC +/* 075FE4 800753E4 0C01D637 */ jal get_si_device_status /* 075FE8 800753E8 AFA50054 */ sw $a1, 0x54($sp) /* 075FEC 800753EC 10400007 */ beqz $v0, .L8007540C /* 075FF0 800753F0 3C05800E */ lui $a1, %hi(D_800E77A4) # $a1, 0x800e /* 075FF4 800753F4 8FA40050 */ lw $a0, 0x50($sp) -/* 075FF8 800753F8 0C01D6BB */ jal func_80075AEC +/* 075FF8 800753F8 0C01D6BB */ jal start_reading_controller_data /* 075FFC 800753FC AFA20040 */ sw $v0, 0x40($sp) /* 076000 80075400 8FA20040 */ lw $v0, 0x40($sp) /* 076004 80075404 100000B0 */ b .L800756C8 @@ -28,18 +28,18 @@ glabel func_800753D8 /* 076010 80075410 3C06800E */ lui $a2, %hi(D_800E77B4) # $a2, 0x800e /* 076014 80075414 24C677B4 */ addiu $a2, %lo(D_800E77B4) # addiu $a2, $a2, 0x77b4 /* 076018 80075418 24A577A4 */ addiu $a1, %lo(D_800E77A4) # addiu $a1, $a1, 0x77a4 -/* 07601C 8007541C 0C01D93A */ jal func_800764E8 +/* 07601C 8007541C 0C01D93A */ jal get_file_number /* 076020 80075420 27A70034 */ addiu $a3, $sp, 0x34 /* 076024 80075424 144000A1 */ bnez $v0, .L800756AC /* 076028 80075428 00401825 */ move $v1, $v0 /* 07602C 8007542C 8FA40050 */ lw $a0, 0x50($sp) /* 076030 80075430 8FA50034 */ lw $a1, 0x34($sp) -/* 076034 80075434 0C01DA49 */ jal func_80076924 +/* 076034 80075434 0C01DA49 */ jal get_file_size /* 076038 80075438 27A60030 */ addiu $a2, $sp, 0x30 /* 07603C 8007543C 10400007 */ beqz $v0, .L8007545C /* 076040 80075440 240500FF */ li $a1, 255 /* 076044 80075444 8FA40050 */ lw $a0, 0x50($sp) -/* 076048 80075448 0C01D6BB */ jal func_80075AEC +/* 076048 80075448 0C01D6BB */ jal start_reading_controller_data /* 07604C 8007544C AFA20040 */ sw $v0, 0x40($sp) /* 076050 80075450 8FA20040 */ lw $v0, 0x40($sp) /* 076054 80075454 1000009C */ b .L800756C8 @@ -55,7 +55,7 @@ glabel func_800753D8 /* 076078 80075478 0C01D984 */ jal read_data_from_controller_pak /* 07607C 8007547C 00403025 */ move $a2, $v0 /* 076080 80075480 8FA40050 */ lw $a0, 0x50($sp) -/* 076084 80075484 0C01D6BB */ jal func_80075AEC +/* 076084 80075484 0C01D6BB */ jal start_reading_controller_data /* 076088 80075488 AFA20040 */ sw $v0, 0x40($sp) /* 07608C 8007548C 8FA30040 */ lw $v1, 0x40($sp) /* 076090 80075490 8FAE0048 */ lw $t6, 0x48($sp) @@ -184,7 +184,7 @@ glabel func_800753D8 /* 076264 80075664 24E777C8 */ addiu $a3, %lo(D_800E77C8) # addiu $a3, $a3, 0x77c8 /* 076268 80075668 24C677B8 */ addiu $a2, %lo(D_800E77B8) # addiu $a2, $a2, 0x77b8 /* 07626C 8007566C AFA90010 */ sw $t1, 0x10($sp) -/* 076270 80075670 0C01D9B5 */ jal func_800766D4 +/* 076270 80075670 0C01D9B5 */ jal write_controller_pak_file /* 076274 80075674 AFB80014 */ sw $t8, 0x14($sp) /* 076278 80075678 10000001 */ b .L80075680 /* 07627C 8007567C 00401825 */ move $v1, $v0 @@ -203,7 +203,7 @@ glabel func_800753D8 /* 0762A8 800756A8 00601025 */ move $v0, $v1 .L800756AC: /* 0762AC 800756AC 8FA40050 */ lw $a0, 0x50($sp) -/* 0762B0 800756B0 0C01D6BB */ jal func_80075AEC +/* 0762B0 800756B0 0C01D6BB */ jal start_reading_controller_data /* 0762B4 800756B4 AFA30040 */ sw $v1, 0x40($sp) /* 0762B8 800756B8 8FA30040 */ lw $v1, 0x40($sp) /* 0762BC 800756BC 00000000 */ nop diff --git a/asm/non_matchings/controller_pak/func_800756D4.s b/asm/non_matchings/save_data/func_800756D4.s similarity index 94% rename from asm/non_matchings/controller_pak/func_800756D4.s rename to asm/non_matchings/save_data/func_800756D4.s index cf2090e6..f19b872e 100644 --- a/asm/non_matchings/controller_pak/func_800756D4.s +++ b/asm/non_matchings/save_data/func_800756D4.s @@ -20,12 +20,12 @@ glabel func_800756D4 /* 076300 80075700 AFB20020 */ sw $s2, 0x20($sp) /* 076304 80075704 AFB1001C */ sw $s1, 0x1c($sp) /* 076308 80075708 AFB00018 */ sw $s0, 0x18($sp) -/* 07630C 8007570C 0C01D637 */ jal func_800758DC +/* 07630C 8007570C 0C01D637 */ jal get_si_device_status /* 076310 80075710 AFA40070 */ sw $a0, 0x70($sp) /* 076314 80075714 10400007 */ beqz $v0, .L80075734 /* 076318 80075718 AFA20064 */ sw $v0, 0x64($sp) /* 07631C 8007571C 8FA40070 */ lw $a0, 0x70($sp) -/* 076320 80075720 0C01D6BB */ jal func_80075AEC +/* 076320 80075720 0C01D6BB */ jal start_reading_controller_data /* 076324 80075724 00000000 */ nop /* 076328 80075728 8FA20064 */ lw $v0, 0x64($sp) /* 07632C 8007572C 10000060 */ b .L800758B0 @@ -56,13 +56,13 @@ glabel func_800756D4 /* 076388 80075788 3C06800E */ lui $a2, %hi(D_800E77DC) # $a2, 0x800e /* 07638C 8007578C 24C677DC */ addiu $a2, %lo(D_800E77DC) # addiu $a2, $a2, 0x77dc /* 076390 80075790 24A577CC */ addiu $a1, %lo(D_800E77CC) # addiu $a1, $a1, 0x77cc -/* 076394 80075794 0C01D93A */ jal func_800764E8 +/* 076394 80075794 0C01D93A */ jal get_file_number /* 076398 80075798 27A7005C */ addiu $a3, $sp, 0x5c /* 07639C 8007579C 1440003E */ bnez $v0, .L80075898 /* 0763A0 800757A0 AFA20064 */ sw $v0, 0x64($sp) /* 0763A4 800757A4 8FA40070 */ lw $a0, 0x70($sp) /* 0763A8 800757A8 8FA5005C */ lw $a1, 0x5c($sp) -/* 0763AC 800757AC 0C01DA49 */ jal func_80076924 +/* 0763AC 800757AC 0C01DA49 */ jal get_file_size /* 0763B0 800757B0 27A60058 */ addiu $a2, $sp, 0x58 /* 0763B4 800757B4 14400038 */ bnez $v0, .L80075898 /* 0763B8 800757B8 AFA20064 */ sw $v0, 0x64($sp) @@ -88,7 +88,7 @@ glabel func_800756D4 /* 076404 80075804 126E001F */ beq $s3, $t6, .L80075884 /* 076408 80075808 00000000 */ nop /* 07640C 8007580C 862F0002 */ lh $t7, 2($s1) -/* 076410 80075810 0C01D293 */ jal func_80074A4C +/* 076410 80075810 0C01D293 */ jal calculate_ghost_header_checksum /* 076414 80075814 01F22021 */ addu $a0, $t7, $s2 /* 076418 80075818 86380002 */ lh $t8, 2($s1) /* 07641C 8007581C 00000000 */ nop @@ -127,7 +127,7 @@ glabel func_800756D4 /* 076494 80075894 02402025 */ move $a0, $s2 .L80075898: /* 076498 80075898 8FA40070 */ lw $a0, 0x70($sp) -/* 07649C 8007589C 0C01D6BB */ jal func_80075AEC +/* 07649C 8007589C 0C01D6BB */ jal start_reading_controller_data /* 0764A0 800758A0 00000000 */ nop /* 0764A4 800758A4 8FA20064 */ lw $v0, 0x64($sp) /* 0764A8 800758A8 00000000 */ nop diff --git a/asm/non_matchings/controller_pak/func_80075B18.s b/asm/non_matchings/save_data/init_controller_paks.s similarity index 75% rename from asm/non_matchings/controller_pak/func_80075B18.s rename to asm/non_matchings/save_data/init_controller_paks.s index 820b5d28..ef0d8570 100644 --- a/asm/non_matchings/controller_pak/func_80075B18.s +++ b/asm/non_matchings/save_data/init_controller_paks.s @@ -1,4 +1,4 @@ -glabel func_80075B18 +glabel init_controller_paks /* 076718 80075B18 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 07671C 80075B1C AFBF003C */ sw $ra, 0x3c($sp) /* 076720 80075B20 AFBE0038 */ sw $fp, 0x38($sp) @@ -9,15 +9,15 @@ glabel func_80075B18 /* 076734 80075B34 AFB30024 */ sw $s3, 0x24($sp) /* 076738 80075B38 AFB20020 */ sw $s2, 0x20($sp) /* 07673C 80075B3C AFB1001C */ sw $s1, 0x1c($sp) -/* 076740 80075B40 0C01A840 */ jal func_8006A100 +/* 076740 80075B40 0C01A840 */ jal get_si_mesg_queue /* 076744 80075B44 AFB00018 */ sw $s0, 0x18($sp) -/* 076748 80075B48 3C148012 */ lui $s4, %hi(D_80124010) # $s4, 0x8012 -/* 07674C 80075B4C 26944010 */ addiu $s4, %lo(D_80124010) # addiu $s4, $s4, 0x4010 +/* 076748 80075B48 3C148012 */ lui $s4, %hi(sControllerMesgQueue) # $s4, 0x8012 +/* 07674C 80075B4C 26944010 */ addiu $s4, %lo(sControllerMesgQueue) # addiu $s4, $s4, 0x4010 /* 076750 80075B50 AE820000 */ sw $v0, ($s4) /* 076754 80075B54 0C0078A7 */ jal get_misc_asset /* 076758 80075B58 24040013 */ li $a0, 19 -/* 07675C 80075B5C 3C018012 */ lui $at, %hi(D_801241E0) # $at, 0x8012 -/* 076760 80075B60 AC2241E0 */ sw $v0, %lo(D_801241E0)($at) +/* 07675C 80075B5C 3C018012 */ lui $at, %hi(sUnkMiscAsset19) # $at, 0x8012 +/* 076760 80075B60 AC2241E0 */ sw $v0, %lo(sUnkMiscAsset19)($at) /* 076764 80075B64 3C038012 */ lui $v1, %hi(D_801241E7) # $v1, 0x8012 /* 076768 80075B68 246341E7 */ addiu $v1, %lo(D_801241E7) # addiu $v1, $v1, 0x41e7 /* 07676C 80075B6C 240F000F */ li $t7, 15 @@ -31,11 +31,11 @@ glabel func_80075B18 /* 07678C 80075B8C AC2041E8 */ sw $zero, %lo(D_801241E8)($at) /* 076790 80075B90 3C01800E */ lui $at, %hi(D_800DE48C) # $at, 0x800e /* 076794 80075B94 24190001 */ li $t9, 1 -/* 076798 80075B98 3C158012 */ lui $s5, %hi(D_801241E5) # $s5, 0x8012 -/* 07679C 80075B9C 3C16800E */ lui $s6, %hi(D_800DE488) # $s6, 0x800e +/* 076798 80075B98 3C158012 */ lui $s5, %hi(sRumblePaksPresent) # $s5, 0x8012 +/* 07679C 80075B9C 3C16800E */ lui $s6, %hi(sControllerPaksPresent) # $s6, 0x800e /* 0767A0 80075BA0 AC39E48C */ sw $t9, %lo(D_800DE48C)($at) -/* 0767A4 80075BA4 26D6E488 */ addiu $s6, %lo(D_800DE488) # addiu $s6, $s6, -0x1b78 -/* 0767A8 80075BA8 26B541E5 */ addiu $s5, %lo(D_801241E5) # addiu $s5, $s5, 0x41e5 +/* 0767A4 80075BA4 26D6E488 */ addiu $s6, %lo(sControllerPaksPresent) # addiu $s6, $s6, -0x1b78 +/* 0767A8 80075BA8 26B541E5 */ addiu $s5, %lo(sRumblePaksPresent) # addiu $s5, $s5, 0x41e5 /* 0767AC 80075BAC 8E840000 */ lw $a0, ($s4) /* 0767B0 80075BB0 A2A00000 */ sb $zero, ($s5) /* 0767B4 80075BB4 A2C00000 */ sb $zero, ($s6) @@ -118,28 +118,3 @@ glabel func_80075B18 /* 0768D4 80075CD4 8FBE0038 */ lw $fp, 0x38($sp) /* 0768D8 80075CD8 03E00008 */ jr $ra /* 0768DC 80075CDC 27BD0058 */ addiu $sp, $sp, 0x58 - -/* 0768E0 80075CE0 27BDFFE0 */ addiu $sp, $sp, -0x20 -/* 0768E4 80075CE4 AFBF0014 */ sw $ra, 0x14($sp) -/* 0768E8 80075CE8 0C01D637 */ jal func_800758DC -/* 0768EC 80075CEC AFA40020 */ sw $a0, 0x20($sp) -/* 0768F0 80075CF0 8FA40020 */ lw $a0, 0x20($sp) -/* 0768F4 80075CF4 0C01D6BB */ jal func_80075AEC -/* 0768F8 80075CF8 AFA2001C */ sw $v0, 0x1c($sp) -/* 0768FC 80075CFC 8FA3001C */ lw $v1, 0x1c($sp) -/* 076900 80075D00 24010007 */ li $at, 7 -/* 076904 80075D04 14610008 */ bne $v1, $at, .L80075D28 -/* 076908 80075D08 3C028012 */ lui $v0, %hi(D_801241E5) # $v0, 0x8012 -/* 07690C 80075D0C 8FAF0020 */ lw $t7, 0x20($sp) -/* 076910 80075D10 244241E5 */ addiu $v0, %lo(D_801241E5) # addiu $v0, $v0, 0x41e5 -/* 076914 80075D14 904E0000 */ lbu $t6, ($v0) -/* 076918 80075D18 24180001 */ li $t8, 1 -/* 07691C 80075D1C 01F8C804 */ sllv $t9, $t8, $t7 -/* 076920 80075D20 01D94025 */ or $t0, $t6, $t9 -/* 076924 80075D24 A0480000 */ sb $t0, ($v0) -.L80075D28: -/* 076928 80075D28 8FBF0014 */ lw $ra, 0x14($sp) -/* 07692C 80075D2C 27BD0020 */ addiu $sp, $sp, 0x20 -/* 076930 80075D30 03E00008 */ jr $ra -/* 076934 80075D34 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/textures_sprites/func_8007C12C.s b/asm/non_matchings/textures_sprites/func_8007C12C.s index 9a83a4d6..7deafd99 100644 --- a/asm/non_matchings/textures_sprites/func_8007C12C.s +++ b/asm/non_matchings/textures_sprites/func_8007C12C.s @@ -159,8 +159,8 @@ glabel func_8007C12C /* 07CF74 8007C374 AE780008 */ sw $t8, 8($s3) /* 07CF78 8007C378 1AA0001E */ blez $s5, .L8007C3F4 /* 07CF7C 8007C37C 00001825 */ move $v1, $zero -/* 07CF80 8007C380 3C12800E */ lui $s2, %hi(gTexColorTag) # $s2, 0x800e -/* 07CF84 8007C384 2652E7C0 */ addiu $s2, %lo(gTexColorTag) # addiu $s2, $s2, -0x1840 +/* 07CF80 8007C380 3C12800E */ lui $s2, %hi(gTexColourTag) # $s2, 0x800e +/* 07CF84 8007C384 2652E7C0 */ addiu $s2, %lo(gTexColourTag) # addiu $s2, $s2, -0x1840 /* 07CF88 8007C388 00008825 */ move $s1, $zero .L8007C38C: /* 07CF8C 8007C38C 3C0B00FF */ lui $t3, (0x00FF0163 >> 16) # lui $t3, 0xff diff --git a/asm/non_matchings/textures_sprites/load_texture.s b/asm/non_matchings/textures_sprites/load_texture.s index 2f256038..f59504ed 100644 --- a/asm/non_matchings/textures_sprites/load_texture.s +++ b/asm/non_matchings/textures_sprites/load_texture.s @@ -80,8 +80,8 @@ glabel load_texture /* 07BB94 8007AF94 01608825 */ move $s1, $t3 /* 07BB98 8007AF98 000B6880 */ sll $t5, $t3, 2 /* 07BB9C 8007AF9C 01AB6823 */ subu $t5, $t5, $t3 -/* 07BBA0 8007AFA0 3C05800E */ lui $a1, %hi(gTexColorTag) # $a1, 0x800e -/* 07BBA4 8007AFA4 8CA5E7C0 */ lw $a1, %lo(gTexColorTag)($a1) +/* 07BBA0 8007AFA0 3C05800E */ lui $a1, %hi(gTexColourTag) # $a1, 0x800e +/* 07BBA4 8007AFA4 8CA5E7C0 */ lw $a1, %lo(gTexColourTag)($a1) /* 07BBA8 8007AFA8 000D6940 */ sll $t5, $t5, 5 /* 07BBAC 8007AFAC 01AE2021 */ addu $a0, $t5, $t6 /* 07BBB0 8007AFB0 0C01C344 */ jal allocate_from_main_pool @@ -105,9 +105,9 @@ glabel load_texture /* 07BBF0 8007AFF0 0011C080 */ sll $t8, $s1, 2 /* 07BBF4 8007AFF4 0311C023 */ subu $t8, $t8, $s1 /* 07BBF8 8007AFF8 0018C140 */ sll $t8, $t8, 5 -/* 07BBFC 8007AFFC 3C05800E */ lui $a1, %hi(gTexColorTag) # $a1, 0x800e +/* 07BBFC 8007AFFC 3C05800E */ lui $a1, %hi(gTexColourTag) # $a1, 0x800e /* 07BC00 8007B000 244F0020 */ addiu $t7, $v0, 0x20 -/* 07BC04 8007B004 8CA5E7C0 */ lw $a1, %lo(gTexColorTag)($a1) +/* 07BC04 8007B004 8CA5E7C0 */ lw $a1, %lo(gTexColourTag)($a1) /* 07BC08 8007B008 03022021 */ addu $a0, $t8, $v0 /* 07BC0C 8007B00C AFAF003C */ sw $t7, 0x3c($sp) /* 07BC10 8007B010 24840020 */ addiu $a0, $a0, 0x20 diff --git a/asm/non_matchings/thread0_epc/func_800B71B0.s b/asm/non_matchings/thread0_epc/func_800B71B0.s index 24eb430f..37c1e005 100644 --- a/asm/non_matchings/thread0_epc/func_800B71B0.s +++ b/asm/non_matchings/thread0_epc/func_800B71B0.s @@ -168,7 +168,7 @@ glabel func_800B71B0 /* 0B8018 800B7418 24C68EDC */ addiu $a2, %lo(D_800E8EDC) # addiu $a2, $a2, -0x7124 /* 0B801C 800B741C 00002025 */ move $a0, $zero /* 0B8020 800B7420 2405FFFF */ li $a1, -1 -/* 0B8024 800B7424 0C01D9B5 */ jal func_800766D4 +/* 0B8024 800B7424 0C01D9B5 */ jal write_controller_pak_file /* 0B8028 800B7428 24E78EE4 */ addiu $a3, %lo(D_800E8EE4) # addiu $a3, $a3, -0x711c .L800B742C: /* 0B802C 800B742C 1000FFFF */ b .L800B742C diff --git a/asm/non_matchings/thread0_epc/func_800B7460.s b/asm/non_matchings/thread0_epc/func_800B7460.s index 484121ac..e878d873 100644 --- a/asm/non_matchings/thread0_epc/func_800B7460.s +++ b/asm/non_matchings/thread0_epc/func_800B7460.s @@ -150,7 +150,7 @@ glabel func_800B7460 /* 0B828C 800B768C 24C68EE8 */ addiu $a2, %lo(D_800E8EE8) # addiu $a2, $a2, -0x7118 /* 0B8290 800B7690 00002025 */ move $a0, $zero /* 0B8294 800B7694 2405FFFF */ li $a1, -1 -/* 0B8298 800B7698 0C01D9B5 */ jal func_800766D4 +/* 0B8298 800B7698 0C01D9B5 */ jal write_controller_pak_file /* 0B829C 800B769C 24E78EF0 */ addiu $a3, %lo(D_800E8EF0) # addiu $a3, $a3, -0x7110 .L800B76A0: /* 0B82A0 800B76A0 1000FFFF */ b .L800B76A0 diff --git a/asm/non_matchings/unknown_00BC20/func_8000EA54.s b/asm/non_matchings/unknown_00BC20/func_8000EA54.s index d116c61e..27b18dad 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000EA54.s +++ b/asm/non_matchings/unknown_00BC20/func_8000EA54.s @@ -752,7 +752,7 @@ glabel L8000EDE0 .L8000F500: /* 010100 8000F500 3C108012 */ lui $s0, %hi(objCount) # $s0, 0x8012 /* 010104 8000F504 8FA50068 */ lw $a1, 0x68($sp) -/* 010108 8000F508 0C008E2F */ jal func_800238BC +/* 010108 8000F508 0C008E2F */ jal run_object_init_func /* 01010C 8000F50C 2610AE5C */ addiu $s0, %lo(objCount) # addiu $s0, $s0, -0x51a4 /* 010110 8000F510 8E42004C */ lw $v0, 0x4c($s2) /* 010114 8000F514 00000000 */ nop diff --git a/asm/non_matchings/unknown_00BC20/func_8001B3C4.s b/asm/non_matchings/unknown_00BC20/func_8001B3C4.s index 745e4164..f736645f 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001B3C4.s +++ b/asm/non_matchings/unknown_00BC20/func_8001B3C4.s @@ -37,9 +37,9 @@ glabel func_8001B3C4 /* 01C048 8001B448 240A0010 */ li $t2, 16 /* 01C04C 8001B44C 11200024 */ beqz $t1, .L8001B4E0 /* 01C050 8001B450 00CA2804 */ sllv $a1, $t2, $a2 -/* 01C054 8001B454 0C027A9E */ jal func_8009EA78 +/* 01C054 8001B454 0C027A9E */ jal set_eeprom_settings_value /* 01C058 8001B458 000527C3 */ sra $a0, $a1, 0x1f -/* 01C05C 8001B45C 0C027AC2 */ jal func_8009EB08 +/* 01C05C 8001B45C 0C027AC2 */ jal get_eeprom_settings /* 01C060 8001B460 00000000 */ nop /* 01C064 8001B464 3C0100FF */ lui $at, (0x00FFFFF0 >> 16) # lui $at, 0xff /* 01C068 8001B468 3421FFF0 */ ori $at, (0x00FFFFF0 & 0xFFFF) # ori $at, $at, 0xfff0 diff --git a/asm/non_matchings/unknown_00BC20/func_8001B4FC.s b/asm/non_matchings/unknown_00BC20/func_8001B4FC.s index adf4dc4f..59e3f811 100644 --- a/asm/non_matchings/unknown_00BC20/func_8001B4FC.s +++ b/asm/non_matchings/unknown_00BC20/func_8001B4FC.s @@ -58,7 +58,7 @@ glabel func_8001B4FC /* 01C1D0 8001B5D0 018B082A */ slt $at, $t4, $t3 /* 01C1D4 8001B5D4 14200015 */ bnez $at, .L8001B62C /* 01C1D8 8001B5D8 8FBF001C */ lw $ra, 0x1c($sp) -/* 01C1DC 8001B5DC 0C027AC2 */ jal func_8009EB08 +/* 01C1DC 8001B5DC 0C027AC2 */ jal get_eeprom_settings /* 01C1E0 8001B5E0 AFA6002C */ sw $a2, 0x2c($sp) /* 01C1E4 8001B5E4 8FA6002C */ lw $a2, 0x2c($sp) /* 01C1E8 8001B5E8 240E0010 */ li $t6, 16 diff --git a/asm/non_matchings/unknown_00BC20/func_80023E30.s b/asm/non_matchings/unknown_00BC20/func_80023E30.s deleted file mode 100644 index 0a33dd34..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80023E30.s +++ /dev/null @@ -1,136 +0,0 @@ -.late_rodata -glabel jpt_800E5A3C -.word L80023E5C, L80023E64, L80023F40, L80023F40, L80023E6C, L80023F40, L80023F14, L80023F40, L80023F40, L80023F40, L80023F40, L80023E74, L80023F14, L80023E7C, L80023F40, L80023F40, L80023E84, L80023F14, L80023F40, L80023F40, L80023F40, L80023F40, L80023F40, L80023E9C, L80023F40, L80023F14, L80023F40, L80023F40, L80023F40, L80023F14, L80023EA4, L80023EAC, L80023F40, L80023F40, L80023F40, L80023F14, L80023F40, L80023EBC, L80023EC4, L80023ECC, L80023F14, L80023F40, L80023F40, L80023F40, L80023ED4, L80023F40, L80023F40, L80023EDC, L80023F24, L80023EEC, L80023F24, L80023F14, L80023F40, L80023EF4, L80023F14, L80023EEC, L80023F14, L80023F40, L80023F40, L80023F40, L80023F24, L80023F2C, L80023EE4, L80023EAC, L80023F40, L80023F40, L80023EB4, L80023F14, L80023F40, L80023E8C, L80023F40, L80023E8C, L80023F40, L80023EFC, L80023F40, L80023F40, L80023E84, L80023F14, L80023F14, L80023EEC, L80023F0C, L80023F1C, L80023F40, L80023EEC, L80023F40, L80023EEC, L80023F40, L80023EAC, L80023F40, L80023F40, L80023F04, L80023F40, L80023F14, L80023F40, L80023EFC, L80023E8C, L80023E8C, L80023F14, L80023EFC, L80023EFC, L80023E94, L80023E94, L80023E94, L80023E94, L80023F40, L80023F40, L80023F40, L80023F14, L80023F34, L80023EAC, L80023E7C, L80023F40, L80023F40, L80023F3C, L80023EEC, L80023F14 - -.text -glabel func_80023E30 -/* 024A30 80023E30 248EFFFF */ addiu $t6, $a0, -1 -/* 024A34 80023E34 2DC10074 */ sltiu $at, $t6, 0x74 -/* 024A38 80023E38 10200041 */ beqz $at, .L80023F40 -/* 024A3C 80023E3C 00001825 */ move $v1, $zero -/* 024A40 80023E40 000E7080 */ sll $t6, $t6, 2 -/* 024A44 80023E44 3C01800E */ lui $at, %hi(jpt_800E5A3C) # $at, 0x800e -/* 024A48 80023E48 002E0821 */ addu $at, $at, $t6 -/* 024A4C 80023E4C 8C2E5A3C */ lw $t6, %lo(jpt_800E5A3C)($at) -/* 024A50 80023E50 00000000 */ nop -/* 024A54 80023E54 01C00008 */ jr $t6 -/* 024A58 80023E58 00000000 */ nop -glabel L80023E5C -/* 024A5C 80023E5C 03E00008 */ jr $ra -/* 024A60 80023E60 2402001F */ li $v0, 31 - -glabel L80023E64 -/* 024A64 80023E64 03E00008 */ jr $ra -/* 024A68 80023E68 24020013 */ li $v0, 19 - -glabel L80023E6C -/* 024A6C 80023E6C 03E00008 */ jr $ra -/* 024A70 80023E70 24020016 */ li $v0, 22 - -glabel L80023E74 -/* 024A74 80023E74 03E00008 */ jr $ra -/* 024A78 80023E78 2402001B */ li $v0, 27 - -glabel L80023E7C -/* 024A7C 80023E7C 03E00008 */ jr $ra -/* 024A80 80023E80 24020030 */ li $v0, 48 - -glabel L80023E84 -/* 024A84 80023E84 03E00008 */ jr $ra -/* 024A88 80023E88 24020012 */ li $v0, 18 - -glabel L80023E8C -/* 024A8C 80023E8C 03E00008 */ jr $ra -/* 024A90 80023E90 2402003B */ li $v0, 59 - -glabel L80023E94 -/* 024A94 80023E94 03E00008 */ jr $ra -/* 024A98 80023E98 2402003A */ li $v0, 58 - -glabel L80023E9C -/* 024A9C 80023E9C 03E00008 */ jr $ra -/* 024AA0 80023EA0 24020004 */ li $v0, 4 - -glabel L80023EA4 -/* 024AA4 80023EA4 03E00008 */ jr $ra -/* 024AA8 80023EA8 2402001B */ li $v0, 27 - -glabel L80023EAC -/* 024AAC 80023EAC 03E00008 */ jr $ra -/* 024AB0 80023EB0 24020012 */ li $v0, 18 - -glabel L80023EB4 -/* 024AB4 80023EB4 03E00008 */ jr $ra -/* 024AB8 80023EB8 24020030 */ li $v0, 48 - -glabel L80023EBC -/* 024ABC 80023EBC 03E00008 */ jr $ra -/* 024AC0 80023EC0 24020039 */ li $v0, 57 - -glabel L80023EC4 -/* 024AC4 80023EC4 03E00008 */ jr $ra -/* 024AC8 80023EC8 24020012 */ li $v0, 18 - -glabel L80023ECC -/* 024ACC 80023ECC 03E00008 */ jr $ra -/* 024AD0 80023ED0 24020009 */ li $v0, 9 - -glabel L80023ED4 -/* 024AD4 80023ED4 03E00008 */ jr $ra -/* 024AD8 80023ED8 24020012 */ li $v0, 18 - -glabel L80023EDC -/* 024ADC 80023EDC 03E00008 */ jr $ra -/* 024AE0 80023EE0 24020009 */ li $v0, 9 - -glabel L80023EE4 -/* 024AE4 80023EE4 03E00008 */ jr $ra -/* 024AE8 80023EE8 24020009 */ li $v0, 9 - -glabel L80023EEC -/* 024AEC 80023EEC 03E00008 */ jr $ra -/* 024AF0 80023EF0 2402000B */ li $v0, 11 - -glabel L80023EF4 -/* 024AF4 80023EF4 03E00008 */ jr $ra -/* 024AF8 80023EF8 2402000B */ li $v0, 11 - -glabel L80023EFC -/* 024AFC 80023EFC 03E00008 */ jr $ra -/* 024B00 80023F00 24020031 */ li $v0, 49 - -glabel L80023F04 -/* 024B04 80023F04 03E00008 */ jr $ra -/* 024B08 80023F08 24020001 */ li $v0, 1 - -glabel L80023F0C -/* 024B0C 80023F0C 03E00008 */ jr $ra -/* 024B10 80023F10 2402000A */ li $v0, 10 - -glabel L80023F14 -/* 024B14 80023F14 03E00008 */ jr $ra -/* 024B18 80023F18 24020010 */ li $v0, 16 - -glabel L80023F1C -/* 024B1C 80023F1C 03E00008 */ jr $ra -/* 024B20 80023F20 24020012 */ li $v0, 18 - -glabel L80023F24 -/* 024B24 80023F24 03E00008 */ jr $ra -/* 024B28 80023F28 24020002 */ li $v0, 2 - -glabel L80023F2C -/* 024B2C 80023F2C 03E00008 */ jr $ra -/* 024B30 80023F30 2402001B */ li $v0, 27 - -glabel L80023F34 -/* 024B34 80023F34 03E00008 */ jr $ra -/* 024B38 80023F38 2402000B */ li $v0, 11 - -glabel L80023F3C -/* 024B3C 80023F3C 24030001 */ li $v1, 1 -.L80023F40: -glabel L80023F40 -/* 024B40 80023F40 03E00008 */ jr $ra -/* 024B44 80023F44 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/unknown_0255E0/func_80030A74.s b/asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s similarity index 99% rename from asm/non_matchings/unknown_0255E0/func_80030A74.s rename to asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s index 8f39fd06..193f4179 100644 --- a/asm/non_matchings/unknown_0255E0/func_80030A74.s +++ b/asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s @@ -1,4 +1,4 @@ -glabel func_80030A74 +glabel obj_loop_fogchanger /* 031674 80030A74 27BDFF80 */ addiu $sp, $sp, -0x80 /* 031678 80030A78 AFBF0024 */ sw $ra, 0x24($sp) /* 03167C 80030A7C AFB30020 */ sw $s3, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_80033DD0.s b/asm/non_matchings/unknown_032760/func_80033DD0.s deleted file mode 100644 index f01632ce..00000000 --- a/asm/non_matchings/unknown_032760/func_80033DD0.s +++ /dev/null @@ -1,102 +0,0 @@ -glabel func_80033DD0 -/* 0349D0 80033DD0 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0349D4 80033DD4 AFBF0024 */ sw $ra, 0x24($sp) -/* 0349D8 80033DD8 AFB00020 */ sw $s0, 0x20($sp) -/* 0349DC 80033DDC 8C82004C */ lw $v0, 0x4c($a0) -/* 0349E0 80033DE0 00808025 */ move $s0, $a0 -/* 0349E4 80033DE4 10400054 */ beqz $v0, .L80033F38 -/* 0349E8 80033DE8 8FBF0024 */ lw $ra, 0x24($sp) -/* 0349EC 80033DEC 848E007C */ lh $t6, 0x7c($a0) -/* 0349F0 80033DF0 24830078 */ addiu $v1, $a0, 0x78 -/* 0349F4 80033DF4 19C00007 */ blez $t6, .L80033E14 -/* 0349F8 80033DF8 00000000 */ nop -/* 0349FC 80033DFC 846F0004 */ lh $t7, 4($v1) -/* 034A00 80033E00 00000000 */ nop -/* 034A04 80033E04 01E5C023 */ subu $t8, $t7, $a1 -/* 034A08 80033E08 A4780004 */ sh $t8, 4($v1) -/* 034A0C 80033E0C 8C82004C */ lw $v0, 0x4c($a0) -/* 034A10 80033E10 00000000 */ nop -.L80033E14: -/* 034A14 80033E14 84590014 */ lh $t9, 0x14($v0) -/* 034A18 80033E18 26030078 */ addiu $v1, $s0, 0x78 -/* 034A1C 80033E1C 33280040 */ andi $t0, $t9, 0x40 -/* 034A20 80033E20 11000032 */ beqz $t0, .L80033EEC -/* 034A24 80033E24 00000000 */ nop -/* 034A28 80033E28 84690004 */ lh $t1, 4($v1) -/* 034A2C 80033E2C 2404013C */ li $a0, 316 -/* 034A30 80033E30 1D20002E */ bgtz $t1, .L80033EEC -/* 034A34 80033E34 240A0004 */ li $t2, 4 -/* 034A38 80033E38 8E05000C */ lw $a1, 0xc($s0) -/* 034A3C 80033E3C 8E060010 */ lw $a2, 0x10($s0) -/* 034A40 80033E40 8E070014 */ lw $a3, 0x14($s0) -/* 034A44 80033E44 AFA30028 */ sw $v1, 0x28($sp) -/* 034A48 80033E48 AFA00014 */ sw $zero, 0x14($sp) -/* 034A4C 80033E4C 0C002556 */ jal func_80009558 -/* 034A50 80033E50 AFAA0010 */ sw $t2, 0x10($sp) -/* 034A54 80033E54 8E0B004C */ lw $t3, 0x4c($s0) -/* 034A58 80033E58 8FA30028 */ lw $v1, 0x28($sp) -/* 034A5C 80033E5C 8D6C0000 */ lw $t4, ($t3) -/* 034A60 80033E60 240D071C */ li $t5, 1820 -/* 034A64 80033E64 240E000A */ li $t6, 10 -/* 034A68 80033E68 A46D0006 */ sh $t5, 6($v1) -/* 034A6C 80033E6C A46E0004 */ sh $t6, 4($v1) -/* 034A70 80033E70 0C0270F2 */ jal get_number_of_active_players -/* 034A74 80033E74 AC6C0000 */ sw $t4, ($v1) -/* 034A78 80033E78 8FA30028 */ lw $v1, 0x28($sp) -/* 034A7C 80033E7C 28410002 */ slti $at, $v0, 2 -/* 034A80 80033E80 1020001F */ beqz $at, .L80033F00 -/* 034A84 80033E84 00000000 */ nop -/* 034A88 80033E88 8E0F0040 */ lw $t7, 0x40($s0) -/* 034A8C 80033E8C 24010001 */ li $at, 1 -/* 034A90 80033E90 81E20057 */ lb $v0, 0x57($t7) -/* 034A94 80033E94 00000000 */ nop -/* 034A98 80033E98 18400019 */ blez $v0, .L80033F00 -/* 034A9C 80033E9C 00000000 */ nop -/* 034AA0 80033EA0 14410003 */ bne $v0, $at, .L80033EB0 -/* 034AA4 80033EA4 00002025 */ move $a0, $zero -/* 034AA8 80033EA8 10000006 */ b .L80033EC4 -/* 034AAC 80033EAC 00003025 */ move $a2, $zero -.L80033EB0: -/* 034AB0 80033EB0 2445FFFF */ addiu $a1, $v0, -1 -/* 034AB4 80033EB4 0C01BE53 */ jal get_random_number_from_range -/* 034AB8 80033EB8 AFA30028 */ sw $v1, 0x28($sp) -/* 034ABC 80033EBC 8FA30028 */ lw $v1, 0x28($sp) -/* 034AC0 80033EC0 00403025 */ move $a2, $v0 -.L80033EC4: -/* 034AC4 80033EC4 24180001 */ li $t8, 1 -/* 034AC8 80033EC8 00D8C804 */ sllv $t9, $t8, $a2 -/* 034ACC 80033ECC AE190074 */ sw $t9, 0x74($s0) -/* 034AD0 80033ED0 AFA30028 */ sw $v1, 0x28($sp) -/* 034AD4 80033ED4 02002025 */ move $a0, $s0 -/* 034AD8 80033ED8 0C02BF0F */ jal func_800AFC3C -/* 034ADC 80033EDC 24050002 */ li $a1, 2 -/* 034AE0 80033EE0 8FA30028 */ lw $v1, 0x28($sp) -/* 034AE4 80033EE4 10000007 */ b .L80033F04 -/* 034AE8 80033EE8 84690006 */ lh $t1, 6($v1) -.L80033EEC: -/* 034AEC 80033EEC 84680004 */ lh $t0, 4($v1) -/* 034AF0 80033EF0 00000000 */ nop -/* 034AF4 80033EF4 1D000002 */ bgtz $t0, .L80033F00 -/* 034AF8 80033EF8 00000000 */ nop -/* 034AFC 80033EFC AC600000 */ sw $zero, ($v1) -.L80033F00: -/* 034B00 80033F00 84690006 */ lh $t1, 6($v1) -.L80033F04: -/* 034B04 80033F04 00000000 */ nop -/* 034B08 80033F08 A6090004 */ sh $t1, 4($s0) -/* 034B0C 80033F0C 846A0006 */ lh $t2, 6($v1) -/* 034B10 80033F10 00000000 */ nop -/* 034B14 80033F14 000A0823 */ negu $at, $t2 -/* 034B18 80033F18 00015880 */ sll $t3, $at, 2 -/* 034B1C 80033F1C 01615823 */ subu $t3, $t3, $at -/* 034B20 80033F20 000B58C0 */ sll $t3, $t3, 3 -/* 034B24 80033F24 01615821 */ addu $t3, $t3, $at -/* 034B28 80033F28 000B58C0 */ sll $t3, $t3, 3 -/* 034B2C 80033F2C 000B6203 */ sra $t4, $t3, 8 -/* 034B30 80033F30 A46C0006 */ sh $t4, 6($v1) -/* 034B34 80033F34 8FBF0024 */ lw $ra, 0x24($sp) -.L80033F38: -/* 034B38 80033F38 8FB00020 */ lw $s0, 0x20($sp) -/* 034B3C 80033F3C 03E00008 */ jr $ra -/* 034B40 80033F40 27BD0038 */ addiu $sp, $sp, 0x38 - diff --git a/asm/non_matchings/unknown_032760/func_80034860.s b/asm/non_matchings/unknown_032760/func_80034860.s deleted file mode 100644 index ea68bddd..00000000 --- a/asm/non_matchings/unknown_032760/func_80034860.s +++ /dev/null @@ -1,182 +0,0 @@ -.late_rodata -glabel D_800E5FF8 -.double 1.2 -glabel D_800E6000 -.float 0.2 - -.text -glabel func_80034860 -/* 035460 80034860 44852000 */ mtc1 $a1, $f4 -/* 035464 80034864 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 -/* 035468 80034868 468020A0 */ cvt.s.w $f2, $f4 -/* 03546C 8003486C 8DEF0300 */ lw $t7, %lo(osTvType)($t7) -/* 035470 80034870 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 035474 80034874 AFB00028 */ sw $s0, 0x28($sp) -/* 035478 80034878 00808025 */ move $s0, $a0 -/* 03547C 8003487C AFBF002C */ sw $ra, 0x2c($sp) -/* 035480 80034880 AFA50064 */ sw $a1, 0x64($sp) -/* 035484 80034884 00004025 */ move $t0, $zero -/* 035488 80034888 15E00007 */ bnez $t7, .L800348A8 -/* 03548C 8003488C 46001006 */ mov.s $f0, $f2 -/* 035490 80034890 3C01800E */ lui $at, %hi(D_800E5FF8 + 4) # $at, 0x800e -/* 035494 80034894 C4295FF8 */ lwc1 $f9, %lo(D_800E5FF8)($at) -/* 035498 80034898 C4285FFC */ lwc1 $f8, %lo(D_800E5FF8 + 4)($at) -/* 03549C 8003489C 460011A1 */ cvt.d.s $f6, $f2 -/* 0354A0 800348A0 46283282 */ mul.d $f10, $f6, $f8 -/* 0354A4 800348A4 46205020 */ cvt.s.d $f0, $f10 -.L800348A8: -/* 0354A8 800348A8 C612001C */ lwc1 $f18, 0x1c($s0) -/* 0354AC 800348AC C610000C */ lwc1 $f16, 0xc($s0) -/* 0354B0 800348B0 46009102 */ mul.s $f4, $f18, $f0 -/* 0354B4 800348B4 3C014110 */ li $at, 0x41100000 # 9.000000 -/* 0354B8 800348B8 2605000C */ addiu $a1, $s0, 0xc -/* 0354BC 800348BC 24040001 */ li $a0, 1 -/* 0354C0 800348C0 46048180 */ add.s $f6, $f16, $f4 -/* 0354C4 800348C4 27A60040 */ addiu $a2, $sp, 0x40 -/* 0354C8 800348C8 E7A60040 */ swc1 $f6, 0x40($sp) -/* 0354CC 800348CC C60A0020 */ lwc1 $f10, 0x20($s0) -/* 0354D0 800348D0 C6080010 */ lwc1 $f8, 0x10($s0) -/* 0354D4 800348D4 46005482 */ mul.s $f18, $f10, $f0 -/* 0354D8 800348D8 2407FFFF */ li $a3, -1 -/* 0354DC 800348DC 46124400 */ add.s $f16, $f8, $f18 -/* 0354E0 800348E0 44819000 */ mtc1 $at, $f18 -/* 0354E4 800348E4 E7B00044 */ swc1 $f16, 0x44($sp) -/* 0354E8 800348E8 C6060024 */ lwc1 $f6, 0x24($s0) -/* 0354EC 800348EC C6040014 */ lwc1 $f4, 0x14($s0) -/* 0354F0 800348F0 46003282 */ mul.s $f10, $f6, $f0 -/* 0354F4 800348F4 E7A0005C */ swc1 $f0, 0x5c($sp) -/* 0354F8 800348F8 A3A8004F */ sb $t0, 0x4f($sp) -/* 0354FC 800348FC AFA50034 */ sw $a1, 0x34($sp) -/* 035500 80034900 460A2200 */ add.s $f8, $f4, $f10 -/* 035504 80034904 E7B2003C */ swc1 $f18, 0x3c($sp) -/* 035508 80034908 0C00C44C */ jal func_80031130 -/* 03550C 8003490C E7A80048 */ swc1 $f8, 0x48($sp) -/* 035510 80034910 8FA40034 */ lw $a0, 0x34($sp) -/* 035514 80034914 24180001 */ li $t8, 1 -/* 035518 80034918 27B90038 */ addiu $t9, $sp, 0x38 -/* 03551C 8003491C AFA00038 */ sw $zero, 0x38($sp) -/* 035520 80034920 AFB90014 */ sw $t9, 0x14($sp) -/* 035524 80034924 AFB80010 */ sw $t8, 0x10($sp) -/* 035528 80034928 27A50040 */ addiu $a1, $sp, 0x40 -/* 03552C 8003492C 27A6003C */ addiu $a2, $sp, 0x3c -/* 035530 80034930 0C00C580 */ jal func_80031600 -/* 035534 80034934 27A7004E */ addiu $a3, $sp, 0x4e -/* 035538 80034938 8FA90038 */ lw $t1, 0x38($sp) -/* 03553C 8003493C 83A8004F */ lb $t0, 0x4f($sp) -/* 035540 80034940 C7A0005C */ lwc1 $f0, 0x5c($sp) -/* 035544 80034944 11200014 */ beqz $t1, .L80034998 -/* 035548 80034948 00000000 */ nop -/* 03554C 8003494C C7B00040 */ lwc1 $f16, 0x40($sp) -/* 035550 80034950 C606000C */ lwc1 $f6, 0xc($s0) -/* 035554 80034954 C6120010 */ lwc1 $f18, 0x10($s0) -/* 035558 80034958 46068101 */ sub.s $f4, $f16, $f6 -/* 03555C 8003495C 00000000 */ nop -/* 035560 80034960 46002283 */ div.s $f10, $f4, $f0 -/* 035564 80034964 E60A001C */ swc1 $f10, 0x1c($s0) -/* 035568 80034968 C7A80044 */ lwc1 $f8, 0x44($sp) -/* 03556C 8003496C C60A0014 */ lwc1 $f10, 0x14($s0) -/* 035570 80034970 46124401 */ sub.s $f16, $f8, $f18 -/* 035574 80034974 00000000 */ nop -/* 035578 80034978 46008183 */ div.s $f6, $f16, $f0 -/* 03557C 8003497C E6060020 */ swc1 $f6, 0x20($s0) -/* 035580 80034980 C7A40048 */ lwc1 $f4, 0x48($sp) -/* 035584 80034984 00000000 */ nop -/* 035588 80034988 460A2201 */ sub.s $f8, $f4, $f10 -/* 03558C 8003498C 00000000 */ nop -/* 035590 80034990 46004483 */ div.s $f18, $f8, $f0 -/* 035594 80034994 E6120024 */ swc1 $f18, 0x24($s0) -.L80034998: -/* 035598 80034998 C610001C */ lwc1 $f16, 0x1c($s0) -/* 03559C 8003499C C6040020 */ lwc1 $f4, 0x20($s0) -/* 0355A0 800349A0 46008182 */ mul.s $f6, $f16, $f0 -/* 0355A4 800349A4 C6080024 */ lwc1 $f8, 0x24($s0) -/* 0355A8 800349A8 A3A8004F */ sb $t0, 0x4f($sp) -/* 0355AC 800349AC 02002025 */ move $a0, $s0 -/* 0355B0 800349B0 46002282 */ mul.s $f10, $f4, $f0 -/* 0355B4 800349B4 44053000 */ mfc1 $a1, $f6 -/* 0355B8 800349B8 46004482 */ mul.s $f18, $f8, $f0 -/* 0355BC 800349BC 44065000 */ mfc1 $a2, $f10 -/* 0355C0 800349C0 44079000 */ mfc1 $a3, $f18 -/* 0355C4 800349C4 0C00455C */ jal func_80011570 -/* 0355C8 800349C8 00000000 */ nop -/* 0355CC 800349CC 8FAA0038 */ lw $t2, 0x38($sp) -/* 0355D0 800349D0 83A8004F */ lb $t0, 0x4f($sp) -/* 0355D4 800349D4 1140000E */ beqz $t2, .L80034A10 -/* 0355D8 800349D8 3C014210 */ li $at, 0x42100000 # 36.000000 -/* 0355DC 800349DC C6100010 */ lwc1 $f16, 0x10($s0) -/* 0355E0 800349E0 44813000 */ mtc1 $at, $f6 -/* 0355E4 800349E4 3C01800E */ lui $at, %hi(D_800E6000) # $at, 0x800e -/* 0355E8 800349E8 C60C000C */ lwc1 $f12, 0xc($s0) -/* 0355EC 800349EC 8E060014 */ lw $a2, 0x14($s0) -/* 0355F0 800349F0 C4246000 */ lwc1 $f4, %lo(D_800E6000)($at) -/* 0355F4 800349F4 AFA00018 */ sw $zero, 0x18($sp) -/* 0355F8 800349F8 AFA00010 */ sw $zero, 0x10($sp) -/* 0355FC 800349FC 2407002C */ li $a3, 44 -/* 035600 80034A00 46068381 */ sub.s $f14, $f16, $f6 -/* 035604 80034A04 0C00FF11 */ jal func_8003FC44 -/* 035608 80034A08 E7A40014 */ swc1 $f4, 0x14($sp) -/* 03560C 80034A0C 24080001 */ li $t0, 1 -.L80034A10: -/* 035610 80034A10 8E020078 */ lw $v0, 0x78($s0) -/* 035614 80034A14 8FAB0064 */ lw $t3, 0x64($sp) -/* 035618 80034A18 18400003 */ blez $v0, .L80034A28 -/* 03561C 80034A1C 004B6023 */ subu $t4, $v0, $t3 -/* 035620 80034A20 10000002 */ b .L80034A2C -/* 035624 80034A24 AE0C0078 */ sw $t4, 0x78($s0) -.L80034A28: -/* 035628 80034A28 24080001 */ li $t0, 1 -.L80034A2C: -/* 03562C 80034A2C 8E03004C */ lw $v1, 0x4c($s0) -/* 035630 80034A30 00000000 */ nop -/* 035634 80034A34 906D0013 */ lbu $t5, 0x13($v1) -/* 035638 80034A38 00000000 */ nop -/* 03563C 80034A3C 29A10050 */ slti $at, $t5, 0x50 -/* 035640 80034A40 10200023 */ beqz $at, .L80034AD0 -/* 035644 80034A44 00000000 */ nop -/* 035648 80034A48 8C620000 */ lw $v0, ($v1) -/* 03564C 80034A4C 00000000 */ nop -/* 035650 80034A50 1040001F */ beqz $v0, .L80034AD0 -/* 035654 80034A54 00000000 */ nop -/* 035658 80034A58 844E0048 */ lh $t6, 0x48($v0) -/* 03565C 80034A5C 24040001 */ li $a0, 1 -/* 035660 80034A60 148E001B */ bne $a0, $t6, .L80034AD0 -/* 035664 80034A64 2407002C */ li $a3, 44 -/* 035668 80034A68 8C430064 */ lw $v1, 0x64($v0) -/* 03566C 80034A6C 2401FFFF */ li $at, -1 -/* 035670 80034A70 846F0000 */ lh $t7, ($v1) -/* 035674 80034A74 24080001 */ li $t0, 1 -/* 035678 80034A78 11E10002 */ beq $t7, $at, .L80034A84 -/* 03567C 80034A7C 24190011 */ li $t9, 17 -/* 035680 80034A80 A0640187 */ sb $a0, 0x187($v1) -.L80034A84: -/* 035684 80034A84 8E02007C */ lw $v0, 0x7c($s0) -/* 035688 80034A88 241800B4 */ li $t8, 180 -/* 03568C 80034A8C 10400002 */ beqz $v0, .L80034A98 -/* 035690 80034A90 3C014210 */ li $at, 0x42100000 # 36.000000 -/* 035694 80034A94 A458000C */ sh $t8, 0xc($v0) -.L80034A98: -/* 035698 80034A98 C60A0010 */ lwc1 $f10, 0x10($s0) -/* 03569C 80034A9C 44814000 */ mtc1 $at, $f8 -/* 0356A0 80034AA0 C60C000C */ lwc1 $f12, 0xc($s0) -/* 0356A4 80034AA4 8E060014 */ lw $a2, 0x14($s0) -/* 0356A8 80034AA8 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 0356AC 80034AAC 44819000 */ mtc1 $at, $f18 -/* 0356B0 80034AB0 A3A8004F */ sb $t0, 0x4f($sp) -/* 0356B4 80034AB4 AFA00018 */ sw $zero, 0x18($sp) -/* 0356B8 80034AB8 AFB90010 */ sw $t9, 0x10($sp) -/* 0356BC 80034ABC 46085381 */ sub.s $f14, $f10, $f8 -/* 0356C0 80034AC0 0C00FF11 */ jal func_8003FC44 -/* 0356C4 80034AC4 E7B20014 */ swc1 $f18, 0x14($sp) -/* 0356C8 80034AC8 83A8004F */ lb $t0, 0x4f($sp) -/* 0356CC 80034ACC 00000000 */ nop -.L80034AD0: -/* 0356D0 80034AD0 11000004 */ beqz $t0, .L80034AE4 -/* 0356D4 80034AD4 8FBF002C */ lw $ra, 0x2c($sp) -/* 0356D8 80034AD8 0C003FEE */ jal gParticlePtrList_addObject -/* 0356DC 80034ADC 02002025 */ move $a0, $s0 -/* 0356E0 80034AE0 8FBF002C */ lw $ra, 0x2c($sp) -.L80034AE4: -/* 0356E4 80034AE4 8FB00028 */ lw $s0, 0x28($sp) -/* 0356E8 80034AE8 03E00008 */ jr $ra -/* 0356EC 80034AEC 27BD0060 */ addiu $sp, $sp, 0x60 - diff --git a/asm/non_matchings/unknown_032760/func_80037A18.s b/asm/non_matchings/unknown_032760/obj_init_animation.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80037A18.s rename to asm/non_matchings/unknown_032760/obj_init_animation.s index d0e45cf3..f5b4067c 100644 --- a/asm/non_matchings/unknown_032760/func_80037A18.s +++ b/asm/non_matchings/unknown_032760/obj_init_animation.s @@ -1,4 +1,4 @@ -glabel func_80037A18 +glabel obj_init_animation /* 038618 80037A18 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03861C 80037A1C AFBF001C */ sw $ra, 0x1c($sp) /* 038620 80037A20 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003FD68.s b/asm/non_matchings/unknown_032760/obj_init_audio.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003FD68.s rename to asm/non_matchings/unknown_032760/obj_init_audio.s index 5af695b5..dfcb8d2b 100644 --- a/asm/non_matchings/unknown_032760/func_8003FD68.s +++ b/asm/non_matchings/unknown_032760/obj_init_audio.s @@ -1,4 +1,4 @@ -glabel func_8003FD68 +glabel obj_init_audio /* 040968 8003FD68 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 04096C 8003FD6C AFBF003C */ sw $ra, 0x3c($sp) /* 040970 8003FD70 AFB00038 */ sw $s0, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_80038B74.s b/asm/non_matchings/unknown_032760/obj_init_bombexplosion.s similarity index 98% rename from asm/non_matchings/unknown_032760/func_80038B74.s rename to asm/non_matchings/unknown_032760/obj_init_bombexplosion.s index dc4f57e3..8baeaa00 100644 --- a/asm/non_matchings/unknown_032760/func_80038B74.s +++ b/asm/non_matchings/unknown_032760/obj_init_bombexplosion.s @@ -1,4 +1,4 @@ -glabel func_80038B74 +glabel obj_init_bombexplosion /* 039774 80038B74 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 039778 80038B78 3C013F00 */ li $at, 0x3F000000 # 0.500000 /* 03977C 80038B7C 44812000 */ mtc1 $at, $f4 diff --git a/asm/non_matchings/unknown_032760/func_800409C8.s b/asm/non_matchings/unknown_032760/obj_init_butterfly.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800409C8.s rename to asm/non_matchings/unknown_032760/obj_init_butterfly.s index a50b41c4..0c4babe6 100644 --- a/asm/non_matchings/unknown_032760/func_800409C8.s +++ b/asm/non_matchings/unknown_032760/obj_init_butterfly.s @@ -3,7 +3,7 @@ glabel D_800E6218 .float 0.01 .text -glabel func_800409C8 +glabel obj_init_butterfly /* 0415C8 800409C8 AFA50004 */ sw $a1, 4($sp) /* 0415CC 800409CC 8C820064 */ lw $v0, 0x64($a0) /* 0415D0 800409D0 14C0003B */ bnez $a2, .L80040AC0 diff --git a/asm/non_matchings/unknown_032760/func_8003B7CC.s b/asm/non_matchings/unknown_032760/obj_init_door.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B7CC.s rename to asm/non_matchings/unknown_032760/obj_init_door.s index 5b106911..2e9c57a0 100644 --- a/asm/non_matchings/unknown_032760/func_8003B7CC.s +++ b/asm/non_matchings/unknown_032760/obj_init_door.s @@ -3,7 +3,7 @@ glabel D_800E5FB4 .asciz "Illegal door no!!!\n" .text -glabel func_8003B7CC +glabel obj_init_door /* 03C3CC 8003B7CC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03C3D0 8003B7D0 AFBF001C */ sw $ra, 0x1c($sp) /* 03C3D4 8003B7D4 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_80036C30.s b/asm/non_matchings/unknown_032760/obj_init_fish.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80036C30.s rename to asm/non_matchings/unknown_032760/obj_init_fish.s index c964abab..7ad7af13 100644 --- a/asm/non_matchings/unknown_032760/func_80036C30.s +++ b/asm/non_matchings/unknown_032760/obj_init_fish.s @@ -3,7 +3,7 @@ glabel D_800E6048 .float 0.01 .text -glabel func_80036C30 +glabel obj_init_fish /* 037830 80036C30 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 037834 80036C34 AFBF0024 */ sw $ra, 0x24($sp) /* 037838 80036C38 AFB20020 */ sw $s2, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003B368.s b/asm/non_matchings/unknown_032760/obj_init_goldenballoon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B368.s rename to asm/non_matchings/unknown_032760/obj_init_goldenballoon.s index 574faaf5..33d6d4db 100644 --- a/asm/non_matchings/unknown_032760/func_8003B368.s +++ b/asm/non_matchings/unknown_032760/obj_init_goldenballoon.s @@ -3,7 +3,7 @@ glabel D_800E5FA0 .asciz "Illegal door no!!!\n" .text -glabel func_8003B368 +glabel obj_init_goldenballoon /* 03BF68 8003B368 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 03BF6C 8003B36C AFBF001C */ sw $ra, 0x1c($sp) /* 03BF70 8003B370 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_80035AE8.s b/asm/non_matchings/unknown_032760/obj_init_groundzipper.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80035AE8.s rename to asm/non_matchings/unknown_032760/obj_init_groundzipper.s index 5830ac91..87b5d5bd 100644 --- a/asm/non_matchings/unknown_032760/func_80035AE8.s +++ b/asm/non_matchings/unknown_032760/obj_init_groundzipper.s @@ -1,4 +1,4 @@ -glabel func_80035AE8 +glabel obj_init_groundzipper /* 0366E8 80035AE8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0366EC 80035AEC AFBF0014 */ sw $ra, 0x14($sp) /* 0366F0 80035AF0 90AF0009 */ lbu $t7, 9($a1) diff --git a/asm/non_matchings/unknown_032760/func_80041A90.s b/asm/non_matchings/unknown_032760/obj_init_midifade.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80041A90.s rename to asm/non_matchings/unknown_032760/obj_init_midifade.s index 2b5341fb..d99b7675 100644 --- a/asm/non_matchings/unknown_032760/func_80041A90.s +++ b/asm/non_matchings/unknown_032760/obj_init_midifade.s @@ -1,4 +1,4 @@ -glabel func_80041A90 +glabel obj_init_midifade /* 042690 80041A90 27BDFF00 */ addiu $sp, $sp, -0x100 /* 042694 80041A94 AFBF003C */ sw $ra, 0x3c($sp) /* 042698 80041A98 AFB00038 */ sw $s0, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_80041E80.s b/asm/non_matchings/unknown_032760/obj_init_midifadepoint.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80041E80.s rename to asm/non_matchings/unknown_032760/obj_init_midifadepoint.s index 01140733..fe5e581c 100644 --- a/asm/non_matchings/unknown_032760/func_80041E80.s +++ b/asm/non_matchings/unknown_032760/obj_init_midifadepoint.s @@ -1,4 +1,4 @@ -glabel func_80041E80 +glabel obj_init_midifadepoint /* 042A80 80041E80 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 042A84 80041E84 AFBF001C */ sw $ra, 0x1c($sp) /* 042A88 80041E88 AFB10018 */ sw $s1, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_80033CC0.s b/asm/non_matchings/unknown_032760/obj_init_scenery.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80033CC0.s rename to asm/non_matchings/unknown_032760/obj_init_scenery.s index d4602c15..1dcdd562 100644 --- a/asm/non_matchings/unknown_032760/func_80033CC0.s +++ b/asm/non_matchings/unknown_032760/obj_init_scenery.s @@ -1,4 +1,4 @@ -glabel func_80033CC0 +glabel obj_init_scenery /* 0348C0 80033CC0 848E0006 */ lh $t6, 6($a0) /* 0348C4 80033CC4 3C014120 */ li $at, 0x41200000 # 10.000000 /* 0348C8 80033CC8 35CF0002 */ ori $t7, $t6, 2 diff --git a/asm/non_matchings/unknown_032760/func_8003C644.s b/asm/non_matchings/unknown_032760/obj_init_trigger.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003C644.s rename to asm/non_matchings/unknown_032760/obj_init_trigger.s index f8af78a0..bbe58d9e 100644 --- a/asm/non_matchings/unknown_032760/func_8003C644.s +++ b/asm/non_matchings/unknown_032760/obj_init_trigger.s @@ -3,7 +3,7 @@ glabel D_800E5FC8 .asciz "Illegal door no!!!\n" .text -glabel func_8003C644 +glabel obj_init_trigger /* 03D244 8003C644 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03D248 8003C648 AFBF001C */ sw $ra, 0x1c($sp) /* 03D24C 8003C64C AFB10018 */ sw $s1, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003596C.s b/asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003596C.s rename to asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s index d01aeab7..c1b5fdcc 100644 --- a/asm/non_matchings/unknown_032760/func_8003596C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s @@ -1,4 +1,4 @@ -glabel func_8003596C +glabel obj_loop_airzippers_waterzippers /* 03656C 8003596C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 036570 80035970 AFBF002C */ sw $ra, 0x2c($sp) /* 036574 80035974 AFB30024 */ sw $s3, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_800377E4.s b/asm/non_matchings/unknown_032760/obj_loop_animator.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800377E4.s rename to asm/non_matchings/unknown_032760/obj_loop_animator.s index 0bcfe4ca..87f282a7 100644 --- a/asm/non_matchings/unknown_032760/func_800377E4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_animator.s @@ -1,4 +1,4 @@ -glabel func_800377E4 +glabel obj_loop_animator /* 0383E4 800377E4 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 0383E8 800377E8 AFBF0014 */ sw $ra, 0x14($sp) /* 0383EC 800377EC 8C830064 */ lw $v1, 0x64($a0) diff --git a/asm/non_matchings/unknown_032760/func_80038BF4.s b/asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80038BF4.s rename to asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s index a87a497c..bf70385d 100644 --- a/asm/non_matchings/unknown_032760/func_80038BF4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s @@ -1,4 +1,4 @@ -glabel func_80038BF4 +glabel obj_loop_bombexplosion /* 0397F4 80038BF4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0397F8 80038BF8 AFBF002C */ sw $ra, 0x2c($sp) /* 0397FC 80038BFC AFB00028 */ sw $s0, 0x28($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003B174.s b/asm/non_matchings/unknown_032760/obj_loop_bonus.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B174.s rename to asm/non_matchings/unknown_032760/obj_loop_bonus.s index eebfe381..d40e9d3a 100644 --- a/asm/non_matchings/unknown_032760/func_8003B174.s +++ b/asm/non_matchings/unknown_032760/obj_loop_bonus.s @@ -1,4 +1,4 @@ -glabel func_8003B174 +glabel obj_loop_bonus /* 03BD74 8003B174 27BDFF70 */ addiu $sp, $sp, -0x90 /* 03BD78 8003B178 AFBF0054 */ sw $ra, 0x54($sp) /* 03BD7C 8003B17C AFB60050 */ sw $s6, 0x50($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003CA68.s b/asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003CA68.s rename to asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s index d0170d05..d41b84b6 100644 --- a/asm/non_matchings/unknown_032760/func_8003CA68.s +++ b/asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s @@ -3,7 +3,7 @@ glabel D_800E6178 .double 1.2 .text -glabel func_8003CA68 +glabel obj_loop_bridge_whaleramp /* 03D668 8003CA68 27BDFF90 */ addiu $sp, $sp, -0x70 /* 03D66C 8003CA6C 44852000 */ mtc1 $a1, $f4 /* 03D670 8003CA70 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_80040C54.s b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040C54.s rename to asm/non_matchings/unknown_032760/obj_loop_butterfly.s index 89d95d0b..86fc3b4a 100644 --- a/asm/non_matchings/unknown_032760/func_80040C54.s +++ b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s @@ -17,7 +17,7 @@ glabel D_800E6248 .float 1.6 .text -glabel func_80040C54 +glabel obj_loop_butterfly /* 041854 80040C54 27BDFF68 */ addiu $sp, $sp, -0x98 /* 041858 80040C58 AFBF0024 */ sw $ra, 0x24($sp) /* 04185C 80040C5C AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003833C.s b/asm/non_matchings/unknown_032760/obj_loop_char_select.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003833C.s rename to asm/non_matchings/unknown_032760/obj_loop_char_select.s index d768009c..a737a858 100644 --- a/asm/non_matchings/unknown_032760/func_8003833C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_char_select.s @@ -1,4 +1,4 @@ -glabel func_8003833C +glabel obj_loop_char_select /* 038F3C 8003833C 27BDFF88 */ addiu $sp, $sp, -0x78 /* 038F40 80038340 AFBF0024 */ sw $ra, 0x24($sp) /* 038F44 80038344 AFB2001C */ sw $s2, 0x1c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D5A0.s b/asm/non_matchings/unknown_032760/obj_loop_coin.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D5A0.s rename to asm/non_matchings/unknown_032760/obj_loop_coin.s index 7771afb1..7f427159 100644 --- a/asm/non_matchings/unknown_032760/func_8003D5A0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_coin.s @@ -7,7 +7,7 @@ glabel D_800E61A0 .float -10000.0 .text -glabel func_8003D5A0 +glabel obj_loop_coin /* 03E1A0 8003D5A0 44852000 */ mtc1 $a1, $f4 /* 03E1A4 8003D5A4 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 /* 03E1A8 8003D5A8 468020A0 */ cvt.s.w $f2, $f4 diff --git a/asm/non_matchings/unknown_032760/func_8003D3FC.s b/asm/non_matchings/unknown_032760/obj_loop_coincreator.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D3FC.s rename to asm/non_matchings/unknown_032760/obj_loop_coincreator.s index bdb194dc..f347fcb6 100644 --- a/asm/non_matchings/unknown_032760/func_8003D3FC.s +++ b/asm/non_matchings/unknown_032760/obj_loop_coincreator.s @@ -1,4 +1,4 @@ -glabel func_8003D3FC +glabel obj_loop_coincreator /* 03DFFC 8003D3FC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 03E000 8003D400 AFBF002C */ sw $ra, 0x2c($sp) /* 03E004 8003D404 AFB00028 */ sw $s0, 0x28($sp) diff --git a/asm/non_matchings/unknown_032760/func_80035260.s b/asm/non_matchings/unknown_032760/obj_loop_collectegg.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80035260.s rename to asm/non_matchings/unknown_032760/obj_loop_collectegg.s index 92a4eeeb..22a2eb0b 100644 --- a/asm/non_matchings/unknown_032760/func_80035260.s +++ b/asm/non_matchings/unknown_032760/obj_loop_collectegg.s @@ -7,7 +7,7 @@ glabel D_800E6020 .double 0.95 .text -glabel func_80035260 +glabel obj_loop_collectegg /* 035E60 80035260 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035E64 80035264 44852000 */ mtc1 $a1, $f4 /* 035E68 80035268 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003B988.s b/asm/non_matchings/unknown_032760/obj_loop_door.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B988.s rename to asm/non_matchings/unknown_032760/obj_loop_door.s index dd0f6c00..4a99eee0 100644 --- a/asm/non_matchings/unknown_032760/func_8003B988.s +++ b/asm/non_matchings/unknown_032760/obj_loop_door.s @@ -5,7 +5,7 @@ glabel D_800E6170 .double 130.0 .text -glabel func_8003B988 +glabel obj_loop_door /* 03C588 8003B988 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 03C58C 8003B98C 44852000 */ mtc1 $a1, $f4 /* 03C590 8003B990 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_80034B74.s b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80034B74.s rename to asm/non_matchings/unknown_032760/obj_loop_effectbox.s index 5a7df6fd..86220401 100644 --- a/asm/non_matchings/unknown_032760/func_80034B74.s +++ b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s @@ -1,4 +1,4 @@ -glabel func_80034B74 +glabel obj_loop_effectbox /* 035774 80034B74 27BDFF68 */ addiu $sp, $sp, -0x98 /* 035778 80034B78 AFBF004C */ sw $ra, 0x4c($sp) /* 03577C 80034B7C AFB00048 */ sw $s0, 0x48($sp) diff --git a/asm/non_matchings/unknown_032760/func_80038F58.s b/asm/non_matchings/unknown_032760/obj_loop_exit.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80038F58.s rename to asm/non_matchings/unknown_032760/obj_loop_exit.s index d20f655b..e2d5a882 100644 --- a/asm/non_matchings/unknown_032760/func_80038F58.s +++ b/asm/non_matchings/unknown_032760/obj_loop_exit.s @@ -1,4 +1,4 @@ -glabel func_80038F58 +glabel obj_loop_exit /* 039B58 80038F58 27BDFF80 */ addiu $sp, $sp, -0x80 /* 039B5C 80038F5C AFBF0044 */ sw $ra, 0x44($sp) /* 039B60 80038F60 AFB70040 */ sw $s7, 0x40($sp) diff --git a/asm/non_matchings/unknown_032760/func_80033F60.s b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80033F60.s rename to asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s index 9b7231a8..e6cc1576 100644 --- a/asm/non_matchings/unknown_032760/func_80033F60.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s @@ -7,7 +7,7 @@ glabel D_800E5FF0 .double 0.9 .text -glabel func_80033F60 +glabel obj_loop_fireball_octoweapon /* 034B60 80033F60 27BDFF78 */ addiu $sp, $sp, -0x88 /* 034B64 80033F64 44852000 */ mtc1 $a1, $f4 /* 034B68 80033F68 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_800370D4.s b/asm/non_matchings/unknown_032760/obj_loop_fish.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800370D4.s rename to asm/non_matchings/unknown_032760/obj_loop_fish.s index 38f62ca9..5b2a52c0 100644 --- a/asm/non_matchings/unknown_032760/func_800370D4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fish.s @@ -1,4 +1,4 @@ -glabel func_800370D4 +glabel obj_loop_fish /* 037CD4 800370D4 27BDFF90 */ addiu $sp, $sp, -0x70 /* 037CD8 800370D8 AFBF001C */ sw $ra, 0x1c($sp) /* 037CDC 800370DC AFB10018 */ sw $s1, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D2B8.s b/asm/non_matchings/unknown_032760/obj_loop_flycoin.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D2B8.s rename to asm/non_matchings/unknown_032760/obj_loop_flycoin.s index 4b19a198..db5fce08 100644 --- a/asm/non_matchings/unknown_032760/func_8003D2B8.s +++ b/asm/non_matchings/unknown_032760/obj_loop_flycoin.s @@ -3,7 +3,7 @@ glabel D_800E6188 .double 1.2 .text -glabel func_8003D2B8 +glabel obj_loop_flycoin /* 03DEB8 8003D2B8 44852000 */ mtc1 $a1, $f4 /* 03DEBC 8003D2BC 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 /* 03DEC0 8003D2C0 468020A0 */ cvt.s.w $f2, $f4 diff --git a/asm/non_matchings/unknown_032760/func_800422F0.s b/asm/non_matchings/unknown_032760/obj_loop_frog.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800422F0.s rename to asm/non_matchings/unknown_032760/obj_loop_frog.s index b98f8e69..2487f15a 100644 --- a/asm/non_matchings/unknown_032760/func_800422F0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_frog.s @@ -13,7 +13,7 @@ glabel D_800E6278 .float 0.15 .text -glabel func_800422F0 +glabel obj_loop_frog /* 042EF0 800422F0 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 042EF4 800422F4 44852000 */ mtc1 $a1, $f4 /* 042EF8 800422F8 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 @@ -106,7 +106,7 @@ glabel L80042378 /* 043048 80042448 0C002556 */ jal func_80009558 /* 04304C 8004244C AFA00014 */ sw $zero, 0x14($sp) /* 043050 80042450 24040000 */ li $a0, 0 -/* 043054 80042454 0C027A9E */ jal func_8009EA78 +/* 043054 80042454 0C027A9E */ jal set_eeprom_settings_value /* 043058 80042458 24050002 */ li $a1, 2 /* 04305C 8004245C 0C0270B8 */ jal set_magic_code_flags /* 043060 80042460 24040002 */ li $a0, 2 @@ -377,7 +377,7 @@ glabel L800426B8 /* 04343C 8004283C 0C002556 */ jal func_80009558 /* 043440 80042840 24040174 */ li $a0, 372 /* 043444 80042844 24040000 */ li $a0, 0 -/* 043448 80042848 0C027A9E */ jal func_8009EA78 +/* 043448 80042848 0C027A9E */ jal set_eeprom_settings_value /* 04344C 8004284C 24050002 */ li $a1, 2 /* 043450 80042850 0C0270B8 */ jal set_magic_code_flags /* 043454 80042854 24040002 */ li $a0, 2 diff --git a/asm/non_matchings/unknown_032760/func_8003B4BC.s b/asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B4BC.s rename to asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s index 02afdf05..0089d37a 100644 --- a/asm/non_matchings/unknown_032760/func_8003B4BC.s +++ b/asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s @@ -3,7 +3,7 @@ glabel D_800E6160 .double 1.2 .text -glabel func_8003B4BC +glabel obj_loop_goldenballoon /* 03C0BC 8003B4BC 44852000 */ mtc1 $a1, $f4 /* 03C0C0 8003B4C0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 03C0C4 8003B4C4 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80035C50.s b/asm/non_matchings/unknown_032760/obj_loop_groundzipper.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80035C50.s rename to asm/non_matchings/unknown_032760/obj_loop_groundzipper.s index 2d8cc9f8..4e4dda29 100644 --- a/asm/non_matchings/unknown_032760/func_80035C50.s +++ b/asm/non_matchings/unknown_032760/obj_loop_groundzipper.s @@ -1,4 +1,4 @@ -glabel func_80035C50 +glabel obj_loop_groundzipper /* 036850 80035C50 27BDFF98 */ addiu $sp, $sp, -0x68 /* 036854 80035C54 AFBF003C */ sw $ra, 0x3c($sp) /* 036858 80035C58 AFB60038 */ sw $s6, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_800345A0.s b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800345A0.s rename to asm/non_matchings/unknown_032760/obj_loop_lasergun.s index 4c46f8b0..a77ab058 100644 --- a/asm/non_matchings/unknown_032760/func_800345A0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s @@ -1,4 +1,4 @@ -glabel func_800345A0 +glabel obj_loop_lasergun /* 0351A0 800345A0 27BDFF38 */ addiu $sp, $sp, -0xc8 /* 0351A4 800345A4 AFBF003C */ sw $ra, 0x3c($sp) /* 0351A8 800345A8 AFB10038 */ sw $s1, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_80042A90.s b/asm/non_matchings/unknown_032760/obj_loop_levelname.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80042A90.s rename to asm/non_matchings/unknown_032760/obj_loop_levelname.s index 94204ac9..8d02cbd6 100644 --- a/asm/non_matchings/unknown_032760/func_80042A90.s +++ b/asm/non_matchings/unknown_032760/obj_loop_levelname.s @@ -1,4 +1,4 @@ -glabel func_80042A90 +glabel obj_loop_levelname /* 043690 80042A90 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 043694 80042A94 AFBF0024 */ sw $ra, 0x24($sp) /* 043698 80042A98 00803025 */ move $a2, $a0 diff --git a/asm/non_matchings/unknown_032760/func_80040570.s b/asm/non_matchings/unknown_032760/obj_loop_log.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040570.s rename to asm/non_matchings/unknown_032760/obj_loop_log.s index 86286164..339eaf7f 100644 --- a/asm/non_matchings/unknown_032760/func_80040570.s +++ b/asm/non_matchings/unknown_032760/obj_loop_log.s @@ -1,4 +1,4 @@ -glabel func_80040570 +glabel obj_loop_log /* 041170 80040570 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 041174 80040574 AFBF0014 */ sw $ra, 0x14($sp) /* 041178 80040578 AFA5002C */ sw $a1, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003AE50.s b/asm/non_matchings/unknown_032760/obj_loop_modechange.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003AE50.s rename to asm/non_matchings/unknown_032760/obj_loop_modechange.s index 6ae59fe8..b444a17f 100644 --- a/asm/non_matchings/unknown_032760/func_8003AE50.s +++ b/asm/non_matchings/unknown_032760/obj_loop_modechange.s @@ -1,4 +1,4 @@ -glabel func_8003AE50 +glabel obj_loop_modechange /* 03BA50 8003AE50 27BDFF80 */ addiu $sp, $sp, -0x80 /* 03BA54 8003AE54 AFBF0044 */ sw $ra, 0x44($sp) /* 03BA58 8003AE58 AFB70040 */ sw $s7, 0x40($sp) diff --git a/asm/non_matchings/unknown_032760/func_80039330.s b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80039330.s rename to asm/non_matchings/unknown_032760/obj_loop_parkwarden.s index 606a17af..0c14f44f 100644 --- a/asm/non_matchings/unknown_032760/func_80039330.s +++ b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s @@ -19,7 +19,7 @@ glabel D_800E6158 .double 2.2 .text -glabel func_80039330 +glabel obj_loop_parkwarden /* 039F30 80039330 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 039F34 80039334 44853000 */ mtc1 $a1, $f6 /* 039F38 80039338 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003763C.s b/asm/non_matchings/unknown_032760/obj_loop_posarrow.s similarity index 98% rename from asm/non_matchings/unknown_032760/func_8003763C.s rename to asm/non_matchings/unknown_032760/obj_loop_posarrow.s index 45287811..515b9cae 100644 --- a/asm/non_matchings/unknown_032760/func_8003763C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_posarrow.s @@ -1,4 +1,4 @@ -glabel func_8003763C +glabel obj_loop_posarrow /* 03823C 8003763C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 038240 80037640 AFBF0014 */ sw $ra, 0x14($sp) /* 038244 80037644 AFA40030 */ sw $a0, 0x30($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003DD14.s b/asm/non_matchings/unknown_032760/obj_loop_silvercoin.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003DD14.s rename to asm/non_matchings/unknown_032760/obj_loop_silvercoin.s index a5200d01..7024ae22 100644 --- a/asm/non_matchings/unknown_032760/func_8003DD14.s +++ b/asm/non_matchings/unknown_032760/obj_loop_silvercoin.s @@ -1,4 +1,4 @@ -glabel func_8003DD14 +glabel obj_loop_silvercoin /* 03E914 8003DD14 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 03E918 8003DD18 AFBF0014 */ sw $ra, 0x14($sp) /* 03E91C 8003DD1C AFA50024 */ sw $a1, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003827C.s b/asm/non_matchings/unknown_032760/obj_loop_snowball.s similarity index 98% rename from asm/non_matchings/unknown_032760/func_8003827C.s rename to asm/non_matchings/unknown_032760/obj_loop_snowball.s index 72f6a460..12d740d1 100644 --- a/asm/non_matchings/unknown_032760/func_8003827C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_snowball.s @@ -1,4 +1,4 @@ -glabel func_8003827C +glabel obj_loop_snowball /* 038E7C 8003827C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 038E80 80038280 AFBF0024 */ sw $ra, 0x24($sp) /* 038E84 80038284 AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_800361E0.s b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800361E0.s rename to asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s index 9c50ab97..32e66350 100644 --- a/asm/non_matchings/unknown_032760/func_800361E0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s @@ -9,7 +9,7 @@ glabel D_800E6040 .double 0.05 .text -glabel func_800361E0 +glabel obj_loop_stopwatchman /* 036DE0 800361E0 27BDFF80 */ addiu $sp, $sp, -0x80 /* 036DE4 800361E4 44853000 */ mtc1 $a1, $f6 /* 036DE8 800361E8 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_80040148.s b/asm/non_matchings/unknown_032760/obj_loop_texscroll.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040148.s rename to asm/non_matchings/unknown_032760/obj_loop_texscroll.s index 8d32dfac..65e2b1d6 100644 --- a/asm/non_matchings/unknown_032760/func_80040148.s +++ b/asm/non_matchings/unknown_032760/obj_loop_texscroll.s @@ -1,4 +1,4 @@ -glabel func_80040148 +glabel obj_loop_texscroll /* 040D48 80040148 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 040D4C 8004014C AFBF001C */ sw $ra, 0x1c($sp) /* 040D50 80040150 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D058.s b/asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D058.s rename to asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s index ea3d27d8..a836035e 100644 --- a/asm/non_matchings/unknown_032760/func_8003D058.s +++ b/asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s @@ -3,7 +3,7 @@ glabel D_800E6180 .float 50625.0 .text -glabel func_8003D058 +glabel obj_loop_treasuresucker /* 03DC58 8003D058 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 03DC5C 8003D05C AFBF0014 */ sw $ra, 0x14($sp) /* 03DC60 8003D060 AFA5004C */ sw $a1, 0x4c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003C7A4.s b/asm/non_matchings/unknown_032760/obj_loop_trigger.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003C7A4.s rename to asm/non_matchings/unknown_032760/obj_loop_trigger.s index 83f09c5b..c744bf5f 100644 --- a/asm/non_matchings/unknown_032760/func_8003C7A4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_trigger.s @@ -1,4 +1,4 @@ -glabel func_8003C7A4 +glabel obj_loop_trigger /* 03D3A4 8003C7A4 27BDFF68 */ addiu $sp, $sp, -0x98 /* 03D3A8 8003C7A8 AFBF004C */ sw $ra, 0x4c($sp) /* 03D3AC 8003C7AC AFBE0048 */ sw $fp, 0x48($sp) diff --git a/asm/non_matchings/unknown_032760/func_80034E9C.s b/asm/non_matchings/unknown_032760/obj_loop_trophycab.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80034E9C.s rename to asm/non_matchings/unknown_032760/obj_loop_trophycab.s index 95679003..25c4cdbc 100644 --- a/asm/non_matchings/unknown_032760/func_80034E9C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_trophycab.s @@ -5,7 +5,7 @@ glabel D_800E6008 .float 0.552 .text -glabel func_80034E9C +glabel obj_loop_trophycab /* 035A9C 80034E9C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035AA0 80034EA0 AFBF001C */ sw $ra, 0x1c($sp) /* 035AA4 80034EA4 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003C2E4.s b/asm/non_matchings/unknown_032760/obj_loop_ttdoor.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003C2E4.s rename to asm/non_matchings/unknown_032760/obj_loop_ttdoor.s index 4ca7b9e4..a093e418 100644 --- a/asm/non_matchings/unknown_032760/func_8003C2E4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_ttdoor.s @@ -1,4 +1,4 @@ -glabel func_8003C2E4 +glabel obj_loop_ttdoor /* 03CEE4 8003C2E4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 03CEE8 8003C2E8 AFBF0024 */ sw $ra, 0x24($sp) /* 03CEEC 8003C2EC AFB10020 */ sw $s1, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003E140.s b/asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003E140.s rename to asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s index 76c4efab..902f5dc6 100644 --- a/asm/non_matchings/unknown_032760/func_8003E140.s +++ b/asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s @@ -8,7 +8,7 @@ glabel D_800E61B8 .double 0.1 .text -glabel func_8003E140 +glabel obj_loop_weaponballoon /* 03ED40 8003E140 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 03ED44 8003E144 AFBF0024 */ sw $ra, 0x24($sp) /* 03ED48 8003E148 AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_80040820.s b/asm/non_matchings/unknown_032760/obj_loop_weather.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040820.s rename to asm/non_matchings/unknown_032760/obj_loop_weather.s index 10ee2f48..649a0680 100644 --- a/asm/non_matchings/unknown_032760/func_80040820.s +++ b/asm/non_matchings/unknown_032760/obj_loop_weather.s @@ -1,4 +1,4 @@ -glabel func_80040820 +glabel obj_loop_weather /* 041420 80040820 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 041424 80040824 AFBF001C */ sw $ra, 0x1c($sp) /* 041428 80040828 AFA40058 */ sw $a0, 0x58($sp) diff --git a/asm/non_matchings/unknown_032760/func_80037D78.s b/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80037D78.s rename to asm/non_matchings/unknown_032760/obj_loop_wizpigship.s index 5df349fa..fbdb2039 100644 --- a/asm/non_matchings/unknown_032760/func_80037D78.s +++ b/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s @@ -1,4 +1,4 @@ -glabel func_80037D78 +glabel obj_loop_wizpigship /* 038978 80037D78 27BDFED8 */ addiu $sp, $sp, -0x128 /* 03897C 80037D7C AFB00038 */ sw $s0, 0x38($sp) /* 038980 80037D80 00808025 */ move $s0, $a0 diff --git a/asm/non_matchings/unknown_05CEF0/func_8005CB68.s b/asm/non_matchings/unknown_05CEF0/func_8005CB68.s index a96ee099..c67db604 100644 --- a/asm/non_matchings/unknown_05CEF0/func_8005CB68.s +++ b/asm/non_matchings/unknown_05CEF0/func_8005CB68.s @@ -123,7 +123,7 @@ glabel func_8005CB68 /* 05D92C 8005CD2C 150B001A */ bne $t0, $t3, .L8005CD98 /* 05D930 8005CD30 2404FFF6 */ li $a0, -10 /* 05D934 8005CD34 24040000 */ li $a0, 0 -/* 05D938 8005CD38 0C027A9E */ jal func_8009EA78 +/* 05D938 8005CD38 0C027A9E */ jal set_eeprom_settings_value /* 05D93C 8005CD3C 24050001 */ li $a1, 1 /* 05D940 8005CD40 2404FFFE */ li $a0, -2 /* 05D944 8005CD44 00002825 */ move $a1, $zero diff --git a/asm/non_matchings/unknown_078050/func_80078D00.s b/asm/non_matchings/unknown_078050/render_texture_rectangle_scaled.s similarity index 99% rename from asm/non_matchings/unknown_078050/func_80078D00.s rename to asm/non_matchings/unknown_078050/render_texture_rectangle_scaled.s index 4f0d48f7..67eaa67a 100644 --- a/asm/non_matchings/unknown_078050/func_80078D00.s +++ b/asm/non_matchings/unknown_078050/render_texture_rectangle_scaled.s @@ -1,4 +1,4 @@ -glabel func_80078D00 +glabel render_texture_rectangle_scaled /* 079900 80078D00 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 079904 80078D04 AFBF003C */ sw $ra, 0x3c($sp) /* 079908 80078D08 AFB20020 */ sw $s2, 0x20($sp) diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD4B8.s b/asm/non_matchings/unknown_09F8F0/func_800AD4B8.s deleted file mode 100644 index 60553068..00000000 --- a/asm/non_matchings/unknown_09F8F0/func_800AD4B8.s +++ /dev/null @@ -1,110 +0,0 @@ -glabel func_800AD4B8 -/* 0AE0B8 800AD4B8 27BDFFD8 */ addiu $sp, $sp, -0x28 -/* 0AE0BC 800AD4BC AFBF0024 */ sw $ra, 0x24($sp) -/* 0AE0C0 800AD4C0 AFB2001C */ sw $s2, 0x1c($sp) -/* 0AE0C4 800AD4C4 00809025 */ move $s2, $a0 -/* 0AE0C8 800AD4C8 AFB30020 */ sw $s3, 0x20($sp) -/* 0AE0CC 800AD4CC AFB10018 */ sw $s1, 0x18($sp) -/* 0AE0D0 800AD4D0 0C019884 */ jal get_viewport_count -/* 0AE0D4 800AD4D4 AFB00014 */ sw $s0, 0x14($sp) -/* 0AE0D8 800AD4D8 14400058 */ bnez $v0, .L800AD63C -/* 0AE0DC 800AD4DC 3C0E800E */ lui $t6, %hi(D_800E2C5C) # $t6, 0x800e -/* 0AE0E0 800AD4E0 8DCE2C5C */ lw $t6, %lo(D_800E2C5C)($t6) -/* 0AE0E4 800AD4E4 3C03800E */ lui $v1, %hi(D_800E2C78) # $v1, 0x800e -/* 0AE0E8 800AD4E8 11C00054 */ beqz $t6, .L800AD63C -/* 0AE0EC 800AD4EC 24632C78 */ addiu $v1, %lo(D_800E2C78) # addiu $v1, $v1, 0x2c78 -/* 0AE0F0 800AD4F0 8C620000 */ lw $v0, ($v1) -/* 0AE0F4 800AD4F4 00000000 */ nop -/* 0AE0F8 800AD4F8 18400023 */ blez $v0, .L800AD588 -/* 0AE0FC 800AD4FC 0242082A */ slt $at, $s2, $v0 -/* 0AE100 800AD500 10200017 */ beqz $at, .L800AD560 -/* 0AE104 800AD504 3C04800E */ lui $a0, %hi(D_800E2C6C) # $a0, 0x800e -/* 0AE108 800AD508 00527823 */ subu $t7, $v0, $s2 -/* 0AE10C 800AD50C AC6F0000 */ sw $t7, ($v1) -/* 0AE110 800AD510 3C19800E */ lui $t9, %hi(D_800E2C64) # $t9, 0x800e -/* 0AE114 800AD514 8F392C64 */ lw $t9, %lo(D_800E2C64)($t9) -/* 0AE118 800AD518 3C10800E */ lui $s0, %hi(D_800E2C60) # $s0, 0x800e -/* 0AE11C 800AD51C 03320019 */ multu $t9, $s2 -/* 0AE120 800AD520 26102C60 */ addiu $s0, %lo(D_800E2C60) # addiu $s0, $s0, 0x2c60 -/* 0AE124 800AD524 8E180000 */ lw $t8, ($s0) -/* 0AE128 800AD528 3C0B800E */ lui $t3, %hi(D_800E2C70) # $t3, 0x800e -/* 0AE12C 800AD52C 3C04800E */ lui $a0, %hi(D_800E2C6C) # $a0, 0x800e -/* 0AE130 800AD530 24842C6C */ addiu $a0, %lo(D_800E2C6C) # addiu $a0, $a0, 0x2c6c -/* 0AE134 800AD534 8C8A0000 */ lw $t2, ($a0) -/* 0AE138 800AD538 00004012 */ mflo $t0 -/* 0AE13C 800AD53C 03084821 */ addu $t1, $t8, $t0 -/* 0AE140 800AD540 AE090000 */ sw $t1, ($s0) -/* 0AE144 800AD544 8D6B2C70 */ lw $t3, %lo(D_800E2C70)($t3) -/* 0AE148 800AD548 00000000 */ nop -/* 0AE14C 800AD54C 01720019 */ multu $t3, $s2 -/* 0AE150 800AD550 00006012 */ mflo $t4 -/* 0AE154 800AD554 014C6821 */ addu $t5, $t2, $t4 -/* 0AE158 800AD558 1000000B */ b .L800AD588 -/* 0AE15C 800AD55C AC8D0000 */ sw $t5, ($a0) -.L800AD560: -/* 0AE160 800AD560 AC600000 */ sw $zero, ($v1) -/* 0AE164 800AD564 3C0E800E */ lui $t6, %hi(D_800E2C68) # $t6, 0x800e -/* 0AE168 800AD568 8DCE2C68 */ lw $t6, %lo(D_800E2C68)($t6) -/* 0AE16C 800AD56C 3C10800E */ lui $s0, %hi(D_800E2C60) # $s0, 0x800e -/* 0AE170 800AD570 26102C60 */ addiu $s0, %lo(D_800E2C60) # addiu $s0, $s0, 0x2c60 -/* 0AE174 800AD574 3C0F800E */ lui $t7, %hi(D_800E2C74) # $t7, 0x800e -/* 0AE178 800AD578 AE0E0000 */ sw $t6, ($s0) -/* 0AE17C 800AD57C 8DEF2C74 */ lw $t7, %lo(D_800E2C74)($t7) -/* 0AE180 800AD580 24842C6C */ addiu $a0, $a0, %lo(D_800E2C6C) -/* 0AE184 800AD584 AC8F0000 */ sw $t7, ($a0) -.L800AD588: -/* 0AE188 800AD588 3C10800E */ lui $s0, %hi(D_800E2C60) # $s0, 0x800e -/* 0AE18C 800AD58C 26102C60 */ addiu $s0, %lo(D_800E2C60) # addiu $s0, $s0, 0x2c60 -/* 0AE190 800AD590 0C02B6F2 */ jal func_800ADBC8 -/* 0AE194 800AD594 02402025 */ move $a0, $s2 -/* 0AE198 800AD598 0C02B596 */ jal func_800AD658 -/* 0AE19C 800AD59C 02402025 */ move $a0, $s2 -/* 0AE1A0 800AD5A0 0C02B6AE */ jal func_800ADAB8 -/* 0AE1A4 800AD5A4 02402025 */ move $a0, $s2 -/* 0AE1A8 800AD5A8 8E190000 */ lw $t9, ($s0) -/* 0AE1AC 800AD5AC 3C138012 */ lui $s3, %hi(D_80127C0C) # $s3, 0x8012 -/* 0AE1B0 800AD5B0 2B210100 */ slti $at, $t9, 0x100 -/* 0AE1B4 800AD5B4 14200021 */ bnez $at, .L800AD63C -/* 0AE1B8 800AD5B8 26737C0C */ addiu $s3, %lo(D_80127C0C) # addiu $s3, $s3, 0x7c0c -/* 0AE1BC 800AD5BC 3C058012 */ lui $a1, %hi(D_80127C10) # $a1, 0x8012 -/* 0AE1C0 800AD5C0 24A57C10 */ addiu $a1, %lo(D_80127C10) # addiu $a1, $a1, 0x7c10 -/* 0AE1C4 800AD5C4 0C019FCB */ jal func_80067F2C -/* 0AE1C8 800AD5C8 02602025 */ move $a0, $s3 -/* 0AE1CC 800AD5CC 3C10800E */ lui $s0, %hi(D_800E2C2C) # $s0, 0x800e -/* 0AE1D0 800AD5D0 3C11800E */ lui $s1, %hi(D_800E2C5C) # $s1, 0x800e -/* 0AE1D4 800AD5D4 26312C5C */ addiu $s1, %lo(D_800E2C5C) # addiu $s1, $s1, 0x2c5c -/* 0AE1D8 800AD5D8 26102C2C */ addiu $s0, %lo(D_800E2C2C) # addiu $s0, $s0, 0x2c2c -/* 0AE1DC 800AD5DC 02002025 */ move $a0, $s0 -.L800AD5E0: -/* 0AE1E0 800AD5E0 0C02B72F */ jal func_800ADCBC -/* 0AE1E4 800AD5E4 02402825 */ move $a1, $s2 -/* 0AE1E8 800AD5E8 26100018 */ addiu $s0, $s0, 0x18 -/* 0AE1EC 800AD5EC 1611FFFC */ bne $s0, $s1, .L800AD5E0 -/* 0AE1F0 800AD5F0 02002025 */ move $a0, $s0 -/* 0AE1F4 800AD5F4 8E620000 */ lw $v0, ($s3) -/* 0AE1F8 800AD5F8 3C08FA00 */ lui $t0, 0xfa00 -/* 0AE1FC 800AD5FC 24580008 */ addiu $t8, $v0, 8 -/* 0AE200 800AD600 AE780000 */ sw $t8, ($s3) -/* 0AE204 800AD604 2409FFFF */ li $t1, -1 -/* 0AE208 800AD608 AC490004 */ sw $t1, 4($v0) -/* 0AE20C 800AD60C AC480000 */ sw $t0, ($v0) -/* 0AE210 800AD610 8E620000 */ lw $v0, ($s3) -/* 0AE214 800AD614 3C0AFB00 */ lui $t2, 0xfb00 -/* 0AE218 800AD618 244B0008 */ addiu $t3, $v0, 8 -/* 0AE21C 800AD61C AE6B0000 */ sw $t3, ($s3) -/* 0AE220 800AD620 240CFF00 */ li $t4, -256 -/* 0AE224 800AD624 02602025 */ move $a0, $s3 -/* 0AE228 800AD628 AC4C0004 */ sw $t4, 4($v0) -/* 0AE22C 800AD62C 0C01ECF4 */ jal func_8007B3D0 -/* 0AE230 800AD630 AC4A0000 */ sw $t2, ($v0) -/* 0AE234 800AD634 0C01A0AB */ jal func_800682AC -/* 0AE238 800AD638 02602025 */ move $a0, $s3 -.L800AD63C: -/* 0AE23C 800AD63C 8FBF0024 */ lw $ra, 0x24($sp) -/* 0AE240 800AD640 8FB00014 */ lw $s0, 0x14($sp) -/* 0AE244 800AD644 8FB10018 */ lw $s1, 0x18($sp) -/* 0AE248 800AD648 8FB2001C */ lw $s2, 0x1c($sp) -/* 0AE24C 800AD64C 8FB30020 */ lw $s3, 0x20($sp) -/* 0AE250 800AD650 03E00008 */ jr $ra -/* 0AE254 800AD654 27BD0028 */ addiu $sp, $sp, 0x28 - diff --git a/asm/non_matchings/unknown_09F8F0/func_800ADAB8.s b/asm/non_matchings/unknown_09F8F0/func_800ADAB8.s deleted file mode 100644 index e844ccbd..00000000 --- a/asm/non_matchings/unknown_09F8F0/func_800ADAB8.s +++ /dev/null @@ -1,75 +0,0 @@ -glabel func_800ADAB8 -/* 0AE6B8 800ADAB8 3C06800E */ lui $a2, %hi(D_800E2C80) # $a2, 0x800e -/* 0AE6BC 800ADABC 24C62C80 */ addiu $a2, %lo(D_800E2C80) # addiu $a2, $a2, 0x2c80 -/* 0AE6C0 800ADAC0 8CC20000 */ lw $v0, ($a2) -/* 0AE6C4 800ADAC4 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 0AE6C8 800ADAC8 18400016 */ blez $v0, .L800ADB24 -/* 0AE6CC 800ADACC AFBF0014 */ sw $ra, 0x14($sp) -/* 0AE6D0 800ADAD0 00447023 */ subu $t6, $v0, $a0 -/* 0AE6D4 800ADAD4 1DC00038 */ bgtz $t6, .L800ADBB8 -/* 0AE6D8 800ADAD8 ACCE0000 */ sw $t6, ($a2) -/* 0AE6DC 800ADADC 3C18800E */ lui $t8, %hi(D_800E2C6C) # $t8, 0x800e -/* 0AE6E0 800ADAE0 8F182C6C */ lw $t8, %lo(D_800E2C6C)($t8) -/* 0AE6E4 800ADAE4 34018001 */ li $at, 32769 -/* 0AE6E8 800ADAE8 0301082A */ slt $at, $t8, $at -/* 0AE6EC 800ADAEC 14200008 */ bnez $at, .L800ADB10 -/* 0AE6F0 800ADAF0 24040027 */ li $a0, 39 -/* 0AE6F4 800ADAF4 0C030063 */ jal func_800C018C -/* 0AE6F8 800ADAF8 00000000 */ nop -/* 0AE6FC 800ADAFC 14400003 */ bnez $v0, .L800ADB0C -/* 0AE700 800ADB00 3C04800E */ lui $a0, %hi(D_800E2C98) # $a0, 0x800e -/* 0AE704 800ADB04 0C030076 */ jal func_800C01D8 -/* 0AE708 800ADB08 24842C98 */ addiu $a0, %lo(D_800E2C98) # addiu $a0, $a0, 0x2c98 -.L800ADB0C: -/* 0AE70C 800ADB0C 24040027 */ li $a0, 39 -.L800ADB10: -/* 0AE710 800ADB10 0C000741 */ jal func_80001D04 -/* 0AE714 800ADB14 00002825 */ move $a1, $zero -/* 0AE718 800ADB18 3C01800E */ lui $at, %hi(D_800E2C80) # $at, 0x800e -/* 0AE71C 800ADB1C 10000026 */ b .L800ADBB8 -/* 0AE720 800ADB20 AC202C80 */ sw $zero, %lo(D_800E2C80)($at) -.L800ADB24: -/* 0AE724 800ADB24 3C19800E */ lui $t9, %hi(D_800E2C60) # $t9, 0x800e -/* 0AE728 800ADB28 8F392C60 */ lw $t9, %lo(D_800E2C60)($t9) -/* 0AE72C 800ADB2C 3401BB80 */ li $at, 48000 -/* 0AE730 800ADB30 0321082A */ slt $at, $t9, $at -/* 0AE734 800ADB34 14200020 */ bnez $at, .L800ADBB8 -/* 0AE738 800ADB38 3C03800E */ lui $v1, %hi(D_800E2C7C) # $v1, 0x800e -/* 0AE73C 800ADB3C 24632C7C */ addiu $v1, %lo(D_800E2C7C) # addiu $v1, $v1, 0x2c7c -/* 0AE740 800ADB40 8C620000 */ lw $v0, ($v1) -/* 0AE744 800ADB44 00002825 */ move $a1, $zero -/* 0AE748 800ADB48 18400003 */ blez $v0, .L800ADB58 -/* 0AE74C 800ADB4C 00444023 */ subu $t0, $v0, $a0 -/* 0AE750 800ADB50 10000019 */ b .L800ADBB8 -/* 0AE754 800ADB54 AC680000 */ sw $t0, ($v1) -.L800ADB58: -/* 0AE758 800ADB58 0C000741 */ jal func_80001D04 -/* 0AE75C 800ADB5C 2404023F */ li $a0, 575 -/* 0AE760 800ADB60 3C09800E */ lui $t1, %hi(D_800E2C60) # $t1, 0x800e -/* 0AE764 800ADB64 8D292C60 */ lw $t1, %lo(D_800E2C60)($t1) -/* 0AE768 800ADB68 3C01FFFF */ lui $at, (0xFFFF4480 >> 16) # lui $at, 0xffff -/* 0AE76C 800ADB6C 34214480 */ ori $at, (0xFFFF4480 & 0xFFFF) # ori $at, $at, 0x4480 -/* 0AE770 800ADB70 01215021 */ addu $t2, $t1, $at -/* 0AE774 800ADB74 000A5943 */ sra $t3, $t2, 5 -/* 0AE778 800ADB78 240C0258 */ li $t4, 600 -/* 0AE77C 800ADB7C 018B6823 */ subu $t5, $t4, $t3 -/* 0AE780 800ADB80 3C01800E */ lui $at, %hi(D_800E2C80) # $at, 0x800e -/* 0AE784 800ADB84 AC2D2C80 */ sw $t5, %lo(D_800E2C80)($at) -/* 0AE788 800ADB88 24040384 */ li $a0, 900 -/* 0AE78C 800ADB8C 0C01BE53 */ jal get_random_number_from_range -/* 0AE790 800ADB90 24050474 */ li $a1, 1140 -/* 0AE794 800ADB94 3C0E800E */ lui $t6, %hi(D_800E2C60) # $t6, 0x800e -/* 0AE798 800ADB98 8DCE2C60 */ lw $t6, %lo(D_800E2C60)($t6) -/* 0AE79C 800ADB9C 3C01FFFF */ lui $at, (0xFFFF4480 >> 16) # lui $at, 0xffff -/* 0AE7A0 800ADBA0 34214480 */ ori $at, (0xFFFF4480 & 0xFFFF) # ori $at, $at, 0x4480 -/* 0AE7A4 800ADBA4 01C17821 */ addu $t7, $t6, $at -/* 0AE7A8 800ADBA8 000FC143 */ sra $t8, $t7, 5 -/* 0AE7AC 800ADBAC 0058C823 */ subu $t9, $v0, $t8 -/* 0AE7B0 800ADBB0 3C01800E */ lui $at, %hi(D_800E2C7C) # $at, 0x800e -/* 0AE7B4 800ADBB4 AC392C7C */ sw $t9, %lo(D_800E2C7C)($at) -.L800ADBB8: -/* 0AE7B8 800ADBB8 8FBF0014 */ lw $ra, 0x14($sp) -/* 0AE7BC 800ADBBC 27BD0018 */ addiu $sp, $sp, 0x18 -/* 0AE7C0 800ADBC0 03E00008 */ jr $ra -/* 0AE7C4 800ADBC4 00000000 */ nop - diff --git a/asm/non_matchings/unknown_09F8F0/func_800ADBC8.s b/asm/non_matchings/unknown_09F8F0/func_800ADBC8.s deleted file mode 100644 index dcc4bc57..00000000 --- a/asm/non_matchings/unknown_09F8F0/func_800ADBC8.s +++ /dev/null @@ -1,65 +0,0 @@ -glabel func_800ADBC8 -/* 0AE7C8 800ADBC8 3C0E800E */ lui $t6, %hi(D_800E2C60) # $t6, 0x800e -/* 0AE7CC 800ADBCC 8DCE2C60 */ lw $t6, %lo(D_800E2C60)($t6) -/* 0AE7D0 800ADBD0 3C014490 */ li $at, 0x44900000 # 1152.000000 -/* 0AE7D4 800ADBD4 000E7983 */ sra $t7, $t6, 6 -/* 0AE7D8 800ADBD8 448F3000 */ mtc1 $t7, $f6 -/* 0AE7DC 800ADBDC 44812000 */ mtc1 $at, $f4 -/* 0AE7E0 800ADBE0 46803220 */ cvt.s.w $f8, $f6 -/* 0AE7E4 800ADBE4 27BDFFC8 */ addiu $sp, $sp, -0x38 -/* 0AE7E8 800ADBE8 3C188012 */ lui $t8, %hi(D_80127C1C) # $t8, 0x8012 -/* 0AE7EC 800ADBEC 46082281 */ sub.s $f10, $f4, $f8 -/* 0AE7F0 800ADBF0 8F187C1C */ lw $t8, %lo(D_80127C1C)($t8) -/* 0AE7F4 800ADBF4 AFBF001C */ sw $ra, 0x1c($sp) -/* 0AE7F8 800ADBF8 AFA40038 */ sw $a0, 0x38($sp) -/* 0AE7FC 800ADBFC E7AA0028 */ swc1 $f10, 0x28($sp) -/* 0AE800 800ADC00 87040000 */ lh $a0, ($t8) -/* 0AE804 800ADC04 0C01C1F1 */ jal func_800707C4 -/* 0AE808 800ADC08 00000000 */ nop -/* 0AE80C 800ADC0C C7A60028 */ lwc1 $f6, 0x28($sp) -/* 0AE810 800ADC10 3C198012 */ lui $t9, %hi(D_80127C1C) # $t9, 0x8012 -/* 0AE814 800ADC14 46060302 */ mul.s $f12, $f0, $f6 -/* 0AE818 800ADC18 8F397C1C */ lw $t9, %lo(D_80127C1C)($t9) -/* 0AE81C 800ADC1C 00000000 */ nop -/* 0AE820 800ADC20 87240000 */ lh $a0, ($t9) -/* 0AE824 800ADC24 0C01C1FE */ jal func_800707F8 -/* 0AE828 800ADC28 E7AC0024 */ swc1 $f12, 0x24($sp) -/* 0AE82C 800ADC2C C7A40028 */ lwc1 $f4, 0x28($sp) -/* 0AE830 800ADC30 3C028012 */ lui $v0, %hi(D_80127C1C) # $v0, 0x8012 -/* 0AE834 800ADC34 46040082 */ mul.s $f2, $f0, $f4 -/* 0AE838 800ADC38 C7AC0024 */ lwc1 $f12, 0x24($sp) -/* 0AE83C 800ADC3C 8C427C1C */ lw $v0, %lo(D_80127C1C)($v0) -/* 0AE840 800ADC40 3C03800E */ lui $v1, %hi(D_800E2C94) # $v1, 0x800e -/* 0AE844 800ADC44 460C1281 */ sub.s $f10, $f2, $f12 -/* 0AE848 800ADC48 C448000C */ lwc1 $f8, 0xc($v0) -/* 0AE84C 800ADC4C 24632C94 */ addiu $v1, %lo(D_800E2C94) # addiu $v1, $v1, 0x2c94 -/* 0AE850 800ADC50 8C640000 */ lw $a0, ($v1) -/* 0AE854 800ADC54 C4460014 */ lwc1 $f6, 0x14($v0) -/* 0AE858 800ADC58 46001107 */ neg.s $f4, $f2 -/* 0AE85C 800ADC5C 460A4380 */ add.s $f14, $f8, $f10 -/* 0AE860 800ADC60 C4500010 */ lwc1 $f16, 0x10($v0) -/* 0AE864 800ADC64 460C2201 */ sub.s $f8, $f4, $f12 -/* 0AE868 800ADC68 10800008 */ beqz $a0, .L800ADC8C -/* 0AE86C 800ADC6C 46083480 */ add.s $f18, $f6, $f8 -/* 0AE870 800ADC70 44057000 */ mfc1 $a1, $f14 -/* 0AE874 800ADC74 44068000 */ mfc1 $a2, $f16 -/* 0AE878 800ADC78 44079000 */ mfc1 $a3, $f18 -/* 0AE87C 800ADC7C 0C0025B6 */ jal func_800096D8 -/* 0AE880 800ADC80 00000000 */ nop -/* 0AE884 800ADC84 1000000A */ b .L800ADCB0 -/* 0AE888 800ADC88 8FBF001C */ lw $ra, 0x1c($sp) -.L800ADC8C: -/* 0AE88C 800ADC8C 44057000 */ mfc1 $a1, $f14 -/* 0AE890 800ADC90 44068000 */ mfc1 $a2, $f16 -/* 0AE894 800ADC94 44079000 */ mfc1 $a3, $f18 -/* 0AE898 800ADC98 24080001 */ li $t0, 1 -/* 0AE89C 800ADC9C AFA80010 */ sw $t0, 0x10($sp) -/* 0AE8A0 800ADCA0 2404023E */ li $a0, 574 -/* 0AE8A4 800ADCA4 0C002556 */ jal func_80009558 -/* 0AE8A8 800ADCA8 AFA30014 */ sw $v1, 0x14($sp) -/* 0AE8AC 800ADCAC 8FBF001C */ lw $ra, 0x1c($sp) -.L800ADCB0: -/* 0AE8B0 800ADCB0 27BD0038 */ addiu $sp, $sp, 0x38 -/* 0AE8B4 800ADCB4 03E00008 */ jr $ra -/* 0AE8B8 800ADCB8 00000000 */ nop - diff --git a/asm/non_matchings/waves/func_800BFFDC.s b/asm/non_matchings/waves/obj_loop_wavepower.s similarity index 99% rename from asm/non_matchings/waves/func_800BFFDC.s rename to asm/non_matchings/waves/obj_loop_wavepower.s index f12c35ef..eec7976d 100644 --- a/asm/non_matchings/waves/func_800BFFDC.s +++ b/asm/non_matchings/waves/obj_loop_wavepower.s @@ -1,4 +1,4 @@ -glabel func_800BFFDC +glabel obj_loop_wavepower /* 0C0BDC 800BFFDC 3C0E800E */ lui $t6, %hi(D_800E3198) # $t6, 0x800e /* 0C0BE0 800BFFE0 8DCE3198 */ lw $t6, %lo(D_800E3198)($t6) /* 0C0BE4 800BFFE4 27BDFFA8 */ addiu $sp, $sp, -0x58 diff --git a/include/PR/pfs.h b/include/PR/pfs.h index 4bf0b9ab..f89566ff 100644 --- a/include/PR/pfs.h +++ b/include/PR/pfs.h @@ -152,5 +152,6 @@ extern s32 osPfsSetLabel(OSPfs *, u8 *); extern s32 osPfsIsPlug(OSMesgQueue *, u8 *); extern s32 osPfsFreeBlocks(OSPfs *, s32 *); extern s32 osPfsNumFiles(OSPfs *, s32 *, s32 *); +extern s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int channel); #endif diff --git a/include/PR/ultratypes.h b/include/PR/ultratypes.h index 5657a407..a690fd85 100644 --- a/include/PR/ultratypes.h +++ b/include/PR/ultratypes.h @@ -40,5 +40,7 @@ typedef s32 ptrdiff_t; //#endif typedef float Matrix[4][4]; +typedef s16 VertexList; +typedef s8 TriangleList; #endif diff --git a/include/level_object_entries.h b/include/level_object_entries.h new file mode 100644 index 00000000..1f9d4f54 --- /dev/null +++ b/include/level_object_entries.h @@ -0,0 +1,457 @@ +#ifndef _LEVEL_OBJECT_ENTRIES_H_ +#define _LEVEL_OBJECT_ENTRIES_H_ + + /* Size: 8 bytes. Shared across every entry. */ +typedef struct LevelObjectEntryCommon { + u8 object_id; // 9-bit object ID to load (uses size's MSB). + u8 size; // 7-bit total entry length (MSB is used in object_id). + s16 x, y, z; // Position in level +} LevelObjectEntryCommon; + +typedef struct LevelObjectEntry_Racer { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Racer; + +typedef struct LevelObjectEntry_Scenery { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; + /* 0x0B */ u8 unkB; +} LevelObjectEntry_Scenery; + +typedef struct LevelObjectEntry_Fish { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Fish; + +typedef struct LevelObjectEntry_Animator { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; + /* 0x09 */ s8 unk9; + /* 0x0A */ s8 unkA; +} LevelObjectEntry_Animator; + +typedef struct LevelObjectEntry_Weapon { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Weapon; + +typedef struct LevelObjectEntry_Smoke { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Smoke; + +typedef struct LevelObjectEntry_Exit { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 pad8[8]; + /* 0x10 */ u8 unk10; + /* 0x11 */ u8 unk11; + /* 0x12 */ u8 pad12[6]; + /* 0x18 */ s8 unk18; +} LevelObjectEntry_Exit; + +typedef struct LevelObjectEntry_Audio { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Audio; + +typedef struct LevelObjectEntry_AudioLine { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u16 unkA; + /* 0x0C */ u8 unkC; + /* 0x0D */ u8 unkD; + /* 0x0E */ u16 unkE; + /* 0x10 */ u8 unk10; + /* 0x11 */ u8 unk11; + /* 0x12 */ u8 unk12; + /* 0x13 */ u8 unk13; +} LevelObjectEntry_AudioLine; + +typedef struct LevelObjectEntry_CameraControl { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; +} LevelObjectEntry_CameraControl; + +typedef struct LevelObjectEntry_SetupPoint { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_SetupPoint; + +typedef struct LevelObjectEntry_Dino_Whale { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Dino_Whale; + +typedef struct LevelObjectEntry_Checkpoint { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Checkpoint; + +typedef struct LevelObjectEntry_Door { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Door; + +typedef struct LevelObjectEntry_FogChanger { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; +} LevelObjectEntry_FogChanger; + +typedef struct LevelObjectEntry_AiNode { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_AiNode; + +#define BALLOON_TYPE_BOOST 0 +#define BALLOON_TYPE_MISSILE 1 +#define BALLOON_TYPE_TRAP 2 +#define BALLOON_TYPE_SHIELD 3 +#define BALLOON_TYPE_MAGNET 4 + +typedef struct LevelObjectEntry_WeaponBalloon { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; // Unused? + /* 0x09 */ u8 balloonType; + /* 0x0A */ u8 scale; // This is divided by 64 to get actual scale. +} LevelObjectEntry_WeaponBalloon; + +typedef struct LevelObjectEntry_AudioSeqLine { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_AudioSeqLine; + +typedef struct LevelObjectEntry_BombExplosion { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_BombExplosion; + +typedef struct LevelObjectEntry_WBalloonPop { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WBalloonPop; + +typedef struct LevelObjectEntry_Unknown25 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown25; + +typedef struct LevelObjectEntry_SkyControl { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_SkyControl; + +typedef struct LevelObjectEntry_AudioReverb { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_AudioReverb; + +typedef struct LevelObjectEntry_Torch_Mist { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_Torch_Mist; + +typedef struct LevelObjectEntry_TexScroll { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; + /* 0x0A */ s8 unkA; + /* 0x0B */ s8 unkB; +} LevelObjectEntry_TexScroll; + +typedef struct LevelObjectEntry_ModeChange { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_ModeChange; + +typedef struct LevelObjectEntry_StopWatchMan { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_StopWatchMan; + +typedef struct LevelObjectEntry_Banana { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Banana; + +typedef struct LevelObjectEntry_RgbaLight { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_RgbaLight; + +typedef struct LevelObjectEntry_Buoy_PirateShip { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Buoy_PirateShip; + +typedef struct LevelObjectEntry_Weather { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; +} LevelObjectEntry_Weather; + +typedef struct LevelObjectEntry_Bridge_WhaleRamp { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_Bridge_WhaleRamp; + +typedef struct LevelObjectEntry_RampSwitch { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; +} LevelObjectEntry_RampSwitch; + +typedef struct LevelObjectEntry_SeaMonster { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_SeaMonster; + +typedef struct LevelObjectEntry_Bonus { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Bonus; + +typedef struct LevelObjectEntry_LensFlare { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_LensFlare; + +typedef struct LevelObjectEntry_LensFlareSwitch { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; +} LevelObjectEntry_LensFlareSwitch; + +typedef struct LevelObjectEntry_CollectEgg { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_CollectEgg; + +typedef struct LevelObjectEntry_EggCreator { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_EggCreator; + +typedef struct LevelObjectEntry_CharacterFlag { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; + /* 0x0A */ s16 unkA; + /* 0x0C */ s16 unkC; + /* 0x0E */ s16 unkE; +} LevelObjectEntry_CharacterFlag; + +typedef struct LevelObjectEntry_Animation { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Animation; + +typedef struct LevelObjectEntry_InfoPoint { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8[3]; + /* 0x0B */ u8 unkB; +} LevelObjectEntry_InfoPoint; + +typedef struct LevelObjectEntry_Trigger { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Trigger; + +typedef struct LevelObjectEntry_AirZippers_WaterZippers { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_AirZippers_WaterZippers; + +typedef struct LevelObjectEntry_Unknown58 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown58; + +typedef struct LevelObjectEntry_WaveGenerator { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WaveGenerator; + +typedef struct LevelObjectEntry_Butterfly { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Butterfly; + +typedef struct LevelObjectEntry_Parkwarden { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Parkwarden; + +typedef struct LevelObjectEntry_WorldKey { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; +} LevelObjectEntry_WorldKey; + +typedef struct LevelObjectEntry_BananaCreator { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_BananaCreator; + +typedef struct LevelObjectEntry_TreasureSucker { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; +} LevelObjectEntry_TreasureSucker; + +typedef struct LevelObjectEntry_Log { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Log; + +typedef struct LevelObjectEntry_LavaSpurt { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_LavaSpurt; + +typedef struct LevelObjectEntry_PosArrow { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_PosArrow; + +typedef struct LevelObjectEntry_HitTester { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_HitTester; + +typedef struct LevelObjectEntry_MidiFade { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_MidiFade; + +typedef struct LevelObjectEntry_DynamicLightingObject { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_DynamicLightingObject; + +typedef struct LevelObjectEntry_EffectBox { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_EffectBox; + +typedef struct LevelObjectEntry_TrophyCab { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 rotation; +} LevelObjectEntry_TrophyCab; + +typedef struct LevelObjectEntry_Bubbler { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u16 unkA; +} LevelObjectEntry_Bubbler; + +typedef struct LevelObjectEntry_FlyCoin { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_FlyCoin; + +typedef struct LevelObjectEntry_GoldenBalloon { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_GoldenBalloon; + +typedef struct LevelObjectEntry_Laserbolt { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Laserbolt; + +typedef struct LevelObjectEntry_Lasergun { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ s8 unkA; + /* 0x0B */ s8 unkB; + /* 0x0C */ u8 unkC; + /* 0x0D */ u8 unkD; +} LevelObjectEntry_Lasergun; + +typedef struct LevelObjectEntry_GroundZipper { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_GroundZipper; + +typedef struct LevelObjectEntry_OverridePos { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_OverridePos; + +typedef struct LevelObjectEntry_WizpigShip { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WizpigShip; + +typedef struct LevelObjectEntry_SilverCoin { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_SilverCoin; + +typedef struct LevelObjectEntry_Boost { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8[1]; +} LevelObjectEntry_Boost; + +typedef struct LevelObjectEntry_WardenSmoke { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WardenSmoke; + +typedef struct LevelObjectEntry_Unknown94 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown94; + +typedef struct LevelObjectEntry_Unknown96 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown96; + +typedef struct LevelObjectEntry_Snowball { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Snowball; + +typedef struct LevelObjectEntry_Teleport { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Teleport; + +typedef struct LevelObjectEntry_Lighthouse_RocketSignpost { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Lighthouse_RocketSignpost; + +typedef struct LevelObjectEntry_Windsail { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Windsail; + +typedef struct LevelObjectEntry_RangeTrigger { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_RangeTrigger; + +typedef struct LevelObjectEntry_Fireball_Octoweapon { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Fireball_Octoweapon; + +typedef struct LevelObjectEntry_Frog { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Frog; + +typedef struct LevelObjectEntry_SilverCoinAdv2 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_SilverCoinAdv2; + +typedef struct LevelObjectEntry_TTDoor { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; + /* 0x0B */ u8 unkB; + /* 0x0C */ u8 unkC; + /* 0x0D */ u8 padD; + /* 0x0E */ s8 unkE; +} LevelObjectEntry_TTDoor; + +typedef struct LevelObjectEntry_MidiFadePoint { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_MidiFadePoint; + +typedef struct LevelObjectEntry_OctoBubble { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_OctoBubble; + +typedef struct LevelObjectEntry_LevelName { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; + /* 0x09 */ s8 unk9; +} LevelObjectEntry_LevelName; + +typedef struct LevelObjectEntry_Midichset { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u16 unk8; + /* 0x0A */ u8 unkA; + /* 0x0B */ u8 unkB; +} LevelObjectEntry_Midichset; + +#endif diff --git a/include/libc/assert.h b/include/libc/assert.h index a3736e37..eb012526 100644 --- a/include/libc/assert.h +++ b/include/libc/assert.h @@ -21,7 +21,7 @@ extern "C" { /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ -#ident "$Revision: 1.17 $" +//#ident "$Revision: 1.17 $" /* ANSI C Notes: * diff --git a/include/structs.h b/include/structs.h index 84e82d43..15dd5953 100644 --- a/include/structs.h +++ b/include/structs.h @@ -89,7 +89,7 @@ typedef struct TextureHeader { /* 0x1F */ u8 unk1F; } TextureHeader; -// Probably not unqiue to the boot menu. +// Probably not unique to the boot menu. typedef struct DrawTexture { TextureHeader *texture; // Pointer to texture to draw. s16 xOffset; // Offset from the center of the screen. @@ -338,10 +338,15 @@ typedef struct TexCoords { /* Size: 16 bytes */ typedef struct Triangle { -/* 0x00 */ u8 drawBackface; // 0x40 = Draw backface, 0x00 = Cull backface -/* 0x01 */ u8 vi0; // First vertex index -/* 0x02 */ u8 vi1; // Second vertex index -/* 0x03 */ u8 vi2; // Third vertex index + union { + struct { + /* 0x00 */ u8 drawBackface; // 0x40 = Draw backface, 0x00 = Cull backface + /* 0x01 */ u8 vi0; // First vertex index + /* 0x02 */ u8 vi1; // Second vertex index + /* 0x03 */ u8 vi2; // Third vertex index + }; + /* 0x00 */ u32 vertices; // For convenience? + }; /* 0x04 */ TexCoords uv0; // Texture coordinates for the first vertex /* 0x08 */ TexCoords uv1; // Texture coordinates for the second vertex /* 0x0C */ TexCoords uv2; // Texture coordinates for the third vertex @@ -448,39 +453,43 @@ typedef struct LevelModel { /* 0x38 */ u32 minimapColor; } LevelModel; -/* Size: 8 bytes. */ -typedef struct LevelObjectEntryCommon { - u8 object_id; // 9-bit object ID to load (uses size'a MSB). - u8 size; // 7-bit total entry length (MSB is used in object_id). - s16 x, y, z; // Position in level -} LevelObjectEntryCommon; - typedef struct Object_3C { - u8 pad0[0x8]; + u8 pad0[0x2]; + s16 unk2; + s16 unk4; + s16 unk6; s8 unk8; u8 pad9[0x4]; u8 unkD; } Object_3C; -typedef struct Object_40 { - u8 pad0[0x4]; - f32 unk4; - f32 unk8; - f32 unkC; - u8 pad10[0x20]; - u16 unk30; - s16 unk32; - u8 pad34[0x9]; - u8 unk3D; - u8 pad3E[0x15]; - s8 unk53; - s8 unk54; - s8 unk55; //size of array pointed by Object->unk68 - u8 pad56[0x02]; - u8 pad58[0x18]; - u8 unk70; - u8 unk71; -} Object_40; +#define OBJECT_MODEL_TYPE_3D_MODEL 0 +#define OBJECT_MODEL_TYPE_SPRITE_BILLBOARD 1 +#define OBJECT_MODEL_TYPE_VEHICLE_PART 2 +#define OBJECT_MODEL_TYPE_UNKNOWN4 4 + +typedef struct ObjectHeader { + u8 pad0[0x4]; + /* 0x04 */ f32 unk4; + /* 0x08 */ f32 unk8; + /* 0x0C */ f32 scale; + u8 pad10[0x20]; + /* 0x30 */ u16 unk30; + /* 0x32 */ s16 unk32; + u8 pad34[0x9]; + /* 0x3D */ u8 unk3D; + u8 pad3E[0x15]; + /* 0x53 */ s8 modelType; + /* 0x54 */ s8 behaviorId; + /* 0x55 */ s8 numberOfModelIds; // size of array pointed by Object->unk68 + u8 pad56; + /* 0x57 */ s8 unk57; + u8 pad58[0x8]; + /* 0x60 */ char internalName[16]; + /* 0x70 */ u8 unk70; + /* 0x71 */ u8 unk71; + u8 pad72[0x6]; +} ObjectHeader; typedef struct Object_44_0 { u8 unk0; @@ -515,7 +524,7 @@ typedef struct Object_4C { u8 unk11; u8 unk12; u8 unk13; - u16 unk14; + s16 unk14; s8 unk16; s8 unk17; } Object_4C; @@ -556,7 +565,7 @@ typedef struct Object_60 { // This REALLY needs to be refactored at some point. // This structure differs based on the type of object being loaded. -// See functions in unknown_0348C0.c for how these get loaded. +// See functions in object_functions.c for how these get loaded. typedef struct Object_64 { union { f32 unk0; @@ -676,9 +685,9 @@ typedef struct Object { /* 0x003C */ f32 unk3C_f; } unk3C_a; - /* 0x0040 */ Object_40 *descriptor_ptr; + /* 0x0040 */ ObjectHeader *header; /* 0x0044 */ void *unk44; - /* 0x0048 */ s16 unk48; + /* 0x0048 */ s16 behaviorId; /* 0x004A */ s16 unk4A; /* 0x004C */ Object_4C *unk4C; //player + 0x318 /* 0x0050 */ Object_50 *unk50; //player + 0x2F4 @@ -693,7 +702,11 @@ typedef struct Object { /* 0x0070 */ u32 unk70; /* 0x0074 */ u32 unk74; + + union { /* 0x0078 */ s32 unk78; + /* 0x0078 */ f32 unk78f; + }; union { struct { diff --git a/lib/src/mips1/sc/sched.c b/lib/src/mips1/sc/sched.c index 4d644169..c91d950a 100644 --- a/lib/src/mips1/sc/sched.c +++ b/lib/src/mips1/sc/sched.c @@ -359,7 +359,7 @@ void __scHandleRSP(OSSched *sc) { } else { t->state &= ~OS_SC_NEEDS_RSP; /* BEGIN TODO: This just feels wrong, but it matches */ - while(0){} + do{} while(0); } if ((t->flags & OS_SC_TYPE_MASK) != OS_SC_XBUS){} /* END TODO */ diff --git a/lib/src/os/osMotor.c b/lib/src/os/osMotor.c index 4056ed14..3a9ca083 100644 --- a/lib/src/os/osMotor.c +++ b/lib/src/os/osMotor.c @@ -10,11 +10,10 @@ #define MOTOR_DEFAULT_BANK 128 static void _MakeMotorData(int channel, u16 address, u8 *buffer, OSPifRam *mdata); -//TODO: These should really be declared here instead of somewhere else -extern OSPifRam _MotorStopData[MAXCONTROLLERS]; -extern OSPifRam _MotorStartData[MAXCONTROLLERS]; -extern u8 _motorstopbuf[BLOCKSIZE]; -extern u8 _motorstartbuf[BLOCKSIZE]; +OSPifRam _MotorStopData[MAXCONTROLLERS]; +OSPifRam _MotorStartData[MAXCONTROLLERS]; +u8 _motorstopbuf[BLOCKSIZE]; +u8 _motorstartbuf[BLOCKSIZE]; s32 osMotorStop(OSPfs *pfs) { int i; s32 ret; diff --git a/rename.sh b/rename.sh index 4d31a792..35fa7c0c 100755 --- a/rename.sh +++ b/rename.sh @@ -9,7 +9,7 @@ then fi # Rename all instances within text files. -grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" +grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h undefined_syms.txt dkr.ld | xargs sed -i "s/\b$1\b/$2/g" # Rename filenames & directories. python3 ./tools/python/rename_file.py "$1" "$2" diff --git a/src/audio.c b/src/audio.c index 1497e501..e71b4afc 100644 --- a/src/audio.c +++ b/src/audio.c @@ -667,6 +667,7 @@ u16 func_80001CB8(u16 arg0) { return sSoundEffectsPool[arg0].unk6; } +//Play Sound effect? GLOBAL_ASM("asm/non_matchings/audio/func_80001D04.s") void func_80001EA8(u16 arg0, f32 x, f32 y, f32 z, s32 **arg4) { diff --git a/src/camera.c b/src/camera.c index 9ba7b4c9..a9c07ac9 100644 --- a/src/camera.c +++ b/src/camera.c @@ -4,7 +4,7 @@ #include "camera.h" #include "audio.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "unknown_0255E0.h" #include "video.h" #include "lib/src/libc/rmonPrintf.h" @@ -96,7 +96,7 @@ u8 D_800DD2F8[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; -s32 D_800DD300 = 0; // Currently unknown, might be a different type. +s32 sNoControllerPluggedIn = FALSE; // Looks to be a boolean for whether a controller is plugged in. FALSE if plugged in, and TRUE if not. s16 gButtonMask = 0xFFFF; @@ -928,7 +928,7 @@ UNUSED void debug_print_float_matrix_values(f32 *mtx) { rmonPrintf("\n"); } -OSMesgQueue *func_8006A100(void) { +OSMesgQueue *get_si_mesg_queue(void) { return &sSIMesgQueue; } @@ -936,9 +936,9 @@ OSMesgQueue *func_8006A100(void) { * Initialise the player controllers, and return the status when finished. */ s32 init_controllers(void) { - s32 *temp1; // Unused + UNUSED s32 *temp1; // Unused u8 bitpattern; - s32 *temp2; // Unused + UNUSED s32 *temp2; // Unused osCreateMesgQueue(&sSIMesgQueue, &sSIMesgBuf, 1); osSetEventMesg(OS_EVENT_SI, &sSIMesgQueue, D_801210FC); @@ -946,7 +946,7 @@ s32 init_controllers(void) { osContStartReadData(&sSIMesgQueue); initialise_player_ids(); - D_800DD300 = 0; + sNoControllerPluggedIn = FALSE; if ((bitpattern & CONT_ABSOLUTE) && (!(status.errno & CONT_NO_RESPONSE_ERROR))) { return CONTROLLER_EXISTS; @@ -954,7 +954,7 @@ s32 init_controllers(void) { if (!bitpattern) {} // Fakematch - D_800DD300 = 1; + sNoControllerPluggedIn = TRUE; return CONTROLLER_MISSING; } @@ -966,7 +966,7 @@ GLOBAL_ASM("asm/non_matchings/camera/func_8006A1C4.s") */ void initialise_player_ids(void) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < MAXCONTROLLERS; i++) { sPlayerID[i] = i; } } @@ -978,12 +978,12 @@ void initialise_player_ids(void) { void assign_player_ids(s8 *activePlayers) { s32 i; s32 temp = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < MAXCONTROLLERS; i++) { if (activePlayers[i]) { sPlayerID[temp++] = i; } } - for (i = 0; i < 4; i++) { + for (i = 0; i < MAXCONTROLLERS; i++) { if (!activePlayers[i]) { sPlayerID[temp++] = i; } diff --git a/src/camera.h b/src/camera.h index 20f1e4a1..b587e68e 100644 --- a/src/camera.h +++ b/src/camera.h @@ -93,8 +93,6 @@ extern Matrix gOrthoMatrix; extern u8 D_800DD2F8[8]; -extern s32 D_800DD300; - extern s16 gButtonMask; //TODO: Figure out where these functions live: unknown_070110? @@ -150,7 +148,7 @@ f32 func_80069DC8(f32 x, f32 y, f32 z); void func_80069E14(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4); void func_80069F28(f32 arg0); UNUSED void debug_print_float_matrix_values(f32 *mtx); -OSMesgQueue *func_8006A100(void); +OSMesgQueue *get_si_mesg_queue(void); void initialise_player_ids(void); void assign_player_ids(s8 *activePlayers); u8 get_player_id(s32 player); diff --git a/src/controller_pak.c b/src/controller_pak.c deleted file mode 100644 index 6ff6028f..00000000 --- a/src/controller_pak.c +++ /dev/null @@ -1,584 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80072250 */ - -#include "controller_pak.h" -#include "memory.h" -#include "PR/pfs.h" -#include "PR/os_cont.h" -#include "macros.h" -#include "structs.h" -#include "camera.h" -#include "unknown_00BC20.h" - -/************ .data ************/ - -s32 *D_800DE440 = 0; - -u8 gN64FontCodes[68] = "\0 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#'*+,-./:=?@"; - -s32 D_800DE488 = 0; // Currently unknown, might be a different type. -s32 D_800DE48C = 0; - -/*******************************/ - -/************ .rodata ************/ - -const char D_800E7590[] = "Region = %d loc = %x size = %x\t"; -const char D_800E75B4[] = "FREE"; -const char D_800E75BC[] = "ALLOCATED"; -const char D_800E75C8[] = "ALLOCATED,FIXED"; -const char D_800E75D8[] = "\n"; -const char D_800E75DC[] = "\n"; -const char D_800E75E0[] = "Region number = %d\t"; -const char D_800E75F4[] = "maxSlots = %d\t"; -const char D_800E7604[] = "slotsUsed = %d\t"; -const char D_800E7614[] = "loc = %x\t"; -const char D_800E7620[] = "size = %x\n"; -const char D_800E762C[] = "\n"; - -const char D_800E7630[] = "DKRACING-ADV"; -const char D_800E7640[] = "DKRACING-ADV"; -const char D_800E7650[] = "DKRACING-TIMES"; -const char D_800E7660[] = "DKRACING-TIMES"; -const char D_800E7670[] = "DKRACING-ADV"; -const char D_800E7680[] = "DKRACING-ADV"; -const char D_800E7690[] = "DKRACING-TIMES"; -const char D_800E76A0[] = "DKRACING-TIMES"; - -const char D_800E76B0[] = "WARNING : No Eprom\n"; -const char D_800E76C4[] = "WARNING : No Eprom\n"; -const char D_800E76D8[] = "WARNING : No Eprom\n"; -const char D_800E76EC[] = "WARNING : No Eprom\n"; -const char D_800E7700[] = "WARNING : No Eprom\n"; -const char D_800E7714[] = "WARNING : No Eprom\n"; -const char D_800E7728[] = "WARNING : No Eprom\n"; - -const char D_800E773C[] = "DKRACING-GHOSTS"; // Used in func_80074B34 -const u8 D_800E774C[4] = { 0, 0, 0, 0 }; // Used in func_80074B34, but I'm confused to what this is for. -const char D_800E7750[] = "warning: corrupt ghost\n"; - -/*********************************/ - -/************ .bss ************/ - -OSMesgQueue *D_80124010; -s32 D_80124014; - -OSPfs pfs[MAXCONTROLLERS]; - -s32 D_801241B8[10]; -s32 D_801241E0; -u8 D_801241E4; -u8 D_801241E5; -u8 D_801241E6; -u8 D_801241E7; -s32 D_801241E8; -s32 D_801241EC; -s32 D_801241F0; -s32 D_801241F4; - -/*******************************/ - -u8 func_80072250(s32 arg0) { - if ((arg0 == 0 || arg0 == 1) && func_8000E158()) { - arg0 = 1 - arg0; - } - return get_player_id(arg0); -} - -void func_80072298(u8 arg0) { - D_801241E4 = arg0; - if (arg0 != 0) { - D_801241E8 = 0x79; - D_801241E6 = 0xF; - return; - } - func_80072708(); -} - -#ifdef NON_EQUIVALENT -// Unused. Has regalloc issues. -s32 func_800722E8(s16 arg0) { - if (arg0 < 0 || arg0 >= 4) { - return 0; - } - return D_801241E5 & ((1 << func_80072250(arg0)) & 0xFF); -} -#else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800722E8.s") -#endif - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072348.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072424.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072578.s") - -void func_80072708(void) { - D_800DE48C = 3; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072718.s") - -#ifdef NON_EQUIVALENT -s32 func_80072C54(s32 arg0) { - // v0 v1 a1 a2 a3 t0 t1 t2 t3 t4 t5 t6 t7 t8 - u32 v0; - u32 v1; - s32 a1; - u32 a2; - u8 *a3; - s32 t0; - u32 *t1; - u32 *t2; - u8 **t3; - u32 t4; - u32 t5; - u32 t6; - u32 t7; - u32 t8; - u32 t9; - - v1 = 0; - if (arg0 <= 0) { - return v1; - } - // L80072C64 - v0 = 1 << (arg0 + 0x1F); - if (arg0 != 0) { - a1 = -(arg0 & 3); - t0 = a1 + arg0; - if (a1 != 0) { - // L80072CA0 - do { - a2 = D_801241F4; - a1 = arg0 - 1; - t6 = v0 >> 1; - if (a2 == 0) { - a3 = D_801241EC; - a2 = 0x80; - t8 = *a3; - D_801241EC = a3 + 1; - D_801241F4 = 0x80; - D_801241F0 = t8; - } - // L80072CCC - arg0 = a1; - if (D_801241F0 & a2 != 0) { - v1 |= v0; - } - // L80072CE4 - v0 = t6; - D_801241F4 = a2 >> 1; - } while (t0 != a1); - if (a1 == 0) { - return v1; // should jump to end - } - } - // L80072CF4 - t1 = &D_801241F4; - t2 = &D_801241F0; - t3 = &D_801241EC; - t4 = 128; - // L80072D10 - do { - a2 = *t1; - t6 = v0 >> 1; - arg0 -= 4; - if (a2 == 0) { - a3 = *t3; - a2 = t4; - t9 = *a3; - *t3 = a3 + 1; - *t1 = t4; - *t2 = t9; - } - // L80072D3C - a1 = *t2; - t8 = a2 << 1; - t7 = a1 & a2; - a2 = t8; - if (t7 != 0) { - v1 |= v0; - } - // L80072D54 - v0 = t6; - *t1 = t8; - if (t8 == 0) { - a3 = *t3; - a2 = t4; - a1 = *a3; - *t3 = a3 + 1; - *t1 = t4; - *t2 = a1; - } - // L80072D7C - t7 = a1 & a2; - t6 = v0 >> 1; - if (t7 != 0) { - v1 |= v0; - } - // L80072D8C - t8 = a2 >> 1; - *t1 = t8; - a2 = t8; - v0 = t6; - if (t8 == 0) { - a3 = *t3; - a2 = t4; - a1 = *a3; - *t3 = a3 + 1; - *t1 = t4; - *t2 = a1; - } - // L80072DBC - t7 = a1 & a2; - t6 = v0 >> 1; - if (t7 != 0) { - v1 |= v0; - } - // L80072DCC - t8 = a2 >> 1; - *t1 = t8; - a2 = t8; - v0 = t6; - if (t8 == 0) { - a3 = *t3; - a2 = t4; - a1 = *a3; - *t3 = a3 + 1; - *t1 = t4; - *t2 = a1; - } - // L80072DFC - t7 = a1 & a2; - t6 = v0 >> 1; - if (t7 != 0) { - v1 |= v0; - } - // L80072E0C - t8 = a2 >> 1; - *t1 = t8; - v0 = t6; - } while (arg0 != 0); - } - // L80072E1C - return v1; -} -#else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072C54.s") -#endif - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072E28.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007306C.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800732E8.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073588.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800738A4.s") - -s32 get_s32_256(void) { - return 256; -} - -s32 get_s32_512(void) { - return 512; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073C5C.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073E1C.s") - -s32 func_80073F5C(s32 arg0, s32 arg1) { - s32 temp_v0; - s32 sp30; //Possible epcInfo struct - u8 *sp2C; - s32 phi_v1; - s32 size; - - size = get_s32_256(); // 256 bytes - sp2C = allocate_from_main_pool_safe(size, COLOR_TAG_WHITE); - *((s32 *)sp2C) = 0x47414D44; //'GAMD'; - func_800732E8(arg1, sp2C + 4); - phi_v1 = func_80073C5C(arg0, 3, &sp30); - if (phi_v1 == 0) { - phi_v1 = func_800766D4(arg0, -1, &D_800E7680, &sp30, sp2C, size); - } - free_from_memory_pool(sp2C); - if (phi_v1 != 0) { - phi_v1 |= (arg0 << 0x1E); - } - return phi_v1; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074018.s") - -s32 func_80074148(s32 arg0, Settings *arg1) { - u8 *sp2C; - s32 phi_v1; - s32 sp24; - s32 temp_v0; - s32 sp30; //Possible epcInfo struct - - sp24 = get_s32_512(); // 512 bytes - sp2C = allocate_from_main_pool_safe(sp24, COLOR_TAG_WHITE); - *((s32 *)sp2C) = 0x54494D44; // TIMD - func_800738A4(arg1, sp2C + 4); - phi_v1 = func_80073C5C(arg0, 4, &sp30); - if (phi_v1 == 0) { - phi_v1 = func_800766D4(arg0, -1, &D_800E76A0, &sp30, sp2C, sp24); - } - free_from_memory_pool(sp2C); - if (phi_v1 != 0) { - phi_v1 |= (arg0 << 0x1E); - } - return phi_v1; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074204.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007431C.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800744DC.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800745D0.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800746F0.s") - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007480C.s") - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074874.s") - -#ifdef NON_EQUIVALENT -s64 func_8007480C(u64 arg0); -// regalloc issues -s32 func_8007497C(u64 *arg0) { - if (osEepromProbe(func_8006A100()) == 0) { - return -1; - } - *arg0 <<= 8; - *arg0 >>= 8; - *arg0 |= (s64)((s32)func_8007480C(*arg0)) << 56; - if (is_reset_pressed() == 0) { - osEepromWrite(func_8006A100(), 0xF, (u8 *)arg0); - } - return 1; -} -#else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007497C.s") -#endif - -#ifdef NON_EQUIVALENT -// regalloc issues -s16 func_80074A4C(GhostHeader *ghostHeader) { - s16 i; - s16 len; - s16 sum; - s32 temp; - - sum = 0; - len = (ghostHeader->nodeCount * sizeof(GhostDataFrame)) + sizeof(GhostHeader); - for (i = sizeof(GhostHeader); i < len; i++) { - sum += ((u8 *)ghostHeader)[i]; - } - return sum; -} -#else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074A4C.s") -#endif - -void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 nodeCount, u8 *dest) { - ghostHeader->checksum = 0; - ghostHeader->characterID = characterID; - ghostHeader->unk3 = 0; - ghostHeader->time = time; - ghostHeader->nodeCount = nodeCount; - bcopy(dest, (u8 *)ghostHeader + 8, nodeCount * sizeof(GhostDataFrame)); - ghostHeader->checksum = func_80074A4C(ghostHeader); -} - -#ifdef NON_EQUIVALENT -s32 func_80074B1C(void) { - return (0x1100 * 6) + 0x100; // -O2 optimizes this down to "return 0x6700;". -} -#else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074B1C.s") -#endif - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074B34.s") - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074EB8.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075000.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800753D8.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800756D4.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800758DC.s") - -s32 func_80075AEC(s32 controllerIndex) { - osContStartReadData(D_80124010); - return 0; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075B18.s") - -s32 func_80075D38(s32 controllerIndex) { - s32 phi_v1; - s32 temp_v0 = func_800758DC(); - if (temp_v0 == 0 || temp_v0 == 2) { - temp_v0 = osPfsChecker(&pfs[controllerIndex]); - if (temp_v0 == 0) { - phi_v1 = 0; - } else if (temp_v0 == 2) { - phi_v1 = 5; - } else { - phi_v1 = 2; - } - } else { - phi_v1 = 0; - } - func_80075AEC(controllerIndex); - return phi_v1; -} - -s32 func_80075DC4(s32 controllerIndex) { - s32 phi_v1; - s32 temp_v0 = func_800758DC(); - if (temp_v0 == 0 || temp_v0 == 2 || temp_v0 == 3) { - temp_v0 = osPfsReFormat(&pfs[controllerIndex], D_80124010, controllerIndex); - if (temp_v0 == 0) { - phi_v1 = 0; - } else if (temp_v0 == 2) { - phi_v1 = 5; - } else { - phi_v1 = 2; - } - } else { - phi_v1 = 0; - } - func_80075AEC(controllerIndex); - return phi_v1; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075E60.s") - -void func_80076164(void) { - if (D_800DE440 != 0) { - free_from_memory_pool(D_800DE440); - } - D_800DE440 = 0; -} - -s32 func_80076194(s32 controllerIndex, s32 *arg1, s32 *arg2) { - s32 phi_v1; - s32 sp28; - s32 sp24; - s32 sp20; - - phi_v1 = func_800758DC(); - if (phi_v1 == 0) { - if (arg1 != NULL) { - phi_v1 = osPfsFreeBlocks(&pfs[controllerIndex], &sp28); - if (phi_v1 != 0) { - func_80075AEC(controllerIndex); - return (controllerIndex << 0x1E) | 9; - } - *arg1 = sp28; - } - if (arg2 != NULL) { - phi_v1 = osPfsNumFiles(&pfs[controllerIndex], &sp24, &sp20); - if (phi_v1 != 0) { - func_80075AEC(controllerIndex); - return (controllerIndex << 0x1E) | 9; - } - if (sp20 >= 0x10) { - *arg2 = 0; - } else { - *arg2 = 0x10 - sp20; - } - } - } else { - phi_v1 |= controllerIndex << 0x1E; - } - func_80075AEC(controllerIndex); - return phi_v1; -} - -s32 func_800762C8(s32 controllerIndex, s32 fileNum) { - OSPfsState state; - s32 ret; - - ret = func_800758DC(controllerIndex); - if (ret != 0) { - func_80075AEC(controllerIndex); - return (controllerIndex << 0x1E) | ret; - } - - ret = (controllerIndex << 0x1E) | 9; - - if (osPfsFileState(&pfs[controllerIndex], fileNum, &state) == 0) { - if (osPfsDeleteFile(&pfs[controllerIndex], state.company_code, state.game_code, state.game_name, state.ext_name) == 0) { - ret = 0; - } - } - - func_80075AEC(controllerIndex); - - return ret; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80076388.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800764E8.s") - -s32 read_data_from_controller_pak(s32 controllerIndex, s32 fileNum, u8 *data, s32 dataLength) { - s32 readResult = osPfsReadWriteFile(&pfs[controllerIndex], fileNum, PFS_READ, 0, dataLength, data); - //Successful read - if (readResult == 0) { - return 0; - } - if ((readResult == PFS_ERR_NOPACK) || (readResult == PFS_ERR_DEVICE)) { - return 1; - } - if (readResult == PFS_ERR_INCONSISTENT) { - return 2; - } - if (readResult == PFS_ERR_ID_FATAL) { - return 3; - } - if (readResult == PFS_ERR_INVALID) { - return 5; - } - return 9; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800766D4.s") - -s32 func_80076924(s32 controllerIndex, s32 arg1, s32 *arg2) { - OSPfsState state; - - *arg2 = 0; - if (osPfsFileState(&pfs[controllerIndex], arg1, &state) == 0) { - *arg2 = state.file_size; - return 0; - } - return 9; -} - -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007698C.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80076A38.s") - -s32 func_80076AF4(s32 controllerIndex, s32 fileNum) { - s32 *data; - s32 pad; - s32 ret; - - ret = 6; - data = allocate_from_main_pool_safe(0x100, COLOR_TAG_BLACK); - if (read_data_from_controller_pak(controllerIndex, fileNum, (u8 *)data, 0x100) == 0) { - switch (*data) { - case 0x47414D44: //'GAMD': // Game Data? - ret = 3; - break; - case 0x54494D44: //'TIMD': // Time Data? - ret = 4; - break; - case 0x47485353: //'GHSS': // Ghosts? - ret = 5; - break; - default: - ret = 6; - break; - } - } - free_from_memory_pool(data); - return ret; -} diff --git a/src/controller_pak.h b/src/controller_pak.h deleted file mode 100644 index 4d1e59ab..00000000 --- a/src/controller_pak.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _CONTROLLER_PAK_H_ -#define _CONTROLLER_PAK_H_ - -#include "types.h" -#include "structs.h" - -extern s32 *D_800DE440; -extern u8 gN64FontCodes[68]; -extern s32 D_800DE488; -extern s32 D_800DE48C; - -u8 func_80072250(s32 arg0); -void func_80072298(u8 arg0); -void func_80072708(void); -s32 get_s32_256(void); -s32 get_s32_512(void); -s32 func_80073F5C(s32 arg0, s32 arg1); -s32 func_80074148(s32 arg0, Settings *arg1); -void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 nodeCount, u8 *dest); -s32 func_80075AEC(s32 controllerIndex); -s32 func_80075D38(s32 controllerIndex); -s32 func_80075DC4(s32 controllerIndex); -void func_80076164(void); -s32 func_80076194(s32 controllerIndex, s32 *arg1, s32 *arg2); -s32 read_data_from_controller_pak(s32 controllerIndex, s32 fileNum, u8 *data, s32 dataLength); -s32 func_80076AF4(s32 controllerIndex, s32 fileNum); - -s32 func_800722E8(s16 arg0); //Non matching -s32 func_800738A4(Settings *arg0, void *arg1); //Non matching -s64 func_8007480C(u64 arg0); //Non matching -s32 func_8007497C(u64 *arg0); //Non matching -s32 func_80074B1C(void); //Non matching -s32 func_800762C8(s32 controllerIndex, s32 fileNum); //Non matching -s32 func_80076924(s32 controllerIndex, s32 arg1, s32 *arg2); //Non matching -s16 func_80074A4C(GhostHeader *ghostHeader); //Non matching - -#endif diff --git a/src/font.c b/src/font.c index 098ec934..ebec4531 100644 --- a/src/font.c +++ b/src/font.c @@ -238,7 +238,7 @@ GLOBAL_ASM("asm/non_matchings/font/func_800C4318.s") /** * Sets the colour of the current dialogue box's text. */ -void set_text_color(s32 red, s32 green, s32 blue, s32 alpha, s32 opacity) { +void set_text_colour(s32 red, s32 green, s32 blue, s32 alpha, s32 opacity) { (*gDialogueBoxBackground)[0].textColourR = red; (*gDialogueBoxBackground)[0].textColourG = green; (*gDialogueBoxBackground)[0].textColourB = blue; @@ -249,7 +249,7 @@ void set_text_color(s32 red, s32 green, s32 blue, s32 alpha, s32 opacity) { /** * Sets the colour of the current dialogue box's text background. */ -void set_text_background_color(s32 red, s32 green, s32 blue, s32 alpha) { +void set_text_background_colour(s32 red, s32 green, s32 blue, s32 alpha) { (*gDialogueBoxBackground)[0].textBGColourR = red; (*gDialogueBoxBackground)[0].textBGColourG = green; (*gDialogueBoxBackground)[0].textBGColourB = blue; diff --git a/src/font.h b/src/font.h index b81f8baf..dfde6e4c 100644 --- a/src/font.h +++ b/src/font.h @@ -159,8 +159,8 @@ void load_fonts(void); void func_800C4164(s32 arg0); void set_text_font(s32 arg0); void render_dialogue_box(Gfx **dlist, Gfx *mat, VertexList *verts, s32 index); -void set_text_color(s32 red, s32 green, s32 blue, s32 alpha, s32 opacity); -void set_text_background_color(s32 red, s32 green, s32 blue, s32 alpha); +void set_text_colour(s32 red, s32 green, s32 blue, s32 alpha, s32 opacity); +void set_text_background_colour(s32 red, s32 green, s32 blue, s32 alpha); void func_800C4404(Gfx** displayList, char *text, s32 alignmentFlags); void draw_text(Gfx** displayList, s32 xpos, s32 ypos, char *text, s32 alignmentFlags); void func_800C44C0(Gfx** displayList, s32 arg1, char *text, s32 alignmentFlags); @@ -193,6 +193,6 @@ void func_800C4170(s32 arg0); //Non Matching void func_800C422C(s32 arg0); //Non Matching void func_800C45A4(Gfx **dlist, DialogueBoxBackground *arg1, u8 *text, s32 alignmentFlags, f32 arg4); //Non Matching s32 func_800C4DA0(u8 *text, s32 x, s32 font); //Non Matching -//void render_dialogue_text(s32 unk01, s16 posX, s16 posY, s32 text, s32 unk01, s32 unk02); //Non Matching +void *render_dialogue_text(s32 arg0, s32 posX, s32 posY, char *text, s32 arg4, s32 arg5); //Non Matching #endif diff --git a/src/unknown_06B2B0.c b/src/game.c similarity index 99% rename from src/unknown_06B2B0.c rename to src/game.c index 1995dc32..739cf265 100644 --- a/src/unknown_06B2B0.c +++ b/src/game.c @@ -1,7 +1,7 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8006A6B0 */ -#include "unknown_06B2B0.h" +#include "game.h" #include #include @@ -24,7 +24,7 @@ #include "audio.h" #include "unknown_00BC20.h" #include "camera.h" -#include "controller_pak.h" +#include "save_data.h" #include "unknown_078050.h" #include "unknown_003260.h" #include "unknown_032760.h" @@ -249,7 +249,7 @@ void func_8006A6B0(void) { } } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006A6B0.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006A6B0.s") #endif // Unused. @@ -264,10 +264,10 @@ s16 func_8006ABB4(s32 arg0) { } // Unused? -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006AC00.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006AC00.s") // Unused? -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006AE2C.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006AE2C.s") // Unused. s32 func_8006B018(s8 arg0) { @@ -590,7 +590,7 @@ void load_level(s32 levelId, s32 numberOfPlayers, s32 entranceId, s32 vehicleId, func_8007AB24(gCurrentLevelHeader->unk4[numberOfPlayers]); } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/load_level.s") +GLOBAL_ASM("asm/non_matchings/game/load_level.s") #endif void func_8006BD10(f32 arg0) { @@ -852,7 +852,7 @@ void init_game(void) { calc_and_alloc_heap_for_settings(); func_8006EFDC(); load_fonts(); - func_80075B18(); + init_controller_paks(); func_80081218(); create_and_start_thread30(); osCreateMesgQueue(&gNMIMesgQueue, &gNMIMesgBuf, 1); @@ -1368,7 +1368,7 @@ void func_8006CCF0(s32 updateRate) { } } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006CCF0.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006CCF0.s") #endif void func_8006D8A4(void) { @@ -1623,7 +1623,7 @@ void func_8006DCF8(s32 updateRate) { } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006DCF8.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006DCF8.s") #endif void load_level_for_menu(s32 levelId, s32 numberOfPlayers, s32 cutsceneId) { @@ -1857,11 +1857,12 @@ void func_8006ECC4(void) { D_800DD37C |= 0x100; } +//Always called after updating a value in sEepromSettings void func_8006ECE0(void) { D_800DD37C |= 0x200; } -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006ECFC.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006ECFC.s") s32 func_8006EFB8(void) { //Could be SP_DMEM_START / CACHERR_EE / SR_FR / M_K0 / LEO_STATUS_BUFFER_MANAGER_INTERRUPT @@ -1901,7 +1902,7 @@ void func_8006EFDC(void) { gCurrNumHudVertsPerPlayer = gNumHudVertsPerPlayer[3]; } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006EFDC.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006EFDC.s") #endif void func_8006F140(s32 arg0) { diff --git a/src/unknown_06B2B0.h b/src/game.h similarity index 100% rename from src/unknown_06B2B0.h rename to src/game.h diff --git a/src/game_text.c b/src/game_text.c index acaeaf48..5644816a 100644 --- a/src/game_text.c +++ b/src/game_text.c @@ -4,8 +4,8 @@ #include "game_text.h" #include "menu.h" #include "unknown_00BC20.h" -#include "unknown_043920.h" -#include "unknown_06B2B0.h" +#include "racer.h" +#include "game.h" /************ .data ************/ diff --git a/src/unknown_09F8F0.c b/src/game_ui.c similarity index 83% rename from src/unknown_09F8F0.c rename to src/game_ui.c index 1f834b47..cddbdce5 100644 --- a/src/unknown_09F8F0.c +++ b/src/game_ui.c @@ -1,13 +1,13 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8009ECF0 */ -#include "unknown_09F8F0.h" +#include "game_ui.h" #include "types.h" #include "macros.h" #include "structs.h" #include "f3ddkr.h" #include "camera.h" -#include "unknown_06B2B0.h" +#include "game.h" extern u32 osTvType; @@ -243,15 +243,15 @@ s32 D_801271B0[640]; /******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_8009ECF0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_8009F034.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A003C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_8009ECF0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_8009F034.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A003C.s") u8 func_800A0190(void) { return D_80126D34; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A01A0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A01A0.s") void func_800A0B74(void) { s32 i; @@ -264,7 +264,7 @@ void func_800A0B74(void) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A0BD4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A0BD4.s") void func_800A0DC0(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { unk800A0DC0_2 *temp = arg1->unk64; @@ -291,8 +291,8 @@ void func_800A0DC0(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { func_80068508(0); } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A0EB4.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A1248.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A0EB4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1248.s") void func_800A1428(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { unk800A0DC0_2 *temp = arg1->unk64; @@ -312,11 +312,11 @@ void func_800A1428(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A14F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A19A4.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A1C04.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A1E48.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A22F4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A14F0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A19A4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1C04.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1E48.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A22F4.s") void func_800A258C(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { LevelHeader *level; @@ -369,24 +369,24 @@ void func_800A26C8(Object *obj, s32 arg1) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A277C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A36CC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A277C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A36CC.s") void func_800A3870(void) { D_80126CDC->unk4C4 = 0x6490; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A3884.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A3CE4.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A4154.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A45F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A47A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A497C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A4C44.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A4F50.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A5A64.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A5F18.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A6254.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A3884.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A3CE4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A4154.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A45F0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A47A0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A497C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A4C44.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A4F50.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A5A64.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A5F18.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A6254.s") void func_800A6DB4(s16 *arg0) { Settings *settings = get_settings(); @@ -400,8 +400,8 @@ void func_800A6DB4(s16 *arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A6E30.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A718C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A6E30.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A718C.s") void func_800A7484(u16 arg0, f32 arg1, s32 arg2) { if (D_80126D74 == 0) { @@ -417,10 +417,10 @@ void func_800A74EC(u16 arg0, s32 arg1) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7520.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7A60.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7B68.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7FBC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7520.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7A60.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7B68.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7FBC.s") void func_800A83B4(LevelModel *model) { s32 sp2C; @@ -436,10 +436,10 @@ s8 func_800A8458(void) { return D_800E27A4[D_80126D0C]; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A8474.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AA3EC.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AA600.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AAFD0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A8474.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AA3EC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AA600.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AAFD0.s") void func_800AB194(s32 arg0) { D_80126CD1 = 1; diff --git a/src/unknown_09F8F0.h b/src/game_ui.h similarity index 96% rename from src/unknown_09F8F0.h rename to src/game_ui.h index 17e6d981..fb4a9f19 100644 --- a/src/unknown_09F8F0.h +++ b/src/game_ui.h @@ -1,5 +1,5 @@ -#ifndef _UNKNOWN_09F8F0_H_ -#define _UNKNOWN_09F8F0_H_ +#ifndef _GAME_UI_H_ +#define _GAME_UI_H_ #include "types.h" #include "structs.h" diff --git a/src/main.c b/src/main.c index 6ad5d4ee..09dca4de 100644 --- a/src/main.c +++ b/src/main.c @@ -3,7 +3,7 @@ #include "main.h" #include "thread0_epc.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "lib/src/libc/rmonPrintf.h" /************ .rodata ************/ diff --git a/src/memory.c b/src/memory.c index 8bd97cfc..9c6b06f9 100644 --- a/src/memory.c +++ b/src/memory.c @@ -30,7 +30,8 @@ const char D_800E7488[] = "Unable to record %d slots, colours overflowed table.\ MemoryPool gMemoryPools[4]; #ifndef _ALIGN16 -#define _ALIGN16(val) ((val)&0xFFFFFFF0) + 0x10 +#define _ALIGN16(a) (((u32) (a) & ~0xF) + 0x10) +//#define _ALIGN16(val) ((val)&0xFFFFFFF0) + 0x10 #endif s32 gNumberOfMemoryPools; @@ -38,10 +39,6 @@ s32 D_801235C4; FreeQueueSlot gFreeQueue[256]; s32 gFreeQueueCount; s32 gFreeQueueState; -OSPifRam _MotorStopData[MAXCONTROLLERS]; -OSPifRam _MotorStartData[MAXCONTROLLERS]; -u8 _motorstopbuf[BLOCKSIZE]; -u8 _motorstartbuf[BLOCKSIZE]; extern MemoryPoolSlot gMainMemoryPool; @@ -78,31 +75,39 @@ MemoryPoolSlot *new_sub_memory_pool(s32 poolDataSize, s32 numSlots) { return newPool; } -#ifdef NON_EQUIVALENT +#ifdef NON_MATCHING +//Match found in Dinosaur Planet, and it's *really* close, but not yet there. MemoryPoolSlot *new_memory_pool(MemoryPoolSlot *slots, s32 poolSize, s32 numSlots) { - s32 i; - MemoryPool *pool; MemoryPoolSlot *firstSlot; - unk80070BE4_8_0 *temp3; + MemoryPool *pool; + s32 i; + s32 len; - pool = &gMemoryPools[++gNumberOfMemoryPools]; + //The comma seperation seems to generate a better match + len = gNumberOfMemoryPools++, pool = &gMemoryPools[len]; + + len = numSlots * sizeof(MemoryPoolSlot); pool->maxNumSlots = numSlots; pool->curNumSlots = 0; pool->slots = slots; pool->size = poolSize; + firstSlot = slots; + for (i = 0; i < pool->maxNumSlots; i++) { - slots[i].index = i; + firstSlot->index = i; + firstSlot++; } - firstSlot = pool->slots; - temp3 = (unk80070BE4_8_0 *)&slots[numSlots]; - if ((s32)temp3 & 0xF) { - firstSlot->unk0 = (unk80070BE4_8_0 *)_ALIGN16((s32)temp3); + firstSlot = &pool->slots[0]; + slots += numSlots; + if (((s32)slots & 0xF) != 0) { + firstSlot->data = _ALIGN16(slots); } else { - firstSlot->unk0 = temp3; + firstSlot->data = slots; } - firstSlot->size = poolSize - (numSlots * sizeof(MemoryPoolSlot)); + + firstSlot->size = poolSize - len; firstSlot->flags = 0; firstSlot->prevIndex = -1; firstSlot->nextIndex = -1; @@ -170,7 +175,7 @@ MemoryPoolSlot *allocate_from_memory_pool(s32 memoryPoolIndex, s32 size, u32 col if (phi_s0 != -1) { allocate_memory_pool_slot(memoryPoolIndex, phi_s0, size, TRUE, FALSE, colorTag); func_8006F53C(sp28); - return pool->slots[phi_s0].unk0; + return pool->slots[phi_s0].data; } func_8006F53C(sp28); } @@ -209,16 +214,16 @@ void *allocate_at_address_in_main_pool(s32 size, u8 *address, u32 colorTag) { while (s0 != -1) { curSlot = &slots[s0]; if (curSlot->flags == 0) { - if ((address >= (u8 *)curSlot->unk0) && (((u8 *)curSlot->unk0 + curSlot->size) >= (address + size))) { - if (address == (u8 *)curSlot->unk0) { + if ((address >= (u8 *)curSlot->data) && (((u8 *)curSlot->data + curSlot->size) >= (address + size))) { + if (address == (u8 *)curSlot->data) { allocate_memory_pool_slot(0, s0, size, 1, 0, colorTag); func_8006F53C(sp38); - return curSlot->unk0; + return curSlot->data; } else { - s0 = allocate_memory_pool_slot(0, s0, address - (u8 *)curSlot->unk0, 0, 1, colorTag); + s0 = allocate_memory_pool_slot(0, s0, address - (u8 *)curSlot->data, 0, 1, colorTag); allocate_memory_pool_slot(0, s0, size, 1, 0, colorTag); func_8006F53C(sp38); - return slots[s0].unk0; + return slots[s0].data; } } } @@ -296,7 +301,7 @@ void free_slot_containing_address(u8 *address) { slots = gMemoryPools[poolIndex].slots; for (slotIndex = 0; slotIndex != -1; slotIndex = slot->nextIndex) { slot = &slots[slotIndex]; - if (address == (u8 *)slot->unk0) { + if (address == (u8 *)slot->data) { if (slot->flags == 1 || slot->flags == 4) { free_memory_pool_slot(poolIndex, slotIndex); } @@ -354,7 +359,7 @@ s32 func_80071478(u8 *address) { slotIndex = 0; while (slotIndex != -1) { slot = slotIndex + pool->slots; // `slot = &pool->slots[slotIndex];` does not match. - if (address == (u8 *)slot->unk0) { + if (address == (u8 *)slot->data) { if (slot->flags == 1 || slot->flags == 4) { slot->flags |= 2; func_8006F53C(sp18); @@ -378,7 +383,7 @@ s32 func_80071538(u8 *address) { slotIndex = 0; while (slotIndex != -1) { slot = slotIndex + pool->slots; // `slot = &pool->slots[slotIndex];` does not match. - if (address == (u8 *)slot->unk0) { + if (address == (u8 *)slot->data) { if (slot->flags & 2) { slot->flags ^= 2; func_8006F53C(sp18); @@ -455,13 +460,14 @@ void free_memory_pool_slot(s32 poolIndex, s32 slotIndex) { } } +#else +GLOBAL_ASM("asm/non_matchings/memory/free_memory_pool_slot.s") +#endif + // Unused? MemoryPoolSlot *func_80071774(s32 poolIndex) { return gMemoryPools[poolIndex].slots; } -#else -GLOBAL_ASM("asm/non_matchings/memory/free_memory_pool_slot.s") -#endif #ifdef NON_EQUIVALENT s32 allocate_memory_pool_slot(s32 memoryPoolIndex, s32 slotIndex, s32 size, s32 slotIsTaken, s32 newSlotIsTaken, u32 colorTag) { @@ -482,7 +488,7 @@ s32 allocate_memory_pool_slot(s32 memoryPoolIndex, s32 slotIndex, s32 size, s32 newIndex = pool->slots[pool->curNumSlots].index; pool->curNumSlots++; newSlot = &pool->slots[newIndex]; - newSlot->unk0 = ((u8 *)slot->unk0) + size; + newSlot->data = ((u8 *)slot->data) + size; newSlot->size = slotSize - size; newSlot->flags = newSlotIsTaken; futureIndex = slot->nextIndex; @@ -538,7 +544,7 @@ u8 *align4(u8 *address) { GLOBAL_ASM("asm/non_matchings/memory/func_800718A4.s") #ifdef NON_EQUIVALENT -s32 get_memory_color_tag_count(s32 arg0) { +s32 get_memory_colour_tag_count(s32 arg0) { s32 i, count; count = 0; for (i = 0; i < 80; i++) { // Issue with this loop @@ -549,23 +555,23 @@ s32 get_memory_color_tag_count(s32 arg0) { return count; } #else -GLOBAL_ASM("asm/non_matchings/memory/get_memory_color_tag_count.s") +GLOBAL_ASM("asm/non_matchings/memory/get_memory_colour_tag_count.s") #endif /** * Prints out the counts for each color tag in the main pool. * Unused. */ -void print_memory_color_tags(void) { - stubbed_printf("RED %d\n", get_memory_color_tag_count(COLOR_TAG_RED)); - stubbed_printf("GREEN %d\n", get_memory_color_tag_count(COLOR_TAG_GREEN)); - stubbed_printf("BLUE %d\n", get_memory_color_tag_count(COLOR_TAG_BLUE)); - stubbed_printf("YELLOW %d\n", get_memory_color_tag_count(COLOR_TAG_YELLOW)); - stubbed_printf("MAGENTA %d\n", get_memory_color_tag_count(COLOR_TAG_MAGENTA)); - stubbed_printf("CYAN %d\n", get_memory_color_tag_count(COLOR_TAG_CYAN)); - stubbed_printf("WHITE %d\n", get_memory_color_tag_count(COLOR_TAG_WHITE)); - stubbed_printf("GREY %d\n", get_memory_color_tag_count(COLOR_TAG_GRAY)); - stubbed_printf("ORANGE %d\n\n", get_memory_color_tag_count(COLOR_TAG_ORANGE)); +void print_memory_colour_tags(void) { + stubbed_printf("RED %d\n", get_memory_colour_tag_count(COLOR_TAG_RED)); + stubbed_printf("GREEN %d\n", get_memory_colour_tag_count(COLOR_TAG_GREEN)); + stubbed_printf("BLUE %d\n", get_memory_colour_tag_count(COLOR_TAG_BLUE)); + stubbed_printf("YELLOW %d\n", get_memory_colour_tag_count(COLOR_TAG_YELLOW)); + stubbed_printf("MAGENTA %d\n", get_memory_colour_tag_count(COLOR_TAG_MAGENTA)); + stubbed_printf("CYAN %d\n", get_memory_colour_tag_count(COLOR_TAG_CYAN)); + stubbed_printf("WHITE %d\n", get_memory_colour_tag_count(COLOR_TAG_WHITE)); + stubbed_printf("GREY %d\n", get_memory_colour_tag_count(COLOR_TAG_GRAY)); + stubbed_printf("ORANGE %d\n\n", get_memory_colour_tag_count(COLOR_TAG_ORANGE)); } /** @@ -573,17 +579,17 @@ void print_memory_color_tags(void) { * Unused. * See: https://tcrf.net/Diddy_Kong_Racing#Current_Colors */ -void render_memory_color_tags(void) { - set_render_printf_background_color(0, 0, 0, 128); - render_printf("RED %d\n", get_memory_color_tag_count(COLOR_TAG_RED)); - render_printf("GREEN %d\n", get_memory_color_tag_count(COLOR_TAG_GREEN)); - render_printf("BLUE %d\n", get_memory_color_tag_count(COLOR_TAG_BLUE)); - render_printf("YELLOW %d\n", get_memory_color_tag_count(COLOR_TAG_YELLOW)); - render_printf("MAGENTA %d\n", get_memory_color_tag_count(COLOR_TAG_MAGENTA)); - render_printf("CYAN %d\n", get_memory_color_tag_count(COLOR_TAG_CYAN)); - render_printf("WHITE %d\n", get_memory_color_tag_count(COLOR_TAG_WHITE)); - render_printf("GREY %d\n", get_memory_color_tag_count(COLOR_TAG_GRAY)); - render_printf("ORANGE %d\n\n", get_memory_color_tag_count(COLOR_TAG_ORANGE)); +void render_memory_colour_tags(void) { + set_render_printf_background_colour(0, 0, 0, 128); + render_printf("RED %d\n", get_memory_colour_tag_count(COLOR_TAG_RED)); + render_printf("GREEN %d\n", get_memory_colour_tag_count(COLOR_TAG_GREEN)); + render_printf("BLUE %d\n", get_memory_colour_tag_count(COLOR_TAG_BLUE)); + render_printf("YELLOW %d\n", get_memory_colour_tag_count(COLOR_TAG_YELLOW)); + render_printf("MAGENTA %d\n", get_memory_colour_tag_count(COLOR_TAG_MAGENTA)); + render_printf("CYAN %d\n", get_memory_colour_tag_count(COLOR_TAG_CYAN)); + render_printf("WHITE %d\n", get_memory_colour_tag_count(COLOR_TAG_WHITE)); + render_printf("GREY %d\n", get_memory_colour_tag_count(COLOR_TAG_GRAY)); + render_printf("ORANGE %d\n\n", get_memory_colour_tag_count(COLOR_TAG_ORANGE)); } #ifdef NON_EQUIVALENT diff --git a/src/memory.h b/src/memory.h index 5fceef42..0f8d6154 100644 --- a/src/memory.h +++ b/src/memory.h @@ -38,7 +38,7 @@ typedef struct unk80070BE4_8_0 { /* Size: 0x14 bytes */ typedef struct MemoryPoolSlot { -/* 0x00 */ unk80070BE4_8_0 *unk0; +/* 0x00 */ u8 *data; /* 0x04 */ s32 size; /* 0x08 */ s16 flags; // 0x00 = Slot is free @@ -91,8 +91,8 @@ s32 get_memory_pool_index_containing_address(u8 *address); u8 *align16(u8 *address); u8 *align8(u8 *address); u8 *align4(u8 *address); -void print_memory_color_tags(void); -void render_memory_color_tags(void); +void print_memory_colour_tags(void); +void render_memory_colour_tags(void); void func_80071CE8(void); MemoryPoolSlot *allocate_from_memory_pool(s32 memoryPoolIndex, s32 size, u32 colorTag); // Non Matching @@ -100,6 +100,6 @@ MemoryPoolSlot *new_memory_pool(MemoryPoolSlot *slots, s32 poolSize, s32 numSlot void free_memory_pool_slot(s32 poolIndex, s32 slotIndex); // Non Matching void *allocate_at_address_in_main_pool(s32 size, u8 *address, u32 colorTag); // Non Matching void free_slot_containing_address(u8 *address); // Non Matching -s32 get_memory_color_tag_count(s32 arg0); // Non Matching +s32 get_memory_colour_tag_count(s32 arg0); // Non Matching #endif diff --git a/src/menu.c b/src/menu.c index 97841e2a..1630499a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -21,8 +21,11 @@ #include "textures_sprites.h" #include "thread30.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "unknown_078050.h" +#include "save_data.h" +#include "object_functions.h" +#include "unknown_003260.h" /** * @file Contains all the code used for every menu in the game. @@ -33,12 +36,12 @@ // The bss section needs to stay above the data section! // Otherwise the bss variables will get reordered, which is bad. -unk800DFC10 *D_80126390; -unk800DFC10 *D_80126394; +DrawTexture *D_80126390; +DrawTexture *D_80126394; s32 D_80126398; s32 D_8012639C; Gfx *D_801263A0; -s32 **D_801263A4; +char **D_801263A4; Gfx *D_801263A8; VertexList *D_801263AC; s32 *D_801263B0; @@ -68,15 +71,19 @@ s8 D_80126431; s32 D_80126434; s32 D_80126438[4]; -//Seems to be a set of flags -//bit 0 = Adventure Two is Unlocked -//bit 1 = Used to set the CHEAT_MIRRORED_TRACKS magic code flag -//bits 2-3 = Current language value -//bits 4-23 = Used to set the CHEAT_CONTROL_DRUMSTICK magic code flag -//bit 24 = Unknown -//bit 25 = Seems to be a flag for whether subtitles are enabled or not. -//bits 26-63 = Unknown -s64 D_80126448; +//Eeeprom save data bits stored at address 0xF +//bit 0 = Adventure Two is Unlocked +//bit 1 = Used to set the CHEAT_MIRRORED_TRACKS magic code flag +//bits 2-3 = Current language value +//bits 4-23 = Used to set the CHEAT_CONTROL_DRUMSTICK magic code flag +//bit 24 = Unknown, but it's set as a default high bit. +//bit 25 = Seems to be a flag for whether subtitles are enabled or not. +//bits 26-55 = Unknown, but it could be a set of flags for unlocked tracks +//bits 56-63 = Checksum bits. These are calculated from the previous bits, +// and validated using calculate_eeprom_settings_checksum. +// If the checksum fails, the settings are reset to just +// bits 24/25 being high. +u64 sEepromSettings; f32 sBootScreenTimer; s8 gControllersXAxisDelay[4]; @@ -108,8 +115,6 @@ s32 D_801264DC; s8 D_801264E0; s8 D_801264E1; -s8 sCurrentMenuID; - s8 sCurrentMenuID; s32 D_801264E4; s32 D_801264E8; @@ -120,7 +125,7 @@ s32 D_80126500; s8 sDialogueOptionMax; s32 D_80126508; s16 D_8012650C; -s8 gDialogOptionYOffset; +s8 gDialogueOptionYOffset; s32 D_80126510; s16 D_80126514; s8 D_80126516; @@ -135,7 +140,7 @@ s8 D_80126540; s8 D_80126541; s32 D_80126544; s32 gMultiplayerSelectedNumberOfRacersCopy; // Saved version gMultiplayerSelectedNumberOfRacers? -u32 *D_80126550[67]; // lookup table? +u32 *D_80126550[67]; // lookup table? TEXTURES s32 D_8012665C; s32 D_80126660; s32 D_80126664; @@ -201,20 +206,20 @@ s32 D_801269F4; s32 D_801269F8; s32 *D_801269FC; s32 D_80126A00; -s32 D_80126A04; +unk800860A8 *D_80126A04; s32 D_80126A08; s32 D_80126A0C; s32 D_80126A10; s32 D_80126A14; s32 D_80126A18; s32 D_80126A1C; -s32 D_80126A20[4]; -s32 D_80126A30; -s32 D_80126A34; -s32 D_80126A38; -s32 D_80126A3C; -s32 D_80126A40[8]; -s8 D_80126A60[2]; +s32 D_80126A20[MAXCONTROLLERS]; // Looks to be an array for number notes free in each controller memory pak +u8 sControllerPakIssueNotFound[MAXCONTROLLERS]; //Flag to see if there's no known issues for the given controller pak +u8 sControllerPakFatalErrorFound[MAXCONTROLLERS]; //Flag to see if there's a fatal error for the given controller pak +u8 sControllerPakNoFreeSpace[MAXCONTROLLERS]; //Flag to see if there's no free space for the given controller pak +u8 sControllerPakBadData[MAXCONTROLLERS]; //Flag to see if there's bad data for the given controller pak +u8 *D_80126A40[8]; //Menu Text +u8 sControllerPakDataPresent[MAXCONTROLLERS]; //Flag to see if there's data present for the given controller pak? Not sure s32 D_80126A64; s32 D_80126A68; s32 D_80126A6C; @@ -227,13 +232,13 @@ s32 D_80126A90; s32 D_80126A94; s32 D_80126A98; s32 D_80126A9C; -s32 *D_80126AA0[16]; -s32 D_80126AE0[16]; -s32 D_80126B20[16]; -s32 D_80126B60[4]; -s32 D_80126B70[16]; -s32 D_80126BB0; -s32 D_80126BB4; +u8 *D_80126AA0[16]; //Text to render +u8 *sCurrentControllerPakAllFileNames[16]; //Every file name on the controller pak +u8 *sCurrentControllerPakAllFileExtensions[16]; //Every file extension on the controller pak +u8 sCurrentControllerPakAllFileTypes[16]; //File type of all files on controller pak +u32 sCurrentControllerPakAllFileSizes[16]; //File size of all files on controller pak +u32 sCurrentControllerPakFreeSpace; //Space available in current controller pak +s32 D_80126BB4; //8 if PAL, 7 if not s32 D_80126BB8; s32 D_80126BBC; s32 D_80126BC0; @@ -331,13 +336,14 @@ s8 D_800DF4E4[4] = { }; s32 D_800DF4E8 = 0; // Currently unknown, might be a different type. -s8 gDialogOptionTangible = FALSE; +s8 gDialogueOptionTangible = FALSE; // Unused? s32 D_800DF4F0[] = { 0x4000, 0x8000, 0x1000, 0x2000, 0x8000, 0x10, 0x400, 0x00 }; +//MenuElement? unk800DF510 sMenuImageProperties[18] = { { 0, 0, 0, 0x00, 1.0f, 0.0f, 0.0f, -32.0f, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0x01, 1.0f, 0.0f, 0.0f, -32.0f, 0, 0, 0, 0, 0 }, @@ -356,7 +362,7 @@ unk800DF510 sMenuImageProperties[18] = { { 0, 0, 0, 0x4D, 1.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0x4E, 1.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0x4F, 1.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0 }, - { 0, 0, 0, 0x5D, 1.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0 } + { 0, 0, 0, 0x5D, 1.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0 }, }; s16 *D_800DF750[1] = { NULL }; // This is probably not correct. @@ -479,12 +485,12 @@ s32 *D_800DFBE0[10] = { s32 D_800DFC08 = 0; // Currently unknown, might be a different type. s32 D_800DFC0C = 0xFFFF; // Currently unknown, might be a different type. -unk800DFC10 D_800DFC10 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800DFC20 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800DFC30 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800DFC40 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800DFC50 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800DFC60 = { NULL, 0, 0, NULL, 0 }; +DrawTexture D_800DFC10[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800DFC20[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800DFC30[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800DFC40[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800DFC50[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800DFC60[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; // Unused? u8 D_800DFC70[8] = { 0x40, 0x40, 0x04, 0x04, 0xFF, 0, 0, 0 }; @@ -499,39 +505,19 @@ s16 D_800DFC78[26] = { 0xFFFF, 0x0000 }; +//Image textures, likely for the below menu s16 D_800DFCAC[4] = { 0x000B, 0x000C, 0x0002, 0xFFFF }; -u16 D_800DFCB4[112] = { - 0x00A1, 0x0020, 0x00A1, 0x0021, - 0x00A1, 0x0020, 0x0000, 0x00FF, - 0x8002, 0x0C00, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x00A0, 0x001E, 0x00A0, 0x001E, - 0x00A0, 0x001E, 0xFFFF, 0xFF00, - 0xFF02, 0x0C00, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x00A0, 0x0070, 0x00A0, 0x0070, - 0x00A0, 0x0070, 0xFFFF, 0xFF00, - 0xFF00, 0x0C00, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x00A0, 0x0080, 0x00A0, 0x0080, - 0x00A0, 0x0080, 0xFFFF, 0xFF00, - 0xFF00, 0x0C00, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x00A0, 0x00C0, 0x00A0, 0x00C0, - 0x00A0, 0x00C0, 0xFFFF, 0xFF00, - 0xFF00, 0x0C00, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x00A0, 0x00D0, 0x00A0, 0x00D0, - 0x00A0, 0x00D0, 0xFFFF, 0xFF00, - 0xFF00, 0x0C00, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000 +MenuElement D_800DFCB4[7] = { + { 161, 32, 161, 33, 161, 32, 0, 0, 0, 255, 128, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 30, 160, 30, 160, 30, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 112, 160, 112, 160, 112, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 128, 160, 128, 160, 128, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 192, 160, 192, 160, 192, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 208, 160, 208, 160, 208, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; s32 gShowControllerPakMenu = FALSE; @@ -551,7 +537,7 @@ u8 D_800DFDB4[10][2] = { { 0x0D, 0x64 }, { 0x0E, 0x64 }, { 0x05, 0x64 }, - { 0x04, 0x64 } + { 0x04, 0x64 }, }; s16 D_800DFDC8[2] = { -1, 0 }; @@ -609,42 +595,42 @@ s32 D_800DFFD0 = 0; s32 D_800DFFD4 = -1; MenuElement gCautionMenuTextElements[14] = { - { 161, 35, 161, 35, 161, 35, 0, 0, 0, 255, 128, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 32, 160, 32, 160, 32, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 72, 160, 68, 160, 72, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 86, 160, 82, 160, 86, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 100, 160, 96, 160, 100, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 114, 160, 110, 160, 114, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 128, 160, 124, 160, 128, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 142, 160, 138, 160, 142, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 156, 160, 152, 160, 156, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 156, 160, 166, 160, 156, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 186, 160, 180, 160, 186, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 200, 160, 194, 160, 200, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 200, 160, 208, 160, 200, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 161, 35, 161, 35, 161, 35, 0, 0, 0, 255, 128, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 32, 160, 32, 160, 32, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 72, 160, 68, 160, 72, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 86, 160, 82, 160, 86, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 100, 160, 96, 160, 100, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 114, 160, 110, 160, 114, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 128, 160, 124, 160, 128, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 142, 160, 138, 160, 142, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 156, 160, 152, 160, 156, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 156, 160, 166, 160, 156, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 186, 160, 180, 160, 186, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 200, 160, 194, 160, 200, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 200, 160, 208, 160, 200, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; MenuElement gGameSelectTextElemsNoAdv2[7] = { - { 161, 35, 161, 35, 161, 35, 0, 0, 0, 255, 128, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 32, 160, 32, 160, 32, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { -96, 39, -96, 39, -96, 39, 176, 224, 192, 255, 255, 0, 0, 7, NULL, 192, 44, 4, 4 }, - { 160, 104, 160, 104, 160, 104, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { -96, -9, -96, -9, -96, -9, 176, 224, 192, 255, 255, 0, 0, 7, NULL, 192, 44, 4, 4 }, - { 160, 152, 160, 152, 160, 152, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 161, 35, 161, 35, 161, 35, 0, 0, 0, 255, 128, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 32, 160, 32, 160, 32, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { -96, 39, -96, 39, -96, 39, 176, 224, 192, 255, 255, 0, 0, 7, { NULL }, 192, 44, 4, 4 }, + { 160, 104, 160, 104, 160, 104, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { -96, -9, -96, -9, -96, -9, 176, 224, 192, 255, 255, 0, 0, 7, { NULL }, 192, 44, 4, 4 }, + { 160, 152, 160, 152, 160, 152, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; MenuElement gGameSelectTextElemsWithAdv2[9] = { - { 161, 35, 161, 35, 161, 35, 0, 0, 0, 255, 128, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 160, 32, 160, 32, 160, 32, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { -112, 55, -112, 55, -112, 55, 176, 224, 192, 255, 255, 0, 0, 7, NULL, 224, 44, 4, 4 }, - { 160, 88, 160, 88, 160, 88, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { -112, 7, -112, 7, -112, 7, 176, 224, 192, 255, 255, 0, 0, 7, NULL, 224, 44, 4, 4 }, - { 160, 136, 160, 136, 160, 136, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { -112, -41, -112, -41, -112, -41, 176, 224, 192, 255, 255, 0, 0, 7, NULL, 224, 44, 4, 4 }, - { 160, 184, 160, 184, 160, 184, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 161, 35, 161, 35, 161, 35, 0, 0, 0, 255, 128, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 160, 32, 160, 32, 160, 32, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { -112, 55, -112, 55, -112, 55, 176, 224, 192, 255, 255, 0, 0, 7, { NULL }, 224, 44, 4, 4 }, + { 160, 88, 160, 88, 160, 88, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { -112, 7, -112, 7, -112, 7, 176, 224, 192, 255, 255, 0, 0, 7, { NULL }, 224, 44, 4, 4 }, + { 160, 136, 160, 136, 160, 136, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { -112, -41, -112, -41, -112, -41, 176, 224, 192, 255, 255, 0, 0, 7, { NULL }, 224, 44, 4, 4 }, + { 160, 184, 160, 184, 160, 184, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; s16 D_800E0398[6] = { @@ -686,59 +672,53 @@ s32 gMultiplayerSelectedNumberOfRacers = 0; s32 D_800E0414 = 0; s32 D_800E0418 = 0; +DrawTexture D_800E041C[2] = { { NULL, -12, -8 }, { NULL, 0, 0 }}; +DrawTexture D_800E042C[2] = { { NULL, -8, -12 }, { NULL, 0, 0 }}; +DrawTexture D_800E043C[2] = { { NULL, -12, -8 }, { NULL, 0, 0 }}; +DrawTexture D_800E044C[2] = { { NULL, -8, -12 }, { NULL, 0, 0 }}; -unk800DFC10 D_800E041C = { NULL, -12, -8, 0, 0 }; -unk800DFC10 D_800E042C = { NULL, -8, -12, 0, 0 }; -unk800DFC10 D_800E043C = { NULL, -12, -8, 0, 0 }; -unk800DFC10 D_800E044C = { NULL, -8, -12, 0, 0 }; - -unk800DFC10 D_800E045C = { NULL, 0, 0, NULL, 0x20 }; -s32 D_800E046C[2] = { 0, 0 }; // Not sure what these are. -unk800DFC10 D_800E0474 = { NULL, 0, 0, NULL, 0x20 }; -s32 D_800E0484[2] = { 0, 0 }; // Not sure what these are. -unk800DFC10 D_800E048C = { NULL, 0, 0, NULL, 0x20 }; -s32 D_800E049C[2] = { 0, 0 }; // Not sure what these are. -unk800DFC10 D_800E04A4 = { NULL, 0, 0, NULL, 0x20 }; -s32 D_800E04B4[2] = { 0, 0 }; // Not sure what these are. -unk800DFC10 D_800E04BC = { NULL, 0, 0, NULL, 0x20 }; -s32 D_800E04CC[2] = { 0, 0 }; // Not sure what these are. -unk800DFC10 D_800E04D4 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E04E4 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E04F4 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0504 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0514 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0524 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0534 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0544 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0554 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0564 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0574 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0584 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0594 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E05A4 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E05B4 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E05C4 = { NULL, 0, 0, NULL, 0 }; +DrawTexture D_800E045C[3] = { { NULL, 0, 0 }, { NULL, 0, 32 }, { NULL, 0, 0 } }; +DrawTexture D_800E0474[3] = { { NULL, 0, 0 }, { NULL, 0, 32 }, { NULL, 0, 0 } }; +DrawTexture D_800E048C[3] = { { NULL, 0, 0 }, { NULL, 0, 32 }, { NULL, 0, 0 } }; +DrawTexture D_800E04A4[3] = { { NULL, 0, 0 }, { NULL, 0, 32 }, { NULL, 0, 0 } }; +DrawTexture D_800E04BC[3] = { { NULL, 0, 0 }, { NULL, 0, 32 }, { NULL, 0, 0 } }; +DrawTexture D_800E04D4[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E04E4[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E04F4[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0504[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0514[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0524[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0534[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0544[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0554[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0564[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0574[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0584[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0594[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E05A4[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E05B4[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E05C4[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; // These are probably structs s32 D_800E05D4[8] = { 0, 0xFFD0, 0, 0xFFF0, 0, 0x10, 0, 0 }; s32 D_800E05F4[8] = { 0, 0xFFD0, 0, 0xFFF0, 0, 0x10, 0, 0 }; -unk800DFC10 D_800E0614 = { NULL, -16, -16, 0, 0 }; +DrawTexture D_800E0614[2] = { { NULL, -16, -16 }, { NULL, 0, 0 } }; -unk800DFC10 *D_800E0624[9] = { - &D_800E045C, &D_800E04D4, &D_800E04E4, &D_800E0474, &D_800E04F4, &D_800E0504, &D_800E048C, &D_800E0514, &D_800E0524 +DrawTexture *D_800E0624[9] = { + D_800E045C, D_800E04D4, D_800E04E4, D_800E0474, D_800E04F4, D_800E0504, D_800E048C, D_800E0514, D_800E0524 }; -unk800DFC10 *D_800E0648[6] = { - &D_800E04BC, &D_800E0544, &D_800E0564, &D_800E04A4, &D_800E0534, &D_800E0554 +DrawTexture *D_800E0648[6] = { + D_800E04BC, D_800E0544, D_800E0564, D_800E04A4, D_800E0534, D_800E0554 }; -unk800DFC10 *D_800E0660[6] = { - &D_800E0574, &D_800E0584, &D_800E0594, &D_800E05A4, &D_800E05B4, &D_800E05C4 +DrawTexture *D_800E0660[6] = { + D_800E0574, D_800E0584, D_800E0594, D_800E05A4, D_800E05B4, D_800E05C4 }; -unk800DFC10 *D_800E0678[4] = { - &D_800E041C, &D_800E042C, &D_800E043C, &D_800E044C +DrawTexture *D_800E0678[4] = { + D_800E041C, D_800E042C, D_800E043C, D_800E044C }; u16 D_800E0688[20] = { @@ -881,14 +861,20 @@ s32 D_800E097C = 0; s32 D_800E0980 = 0; s32 D_800E0984 = 0; s32 D_800E0988 = 0; -s32 D_800E098C = 0; +s32 D_800E098C = 0; //Player ID or controllerIndex maybe? -s16 D_800E0990[8] = { - 0x4040, 0xFFA0, 0xFF40, 0x40A0, 0xD0C0, 0x20B0, 0x20C0, 0x40B0 +ColourRGBA D_800E0990[4] = { + { 64, 64, 255, 160 }, + { 255, 64, 64, 160 }, + { 208, 192, 32, 176 }, + { 32, 192, 64, 176 }, }; -s16 D_800E09A0[8] = { - 0x00FF, 0x0080, 0x00FF, 0x0060, 0x0000, 0xFF60, 0x0000, 0xFF80 +ColourRGBA D_800E09A0[4] = { + { 0, 255, 0, 128 }, + { 0, 255, 0, 96 }, + { 0, 0, 255, 96 }, + { 0, 0, 255, 128 }, }; char *D_800E09B0[5] = { 0, 0, 0, 0, 0 }; @@ -908,21 +894,21 @@ s16 D_800E0A40[8] = { 0x0004, 0x0000, 0x0001, 0xFFFF, 0x0300, 0x0000, 0x0012, 0xFFFF }; -unk800DFC10 D_800E0A50 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0A60 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0A70 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0A80 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0A90 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0AA0 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0AB0 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0AC0 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0AD0 = { NULL, 0, 0, NULL, 0 }; -unk800DFC10 D_800E0AE0 = { NULL, 0, 0, NULL, 0 }; +DrawTexture D_800E0A50[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0A60[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0A70[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0A80[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0A90[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0AA0[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0AB0[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0AC0[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0AD0[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; +DrawTexture D_800E0AE0[2] = { { NULL, 0, 0 }, { NULL, 0, 0 } }; -unk800DFC10 *D_800E0AF0[10] = { - &D_800E0A50, &D_800E0A60, &D_800E0A70, &D_800E0A80, - &D_800E0A90, &D_800E0AA0, &D_800E0AB0, &D_800E0AC0, - &D_800E0AD0, &D_800E0AE0 +DrawTexture *D_800E0AF0[10] = { + D_800E0A50, D_800E0A60, D_800E0A70, D_800E0A80, + D_800E0A90, D_800E0AA0, D_800E0AB0, D_800E0AC0, + D_800E0AD0, D_800E0AE0 }; s16 D_800E0B18[74] = { @@ -962,43 +948,43 @@ char *gRacePlacementsArray[8] = { }; MenuElement D_800E0BEC[8] = { - { 352, 172, 32, 172, -288, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 452, 166, 132, 166, -188, 166, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 560, 184, 240, 184, -80, 184, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 452, 180, 132, 180, -188, 180, 255, 192, 255, 0, 255, 0, 0, 1, NULL, 0, 0, 0, 0 }, - { 452, 198, 132, 198, -188, 198, 255, 192, 255, 0, 255, 0, 0, 1, NULL, 0, 0, 0, 0 }, - { 452, 216, 132, 216, -188, 216, 255, 192, 255, 0, 255, 0, 0, 1, NULL, 0, 0, 0, 0 }, - { 560, 200, 240, 200, -80, 200, 128, 255, 255, 0, 255, 0, 0, 1, NULL, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 352, 172, 32, 172, -288, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 452, 166, 132, 166, -188, 166, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 560, 184, 240, 184, -80, 184, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 452, 180, 132, 180, -188, 180, 255, 192, 255, 0, 255, 0, 0, 1, { NULL }, 0, 0, 0, 0 }, + { 452, 198, 132, 198, -188, 198, 255, 192, 255, 0, 255, 0, 0, 1, { NULL }, 0, 0, 0, 0 }, + { 452, 216, 132, 216, -188, 216, 255, 192, 255, 0, 255, 0, 0, 1, { NULL }, 0, 0, 0, 0 }, + { 560, 200, 240, 200, -80, 200, 128, 255, 255, 0, 255, 0, 0, 1, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; MenuElement D_800E0CEC[11] = { - { 575, 172, 255, 172, -65, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 542, 172, 222, 172, -98, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 509, 172, 189, 172, -131, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 476, 172, 156, 172, -164, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 443, 172, 123, 172, -197, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 410, 172, 90, 172, -230, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 377, 172, 57, 172, -263, 172, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 344, 172, 24, 172, -296, 166, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 }, - { 481, 166, 161, 166, -159, 166, 0, 0, 0, 255, 128, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 479, 164, 159, 164, -161, 164, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 575, 172, 255, 172, -65, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 542, 172, 222, 172, -98, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 509, 172, 189, 172, -131, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 476, 172, 156, 172, -164, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 443, 172, 123, 172, -197, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 410, 172, 90, 172, -230, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 377, 172, 57, 172, -263, 172, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 344, 172, 24, 172, -296, 166, 255, 255, 255, 0, 255, 0, 0, 3, { D_800E0A50 }, 0, 0, 0, 0 }, + { 481, 166, 161, 166, -159, 166, 0, 0, 0, 255, 128, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 479, 164, 159, 164, -161, 164, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; MenuElement D_800E0E4C[9] = { - { 481, 174, 161, 174, -159, 174, 0, 0, 0, 255, 128, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 479, 172, 159, 172, -161, 172, 255, 255, 255, 0, 255, 0, 12, 0, NULL, 0, 0, 0, 0 }, - { 368, 192, 48, 192, -272, 192, 255, 64, 64, 96, 255, 0, 8, 0, NULL, 0, 0, 0, 0 }, - { 506, 187, 186, 187, -134, 187, 255, 192, 255, 0, 255, 0, 0, 1, NULL, 0, 0, 0, 0 }, - { 578, 192, 258, 192, -62, 192, 255, 128, 255, 96, 255, 0, 12, 0, &D_80126390, 0, 0, 0, 0 }, - { 368, 212, 48, 212, -272, 212, 255, 64, 64, 96, 255, 0, 8, 0, NULL, 0, 0, 0, 0 }, - { 506, 207, 186, 207, -134, 207, 128, 255, 255, 0, 255, 0, 0, 1, NULL, 0, 0, 0, 0 }, - { 578, 212, 258, 212, -62, 212, 255, 128, 255, 96, 255, 0, 12, 0, &D_80126394, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 481, 174, 161, 174, -159, 174, 0, 0, 0, 255, 128, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 479, 172, 159, 172, -161, 172, 255, 255, 255, 0, 255, 0, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 368, 192, 48, 192, -272, 192, 255, 64, 64, 96, 255, 0, 8, 0, { NULL }, 0, 0, 0, 0 }, + { 506, 187, 186, 187, -134, 187, 255, 192, 255, 0, 255, 0, 0, 1, { NULL }, 0, 0, 0, 0 }, + { 578, 192, 258, 192, -62, 192, 255, 128, 255, 96, 255, 0, 12, 0, { &D_80126390 }, 0, 0, 0, 0 }, + { 368, 212, 48, 212, -272, 212, 255, 64, 64, 96, 255, 0, 8, 0, { NULL }, 0, 0, 0, 0 }, + { 506, 207, 186, 207, -134, 207, 128, 255, 255, 0, 255, 0, 0, 1, { NULL }, 0, 0, 0, 0 }, + { 578, 212, 258, 212, -62, 212, 255, 128, 255, 96, 255, 0, 12, 0, { &D_80126394 }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; // Valid characters for name input. Must be u8, not char. @@ -1052,49 +1038,49 @@ s16 D_800E1044 = -1; MenuElement D_800E1048[9][3] = { { - { 481, 35, 161, 35, -159, 35, 0, 0, 0, 255, 128, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 480, 32, 160, 32, -160, 32, 255, 255, 255, 0, 255, 2, 12, 0, NULL, 0, 0, 0, 0 }, - { 64, -192, 64, 48, 64, 288, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 481, 35, 161, 35, -159, 35, 0, 0, 0, 255, 128, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 32, 160, 32, -160, 32, 255, 255, 255, 0, 255, 2, 12, 0, { NULL }, 0, 0, 0, 0 }, + { 64, -192, 64, 48, 64, 288, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 32, -192, 32, 48, 32, 288, 255, 255, 255, 0, 255, 0, 0, 0, gFirstPlace, 0, 0, 0, 0 }, - { 130, -172, 130, 68, 130, 308, 255, 255, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[0], 0, 0, 0, 0 }, - { 64, -150, 64, 90, 64, 330, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 32, -192, 32, 48, 32, 288, 255, 255, 255, 0, 255, 0, 0, 0, { gFirstPlace }, 0, 0, 0, 0 }, + { 130, -172, 130, 68, 130, 308, 255, 255, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[0] }, 0, 0, 0, 0 }, + { 64, -150, 64, 90, 64, 330, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 32, -150, 32, 90, 32, 330, 255, 255, 255, 0, 255, 0, 0, 0, gSecondPlace, 0, 0, 0, 0 }, - { 130, -130, 130, 110, 130, 350, 255, 192, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[1], 0, 0, 0, 0 }, - { 64, -108, 64, 132, 64, 372, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 32, -150, 32, 90, 32, 330, 255, 255, 255, 0, 255, 0, 0, 0, { gSecondPlace }, 0, 0, 0, 0 }, + { 130, -130, 130, 110, 130, 350, 255, 192, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[1] }, 0, 0, 0, 0 }, + { 64, -108, 64, 132, 64, 372, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 32, -108, 32, 132, 32, 372, 255, 255, 255, 0, 255, 0, 0, 0, gThirdPlace, 0, 0, 0, 0 }, - { 130, -88, 130, 152, 130, 392, 255, 128, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[2], 0, 0, 0, 0 }, - { 64, -66, 64, 174, 64, 414, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 32, -108, 32, 132, 32, 372, 255, 255, 255, 0, 255, 0, 0, 0, { gThirdPlace }, 0, 0, 0, 0 }, + { 130, -88, 130, 152, 130, 392, 255, 128, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[2] }, 0, 0, 0, 0 }, + { 64, -66, 64, 174, 64, 414, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 32, -66, 32, 174, 32, 414, 255, 255, 255, 0, 255, 0, 0, 0, gFourthPlace, 0, 0, 0, 0 }, - { 130, -46, 130, 194, 130, 434, 255, 64, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[3], 0, 0, 0, 0 }, - { 220, 288, 220, 48, 220, -192, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 32, -66, 32, 174, 32, 414, 255, 255, 255, 0, 255, 0, 0, 0, { gFourthPlace }, 0, 0, 0, 0 }, + { 130, -46, 130, 194, 130, 434, 255, 64, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[3] }, 0, 0, 0, 0 }, + { 220, 288, 220, 48, 220, -192, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 188, 288, 188, 48, 188, -192, 255, 255, 255, 0, 255, 0, 0, 0, gFifthPlace, 0, 0, 0, 0 }, - { 286, 308, 286, 68, 286, -172, 255, 255, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[4], 0, 0, 0, 0 }, - { 220, 330, 220, 90, 220, -160, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 188, 288, 188, 48, 188, -192, 255, 255, 255, 0, 255, 0, 0, 0, { gFifthPlace }, 0, 0, 0, 0 }, + { 286, 308, 286, 68, 286, -172, 255, 255, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[4] }, 0, 0, 0, 0 }, + { 220, 330, 220, 90, 220, -160, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 188, 330, 188, 90, 188, -150, 255, 255, 255, 0, 255, 0, 0, 0, gSixthPlace, 0, 0, 0, 0 }, - { 286, 350, 286, 110, 286, -130, 255, 192, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[5], 0, 0, 0, 0 }, - { 220, 372, 220, 132, 220, -108, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 188, 330, 188, 90, 188, -150, 255, 255, 255, 0, 255, 0, 0, 0, { gSixthPlace }, 0, 0, 0, 0 }, + { 286, 350, 286, 110, 286, -130, 255, 192, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[5] }, 0, 0, 0, 0 }, + { 220, 372, 220, 132, 220, -108, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 188, 372, 188, 132, 188, -108, 255, 255, 255, 0, 255, 0, 0, 0, gSeventhPlace, 0, 0, 0, 0 }, - { 286, 392, 286, 152, 286, -88, 255, 128, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[6], 0, 0, 0, 0 }, - { 220, 414, 220, 174, 220, -66, 255, 255, 255, 0, 255, 0, 0, 3, &D_800E0A50, 0, 0, 0, 0 } + { 188, 372, 188, 132, 188, -108, 255, 255, 255, 0, 255, 0, 0, 0, { gSeventhPlace }, 0, 0, 0, 0 }, + { 286, 392, 286, 152, 286, -88, 255, 128, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[6] }, 0, 0, 0, 0 }, + { 220, 414, 220, 174, 220, -66, 255, 255, 255, 0, 255, 0, 0, 3, { &D_800E0A50 }, 0, 0, 0, 0 } }, { - { 188, 414, 188, 174, 188, -66, 255, 255, 255, 0, 255, 0, 0, 0, gEighthPlace, 0, 0, 0, 0 }, - { 286, 434, 286, 194, 286, -46, 255, 64, 255, 0, 255, 0, 4, 2, &gTrophyRacePointsArray[7], 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 } + { 188, 414, 188, 174, 188, -66, 255, 255, 255, 0, 255, 0, 0, 0, { gEighthPlace }, 0, 0, 0, 0 }, + { 286, 434, 286, 194, 286, -46, 255, 64, 255, 0, 255, 0, 4, 2, { &gTrophyRacePointsArray[7] }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 } }, }; @@ -1348,15 +1334,15 @@ s32 gCheatsInCreditsArray[21] = { s32 gViewingCreditsFromCheat = 0; // Set to 1 if viewing credits from "WHODIDTHIS" cheat MenuElement D_800E1B50[9] = { - { 480, 104, 160, 104, -160, 104, 255, 0, 255, 48, 255, 0, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 104, 160, 104, -160, 104, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 104, 160, 104, -160, 104, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 104, 160, 104, -160, 104, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, NULL, 0, 0, 0, 0 }, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, + { 480, 104, 160, 104, -160, 104, 255, 0, 255, 48, 255, 0, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 104, 160, 104, -160, 104, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 104, 160, 104, -160, 104, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 104, 160, 104, -160, 104, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 480, 132, 160, 132, -160, 132, 255, 255, 255, 0, 255, 2, 4, 0, { NULL }, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { NULL }, 0, 0, 0, 0 }, }; Gfx dMenuHudSettings[] = { @@ -1446,7 +1432,7 @@ s16 D_800E1E08[4] = { 0, 0, 0x34, -1 }; -s32 *D_800E1E10 = " (ADV."; +char *D_800E1E10 = " (ADV."; s32 D_800E1E14 = 0; s32 D_800E1E18 = 0; @@ -1547,7 +1533,7 @@ void load_menu_text(s32 language) { D_800E0E4C[2].unk14_a.asciiText = gMenuText[9]; // BEST TIME D_800E0E4C[5].unk14_a.asciiText = gMenuText[10]; // BEST LAP gOptionMenuStrings[0] = gMenuText[34]; // ENGLISH - if (D_80126448 & 0x2000000) { + if (sEepromSettings & 0x2000000) { gOptionMenuStrings[1] = gMenuText[182]; // SUBTITLES ON } else { gOptionMenuStrings[1] = gMenuText[183]; // SUBTITLES OFF @@ -1617,6 +1603,8 @@ void load_menu_text(s32 language) { D_800E09EC[4] = 0; D_800E09EC[5] = 0; D_800E09EC[0] = gMenuText[184]; // CORRUPT DATA. + //Three messages + //If you wish to change / Controller Pak or Rumble Pak, / please do so now. for (i = 0; i < 2; i++) { D_800E09B0[i + 1] = gMenuText[177 + i]; D_800E09C4[i + 1] = gMenuText[177 + i]; @@ -1975,7 +1963,7 @@ void draw_menu_elements(s32 arg0, MenuElement *elem, f32 arg2) { s5 = FALSE; if (arg0 != 4) { - func_80067F2C(&D_801263A0, &D_801263A8); + func_80067F2C(&D_801263A0, (s32 *)&D_801263A8); while (elem->unk14_a.element != NULL) { if (&D_80126850 != elem->unk14_a.element) { if (arg0 == 0) { @@ -1998,8 +1986,8 @@ void draw_menu_elements(s32 arg0, MenuElement *elem, f32 arg2) { } switch (elem->elementType) { case 0: - set_text_background_color(elem->backgroundRed, elem->backgroundGreen, elem->backgroundBlue, elem->backgroundAlpha); - set_text_color(elem->filterRed, elem->filterGreen, elem->filterBlue, elem->filterAlpha, elem->opacity); + set_text_background_colour(elem->backgroundRed, elem->backgroundGreen, elem->backgroundBlue, elem->backgroundAlpha); + set_text_colour(elem->filterRed, elem->filterGreen, elem->filterBlue, elem->filterAlpha, elem->opacity); set_text_font(elem->textFont); draw_text(&D_801263A0, xPos, yPos + D_800DF79C, elem->unk14_a.asciiText, elem->textAlignFlags); break; @@ -2048,14 +2036,14 @@ void draw_menu_elements(s32 arg0, MenuElement *elem, f32 arg2) { break; case 4: s5 = TRUE; - func_80078D00( + render_texture_rectangle_scaled( &D_801263A0, elem->unk14_a.element, xPos, yPos + D_800DF79C, elem->backgroundRed / 256.0f, elem->backgroundGreen / 256.0f, - (elem->filterRed << 0x18) | (elem->filterGreen << 0x10) | (elem->filterBlue << 8) | elem->opacity, + (elem->filterRed << 24) | (elem->filterGreen << 16) | (elem->filterBlue << 8) | elem->opacity, elem->textAlignFlags); break; case 5: @@ -2161,8 +2149,8 @@ void print_missing_controller_text(Gfx *dl, s32 updateRate) { if (D_800DF46C & 0x10) { load_menu_text(get_language()); set_text_font(FONT_COLOURFUL); - set_text_color(255, 255, 255, 0, 0xFF); - set_text_background_color(0, 0, 0, 0); + set_text_colour(255, 255, 255, 0, 0xFF); + set_text_background_colour(0, 0, 0, 0); posY = 208; if (osTvType == TV_TYPE_PAL) { posY = 234; @@ -2222,7 +2210,7 @@ s32 menu_logo_screen_loop(s32 updateRate) { // This uses doubles instead of floats for precision in the counting. if (sBootScreenTimer < 8.5) { set_text_font(FONT_SMALL); - set_text_background_color(0, 0, 0, 0); + set_text_background_colour(0, 0, 0, 0); if ((sBootScreenTimer < 8.0) && (sBootScreenTimer >= 7.5)) { opacity = (8.0 - sBootScreenTimer) * 510.0; } else { @@ -2233,7 +2221,7 @@ s32 menu_logo_screen_loop(s32 updateRate) { } } if (opacity != 0) { - set_text_color(0xFF, 0xFF, 0, 0xFF, opacity); + set_text_colour(0xFF, 0xFF, 0, 0xFF, opacity); draw_text(&D_801263A0, 159, yOffset + 212, gRareCopyrightString, 0xC); draw_text(&D_801263A0, 161, yOffset + 212, gRareCopyrightString, 0xC); draw_text(&D_801263A0, POS_CENTRED, yOffset + 211, gRareCopyrightString, 0xC); @@ -2245,7 +2233,7 @@ s32 menu_logo_screen_loop(s32 updateRate) { } else { opacity = 0xFF; } - set_text_color(0xFF, 0xFF, 0xFF, 0xFF, opacity); + set_text_colour(0xFF, 0xFF, 0xFF, 0xFF, opacity); draw_text(&D_801263A0, POS_CENTRED, yOffsetShadow, gRareCopyrightString, 0xC); } return 0; @@ -2255,18 +2243,18 @@ s32 menu_logo_screen_loop(s32 updateRate) { * Sets some things needed after the title screen from the save buffer. */ void init_title_screen_variables(void) { - if (D_80126448 & 2) { + if (sEepromSettings & 2) { set_magic_code_flags(2); } - if ((D_80126448 & 0xFFFFF0) == 0xFFFFF0) { + if ((sEepromSettings & 0xFFFFF0) == 0xFFFFF0) { set_magic_code_flags(1); } - if (D_80126448 & 1) { + if (sEepromSettings & 1) { gIsInAdventureTwo = 1; } else { gIsInAdventureTwo = 0; } - if ((D_80126448 & 0x2000000) == 0) { + if ((sEepromSettings & 0x2000000) == 0) { func_800C2AF4(0); } load_menu_text(get_language()); @@ -2277,7 +2265,7 @@ GLOBAL_ASM("asm/non_matchings/menu/func_80083098.s") void menu_title_screen_init(void) { s32 i; s32 temp; - s8 *tempArr; + UNUSED s8 *tempArr; D_800DF488 = 1; D_801263BC = 0; @@ -2346,42 +2334,42 @@ void menu_options_init(void) { func_80000B18(); } -void func_800841B8(s32 arg0) { - s32 phi_s1; - s32 phi_a3; - s32 phi_s2; +//Draws options menu screen +void func_800841B8(UNUSED s32 arg0) { + s32 optionMenuTextIndex; + s32 alpha; + s32 yPos; set_text_font(FONT_LARGE); - set_text_background_color(0, 0, 0, 0); - set_text_color(0, 0, 0, 0xFF, 0x80); - draw_text(&D_801263A0, 0xA1, 0x23, gMenuText[36], 0xC); - set_text_color(255, 255, 255, 0, 0xFF); - draw_text(&D_801263A0, 0xA0, 0x20, gMenuText[36], 0xC); + set_text_background_colour(0, 0, 0, 0); + set_text_colour(0, 0, 0, 255, 128); + draw_text(&D_801263A0, 161, 35, gMenuText[36], 0xC); // OPTIONS + set_text_colour(255, 255, 255, 0, 255); + draw_text(&D_801263A0, 160, 32, gMenuText[36], 0xC); // OPTIONS - phi_s1 = 0; - phi_s2 = 0x4C; + optionMenuTextIndex = 0; + yPos = 76; set_text_font(FONT_COLOURFUL); - while (gOptionMenuStrings[phi_s1] != NULL) { - if (phi_s1 == D_800DF460) { - phi_a3 = D_801263BC * 8; - if (D_801263BC >= 0x20) { - phi_a3 = 0x1FF - phi_a3; + while (gOptionMenuStrings[optionMenuTextIndex] != NULL) { + if (optionMenuTextIndex == D_800DF460) { + alpha = D_801263BC * 8; + if (D_801263BC >= 32) { + alpha = 511 - alpha; } } else { - phi_a3 = 0; + alpha = 0; } - set_text_color(255, 255, 255, phi_a3, 0xFF); - draw_text(&D_801263A0, POS_CENTRED, phi_s2, gOptionMenuStrings[phi_s1], 0xC); + set_text_colour(255, 255, 255, alpha, 255); + draw_text(&D_801263A0, POS_CENTRED, yPos, gOptionMenuStrings[optionMenuTextIndex], 0xC); - phi_s1++; - phi_s2 += 0x1C; + optionMenuTextIndex++; + yPos += 28; } } #ifdef NON_EQUIVALENT -// Should be functionally equivalent s32 menu_options_loop(s32 arg0) { s32 buttonsPressed; s32 analogX; @@ -2397,7 +2385,7 @@ s32 menu_options_loop(s32 arg0) { } } - if (gMenuDelay >= -0x13 && gMenuDelay < 0x23) { + if (gMenuDelay >= -19 && gMenuDelay < 35) { func_800841B8(arg0); } @@ -2416,18 +2404,18 @@ s32 menu_options_loop(s32 arg0) { if ((buttonsPressed & B_BUTTON) || ((buttonsPressed & (A_BUTTON | START_BUTTON)) && D_800DF460 == 5)) { // Leave the option menu - set_music_fade_timer(-0x80); + set_music_fade_timer(-128); gMenuDelay = -1; func_800C01D8(&sMenuTransitionFadeIn); func_80001D04(0x241, 0); - } else if ((buttonsPressed & 0x9000) && D_800DF460 >= 2) { + } else if ((buttonsPressed & (A_BUTTON | START_BUTTON)) && D_800DF460 >= 2) { // Go to a sub-menu - gMenuDelay = 0x1F; + gMenuDelay = 31; func_80001D04(0xEF, 0); } else if (D_800DF460 == 0 && analogX != 0) { // Change language - s32 temp_v0 = get_language(); - if ((temp_v0 >> 0x1F) == 0 && temp_v0 == 0) { + s32 currentLang = get_language(); + if ((currentLang >> 31) == 0 && currentLang == ENGLISH) { set_language(FRENCH); } else { set_language(ENGLISH); @@ -2435,14 +2423,14 @@ s32 menu_options_loop(s32 arg0) { func_80001D04(0xEB, 0); } else if (D_800DF460 == 1 && analogX != 0) { // Enable/Disable subtitles. - if (D_80126448 & 0x2000000) { - func_80001D04(0xEB, 0); - func_8009EABC(0); + if (sEepromSettings & 0x2000000) { + func_80001D04(0xEB, NULL); + unset_eeprom_settings_value(0); func_800C2AF4(0); gOptionMenuStrings[1] = gMenuText[183]; } else { func_80001D04(0xEB, 0); - func_8009EA78(0); + set_eeprom_settings_value(0); func_800C2AF4(1); gOptionMenuStrings[1] = gMenuText[182]; } @@ -2466,24 +2454,23 @@ s32 menu_options_loop(s32 arg0) { } } - if (gMenuDelay >= 0x1F) { + if (gMenuDelay >= 31) { // Change screen to a sub-menu - switch (D_800DF460) { - case 2: - func_80084734(); - menu_init(MENU_AUDIO_OPTIONS); - return 0; - case 3: - func_80084734(); - menu_init(MENU_SAVE_OPTIONS); - return 0; - default: - func_80084734(); - menu_init(MENU_MAGIC_CODES); - return 0; + if (D_800DF460 == 2) { + func_80084734(); + menu_init(MENU_AUDIO_OPTIONS); + return 0; } + if (D_800DF460 == 3) { + func_80084734(); + menu_init(MENU_SAVE_OPTIONS); + return 0; + } + func_80084734(); + menu_init(MENU_MAGIC_CODES); + return 0; } - if (gMenuDelay < -0x1E) { + if (gMenuDelay < -30) { // Change screen back to the title screen. func_80000B28(); func_80084734(); @@ -2715,12 +2702,12 @@ void menu_save_options_init(void) { allocate_menu_images(D_800DFCAC); func_8007FFEC(0xA); func_800C4170(2); - D_800DFC10.unk0 = D_80126550[71]; - D_800DFC20.unk0 = D_80126550[72]; - D_800DFC30.unk0 = D_80126550[75]; - D_800DFC40.unk0 = D_80126550[74]; - D_800DFC50.unk0 = D_80126550[73]; - D_800DFC60.unk0 = D_80126550[70]; + D_800DFC10[0].texture = D_80126550[71]; + D_800DFC20[0].texture = D_80126550[72]; + D_800DFC30[0].texture = D_80126550[75]; + D_800DFC40[0].texture = D_80126550[74]; + D_800DFC50[0].texture = D_80126550[73]; + D_800DFC60[0].texture = D_80126550[70]; func_8008E4B0(); func_8006EBA8(); func_800C01D8(&sMenuTransitionFadeOut); @@ -2729,33 +2716,32 @@ void menu_save_options_init(void) { GLOBAL_ASM("asm/non_matchings/menu/func_800853D0.s") GLOBAL_ASM("asm/non_matchings/menu/func_80085B9C.s") -s32 func_800860A8(s32 arg0, s32 *arg1, unk800860A8 *arg2, s32 *arg3, s32 arg4) { - s32 temp_v1; - s32 phi_t0; - - phi_t0 = 0; +s32 func_800860A8(s32 controllerIndex, s32 *arg1, unk800860A8 *arg2, s32 *arg3, s32 arg4) { + s32 ret = 0; + if (*arg1 != 0) { - phi_t0 = func_80076194(arg0, &arg2[*arg3].unkC, &D_80126A20[arg0]); - if (phi_t0 == 0) { - if ((arg2[*arg3].unkC >= arg4) && (D_80126A20[arg0] > 0)) { + ret = get_free_space(controllerIndex, &arg2[*arg3].unkC, &D_80126A20[controllerIndex]); + if (ret == 0) { + if ((arg2[*arg3].unkC >= arg4) && (D_80126A20[controllerIndex] > 0)) { arg2[*arg3].unk0 = 8; - arg2[*arg3].unk6 = arg0; + arg2[*arg3].unk6 = controllerIndex; (*arg3)++; } } else { - if ((*arg1 < 0) && ((phi_t0 & 0xFF) == 7)) { + if ((*arg1 < 0) && ((ret & 0xFF) == 7)) { *arg1 = 0; - phi_t0 = 0; + ret = 0; } else { - temp_v1 = phi_t0 & 0xFF; + s32 temp_v1; + temp_v1 = ret & 0xFF; if (temp_v1 != 3 && temp_v1 != 2 && temp_v1 != 9) { - phi_t0 = 0; + ret = 0; } } } } - return phi_t0; + return ret; } void func_800861C8(unk800861C8 *arg0, s32 *arg1) { @@ -2766,7 +2752,7 @@ void func_800861C8(unk800861C8 *arg0, s32 *arg1) { arg0[*arg1].unk1 = 0; arg0[*arg1].unk2 = 0; arg0[*arg1].unk6 = i; - arg0[*arg1].unkC = get_s32_256(); + arg0[*arg1].unkC = get_game_data_file_size(); (*arg1)++; } } @@ -2775,76 +2761,75 @@ void func_800861C8(unk800861C8 *arg0, s32 *arg1) { GLOBAL_ASM("asm/non_matchings/menu/func_800862C4.s") GLOBAL_ASM("asm/non_matchings/menu/func_800867D4.s") -#ifdef NON_EQUIVALENT void func_80086A48(s32 arg0) { f32 temp, temp2; + f32 temp3, temp4; temp = D_80126BD4; temp2 = D_80126BE4; while (arg0 > 0) { if (D_80126A08 > 0) { - D_80126BDC += (temp - D_80126BDC) * 0.1f; + temp3 = temp - D_80126BDC; + D_80126BDC += (0.1f * temp3); } if (D_801263E0 > 0 && D_80126A00 > 0) { - D_80126BEC += (temp2 - D_80126BEC) * 0.1f; + temp4 = temp2 - D_80126BEC; + D_80126BEC += (0.1f * temp4); } arg0--; } } -#else -GLOBAL_ASM("asm/non_matchings/menu/func_80086A48.s") -#endif GLOBAL_ASM("asm/non_matchings/menu/func_80086AFC.s") GLOBAL_ASM("asm/non_matchings/menu/func_800871D8.s") -s32 func_800874D0(s32 arg0, s32 arg1) { - s32 sp1C; +s32 func_800874D0(s32 buttonsPressed, s32 arg1) { + s32 ret; - sp1C = 0; - if (arg0 & 0x4000) { + ret = 0; + if (buttonsPressed & B_BUTTON) { D_801263E0 = 0; if (D_80126A10 != D_80126A14) { func_800871D8(8); } else { func_80001D04(0x241, NULL); - sp1C = -1; + ret = -1; } - } else if (arg0 & 0x9000) { + } else if (buttonsPressed & (A_BUTTON | START_BUTTON)) { func_80001D04(0xEF, NULL); D_801263E0 = 4; } else if ((arg1 < 0) && (D_80126BD4 > 0)) { func_80001D04(0xEB, NULL); - D_80126BD4 = (s32)(D_80126BD4 - 1); + D_80126BD4--; } else if ((arg1 > 0) && (D_80126BD4 < (D_80126A08 - 1))) { func_80001D04(0xEB, NULL); - D_80126BD4 = (s32)(D_80126BD4 + 1); + D_80126BD4++; } - return sp1C; + return ret; } -s32 func_800875E4(s32 arg0, s32 arg1) { - if (arg0 & 0x4000) { +s32 func_800875E4(s32 buttonsPressed, s32 arg1) { + if (buttonsPressed & B_BUTTON) { func_80001D04(0x241, NULL); D_801263E0 = 3; - } else if (arg0 & 0x9000) { + } else if (buttonsPressed & (A_BUTTON | START_BUTTON)) { func_80001D04(0xEF, NULL); D_801263E0 = 6; } else if ((arg1 < 0) && (D_80126BE4 > 0)) { func_80001D04(0xEB, NULL); - D_80126BE4 = (s32)(D_80126BE4 - 1); + D_80126BE4--; } else if ((arg1 > 0) && (D_80126BE4 < D_80126A00 - 1)) { func_80001D04(0xEB, NULL); - D_80126BE4 = (s32)(D_80126BE4 + 1); + D_80126BE4++; } return 0; } -s32 func_800876CC(s32 arg0, s32 arg1) { - if (arg0 & 0x4000) { +s32 func_800876CC(s32 buttonsPressed, UNUSED s32 arg1) { + if (buttonsPressed & B_BUTTON) { func_80001D04(0x241, NULL); D_801263E0 = 5; - } else if (arg0 & 0x9000) { + } else if (buttonsPressed & (A_BUTTON | START_BUTTON)) { func_80001D04(0xEF, NULL); D_801263E0 = 7; D_801263D8 = 0; @@ -2865,7 +2850,144 @@ void func_80087EB8(void) { free_from_memory_pool(D_80126A64); } +#ifdef NON_EQUIVALENT +//Nearly complete +SIDeviceStatus func_80087F14(s32 *controllerIndex, s32 arg1) { + s32 ret; + s32 j = 0; + s32 k = 0; + s32 i = 0; + s32 controllerIndexVal; + s32 pakStatusSuccess; + s32 pakStatusError3; + s32 pakStatusError9; + s32 bytesFree; + s32 notesFree; + s32 pakStatusErrorNoFreeSpace; + s32 pakStatus; + + pakStatusSuccess = 0; + pakStatusError3 = 0; + pakStatusError9 = 0; + pakStatusErrorNoFreeSpace = 0; + //Is this really <= 0? + for (i = 0; i <= 0; i++) { + //sControllerPakIssueNotFound[i] = 0; + sControllerPakFatalErrorFound[i] = 0; + sControllerPakNoFreeSpace[i] = 0; + sControllerPakBadData[i] = 0; + ret = get_free_space(i, &bytesFree, ¬esFree); + pakStatus = ret & 0xFF; //Upper 2 bits are controller index + if (ret == CONTROLLER_PAK_GOOD) { + sControllerPakIssueNotFound[i] = 1; + if (bytesFree == 0 || notesFree == 0) { + sControllerPakNoFreeSpace[i] = 1; + if (sControllerPakDataPresent[i] == 0) { + pakStatusErrorNoFreeSpace++; + } + } + pakStatusSuccess++; + } else { + sControllerPakIssueNotFound[i] = 0; + //Bad data + if (pakStatus == CONTROLLER_PAK_BAD_DATA) { + sControllerPakBadData[i] = 1; + pakStatusError9++; + } + //Error inconsistent + if (pakStatus == CONTROLLER_PAK_INCONSISTENT) { + //Repair file system + repair_controller_pak(i); + } + //fatal error + if (pakStatus == CONTROLLER_PAK_WITH_BAD_ID) { + sControllerPakFatalErrorFound[i] = 1; + pakStatusError3++; + } + } + } + if ( (pakStatusSuccess == 0) + || (pakStatusError3 != 0) + || (pakStatusErrorNoFreeSpace != 0) + || (pakStatusError9 != 0)) { + return NO_CONTROLLER_PAK; // Return unsuccessfully? + } + + controllerIndexVal = *controllerIndex; + if (controllerIndexVal < 0) { + i = controllerIndexVal; + do { + controllerIndexVal++; + i++; + if (controllerIndexVal > 0) { + controllerIndexVal--; + i--; + } + } while (sControllerPakIssueNotFound[i] == 0); + } else if (sControllerPakIssueNotFound[*controllerIndex] == 0 || arg1 > 0) { + i = controllerIndexVal; + do { + controllerIndexVal++; + i++; + if (controllerIndexVal > 0) { + controllerIndexVal--; + i--; + } + } while (sControllerPakIssueNotFound[i] == 0); + } else if (arg1 < 0) { + i = controllerIndexVal; + do { + controllerIndexVal--; + i--; + if (controllerIndexVal < 0) {; + controllerIndexVal++; + i++; + } + } while (sControllerPakIssueNotFound[i] == 0); + } + + *controllerIndex = controllerIndexVal; + ret = get_controller_pak_file_list(controllerIndexVal, 16, &sCurrentControllerPakAllFileNames, &sCurrentControllerPakAllFileExtensions, &sCurrentControllerPakAllFileSizes, &sCurrentControllerPakAllFileTypes); + + if (ret == CONTROLLER_PAK_GOOD) { + i = 0; + j = 0; + do { + sCurrentControllerPakAllFileSizes[i] = sCurrentControllerPakAllFileSizes[i] / 256; + if (sCurrentControllerPakAllFileNames[i] != 0) { + k = 0; + for (; sCurrentControllerPakAllFileNames[i][k] != 0; j++, k++) { + D_80126AA0[i][j] = sCurrentControllerPakAllFileNames[i][k]; + } + + if ((sCurrentControllerPakAllFileExtensions[i] != 0) && (*sCurrentControllerPakAllFileExtensions[i] != 0)) { + D_80126AA0[i][j] = '.'; + j++; + k = 0; + for (; sCurrentControllerPakAllFileExtensions[i][k] != 0; j++, k++) { + D_80126AA0[i][j] = sCurrentControllerPakAllFileExtensions[i][k]; + } + } + } + if (j == 0) { + D_80126AA0[i][j] = '-'; + j++; + } + i++; + D_80126AA0[i - 1][j] = 0; + } while (&D_80126AA0 != &sCurrentControllerPakAllFileNames); + + func_80076164(); //Free D_800DE440 from memory + get_free_space(*controllerIndex, &sCurrentControllerPakFreeSpace, NULL); //Get Available Space in Controller Pak + sCurrentControllerPakFreeSpace = sCurrentControllerPakFreeSpace / 256; //Bytes + ret = pakStatus; //Really? + } + + return ret; +} +#else GLOBAL_ASM("asm/non_matchings/menu/func_80087F14.s") +#endif GLOBAL_ASM("asm/non_matchings/menu/func_8008832C.s") void menu_boot_init(void) { @@ -2885,26 +3007,19 @@ void menu_boot_init(void) { D_80126C18 = 0; // D_80126C18 is a timer for the boot screen, counts up to 0x8C frames. } -#ifdef NON_EQUIVALENT s32 menu_boot_loop(s32 arg0) { - // arg0 = sp30 - s32 out; // sp2C - s32 y; // sp28 - // ra = sp24 + s32 out; + s32 temp; + s32 y; out = 0; - // Regalloc issue. - // How do you make this not use a3 without introducing another local variable? y = 120; if (osTvType == TV_TYPE_PAL) { y = 132; } - - // You can make it use the correct register if you add in a temp variable like: - // temp = y; - // Then replace all the `y` instances below with `temp`. - // However, this makes the stack too big. There is no room for another local variable. :\ + + temp = y; switch (D_80126C20) { case 0: @@ -2929,28 +3044,25 @@ s32 menu_boot_loop(s32 arg0) { D_80126C20 = 2; } if (D_80126C18 >= 129) { - y = 300; + temp = 300; } break; case 2: if (gMenuDelay && func_800C018C() == 0) { func_800C01D8(&sMenuTransitionFadeInFast); } - y = 300; + temp = 300; out = func_800890AC(arg0); break; } - if (y < 300) { - render_textured_rectangle(&D_801263A0, &sGameTitleTileOffsets, 160, y, 255, 255, 255, 255); + if (temp < 300) { + render_textured_rectangle(&D_801263A0, &sGameTitleTileOffsets, 160, temp, 255, 255, 255, 255); func_8007B3D0(&D_801263A0); } return out; } -#else -GLOBAL_ASM("asm/non_matchings/menu/MenuBootLoop.s") -#endif void func_800887C4(void) { func_8009C4A8((s16 *)sGameTitleTileTextures); @@ -2968,7 +3080,7 @@ void func_800887E8(void) { } for (i = 0; i < 1; i++) { - D_80126A60[i] = 0; + sControllerPakDataPresent[i] = 0; } D_80126C10 = 0; @@ -2996,7 +3108,134 @@ void func_800887E8(void) { func_800C4170(2); } +#ifdef NON_EQUIVALENT +void func_80088938(s32 arg0) { + s32 alpha; + s32 i; + s8* phi_s2; + s8* phi_s0; + s8* phi_s4; + s32 phi_s3 = 1; + s32 yPos = 48; + //s32 yPos; + + set_text_background_colour(0, 0, 0, 0); + alpha = D_801263BC << 3; + if (alpha >= 256) { + alpha = 511 - alpha; + } + if (D_80126BC8 != 0) { + draw_menu_elements(1, D_800DFCB4, 1.0f); + } else if (gShowControllerPakMenu != 0) { + set_text_font(2); + set_text_colour(0, 0, 0, 255, 128); + draw_text(&D_801263A0, 161, 33, gMenuText[35], 12); + set_text_colour(255, 255, 255, 0, 255); + draw_text(&D_801263A0, 160, 30, gMenuText[35], 12); + assign_dialogue_box_id(6); + + //HERE! + set_current_dialogue_box_coords(6, 58, yPos, 262, yPos + 30); + + + if (D_800DF460 == -1) { + set_current_dialogue_background_colour(6, 255, 255, 255, (alpha >> 1) + 128); + } else { + set_current_dialogue_background_colour(6, 96, 192, 92, 224); + } + + set_dialogue_font(6, 0); + set_current_text_colour(6, 255, 255, 255, 0, 255); + set_current_text_background_colour(6, 0, 0, 0, 0); + render_dialogue_text(6, POS_CENTRED, 2, gMenuText[86 + D_80126A68], phi_s3, 4); + render_dialogue_text(6, POS_CENTRED, 16, gMenuText[114], sCurrentControllerPakFreeSpace, 4); + render_dialogue_box(&D_801263A0, NULL, NULL, 6); + + //HERE! + yPos += 34; //To 82 + + set_dialogue_font(6, 1); + set_current_text_background_colour(6, 0, 0, 0, 0); + for (i = -1; i < D_80126BB4; i++) { + assign_dialogue_box_id(6); + set_current_dialogue_box_coords(6, 28, yPos, 292, yPos + 14); + if (i < 0) { + set_current_dialogue_background_colour(6, 224, 48, 48, 224); + set_current_text_colour(6, 224, 224, 48, 255, 255); + phi_s2 = gMenuText[115]; + phi_s0 = gMenuText[116]; + phi_s4 = gMenuText[117]; + phi_s3 = 1; + } else { + phi_s2 = &D_800E820C; + phi_s4 = &D_800E820C; + if (D_800DF460 == (i + D_801263D8)) { + set_current_dialogue_background_colour(6, 255, 255, 255, (alpha >> 1) + 128); + } else { + set_current_dialogue_background_colour(6, 224, 224, 48, 224); + } + set_current_text_colour(6, 16, 16, 160, 255, 255); + phi_s0 = D_80126AA0[D_801263D8 + i]; + phi_s3 = (s32) (&sCurrentControllerPakAllFileSizes)[D_801263D8 + i]; + } + render_dialogue_text(6, 26, 2, phi_s2, D_801263D8 + i + 1, 4); + render_dialogue_text(6, 56, 2, phi_s0, 1, 0); + render_dialogue_text(6, 240, 2, phi_s4, phi_s3, 4); + render_dialogue_box(&D_801263A0, NULL, NULL, 6); + yPos += 16; + } + if (D_801263D8 < (16 - D_80126BB4)) { + if ((D_801263BC & 8) != 0) { + render_textured_rectangle(&D_801263A0, (DrawTexture* ) &D_800E043C, 160, yPos + 8, (u8) 255, (u8) 255, (u8) 255, (u8) 255); + func_8007B3D0(&D_801263A0); + } + } else { + set_text_font(0); + if (D_800DF460 == 16) { + set_text_colour(255, 255, 255, alpha, 255); + } else { + set_text_colour(255, 255, 255, 0, 255); + } + draw_text(&D_801263A0, POS_CENTRED, yPos, gMenuText[51], 4); + } + if ((D_801263E0 != 0) && (D_80126C10 == 0)) { + if (osTvType == TV_TYPE_PAL) { + yPos = 134; + } else { + yPos = 120; + } + assign_dialogue_box_id(6); + set_dialogue_font(6, 0); + set_current_dialogue_box_coords(6, 76, yPos - 28, 244, yPos + 28); + set_current_dialogue_background_colour(6, 0, 0, 0, 160); + + for (yPos = 4, i = 0; i < 3; i++) { + if (i == 0) { + set_current_text_colour(6, 255, 0, 255, 64, 255); + } else if (i == D_801263E0) { + set_current_text_colour(6, 255, 255, 255, alpha, 255); + } else { + set_current_text_colour(6, 255, 255, 255, 0, 255); + } + render_dialogue_text(6, POS_CENTRED, yPos, gMenuText[111 + i], D_800DF460 + 1, 4); + if (i != 0) { + yPos += 16; + } else { + yPos += 20; + } + } + render_dialogue_box(&D_801263A0, NULL, NULL, 6); + } + if (D_80126C10 != 0) { + set_text_colour(255, 255, 255, 0, 255); + set_text_font(2); + draw_text(&D_801263A0, 160, 128, gMenuText[124], 12); + } + } +} +#else GLOBAL_ASM("asm/non_matchings/menu/func_80088938.s") +#endif GLOBAL_ASM("asm/non_matchings/menu/func_800890AC.s") void func_800895A4(void) { @@ -3034,15 +3273,15 @@ void render_magic_codes_ui(s32 arg0) { s32 temp, alpha, green; char c; - set_text_background_color(0, 0, 0, 0); + set_text_background_colour(0, 0, 0, 0); render_dialogue_box(&D_801263A0, 0, 0, 7); set_text_font(FONT_LARGE); - set_text_color(0, 0, 0, 0xFF, 0x80); + set_text_colour(0, 0, 0, 0xFF, 0x80); draw_text(&D_801263A0, 0xA1, 0x23, gMenuText[17], 0xC); // gMenuText[17] = "MAGIC CODES" - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); draw_text(&D_801263A0, 0xA0, 0x20, gMenuText[17], 0xC); // gMenuText[17] = "MAGIC CODES" set_text_font(FONT_COLOURFUL); - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); c = 'A'; yPos = 60; @@ -3055,7 +3294,7 @@ void render_magic_codes_ui(s32 arg0) { if (temp >= 0x100) { temp = 0x1FF - temp; } - set_text_color(0x80, 0xFF, 0xC0, (temp >> 1) + 0x80, 0xFF); + set_text_colour(0x80, 0xFF, 0xC0, (temp >> 1) + 0x80, 0xFF); } if (c < '[') { draw_text(&D_801263A0, xPos, yPos, &c, 0xC); // Draw the character @@ -3065,7 +3304,7 @@ void render_magic_codes_ui(s32 arg0) { draw_text(&D_801263A0, xPos, yPos, &D_800E8214, 0xC); // D_800E8214 = "OK" } if ((5 == gOptionsMenuItemIndex) && (j == gCheatInputCurrentColumn) && (i == gCheatInputCurrentRow)) { - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); } c++; c &= 0xFF; @@ -3090,13 +3329,13 @@ void render_magic_codes_ui(s32 arg0) { if (i == gOptionsMenuItemIndex && D_801263E0 == 0) { alpha = temp; } - set_text_color(0xFF, 0xFF, 0xFF, alpha, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, alpha, 0xFF); draw_text(&D_801263A0, POS_CENTRED, yPos, gMagicCodeMenuStrings[i], 0xC); yPos += yIncr; } set_text_font(FONT_COLOURFUL); - set_text_color(0xFF, 0xFF, 0x80, 0x80, 0xFF); - set_text_background_color(0, 0, 0x80, 0x80); + set_text_colour(0xFF, 0xFF, 0x80, 0x80, 0xFF); + set_text_background_colour(0, 0, 0x80, 0x80); if (gOptionsMenuItemIndex == 4) { if (D_80126C4C == -1) { draw_text(&D_801263A0, POS_CENTRED, 0x90, gMenuText[18], 0xC); // gMenuText[18] = "Sorry, the code was incorrect" @@ -3181,11 +3420,11 @@ void render_magic_codes_list_menu_text(s32 arg0) { s32 s2; s32 i; - set_text_background_color(0, 0, 0, 0); + set_text_background_colour(0, 0, 0, 0); set_text_font(FONT_LARGE); - set_text_color(0, 0, 0, 0xFF, 0x80); + set_text_colour(0, 0, 0, 0xFF, 0x80); draw_text(&D_801263A0, 0xA1, 0x23, gMenuText[20], 0xC); // MAGIC CODES LIST - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); draw_text(&D_801263A0, 0xA0, 0x20, gMenuText[20], 0xC); // MAGIC CODES LIST numOfUnlockedCheats = 0; phi_v0 = 1; @@ -3203,10 +3442,10 @@ void render_magic_codes_list_menu_text(s32 arg0) { fp = 0x1FF - fp; } set_text_font(FONT_COLOURFUL); - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); for (i = D_801263E0; (i < D_801263E0 + D_80126C70) && (i < numOfUnlockedCheats); i++) { if (i == gOptionsMenuItemIndex) { - set_text_color(0xFF, 0xFF, 0xFF, fp, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, fp, 0xFF); } draw_text(&D_801263A0, 0x30, s2, (char *)(*gCheatsAssetData) + ((*gCheatsAssetData + 1)[D_80126C80[i] * 2 + 1]), 0); if ((1 << D_80126C80[i]) & gActiveMagicCodes) { @@ -3215,13 +3454,13 @@ void render_magic_codes_list_menu_text(s32 arg0) { draw_text(&D_801263A0, 0x100, s2, gMenuText[22], 0); // OFF } if (i == gOptionsMenuItemIndex) { - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); } s2 += 0x10; } if (i < D_801263E0 + D_80126C70) { if (numOfUnlockedCheats == gOptionsMenuItemIndex) { - set_text_color(0xFF, 0xFF, 0xFF, fp, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, fp, 0xFF); } draw_text(&D_801263A0, POS_CENTRED, s2, gMenuText[5], 4); // RETURN return; @@ -3389,7 +3628,7 @@ void calculate_and_display_rom_checksum(void) { D_800E1E18 = TRUE; } - set_render_printf_background_color(0, 0, 0, 0x80); + set_render_printf_background_colour(0, 0, 0, 0x80); set_render_printf_position(0x20, 0x88); render_printf(D_800E8218, D_800E1E14, &__ROM_END); // D_800E8218 = "ROM checksum %08X,%d\n" } @@ -3489,15 +3728,15 @@ void menu_character_select_init(void) { /** * Draws the "Player Select" and "OK?" text in the character select menu. */ -void draw_character_select_text(s32 arg0) { +void draw_character_select_text(UNUSED s32 arg0) { s32 yPos; if (gMenuDelay >= -0x16 && gMenuDelay < 0x17) { set_text_font(FONT_LARGE); - set_text_background_color(0, 0, 0, 0); - set_text_color(0, 0, 0, 0xFF, 0x80); + set_text_background_colour(0, 0, 0, 0); + set_text_colour(0, 0, 0, 0xFF, 0x80); // Draw "Player Select" text drop shadow draw_text(&D_801263A0, 0xA1, 0x23, gMenuText[135], 0xC); - set_text_color(255, 255, 255, 0, 0xFF); + set_text_colour(255, 255, 255, 0, 0xFF); // Draw "Player Select" text draw_text(&D_801263A0, 0xA0, 0x20, gMenuText[135], 0xC); if (gNumberOfReadyPlayers == gNumberOfActivePlayers && gNumberOfActivePlayers > 0) { @@ -3519,7 +3758,7 @@ GLOBAL_ASM("asm/non_matchings/menu/func_8008B758.s") #ifdef NON_EQUIVALENT // Should be functionally equivalent -void randomize_ai_racer_slots(s32 arg0) { +void randomise_ai_racer_slots(s32 arg0) { s32 i, j; s32 numCharacters; s32 s1; @@ -3560,36 +3799,29 @@ void randomize_ai_racer_slots(s32 arg0) { } } #else -GLOBAL_ASM("asm/non_matchings/menu/randomize_ai_racer_slots.s") +GLOBAL_ASM("asm/non_matchings/menu/randomise_ai_racer_slots.s") #endif -#if 1 -GLOBAL_ASM("asm/non_matchings/menu/menu_character_select_loop.s") -#else - -void func_8008C128(void); - s32 menu_character_select_loop(s32 updateRate) { s32 i; s32 phi_a0; s32 phi_t3; s8 activePlayers[4]; + s32 j; draw_character_select_text(updateRate); func_8008C168(updateRate); func_8008E4EC(); for (i = 0; i < 4; i++) { - if (1 == D_801263DC[i]) { + if (D_801263DC[i] == 1) { D_801263DC[i] = 2; } } gIgnorePlayerInput = 0; if (gMenuDelay == 0) { - // Issue: this loop unrolls weirdly. - for (i = 0; i < 4; i++) { - activePlayers[i] = gActivePlayersArray[i]; - } + // THIS MUST BE ON ONE LINE! + for (i = 0; i < 4; i++) { activePlayers[i] = gActivePlayersArray[i]; } func_8008B358(); if (gNumberOfReadyPlayers == gNumberOfActivePlayers) { func_8008B4C8(); // Cancel/Confirm selected character? @@ -3599,7 +3831,7 @@ s32 menu_character_select_loop(s32 updateRate) { return 0; // This return needs to be here. } else if (gMenuDelay > 0) { gMenuDelay += updateRate; - if (gMenuDelay >= 0x1F) { + if (gMenuDelay >= 31) { phi_t3 = 0; if (D_800DFFD0 == 0) { phi_t3++; @@ -3609,15 +3841,15 @@ s32 menu_character_select_loop(s32 updateRate) { } func_8008C128(); - // Regalloc issue: gActivePlayersArray and phi_a0 need to switch registers. phi_a0 = 0; - for (i = 0; i < 4; i++) { - if (gActivePlayersArray[i]) { - gCharacterIdSlots[phi_a0] = (*D_801263CC)[gPlayersCharacterArray[i]].unkC; + for (j = 0; j < 4; j++) { + if (gActivePlayersArray[j]) { + gCharacterIdSlots[phi_a0] = (*D_801263CC)[gPlayersCharacterArray[j]].unkC; phi_a0++; } } - randomize_ai_racer_slots(phi_a0); + + randomise_ai_racer_slots(phi_a0); assign_player_ids(gActivePlayersArray); gIsInTracksMode = 1; @@ -3638,7 +3870,7 @@ s32 menu_character_select_loop(s32 updateRate) { } } else if (gMenuDelay < 0) { gMenuDelay -= updateRate; - if (gMenuDelay < -0x1E) { + if (gMenuDelay < -30) { func_80000B28(); func_8008C128(); gNumberOfActivePlayers = 1; @@ -3648,8 +3880,6 @@ s32 menu_character_select_loop(s32 updateRate) { return 0; } -#endif - void func_8008BFE8(s32 arg0, s8 *arg1, s32 arg2, u16 arg3, u16 arg4) { s32 someBool; s32 j; @@ -3793,7 +4023,7 @@ void func_8008C698(s32 arg0) { if (fade >= 0x100) { fade = 0x1FF - fade; } - func_80067F2C(&D_801263A0, &D_801263A8); + func_80067F2C(&D_801263A0, (s32 *)&D_801263A8); for (i = 0; i <= D_801263E0; i++) { filterAlpha = 0; @@ -3821,17 +4051,13 @@ void func_8008C698(s32 arg0) { GLOBAL_ASM("asm/non_matchings/menu/func_8008C698.s") #endif -#ifdef NON_EQUIVALENT - s32 menu_game_select_loop(s32 arg0) { s32 playerInputs; s32 playerYDir; s32 charSelectScene; - s32 temp; - func_8008C168(); + func_8008C168(arg0); - // Regalloc issue: This needs to use v1, not a2! D_801263BC = (D_801263BC + arg0) & 0x3F; if (D_801263D8 != 0) { @@ -3916,9 +4142,6 @@ s32 menu_game_select_loop(s32 arg0) { return 0; } } -#else -GLOBAL_ASM("asm/non_matchings/menu/menu_game_select_loop.s") -#endif void func_8008CACC(void) { func_800C422C(2); @@ -4002,7 +4225,7 @@ void render_file_select_menu(UNUSED s32 updateRate) { } func_8009BD5C(); - func_80067F2C(&D_801263A0, &D_801263A8); + func_80067F2C(&D_801263A0, (s32 *)&D_801263A8); for (i = 0; i < 3; i++) { // 3 files if (gSavefileInfo[i].isAdventure2 == gIsInAdventureTwo || gSavefileInfo[i].isStarted == 0) { color = 0xB0E0C0FF; @@ -4015,7 +4238,7 @@ void render_file_select_menu(UNUSED s32 updateRate) { func_80080BC8(&D_801263A0); if (D_801263D8 == 0) { set_text_font(FONT_LARGE); - set_text_background_color(0, 0, 0, 0); + set_text_background_colour(0, 0, 0, 0); s5 = 10; for (i = 0; i < 3; i++) { if (gSavefileInfo[i].isStarted != 0) { @@ -4038,7 +4261,7 @@ void render_file_select_menu(UNUSED s32 updateRate) { sMenuGuiColourB = 0xFF; func_8007BF1C(1); } else { - set_text_color(255, 255, 255, 64, 255); + set_text_colour(255, 255, 255, 64, 255); draw_text(&D_801263A0, D_800E03FC[4] + D_800E03CC[i].unk0, D_800E03FC[5] + D_800E03CC[i].unk2 + y, gMenuText[75], 0xC); } } @@ -4048,8 +4271,8 @@ void render_file_select_menu(UNUSED s32 updateRate) { phi_v0_2 = 0x1FF - phi_v0_2; } set_text_font(FONT_COLOURFUL); - set_text_background_color(0, 0, 0, 0); - set_text_color(255, 255, 255, 0, 255); + set_text_background_colour(0, 0, 0, 0); + set_text_colour(255, 255, 255, 0, 255); for (i = 0; i < 3; i++) { s2 = FALSE; if (D_80126484 != 0) { @@ -4079,11 +4302,11 @@ void render_file_select_menu(UNUSED s32 updateRate) { } } set_text_font(FONT_LARGE); - set_text_color(0, 0, 0, 255, 128); + set_text_colour(0, 0, 0, 255, 128); draw_text(&D_801263A0, 0xA1, 0x13, gMenuText[76], 4); - set_text_color(255, 255, 255, 0, 255); + set_text_colour(255, 255, 255, 0, 255); draw_text(&D_801263A0, 0xA0, 0x10, gMenuText[76], 4); - set_text_color(255, 255, 255, 0, 255); + set_text_colour(255, 255, 255, 0, 255); y += 0xBB; if (D_80126484 != 0) { if (D_80126494 == 0) { @@ -4108,13 +4331,13 @@ void render_file_select_menu(UNUSED s32 updateRate) { } if (D_80126CC0 == 0) { if (D_801263E0 == 1) { - set_text_color(255, 255, 255, phi_v0_2, 255); + set_text_colour(255, 255, 255, phi_v0_2, 255); } draw_text(&D_801263A0, 0x5A, y, gMenuText[80], 0xC); if (D_801263E0 == 2) { - set_text_color(255, 255, 255, phi_v0_2, 255); + set_text_colour(255, 255, 255, phi_v0_2, 255); } else { - set_text_color(255, 255, 255, 0, 255); + set_text_colour(255, 255, 255, 0, 255); } draw_text(&D_801263A0, 0xE6, y, gMenuText[81], 0xC); return; @@ -4211,19 +4434,19 @@ void func_8008E428(void) { } void func_8008E45C(void) { - D_800E045C.unk0 = D_80126550[24]; - D_800E045C.unk8 = D_80126550[25]; - D_800E0474.unk0 = D_80126550[26]; - D_800E0474.unk8 = D_80126550[27]; - D_800E048C.unk0 = D_80126550[28]; - D_800E048C.unk8 = D_80126550[29]; + D_800E045C[0].texture = D_80126550[24]; + D_800E045C[1].texture = D_80126550[25]; + D_800E0474[0].texture = D_80126550[26]; + D_800E0474[1].texture = D_80126550[27]; + D_800E048C[0].texture = D_80126550[28]; + D_800E048C[1].texture = D_80126550[29]; } void func_8008E4B0(void) { - D_800E041C.unk0 = D_80126550[61]; - D_800E042C.unk0 = D_80126550[60]; - D_800E043C.unk0 = D_80126550[63]; - D_800E044C.unk0 = D_80126550[62]; + D_800E041C[0].texture = D_80126550[61]; + D_800E042C[0].texture = D_80126550[60]; + D_800E043C[0].texture = D_80126550[63]; + D_800E044C[0].texture = D_80126550[62]; } GLOBAL_ASM("asm/non_matchings/menu/func_8008E4EC.s") @@ -4348,7 +4571,7 @@ GLOBAL_ASM("asm/non_matchings/menu/func_8008FF1C.s") GLOBAL_ASM("asm/non_matchings/menu/func_800904E8.s") GLOBAL_ASM("asm/non_matchings/menu/func_80090918.s") -void func_80090ED8(s32 arg0) { +void func_80090ED8(UNUSED s32 arg0) { if (D_801263E0 == 1 && D_800E0414 == 0 && D_80126840 == 0) { func_80001D04(0x132, &D_80126840); } @@ -4382,7 +4605,7 @@ void render_track_select_setup_ui(s32 arg0) { } func_80066894(0, 1); func_8009BD5C(); - func_80067F2C(&D_801263A0, &D_801263A8); + func_80067F2C(&D_801263A0, (s32 *)&D_801263A8); if (gMenuDelay < 0) { if (D_801269F4 == 4) { sp84 = 6; @@ -4410,8 +4633,8 @@ void render_track_select_setup_ui(s32 arg0) { } sp7C = func_8006B0F8(gTrackIdForPreview); set_text_font(FONT_LARGE); - set_text_color(0xC0, 0xC0, 0xFF, 0, sMenuGuiOpacity); - set_text_background_color(0, 0, 0, 0); + set_text_colour(0xC0, 0xC0, 0xFF, 0, sMenuGuiOpacity); + set_text_background_colour(0, 0, 0, 0); draw_text(&D_801263A0, POS_CENTRED, 0x2B, func_8006BDDC(gTrackIdForPreview), 0xC); // Draw track name? sp84 = D_801263BC * 8; if (sp84 >= 0x100) { @@ -4438,13 +4661,13 @@ void render_track_select_setup_ui(s32 arg0) { for (i = 0; i < 2; i++) { for (j = 0; j < 4; j += 2) { if (j == 0) { - set_text_color(0, 0, 0, 0xFF, sMenuGuiOpacity >> 1); + set_text_colour(0, 0, 0, 0xFF, sMenuGuiOpacity >> 1); } else { s32 alpha = i; if (i == D_800E0418) { alpha = sp84; } - set_text_color(0xFF, 0xFF, 0xFF, alpha, sMenuGuiOpacity); + set_text_colour(0xFF, 0xFF, 0xFF, alpha, sMenuGuiOpacity); } // gMenuText[146] = "ADVENTURE", gMenuText[147] = "ADVENTURE TWO" draw_text(&D_801263A0, 0xA1 - j, s7 - j, gMenuText[146 + i], 0xC); @@ -4454,10 +4677,10 @@ void render_track_select_setup_ui(s32 arg0) { } if (D_801269C8 < 4) { set_text_font(FONT_COLOURFUL); - set_text_color(0xFF, 0x40, 0x40, 0x60, sMenuGuiOpacity); + set_text_colour(0xFF, 0x40, 0x40, 0x60, sMenuGuiOpacity); draw_text(&D_801263A0, 0x38, 0x48 + sp80, gMenuText[9], 8); // gMenuText[9] = "BEST TIME" draw_text(&D_801263A0, 0x38, 0x5C + sp80, gMenuText[10], 8); // gMenuText[10] = "BEST LAP" - set_text_color(0xFF, 0x80, 0xFF, 0x60, sMenuGuiOpacity); + set_text_colour(0xFF, 0x80, 0xFF, 0x60, sMenuGuiOpacity); decompress_filename_string(settings->courseInitialsPtr[gPlayerSelectVehicle[0]][gTrackIdForPreview], &sp78, 3); draw_text(&D_801263A0, 0xFA, 0x48 + sp80, &sp78, 0xC); decompress_filename_string(settings->flapInitialsPtr[gPlayerSelectVehicle[0]][gTrackIdForPreview], &sp78, 3); @@ -4580,9 +4803,9 @@ void render_track_select_setup_ui(s32 arg0) { func_80080580(&D_801263A0, -(s4 >> 1), 0x78 - D_800E06E4[1], s4, D_800E06E4[3], D_800E06E4[4], D_800E06E4[5], 0xB0E0C0FF, D_8012665C); func_80080E6C(); set_text_font(FONT_COLOURFUL); - set_text_color(0, 0, 0, 0xFF, 0x80); + set_text_colour(0, 0, 0, 0xFF, 0x80); draw_text(&D_801263A0, D_800E06E4[6] + D_800E06E4[0] + 1, D_800E06E4[7] + D_800E06E4[1] + 1, gMenuText[136], 0xC); - set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); + set_text_colour(0xFF, 0xFF, 0xFF, 0, 0xFF); draw_text(&D_801263A0, D_800E06E4[6] + D_800E06E4[0] - 1, D_800E06E4[7] + D_800E06E4[1] - 1, gMenuText[136], 0xC); // gMenuText[136] = "NUMBER OF RACERS" func_80068508(1); @@ -4638,7 +4861,7 @@ void render_track_select_setup_ui(s32 arg0) { if (D_801269C8 != 5) { if (((D_801263E0 == 2) && !sp74) || ((D_801263E0 == 3) && sp74) || (D_801263E0 == 4)) { set_text_font(FONT_LARGE); - set_text_color(0xFF, 0xFF, 0xFF, 0, sMenuGuiOpacity); + set_text_colour(0xFF, 0xFF, 0xFF, 0, sMenuGuiOpacity); if (D_801269C8 >= 4) { sp80 += 0x18; } @@ -4676,8 +4899,8 @@ s32 func_80092BE0(s32 arg0) { } if (temp >= 0) { - s64 temp2 = 0x10 << temp; - if ((temp2 & D_80126448) == 0) { + u64 temp2 = 0x10 << temp; + if ((temp2 & sEepromSettings) == 0) { temp = -1; } } @@ -4716,14 +4939,14 @@ void menu_5_init(void) { func_8009C674(&D_800E0FB4); allocate_menu_images(&D_800E0FD8); func_8008E45C(); - D_800E04D4.unk0 = D_80126550[31]; - D_800E04E4.unk0 = D_80126550[30]; - D_800E04F4.unk0 = D_80126550[33]; - D_800E0504.unk0 = D_80126550[32]; - D_800E0514.unk0 = D_80126550[35]; - D_800E0524.unk0 = D_80126550[34]; - D_800E05B4.unk0 = D_80126550[48]; - D_800E0614.unk0 = D_80126550[94]; + D_800E04D4[0].texture = D_80126550[31]; + D_800E04E4[0].texture = D_80126550[30]; + D_800E04F4[0].texture = D_80126550[33]; + D_800E0504[0].texture = D_80126550[32]; + D_800E0514[0].texture = D_80126550[35]; + D_800E0524[0].texture = D_80126550[34]; + D_800E05B4[0].texture = D_80126550[48]; + D_800E0614[0].texture = D_80126550[94]; func_800C01D8(&sMenuTransitionFadeOut); D_801263BC = 0; gMenuDelay = 0; @@ -4863,7 +5086,93 @@ void func_80093A0C(void) { } GLOBAL_ASM("asm/non_matchings/menu/func_80093A40.s") + +#ifdef NON_EQUIVALENT +// In the right ballpark, but not right. +void func_80093D40(s32 arg0) { + s32 yOffset; + s32 i; + s32 xOffset; + s32 x; + ColourRGBA *colours; + s32 xPos; + s32 baseYPos; + s32 alpha; + + i = 0; + xPos = 160; + if (D_800E0984 > 0) { + do { + //func_800C4DA0(text, x, font) x = diffX - x + x = func_800C4DA0(&D_80126A40[i], 0, 0) + 8; + if (xPos < x) { + xPos = x; + } + i++; + } while (i < D_800E0984); + } + if (osTvType == TV_TYPE_PAL) { + baseYPos = 132; + } else { + baseYPos = 120; + } + func_800C56D0(7); + assign_dialogue_box_id(7); + yOffset = (s32) ((D_800E0984 * 16) + 28) >> 1; + xOffset = xPos >> 1; + set_current_dialogue_box_coords(7, 160 - xOffset, baseYPos - yOffset, xOffset + 160, yOffset + baseYPos); + colours = &D_800E0990[get_player_id(D_800E098C)]; + set_current_dialogue_background_colour(7, colours->r, colours->g, colours->b, colours->a); + set_dialogue_font(7, 0); + set_current_text_background_colour(7, 128, 128, 255, 0); + colours = &D_800E09A0[get_player_id(D_800E098C)]; + set_current_text_colour(7, colours->r, colours->g, colours->b, colours->a, 255); + alpha = D_801263BC * 8; + if (alpha >= 256) { + alpha = 511 - alpha; + } + if (D_800E0988 != 0) { + if (gTrophyRaceWorldId != 0) { + i = yOffset - 26; + render_dialogue_text(7, POS_CENTRED, i + 8, gMenuText[130], 1, 12); // QUIT TROPHY RACE? + } else { + i = yOffset - 26; + render_dialogue_text(7, POS_CENTRED, i + 8, gMenuText[132], 1, 12); // QUIT GAME? + } + if (D_800E0988 == 1) { + set_current_text_colour(7, 255, 255, 255, alpha, 255); + } else { + set_current_text_colour(7, 255, 255, 255, 0, 255); + } + render_dialogue_text(7, POS_CENTRED, i + 28, gMenuText[134], 1, 12); // OK + if (D_800E0988 == 2) { + set_current_text_colour(7, 255, 255, 255, alpha, 255); + } else { + set_current_text_colour(7, 255, 255, 255, 0, 255); + } + render_dialogue_text(7, POS_CENTRED, i + 44, gMenuText[85], 1, 12); // CANCEL + } else { + render_dialogue_text(7, POS_CENTRED, 12, gMenuText[133], D_800E098C + 1, 12); // PAUSE OPTIONS + baseYPos = 32; + if (D_800E0984 > 0) { + do { + if (i == D_80126A68) { + set_current_text_colour(7, 255, 255, 255, alpha, 255); + } else { + set_current_text_colour(7, 255, 255, 255, 0, 255); + } + render_dialogue_text(7, POS_CENTRED, baseYPos, &D_80126A40[i], 1, 12); + i++; + baseYPos += 16; + } while (i < D_800E0984); + } + } + open_dialogue_box(7); +} +#else GLOBAL_ASM("asm/non_matchings/menu/func_80093D40.s") +#endif + GLOBAL_ASM("asm/non_matchings/menu/func_80094170.s") void n_alSynRemovePlayer(void) { @@ -4878,16 +5187,16 @@ void n_alSeqpDelete(void) { } void func_80094604(void) { - D_800E0A50.unk0 = D_80126550[50]; - D_800E0A60.unk0 = D_80126550[51]; - D_800E0A70.unk0 = D_80126550[52]; - D_800E0A90.unk0 = D_80126550[54]; - D_800E0A80.unk0 = D_80126550[53]; - D_800E0AA0.unk0 = D_80126550[55]; - D_800E0AB0.unk0 = D_80126550[56]; - D_800E0AC0.unk0 = D_80126550[57]; - D_800E0AD0.unk0 = D_80126550[58]; - D_800E0AE0.unk0 = D_80126550[59]; + D_800E0A50[0].texture = D_80126550[50]; + D_800E0A60[0].texture = D_80126550[51]; + D_800E0A70[0].texture = D_80126550[52]; + D_800E0A90[0].texture = D_80126550[54]; + D_800E0A80[0].texture = D_80126550[53]; + D_800E0AA0[0].texture = D_80126550[55]; + D_800E0AB0[0].texture = D_80126550[56]; + D_800E0AC0[0].texture = D_80126550[57]; + D_800E0AD0[0].texture = D_80126550[58]; + D_800E0AE0[0].texture = D_80126550[59]; } GLOBAL_ASM("asm/non_matchings/menu/func_80094688.s") @@ -5187,31 +5496,31 @@ void menu_trophy_race_round_init(void) { } #endif -void func_800983C0(s32 arg0) { - s32 sp2C; - s32 sp28; - s32 sp24; +void func_800983C0(UNUSED s32 arg0) { + s32 yPos; + char *sp28; + char *sp24; s8 *sp20; - sp20 = get_misc_asset(0x1A); + sp20 = get_misc_asset(26); if (osTvType == TV_TYPE_PAL) { - sp2C = 0x12; + yPos = 18; } else { - sp2C = 0; + yPos = 0; } sp28 = func_8006BDDC(func_8006B1D4(gTrophyRaceWorldId)); sp24 = func_8006BDDC(sp20[((gTrophyRaceWorldId - 1) * 6) + D_800E0FEC]); - set_text_background_color(0, 0, 0, 0); + set_text_background_colour(0, 0, 0, 0); set_text_font(FONT_LARGE); - set_text_color(0, 0, 0, 0xFF, 0x80); - draw_text(&D_801263A0, 0xA1, 0x23, sp28, 0xC); - draw_text(&D_801263A0, 0xA1, 0x43, gMenuText[70], 0xC); - set_text_color(255, 255, 255, 0, 0xFF); - draw_text(&D_801263A0, 0xA0, 0x20, sp28, 0xC); - draw_text(&D_801263A0, 0xA0, 0x40, gMenuText[70], 0xC); - draw_text(&D_801263A0, 0xA0, sp2C + 0xB0, gMenuText[138 + D_800E0FEC], 0xC); - draw_text(&D_801263A0, 0xA0, sp2C + 0xD0, sp24, 0xC); + set_text_colour(0, 0, 0, 255, 128); + draw_text(&D_801263A0, 161, 35, sp28, 0xC); + draw_text(&D_801263A0, 161, 67, gMenuText[70], 0xC); // TROPHY RACE + set_text_colour(255, 255, 255, 0, 255); + draw_text(&D_801263A0, 160, 32, sp28, 0xC); + draw_text(&D_801263A0, 160, 64, gMenuText[70], 0xC); // TROPHY RACE + draw_text(&D_801263A0, 160, yPos + 176, gMenuText[138 + D_800E0FEC], 0xC); // ROUND ONE / ROUND TWO / ROUND THREE / ROUND FOUR + draw_text(&D_801263A0, 160, yPos + 208, sp24, 0xC); } GLOBAL_ASM("asm/non_matchings/menu/menu_trophy_race_round_loop.s") @@ -6036,13 +6345,13 @@ s32 func_8009CFEC(u32 dialogueOption) { void set_option_text_colour(s32 condition) { if (condition == FALSE) { set_current_text_colour(1, 0, 0, 0x7F, 0x5A, 0xFF); // Normal - if (gDialogOptionTangible != FALSE) { + if (gDialogueOptionTangible != FALSE) { set_current_text_colour(1, 0, 0, 0x7F, 0x5A, 0x78); //Locked } } else { set_current_text_colour(1, 0xCF, 0xCF, 0xCF, 0x5A, 0xFF); // Selected Option } - gDialogOptionTangible = (u8)FALSE; + gDialogueOptionTangible = (u8)FALSE; } /** @@ -6053,8 +6362,8 @@ void render_dialogue_option(char *text, s32 yOffset, s32 optionID) { if (sDialogueOption == sDialogueOptionMax) { D_80126516 = optionID; } - render_dialogue_text(1, POS_CENTRED, gDialogOptionYOffset, text, 1, 4); - gDialogOptionYOffset = (s8)(gDialogOptionYOffset + yOffset); + render_dialogue_text(1, POS_CENTRED, gDialogueOptionYOffset, text, 1, 4); + gDialogueOptionYOffset = (s8)(gDialogueOptionYOffset + yOffset); sDialogueOptionMax = (s8)(sDialogueOptionMax + 1); } @@ -6124,7 +6433,7 @@ s32 taj_menu_loop(void) { case 2: case 0x62: render_dialogue_text(1, POS_CENTRED, 6, gMenuText[40], 1, 4); // VEHICLE SELECT - gDialogOptionYOffset = 30; + gDialogueOptionYOffset = 30; render_dialogue_option(gMenuText[41], 20, 0); // CAR render_dialogue_option(gMenuText[42], 20, 1); // HOVERCRAFT render_dialogue_option(gMenuText[43], 20, 2); // PLANE @@ -6133,17 +6442,17 @@ s32 taj_menu_loop(void) { case 3: case 0x63: render_dialogue_text(1, POS_CENTRED, 6, gMenuText[45], 1, 4); // CHALLENGE SELECT - gDialogOptionYOffset = 30; + gDialogueOptionYOffset = 30; if (settings->tajFlags & TAJ_FLAGS_CAR_CHAL_UNLOCKED) { - gDialogOptionTangible = settings->tajFlags & TAJ_FLAGS_CAR_CHAL_COMPLETED; + gDialogueOptionTangible = settings->tajFlags & TAJ_FLAGS_CAR_CHAL_COMPLETED; render_dialogue_option(gMenuText[46], 0x14, 0); // CAR CHALLENGE } if (settings->tajFlags & TAJ_FLAGS_HOVER_CHAL_UNLOCKED) { - gDialogOptionTangible = settings->tajFlags & TAJ_FLAGS_HOVER_CHAL_COMPLETED; + gDialogueOptionTangible = settings->tajFlags & TAJ_FLAGS_HOVER_CHAL_COMPLETED; render_dialogue_option(gMenuText[47], 0x14, 1); // HOVER CHALLENGE } if (settings->tajFlags & TAJ_FLAGS_PLANE_CHAL_UNLOCKED) { - gDialogOptionTangible = settings->tajFlags & TAJ_FLAGS_PLANE_CHAL_COMPLETED; + gDialogueOptionTangible = settings->tajFlags & TAJ_FLAGS_PLANE_CHAL_COMPLETED; render_dialogue_option(gMenuText[48], 0x14, 2); // PLANE CHALLENGE } render_dialogue_option(gMenuText[44], 0x14, 3); // MAIN MENU @@ -6159,7 +6468,7 @@ s32 taj_menu_loop(void) { case 1: D_800DF4DC = 0; render_dialogue_text(1, POS_CENTRED, 6, gMenuText[36], 1, 4); // OPTIONS - gDialogOptionYOffset = 30; + gDialogueOptionYOffset = 30; render_dialogue_option(gMenuText[37], 0x14, 0); // CHANGE VEHICLE if (settings->tajFlags & TAJ_FLAGS_UNLOCKED_A_CHALLENGE) { render_dialogue_option(gMenuText[39], 0x14, 1); // CHALLENGES @@ -6283,7 +6592,7 @@ s32 dialogue_race_defeat(void) { D_800DF4DC = 0; render_dialogue_text(1, POS_CENTRED, 6, gMenuText[49], 1, 4); // BETTER LUCK render_dialogue_text(1, POS_CENTRED, 20, gMenuText[50], 1, 4); // NEXT TIME! - gDialogOptionYOffset = 50; + gDialogueOptionYOffset = 50; render_dialogue_option(gMenuText[23], 20, 0); // TRY AGAIN render_dialogue_option(gMenuText[51], 20, 1); // EXIT handle_menu_joystick_input(); @@ -6301,18 +6610,17 @@ s32 dialogue_race_defeat(void) { return state; } -#ifdef NON_EQUIVALENT +#ifdef NON_MATCHING // Has a couple minor issues, but should be functionally equivalent. s32 tt_menu_loop(void) { - Settings *settings; s32 currentOption; - s32 buttonsPressed; // sp40 - s32 sp3C; - s32 sp38; - s32 sp24; - s32 sp20; + s32 buttonsPressed; s32 i; + s32 yPos1; + s32 yPos2; + Settings *settings; + s32 result; settings = get_settings(); @@ -6335,7 +6643,7 @@ s32 tt_menu_loop(void) { currentOption = 0; buttonsPressed = get_buttons_pressed_from_player(0); sDialogueOptionMax = 0; - gDialogOptionYOffset = 32; + gDialogueOptionYOffset = 32; switch (sCurrentMenuID) { case TT_MENU_ROOT: case TT_MENU_EXIT: @@ -6377,8 +6685,8 @@ s32 tt_menu_loop(void) { case 3: func_80001D04(0xEF, 0); func_80036BCC(0x22E, 1); - func_8009C674(&D_800E1E2C); - allocate_menu_images(&D_800E1E40); + func_8009C674(D_800E1E2C); + allocate_menu_images(D_800E1E40); D_800E1E28 = 1; sCurrentMenuID = TT_MENU_GAME_STATUS; break; @@ -6392,6 +6700,8 @@ s32 tt_menu_loop(void) { currentOption = 0; } if (currentOption == 3) { + //FAKEMATCH? + //if ((gControllersXAxisDirection && gControllersXAxisDirection) && gControllersXAxisDirection){} sCurrentMenuID = TT_MENU_EXIT; } if (sCurrentMenuID == TT_MENU_EXIT) { @@ -6399,19 +6709,19 @@ s32 tt_menu_loop(void) { } break; case TT_MENU_CONT_PAK_ERROR_1: - sp24 = 0; - while (D_801263A4[sp24] != NULL) { - sp24++; + i = 0; + while (D_801263A4[i] != NULL) { + i++; } - sp38 = 0x3A; - if (sp24 > 0) { - sp24--; - sp38 -= sp24 * 8; - sp24 = 0; - while (D_801263A4[sp24] != NULL) { - render_dialogue_text(1, POS_CENTRED, sp38, D_801263A4[sp24], 1, 4); - sp38 += 0x10; - sp24++; + yPos1 = 58; + if (i > 0) { + i--; + yPos1 -= (i * 8); + i = 0; + while (D_801263A4[i] != NULL) { + render_dialogue_text(1, POS_CENTRED, yPos1, D_801263A4[i], 1, 4); + yPos1 += 16; + i++; } } if (buttonsPressed & (A_BUTTON | B_BUTTON)) { @@ -6422,15 +6732,18 @@ s32 tt_menu_loop(void) { if (buttonsPressed & (A_BUTTON | B_BUTTON)) { sCurrentMenuID = TT_MENU_ROOT; D_800E1E28 = 0; - func_8009C4A8(&D_800E1E2C); + func_8009C4A8(D_800E1E2C); func_80036BCC(0x22F, 1); } break; case TT_MENU_INTRODUCTION: - sp20 = 6; - for (i = 52; gMenuText[i] != NULL; i++) { - render_dialogue_text(1, POS_CENTRED, sp20, gMenuText[i], 1, 4); - sp20 += 0x10; + // RIGHT HERE is where I to swap the timing of assignment of these two vars + yPos2 = 6; + i = 52; + while (gMenuText[i] != NULL) { + render_dialogue_text(1, POS_CENTRED, yPos2, gMenuText[i], 1, 4); + yPos2 += 16; + i++; } if (buttonsPressed & (A_BUTTON | B_BUTTON)) { settings->cutsceneFlags |= 2; @@ -6463,35 +6776,45 @@ s32 tt_menu_loop(void) { render_dialogue_text(1, POS_CENTRED, 50, gMenuText[124], 1, 4); // PLEASE WAIT D_80126398++; if (D_80126398 >= 5) { - s32 result = func_8001B738(0) & 0xFF; - if (result == 5) { + result = func_8001B738(0) & 0xFF; + if (result == CONTROLLER_PAK_CHANGED) { result = func_8001B738(0) & 0xFF; } switch (result) { - case 0: + case CONTROLLER_PAK_GOOD: sCurrentMenuID = D_8012639C; break; - case 7: + case RUMBLE_PAK: sCurrentMenuID = TT_MENU_INSERT_CONT_PAK; break; - case 1: - D_801263A4 = &D_800E09D8; + case NO_CONTROLLER_PAK: + // NO CONTROLLER PAK + // If you wish to change / Controller Pak or Rumble Pak, / please do so now. + D_801263A4 = D_800E09D8; sCurrentMenuID = TT_MENU_CONT_PAK_ERROR_1; break; - case 4: - case 6: - D_801263A4 = &D_800E09C4; + case CONTROLLER_PAK_FULL: + case CONTROLLER_PAK_UNK6: + // CONTROLLER PAK FULL + // If you wish to change / Controller Pak or Rumble Pak, / please do so now. + D_801263A4 = D_800E09C4; sCurrentMenuID = TT_MENU_CONT_PAK_ERROR_1; break; - case 9: - D_801263A4 = &D_800E09EC; + case CONTROLLER_PAK_BAD_DATA: + // CORRUPT DATA. + // If you wish to change / Controller Pak or Rumble Pak, / please do so now. + // TRY AGAIN! + D_801263A4 = D_800E09EC; sCurrentMenuID = TT_MENU_CONT_PAK_ERROR_1; break; - case 2: - case 3: - case 5: - case 8: - D_801263A4 = &D_800E09B0; + case CONTROLLER_PAK_INCONSISTENT: + case CONTROLLER_PAK_WITH_BAD_ID: + case CONTROLLER_PAK_CHANGED: + case CONTROLLER_PAK_UNK8: + default: + // BAD CONTROLLER PAK + // If you wish to change / Controller Pak or Rumble Pak, / please do so now. + D_801263A4 = D_800E09B0; sCurrentMenuID = TT_MENU_CONT_PAK_ERROR_1; break; } @@ -6568,7 +6891,7 @@ f32 func_8009E9B0(UNUSED DialogueBoxBackground *textbox, Gfx **dlist, Gfx **mat, D_801263A0 = *dlist; D_801263A8 = *mat; D_801263AC = *verts; - func_80067F2C(&D_801263A0, &D_801263A8); + func_80067F2C(&D_801263A0, (s32 *)&D_801263A8); if (D_800E1E28 != 0 && sCurrentMenuID == 4) { func_8009E3D0(); } @@ -6578,24 +6901,24 @@ f32 func_8009E9B0(UNUSED DialogueBoxBackground *textbox, Gfx **dlist, Gfx **mat, return TRUE; } -s64 *func_8009EA6C(void) { - return &D_80126448; +u64 *get_eeprom_settings_pointer(void) { + return &sEepromSettings; } -s32 func_8009EA78(s64 arg0) { - D_80126448 |= arg0; +s32 set_eeprom_settings_value(u64 valueToSet) { + sEepromSettings |= valueToSet; func_8006ECE0(); return 1; } -s32 func_8009EABC(s64 arg0) { - D_80126448 &= ~arg0; +s32 unset_eeprom_settings_value(u64 valueToUnset) { + sEepromSettings &= ~valueToUnset; func_8006ECE0(); return 1; } -s64 func_8009EB08(void) { - return D_80126448; +u64 get_eeprom_settings(void) { + return sEepromSettings; } /** @@ -6604,7 +6927,7 @@ s64 func_8009EB08(void) { */ s32 get_language(void) { s32 language = ENGLISH; - switch (D_80126448 & 0xC) { + switch (sEepromSettings & 0xC) { case 4: language = GERMAN; break; @@ -6624,7 +6947,7 @@ s32 get_language(void) { * tried to switch to it, all you would see is the word "Japanese" used everywhere as a placeholder. */ void set_language(s32 language) { - s64 langFlag = 0; // English + u64 langFlag = 0; // English switch (language) { case GERMAN: @@ -6638,8 +6961,8 @@ void set_language(s32 language) { break; } - D_80126448 &= ~0xC; - D_80126448 |= langFlag; + sEepromSettings &= ~0xC; //Set bits 3 and 4 low first + sEepromSettings |= langFlag; //Then set them according to the selected lang load_menu_text(language); func_8006ECE0(); @@ -6649,7 +6972,7 @@ void set_language(s32 language) { * Returns TRUE if the player has adventure two unlocked. */ s32 is_adventure_two_unlocked(void) { - return D_80126448 & 1; + return sEepromSettings & 1; } /** diff --git a/src/menu.h b/src/menu.h index bcd279b4..a0499d08 100644 --- a/src/menu.h +++ b/src/menu.h @@ -158,14 +158,6 @@ typedef struct unk800DFA3C { u32* unkC; } unk800DFA3C; -typedef struct unk800DFC10 { - u32 *unk0; - s16 unk4; - s16 unk6; - u32 *unk8; - s32 unkC; -} unk800DFC10; - typedef struct unk800E03CC { s16 unk0; s16 unk2; @@ -203,7 +195,7 @@ typedef struct unk800860A8 { u8 pad1[0x5]; s8 unk6; u8 pad7[0x5]; - s32 unkC; + s32 unkC; //Used for bytes free in controller pak at one point. } unk800860A8; /* Size: 0x10 bytes */ @@ -278,7 +270,7 @@ extern s8 D_800DF4DC; extern s8 D_800DF4E0; extern s8 D_800DF4E4[4]; extern s32 D_800DF4E8; -extern s8 gDialogOptionTangible; +extern s8 gDialogueOptionTangible; // Unused? extern s32 D_800DF4F0[]; @@ -353,21 +345,12 @@ extern s32* D_800DFBE0[10]; extern s32 D_800DFC08; extern s32 D_800DFC0C; -extern unk800DFC10 D_800DFC10; -extern unk800DFC10 D_800DFC20; -extern unk800DFC10 D_800DFC30; -extern unk800DFC10 D_800DFC40; -extern unk800DFC10 D_800DFC50; -extern unk800DFC10 D_800DFC60; - // Unused? extern u8 D_800DFC70[8]; extern s16 D_800DFC78[26]; -extern s16 D_800DFCAC[4]; - -extern u16 D_800DFCB4[112]; +extern MenuElement D_800DFCB4[7]; extern s32 gShowControllerPakMenu; @@ -414,51 +397,46 @@ extern s32 gMultiplayerSelectedNumberOfRacers; extern s32 D_800E0414; extern s32 D_800E0418; -extern unk800DFC10 D_800E041C; -extern unk800DFC10 D_800E042C; -extern unk800DFC10 D_800E043C; -extern unk800DFC10 D_800E044C; +extern DrawTexture D_800E041C[2]; +extern DrawTexture D_800E042C[2]; +extern DrawTexture D_800E043C[2]; +extern DrawTexture D_800E044C[2]; -extern unk800DFC10 D_800E045C; -extern s32 D_800E046C[2]; -extern unk800DFC10 D_800E0474; -extern s32 D_800E0484[2]; -extern unk800DFC10 D_800E048C; -extern s32 D_800E049C[2]; -extern unk800DFC10 D_800E04A4; -extern s32 D_800E04B4[2]; -extern unk800DFC10 D_800E04BC; -extern s32 D_800E04CC[2]; -extern unk800DFC10 D_800E04D4; -extern unk800DFC10 D_800E04E4; -extern unk800DFC10 D_800E04F4; -extern unk800DFC10 D_800E0504; -extern unk800DFC10 D_800E0514; -extern unk800DFC10 D_800E0524; -extern unk800DFC10 D_800E0534; -extern unk800DFC10 D_800E0544; -extern unk800DFC10 D_800E0554; -extern unk800DFC10 D_800E0564; -extern unk800DFC10 D_800E0574; -extern unk800DFC10 D_800E0584; -extern unk800DFC10 D_800E0594; -extern unk800DFC10 D_800E05A4; -extern unk800DFC10 D_800E05B4; -extern unk800DFC10 D_800E05C4; +extern DrawTexture D_800E045C[3]; +extern DrawTexture D_800E0474[3]; +extern DrawTexture D_800E048C[3]; +extern DrawTexture D_800E04A4[3]; +extern DrawTexture D_800E04BC[3]; +extern DrawTexture D_800E04D4[2]; +extern DrawTexture D_800E04E4[2]; +extern DrawTexture D_800E04F4[2]; +extern DrawTexture D_800E0504[2]; +extern DrawTexture D_800E0514[2]; +extern DrawTexture D_800E0524[2]; +extern DrawTexture D_800E0534[2]; +extern DrawTexture D_800E0544[2]; +extern DrawTexture D_800E0554[2]; +extern DrawTexture D_800E0564[2]; +extern DrawTexture D_800E0574[2]; +extern DrawTexture D_800E0584[2]; +extern DrawTexture D_800E0594[2]; +extern DrawTexture D_800E05A4[2]; +extern DrawTexture D_800E05B4[2]; +extern DrawTexture D_800E05C4[2]; // These are probably structs extern s32 D_800E05D4[8]; extern s32 D_800E05F4[8]; -extern unk800DFC10 D_800E0614; +extern DrawTexture D_800E0614[2]; -extern unk800DFC10 *D_800E0624[9]; +extern DrawTexture *D_800E0624[9]; -extern unk800DFC10 *D_800E0648[6]; +extern DrawTexture *D_800E0648[6]; -extern unk800DFC10 *D_800E0660[6]; +extern DrawTexture *D_800E0660[6]; -extern unk800DFC10 *D_800E0678[4]; +extern DrawTexture *D_800E0678[4]; extern u16 D_800E0688[20]; @@ -498,26 +476,22 @@ extern s32 D_800E0984; extern s32 D_800E0988; extern s32 D_800E098C; -extern s16 D_800E0990[8]; - -extern s16 D_800E09A0[8]; - extern s16 D_800E0A24[14]; extern s16 D_800E0A40[8]; -extern unk800DFC10 D_800E0A50; -extern unk800DFC10 D_800E0A60; -extern unk800DFC10 D_800E0A70; -extern unk800DFC10 D_800E0A90; -extern unk800DFC10 D_800E0A80; -extern unk800DFC10 D_800E0AA0; -extern unk800DFC10 D_800E0AB0; -extern unk800DFC10 D_800E0AC0; -extern unk800DFC10 D_800E0AD0; -extern unk800DFC10 D_800E0AE0; +extern DrawTexture D_800E0A50[2]; +extern DrawTexture D_800E0A60[2]; +extern DrawTexture D_800E0A70[2]; +extern DrawTexture D_800E0A90[2]; +extern DrawTexture D_800E0A80[2]; +extern DrawTexture D_800E0AA0[2]; +extern DrawTexture D_800E0AB0[2]; +extern DrawTexture D_800E0AC0[2]; +extern DrawTexture D_800E0AD0[2]; +extern DrawTexture D_800E0AE0[2]; -extern unk800DFC10* D_800E0AF0[10]; +extern DrawTexture* D_800E0AF0[10]; extern s16 D_800E0B18[74]; @@ -643,7 +617,7 @@ extern char gRareCopyrightString[24]; //extern FadeTransition D_800E1E08; extern s16 D_800E1E08[4]; -extern s32 *D_800E1E10; +extern char *D_800E1E10; extern s32 D_800E1E14; extern s32 D_800E1E18; @@ -679,11 +653,11 @@ void func_80084734(void); void menu_audio_options_init(void); void func_800851FC(void); void menu_save_options_init(void); -s32 func_800860A8(s32 arg0, s32 *arg1, unk800860A8 *arg2, s32 *arg3, s32 arg4); +s32 func_800860A8(s32 controllerIndex, s32 *arg1, unk800860A8 *arg2, s32 *arg3, s32 arg4); void func_800861C8(unk800861C8 *arg0, s32 *arg1); -s32 func_800874D0(s32 arg0, s32 arg1); -s32 func_800875E4(s32 arg0, s32 arg1); -s32 func_800876CC(s32 arg0, s32 arg1); +s32 func_800874D0(s32 buttonsPressed, s32 arg1); +s32 func_800875E4(s32 buttonsPressed, s32 arg1); +s32 func_800876CC(s32 buttonsPressed, s32 arg1); void func_80087EB8(void); void menu_boot_init(void); void func_800887C4(void); @@ -777,10 +751,10 @@ s32 trophy_race_cabinet_menu_loop(void); void dialogue_open_stub(void); void dialogue_close_stub(void); f32 func_8009E9B0(DialogueBoxBackground *arg0, Gfx **dlist, Gfx **mat, VertexList **vtx); -s64 *func_8009EA6C(void); -s32 func_8009EA78(s64 arg0); -s32 func_8009EABC(s64 arg0); -s64 func_8009EB08(void); +u64 *get_eeprom_settings_pointer(void); +s32 set_eeprom_settings_value(u64 valueToSet); +s32 unset_eeprom_settings_value(u64 valueToUnset); +u64 get_eeprom_settings(void); s32 get_language(void); void set_language(s32 language); s32 is_adventure_two_unlocked(void); @@ -800,7 +774,7 @@ void menu_magic_codes_init(void); void render_magic_codes_list_menu_text(s32 arg0); s32 menu_magic_codes_list_loop(s32 arg0); void calculate_and_display_rom_checksum(void); -void randomize_ai_racer_slots(s32 arg0); +void randomise_ai_racer_slots(s32 arg0); void menu_game_select_init(void); void func_8008C698(s32 arg0); s32 menu_game_select_loop(s32 arg0); @@ -822,5 +796,8 @@ void update_controller_sticks(void); s32 tt_menu_loop(void); void menu_track_select_init(void); void menu_trophy_race_rankings_init(void); +void func_8009E3D0(void); +s32 func_800C3564(void); +void func_8008C168(s32); #endif diff --git a/src/object_functions.c b/src/object_functions.c new file mode 100644 index 00000000..fc48b85d --- /dev/null +++ b/src/object_functions.c @@ -0,0 +1,2026 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80033CC0 */ + +#include "object_functions.h" + +#include "PR/os_cont.h" +#include "types.h" +#include "macros.h" +#include "structs.h" +#include "video.h" +#include "camera.h" +#include "menu.h" // For cheats +#include "unknown_0ABDF0.h" +#include "racer.h" +#include "game.h" +#include "audio.h" +#include "unknown_008C40.h" +#include "unknown_00BC20.h" +#include "particles.h" +#include "unknown_0255E0.h" +#include "font.h" +#include "unknown_032760.h" +#include "game_ui.h" +#include "waves.h" +#include "unknown_003260.h" + +/************ .data ************/ + +// Unsure about the signed/unsigned with these arrays. +u16 D_800DC970[4] = { + 0x40FF, 0xFFFF, 0x0007, 0x0003 +}; +u16 D_800DC978[4] = { + 0x0000, 0x0000, 0x001E, 0xFFFF +}; +u16 D_800DC980[20] = { + 0xFF00, 0x0100, 0x0000, 0xFFFF, + 0xFFFF, 0x0100, 0x0100, 0x0000, + 0xFFFF, 0xFFFF, 0x0100, 0xFF00, + 0x0000, 0xFFFF, 0xFFFF, 0xFF00, + 0xFF00, 0x0000, 0xFFFF, 0xFFFF, +}; +u16 D_800DC9A8[20] = { + 0x0000, 0x0040, 0xFFC0, 0x0000, + 0xFFC0, 0xFFC0, 0x0000, 0x0040, + 0x0020, 0x0000, 0xFFC0, 0x0020, + 0x0000, 0x0040, 0x0040, 0x0000, + 0xFFC0, 0x0040, 0x0000, 0x0000, +}; +u16 D_800DC9D0[64] = { + 0x0000, 0x0301, 0x0004, 0x0000, + 0x0001, 0x0004, 0x0004, 0x0004, + 0x0000, 0x0203, 0x0004, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0004, + 0x0002, 0x0503, 0x0001, 0x0000, + 0x0000, 0x0004, 0x0001, 0x0004, + 0x0002, 0x0405, 0x0001, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0004, + 0x0000, 0x0103, 0x0004, 0x0000, + 0x0004, 0x0004, 0x0001, 0x0004, + 0x0000, 0x0302, 0x0004, 0x0000, + 0x0001, 0x0004, 0x0001, 0x0000, + 0x0002, 0x0305, 0x0001, 0x0000, + 0x0001, 0x0004, 0x0000, 0x0004, + 0x0002, 0x0504, 0x0001, 0x0000, + 0x0000, 0x0004, 0x0000, 0x0000, +}; +s8 D_800DCA50[8] = { + 2, 5, 6, 3, 10, 8, 7, 9 +}; +u8 D_800DCA58[9] = { + 2, 5, 6, 3, 10, 8, 7, 9, 11 +}; +s8 D_800DCA64[9] = { + 2, 5, 6, 3, 10, 8, 7, 9, 12 +}; +s8 D_800DCA70[10] = { + 2, 5, 6, 3, 10, 8, 7, 9, 11, 12 +}; +s32 D_800DCA7C[3] = { // Not sure about typing + 0, 0, 0 +}; +s32 D_800DCA88[3] = { // Not sure about typing + 0, 0, 0 +}; + +s8 D_800DCA94[8] = { + 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00 +}; + +s8 D_800DCA9C[12] = { + 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +u16 D_800DCAA8[64] = { + 0x0000, 0x0301, 0x0000, 0x0000, + 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, + 0x0000, 0x0203, 0x0000, 0x0000, + 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, + 0x0002, 0x0503, 0xFFFF, 0x0000, + 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0002, 0x0405, 0xFFFF, 0x0000, + 0x0000, 0x0000, 0x0000, 0xFFFF, + 0x0000, 0x0103, 0x0000, 0x0000, + 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0000, 0x0302, 0x0000, 0x0000, + 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, + 0x0002, 0x0305, 0xFFFF, 0x0000, + 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, + 0x0002, 0x0504, 0xFFFF, 0x0000, + 0x0000, 0xFFFF, 0x0000, 0x0000, +}; +u16 D_800DCB28[20] = { + 0xFFC0, 0x0000, 0x0020, 0xFFC0, + 0x0000, 0xFFE0, 0x0000, 0x0000, + 0x0020, 0x0000, 0x0000, 0xFFE0, + 0x0040, 0x0000, 0x0020, 0x0040, + 0x0000, 0xFFE0, 0x0000, 0x0000, +}; + +/*******************************/ + +/************ .bss ************/ + +f32 D_8011D4D0; +s32 D_8011D4D4; +s32 D_8011D4D8; +s32 D_8011D4DC; +s16 D_8011D4E0; +s16 D_8011D4E2; + +/******************************/ + +#ifdef NON_EQUIVALENT +typedef struct Object_50_80033CC0 { + f32 unk0; +} Object_50_80033CC0; + +void obj_init_scenery(Object *obj, LevelObjectEntry_Scenery *entry) { + f32 phi_f0; + obj->unk6 |= 2; + phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10) { + phi_f0 = 10; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + ((Object_50_80033CC0 *)obj->unk50)->unk0 = obj->header->unk4 * phi_f0; + obj->unk3A = entry->unk8; + obj->y_rotation = entry->unkA << 6 << 4; + if (entry->unkB) { + // Regalloc issue here + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 1; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + obj->unk4C->unk16 = -5; + obj->unk4C->unk17 = entry->unkB; + } + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } + obj->unk78 = 0; + obj->unk7C.word = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_scenery.s") +#endif + +void obj_loop_scenery(Object *obj, s32 speed) { + Object78_80033DD0 *obj78; + s32 temp_v0; + + if (obj->unk4C != NULL) { + obj78 = &obj->unk78; + if (obj->unk7C.half.upper > 0) { + obj78->unk4 -= speed; + } + if ((obj->unk4C->unk14 & 0x40) && ((s32) obj78->unk4 <= 0)) { + func_80009558(316, obj->x_position, obj->y_position, obj->z_position, 4, NULL); + obj78->unk0 = (s32*) obj->unk4C->unk0; + obj78->unk6 = 1820; + obj78->unk4 = 10; + if (get_number_of_active_players() < 2) { + if (obj->header->unk57 > 0) { + if (obj->header->unk57 == 1) { + temp_v0 = 0; + } else { + temp_v0 = get_random_number_from_range(0, obj->header->unk57 - 1); + } + obj->unk74 = 1 << temp_v0; + func_800AFC3C(obj, 2); + } + } + } else if (obj78->unk4 <= 0) { + obj78->unk0 = 0; + } + obj->z_rotation = (s16) obj78->unk6; + obj78->unk6 = (obj78->unk6 * -200) >> 8; + } +} + +void obj_init_fireball_octoweapon(Object *obj, LevelObjectEntry_Fireball_Octoweapon *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; +} + +#ifdef NON_MATCHING +// Has a minor regalloc issue with obj4C_obj. + +typedef struct Object80033F60_64 { + u8 pad0[0x1C]; + s32 *unk1C; + u8 pad20[0x8]; + s32 unk28; +} Object80033F60_64; + +typedef struct Object80033F60_4C_64 { + s16 unk0; + u8 pad2[0x185]; + s8 unk187; + u8 pad188[0x7C]; + s16 unk204; +} Object80033F60_4C_64; + +s32 func_80011560(void); +void func_80011570(Object*, f32, f32, f32); +void func_8003FC44(f32, f32, f32, s32, s32, f32, s32); +s16 func_80070750(f32, f32); +s32 func_8002AD08(f32, f32**, s32); +void func_80001D04(u16, s32 *); +void func_8000488C(s32); +void func_800AFC3C(Object *, s32); +void gParticlePtrList_addObject(Object *); +f32 sqrtf(f32); + +void obj_loop_fireball_octoweapon(Object *obj, s32 speed) { + Object *obj78; + Object_4C *obj4C; + f32 sp7C; + Object80033F60_4C_64 *obj4C_obj64; + Object80033F60_64 *obj64; + Object *obj4C_obj; + f32 phi_f2; + s32* temp; + f32 sp4C[7]; + + obj78 = (Object*)obj->unk78; + + sp7C = speed; + if (osTvType == TV_TYPE_PAL) { + sp7C *= 1.2; + } + + if ((obj->behaviorId == 116) && (obj->unk7C.word < 0)) { + obj->x_position = 0.0f; + obj->y_position = 0.0f; + obj->z_position = 0.0f; + func_80011560(); + func_80011570(obj, obj78->x_position, obj78->y_position, obj78->z_position); + } else { + phi_f2 = (obj78->x_position - obj->x_position) * 0.1; + if (phi_f2 > 10.0) { + phi_f2 = 10.0f; + } + if (phi_f2 < -10.0) { + phi_f2 = -10.0f; + } + obj->x_velocity += (phi_f2 - obj->x_velocity) * 0.125 * sp7C; + phi_f2 = (obj78->y_position - obj->y_position) * 0.1; + if (phi_f2 > 10.0) { + phi_f2 = 10.0f; + } + if (phi_f2 < -10.0) { + phi_f2 = -10.0f; + } + obj->y_velocity += (phi_f2 - obj->y_velocity) * 0.125 * sp7C; + phi_f2 = (obj78->z_position - obj->z_position) * 0.1; + if (phi_f2 > 10.0) { + phi_f2 = 10.0f; + } + if (phi_f2 < -10.0) { + phi_f2 = -10.0f; + } + obj->z_velocity += (phi_f2 - obj->z_velocity) * 0.125 * sp7C; + if (sqrtf((obj->x_velocity * obj->x_velocity) + (obj->z_velocity * obj->z_velocity)) > 0.5) { + obj->y_rotation = func_80070750(obj->x_velocity, obj->z_velocity); + obj->x_rotation -= speed << 9; + } + func_80011570(obj, obj->x_velocity * sp7C, obj->y_velocity * sp7C, obj->z_velocity * sp7C); + if (obj->unk4A == 298 && func_8002AD08(obj->y_position, &sp4C, 0)) { + obj->y_position = sp4C[0]; + } + } + obj->unk18 += speed * 10; + obj64 = obj->unk64; + obj4C = obj->unk4C; + obj4C_obj = (Object*)obj4C->unk0; // This should be a0, not v1! + if ((obj4C_obj != NULL) && (obj4C->unk13 < 60) && (obj4C_obj->header->behaviorId == 1)) { + obj4C_obj64 = obj4C_obj->unk64; + if (obj4C_obj64->unk0 != -1) { + if (obj->behaviorId == 108) { + obj4C_obj64->unk187 = 1; + obj->unk7C.word = 20; + func_8003FC44(obj->x_position, obj->y_position, obj->z_position, 44, 17, 1.0f, 1); + gParticlePtrList_addObject(obj); + } else if (obj->unk7C.word > 0) { + obj4C_obj64->unk204 = 60; + obj->unk7C.word = -60; + obj->unk78 = obj4C_obj; + func_80001D04(586, &obj64->unk1C); + } + } + } + if (obj->behaviorId == 108) { + obj->unk74 = 1; + func_800AFC3C(obj, speed); + obj->unk7C.word -= speed; + if (obj->unk7C.word < 0) { + if (obj->unk4A == 298) { + gParticlePtrList_addObject(obj); + func_8003FC44(obj->x_position, obj->y_position, obj->z_position, 44, 17, 1.0f, 1); + } + obj->scale *= 0.9; + if (obj->scale < 0.5) { + gParticlePtrList_addObject(obj); + } + } + } else { + if (obj->unk7C.word < 0) { + obj->unk7C.word += speed; + if (obj->unk7C.word >= 0) { + obj->unk7C.word = 0; + } + } else { + obj->unk7C.word -= speed; + if (obj->unk7C.word <= 0) { + obj->unk7C.word = 0; + } + } + if (obj->unk7C.word == 0) { + temp = obj64->unk1C; + if (temp != 0) { + func_8000488C(temp); + } + func_80009558(341, obj->x_position, obj->y_position, obj->z_position, 4, 0); + gParticlePtrList_addObject(obj); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s") +#endif + +void obj_init_lasergun(Object *obj, LevelObjectEntry_Lasergun *entry) { + Object_64 *obj64; + obj->unk4C->unk14 = 0x22; + obj->unk4C->unk11 = 0; + obj64 = obj->unk64; + obj64->unkE = entry->unkA; + obj64->unkF = entry->unkB; + obj64->unk10 = entry->unkC; + obj64->unk11 = entry->unkD; + obj64->unkCD.half = obj64->unkF; + obj->y_rotation = entry->unk8 << 4 << 4; // Not sure about the shift amounts here, but it + obj->x_rotation = entry->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8. +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_lasergun.s") + +void obj_init_laserbolt(Object *obj, LevelObjectEntry_Laserbolt *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; +} + +void func_80031130(s32, f32*, f32*, s32); +void func_80031600(f32*, f32*, f32*, s8*, s32, s8*); +void func_8003FC44(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6); + +typedef struct Object_7C_80034860 { + u8 pad0[0xC]; + s16 unkC; +} Object_7C_80034860; + +typedef struct Object_64_80034860 { + s16 unk0; + u8 unk4[0x185]; + s8 unk187; +} Object_64_80034860; + +void obj_loop_laserbolt(Object *obj, s32 speed) { + f32 sp5C; + + Object *obj4C_obj; + + Object_7C_80034860 *obj7C; + Object_64_80034860 *obj4C_obj64; + + s8 sp4F; // Boolean + s8 sp4E; + f32 sp48; + f32 sp44; + f32 sp40; + f32 sp3C; + s32 sp38; // Boolean + + + sp4F = FALSE; + sp5C = speed; + if (osTvType == TV_TYPE_PAL) { + sp5C *= 1.2; + } + sp40 = obj->x_position + (obj->x_velocity * sp5C); + sp44 = obj->y_position + (obj->y_velocity * sp5C); + sp48 = obj->z_position + (obj->z_velocity * sp5C); + sp3C = 9.0f; + + func_80031130(1, &obj->x_position, &sp40, -1); + sp38 = FALSE; + func_80031600(&obj->x_position, &sp40, &sp3C, &sp4E, 1, &sp38); + if (sp38) { + obj->x_velocity = (sp40 - obj->x_position) / sp5C; + obj->y_velocity = (sp44 - obj->y_position) / sp5C; + obj->z_velocity = (sp48 - obj->z_position) / sp5C; + } + func_80011570(obj, obj->x_velocity * sp5C, obj->y_velocity * sp5C, obj->z_velocity * sp5C); + if (sp38) { + func_8003FC44(obj->x_position, obj->y_position - 36.0f, obj->z_position, 44, 0, 0.2, 0); + sp4F = TRUE; + } + + if (obj->unk78 > 0) { + obj->unk78 -= speed; + } else { + sp4F = TRUE; + } + + if (obj->unk4C->unk13 < 80) { + obj4C_obj = (Object*)obj->unk4C->unk0; + if (obj4C_obj && (obj4C_obj->behaviorId == 1)) { + obj4C_obj64 = obj4C_obj->unk64; + sp4F = TRUE; + if (obj4C_obj64->unk0 != -1) { + obj4C_obj64->unk187 = 1; + } + obj7C = (Object_7C_80034860 *)obj->unk7C.word; + if (obj7C) { + obj7C->unkC = 180; + } + sp4F = TRUE; + func_8003FC44(obj->x_position, obj->y_position - 36.0f, obj->z_position, 44, 17, 0.5, 0); + } + } + if (sp4F) { + gParticlePtrList_addObject(obj); + } +} + +void obj_init_torch_mist(Object *obj, LevelObjectEntry_Torch_Mist *entry) { + f32 phi_f0 = (s32)(entry->unk9 & 0xFF); + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->unk78 = entry->unk8; +} + +void obj_loop_torch_mist(Object *obj, s32 speed) { + obj->unk18 += obj->unk78 * speed; +} + +void obj_init_effectbox(Object *obj, LevelObjectEntry_EffectBox *entry) { +} + +#ifdef NON_EQUIVALENT + +// Has regalloc & stack issues. + +f32 func_800707C4(s16); +f32 func_800707F8(s16); +Object **get_object_struct_array(s32 *count); + +void obj_loop_effectbox(Object *obj, s32 speed) { + Object **objList; + Object_3C_80034B74 *obj3C; + Object_64_80034B74 *curObj64; + s32 i; + s32 numberOfObjects; + f32 xDiff; + f32 yDiff; + f32 zDiff; + f32 temp0; + f32 temp1; + f32 temp2; + f32 temp3; + f32 temp4; + f32 temp5; + f32 tempf0; + u8 new_var2; + + obj3C = obj->unk3C_a.unk3C; + objList = get_object_struct_array(&numberOfObjects); + temp0 = func_800707F8((obj3C->unkB << 8) * -1); + temp1 = func_800707C4((obj3C->unkB << 8) * -1); + temp2 = obj3C->unk8 * 3; + temp3 = obj3C->unk9 * 3; + temp4 = obj3C->unkA * 3; + for (i = 0; i < numberOfObjects; i++) + { + xDiff = objList[i]->x_position - obj->x_position; + yDiff = objList[i]->y_position - obj->y_position; + zDiff = objList[i]->z_position - obj->z_position; + if (((-temp3) < yDiff) && (yDiff < temp3)) + { + temp5 = (xDiff * temp0) + (zDiff * temp1); + if (((-temp2) < temp5) && (temp5 < temp2)) + { + temp5 = ((-xDiff) * temp1) + (zDiff * temp0); + if (((-temp4) < (((-xDiff) * temp1) + (zDiff * temp0))) && (temp5 < temp4)) + { + temp5 = temp3 / 2; + curObj64 = objList[i]->unk64; + curObj64->unk1FE = obj3C->unkC; + curObj64->unk1FF = obj3C->unkD; + if ((temp5 < yDiff) && (curObj64->unk1FE == 1)) + { + new_var2 = curObj64->unk1FF; + tempf0 = (new_var2 & 0xFF) * ((f32) (1.0 - ((yDiff - temp5) / temp5))); + curObj64->unk1FF = new_var2 * ((f32) (1.0 - ((yDiff - temp5) / temp5))); + if (tempf0 < 0.0f) + { + } + } + } + } + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_effectbox.s") +#endif + +void obj_init_trophycab(Object *obj, LevelObjectEntry_TrophyCab *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->y_rotation = entry->rotation << 6 << 4; // Not sure about the values here. +} + +#ifdef NON_EQUIVALENT + +void func_80001D04(u16, s32 *); +f32 sqrtf(f32); +void func_80001D04(u16, s32 *); +f32 sqrtf(f32); +u32 func_80001C08(void); +void func_80001D04(u16, s32 *); +Object *func_8000EA54(unk80027FC4 *, s32); +void func_8005A3B0(void); +void func_8006F254(void); +void func_8009CF68(s32 arg0); +s32 func_8009CFEC(u32 arg0); +void func_800A3870(void); +void func_800AB1AC(s32 arg0); +void func_800AB1D4(u8 arg0); +void func_800C31EC(s32); +s32 func_800C3400(void); +LevelHeader *get_current_level_header(void); +Settings *get_settings(void); +void play_sound(u8 arg0); +void set_music_fade_timer(s32 time); +void set_sndfx_player_voice_limit(u8 voiceLimit); +f32 sqrtf(f32); + +typedef struct Object_64_80034E9C { + s32 unk0; + s16 unk4; +} Object_64_80034E9C; + +typedef struct Object_54_80034E9C { + u8 pad0[0x28]; + f32 unk28; + f32 unk2C; +} Object_54_80034E9C; + +// Has regalloc & stack issues. + +void obj_loop_trophycab(Object *obj, s32 speed) { + s32 sp34; + s32 isTrophyRaceAvaliable; + s32 raceType; + unk80027FC4 sp44; + Settings *settings; + LevelHeader *curLevelHeader; + Object_64_80034E9C *obj64; + Object *trophyObj; + Object *playerObj; + f32 xDiff; + f32 zDiff; + s32 new_var2; + + settings = get_settings(); + curLevelHeader = get_current_level_header(); + obj64 = obj->unk64; + + // Show trophy inside the cabinet + if (obj->unk7C.word == 0) { + raceType = curLevelHeader->race_type; + if ((raceType != 7) && (raceType != 6)) { // Make sure the current level is not a cutscene. + obj->unk7C.word = 1; + if ((settings->trophies >> (((settings->worldId - 1) ^ 0) * 2)) & 3) { + sp44.unk0 = 128; + sp44.unk2 = obj->unk3C_a.unk3C->unk2; + sp44.unk4 = obj->unk3C_a.unk3C->unk4; + sp44.unk6 = obj->unk3C_a.unk3C->unk6; + sp44.unk1 = 8; + trophyObj = func_8000EA54(&sp44, 1); + if (trophyObj) { + trophyObj->unk3C_a.unk3C = (void *) 0; + trophyObj->y_rotation = obj->y_rotation; + } + } + } + } + + ((Object_54_80034E9C *) obj->unk54)->unk2C = 0.612f; + ((Object_54_80034E9C *) obj->unk54)->unk28 = 0.0f; + + playerObj = get_object_struct(0); + if (playerObj) { + xDiff = obj->x_position - playerObj->x_position; + zDiff = playerObj->z_position - obj->z_position; + sqrtf((xDiff * xDiff) + (zDiff * zDiff)); // Distance on X & Z axes. Not used? + + new_var2 = settings->bosses; + + /** + * Future Fun Land doesn't have a boss rematch, so this OR is needed so that + * trophy race becomes avaliable after all the balloons have been collected. + */ + new_var2 |= 0x800; + + // Check if all the balloons have been collected. + isTrophyRaceAvaliable = (settings->balloonsPtr[settings->worldId] < 8) ^ 1; + if (isTrophyRaceAvaliable) { + // Check if the boss rematch has been beaten. + isTrophyRaceAvaliable = ((1 << (settings->worldId + 6)) & new_var2) != 0; + } + + // Hit detection between cabinet & player? + if ((((obj->unk78 == 0) && (!func_800C3400())) && obj->unk5C->unk100) && (obj64->unk4 == 0)) { + // A hit has been detected at this point. + if (isTrophyRaceAvaliable) { + obj->unk78 = 1; + func_80001D04(303, 0); + func_800A3870(); + } + else + { + func_800C31EC(4); + obj64->unk4 = 180; + obj64->unk0 = 140; + set_sndfx_player_voice_limit(16); + set_music_fade_timer(-8); + play_sound(17); + } + } + if ((obj64->unk0 != 0) && (func_80001C08() == 0)) { + if (speed < obj64->unk0) { + obj64->unk0 -= speed; + } + else + { + obj64->unk0 = 0; + set_music_fade_timer(8); + set_sndfx_player_voice_limit(6); + } + } + if (obj->unk5C->unk100 || func_800C3400()) { + obj64->unk4 = 180; + } + if (obj64->unk4 > 0) { + obj64->unk4 -= speed; + } + else + { + obj64->unk4 = 0; + } + if (obj->unk78 == 1) { + func_800AB1AC(3); + func_800AB1D4(0); + sp34 = func_8009CFEC(4); + if (sp34 != 0) { + obj->unk78 = 0; + func_8009CF68(4); + if (sp34 == 1) { + func_8006F254(); + obj->unk78 = 2; + } + else + { + func_800AB1D4(1); + } + } + func_8005A3B0(); + } + obj->unk5C->unk100 = NULL; + if (isTrophyRaceAvaliable) { + // Changes lighting/color of the cabinet? + ((Object_54_80034E9C *) obj->unk54)->unk28 = 0.552f; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_trophycab.s") +#endif + +void obj_init_collectegg(Object *obj, LevelObjectEntry_CollectEgg *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_collectegg.s") + +void obj_init_eggcreator(Object *obj, LevelObjectEntry_EggCreator *entry) { +} + +void obj_loop_eggcreator(Object *obj, s32 speed) { + unk8003564C sp20; + Object *someObj; + + if (obj->unk78 == 0) { + sp20.unk2 = obj->x_position; + sp20.unk4 = obj->y_position; + sp20.unk6 = obj->z_position; + sp20.unk1 = 8; + sp20.unk0 = 0x34; + someObj = func_8000EA54(&sp20, 1); + if (someObj != NULL) { + Object_64_8003564C *someObj64 = someObj->unk64; + someObj64->unk4 = obj; + obj->unk78 = someObj; + someObj->unk3C_a.unk3C = 0; + } + } +} + +void obj_init_lighthouse_rocketsignpost(Object *obj, LevelObjectEntry_Lighthouse_RocketSignpost *entry) { + f32 phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10) { + phi_f0 = 10; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->y_rotation = entry->unkA << 6 << 4; + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_loop_rocketsignpost(Object *obj, s32 speed) { + Object *playerObj; + Object_4C *obj4C; + + playerObj = get_object_struct(0); + if (playerObj != NULL) { + obj4C = obj->unk4C; + if (obj4C->unk13 < 0xC8) { + if (playerObj == obj4C->unk0) { + // Detect if the player honks or slams into the signpost. + if ((get_buttons_pressed_from_player(0) & Z_TRIG) || playerObj == obj->unk5C->unk100) { + func_8006F29C(); + } + } + } + } + obj->unk4C->unk13 = 0xFF; +} + +void obj_init_airzippers_waterzippers(Object *obj, LevelObjectEntry_AirZippers_WaterZippers *entry) { + ObjectHeader *objHeader; + f32 phi_f0; + + phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + objHeader = obj->header; + phi_f0 /= 64; + obj->scale = objHeader->scale * phi_f0; + obj->y_rotation = entry->unkA << 6 << 4; + if (obj->unk3A >= objHeader->numberOfModelIds) { + obj->unk3A = 0; + } + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + if (get_filtered_cheats() & CHEAT_TURN_OFF_ZIPPERS) { + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_groundzipper.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_groundzipper.s") + +void obj_init_unknown58(Object *obj, LevelObjectEntry_Unknown58 *entry) { + obj->unk78 = 0; + obj->unk7C.word = obj->header; +} + +void obj_loop_unknown58(Object *obj, s32 speed) { + Object *someObj; + Object *someOtherObj; + Object_64_80035E34 *someOtherObj64; + Object_60 *obj60; + + obj->unk3B = 0; + obj->unk18 = 0x28; + if (func_8001139C() == 0) { + obj->unk78 += speed; + } + set_ghost_position_and_rotation(obj); + func_800AFC3C(obj, speed); + someOtherObj = get_object_struct(0); + someOtherObj64 = someOtherObj->unk64; + obj60 = obj->unk60; + if (obj60->unk0 == 1) { + s8 temp = someOtherObj64->unk1D6; + if ((temp == 1) || (temp == 2)) { + someObj = (Object *)obj60->unk4; + someObj->y_rotation = 0x4000; + someObj->unk3A++; + someObj->unk3A &= 1; + } + } +} + +void obj_init_characterflag(Object *obj, LevelObjectEntry_CharacterFlag *entry) { + f32 phi_f0; + obj->unk78 = (s32)entry->unkE; + obj->unk7C.word = -1; + obj->y_rotation = entry->unkC << 6 << 4; // Not sure about the values here. + phi_f0 = (f32)(entry->unkA & 0xFF); + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + obj->scale = (f32)(obj->header->scale * phi_f0); +} + +void obj_loop_characterflag(Object *obj, s32 speed) { + s32 temp_t4; + s32 temp_t5; + Object *someObj; + Object_64_80035F6C *obj64; + Object_64_80035F6C_2 *someObj64; + + if (obj->unk7C.word < 0) { + someObj = get_object_struct(obj->unk78); + if (someObj != NULL) { + obj64 = obj->unk64; + someObj64 = someObj->unk64; + obj->unk7C.word = someObj64->unk3; + if (obj->unk7C.word < 0 || obj->unk7C.word >= 0xA) { + obj->unk7C.word = 0; + } + obj64->unk20 = D_800DC980; + obj64->unk24 = obj->unk68[obj->unk7C.word]; + temp_t4 = (obj64->unk24[0] - 1) << 0x15; + temp_t5 = (obj64->unk24[1] - 1) << 5; + obj64->unk0 = 0x40000103; + obj64->unk4 = 0; + obj64->unk8 = temp_t4; + obj64->unkC = temp_t5; + obj64->unk10 = 0x40010203; + obj64->unk14 = temp_t4; + obj64->unk18 = (s32)(temp_t4 | temp_t5); + obj64->unk1C = temp_t5; + } + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s") + +void obj_init_stopwatchman(Object *obj, LevelObjectEntry_StopWatchMan *entry) { + Object_64 *temp; + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk4C->unk12 = 0; + temp = obj->unk64; + temp->unkCD.bytes.byteD = 0xFF; + temp->unk0_a.unk0 = 0.0f; + D_8011D4D8 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s") + +void func_80036BCC(u16 arg0, s32 arg1) { + if ((D_8011D4D8 != 0) && (arg1 & 1)) { + func_8000488C(D_8011D4D8); //This is likely wrong and will need to be fixed + D_8011D4D8 = 0; + } + if (D_8011D4D8 == 0) { + func_80001D04(arg0, &D_8011D4D8); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_fish.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_fish.s") + +void obj_init_lavaspurt(Object *obj, LevelObjectEntry_LavaSpurt *entry) { + obj->unk78 = entry->unk9 * 2; + obj->unk7C.word = entry->unk8; +} + +void obj_loop_lavaspurt(Object *obj, s32 speed) { + if (obj->unk78 > 0) { + obj->unk78 -= speed; + obj->unk6 |= 0x4000; + } else { + obj->unk6 &= ~0x4000; + obj->unk18 += speed * 4; + if (obj->unk18 >= 256) { + obj->unk18 = 0; + obj->unk78 = get_random_number_from_range(0, 30) + obj->unk7C.word; + } + } +} + +void obj_init_posarrow(Object *obj, LevelObjectEntry_PosArrow *entry) { + obj->unk6 |= 0x4000; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_posarrow.s") + +void obj_init_animator(Object *obj, LevelObjectEntry_Animator *entry, s32 arg2) { + Object_64_800376E0 *obj64; + LevelModel *levelModel; + s16 segmentBatchCount; + + obj64 = obj->unk64; + levelModel = func_8002C7C4(); + obj64->unk2 = entry->unk8; + obj64->unk4 = entry->unk9; + obj64->unk6 = entry->unkA; + obj64->segmentId = get_level_segment_index_from_position(obj->x_position, obj->y_position, obj->z_position); + if (arg2 == 0) { + obj64->unk8 = 0; + obj64->unkA = 0; + } + if (obj64->segmentId != -1) { + if (obj64->unk2 < 0) { + obj64->unk2 = 0; + } + segmentBatchCount = levelModel->segments[obj64->segmentId].numberOfBatches; + if (obj64->unk2 >= segmentBatchCount) { + obj64->unk2 = segmentBatchCount - 1; + } + } + obj_loop_animator(obj, 0x20000); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_animator.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_animation.s") + +void obj_loop_animobject(Object *obj, s32 speed) { + func_8001F460(obj, speed, obj); +} + +void obj_loop_dooropener(Object *obj, s32 speed) { + s32 phi_a0; + unk80037D08_arg0_64 *sp18; + + sp18 = obj->unk64; + phi_a0 = 1 - func_8001F460(obj, speed, obj); + if (sp18->unk2A > 0) { + phi_a0 = 0; + } + func_800235D0(phi_a0); +} + +void obj_init_overridepos(Object *obj, LevelObjectEntry_OverridePos *entry) { +} + +/* Unused? */ +void func_80037D60(s32 arg0, s32 arg1) { +} + +void obj_init_wizpigship(Object *obj, LevelObjectEntry_WizpigShip *entry) { +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_wizpigship.s") + +void obj_loop_vehicleanim(Object *obj, s32 speed) { + Object_60_800380F8 *obj60; + Object *someObj; + + func_8001F460(obj, speed, obj); + obj60 = obj->unk60; + if (obj60 != NULL) { + if (obj60->unk0 > 0) { + someObj = obj60->unk0 == 3 ? obj60->unkC : obj60->unk4; + someObj->y_rotation = 0x4000; + someObj->unk3A++; + if (someObj->unk3A == someObj->header->numberOfModelIds) { + someObj->unk3A = 0; + } + } + } +} + +void obj_init_hittester(Object *obj, LevelObjectEntry_HitTester *entry) { + obj->unk4C->unk14 = 0x81; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_loop_hittester(Object *obj, s32 speed) { + func_8001F460(obj, speed, obj); +} + +void obj_init_dynamic_lighting_object(Object *obj, LevelObjectEntry_DynamicLightingObject *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_init_unknown96(Object *obj, LevelObjectEntry_Unknown96 *entry) { + obj->unk4C->unk14 = 0x81; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_init_snowball(Object *obj, LevelObjectEntry_Snowball *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +#ifdef NON_EQUIVALENT +// Regalloc issues +void obj_loop_snowball(Object *obj, s32 speed) { + Object_64_8003827C *obj64 = obj->unk64; + if (obj64->unk24 == 0) { + if (obj64->unk38 != 0) { + obj64->unk24 = (s16)(obj64->unk38 & 0xFF); + } + } + if (obj64->unk24 != 0) { + if (obj64->unk20 == 0) { + func_80009558(obj64->unk24 & 0xFFFF, obj->x_position, obj->y_position, obj->z_position, 1, &obj64->unk20); + } else { + func_800096D8(obj64->unk20, obj->x_position, obj->y_position, obj->z_position); + } + } + func_8001F460(obj, speed, obj); +} + +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_snowball.s") +#endif + +// Unused +void func_80038330(s32 arg0, s32 arg1) { +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_char_select.s") + +void obj_loop_animcamera(Object *obj, s32 speed) { + s32 temp_v0; + s32 phi_v1; + Object_64_80038710 *obj64; + + temp_v0 = func_8001F460(obj, speed, obj); + obj->unk6 |= 0x4000; + obj64 = obj->unk64; + if (temp_v0 == 0) { + if (get_viewport_count() == VIEWPORTS_COUNT_1_PLAYER) { + phi_v1 = func_800210CC(obj64->unk44); + } else { + phi_v1 = 1; + } + if (phi_v1) { + func_80066488(obj64->unk30, obj->x_position, obj->y_position, obj->z_position, 0x8000 - obj->y_rotation, -obj->x_rotation, obj->z_rotation); + } + } +} + +// Unused +void func_800387C0(s32 arg0, s32 arg1) { +} + +void obj_loop_animcar(Object *obj, s32 speed) { + Object *someObj; + s32 temp_v0; + temp_v0 = obj->unk78; + someObj = NULL; + if (temp_v0 != 0) { + someObj = get_object_struct(temp_v0 - 1); + } + obj->unk7C.word = func_8001F460(obj, speed, obj); + obj->unk6 |= 0x4000; + if (obj->unk7C.word == 0 && someObj != NULL) { + Object_64_800387CC *someObj64 = someObj->unk64; + someObj64->unk148 = obj; + } +} + +void obj_init_infopoint(Object *obj, LevelObjectEntry_InfoPoint *entry) { + if (entry->unk8[1] != 0) { + obj->unk4C->unk14 = 0x21; + } else { + obj->unk4C->unk14 = 0x22; + } + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0xF; + obj->unk4C->unk12 = 0; + obj->unk78 = (entry->unk8[2] << 16) | entry->unk8[0]; // Not sure about the values here. + obj->unk7C.word = entry->unk8[1]; + obj->y_rotation = entry->unkB << 10; // Not sure about the values here. +} + +void obj_loop_infopoint(Object *obj, s32 speed) { + s16 temp_a0; + Object_4C *obj4C; + Object *playerObj; + + if (obj->unk7C.word == 0) { + obj->unk6 |= 0x4000; + } else { + obj->unk6 &= ~0x4000; + } + + obj4C = obj->unk4C; + if (obj4C->unk13 < ((obj->unk78 >> 16) & 0xFF)) { + playerObj = obj4C->unk0; + if (playerObj->header->behaviorId == 1) { + Object_64_800388D4 *playerObj64 = playerObj->unk64; + temp_a0 = playerObj64->unk0; + if ((temp_a0 != -1) && (get_buttons_pressed_from_player(temp_a0) & Z_TRIG)) { + func_800C31EC(obj->unk78 & 0xFF); + } + } + } +} + +void obj_init_smoke(Object *obj, LevelObjectEntry_Smoke *entry) { +} + +void obj_loop_smoke(Object *obj, s32 speed) { + f32 temp_f2 = speed; + if (osTvType == TV_TYPE_PAL) { + temp_f2 *= 1.2; + } + obj->x_position += obj->x_velocity * temp_f2; + obj->unk18 += speed * 16; + obj->y_position += obj->y_velocity * temp_f2; + obj->z_position += obj->z_velocity * temp_f2; + if (obj->unk18 >= 256) { + gParticlePtrList_addObject(obj); + obj->unk18 = 255; + } +} + +void obj_init_unknown25(Object *obj, LevelObjectEntry_Unknown25 *entry) { +} + +void obj_loop_unknown25(Object *obj, s32 speed) { + obj->unk18 += speed * 8; + if (obj->unk18 >= 256) { + gParticlePtrList_addObject(obj); + obj->unk18 = 255; + } +} + +void obj_init_wardensmoke(Object *obj, LevelObjectEntry_WardenSmoke *entry) { +} + +void obj_loop_wardensmoke(Object *obj, s32 speed) { + f32 temp_f2; + + temp_f2 = (f32)speed; + if (osTvType == TV_TYPE_PAL) { + temp_f2 *= 1.2; + } + obj->unk18 += speed * 4; + obj->y_position += temp_f2 * 0.25; + if (obj->unk18 >= 256) { + gParticlePtrList_addObject(obj); + obj->unk18 = 255; + } +} + +#ifdef NON_EQUIVALENT +// regalloc issues +void obj_init_bombexplosion(Object *obj, unk80038B74 *entry) { + s32 temp; + obj->unk18 = 0; + obj->scale = 0.5f; + obj->unk3A = get_random_number_from_range(0, obj->header->numberOfModelIds - 1); + obj->unk78 = 0; + obj->unk7C.word = 0xFF; + temp = entry->unk8; + if (temp != 0) { + obj->unk7C.word |= (temp << 8) & 0xFF00; + } + obj->unk74 = 1; +} + +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_bombexplosion.s") +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s") + +void obj_init_teleport(Object *obj, LevelObjectEntry_Teleport *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0xF; + obj->unk4C->unk12 = 0; + if (get_settings()->cutsceneFlags & 1) { + obj->unk78 = 1; + } +} + +void obj_loop_teleport(Object *obj, s32 speed) { + if (obj->unk78 != 0) { + Object_3C_80038DC4 *temp = obj->unk3C_a.unk3C; + if (obj->unk4C->unk13 < 0x78) { + func_8006F338(temp->unk8); + obj->unk78 = 0; + func_80001D04(0x30, 0); + func_80000FDC(0x12A, 0, 1.0f); + } + } +} + +void obj_init_exit(Object *obj, LevelObjectEntry_Exit *entry) { + f32 phi_f0; + Object_64_80038E3C *obj64; + phi_f0 = entry->unk10 & 0xFF; + if (phi_f0 < 5) { + phi_f0 = 5; + } + obj64 = obj->unk64; + phi_f0 /= 128; + obj->scale = phi_f0; + obj->y_rotation = entry->unk11 << 6 << 4; + obj64->unk0 = func_800707C4(obj->y_rotation); + obj64->unk4 = 0.0f; + obj64->unk8 = func_800707F8(obj->y_rotation); + obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); + obj64->unk10 = entry->unk10; + obj64->unk14 = entry->unk18; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk10; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_exit.s") + +void obj_init_cameracontrol(Object *obj, LevelObjectEntry_CameraControl *entry) { + obj->unk78 = entry->unk8; + func_80011390(); +} + +void obj_loop_cameracontrol(Object *obj, s32 speed) { +} + +void obj_init_setuppoint(Object *obj, LevelObjectEntry_SetupPoint *entry) { + s32 temp; + obj->unk78 = entry->unk8; + obj->unk7C.word = entry->unk9; + obj->y_rotation = entry->unkA << 6 << 4; // Not sure about the values here. +} + +void obj_loop_setuppoint(Object *obj, s32 speed) { +} + +void obj_init_dino_whale(Object *obj, LevelObjectEntry_Dino_Whale *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 3; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_loop_dino_whale(Object *obj, s32 speed) { + s32 sp2C; + + if (obj->unk78 > 0) { + obj->unk78 -= speed; + speed *= 2; + } else { + obj->unk78 = 0; + } + sp2C = obj->unk18; + func_8001F460(obj, speed, obj); + func_800113CC(obj, 0, sp2C, 0xAC, 0xAD); + if (obj->unk4C->unk13 < 0xFF) { + if (obj->unk78 == 0) { + obj->unk78 = 0x3C; + func_80009558(0x23B, obj->x_position, obj->y_position, obj->z_position, 4, NULL); + } + } +} + +void obj_init_parkwarden(Object *obj, LevelObjectEntry_Parkwarden *entry) { + Object_64 *temp; + obj->unk4C->unk14 = (u16)1; + obj->unk4C->unk11 = (u8)0; + obj->unk4C->unk10 = (u8)0x1E; + obj->unk4C->unk12 = (u8)0; + temp = obj->unk64; + temp->unkCD.bytes.byteD = 0xFF; + temp->unk0_a.unk0 = 0.0f; + temp->unk28 = 0; + temp->unk2C = 0; + temp->unk34 = 0; + temp->unk36 = 0; + D_8011D4D4 = 0; + D_8011D4E2 = 0x10F; +} + +void func_80039320(s16 arg0) { + D_8011D4E2 = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_parkwarden.s") + +void func_8003AC3C(u16 arg0, s32 arg1) { + if ((D_8011D4D4 != 0) && (arg1 & 1)) { + func_8000488C(D_8011D4D4); + D_8011D4D4 = 0; + } + if (D_8011D4D4 == 0) { + func_80001D04(arg0, &D_8011D4D4); + } +} + +void obj_loop_gbparkwarden(Object *obj, s32 speed) { +} + +f32 func_8003ACAC(void) { + return D_8011D4D0; +} + +void obj_init_checkpoint(Object *obj, LevelObjectEntry_Checkpoint *entry, s32 arg2) { + f32 phi_f0 = (s32)(entry->unk8 & 0xFF); + if (phi_f0 < 5.0f) { + phi_f0 = 5.0f; + } + phi_f0 /= 64; + obj->scale = phi_f0; + obj->y_rotation = entry->unkA << 6 << 4; // Not sure about the values here. + func_80011390(); +} + +void obj_loop_checkpoint(Object *obj, s32 speed) { +} + +void obj_init_modechange(Object *obj, LevelObjectEntry_ModeChange *entry) { + f32 phi_f0; + Object_64_8003AD34 *obj64; + phi_f0 = entry->unk8 & 0xFF; + if (phi_f0 < 5) { + phi_f0 = 5; + } + obj64 = obj->unk64; + phi_f0 /= 128; + obj->scale = phi_f0; + obj->y_rotation = entry->unk9 << 6 << 4; + obj64->unk0 = func_800707C4(obj->y_rotation); + obj64->unk4 = 0.0f; + obj64->unk8 = func_800707F8(obj->y_rotation); + obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); + obj64->unk10 = entry->unk8; + obj64->unk14 = entry->unkA; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk8; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_modechange.s") + +void obj_init_bonus(Object *obj, LevelObjectEntry_Bonus *entry) { + f32 phi_f0; + Object_64_8003AD34 *obj64; + phi_f0 = entry->unk8 & 0xFF; + if (phi_f0 < 5) { + phi_f0 = 5; + } + obj64 = obj->unk64; + phi_f0 /= 128; + obj->scale = phi_f0; + obj->y_rotation = entry->unk9 << 6 << 4; + obj64->unk0 = func_800707C4(obj->y_rotation); + obj64->unk4 = 0.0f; + obj64->unk8 = func_800707F8(obj->y_rotation); + obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); + obj64->unk10 = entry->unk8; + obj64->unk14 = entry->unkA; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk8; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_bonus.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_goldenballoon.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_door.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_door.s") + +void obj_init_ttdoor(Object *obj, LevelObjectEntry_TTDoor *entry) { + f32 temp_f0; + Object_64_8003C1E0 *obj64; + f32 phi_f0; + + obj->unk3A = 0; + obj64 = obj->unk64; + obj->y_rotation = entry->unk8 << 6 << 4; + obj64->unkF = entry->unkE; + obj64->unk13 = entry->unkB; + obj64->unk0 = obj->y_position; + obj64->unk8 = 0; + obj64->unk12 = entry->unkA; + obj->unk78 = obj->y_rotation; + obj->unk7C.word = (entry->unk9 & 0x3F) << 0xA; + phi_f0 = entry->unkC & 0xFF; + if (phi_f0 < 10) { + phi_f0 = 10; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->unk4C->unk14 = 0x21; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_ttdoor.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_trigger.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_trigger.s") + +void obj_init_bridge_whaleramp(Object *obj, LevelObjectEntry_Bridge_WhaleRamp *entry) { + Object_64 *temp = obj->unk64; + obj->unk3A = entry->unk8; + obj->y_rotation = entry->unk9 << 6 << 4; + temp->unk0_a.unk0 = obj->y_position; + obj->unk4C->unk14 = 0x21; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + temp->unk4 = 0; + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s") + +void obj_init_rampswitch(Object *obj, LevelObjectEntry_RampSwitch *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + obj->unk78 = entry->unk8; +} + +void obj_loop_rampswitch(Object *obj, s32 speed) { + if (obj->unk4C->unk13 < 0x2D) { + func_8001E344(obj->unk78); + } + obj->unk4C->unk13 = (u8)0xFF; +} + +void obj_init_seamonster(Object *obj, LevelObjectEntry_SeaMonster *entry) { +} + +void obj_loop_seamonster(Object *obj, s32 speed) { +} + +void obj_init_fogchanger(Object *obj, LevelObjectEntry_FogChanger *entry) { + f32 temp_f0; + temp_f0 = entry->unk8 * 8.0f; + temp_f0 = temp_f0 * temp_f0; + obj->unk78f = temp_f0; +} + +void obj_init_skycontrol(Object *obj, LevelObjectEntry_SkyControl *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk9; + obj->unk78 = entry->unk8; + obj->unk7C.word = entry->unk9; +} + +void obj_loop_skycontrol(Object *obj, s32 speed) { + if (obj->unk4C->unk13 < obj->unk7C.word) { + func_80028044(obj->unk78); + } +} + +void obj_init_ainode(Object *obj, LevelObjectEntry_AiNode *entry) { + if (entry->unk9 == 0xFF) { + entry->unk9 = func_8001C48C(obj) & 0xFF; + } + func_8001D1BC(entry->unk9); + func_8001D1AC(); +} + +void obj_loop_ainode(Object *obj, s32 speed) { +} + +void obj_init_treasuresucker(Object *obj, LevelObjectEntry_TreasureSucker *entry) { + obj->unk18 = 0x78; + obj->unk78 = (entry->unk8 - 1) & 3; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s") + +void obj_init_flycoin(Object *obj, LevelObjectEntry_FlyCoin *entry) { +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_flycoin.s") + +void obj_init_coincreator(Object *obj, LevelObjectEntry_BananaCreator *entry) { + obj->unk18 = 0x64; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_coincreator.s") + +void obj_init_coin(Object *obj, LevelObjectEntry_Banana *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk7C.half.upper = 0x14; + obj->unk7C.half.lower = 0x10; + if (get_filtered_cheats() & CHEAT_DISABLE_BANANAS) { + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_coin.s") + +void obj_init_silvercoin_adv2(Object *obj, LevelObjectEntry_SilverCoinAdv2 *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk78 = 3; + obj->unk7C.word = 16; + if (!is_in_tracks_mode()) { + if (func_8000E1DC() && is_in_adventure_two()) { + obj->unk78 = 0; + } else { + obj->unk78 = 3; + } + } + if (obj->unk78 == 3) { + obj->unk6 |= 0x600; + gParticlePtrList_addObject(obj); + } +} + +void obj_init_silvercoin(Object *obj, LevelObjectEntry_SilverCoin *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk78 = 3; + obj->unk7C.word = 0; + if (!is_in_tracks_mode()) { + if (func_8000E1DC() && !is_in_adventure_two()) { + obj->unk78 = 0; + } else { + obj->unk78 = 3; + } + } + if (obj->unk78 == 3) { + obj->unk6 |= 0x600; + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_silvercoin.s") + +void obj_init_worldkey(Object *obj, LevelObjectEntry_WorldKey *entry) { + Settings *settings; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + entry->unk8 &= 0xF; + obj->unk78 = entry->unk8; + settings = get_settings(); + if (!is_in_tracks_mode() && !(settings->keys & (1 << obj->unk78))) { + return; + } + gParticlePtrList_addObject(obj); +} + +/** + * Rotates the key and checks to see if the player grabbed it. + */ +void obj_loop_worldkey(Object *worldKeyObj, s32 speed) { + Settings *settings; + Object *playerObj; + + // Check if the player is near the key + // "worldKeyObj->unk4C->unk13" is the player's distance from the key (Up to 255). + if (worldKeyObj->unk4C->unk13 < WORLD_KEY_GRAB_CHECK_RADIUS) { + // "worldKeyObj->unk4C->unk0" is only set when the player is within 255 units of + // the key object, otherwise it is NULL. + playerObj = worldKeyObj->unk4C->unk0; + if (playerObj != NULL) { + if (playerObj->header->behaviorId == 1) { // Is the player a racer? + Object_64_8003DF08 *obj64 = playerObj->unk64; + if (obj64->unk0 != -1) { + // Player has grabbed the key! + play_sound(SOUND_WORLD_KEY_GRAB); + settings = get_settings(); + settings->keys |= 1 << worldKeyObj->unk78; // Set key flag + gParticlePtrList_addObject(worldKeyObj); // Makes the key unload. + } + } + } + } + + // Rotate world key + worldKeyObj->y_rotation += speed * 256; +} + +typedef struct Object_64_8003DFCC { + f32 unk0; + s16 unk4; + s8 unk6[0x2]; +} Object_64_8003DFCC; + +void obj_init_weaponballoon(Object *obj, LevelObjectEntry_WeaponBalloon *entry) { + s32 cheats; + Object_64_8003DFCC *obj64; + f32 scalef; + + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 4; + obj->unk4C->unk10 = 0x14; + + cheats = get_filtered_cheats(); + + if (cheats & CHEAT_ALL_BALLOONS_ARE_BLUE) { + entry->balloonType = BALLOON_TYPE_BOOST; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RED) { + entry->balloonType = BALLOON_TYPE_MISSILE; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_GREEN) { + entry->balloonType = BALLOON_TYPE_TRAP; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_YELLOW) { + entry->balloonType = BALLOON_TYPE_SHIELD; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RAINBOW) { + entry->balloonType = BALLOON_TYPE_MAGNET; + } + + // I guess unk8 is unused? + if (entry->unk8 >= 6) { + entry->unk8 = 0; + } + + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } + + obj->unk3A = entry->balloonType; + obj->unk78 = obj->unk3A; + + scalef = entry->scale & 0xFF; + if (scalef < 10) { + scalef = 10; + } + scalef /= 64; + + obj64 = (Object_64_8003DFCC*)obj->unk64; + + obj->scale = obj->header->scale * scalef; + obj64->unk0 = obj->scale; + obj64->unk4 = 0; + obj->unk7C.word = 0; + + if (get_filtered_cheats() & CHEAT_DISABLE_WEAPONS) { + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s") + +void obj_init_wballoonpop(Object *obj, LevelObjectEntry_WBalloonPop *entry) { +} + +void obj_loop_wballoonpop(Object *obj, s32 speed) { +} + +void obj_init_weapon(Object *obj, LevelObjectEntry_Weapon *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x18; + obj->unk4C->unk12 = 0; + obj->unk78 = func_8000C8B4(0x1E0); + obj->unk7C.word = 0; +} + +void obj_loop_weapon(Object *obj, s32 speed) { + Object_64 *obj64 = obj->unk64; + switch (obj64->unk18) { + case 0: + case 1: + func_8003E694(obj, speed); + break; + case 2: + case 3: + case 10: + case 11: + func_8003F2E8(obj, speed); + break; + } + return; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E694.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EC14.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EDD8.s") + +void func_8003F0D0(void) { + D_8011D4DC = 0; +} + +void func_8003F0DC(void) { + D_8011D4DC--; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F0F8.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F2E8.s") + +#ifdef NON_EQUIVALENT +// Regalloc issues +void func_8003FC44(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6) { + Object *someObj; + unk8003FC44 sp24; + + sp24.unk4 = (s32)arg1 + 0x24; + sp24.unk1 = 0xA; + sp24.unk2 = arg0; + sp24.unk0 = arg3; + sp24.unk7 = arg6; + sp24.unk6 = arg2; + someObj = func_8000EA54(&sp24, 1); + if (someObj != NULL) { + someObj->scale *= 3.5 * arg5; + someObj->unk3C_a.unk3C = NULL; + someObj->x_velocity = 0.0f; + someObj->y_velocity = 0.0f; + someObj->z_velocity = 0.0f; + } + if (arg4 != 0) { + func_80009558(arg4, arg0, arg1, arg2, 4, 0); + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FC44.s") +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_audio.s") + +void obj_init_audioline(Object *obj, LevelObjectEntry_AudioLine *entry) { + Object_64_8003FEF4 *obj64; + + obj64 = obj->unk64; + obj64->unk0 = entry->unk8; + obj64->unk2 = entry->unkA; + obj64->unkC = entry->unkC; + obj64->unkD = entry->unkD; + obj64->unk_union.unk8_word = 0; + obj64->unk4 = entry->unkE; + obj64->unk11 = entry->unk12; + obj64->unk10 = entry->unk11; + obj64->unkE = entry->unk9; + obj64->unkF = entry->unk10; + obj64->unk12 = entry->unk13; + func_800098A4(obj64->unk0, obj64->unk2, entry->common.x, entry->common.y, entry->common.z, + obj64->unkF, obj64->unkE, obj64->unk10, obj64->unk12, obj64->unk4, obj64->unk11, + obj64->unkC, obj64->unkD); + gParticlePtrList_addObject(obj); +} + +void obj_init_audioreverb(Object *obj, LevelObjectEntry_AudioReverb *entry) { + s32 temp; + Object_64_8004001C *obj64 = (Object_64_8004001C *)obj->unk64; + obj64->unk2 = entry->unk8; + temp = entry->unk9; + obj64->unk4 = temp & 0xFF; + obj64->unk5 = entry->unkA; + func_80009968(entry->common.x, entry->common.y, entry->common.z, obj64->unk2, obj64->unk4, obj64->unk5); + gParticlePtrList_addObject(obj); +} + +void obj_init_texscroll(Object *obj, LevelObjectEntry_TexScroll *entry, s32 arg2) { + Object_64_800400A4 *obj64; + LevelModel *levelModel; + s16 numberOfTexturesInLevel; + + obj64 = obj->unk64; + levelModel = func_8002C7C4(); + obj64->unk0 = entry->unk8; + if (obj64->unk0 < 0) { + obj64->unk0 = 0; + } + numberOfTexturesInLevel = levelModel->numberOfTextures; + if (obj64->unk0 >= numberOfTexturesInLevel) { + obj64->unk0 = numberOfTexturesInLevel - 1; + } + obj64->unk4 = (s16)entry->unkA; + obj64->unk6 = (s16)entry->unkB; + if (arg2 == 0) { + obj64->unk8 = 0; + obj64->unkA = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_texscroll.s") + +void obj_init_rgbalight(Object *obj, LevelObjectEntry_RgbaLight *entry, s32 arg2) { + obj->unk64 = func_80031CAC(obj, entry); +} + +void obj_init_buoy_pirateship(Object *obj, LevelObjectEntry_Buoy_PirateShip *entry, s32 arg2) { + obj->unk64 = func_800BE654(obj->unk2E, obj->x_position, obj->z_position); + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk4C->unk12 = 0; +} + +void obj_loop_buoy_pirateship(Object *obj, s32 speed) { + if (obj->unk64 != NULL) { + obj->y_position = func_800BEEB4(obj->unk64); + } + obj->unk18 += speed * 8; +} + +void obj_init_log(Object *obj, LevelObjectEntry_Log *entry, s32 arg2) { + f32 phi_f0; + obj->unk64 = func_800BE654(obj->unk2E, obj->x_position, obj->z_position); + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x1E; + phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->unk3A = entry->unk8; + obj->y_rotation = entry->unkA << 6 << 4; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_log.s") + +void obj_init_weather(Object *obj, LevelObjectEntry_Weather *entry) { + f32 temp = entry->unk8; + temp *= temp; + obj->unk78f = temp; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_weather.s") + +void obj_init_lensflare(Object *obj, LevelObjectEntry_LensFlare *entry) { + func_800AC8A8(obj); +} + +void obj_init_lensflareswitch(Object *obj, LevelObjectEntry_LensFlareSwitch *entry, s32 arg2) { + func_800ACF60(obj); + obj->scale = entry->unk8; + obj->scale /= 40.0f; +} + +void obj_init_wavegenerator(Object *obj, LevelObjectEntry_WaveGenerator *entry, s32 arg2) { + func_800BF524(obj); //waves.c +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_butterfly.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_butterfly.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_midifade.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_midifadepoint.s") + +void obj_init_midichset(Object *obj, LevelObjectEntry_Midichset *entry) { + unk80042014_arg0_64 *temp = obj->unk64; + temp->unk0 = entry->unk8; + temp->unk2 = entry->unkA; + temp->unk3 = entry->unkB; +} + +void obj_init_bubbler(Object *obj, LevelObjectEntry_Bubbler *entry) { + func_800AF134(obj->unk6C, entry->unk9, entry->unk8, 0, 0, 0); + obj->unk78 = entry->unkA; +} + +void obj_loop_bubbler(Object *obj, s32 speed) { + if (obj->unk78 >= get_random_number_from_range(0, 0x400)) { + obj->unk74 = 1; + } else { + obj->unk74 = 0; + } + if (get_number_of_active_players() < 2) { + func_800AFC3C(obj, speed); + } +} + +void obj_init_boost(Object *obj, LevelObjectEntry_Boost *entry) { + obj->unk64 = (s32)get_misc_asset(0x14) + (entry->unk8[0] << 7); + obj->unk3C_a.unk3C = NULL; +} + +void obj_init_unknown94(Object *obj, LevelObjectEntry_Unknown94 *entry, s32 arg2) { +} + +void obj_loop_unknown94(Object *obj, s32 speed) { +} + +void obj_init_rangetrigger(Object *obj, LevelObjectEntry_RangeTrigger *entry) { +} + +void obj_loop_rangetrigger(Object *obj, s32 speed) { + s32 temp; + Object_3C_80042178 *obj3C; + unk80042178 sp20; + + obj3C = obj->unk3C_a.unk3C; + if (func_80016DE8(obj->x_position, 0, obj->z_position, (f32)obj3C->unk8, 1, &sp20) > 0) { + obj->unk74 = obj3C->unkA; + } else { + obj->unk74 = 0; + } + func_800AFC3C(obj, speed); +} + +void obj_init_frog(Object *obj, LevelObjectEntry_Frog *entry) { + Object_64_80042210 *obj64; + + obj64 = (Object_64_80042210 *)obj->unk64; + obj64->unk15 = entry->unkA; + obj64->unk0 = obj->x_position; + obj64->unk4 = obj->y_position; + obj64->unk8 = obj->z_position; + obj64->unkC = entry->unk8; + obj64->unk10 = obj64->unkC * obj64->unkC; + obj64->unk14 = 0; + obj64->unk20 = obj->x_position; + obj64->unk24 = obj->z_position; + obj64->unk19 = 0; + obj64->unk30 = 1.0f; + + if (obj64->unk15) { + obj->unk3A = 1; + /** + * Don't spawn the chicken frog if drumstick is already unlocked, or + * if the player hasn't completed the trophy races yet. + */ + if (is_drumstick_unlocked() || (get_settings()->trophies & 0xFF) != 0xFF) { + gParticlePtrList_addObject(obj); + } + } else { + obj->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_frog.s") + +void obj_loop_pigrocketeer(Object *obj, s32 speed) { + Object *someObj; + Object_64_80042998 *obj64; + + func_8001F460(obj, speed, obj); + someObj = func_8000BF44(-1); + + if (someObj != NULL) { + obj64 = someObj->unk64; + someObj->unk78 = 0; + if (obj64 != 0) { + obj64->unk72 += speed; + obj64->unk70 = 2; + obj64->unk74 = 1.0f; + func_8000B750(obj, -1, 2, 1, 1); + } + } +} + +void obj_init_levelname(Object *obj, LevelObjectEntry_LevelName *entry) { + obj->unk78f = entry->unk9 * 8.0f; + obj->unk78f *= obj->unk78f; + obj->unk7C.half.upper = entry->unk8; + obj->unk7C.half.lower = 0; + if (is_in_tracks_mode()) { + gParticlePtrList_addObject(obj); + } + func_800C56D0(4); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_levelname.s") + +void obj_loop_wizghosts(Object *obj, s32 speed) { + func_8001F460(obj, speed, obj); + obj->unk18 = (obj->unk18 + (speed * 8)) & 0xFF; +} + diff --git a/src/object_functions.h b/src/object_functions.h new file mode 100644 index 00000000..217db4b7 --- /dev/null +++ b/src/object_functions.h @@ -0,0 +1,509 @@ +#ifndef _OBJECT_FUNCTIONS_H_ +#define _OBJECT_FUNCTIONS_H_ + +#include "types.h" +#include "structs.h" +#include "level_object_entries.h" + +#define WORLD_KEY_GRAB_CHECK_RADIUS 50 +#define SOUND_WORLD_KEY_GRAB 54 + +typedef struct Object78_80033DD0 { + s32 *unk0; + s16 unk4; + s16 unk6; +} Object78_80033DD0; + +typedef struct unk80034B4C { + u8 pad0[0x18]; + s16 unk18; + u8 pad1A[0x5E]; + s32 unk78; +} unk80034B4C; + +typedef struct Object_3C_80034B74 { + u8 pad0[0x8]; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; +} Object_3C_80034B74; + +typedef struct Object_64_80034B74 { + u8 pad0[0x1FE]; + u8 unk1FE; + u8 unk1FF; +} Object_64_80034B74; + +typedef struct unk8003564C { + s8 unk0; + s8 unk1; + s16 unk2; + s16 unk4; + s16 unk6; +} unk8003564C; + +typedef struct Object_64_8003564C { + u8 pad0[4]; + Object *unk4; +} Object_64_8003564C; + +typedef struct unk80035E20 { + u8 pad0[0x40]; + s32 unk40; + u8 pad44[0x34]; + s32 unk78; + s32 unk7C; +} unk80035E20; + +typedef struct Object_64_80035E34 { + u8 pad0[0x1D6]; + s8 unk1D6; +} Object_64_80035E34; + +typedef struct Object_64_80035F6C { + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; + s32 unk18; + s32 unk1C; + s16 *unk20; + u8 *unk24; +} Object_64_80035F6C; + +typedef struct Object_64_80035F6C_2 { + u8 pad0[3]; + s8 unk3; +} Object_64_80035F6C_2; + +typedef struct unk80037578 { + u8 pad0[0x78]; + s32 unk78; + s32 unk7C; +} unk80037578; + +typedef struct unk80037624 { + u8 pad0[6]; + s16 unk6; +} unk80037624; + +/* Size: 12 bytes */ +typedef struct LevelObjectEntry800376E0 { + LevelObjectEntryCommon common; + s8 unk8; + s8 unk9; + s8 unkA; +} LevelObjectEntry800376E0; + +typedef struct Object_64_800376E0 { + s16 segmentId; + s16 unk2; + s16 unk4; + s16 unk6; + s16 unk8; + s16 unkA; +} Object_64_800376E0; + +typedef struct unk80037D08_arg0_64 { + u8 pad0[0x2A]; + s16 unk2A; +} unk80037D08_arg0_64; + +typedef struct unk80037D08_arg0 { + u8 pad0[0x64]; + unk80037D08_arg0_64 *unk64; +} unk80037D08_arg0; + +// Not sure if Object_60 differs between objects yet. +typedef struct Object_60_800380F8 { + s32 unk0; + Object *unk4; + s32 pad8; + Object *unkC; +} Object_60_800380F8; + +typedef struct Object_64_8003827C { + u8 pad0[0x20]; + s32 unk20; + s16 unk24; + u8 pad28[0x12]; + s8 unk38; +} Object_64_8003827C; + +typedef struct Object_64_80038710 { + u8 pad0[0x30]; + s8 unk30; + u8 pad31[0x13]; + s8 unk44; +} Object_64_80038710; + +typedef struct Object_64_800387CC { + u8 pad0[0x148]; + Object *unk148; +} Object_64_800387CC; + +typedef struct Object_64_800388D4 { + s16 unk0; +} Object_64_800388D4; + +typedef struct unk80038B74 { + u8 pad0[8]; + s8 unk8; +} unk80038B74; + +typedef struct Object_3C_80038DC4 { + u8 pad0[8]; + s8 unk8; +} Object_3C_80038DC4; + +typedef struct Object_64_80038E3C { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + s32 unk10; + s8 unk14; +} Object_64_80038E3C; + +typedef struct unk80039160 { + u8 pad0[0x78]; + s32 unk78; +} unk80039160; + +typedef struct unk80039190 { + u16 unk0; + u8 pad2[0x76]; + s32 unk78; + s32 unk7C; +} unk80039190; + +typedef struct Object_64_8003AD34 { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + s32 unk10; + s8 unk14; +} Object_64_8003AD34; + +typedef struct Object_64_8003C1E0 { + f32 unk0; + u8 pad4[4]; + s32 unk8; + u8 padC[3]; + s8 unkF; + u8 pad10[2]; + u8 unk12; + u8 unk13; +} Object_64_8003C1E0; + +typedef struct unk8003CF18 { + u8 pad1A[0x78]; + f32 unk78; +} unk8003CF18; + +typedef struct unk8003D038 { + u8 pad0[0x18]; + s16 unk18; + u8 pad1A[0x5E]; + s32 unk78; +} unk8003D038; + +typedef struct unk8003D3EC { + u8 pad0[0x18]; + u16 unk18; +} unk8003D3EC; + +typedef struct Object_64_8003DF08 { + s16 unk0; +} Object_64_8003DF08; + +typedef struct unk8003FC44 { + s8 unk0; + s8 unk1; + s16 unk2; + s16 unk4; + s16 unk6; + s8 unk7; +} unk8003FC44; + + +typedef struct Object_64_8003FEF4 { + u8 unk0; + u8 pad1; + u16 unk2; + u16 unk4; + u16 unk6; + union { + struct { + u8 unk8; + u8 unk9; + u8 unkA; + u8 padB; + } unk_struct; + s32 unk8_word; + } unk_union; + u8 unkC; + u8 unkD; + u8 unkE; + u8 unkF; + u8 unk10; + u8 unk11; + u8 unk12; +} Object_64_8003FEF4; + +typedef struct LevelObjectEntry8003FEF4 { + LevelObjectEntryCommon common; + u8 unk8; + u8 unk9; + u16 unkA; + u8 unkC; + u8 unkD; + u16 unkE; + u8 unk10; + u8 unk11; + u8 unk12; + u8 unk13; +} LevelObjectEntry8003FEF4; + +typedef struct LevelObjectEntry8004001C { + LevelObjectEntryCommon common; + u8 unk8; + u8 unk9; + u8 unkA; +} LevelObjectEntry8004001C; + +typedef struct Object_64_8004001C { + u16 pad0; + s16 unk2; + u8 unk4; + u8 unk5; +} Object_64_8004001C; + +typedef struct Object_64_800400A4 { + s16 unk0; + s16 pad2; + s16 unk4; + s16 unk6; + s16 unk8; + s16 unkA; +} Object_64_800400A4; + +typedef struct unk80040800 { + u8 pad0[0x78]; + f32 unk78; +} unk80040800; + +typedef struct unk80042014_arg0_64 { + u16 unk0; + u8 unk2; + u8 unk3; +} unk80042014_arg0_64; + +typedef struct unk80042014_arg0 { + u8 pad0[0x64]; + unk80042014_arg0_64 *unk64; +} unk80042014_arg0; + +typedef struct unk80042014_arg1 { + u8 pad0[8]; + u16 unk8; + u8 unkA; + u8 unkB; +} unk80042014_arg1; + +typedef struct unk8004210C { + u8 pad0[0x3C]; + s32 unk3C; + u8 pad40[0x24]; + s32 unk64; +} unk8004210C; + +typedef struct Object_3C_80042178 { + u8 pad0[8]; + u16 unk8; + u16 unkA; +} Object_3C_80042178; + +typedef struct Object_64_80042210 { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + f32 unk10; + u8 unk14; + u8 unk15; + u8 pad16[3]; + u8 unk19; + u8 pad1A[6]; + f32 unk20; + f32 unk24; + u8 pad28[8]; + f32 unk30; +} Object_64_80042210; + +typedef struct Object_64_80042998 { + u8 pad0[0x70]; + u8 unk70; + u8 pad71; + u8 unk72; + u8 pad73; + f32 unk74; +} Object_64_80042998; + +typedef struct unk80042A1C { + u8 pad0[0x78]; + f32 unk78; + s16 unk7C; + s16 unk7E; +} unk80042A1C; + +typedef struct unk80042CD0 { + u8 pad0[0x18]; + s16 unk18; +} unk80042CD0; + +// Unsure about the signed/unsigned with these arrays. +extern u16 D_800DC970[4]; +extern u16 D_800DC978[4]; +extern u16 D_800DC980[20]; +extern u16 D_800DC9A8[20]; +extern u16 D_800DC9D0[64]; +extern s8 D_800DCA50[8]; +extern u8 D_800DCA58[9]; +extern s8 D_800DCA64[9]; +extern s8 D_800DCA70[10]; +extern s32 D_800DCA7C[3]; +extern s32 D_800DCA88[3]; +extern s8 D_800DCA94[8]; +extern s8 D_800DCA9C[12]; +extern u16 D_800DCAA8[64]; +extern u16 D_800DCB28[20]; +extern u32 osTvType; + +f32 func_800707C4(s16); // No idea where it's located +f32 func_800707F8(s16); // No idea where it's located +s32 get_random_number_from_range(s32, s32); // Non Matching src/unknown_070110.c +s32 func_8007066C(s32, s32); // Non Matching src/unknown_070110.c + +void obj_init_fireball_octoweapon(Object *obj, LevelObjectEntry_Fireball_Octoweapon *entry); +void obj_init_lasergun(Object *obj, LevelObjectEntry_Lasergun *entry); +void obj_init_laserbolt(Object *obj, LevelObjectEntry_Laserbolt *entry); +void obj_init_torch_mist(Object *obj, LevelObjectEntry_Torch_Mist *entry); +void obj_loop_torch_mist(Object *obj, s32 speed); +void obj_init_effectbox(Object *obj, LevelObjectEntry_EffectBox *entry); +void obj_init_trophycab(Object *obj, LevelObjectEntry_TrophyCab *entry); +void obj_init_collectegg(Object *obj, LevelObjectEntry_CollectEgg *entry); +void obj_init_eggcreator(Object *obj, LevelObjectEntry_EggCreator *entry); +void obj_loop_eggcreator(Object *obj, s32 speed); +void obj_init_lighthouse_rocketsignpost(Object *obj, LevelObjectEntry_Lighthouse_RocketSignpost *entry); +void obj_loop_rocketsignpost(Object *obj, s32 speed); +void obj_init_airzippers_waterzippers(Object *obj, LevelObjectEntry_AirZippers_WaterZippers *entry); +void obj_init_unknown58(Object *obj, LevelObjectEntry_Unknown58 *entry); +void obj_loop_unknown58(Object *obj, s32 speed); +void obj_init_characterflag(Object *obj, LevelObjectEntry_CharacterFlag *entry); +void obj_loop_characterflag(Object *obj, s32 speed); +void obj_init_stopwatchman(Object *obj, LevelObjectEntry_StopWatchMan *entry); +void func_80036BCC(u16 arg0, s32 arg1); +void obj_init_lavaspurt(Object *obj, LevelObjectEntry_LavaSpurt *entry); +void obj_init_posarrow(Object *obj, LevelObjectEntry_PosArrow *entry); +void obj_init_animator(Object *obj, LevelObjectEntry_Animator *entry, s32 arg2); +void obj_loop_animobject(Object *obj, s32 speed); +void obj_loop_dooropener(Object *obj, s32 speed); +void obj_init_overridepos(Object *obj, LevelObjectEntry_OverridePos *entry); +void func_80037D60(s32 arg0, s32 arg1); +void obj_init_wizpigship(Object *obj, LevelObjectEntry_WizpigShip *entry); +void obj_init_hittester(Object *obj, LevelObjectEntry_HitTester *entry); +void obj_loop_hittester(Object *obj, s32 speed); +void obj_init_dynamic_lighting_object(Object *obj, LevelObjectEntry_DynamicLightingObject *entry); +void obj_init_unknown96(Object *obj, LevelObjectEntry_Unknown96 *entry); +void obj_init_snowball(Object *obj, LevelObjectEntry_Snowball *entry); +void func_80038330(s32 arg0, s32 arg1); +void obj_loop_animcamera(Object *obj, s32 speed); +void func_800387C0(s32 arg0, s32 arg1); +void obj_loop_animcar(Object *obj, s32 speed); +void obj_init_infopoint(Object *obj, LevelObjectEntry_InfoPoint *entry); +void obj_loop_infopoint(Object *obj, s32 speed); +void obj_init_smoke(Object *obj, LevelObjectEntry_Smoke *entry); +void obj_loop_smoke(Object *obj, s32 speed); +void obj_init_unknown25(Object *obj, LevelObjectEntry_Unknown25 *entry); +void obj_loop_unknown25(Object *obj, s32 speed); +void obj_init_wardensmoke(Object *obj, LevelObjectEntry_WardenSmoke *entry); +void obj_loop_wardensmoke(Object *obj, s32 speed); +void obj_init_teleport(Object *obj, LevelObjectEntry_Teleport *entry); +void obj_loop_teleport(Object *obj, s32 speed); +void obj_init_exit(Object *obj, LevelObjectEntry_Exit *entry); +void obj_init_cameracontrol(Object *obj, LevelObjectEntry_CameraControl *entry); +void obj_loop_cameracontrol(Object *obj, s32 speed); +void obj_init_setuppoint(Object *obj, LevelObjectEntry_SetupPoint *entry); +void obj_loop_setuppoint(Object *obj, s32 speed); +void obj_init_dino_whale(Object *obj, LevelObjectEntry_Dino_Whale *entry); +void obj_loop_dino_whale(Object *obj, s32 speed); +void obj_init_parkwarden(Object *obj, LevelObjectEntry_Parkwarden *entry); +void func_80039320(s16 arg0); +void func_8003AC3C(u16 arg0, s32 arg1); +void obj_loop_gbparkwarden(Object *obj, s32 speed); +f32 func_8003ACAC(void); +void obj_init_checkpoint(Object *obj, LevelObjectEntry_Checkpoint *entry, s32 arg2); +void obj_loop_checkpoint(Object *obj, s32 speed); +void obj_init_modechange(Object *obj, LevelObjectEntry_ModeChange *entry); +void obj_init_bonus(Object *obj, LevelObjectEntry_Bonus *entry); +void obj_init_ttdoor(Object *obj, LevelObjectEntry_TTDoor *entry); +void obj_init_bridge_whaleramp(Object *obj, LevelObjectEntry_Bridge_WhaleRamp *entry); +void obj_init_rampswitch(Object *obj, LevelObjectEntry_RampSwitch *entry); +void obj_loop_rampswitch(Object *obj, s32 speed); +void obj_init_seamonster(Object *obj, LevelObjectEntry_SeaMonster *entry); +void obj_loop_seamonster(Object *obj, s32 speed); +void obj_init_fogchanger(Object *obj, LevelObjectEntry_FogChanger *entry); +void obj_init_skycontrol(Object *obj, LevelObjectEntry_SkyControl *entry); +void obj_loop_skycontrol(Object *obj, s32 speed); +void obj_init_ainode(Object *obj, LevelObjectEntry_AiNode *entry); +void obj_loop_ainode(Object *obj, s32 speed); +void obj_init_treasuresucker(Object *obj, LevelObjectEntry_TreasureSucker *entry); +void obj_init_flycoin(Object *obj, LevelObjectEntry_FlyCoin *entry); +void obj_init_coincreator(Object *obj, LevelObjectEntry_BananaCreator *entry); +void obj_init_coin(Object *obj, LevelObjectEntry_Banana *entry); +void obj_init_silvercoin_adv2(Object *obj, LevelObjectEntry_SilverCoinAdv2 *entry); +void obj_init_silvercoin(Object *obj, LevelObjectEntry_SilverCoin *entry); +void obj_init_worldkey(Object *obj, LevelObjectEntry_WorldKey *entry); +void obj_loop_worldkey(Object *worldKeyObj, s32 speed); +void obj_init_wballoonpop(Object *obj, LevelObjectEntry_WBalloonPop *entry); +void obj_loop_wballoonpop(Object *obj, s32 speed); +void obj_init_weapon(Object *obj, LevelObjectEntry_Weapon *entry); +void obj_loop_weapon(Object *obj, s32 speed); +void func_8003F0D0(void); +void func_8003F0DC(void); +void obj_init_audioline(Object *obj, LevelObjectEntry_AudioLine *entry); +void obj_init_audioreverb(Object *obj, LevelObjectEntry_AudioReverb *entry); +void obj_init_texscroll(Object *obj, LevelObjectEntry_TexScroll *entry, s32 arg2); +void obj_init_rgbalight(Object *obj, LevelObjectEntry_RgbaLight *entry, s32 arg2); +void obj_init_buoy_pirateship(Object *obj, LevelObjectEntry_Buoy_PirateShip *entry, s32 arg2); +void obj_loop_buoy_pirateship(Object *obj, s32 speed); +void obj_init_log(Object *obj, LevelObjectEntry_Log *entry, s32 arg2); +void obj_init_wavegenerator(Object *obj, LevelObjectEntry_WaveGenerator *entry, s32 arg2); +void obj_init_midichset(Object *obj, LevelObjectEntry_Midichset *entry); +void obj_init_bubbler(Object *obj, LevelObjectEntry_Bubbler *entry); +void obj_loop_bubbler(Object *obj, s32 speed); +void obj_init_boost(Object *obj, LevelObjectEntry_Boost *entry); +void obj_init_unknown94(Object *obj, LevelObjectEntry_Unknown94 *entry, s32 arg2); +void obj_loop_unknown94(Object *obj, s32 speed); +void obj_init_rangetrigger(Object *obj, LevelObjectEntry_RangeTrigger *entry); +void obj_loop_rangetrigger(Object *obj, s32 speed); +void obj_init_frog(Object *obj, LevelObjectEntry_Frog *entry); +void obj_loop_pigrocketeer(Object *obj, s32 speed); +void obj_init_levelname(Object *obj, LevelObjectEntry_LevelName *entry); +void obj_loop_wizghosts(Object *obj, s32 speed); + +//Non Matching +void obj_loop_lavaspurt(Object *obj, s32 speed); +void obj_loop_animator(Object *obj, s32 speed); +void obj_loop_vehicleanim(Object *obj, s32 speed); +void obj_loop_snowball(Object *obj, s32 speed); +void obj_loop_goldenballoon(Object *obj, s32 speed); + +#endif diff --git a/src/object_models.c b/src/object_models.c index 8b1b46d8..1daa385f 100644 --- a/src/object_models.c +++ b/src/object_models.c @@ -6,7 +6,7 @@ #include "memory.h" #include "asset_sections.h" #include "unknown_0255E0.h" -#include "unknown_043920.h" +#include "racer.h" /************ .data ************/ diff --git a/src/particles.c b/src/particles.c index ceae9e6e..7abc74d1 100644 --- a/src/particles.c +++ b/src/particles.c @@ -61,9 +61,9 @@ s32 gParticlesAssetTableCount = 0; s32 *gParticlesAssets = NULL; unk800E2CF0 **gParticlesAssetTable = NULL; -s32 gParticleBehaviorsAssetTableCount = 0; -s32 *gParticleBehaviorsAssets = NULL; -ParticleBehavior **gParticleBehaviorsAssetTable = NULL; +s32 gParticleBehavioursAssetTableCount = 0; +s32 *gParticleBehavioursAssets = NULL; +ParticleBehavior **gParticleBehavioursAssetTable = NULL; s32 D_800E2D00[2] = { 0, 0 }; // Are these just Triangles? @@ -261,13 +261,13 @@ void func_800AE490(void) { free_from_memory_pool(gParticlesAssetTable); gParticlesAssetTable = NULL; } - if (gParticleBehaviorsAssets != NULL) { - free_from_memory_pool(gParticleBehaviorsAssets); - gParticleBehaviorsAssets = NULL; + if (gParticleBehavioursAssets != NULL) { + free_from_memory_pool(gParticleBehavioursAssets); + gParticleBehavioursAssets = NULL; } - if (gParticleBehaviorsAssetTable != NULL) { - free_from_memory_pool(gParticleBehaviorsAssetTable); - gParticleBehaviorsAssetTable = NULL; + if (gParticleBehavioursAssetTable != NULL) { + free_from_memory_pool(gParticleBehavioursAssetTable); + gParticleBehavioursAssetTable = NULL; } } #ifdef NON_EQUIVALENT @@ -283,14 +283,14 @@ void init_particle_assets(void) { for (i = 0; i < gParticlesAssetTableCount; i++) { gParticlesAssetTable[i] = (u8 *)gParticlesAssets + (s32)gParticlesAssetTable[i]; } - gParticleBehaviorsAssetTable = load_asset_section_from_rom(ASSET_PARTICLE_BEHAVIORS_TABLE); - for (gParticleBehaviorsAssetTableCount = -1; (s32)gParticleBehaviorsAssetTable[gParticleBehaviorsAssetTableCount + 1] != -1; gParticleBehaviorsAssetTableCount++) { + gParticleBehavioursAssetTable = load_asset_section_from_rom(ASSET_PARTICLE_BEHAVIORS_TABLE); + for (gParticleBehavioursAssetTableCount = -1; (s32)gParticleBehavioursAssetTable[gParticleBehavioursAssetTableCount + 1] != -1; gParticleBehavioursAssetTableCount++) { } - gParticleBehaviorsAssets = load_asset_section_from_rom(ASSET_PARTICLE_BEHAVIORS); - for (i = 0; i < gParticleBehaviorsAssetTableCount; i++) { - gParticleBehaviorsAssetTable[i] = (u8 *)gParticleBehaviorsAssets + (s32)gParticleBehaviorsAssetTable[i]; - if ((s32)gParticleBehaviorsAssetTable[i]->unk9C != -1) { - gParticleBehaviorsAssetTable[i]->unk9C = get_misc_asset(gParticleBehaviorsAssetTable[i]->unk9C); + gParticleBehavioursAssets = load_asset_section_from_rom(ASSET_PARTICLE_BEHAVIORS); + for (i = 0; i < gParticleBehavioursAssetTableCount; i++) { + gParticleBehavioursAssetTable[i] = (u8 *)gParticleBehavioursAssets + (s32)gParticleBehavioursAssetTable[i]; + if ((s32)gParticleBehavioursAssetTable[i]->unk9C != -1) { + gParticleBehavioursAssetTable[i]->unk9C = get_misc_asset(gParticleBehavioursAssetTable[i]->unk9C); } } } @@ -456,10 +456,10 @@ void func_800AF134(unk800B2260 *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s1 if (arg2 >= gParticlesAssetTableCount) { arg2 = 0; } - if (arg1 >= gParticleBehaviorsAssetTableCount) { + if (arg1 >= gParticleBehavioursAssetTableCount) { arg1 = 0; } - temp = gParticleBehaviorsAssetTable[arg1]; + temp = gParticleBehavioursAssetTable[arg1]; if ((arg0->unk8 != arg2) || (temp != arg0->unk0)) { func_800B2260(arg0); func_800AF29C(arg0, arg1, arg2, arg3, arg4, arg5); @@ -469,8 +469,8 @@ void func_800AF134(unk800B2260 *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s1 void func_800AF1E0(unk800AF29C *arg0, s32 arg1, s32 arg2) { ParticleBehavior *temp_v0; - if (arg1 < gParticleBehaviorsAssetTableCount) { - temp_v0 = (ParticleBehavior *)gParticleBehaviorsAssetTable[arg1]; + if (arg1 < gParticleBehavioursAssetTableCount) { + temp_v0 = (ParticleBehavior *)gParticleBehavioursAssetTable[arg1]; func_800AF29C(arg0, arg1, arg2, temp_v0->unk4, temp_v0->unk8, temp_v0->unkC); } } @@ -480,7 +480,7 @@ void func_800AF29C(unk800AF29C *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s1 s32 temp_v0_2; s32 flags; - temp_v1 = gParticleBehaviorsAssetTable[arg1]; + temp_v1 = gParticleBehavioursAssetTable[arg1]; arg0->unk8 = arg2; arg0->unk18 = arg3; arg0->unk0 = temp_v1; diff --git a/src/printf.c b/src/printf.c index 53bc8e8f..090be582 100644 --- a/src/printf.c +++ b/src/printf.c @@ -124,14 +124,14 @@ GLOBAL_ASM("asm/non_matchings/printf/print_debug_strings.s") /** * Set the colour of the current debug text. */ -void set_render_printf_color(u8 red, u8 green, u8 blue, u8 alpha) { +void set_render_printf_colour(u8 red, u8 green, u8 blue, u8 alpha) { RENDER_PRINTF_CMD_SET_COLOR(red, green, blue, alpha) } /** * Set the background colour of the current debug text. */ -void set_render_printf_background_color(u8 red, u8 green, u8 blue, u8 alpha) { +void set_render_printf_background_colour(u8 red, u8 green, u8 blue, u8 alpha) { RENDER_PRINTF_CMD_SET_BACKGROUND_COLOR(red, green, blue, alpha) } diff --git a/src/printf.h b/src/printf.h index be90e947..582e83a1 100644 --- a/src/printf.h +++ b/src/printf.h @@ -34,8 +34,8 @@ void func_800B4A08(s32 arg0); void func_800B5E88(void); -void set_render_printf_color(u8 red, u8 green, u8 blue, u8 alpha); -void set_render_printf_background_color(u8 red, u8 green, u8 blue, u8 alpha); +void set_render_printf_colour(u8 red, u8 green, u8 blue, u8 alpha); +void set_render_printf_background_colour(u8 red, u8 green, u8 blue, u8 alpha); void set_render_printf_position(u16 xpos, u16 ypos); // Non Matching diff --git a/src/unknown_043920.c b/src/racer.c similarity index 85% rename from src/unknown_043920.c rename to src/racer.c index ef9c0fa9..d0cd090a 100644 --- a/src/unknown_043920.c +++ b/src/racer.c @@ -1,7 +1,7 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80042D20 */ -#include "unknown_043920.h" +#include "racer.h" #include "memory.h" #include "menu.h" #include "video.h" @@ -10,18 +10,18 @@ #include "macros.h" #include "structs.h" #include "asset_sections.h" -#include "controller_pak.h" +#include "save_data.h" #include "unknown_008C40.h" #include "unknown_00BC20.h" #include "audio.h" -#include "unknown_0348C0.h" -#include "unknown_06B2B0.h" +#include "object_functions.h" +#include "game.h" #define MAX_NUMBER_OF_GHOST_NODES 360 /************ .data ************/ -s32 gFunc8003B4BCLength = 0x310; +s32 gObjLoopGoldenBalloonLength = 0x310; s16 D_800DCB54 = 0; s32 D_800DCB58 = 0; // Currently unknown, might be a different type. s32 D_800DCB5C = 0; // Currently unknown, might be a different type. @@ -110,8 +110,8 @@ s16 D_800DCDB0[16] = { 0x02FA, 0x02FE, 0x08F8, 0x03FD, }; -// Checksum count for func_8003B4BC -s32 gFunc8003B4BCChecksum = 42391; +// Checksum count for obj_loop_goldenballoon +s32 gObjLoopGoldenBalloonChecksum = 42391; s16 D_800DCDD4[4] = { 0, 0, 0x32, -1 @@ -194,8 +194,8 @@ s8 D_8011D5BC; /******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80042D20.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80043ECC.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80042D20.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80043ECC.s") typedef struct Object_64_80044170 { char unk0[0x2C]; @@ -293,15 +293,15 @@ s32 func_80044450(s32 arg0) { return get_random_number_from_range(0, 99) < arg0; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004447C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80045128.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800452A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80045C48.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80046524.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80048C7C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80048E64.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800494E0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80049794.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004447C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80045128.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800452A0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80045C48.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80046524.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80048C7C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80048E64.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800494E0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80049794.s") // Something Plane related. void func_8004C0A0(s32 arg0, Object *planeObj, Object_64_8004C0A0 *planeObj64) { @@ -387,9 +387,9 @@ void func_8004C140(Object *obj, Object_64_8004C140 *obj64) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004C2B0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004CC20.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004D590.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004C2B0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004CC20.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004D590.s") void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_64_8004D95C *obj64) { s16 sp26; @@ -421,8 +421,8 @@ void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_64_8004D95C *obj64) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004DAB0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004DE38.s") +GLOBAL_ASM("asm/non_matchings/racer/obj_init_racer.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004DE38.s") void func_8004F77C(unk8004F77C *arg0) { s32 temp; @@ -448,7 +448,7 @@ void func_8004F77C(unk8004F77C *arg0) { arg0->unk20A = (arg0->unk20A & 0xFFF0) | temp; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004F7F4.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004F7F4.s") #ifdef NON_EQUIVALENT @@ -491,11 +491,11 @@ void func_80050754(Object *obj, Object_64_80050754 *obj64, f32 arg2) { obj64->unk30 = 0.0f; } #else -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80050754.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80050754.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80050850.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80050A28.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80050850.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80050A28.s") s32 func_80052188(void) { if (D_8011D582 == 2) { @@ -509,7 +509,7 @@ void func_800521B8(s32 arg0) { D_8011D582 = arg0; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800521C4.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800521C4.s") void func_8005234C(unk8005234C *arg0) { arg0->unk16C -= arg0->unk16C >> 3; @@ -518,8 +518,8 @@ void func_8005234C(unk8005234C *arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80052388.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005250C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80052388.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005250C.s") void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) { arg5 *= arg7; @@ -581,8 +581,8 @@ void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4, } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80052B64.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80052D7C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80052B64.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80052D7C.s") void func_80053478(Object_64_80053478 *obj) { s32 phi_v0; @@ -645,13 +645,13 @@ void func_80053664(Object_64 *arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80053750.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80053E9C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80054110.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005492C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80054FD0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80055A84.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80055EC0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80053750.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80053E9C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80054110.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005492C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80054FD0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80055A84.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80055EC0.s") void play_char_horn_sound(Object *obj, Object_64 *obj64) { if (get_filtered_cheats() & CHEAT_HORN_CHEAT) { @@ -663,8 +663,8 @@ void play_char_horn_sound(Object *obj, Object_64 *obj64) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005698C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80056E2C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005698C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80056E2C.s") void func_80057048(Object *obj, s32 arg1) { Object_64 *obj64 = obj->unk64; @@ -722,10 +722,10 @@ void func_800570B8(Object *obj, s32 arg1, s32 arg2, s32 arg3) { } } #else -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800570B8.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800570B8.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80057220.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80057220.s") void func_800575EC(Object *obj, Object_64_800575EC *obj64) { Matrix mf; @@ -743,7 +743,7 @@ void func_800575EC(Object *obj, Object_64_800575EC *obj64) { guMtxXFMF(&mf, 1.0f, 0.0f, 0.0f, &obj64->ox3, &obj64->oy3, &obj64->oz3); } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800576E0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800576E0.s") void func_800579B0(unk800579B0 *arg0, s32 arg1, f32 arg2) { s32 temp, temp2; @@ -763,7 +763,7 @@ void func_800579B0(unk800579B0 *arg0, s32 arg1, f32 arg2) { arg0->unk1E1 = arg0->unk1E1 + temp2; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80057A40.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80057A40.s") void func_800580B4(Object *obj, Object_64_800580B4 *obj64, s32 arg2, f32 arg3) { f32 xPos, yPos, zPos; @@ -784,9 +784,9 @@ void func_800580B4(Object *obj, Object_64_800580B4 *obj64, s32 arg2, f32 arg3) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800581E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80058B84.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80058D5C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800581E8.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80058B84.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80058D5C.s") #ifdef NON_EQUIVALENT void func_80058F44(f32 arg0, Object *arg1, Object *arg2) { @@ -798,11 +798,11 @@ void func_80058F44(f32 arg0, Object *arg1, Object *arg2) { gCameraObject->unk34 = get_level_segment_index_from_position(gCameraObject->x_position, arg2->unk3C_a.unk3C_f, gCameraObject->z_position); } #else -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80058F44.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80058F44.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059080.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059208.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80059080.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80059208.s") void func_80059790(s32 arg0, s32 *arg1, s32 *arg2, s32 *arg3) { s32 temp_lo; @@ -897,17 +897,17 @@ void free_tt_ghost_data(void) { gGhostData[2] = NULL; } -s32 func_80059B7C(s32 arg0, s32 arg1, s16 arg2, s16 arg3, s16 arg4) { - return func_80075000(arg0, (s16)arg1, arg2, arg3, arg4, D_8011D5A0[D_8011D59C], gGhostData[D_8011D59C]); +s32 func_80059B7C(s32 controllerIndex, s32 arg1, s16 arg2, s16 arg3, s16 arg4) { + return func_80075000(controllerIndex, (s16)arg1, arg2, arg3, arg4, D_8011D5A0[D_8011D59C], gGhostData[D_8011D59C]); } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059BF0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80059BF0.s") s16 func_80059E20(void) { return D_8011D5A8[D_8011D59C]; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/set_ghost_position_and_rotation.s") +GLOBAL_ASM("asm/non_matchings/racer/set_ghost_position_and_rotation.s") void func_8005A3B0(void) { D_8011D584 = 1; @@ -920,20 +920,20 @@ void func_8005A3C0(void) { void func_8005A3D0(void) { s32 i; s32 count = 0; - u8 *temp = (u8 *)&func_8003B4BC; + u8 *temp = (u8 *)&obj_loop_goldenballoon; - for (i = 0; i < gFunc8003B4BCLength; i++) { + for (i = 0; i < gObjLoopGoldenBalloonLength; i++) { count += temp[i]; } - if (count != gFunc8003B4BCChecksum) { + if (count != gObjLoopGoldenBalloonChecksum) { D_800DCB54 = 0x800; } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A424.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A6F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005B818.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005A424.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005A6F0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005B818.s") // This gets called if an anti-piracy checksum fails in func_8005F850. void func_8005C25C(void) { diff --git a/src/unknown_043920.h b/src/racer.h similarity index 96% rename from src/unknown_043920.h rename to src/racer.h index a0c5670d..81c1ca89 100644 --- a/src/unknown_043920.h +++ b/src/racer.h @@ -1,5 +1,5 @@ -#ifndef _UNKNOWN_043920_H_ -#define _UNKNOWN_043920_H_ +#ifndef _RACER_H_ +#define _RACER_H_ #include "types.h" #include "structs.h" @@ -147,7 +147,7 @@ typedef struct unk8005C270 { s8 unk193; } unk8005C270; -extern s32 gFunc8003B4BCLength; +extern s32 gObjLoopGoldenBalloonLength; extern s16 D_800DCB54; extern s32 D_800DCB58; extern s32 D_800DCB5C; @@ -185,7 +185,7 @@ extern s8 D_800DCDA8[8]; // Unused? extern s16 D_800DCDB0[16]; -extern s32 gFunc8003B4BCChecksum; +extern s32 gObjLoopGoldenBalloonChecksum; extern s16 D_800DCDD4[4]; @@ -222,7 +222,7 @@ s32 func_800599A8(void); s32 func_800599B8(s32 arg0, s32 arg1, s16 arg2, s32 arg3, s32 arg4); s32 load_tt_ghost(s32 ghostOffset, s32 size, s16 *outTime); void free_tt_ghost_data(void); -s32 func_80059B7C(s32 arg0, s32 arg1, s16 arg2, s16 arg3, s16 arg4); +s32 func_80059B7C(s32 controllerIndex, s32 arg1, s16 arg2, s16 arg3, s16 arg4); s16 func_80059E20(void); void func_8005A3B0(void); void func_8005A3C0(void); diff --git a/src/save_data.c b/src/save_data.c new file mode 100644 index 00000000..68cab6bc --- /dev/null +++ b/src/save_data.c @@ -0,0 +1,1314 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80072250 */ + +#include "save_data.h" +#include "memory.h" +#include "PR/pfs.h" +#include "PR/os_cont.h" +#include "macros.h" +#include "structs.h" +#include "camera.h" +#include "unknown_00BC20.h" +#include "game.h" +#include "unknown_0CEC50.h" + +/************ .data ************/ + +s8 *D_800DE440 = 0; + +u8 gN64FontCodes[] = "\0 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!\"#'*+,-./:=?@"; + +u8 sControllerPaksPresent = 0; // Bits 0, 1, 2, and 3 of the bit pattern correspond to Controllers 1, 2, 3, and 4. 1 if a controller pak is present +s32 D_800DE48C = 0; + +/*******************************/ + +/************ .rodata ************/ + +const char D_800E7590[] = "Region = %d loc = %x size = %x\t"; +const char D_800E75B4[] = "FREE"; +const char D_800E75BC[] = "ALLOCATED"; +const char D_800E75C8[] = "ALLOCATED,FIXED"; +const char D_800E75D8[] = "\n"; +const char D_800E75DC[] = "\n"; +const char D_800E75E0[] = "Region number = %d\t"; +const char D_800E75F4[] = "maxSlots = %d\t"; +const char D_800E7604[] = "slotsUsed = %d\t"; +const char D_800E7614[] = "loc = %x\t"; +const char D_800E7620[] = "size = %x\n"; +const char D_800E762C[] = "\n"; + +const char D_800E7630[] = "DKRACING-ADV"; +const char D_800E7640[] = "DKRACING-ADV"; +const char D_800E7650[] = "DKRACING-TIMES"; +const char D_800E7660[] = "DKRACING-TIMES"; +const char D_800E7670[] = "DKRACING-ADV"; +const char D_800E7680[] = "DKRACING-ADV"; +const char D_800E7690[] = "DKRACING-TIMES"; +const char D_800E76A0[] = "DKRACING-TIMES"; + +const char D_800E76B0[] = "WARNING : No Eprom\n"; +const char D_800E76C4[] = "WARNING : No Eprom\n"; +const char D_800E76D8[] = "WARNING : No Eprom\n"; +const char D_800E76EC[] = "WARNING : No Eprom\n"; +const char D_800E7700[] = "WARNING : No Eprom\n"; +const char D_800E7714[] = "WARNING : No Eprom\n"; +const char D_800E7728[] = "WARNING : No Eprom\n"; + +const char D_800E773C[] = "DKRACING-GHOSTS"; // Used in func_80074B34 +const u8 D_800E774C[4] = { 0, 0, 0, 0 }; // Used in func_80074B34, but I'm confused to what this is for. +const char D_800E7750[] = "warning: corrupt ghost\n"; + +/*********************************/ + +/************ .bss ************/ + +OSMesgQueue *sControllerMesgQueue; +s32 D_80124014; + +OSPfs pfs[MAXCONTROLLERS]; + +typedef struct unk_801241B8 { + /* 0x00 */ s16 unk0; + /* 0x02 */ s16 unk2; + /* 0x04 */ s16 unk4; + /* 0x06 */ s16 unk6; + /* 0x08 */ s16 unk8; +} unk_801241B8; +unk_801241B8 D_801241B8[MAXCONTROLLERS]; + +s32 *sUnkMiscAsset19; //Misc Asset 19 +/** + * Values for Misc Asset 19 + * 00 2D 00 12 + * 00 46 00 0A + * 00 3C 00 3C + * 00 64 00 0F + * 00 3C 00 36 + * 00 32 00 0F + * 00 32 00 34 + * 00 46 00 3C + * 00 55 00 3C + * 00 46 00 16 + * 00 50 00 4B + * 00 64 00 0C + * 00 3C 00 18 + * 00 50 00 1E + * 00 64 00 2A + * 00 32 00 3C + * 00 28 00 0A + * 00 28 00 0A + * 00 64 00 0F +**/ +u8 D_801241E4; +u8 sRumblePaksPresent; // Bits 0, 1, 2, and 3 of the bit pattern correspond to Controllers 1, 2, 3, and 4. 1 if a rumble pak is present +u8 D_801241E6; +u8 D_801241E7; +s32 D_801241E8; +s8 *D_801241EC; +s32 D_801241F0; +s32 D_801241F4; + +/*******************************/ + +// Guessing, but maybe this gets player id from controller index, +// but it might check for something like jointventure and will return +// the same value for controllers one and two? +u8 func_80072250(s32 arg0) { + if ((arg0 == 0 || arg0 == 1) && func_8000E158()) { + arg0 = 1 - arg0; + } + return get_player_id(arg0); +} + +void func_80072298(u8 arg0) { + D_801241E4 = arg0; + if (arg0 != 0) { + D_801241E8 = 0x79; + D_801241E6 = 0xF; + return; + } + func_80072708(); +} + +UNUSED s32 func_800722E8(s16 arg0) { + s32 temp; + if (arg0 < 0 || arg0 >= 4) { + return 0; + } + temp = ((1 << func_80072250(arg0)) & 0xFF); + return sRumblePaksPresent & temp; +} + +#ifdef NON_EQUIVALENT +//In the right ballpark, but not right yet. +void func_80072348(s16 arg0, u8 arg1) { + s32 arg1AsS32 = arg1; + s16 *temp_v0; + unk_801241B8 *temp_v1; + u16 playerId; + + if (arg1AsS32 < 19 && arg0 >= 0) { + if (arg0 < 4) { + playerId = (func_80072250(arg0)); + temp_v1 = &D_801241B8[playerId]; + if (arg1AsS32 == temp_v1->unk0) { + if (temp_v1->unk8 < 0) { + temp_v1->unk8 = -300; + } + temp_v1->unk4 = sUnkMiscAsset19[arg1AsS32 + 1]; + } else { + temp_v1->unk0 = arg1AsS32; + temp_v0 = &sUnkMiscAsset19[arg1AsS32]; + if (*temp_v0 != 0) { + func_80072578(arg0, temp_v0[0], temp_v0[1]); + } + } + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/save_data/func_80072348.s") +#endif + +GLOBAL_ASM("asm/non_matchings/save_data/func_80072424.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072578.s") + +void func_80072708(void) { + D_800DE48C = 3; +} + +//Rumbles controller? +GLOBAL_ASM("asm/non_matchings/save_data/func_80072718.s") + +#ifdef NON_EQUIVALENT +u16 func_80072C54(s32 arg0) { + // v0 v1 a1 a2 a3 t0 t1 t2 t3 t4 t5 t6 t7 t8 + u32 v0; + u32 v1; + s32 a1; + u32 a2; + u8 *a3; + s32 t0; + u32 *t1; + u32 *t2; + u8 **t3; + u32 t4; + u32 t5; + u32 t6; + u32 t7; + u32 t8; + u32 t9; + + v1 = 0; + if (arg0 <= 0) { + return v1; + } + // L80072C64 + v0 = 1 << (arg0 + 0x1F); + if (arg0 != 0) { + a1 = -(arg0 & 3); + t0 = a1 + arg0; + if (a1 != 0) { + // L80072CA0 + do { + a2 = D_801241F4; + a1 = arg0 - 1; + t6 = v0 >> 1; + if (a2 == 0) { + a3 = D_801241EC; + a2 = 0x80; + t8 = *a3; + D_801241EC = a3 + 1; + D_801241F4 = 0x80; + D_801241F0 = t8; + } + // L80072CCC + arg0 = a1; + if (D_801241F0 & a2 != 0) { + v1 |= v0; + } + // L80072CE4 + v0 = t6; + D_801241F4 = a2 >> 1; + } while (t0 != a1); + if (a1 == 0) { + return v1; // should jump to end + } + } + // L80072CF4 + t1 = &D_801241F4; + t2 = &D_801241F0; + t3 = &D_801241EC; + t4 = 128; + // L80072D10 + do { + a2 = *t1; + t6 = v0 >> 1; + arg0 -= 4; + if (a2 == 0) { + a3 = *t3; + a2 = t4; + t9 = *a3; + *t3 = a3 + 1; + *t1 = t4; + *t2 = t9; + } + // L80072D3C + a1 = *t2; + t8 = a2 << 1; + t7 = a1 & a2; + a2 = t8; + if (t7 != 0) { + v1 |= v0; + } + // L80072D54 + v0 = t6; + *t1 = t8; + if (t8 == 0) { + a3 = *t3; + a2 = t4; + a1 = *a3; + *t3 = a3 + 1; + *t1 = t4; + *t2 = a1; + } + // L80072D7C + t7 = a1 & a2; + t6 = v0 >> 1; + if (t7 != 0) { + v1 |= v0; + } + // L80072D8C + t8 = a2 >> 1; + *t1 = t8; + a2 = t8; + v0 = t6; + if (t8 == 0) { + a3 = *t3; + a2 = t4; + a1 = *a3; + *t3 = a3 + 1; + *t1 = t4; + *t2 = a1; + } + // L80072DBC + t7 = a1 & a2; + t6 = v0 >> 1; + if (t7 != 0) { + v1 |= v0; + } + // L80072DCC + t8 = a2 >> 1; + *t1 = t8; + a2 = t8; + v0 = t6; + if (t8 == 0) { + a3 = *t3; + a2 = t4; + a1 = *a3; + *t3 = a3 + 1; + *t1 = t4; + *t2 = a1; + } + // L80072DFC + t7 = a1 & a2; + t6 = v0 >> 1; + if (t7 != 0) { + v1 |= v0; + } + // L80072E0C + t8 = a2 >> 1; + *t1 = t8; + v0 = t6; + } while (arg0 != 0); + } + // L80072E1C + return v1; +} +#else +GLOBAL_ASM("asm/non_matchings/save_data/func_80072C54.s") +#endif + +GLOBAL_ASM("asm/non_matchings/save_data/func_80072E28.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_8007306C.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800732E8.s") + +//arg1 is eepromData, from read_eeprom_data +//arg2 seems to be a flag for either lap times or course initials? +GLOBAL_ASM("asm/non_matchings/save_data/func_80073588.s") + +GLOBAL_ASM("asm/non_matchings/save_data/func_800738A4.s") + +s32 get_game_data_file_size(void) { + return 256; +} + +s32 get_time_data_file_size(void) { + return 512; +} + +//Probably get_file_extension +//func_80073C5C(s32 controllerIndex, s32 fileType, u8 **fileExt); +GLOBAL_ASM("asm/non_matchings/save_data/func_80073C5C.s") + +//Read DKRACING-ADV data into settings? +s32 read_game_data_from_controller_pak(s32 controllerIndex, u8 *fileExt, Settings *settings) { + s32 *alloc; + s32 ret; + s32 fileNumber; + s32 fileSize; + + //Initialize controller pak + ret = get_si_device_status(controllerIndex); + if (ret != CONTROLLER_PAK_GOOD) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | ret; + } + //D_800E7670 = "DKRACING-ADV" + ret = get_file_number(controllerIndex, (u8 *)D_800E7670, fileExt, &fileNumber); + if (ret == CONTROLLER_PAK_GOOD) { + ret = get_file_size(controllerIndex, fileNumber, &fileSize); + if (fileSize == 0) { + ret = CONTROLLER_PAK_BAD_DATA; + } + if (ret == CONTROLLER_PAK_GOOD) { + alloc = allocate_from_main_pool_safe(fileSize, COLOR_TAG_BLACK); + ret = read_data_from_controller_pak(controllerIndex, fileNumber, (u8 *)alloc, fileSize); + + if (ret == CONTROLLER_PAK_GOOD) { + if (*alloc == GAMD) { + func_8007306C(settings, (s32) (alloc + 1)); + if (settings->newGame != 0) { + ret = CONTROLLER_PAK_CHANGED; + } + } + else { + ret = CONTROLLER_PAK_BAD_DATA; + } + } + + free_from_memory_pool(alloc); + } + } + + start_reading_controller_data(controllerIndex); + if (ret != CONTROLLER_PAK_GOOD) { + ret |= (controllerIndex << 30); + } + return ret; +} + +s32 write_game_data_to_controller_pak(s32 controllerIndex, Settings *arg1) { + UNUSED s32 pad; + u8 *fileExt; + u8 *gameData; //Probably a struct where the first s32 is GAMD + s32 ret; + s32 fileSize; + + fileSize = get_game_data_file_size(); // 256 bytes + gameData = allocate_from_main_pool_safe(fileSize, COLOR_TAG_WHITE); + *((s32 *)gameData) = GAMD; + func_800732E8(arg1, gameData + 4); + ret = func_80073C5C(controllerIndex, 3, &fileExt); + if (ret == 0) { + // D_800E7680 = DKRACING-ADV + ret = write_controller_pak_file(controllerIndex, -1, (u8 *) D_800E7680, (u8 *) &fileExt, gameData, fileSize); + } + free_from_memory_pool(gameData); + if (ret != 0) { + ret |= (controllerIndex << 30); + } + return ret; +} + +//Read time data from controller pak into settings +s32 read_time_data_from_controller_pak(s32 controllerIndex, u8 *fileExt, Settings *settings) { + s32 *cpakData; + s32 status; + s32 fileNumber; + s32 fileSize; + + status = get_si_device_status(controllerIndex); + if (status != CONTROLLER_PAK_GOOD) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | status; + } + + //D_800E7690 = DKRACING-TIMES + status = get_file_number(controllerIndex, (u8 *)D_800E7690, fileExt, &fileNumber); + if (status == CONTROLLER_PAK_GOOD) { + status = get_file_size(controllerIndex, fileNumber, &fileSize); + if (fileSize == 0) { + status = CONTROLLER_PAK_BAD_DATA; + } + + if (status == CONTROLLER_PAK_GOOD) { + cpakData = allocate_from_main_pool_safe(fileSize, COLOR_TAG_BLACK); + + status = read_data_from_controller_pak(controllerIndex, fileNumber, (u8 *)cpakData, fileSize); + if (status == CONTROLLER_PAK_GOOD) { + if (*cpakData == TIMD) { + func_80073588(settings, (u64 *) (cpakData + 1), 3); + } else { + status = CONTROLLER_PAK_BAD_DATA; + } + } + + free_from_memory_pool(cpakData); + } + } + + start_reading_controller_data(controllerIndex); + if (status != CONTROLLER_PAK_GOOD) { + status |= (controllerIndex << 30); + } + + return status; +} + +s32 write_time_data_to_controller_pak(s32 controllerIndex, Settings *arg1) { + u8 *timeData; //Should probably be a struct or maybe an array? + s32 ret; + s32 fileSize; + UNUSED s32 temp_v0; + u8 *fileExt; + + fileSize = get_time_data_file_size(); // 512 bytes + timeData = allocate_from_main_pool_safe(fileSize, COLOR_TAG_WHITE); + *((s32 *)timeData) = TIMD; + func_800738A4(arg1, timeData + 4); + ret = func_80073C5C(controllerIndex, 4, &fileExt); + if (ret == CONTROLLER_PAK_GOOD) { + //D_800E76A0 = DKRACING-TIMES + ret = write_controller_pak_file(controllerIndex, -1, (u8 *) &D_800E76A0, (u8 *) &fileExt, timeData, fileSize); + } + free_from_memory_pool(timeData); + if (ret != CONTROLLER_PAK_GOOD) { + ret |= (controllerIndex << 30); + } + return ret; +} + +GLOBAL_ASM("asm/non_matchings/save_data/func_80074204.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_8007431C.s") + +// Writes Eeprom in 5 block chunks of data starting at either 0x0, 0x5, or 0xA +// Educated guess says this might be for one of three save files +s32 write_save_data(s32 saveFileNum, Settings *settings) { + s32 startingAddress; + u64 *alloc; + s32 address; + s32 blocks; + s32 i; + + if (osEepromProbe(get_si_mesg_queue()) == 0) { + return -1; + } + + switch(saveFileNum) { + case 0: + startingAddress = 0; + break; + case 1: + startingAddress = 5; + break; + case 2: + startingAddress = 10; + break; + default: + startingAddress = 10; + break; + } + + blocks = 5; + alloc = allocate_from_main_pool_safe(blocks * sizeof(u64), COLOR_TAG_WHITE); + func_800732E8(settings, (u8 *)alloc); + + if (!is_reset_pressed()) { + for (i = 0, address = startingAddress; i < blocks; i++, address++) { + osEepromWrite(get_si_mesg_queue(), address, (u8 *)&alloc[i]); + } + } + + free_from_memory_pool(alloc); + + return 0; +} + +// Read Eeprom Data for addresses 0x10 - 0x39 +// arg1 is a flag +// arg1 is descended from (D_800DD37C & 3) so the first 2 bits of that value. +// bit 1 is for 0x10 - 0x27 +// bit 2 is for 0x28 - 0x39 +s32 read_eeprom_data(Settings *arg0, u8 arg1) { + u64 *alloc; + s32 i; + + if (osEepromProbe(get_si_mesg_queue()) == 0) { + return -1; + } + + alloc = allocate_from_main_pool_safe(0x200, COLOR_TAG_WHITE); + + if (arg1 & 1) { + s32 blocks = 24; + for (i = 0; i < blocks; i++) { + osEepromRead(get_si_mesg_queue(), i + 0x10, (u8 *)&alloc[i]); + } + func_80073588(arg0, alloc, 1); + } + + if (arg1 & 2) { + s32 blocks = 24; + for (i = 0; i < blocks; i++) { + osEepromRead(get_si_mesg_queue(), i + 0x28, (u8 *)(&alloc[24] + i)); + } + func_80073588(arg0, alloc, 2); + } + + free_from_memory_pool(alloc); + return 0; +} + +// Write Eeprom Data for addresses 0x10 - 0x39 +// arg1 is a flag +// bit 1 is for 0x10 - 0x27 +// bit 2 is for 0x28 - 0x39 +s32 write_eeprom_data(Settings *arg0, u8 arg1) { + u64 *alloc; + s32 i; + + if (osEepromProbe(get_si_mesg_queue()) == 0) { + return -1; + } + + alloc = allocate_from_main_pool_safe(0x200, COLOR_TAG_WHITE); + + func_800738A4(arg0, (u8 *)alloc); + + if (arg1 & 1) { + s32 size = 24; + if (1){} //Fake Match + if (!is_reset_pressed()) { + for (i = 0; i != size; i++) { + osEepromWrite(get_si_mesg_queue(), i + 16, (u8 *)&alloc[i]); + } + } + } + + if (arg1 & 2) { + s32 size = 24; + if (!is_reset_pressed()) { + for (i = 0; i != size; i++) { + osEepromWrite(get_si_mesg_queue(), i + 40, (u8 *)(&alloc[24] + i)); + } + } + } + + free_from_memory_pool(alloc); + return 0; +} + +s32 calculate_eeprom_settings_checksum(u64 eepromSettings) { + s32 ret; + s32 i; + + ret = 5; + for (i = 0; i <= 13; i++) { + ret += (u16)(eepromSettings >> (i << 2)) & 0xF; + } + return ret; +} + +// Reads eeprom address 0xF (15) +s32 read_eeprom_settings(u64 *eepromSettings) { + s32 temp; + s32 sp20; + + if (osEepromProbe(get_si_mesg_queue()) == 0) { + return -1; + } + + osEepromRead(get_si_mesg_queue(), 0xF, (u8 *) eepromSettings); + sp20 = calculate_eeprom_settings_checksum(*eepromSettings); + temp = *eepromSettings >> 56; + if (sp20 != temp) { + //bit 24 = Unknown + //bit 25 = Seems to be a flag for whether subtitles are enabled or not. + *eepromSettings = 0x3000000; //Sets bits 24 and 25 high + *eepromSettings <<= 8; + *eepromSettings >>= 8; + *eepromSettings |= (u64)calculate_eeprom_settings_checksum(*eepromSettings) << 56; + } + + return 1; +} + +//Writes eeprom address 0xF (15) +s32 write_eeprom_settings(u64 *eepromSettings) { + if (osEepromProbe(get_si_mesg_queue()) == 0) { + return -1; + } + *eepromSettings <<= 8; + *eepromSettings >>= 8; + *eepromSettings |= (s64)(calculate_eeprom_settings_checksum(*eepromSettings)) << 56; + if (is_reset_pressed() == 0) { + osEepromWrite(get_si_mesg_queue(), 0xF, (u8 *) eepromSettings); + } + return 1; +} + +s16 calculate_ghost_header_checksum(GhostHeader *ghostHeader) { + s16 i; + s16 len; + s16 sum; + + sum = 0; + len = (s16)(ghostHeader->nodeCount * sizeof(GhostDataFrame)) + sizeof(GhostHeader); + for (i = 2; i < len; i++) { + sum += ((u8 *)ghostHeader)[i]; + } + return sum; +} + +void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 nodeCount, u8 *dest) { + ghostHeader->checksum = 0; + ghostHeader->characterID = characterID; + ghostHeader->unk3 = 0; + ghostHeader->time = time; + ghostHeader->nodeCount = nodeCount; + bcopy(dest, (u8 *)ghostHeader + 8, nodeCount * sizeof(GhostDataFrame)); + ghostHeader->checksum = calculate_ghost_header_checksum(ghostHeader); +} + +//Seems to only be called when used as an argument for func_800860A8. Effectively just returns 0x6700 +s32 func_80074B1C(void) { + //func_80074EB8 Makes extensive use out of 0x1100, and even does a * 6 to it. + //func_80075000 Uses 0x1100 once as well. + //Another possibility for 0x1100, seems to be from func_8007BA5C which seems to do (0xF5101100 & 0xFFFF); + int x = 0x1100; + return (&x)[0] * 6 + 0x100; +} + +GLOBAL_ASM("asm/non_matchings/save_data/func_80074B34.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80074EB8.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80075000.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800753D8.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800756D4.s") + +SIDeviceStatus get_si_device_status(s32 controllerIndex) { + OSMesg unusedMsg; + s32 ret; + s32 bytes_not_used; + s32 i; + + if (sControllerMesgQueue->validCount == 0) { + if (osMotorInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex) == 0) { + return RUMBLE_PAK; + } + } + + //Couldn't get a for loop to match this + i = 0; + while (sControllerMesgQueue->validCount != 0 && i < 10) { + osRecvMesg(sControllerMesgQueue, &unusedMsg, OS_MESG_NOBLOCK); + i++; + } + + for (i = 0; i <= 4; i++) { + ret = osPfsFreeBlocks( &pfs[controllerIndex], &bytes_not_used); + if (ret == PFS_ERR_INVALID) { + ret = osPfsInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex); + } + if (ret == PFS_ERR_ID_FATAL) { + if (osMotorInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex) == 0) { + return RUMBLE_PAK; + } + } + if (ret == PFS_ERR_NEW_PACK) { + if ((osPfsInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex) == PFS_ERR_ID_FATAL) + && (osMotorInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex) == 0)) { + return RUMBLE_PAK; + } + return CONTROLLER_PAK_CHANGED; + } + if (ret == PFS_ERR_NOPACK || ret == PFS_ERR_DEVICE) { + return NO_CONTROLLER_PAK; + } + if (ret == PFS_ERR_BAD_DATA) { + return CONTROLLER_PAK_BAD_DATA; + } + if (ret == PFS_ERR_ID_FATAL) { + return CONTROLLER_PAK_WITH_BAD_ID; + } + if (ret == PFS_ERR_INCONSISTENT) { + return CONTROLLER_PAK_INCONSISTENT; + } + if (ret == 0) { + return CONTROLLER_PAK_GOOD; + } + } + + return NO_CONTROLLER_PAK; +} + +s32 start_reading_controller_data(UNUSED s32 controllerIndex) { + osContStartReadData(sControllerMesgQueue); + return 0; +} + +#ifdef NON_MATCHING +// For some reason it seems likely that D_801241E7 is volatile. +// Still needs matching though to prove that. +// volatile u8 D_801241E7; +void init_controller_paks(void) { + s32 controllerIndex; + s32 ret; + u8 controllerBit; + u8 pakPattern; + s8 maxControllers; + + sControllerMesgQueue = get_si_mesg_queue(); + sUnkMiscAsset19 = get_misc_asset(19), //Comma is here on purpose + D_801241E7 = 0xF; + D_801241E6 = 0xF; + D_801241E4 = 1; + D_801241E8 = 0; + D_800DE48C = 1; + sRumblePaksPresent = 0; //sRumblePaksPresent + sControllerPaksPresent = 0; //sControllerPaksPresent + + //pakPattern will set the first 4 bits representing each controller + //and it will be 1 if there's something attached. + osPfsIsPlug(sControllerMesgQueue, &pakPattern); + + for (controllerIndex = 0, controllerBit = 1, maxControllers = MAXCONTROLLERS; controllerIndex != maxControllers; controllerIndex++, controllerBit <<= 1) { + D_801241B8[controllerIndex].unk2 = 0; + D_801241B8[controllerIndex].unk4 = -1; + D_801241B8[controllerIndex].unk0 = -1; + D_801241B8[controllerIndex].unk6 = D_801241B8[controllerIndex].unk2; + + //If something is plugged into the controller + if (pakPattern & controllerBit) { + ret = osPfsInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex); + if (ret == PFS_ERR_NEW_PACK) { + ret = osPfsInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex); + } + if (ret == 0) { + //If we found a controller pak, set the bit that has one + sControllerPaksPresent |= controllerBit; + } + else if (ret == PFS_ERR_ID_FATAL) { + if (osMotorInit(sControllerMesgQueue, &pfs[controllerIndex], controllerIndex) == 0) { + //If we found a rumble pak, set the bit that has one + sRumblePaksPresent |= controllerBit; + } + } + } + } + + osContStartReadData(sControllerMesgQueue); +} +#else +GLOBAL_ASM("asm/non_matchings/save_data/init_controller_paks.s") +#endif + +UNUSED SIDeviceStatus check_for_rumble_pak(s32 controllerIndex) { + s32 ret; + + ret = get_si_device_status(controllerIndex); + start_reading_controller_data(controllerIndex); + + if (ret == RUMBLE_PAK) { + sRumblePaksPresent |= 1 << controllerIndex; + } + + return ret; +} + +//Inspects and repairs the Controller Pak's file system +SIDeviceStatus repair_controller_pak(s32 controllerIndex) { + s32 ret; + s32 status = get_si_device_status(controllerIndex); + if (status == CONTROLLER_PAK_GOOD || status == CONTROLLER_PAK_INCONSISTENT) { + status = osPfsChecker(&pfs[controllerIndex]); + if (status == 0) { + ret = CONTROLLER_PAK_GOOD; + } else if (status == PFS_ERR_NEW_PACK) { + ret = CONTROLLER_PAK_CHANGED; + } else { + ret = CONTROLLER_PAK_INCONSISTENT; + } + } else { + ret = CONTROLLER_PAK_GOOD; + } + start_reading_controller_data(controllerIndex); + return ret; +} + +//Reformat Controller Pak +SIDeviceStatus reformat_controller_pak(s32 controllerIndex) { + s32 ret; + s32 status = get_si_device_status(controllerIndex); + if (status == CONTROLLER_PAK_GOOD || status == CONTROLLER_PAK_INCONSISTENT || status == CONTROLLER_PAK_WITH_BAD_ID) { + status = osPfsReFormat(&pfs[controllerIndex], sControllerMesgQueue, controllerIndex); + if (status == 0) { + ret = CONTROLLER_PAK_GOOD; + } else if (status == PFS_ERR_NEW_PACK) { + ret = CONTROLLER_PAK_CHANGED; + } else { + ret = CONTROLLER_PAK_INCONSISTENT; + } + } else { + ret = CONTROLLER_PAK_GOOD; + } + start_reading_controller_data(controllerIndex); + return ret; +} + +s32 get_controller_pak_file_list(s32 controllerIndex, s32 maxNumOfFilesToGet, u8 **fileNames, u8 **fileExtensions, u32 *fileSizes, u8 *fileTypes) { + OSPfsState state; + s32 ret; + s32 maxNumOfFilesOnCpak; + s32 files_used; + s8 *temp_D_800DE440; + s32 i; + u32 gameCode; + + ret = get_si_device_status(controllerIndex); + if (ret != CONTROLLER_PAK_GOOD) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | ret; + } + + if (osPfsNumFiles(&pfs[controllerIndex], &maxNumOfFilesOnCpak, &files_used) != 0) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | CONTROLLER_PAK_BAD_DATA; + } + + if (get_language() == JAPANESE) { + gameCode = JPN_GAME_CODE; + } else if (osTvType == TV_TYPE_PAL) { + gameCode = PAL_GAME_CODE; + } else { + gameCode = NTSC_GAME_CODE; + } + + if (maxNumOfFilesToGet < maxNumOfFilesOnCpak) { + maxNumOfFilesOnCpak = maxNumOfFilesToGet; + } + + if (D_800DE440 != NULL) { + free_from_memory_pool(D_800DE440); + } + + files_used = maxNumOfFilesOnCpak * 24; + D_800DE440 = allocate_from_main_pool_safe(files_used, COLOR_TAG_BLACK); + bzero(D_800DE440, files_used); + temp_D_800DE440 = D_800DE440; + + //TODO: There's probably an unidentified struct here + for (i = 0; i < maxNumOfFilesOnCpak; i++) { + fileNames[i] = (u8 *) temp_D_800DE440; + temp_D_800DE440 += 0x12; + fileExtensions[i] = (u8 *) temp_D_800DE440; + fileSizes[i] = 0; + fileTypes[i] = -1; + temp_D_800DE440 += 6; + } + + while (i < maxNumOfFilesToGet) { + fileExtensions[i] = 0; + fileNames[i] = 0; + fileSizes[i] = 0; + fileTypes[i] = -1; + i++; + } + + for (i = 0; i < maxNumOfFilesOnCpak; i++) { + ret = osPfsFileState(&pfs[controllerIndex], i, &state); + if (ret == PFS_ERR_INVALID) { + fileNames[i] = 0; + continue; + } + + if (ret != 0) { + start_reading_controller_data(controllerIndex); + return CONTROLLER_PAK_BAD_DATA; + } + + font_codes_to_string((u8 *)&state.game_name, (u8 *)fileNames[i], PFS_FILE_NAME_LEN); + font_codes_to_string((u8 *)&state.ext_name, (u8 *)fileExtensions[i], PFS_FILE_EXT_LEN); + fileSizes[i] = state.file_size; + fileTypes[i] = 6; // Unknown file type? Possibly from another game? + + if ((state.game_code == gameCode) && (state.company_code == COMPANY_CODE)) { + fileTypes[i] = get_file_type(controllerIndex, i); + } + } + + start_reading_controller_data(controllerIndex); + return CONTROLLER_PAK_GOOD; +} + +//Free D_800DE440 +void func_80076164(void) { + if (D_800DE440 != 0) { + free_from_memory_pool(D_800DE440); + } + D_800DE440 = 0; +} + +//Get Available Space in Controller Pak +s32 get_free_space(s32 controllerIndex, u32 *bytesFree, s32 *notesFree) { + s32 ret; + s32 bytesNotUsed; + s32 maxNotes; + s32 notesUsed; + + ret = get_si_device_status(controllerIndex); + if (ret == CONTROLLER_PAK_GOOD) { + if (bytesFree != 0) { + ret = osPfsFreeBlocks(&pfs[controllerIndex], &bytesNotUsed); + if (ret != 0) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | CONTROLLER_PAK_BAD_DATA; + } + *bytesFree = bytesNotUsed; + } + if (notesFree != 0) { + ret = osPfsNumFiles(&pfs[controllerIndex], &maxNotes, ¬esUsed); + if (ret != 0) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | CONTROLLER_PAK_BAD_DATA; + } + if (notesUsed >= 16) { + *notesFree = 0; + } else { + *notesFree = 16 - notesUsed; + } + } + } else { + ret |= controllerIndex << 30; + } + start_reading_controller_data(controllerIndex); + return ret; +} + +s32 delete_file(s32 controllerIndex, s32 fileNum) { + OSPfsState state; + s32 ret; + + ret = get_si_device_status(controllerIndex); + if (ret != CONTROLLER_PAK_GOOD) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | ret; + } + + ret = (controllerIndex << 30) | CONTROLLER_PAK_BAD_DATA; + + if (osPfsFileState(&pfs[controllerIndex], fileNum, &state) == 0) { + if (osPfsDeleteFile(&pfs[controllerIndex], state.company_code, state.game_code, (u8 *)&state.game_name, (u8 *)&state.ext_name) == 0) { + ret = CONTROLLER_PAK_GOOD; + } + } + + start_reading_controller_data(controllerIndex); + + return ret; +} + +// Copies a file from one controller pak to the other +s32 copy_controller_pak_data(s32 controllerIndex, s32 fileNumber, s32 secondControllerIndex) { + UNUSED s32 pad; + u8 fileName[PFS_FILE_NAME_LEN]; + UNUSED s32 pad2; + u8 fileExt[PFS_FILE_EXT_LEN]; + OSPfsState state; + s32 status; + u8 *alloc; + + status = get_si_device_status(controllerIndex); + if (status != CONTROLLER_PAK_GOOD) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | status; + } + + if (osPfsFileState(&pfs[controllerIndex], fileNumber, &state) != 0) { + start_reading_controller_data(controllerIndex); + return (controllerIndex << 30) | CONTROLLER_PAK_BAD_DATA; + } + + alloc = allocate_from_main_pool_safe(state.file_size, COLOR_TAG_BLACK); + + status = read_data_from_controller_pak(controllerIndex, fileNumber, alloc, state.file_size); + start_reading_controller_data(controllerIndex); + if (status != CONTROLLER_PAK_GOOD) { + free_from_memory_pool(alloc); + return (controllerIndex << 30) | status; + } + + font_codes_to_string((u8 *)&state.game_name, fileName, PFS_FILE_NAME_LEN); + font_codes_to_string((u8 *)&state.ext_name, fileExt, PFS_FILE_EXT_LEN); + + status = write_controller_pak_file(secondControllerIndex, -1, fileName, fileExt, alloc, state.file_size); + if (status != CONTROLLER_PAK_GOOD) { + status |= (secondControllerIndex << 30); + } + + free_from_memory_pool(alloc); + return status; +} + +// There is likely a struct that looks like this in here. +// typedef struct fileStruct { +// s32 fileType; +// u8 game_name[PFS_FILE_NAME_LEN]; +// } fileStruct; +SIDeviceStatus get_file_number(s32 controllerIndex, u8 *fileName, u8 *fileExt, s32 *fileNumber) { + u32 gameCode; + u8 fileNameAsFontCodes[PFS_FILE_NAME_LEN]; + UNUSED s32 pad; + u8 fileExtAsFontCodes[PFS_FILE_EXT_LEN]; + UNUSED s32 pad2; + s32 ret; + + string_to_font_codes(fileName, fileNameAsFontCodes, PFS_FILE_NAME_LEN); + string_to_font_codes(fileExt, fileExtAsFontCodes, PFS_FILE_EXT_LEN); + + if (get_language() == JAPANESE) { + gameCode = JPN_GAME_CODE; + } else if (osTvType == TV_TYPE_PAL) { + gameCode = PAL_GAME_CODE; + } else { + gameCode = NTSC_GAME_CODE; + } + + + ret = osPfsFindFile(&pfs[controllerIndex], COMPANY_CODE, gameCode, (u8 *)fileNameAsFontCodes, (u8 *)fileExtAsFontCodes, fileNumber); + if (ret == 0) { + return CONTROLLER_PAK_GOOD; + } + if ((ret == PFS_ERR_NOPACK) || (ret == PFS_ERR_DEVICE)) { + return NO_CONTROLLER_PAK; + } + if (ret == PFS_ERR_INCONSISTENT) { + return CONTROLLER_PAK_INCONSISTENT; + } + if (ret == PFS_ERR_ID_FATAL) { + return CONTROLLER_PAK_WITH_BAD_ID; + } + if (ret == PFS_ERR_INVALID) { + return CONTROLLER_PAK_CHANGED; + } + + return CONTROLLER_PAK_BAD_DATA; +} + +SIDeviceStatus read_data_from_controller_pak(s32 controllerIndex, s32 fileNum, u8 *data, s32 dataLength) { + s32 readResult = osPfsReadWriteFile(&pfs[controllerIndex], fileNum, PFS_READ, 0, dataLength, data); + + if (readResult == 0) { + return CONTROLLER_PAK_GOOD; + } + if ((readResult == PFS_ERR_NOPACK) || (readResult == PFS_ERR_DEVICE)) { + return NO_CONTROLLER_PAK; + } + if (readResult == PFS_ERR_INCONSISTENT) { + return CONTROLLER_PAK_INCONSISTENT; + } + if (readResult == PFS_ERR_ID_FATAL) { + return CONTROLLER_PAK_WITH_BAD_ID; + } + if (readResult == PFS_ERR_INVALID) { + return CONTROLLER_PAK_CHANGED; + } + + return CONTROLLER_PAK_BAD_DATA; +} + +//If fileNumber -1, it creates a new file? +SIDeviceStatus write_controller_pak_file(s32 controllerIndex, s32 fileNumber, u8 *fileName, u8 *fileExt, u8 *dataToWrite, s32 fileSize) { + s32 temp; + u8 fileNameAsFontCodes[PFS_FILE_NAME_LEN]; + UNUSED s32 temp2; + u8 fileExtAsFontCodes[PFS_FILE_EXT_LEN]; + s32 ret; + s32 file_number; + s32 bytesToSave; + u32 game_code; + + ret = get_si_device_status(controllerIndex); + if (ret != 0) { + start_reading_controller_data(controllerIndex); + return ret; + } + + bytesToSave = fileSize; + temp = fileSize & 0xFF; + if (temp != 0) { + bytesToSave = (fileSize - temp) + 0x100; + } + + string_to_font_codes(fileName, fileNameAsFontCodes, PFS_FILE_NAME_LEN); + string_to_font_codes(fileExt, fileExtAsFontCodes, PFS_FILE_EXT_LEN); + + if (get_language() == JAPANESE) { + game_code = JPN_GAME_CODE; + } else if (osTvType == TV_TYPE_PAL) { + game_code = PAL_GAME_CODE; + } else { + game_code = NTSC_GAME_CODE; + } + + ret = get_file_number(controllerIndex, fileName, fileExt, &file_number); + if (ret == CONTROLLER_PAK_GOOD) { + if (fileNumber != -1 && fileNumber != file_number) { + ret = CONTROLLER_PAK_BAD_DATA; + } + } else if (ret == CONTROLLER_PAK_CHANGED) { + if (fileNumber != -1) { + ret = CONTROLLER_PAK_BAD_DATA; + } else { + temp = osPfsAllocateFile(&pfs[controllerIndex], COMPANY_CODE, game_code, fileNameAsFontCodes, fileExtAsFontCodes, bytesToSave, &file_number); + if (temp == 0) { + ret = CONTROLLER_PAK_GOOD; + } else if (temp == PFS_DATA_FULL || temp == PFS_DIR_FULL) { + ret = CONTROLLER_PAK_FULL; + } + else { + ret = CONTROLLER_PAK_BAD_DATA; + } + } + } + + if (ret == CONTROLLER_PAK_GOOD) { + temp = osPfsReadWriteFile(&pfs[controllerIndex], file_number, PFS_WRITE, 0, bytesToSave, dataToWrite); + if (temp == 0) { + ret = CONTROLLER_PAK_GOOD; + } else if ((temp == PFS_ERR_NOPACK) || (temp == PFS_ERR_DEVICE)) { + ret = NO_CONTROLLER_PAK; + } else if (temp == PFS_ERR_INCONSISTENT) { + ret = CONTROLLER_PAK_INCONSISTENT; + } else if (temp == PFS_ERR_ID_FATAL) { + ret = CONTROLLER_PAK_WITH_BAD_ID; + } + else { + ret = CONTROLLER_PAK_BAD_DATA; + } + } + + start_reading_controller_data(controllerIndex); + return ret; +} + +//Get File size for given controller's Control Pak +SIDeviceStatus get_file_size(s32 controllerIndex, s32 fileNum, s32 *fileSize) { + OSPfsState state; + + *fileSize = 0; + if (osPfsFileState(&pfs[controllerIndex], fileNum, &state) == 0) { + *fileSize = state.file_size; + return CONTROLLER_PAK_GOOD; + } + return CONTROLLER_PAK_BAD_DATA; +} + +//Converts N64 Font codes used in controller pak file names, into C ASCII a coded string +u8 *font_codes_to_string(u8 *inString, u8 *outString, s32 stringLength) { + s32 index = *inString; + u8 *ret = outString; + + while (index != 0 && stringLength != 0) { + // Less than sizeof(gN64FontCodes) - 3. + // So basically make sure it's a valid font code value + if (index <= 65) { + *outString = gN64FontCodes[index]; + outString++; + } else { + //Replace invalid characters with a hyphen + *outString = '-'; + outString++; + } + + inString++; + stringLength--; + index = *inString; + } + + //Pad any extra characters with NULL font code + while (stringLength != 0) { + *outString = 0; + stringLength--; + outString++; + } + + *outString = 0; + return ret; +} + +//Converts a C ASCII string into N64 Font codes for controller pak file names +u8 *string_to_font_codes(u8 *inString, u8 *outString, s32 stringLength) { + s32 i; + u8 currentChar; + u8 *ret = outString; + + while (*inString != 0 && stringLength != 0) { + *outString = 0; + for (i = 0; i < 65; i++) { + currentChar = *inString; + if (currentChar == gN64FontCodes[i]) { + *outString = i; + outString++; + break; + } + } + + inString++; + stringLength--; + } + + while (stringLength != 0) { + *outString = 0; + stringLength--; + outString++; + } + + *outString = 0; + return ret; +} + +/** + * For the given controller, and file, this will return a value for which type of file it is. + * 3 = GAMD / Game Data + * 4 = TIMD / Time Data + * 5 = GHSS / Ghost Data + * 6 = Unknown? Possibly from another game? + */ +s32 get_file_type(s32 controllerIndex, s32 fileNum) { + s32 *data; + UNUSED s32 pad; + s32 ret; + + ret = 6; + data = allocate_from_main_pool_safe(0x100, COLOR_TAG_BLACK); + if (read_data_from_controller_pak(controllerIndex, fileNum, (u8 *)data, 0x100) == CONTROLLER_PAK_GOOD) { + switch (*data) { + case GAMD: + ret = 3; + break; + case TIMD: + ret = 4; + break; + case GHSS: + ret = 5; + break; + default: + ret = 6; + break; + } + } + free_from_memory_pool(data); + return ret; +} diff --git a/src/save_data.h b/src/save_data.h new file mode 100644 index 00000000..7db53ac0 --- /dev/null +++ b/src/save_data.h @@ -0,0 +1,98 @@ +#ifndef _SAVE_DATA_H_ +#define _SAVE_DATA_H_ + +#include "types.h" +#include "structs.h" +#include "PR/pfs.h" +#include "PR/os_cont.h" + +#define GAMD 0x47414D44 // 'GAMD' ASCII - Game Data? +#define TIMD 0x54494D44 // 'TIMD' ASCII - Time Data? +#define GHSS 0x47485353 // 'GHSS' ASCII - Ghosts? + +// These are the unique game codes assigned to DKR +#define NDYJ 0x4E44594A // 'NDYJ' ASCII +#define NDYP 0x4E445950 // 'NDYP' ASCII +#define NDYE 0x4E445945 // 'NDYE' ASCII +#define JPN_GAME_CODE NDYJ +#define PAL_GAME_CODE NDYP +#define NTSC_GAME_CODE NDYE + +// This is RARE's unique code +#define COMPANY_CODE 0x3459 + +typedef enum { + CONTROLLER_PAK_GOOD, + NO_CONTROLLER_PAK, + CONTROLLER_PAK_INCONSISTENT, + CONTROLLER_PAK_WITH_BAD_ID, + CONTROLLER_PAK_FULL, + CONTROLLER_PAK_CHANGED, + CONTROLLER_PAK_UNK6, //Could be another way to mark as full according to tt_menu_loop + RUMBLE_PAK, + CONTROLLER_PAK_UNK8, // func_80074B34 Sets this + CONTROLLER_PAK_BAD_DATA, +} SIDeviceStatus; + +extern s8 *D_800DE440; +extern u8 gN64FontCodes[68]; +extern s32 D_800DE48C; +extern OSPfs pfs[MAXCONTROLLERS]; + +u8 func_80072250(s32 arg0); +void func_80072298(u8 arg0); +s32 func_800722E8(s16 arg0); +void func_80072708(void); +s32 get_game_data_file_size(void); +s32 get_time_data_file_size(void); +s32 read_game_data_from_controller_pak(s32 controllerIndex, u8 *fileExt, Settings *settings); +s32 write_game_data_to_controller_pak(s32 controllerIndex, Settings *arg1); +s32 read_time_data_from_controller_pak(s32 controllerIndex, u8 *fileExt, Settings *settings); +s32 write_time_data_to_controller_pak(s32 controllerIndex, Settings *arg1); +s32 write_save_data(s32 saveFileNum, Settings *settings); +s32 read_eeprom_data(Settings *arg0, u8 arg1); +s32 write_eeprom_data(Settings *arg0, u8 arg1); +s32 calculate_eeprom_settings_checksum(u64 eepromSettings); +s32 read_eeprom_settings(u64 *eepromSettings); +s32 write_eeprom_settings(u64 *eepromSettings); +s16 calculate_ghost_header_checksum(GhostHeader *ghostHeader); +void func_80074AA8(GhostHeader *ghostHeader, s16 characterID, s16 time, s16 nodeCount, u8 *dest); +s32 func_80074B1C(void); +SIDeviceStatus get_si_device_status(s32 controllerIndex); +s32 start_reading_controller_data(s32 controllerIndex); +SIDeviceStatus check_for_rumble_pak(s32 controllerIndex); +SIDeviceStatus repair_controller_pak(s32 controllerIndex); +SIDeviceStatus reformat_controller_pak(s32 controllerIndex); +s32 get_controller_pak_file_list(s32 controllerIndex, s32 maxNumOfFilesToGet, u8 **fileNames, u8 **fileExtensions, u32 *fileSizes, u8 *fileTypes); +void func_80076164(void); +s32 get_free_space(s32 controllerIndex, u32 *bytesFree, s32 *notesFree); +s32 delete_file(s32 controllerIndex, s32 fileNum); +s32 copy_controller_pak_data(s32 controllerIndex, s32 fileNumber, s32 secondControllerIndex); +SIDeviceStatus get_file_number(s32 controllerIndex, u8 *fileName, u8 *fileExt, s32 *fileNumber); +SIDeviceStatus read_data_from_controller_pak(s32 controllerIndex, s32 fileNum, u8 *data, s32 dataLength); +SIDeviceStatus write_controller_pak_file(s32 controllerIndex, s32 fileNumber, u8 *fileName, u8 *fileExt, u8 *dataToWrite, s32 fileSize); +SIDeviceStatus get_file_size(s32 controllerIndex, s32 fileNum, s32 *fileSize); +u8 *font_codes_to_string(u8 *inString, u8 *outString, s32 stringLength); +s32 get_file_type(s32 controllerIndex, s32 fileNum); + +s32 func_800738A4(Settings *arg0, u8 *arg1); //Non matching +void func_800732E8(Settings *arg0, u8 *arg1); //Non matching +void func_80073588(Settings *arg0, u64 *eepromData, s32 arg2); //Non matching +s32 func_80073C5C(s32 controllerIndex, s32 arg1, u8 **arg2); //Non matching +void func_8007306C(Settings *arg0, s32 arg1); //Non matching +//Using some context, and best guesses, these could be the names of the variables +s32 func_80074B34(s32 controllerIndex, s16 levelID, s16 vehicleID, s16 *ghostCharacterID, s16 *ghostTime, s16 *ghostNodeCount, GhostHeader *arg6); //Non matching +u8 func_80074204(s32 arg0, Settings *arg1); //Non Matching +void func_8007431C(s32 arg0, Settings *arg1); //Non Matching +s32 func_80072E28(s32, s32); //Non Matching arg2 seems to be many different types +void init_controller_paks(void); //Non Matching +u8 *string_to_font_codes(u8 *inString, u8 *outString, s32 stringLength); + +//Reasonably certain about these names for now. +s32 func_80074EB8(s32 controllerIndex, s16 arg1, s16 arg2, s16 ghostCharacterId, s16 ghostTime, s16 ghostNodeCount, u8 *dest); +s32 func_80075000(s32 controllerIndex, s16 arg1, s16 arg2, s16 ghostCharacterId, s16 ghostTime, s16 ghostNodeCount, GhostHeader *arg6); +s32 func_800753D8(s32 controllerIndex, s32 arg1); +//Pretty bad signature, but at can confidently state arg0 is controllerIndex. +s32 func_800756D4(s32 controllerIndex, s8 *arg1, void *arg2, u8 *arg3, void *arg4); + +#endif diff --git a/src/textures_sprites.c b/src/textures_sprites.c index 6cc66ac0..56f5a739 100644 --- a/src/textures_sprites.c +++ b/src/textures_sprites.c @@ -8,7 +8,7 @@ /************ .data ************/ -u32 gTexColorTag = COLOR_TAG_MAGENTA; +u32 gTexColourTag = COLOR_TAG_MAGENTA; s32 D_800DE7C4 = 1; // See "include/f3ddkr.h" for the defines @@ -962,7 +962,7 @@ TextureHeader *load_texture(s32 arg0) { numberOfTextures = (gTempTextureHeader->header.numOfTextures >> 8) & 0xFFFF; if (!gTempTextureHeader->header.isCompressed) { - tex = allocate_from_main_pool((numberOfTextures * 0x60) + assetSize, gTexColorTag); + tex = allocate_from_main_pool((numberOfTextures * 0x60) + assetSize, gTexColourTag); if (tex == NULL) { return NULL; } @@ -971,7 +971,7 @@ TextureHeader *load_texture(s32 arg0) { temp_v0_5 = byteswap32(&gTempTextureHeader->uncompressedSize); temp_a0 = (numberOfTextures * 0x60) + temp_v0_5; sp3C = temp_v0_5 + 0x20; - tex = allocate_from_main_pool(temp_a0 + 0x20, gTexColorTag); + tex = allocate_from_main_pool(temp_a0 + 0x20, gTexColourTag); if (tex == NULL) { return NULL; } @@ -1054,7 +1054,7 @@ GLOBAL_ASM("asm/non_matchings/textures_sprites/free_texture.s") #endif void func_8007B374(s32 arg0) { - gTexColorTag = arg0; + gTexColourTag = arg0; } #ifdef NON_EQUIVALENT diff --git a/src/textures_sprites.h b/src/textures_sprites.h index 5bdd4565..13723370 100644 --- a/src/textures_sprites.h +++ b/src/textures_sprites.h @@ -7,7 +7,7 @@ #include "structs.h" #include "macros.h" -extern u32 gTexColorTag; +extern u32 gTexColourTag; extern s32 D_800DE7C4; /* Size: 8 bytes */ diff --git a/src/thread0_epc.c b/src/thread0_epc.c index 5c9c5223..ef23e61c 100644 --- a/src/thread0_epc.c +++ b/src/thread0_epc.c @@ -5,11 +5,11 @@ #include "types.h" #include "macros.h" #include "menu.h" -#include "controller_pak.h" +#include "save_data.h" #include "printf.h" #include "unknown_00BC20.h" #include "controller.h" -#include "unknown_06B2B0.h" +#include "game.h" /************ .rodata ************/ @@ -201,7 +201,7 @@ void func_800B7460(s32 *epc, s32 size, s32 mask) { sp38 += size; } } - func_800766D4(0, -1, &D_800E8EE8, &D_800E8EF0, &sp40, 0x800); + write_controller_pak_file(0, -1, &D_800E8EE8, &D_800E8EF0, &sp40, 0x800); while (1); // Infinite loop; waiting for the player to reset the console? } } @@ -225,8 +225,8 @@ s32 get_lockup_status(void) { return sLockupStatus; } else { sLockupStatus = 0; - if ((func_800758DC(controllerIndex) == 0) && //Rumble pack check? - (func_800764E8(controllerIndex, &D_800E8EF4, &D_800E8EFC, &fileNum) == 0) && + if ((get_si_device_status(controllerIndex) == 0) && //Rumble pack check? + (get_file_number(controllerIndex, &D_800E8EF4, &D_800E8EFC, &fileNum) == 0) && (read_data_from_controller_pak(controllerIndex, fileNum, (u8 *)&dataFromControllerPak, sizeof(dataFromControllerPak) * MAXCONTROLLERS) == 0)) { bcopy(&dataFromControllerPak, &gEpcInfo, sizeof(dataFromControllerPak) - 80); //Why less 80 (0x50)? @@ -234,9 +234,9 @@ s32 get_lockup_status(void) { bcopy(&sp420, &D_80129BB0, sizeof(sp420)); sLockupStatus = 1; } - func_80075AEC(controllerIndex); + start_reading_controller_data(controllerIndex); if (sLockupStatus) { - func_800762C8(controllerIndex, fileNum); + delete_file(controllerIndex, fileNum); } return sLockupStatus; } diff --git a/src/thread30.c b/src/thread30.c index 814a52d0..fc721486 100644 --- a/src/thread30.c +++ b/src/thread30.c @@ -4,7 +4,7 @@ #include "thread30.h" #include "macros.h" #include "libultra_internal.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "stacks.h" /************ .data ************/ diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index 9a41c623..9810a3d8 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -7,13 +7,14 @@ #include "types.h" #include "macros.h" #include "structs.h" +#include "level_object_entries.h" #include "asset_sections.h" #include "asset_loading.h" #include "thread0_epc.h" -#include "controller_pak.h" +#include "save_data.h" #include "menu.h" -#include "unknown_06B2B0.h" -#include "unknown_043920.h" +#include "game.h" +#include "racer.h" /************ .data ************/ @@ -195,7 +196,7 @@ s16 D_8011AE78; s16 D_8011AE7A; s16 D_8011AE7C; s8 D_8011AE7E; -s16 D_8011AE80; +s16 D_8011AE80; // TT Ghost outTime at least s16 D_8011AE82; s32 D_8011AE84; s32 D_8011AE88; @@ -247,7 +248,7 @@ s32 D_8011AFFC; s32 D_8011B000; s32 D_8011B004; s32 D_8011B008; -s32 D_8011B010[4]; +s32 D_8011B010[4]; //Possibly Misc Asset 20 pointers Object *D_8011B020[10]; s32 D_8011B048[4]; s32 D_8011B058[4]; @@ -819,8 +820,9 @@ s32 func_800113BC() { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800113CC.s") -void func_80011560(void) { +s32 func_80011560(void) { //! @bug The developers probably intended this to be a void function. D_800DC848 = 1; + // No return value! } GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80011570.s") @@ -840,7 +842,7 @@ extern f32 D_800E5550; void func_80011AD0(Object *this) { f32 tmp_f0; u32 offset; - switch (this->unk48) { + switch (this->behaviorId) { case 47: //L80011B10 if (this->unk7C.word < 0) @@ -940,7 +942,7 @@ void func_80012E28(Object *this) { f32 sp_1c; f32 tmp_f0; - if (this->unk48 == 1) { + if (this->behaviorId == 1) { sp_20 = this->unk64; this->y_rotation += sp_20->unk160; @@ -967,7 +969,7 @@ void func_80012E28(Object *this) { #endif void func_80012F30(Object *arg0) { - if (arg0->unk48 == 1) { + if (arg0->behaviorId == 1) { Object_64 *object_64 = arg0->unk64; arg0->y_rotation -= object_64->unk160; arg0->x_rotation -= object_64->unk162; @@ -983,18 +985,18 @@ void render_object(Object *this) { if (this->unk6 & 0x8000) { func_800B3740(this, &D_8011AE8C, &D_8011AE90, &D_8011AE94, 32768); } else { - if (this->descriptor_ptr->unk53 == 0) + if (this->header->modelType == OBJECT_MODEL_TYPE_3D_MODEL) render_3d_model(this); - else if (this->descriptor_ptr->unk53 == 1) + else if (this->header->modelType == OBJECT_MODEL_TYPE_SPRITE_BILLBOARD) render_3d_billboard(this); - else if (this->descriptor_ptr->unk53 == 4) + else if (this->header->modelType == OBJECT_MODEL_TYPE_UNKNOWN4) func_80011AD0(this); } func_80013548(this); } void func_80013548(Object *arg0) { - if ((arg0->unk6 & 0x8000) == 0 && arg0->descriptor_ptr->unk54 == 1) { + if ((arg0->unk6 & 0x8000) == 0 && arg0->header->behaviorId == 1) { arg0->x_position -= arg0->unk64->unk78; arg0->y_position -= arg0->unk64->unk7C; arg0->z_position -= arg0->unk64->unk80; @@ -1015,8 +1017,8 @@ void func_800142B8(void) { for (; i < objCount; i++) { currObj = gObjPtrList[i]; - if ((currObj->unk6 & 0x8000) == 0 && currObj->descriptor_ptr->unk53 == 0) { - for (j = 0; j < currObj->descriptor_ptr->unk55; j++) { + if ((currObj->unk6 & 0x8000) == 0 && currObj->header->modelType == OBJECT_MODEL_TYPE_3D_MODEL) { + for (j = 0; j < currObj->header->numberOfModelIds; j++) { curr_68 = currObj->unk68[j]; if (curr_68 != NULL && curr_68->unk20 > 0) { curr_68->unk20 = curr_68->unk20-- & 0x03; @@ -1073,7 +1075,7 @@ Object *func_80018C6C(void) { Object *current_obj; for (i = D_8011AE60; i < objCount; i++) { current_obj = gObjPtrList[i]; - if (!(current_obj->unk6 & 0x8000) && (current_obj->unk48 == 62)) + if (!(current_obj->unk6 & 0x8000) && (current_obj->behaviorId == 62)) return current_obj; } return NULL; @@ -1137,8 +1139,8 @@ s32 func_8001B650(void) { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_8001B668.s") -s32 func_8001B738(s32 arg0) { - return func_80059B7C(arg0, func_800599A8(), D_800DC728, D_800DC72C, D_800DC724); +s32 func_8001B738(s32 controllerIndex) { + return func_80059B7C(controllerIndex, func_800599A8(), D_800DC728, D_800DC72C, D_800DC724); } u8 func_8001B780() { @@ -1270,7 +1272,7 @@ void calc_dyn_light_and_env_map_for_object(ObjectModel *model, Object *object, s if (dynamicLightingEnabled) { // Calculates dynamic lighting for the object - if (object->descriptor_ptr->unk71 != 0) { + if (object->header->unk71 != 0) { // Dynamic lighting for some objects? (Intro diddy, Taj, T.T., Bosses) calc_dynamic_lighting_for_object_1(object, model, arg2, object, arg3, 1.0f); } else { @@ -1328,7 +1330,7 @@ void func_8001E36C(s32 arg0, f32 *arg1, f32 *arg2, f32 *arg3) { if (current_obj != NULL && (current_obj->unk6 & 0x8000) == 0 - && current_obj->unk48 == 39 + && current_obj->behaviorId == 39 && current_obj->unk78 == arg0) { *arg1 = current_obj->x_position; *arg2 = current_obj->y_position; @@ -1473,7 +1475,7 @@ Object *func_8002342C(f32 x, f32 z) { for (i = 0; i < objCount; i++) { currObj = gObjPtrList[i]; - if ((currObj->unk6 & 0x8000) == 0 && currObj->unk48 == 87) { + if ((currObj->unk6 & 0x8000) == 0 && currObj->behaviorId == 87) { x = currObj->x_position - x; z = currObj->z_position - z; dist = sqrtf(x * x + z * z); @@ -1507,614 +1509,639 @@ void func_800235D0(s32 arg0) { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800235DC.s") -void func_800238BC(Object *arg0, void *arg1) { - arg0->unk48 = arg0->descriptor_ptr->unk54; - switch (arg0->unk48 - 1) { - case 0x00: - func_8004DAB0(arg0, arg1); +void run_object_init_func(Object *obj, void *entry, s32 arg2) { + obj->behaviorId = obj->header->behaviorId; + switch (obj->behaviorId - 1) { // Why the minus 1? + case 0: + obj_init_racer(obj, (LevelObjectEntry_Racer *)entry); break; - case 0x01: - func_80033CC0(arg0, arg1); + case 1: + obj_init_scenery(obj, (LevelObjectEntry_Scenery*)entry); break; - case 0x02: - func_80036C30(arg0, arg1); + case 2: + obj_init_fish(obj, (LevelObjectEntry_Fish *)entry); break; - case 0x03: - func_800376E0(arg0, arg1); + case 3: + obj_init_animator(obj, (LevelObjectEntry_Animator *)entry, arg2); break; - case 0x05: - func_800389AC(arg0, arg1); + case 5: + obj_init_smoke(obj, (LevelObjectEntry_Smoke *)entry); break; - case 0x18: - func_80038A6C(arg0, arg1); + case 24: + obj_init_unknown25(obj, (LevelObjectEntry_Unknown25 *)entry); break; - case 0x15: - func_80038B74(arg0, arg1); + case 21: + obj_init_bombexplosion(obj, (LevelObjectEntry_BombExplosion *)entry); break; - case 0x06: - func_80038E3C(arg0, arg1); + case 6: + obj_init_exit(obj, (LevelObjectEntry_Exit *)entry); break; - case 0x07: - func_8003FD68(arg0, arg1); + case 7: + obj_init_audio(obj, (LevelObjectEntry_Audio *)entry); break; - case 0x08: - case 0x12: - func_8003FEF4(arg0, arg1); + case 8: + case 18: + obj_init_audioline(obj, (LevelObjectEntry_AudioLine *)entry); break; - case 0x1A: - func_8004001C(arg0, arg1); + case 26: + obj_init_audioreverb(obj, (LevelObjectEntry_AudioReverb *)entry); break; - case 0x09: - func_80039160(arg0, arg1); + case 9: + obj_init_cameracontrol(obj, (LevelObjectEntry_CameraControl *)entry); break; - case 0x0A: - func_80039190(arg0, arg1); + case 10: + obj_init_setuppoint(obj, (LevelObjectEntry_SetupPoint *)entry); break; - case 0x0B: - func_800391C8(arg0, arg1); + case 11: + obj_init_dino_whale(obj, (LevelObjectEntry_Dino_Whale *)entry); break; - case 0x0C: - func_8003ACBC(arg0, arg1); + case 12: + obj_init_checkpoint(obj, (LevelObjectEntry_Checkpoint *)entry, arg2); break; - case 0x1D: - func_8003AD34(arg0, arg1); + case 29: + obj_init_modechange(obj, (LevelObjectEntry_ModeChange *)entry); break; - case 0x28: - func_8003B058(arg0, arg1); + case 40: + obj_init_bonus(obj, (LevelObjectEntry_Bonus *)entry); break; - case 0x0D: - func_8003B7CC(arg0, arg1); + case 13: + obj_init_door(obj, (LevelObjectEntry_Door *)entry); break; - case 0x6E: - func_8003C1E0(arg0, arg1); + case 110: + obj_init_ttdoor(obj, (LevelObjectEntry_TTDoor *)entry); break; - case 0x0E: - func_8003CF18(arg0, arg1); + case 14: + obj_init_fogchanger(obj, (LevelObjectEntry_FogChanger *)entry); break; - case 0x0F: - func_8003CFE0(arg0, arg1); + case 15: + obj_init_ainode(obj, (LevelObjectEntry_AiNode *)entry); break; - case 0x10: - func_8003DFCC(arg0, arg1); + case 16: + obj_init_weaponballoon(obj, (LevelObjectEntry_WeaponBalloon *)entry); break; - case 0x16: - func_8003E5B0(arg0, arg1); + case 22: + obj_init_wballoonpop(obj, (LevelObjectEntry_WBalloonPop *)entry); break; - case 0x04: - case 0x11: - func_8003E5C8(arg0, arg1); + case 4: + case 17: + obj_init_weapon(obj, (LevelObjectEntry_Weapon *)entry); break; - case 0x19: - func_8003CF58(arg0, arg1); + case 25: + obj_init_skycontrol(obj, (LevelObjectEntry_SkyControl *)entry); break; - case 0x1B: - func_80034AF0(arg0, arg1); + case 27: + obj_init_torch_mist(obj, (LevelObjectEntry_Torch_Mist *)entry); break; - case 0x1C: - func_800400A4(arg0, arg1); + case 28: + obj_init_texscroll(obj, (LevelObjectEntry_TexScroll *)entry, arg2); break; - case 0x1E: - func_80036194(arg0, arg1); + case 30: + obj_init_stopwatchman(obj, (LevelObjectEntry_StopWatchMan *)entry); break; - case 0x1F: - func_8003D534(arg0, arg1); + case 31: + obj_init_coin(obj, (LevelObjectEntry_Banana *)entry); break; - case 0x20: - func_800403A8(arg0, arg1); + case 32: + obj_init_rgbalight(obj, (LevelObjectEntry_RgbaLight *)entry, arg2); break; - case 0x23: - func_800403D8(arg0, arg1); + case 35: + obj_init_buoy_pirateship(obj, (LevelObjectEntry_Buoy_PirateShip *)entry, arg2); break; - case 0x42: - func_8004049C(arg0, arg1); + case 66: + obj_init_log(obj, (LevelObjectEntry_Log *)entry, arg2); break; - case 0x24: - func_80040800(arg0, arg1); + case 36: + obj_init_weather(obj, (LevelObjectEntry_Weather *)entry); break; - case 0x25: - func_8003C9EC(arg0, arg1); + case 37: + obj_init_bridge_whaleramp(obj, (LevelObjectEntry_Bridge_WhaleRamp *)entry); break; - case 0x26: - func_8003CE64(arg0, arg1); + case 38: + obj_init_rampswitch(obj, (LevelObjectEntry_RampSwitch *)entry); break; - case 0x27: - func_8003CF00(arg0, arg1); + case 39: + obj_init_seamonster(obj, (LevelObjectEntry_SeaMonster *)entry); break; - case 0x2A: - func_8004092C(arg0, arg1); + case 42: + obj_init_lensflare(obj, (LevelObjectEntry_LensFlare *)entry); break; - case 0x2B: - func_8004094C(arg0, arg1); + case 43: + obj_init_lensflareswitch(obj, (LevelObjectEntry_LensFlareSwitch *)entry); break; - case 0x2C: - func_8003522C(arg0, arg1); + case 44: + obj_init_collectegg(obj, (LevelObjectEntry_CollectEgg *)entry); break; - case 0x2D: - func_80035640(arg0, arg1); + case 45: + obj_init_eggcreator(obj, (LevelObjectEntry_EggCreator *)entry); break; - case 0x2E: - func_80035EF8(arg0, arg1); + case 46: + obj_init_characterflag(obj, (LevelObjectEntry_CharacterFlag *)entry); break; - case 0x30: - func_80037A18(arg0, arg1); + case 48: + obj_init_animation(obj, (LevelObjectEntry_Animation *)entry); break; - case 0x33: - func_80038854(arg0, arg1); + case 51: + obj_init_infopoint(obj, (LevelObjectEntry_InfoPoint *)entry); break; - case 0x36: - func_8003C644(arg0, arg1); + case 54: + obj_init_trigger(obj, (LevelObjectEntry_Trigger *)entry); break; - case 0x38: - case 0x5C: - func_8003588C(arg0, arg1); + case 56: + case 92: + obj_init_airzippers_waterzippers(obj, (LevelObjectEntry_AirZippers_WaterZippers *)entry); break; - case 0x39: - func_80035E20(arg0, arg1); + case 57: + obj_init_unknown58(obj, (LevelObjectEntry_Unknown58 *)entry); break; - case 0x3A: - func_800409A4(arg0, arg1); + case 58: + obj_init_wavegenerator(obj, (LevelObjectEntry_WaveGenerator *)entry, arg2); break; - case 0x3C: - func_800409C8(arg0, arg1); + case 60: + obj_init_butterfly(obj, (LevelObjectEntry_Butterfly *)entry); break; - case 0x3D: - func_800392B8(arg0, arg1); + case 61: + obj_init_parkwarden(obj, (LevelObjectEntry_Parkwarden *)entry); break; - case 0x3F: - func_8003DE74(arg0, arg1); + case 63: + obj_init_worldkey(obj, (LevelObjectEntry_WorldKey *)entry); break; - case 0x40: - func_8003D3EC(arg0, arg1); + case 64: + obj_init_coincreator(obj, (LevelObjectEntry_BananaCreator *)entry); break; - case 0x41: - func_8003D038(arg0, arg1); + case 65: + obj_init_treasuresucker(obj, (LevelObjectEntry_TreasureSucker *)entry); break; - case 0x43: - func_80037578(arg0, arg1); + case 67: + obj_init_lavaspurt(obj, (LevelObjectEntry_LavaSpurt *)entry); break; - case 0x44: - func_80037624(arg0, arg1); + case 68: + obj_init_posarrow(obj, (LevelObjectEntry_PosArrow *)entry); break; - case 0x45: - case 0x66: - func_8003818C(arg0, arg1); + case 69: + case 102: + obj_init_hittester(obj, (LevelObjectEntry_HitTester *)entry); break; - case 0x47: - case 0x5E: - case 0x67: - func_800381E0(arg0, arg1); + case 71: + case 94: + case 103: + obj_init_dynamic_lighting_object(obj, (LevelObjectEntry_DynamicLightingObject *)entry); break; - case 0x5F: - case 0x64: - func_80038214(arg0, arg1); + case 95: + case 100: + obj_init_unknown96(obj, (LevelObjectEntry_Unknown96 *)entry); break; - case 0x60: - case 0x65: - func_80038248(arg0, arg1); + case 96: + case 101: + obj_init_snowball(obj, (LevelObjectEntry_Snowball *)entry); break; - case 0x46: - func_80041A90(arg0, arg1); + case 70: + obj_init_midifade(obj, (LevelObjectEntry_MidiFade *)entry); break; - case 0x6F: - func_80041E80(arg0, arg1); + case 111: + obj_init_midifadepoint(obj, (LevelObjectEntry_MidiFadePoint *)entry); break; - case 0x75: - func_80042014(arg0, arg1); + case 117: + obj_init_midichset(obj, (LevelObjectEntry_Midichset *)entry); break; - case 0x48: - func_80034B68(arg0, arg1); + case 72: + obj_init_effectbox(obj, (LevelObjectEntry_EffectBox *)entry); break; - case 0x49: - func_80034E70(arg0, arg1); + case 73: + obj_init_trophycab(obj, (LevelObjectEntry_TrophyCab *)entry); break; - case 0x4A: - func_8004203C(arg0, arg1); + case 74: + obj_init_bubbler(obj, (LevelObjectEntry_Bubbler *)entry); break; - case 0x4B: - func_8003D2AC(arg0, arg1); + case 75: + obj_init_flycoin(obj, (LevelObjectEntry_FlyCoin *)entry); break; - case 0x4C: - func_8003B368(arg0, arg1); + case 76: + obj_init_goldenballoon(obj, (LevelObjectEntry_GoldenBalloon *)entry); break; - case 0x4D: - func_80034844(arg0, arg1); + case 77: + obj_init_laserbolt(obj, (LevelObjectEntry_Laserbolt *)entry); break; - case 0x4E: - func_80034530(arg0, arg1); + case 78: + obj_init_lasergun(obj, (LevelObjectEntry_Lasergun *)entry); break; - case 0x51: - func_80035AE8(arg0, arg1); + case 81: + obj_init_groundzipper(obj, (LevelObjectEntry_GroundZipper *)entry); break; - case 0x52: - func_80037D54(arg0, arg1); + case 82: + obj_init_overridepos(obj, (LevelObjectEntry_OverridePos *)entry); break; - case 0x53: - func_80037D6C(arg0, arg1); + case 83: + obj_init_wizpigship(obj, (LevelObjectEntry_WizpigShip *)entry); break; - case 0x58: - func_8004210C(arg0, arg1); + case 88: + obj_init_boost(obj, (LevelObjectEntry_Boost *)entry); break; - case 0x57: - func_8003DC5C(arg0, arg1); + case 87: + obj_init_silvercoin(obj, (LevelObjectEntry_SilverCoin *)entry); break; - case 0x59: - func_80038AC8(arg0, arg1); + case 89: + obj_init_wardensmoke(obj, (LevelObjectEntry_WardenSmoke *)entry); break; - case 0x5D: - func_80042150(arg0, arg1); + case 93: + obj_init_unknown94(obj, (LevelObjectEntry_Unknown94 *)entry, arg2); break; - case 0x61: - func_80038D58(arg0, arg1); + case 97: + obj_init_teleport(obj, (LevelObjectEntry_Teleport *)entry); break; - case 0x62: - case 0x63: - func_8003572C(arg0, arg1); + case 98: + case 99: + obj_init_lighthouse_rocketsignpost(obj, (LevelObjectEntry_Lighthouse_RocketSignpost *)entry); break; - case 0x68: - func_8004216C(arg0, arg1); + case 104: + obj_init_rangetrigger(obj, (LevelObjectEntry_RangeTrigger *)entry); break; - case 0x6B: - case 0x73: - func_80033F44(arg0, arg1); + case 107: + case 115: + obj_init_fireball_octoweapon(obj, (LevelObjectEntry_Fireball_Octoweapon *)entry); break; - case 0x6C: - func_80042210(arg0, arg1); + case 108: + obj_init_frog(obj, (LevelObjectEntry_Frog *)entry); break; - case 0x6D: - func_8003DBA0(arg0, arg1); + case 109: + obj_init_silvercoin_adv2(obj, (LevelObjectEntry_SilverCoinAdv2 *)entry); break; - case 0x74: - func_80042A1C(arg0, arg1); + case 116: + obj_init_levelname(obj, (LevelObjectEntry_LevelName *)entry); break; } } -#ifdef NON_EQUIVALENT s32 func_80023E30(s32 arg0) { - switch (arg0 - 1) { - case 0x00: - return 0x1F; - case 0x01: - return 0x13; - case 0x04: - return 0x16; - case 0x0B: - return 0x1B; - case 0x0D: - case 0x6E: - return 0x30; - case 0x10: - case 0x4C: - return 0x12; - case 0x45: - case 0x47: - case 0x5F: - case 0x60: - return 0x3B; - case 0x64: - case 0x65: - case 0x66: - case 0x67: - return 0x3A; - case 0x17: - return 0x04; - case 0x1E: - return 0x1B; - case 0x1F: - case 0x3F: - case 0x57: - case 0x6D: - return 0x12; - case 0x42: - return 0x30; - case 0x25: - return 0x39; - case 0x26: - return 0x12; - case 0x27: - return 0x09; - case 0x2C: - return 0x12; - case 0x2F: - return 0x09; - case 0x3E: - return 0x09; - case 0x31: - case 0x37: - case 0x4F: - case 0x53: - case 0x55: - case 0x72: - return 0x0B; - case 0x35: - return 0x0B; - case 0x49: - case 0x5E: - case 0x62: - case 0x63: - return 0x31; - case 0x5A: - return 0x01; - case 0x50: - return 0x0A; - case 0x06: - case 0x0C: - case 0x11: - case 0x19: - case 0x1D: - case 0x23: - case 0x28: - case 0x33: - case 0x36: - case 0x38: - case 0x43: - case 0x4D: - case 0x4E: - case 0x5C: - case 0x61: - case 0x6B: - case 0x73: - return 0x10; - case 0x51: - return 0x12; - case 0x30: - case 0x32: - case 0x3C: - return 0x02; - case 0x3D: - return 0x1B; - case 0x6C: - return 0x0B; - case 0x71: - return 0x01; - default: - return 0x00; - } + s32 value = 0; + switch (arg0 - 1){ + case 0x00: + value = 0x1F; + break; + case 0x01: + value = 0x13; + break; + case 0x04: + value = 0x16; + break; + case 0x0B: + value = 0x1B; + break; + case 0x0D: + case 0x6E: + value = 0x30; + break; + case 0x10: + case 0x4C: + value = 0x12; + break; + case 0x45: + case 0x47: + case 0x5F: + case 0x60: + value = 0x3B; + break; + case 0x64: + case 0x65: + case 0x66: + case 0x67: + value = 0x3A; + break; + case 0x17: + value = 0x04; + break; + case 0x1E: + value = 0x1B; + break; + case 0x1F: + case 0x3F: + case 0x57: + case 0x6D: + value = 0x12; + break; + case 0x42: + value = 0x30; + break; + case 0x25: + value = 0x39; + break; + case 0x26: + value = 0x12; + break; + case 0x27: + value = 0x09; + break; + case 0x2C: + value = 0x12; + break; + case 0x2F: + value = 0x09; + break; + case 0x3E: + value = 0x09; + break; + case 0x31: + case 0x37: + case 0x4F: + case 0x53: + case 0x55: + case 0x72: + value = 0x0B; + break; + case 0x35: + value = 0x0B; + break; + case 0x49: + case 0x5E: + case 0x62: + case 0x63: + value = 0x31; + break; + case 0x5A: + value = 0x01; + break; + case 0x50: + value = 0x0A; + break; + case 0x06: + case 0x0C: + case 0x11: + case 0x19: + case 0x1D: + case 0x23: + case 0x28: + case 0x33: + case 0x36: + case 0x38: + case 0x43: + case 0x4D: + case 0x4E: + case 0x5C: + case 0x61: + case 0x6B: + case 0x73: + value = 0x10; + break; + case 0x51: + value = 0x12; + break; + case 0x30: + case 0x32: + case 0x3C: + value = 0x02; + break; + case 0x3D: + value = 0x1B; + break; + case 0x6C: + value = 0x0B; + break; + case 0x71: + value = 0x01; + break; + } + return value; } -#else -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80023E30.s") -#endif void run_object_loop_func(Object *obj, s32 arg1) { func_800B76B8(1, obj->unk4A); - switch (obj->unk48) { + switch (obj->behaviorId) { case 2: - func_80033DD0(obj, arg1); + obj_loop_scenery(obj, arg1); break; case 3: - func_800370D4(obj, arg1); + obj_loop_fish(obj, arg1); break; case 4: - func_800377E4(obj, arg1); + obj_loop_animator(obj, arg1); break; case 6: - func_800389B8(obj, arg1); + obj_loop_smoke(obj, arg1); break; case 25: - func_80038A78(obj, arg1); + obj_loop_unknown25(obj, arg1); break; case 22: - func_80038BF4(obj, arg1); + obj_loop_bombexplosion(obj, arg1); break; case 7: - func_80038F58(obj, arg1); + obj_loop_exit(obj, arg1); break; case 10: - func_80039184(obj, arg1); + obj_loop_cameracontrol(obj, arg1); break; case 11: - func_800391BC(obj, arg1); + obj_loop_setuppoint(obj, arg1); break; case 12: - func_800391FC(obj, arg1); + obj_loop_dino_whale(obj, arg1); break; case 13: - func_8003AD28(obj, arg1); + obj_loop_checkpoint(obj, arg1); break; case 30: - func_8003AE50(obj, arg1); + obj_loop_modechange(obj, arg1); break; case 41: - func_8003B174(obj, arg1); + obj_loop_bonus(obj, arg1); break; case 14: - func_8003B988(obj, arg1); + obj_loop_door(obj, arg1); break; case 15: - func_80030A74(obj); + obj_loop_fogchanger(obj); break; case 16: - func_8003D02C(obj, arg1); + obj_loop_ainode(obj, arg1); break; case 17: - func_8003E140(obj, arg1); + obj_loop_weaponballoon(obj, arg1); break; case 23: - func_8003E5BC(obj, arg1); + obj_loop_wballoonpop(obj, arg1); break; case 5: case 18: - func_8003E630(obj, arg1); + obj_loop_weapon(obj, arg1); break; case 26: - func_8003CF98(obj, arg1); + obj_loop_skycontrol(obj, arg1); break; case 28: - func_80034B4C(obj, arg1); + obj_loop_torch_mist(obj, arg1); break; case 29: - func_80040148(obj, arg1); + obj_loop_texscroll(obj, arg1); break; case 31: - func_800361E0(obj, arg1); + obj_loop_stopwatchman(obj, arg1); break; case 32: - func_8003D5A0(obj, arg1); + obj_loop_coin(obj, arg1); break; case 36: - func_80040448(obj, arg1); + obj_loop_buoy_pirateship(obj, arg1); break; case 67: - func_80040570(obj, arg1); + obj_loop_log(obj, arg1); break; case 37: - func_80040820(obj, arg1); + obj_loop_weather(obj, arg1); break; case 38: - func_8003CA68(obj, arg1); + obj_loop_bridge_whaleramp(obj, arg1); break; case 39: - func_8003CEA0(obj, arg1); + obj_loop_rampswitch(obj, arg1); break; case 40: - func_8003CF0C(obj, arg1); + obj_loop_seamonster(obj, arg1); break; case 45: - func_80035260(obj, arg1); + obj_loop_collectegg(obj, arg1); break; case 46: - func_8003564C(obj, arg1); + obj_loop_eggcreator(obj, arg1); break; case 47: - func_80035F6C(obj, arg1); + obj_loop_characterflag(obj, arg1); break; case 50: case 81: case 85: case 86: - func_80037CE8(obj, arg1); + obj_loop_animobject(obj, arg1); break; case 119: - func_80042CD0(obj, arg1); + obj_loop_wizghosts(obj, arg1); break; case 51: - func_80038710(obj, arg1); + obj_loop_animcamera(obj, arg1); break; case 52: - func_800388D4(obj, arg1); + obj_loop_infopoint(obj, arg1); break; case 53: - func_800387CC(obj, arg1); + obj_loop_animcar(obj, arg1); break; case 54: - func_8003833C(obj, arg1); + obj_loop_char_select(obj, arg1); break; case 55: - func_8003C7A4(obj, arg1); + obj_loop_trigger(obj, arg1); break; case 56: - func_800380F8(obj, arg1); + obj_loop_vehicleanim(obj, arg1); break; case 57: case 93: - func_8003596C(obj, arg1); + obj_loop_airzippers_waterzippers(obj, arg1); break; case 58: - func_80035E34(obj, arg1); + obj_loop_unknown58(obj, arg1); break; case 60: - func_800BFFDC(obj); + obj_loop_wavepower(obj); break; case 61: - func_80040C54(obj, arg1); + obj_loop_butterfly(obj, arg1); break; case 62: - func_80039330(obj, arg1); + obj_loop_parkwarden(obj, arg1); break; case 64: - obj_loop_world_key(obj, arg1); //arg1=speed + obj_loop_worldkey(obj, arg1); //arg1=speed break; case 65: - func_8003D3FC(obj, arg1); + obj_loop_coincreator(obj, arg1); break; case 66: - func_8003D058(obj, arg1); + obj_loop_treasuresucker(obj, arg1); break; case 68: - func_80037594(obj, arg1); + obj_loop_lavaspurt(obj, arg1); break; case 69: - func_8003763C(obj, arg1); + obj_loop_posarrow(obj, arg1); break; case 70: case 72: case 103: case 104: - func_800381C0(obj, arg1); + obj_loop_hittester(obj, arg1); break; case 96: case 97: case 101: case 102: - func_8003827C(obj, arg1); + obj_loop_snowball(obj, arg1); break; case 73: - func_80034B74(obj, arg1); + obj_loop_effectbox(obj, arg1); break; case 74: - func_80034E9C(obj, arg1); + obj_loop_trophycab(obj, arg1); break; case 75: - func_80042090(obj, arg1); + obj_loop_bubbler(obj, arg1); break; case 76: - func_8003D2B8(obj, arg1); + obj_loop_flycoin(obj, arg1); break; case 77: - func_8003B4BC(obj, arg1); + obj_loop_goldenballoon(obj, arg1); break; case 78: - func_80034860(obj, arg1); + obj_loop_laserbolt(obj, arg1); break; case 79: - func_800345A0(obj, arg1); + obj_loop_lasergun(obj, arg1); break; case 80: - func_8003ACA0(obj, arg1); + obj_loop_gbparkwarden(obj, arg1); break; case 82: - func_80035C50(obj, arg1); + obj_loop_groundzipper(obj, arg1); break; case 84: - func_80037D78(obj, arg1); + obj_loop_wizpigship(obj, arg1); break; case 88: case 110: - func_8003DD14(obj, arg1); + obj_loop_silvercoin(obj, arg1); break; case 90: - func_80038AD4(obj, arg1); + obj_loop_wardensmoke(obj, arg1); break; case 94: - func_80042160(obj, arg1); + obj_loop_unknown94(obj, arg1); break; case 98: - func_80038DC4(obj, arg1); + obj_loop_teleport(obj, arg1); break; case 105: - func_80042178(obj, arg1); + obj_loop_rangetrigger(obj, arg1); break; case 100: - func_800357D4(obj, arg1); + obj_loop_rocketsignpost(obj, arg1); break; case 108: case 116: - func_80033F60(obj, arg1); + obj_loop_fireball_octoweapon(obj, arg1); break; case 109: - func_800422F0(obj, arg1); + obj_loop_frog(obj, arg1); break; case 111: - func_8003C2E4(obj, arg1); + obj_loop_ttdoor(obj, arg1); break; case 113: - func_80037D08(obj, arg1); + obj_loop_dooropener(obj, arg1); break; case 115: - func_80042998(obj, arg1); + obj_loop_pigrocketeer(obj, arg1); break; case 117: - func_80042A90(obj, arg1); + obj_loop_levelname(obj, arg1); break; } func_800B76B8(1, -1); diff --git a/src/unknown_00BC20.h b/src/unknown_00BC20.h index 833fb3bf..530b51ab 100644 --- a/src/unknown_00BC20.h +++ b/src/unknown_00BC20.h @@ -4,6 +4,7 @@ #include "types.h" #include "structs.h" #include "f3ddkr.h" +#include "object_functions.h" /* Size: 0x8 bytes */ typedef struct unknown800DC6F0 { @@ -151,7 +152,7 @@ void func_80011390(void); s32 func_8001139C(); s32 func_800113AC(); s32 func_800113BC(); -void func_80011560(void); +s32 func_80011560(void); void func_80012C30(void); void func_80012C3C(Gfx** dlist); void func_80012C98(Gfx **dlist); @@ -173,7 +174,7 @@ s32 func_8001B2E0(); s32 func_8001B3AC(s32 arg0); s32 func_8001B640(); s32 func_8001B650(void); -s32 func_8001B738(s32 arg0); +s32 func_8001B738(s32 controllerIndex); u8 func_8001B780(); void func_8001B790(void); unknown8011AECC *func_8001BA00(s32 arg0); @@ -211,7 +212,7 @@ s8 func_8002341C(void); s32 func_80023568(void); s8 func_800235C0(void); void func_800235D0(s32 arg0); -void func_800238BC(Object *arg0, void *arg1); +void run_object_init_func(Object *arg0, void *arg1, s32 arg2); void run_object_loop_func(Object *obj, s32 arg1); void func_8002458C(s32 arg0); s16 *func_80024594(s32 *arg0, s32 *arg1); diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index dccfdaf5..c0de9fea 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -10,9 +10,9 @@ #include "PR/gu.h" #include "textures_sprites.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "memory.h" -#include "unknown_043920.h" +#include "racer.h" #include "camera.h" #include "waves.h" @@ -411,7 +411,7 @@ void render_level_geometry_and_objects(void) { render_floor_decal(obj, obj->unk50); } func_80012D5C(&D_8011B0A0, &D_8011B0A4, &D_8011B0A8, obj); - if ((obj->unk58 != NULL) && (obj->descriptor_ptr->unk30 & 0x10)) { + if ((obj->unk58 != NULL) && (obj->header->unk30 & 0x10)) { func_8002D670(obj, obj->unk58); } } @@ -435,7 +435,7 @@ void render_level_geometry_and_objects(void) { render_floor_decal(obj, obj->unk50); } func_80012D5C(&D_8011B0A0, &D_8011B0A4, &D_8011B0A8, obj); - if ((obj->unk58 != NULL) && (obj->descriptor_ptr->unk30 & 0x10)) { + if ((obj->unk58 != NULL) && (obj->header->unk30 & 0x10)) { func_8002D670(obj, obj->unk58); } } @@ -484,7 +484,7 @@ void render_level_geometry_and_objects(void) { } // This is being called when it shouldn't. func_80012D5C(&D_8011B0A0, &D_8011B0A4, &D_8011B0A8, obj); - if ((obj->unk58 != 0) && (obj->descriptor_ptr->unk30 & 0x10)) { + if ((obj->unk58 != 0) && (obj->header->unk30 & 0x10)) { func_8002D670(obj, obj->unk58); } } @@ -1054,7 +1054,7 @@ void func_8003093C(s32 arg0) { gDPSetFogColor(D_8011B0A0++, D_8011D388[arg0].unk0 >> 0x10, D_8011D388[arg0].unk4 >> 0x10, D_8011D388[arg0].unk8 >> 0x10, 0xFF); gSPFogPosition(D_8011B0A0++, D_8011D388[arg0].unkC >> 0x10, D_8011D388[arg0].unk10 >> 0x10); } -GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80030A74.s") +GLOBAL_ASM("asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s") GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80030DE0.s") void func_80031018(void) { diff --git a/src/unknown_032760.c b/src/unknown_032760.c index a6559663..0fe20b8b 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -149,8 +149,8 @@ void func_80032C7C(Object *object) { s16 phi_a0, phi_a1; unk800DC950 *entry; - if (object->descriptor_ptr->unk3D == 0) { - switch (object->descriptor_ptr->unk53) { // Model type + if (object->header->unk3D == 0) { + switch (object->header->unk53) { // Model type case 0: // 3D Model sp64 = 2; break; @@ -199,7 +199,7 @@ void func_80032C7C(Object *object) { if (f20 > 0.0f) { f20 *= func_80033A14(entry); if (f20 > 0.0f) { - if (object->descriptor_ptr->unk71 != 0) { + if (object->header->unk71 != 0) { if (D_8011D4C0 > 0.0f) { temp = 1.0f / sqrtf(D_8011D4C0); D_8011D4C4 *= temp; @@ -227,7 +227,7 @@ void func_80032C7C(Object *object) { } } - if (object->descriptor_ptr->unk71 != 0) { + if (object->header->unk71 != 0) { if (D_800DC968 == 0) { object->unk54->unk7 = 0; object->unk54->unk11 = 0; diff --git a/src/unknown_0348C0.c b/src/unknown_0348C0.c deleted file mode 100644 index e268f394..00000000 --- a/src/unknown_0348C0.c +++ /dev/null @@ -1,1546 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80033CC0 */ - -#include "unknown_0348C0.h" - -#include "PR/os_cont.h" -#include "types.h" -#include "macros.h" -#include "structs.h" -#include "video.h" -#include "camera.h" -#include "menu.h" // For cheats -#include "unknown_0ABDF0.h" -#include "unknown_043920.h" -#include "unknown_06B2B0.h" -#include "audio.h" -#include "unknown_008C40.h" -#include "unknown_00BC20.h" -#include "particles.h" -#include "unknown_0255E0.h" -#include "font.h" -#include "unknown_032760.h" -#include "unknown_09F8F0.h" -#include "waves.h" -#include "unknown_003260.h" - -/************ .data ************/ - -// Unsure about the signed/unsigned with these arrays. -u16 D_800DC970[4] = { - 0x40FF, 0xFFFF, 0x0007, 0x0003 -}; -u16 D_800DC978[4] = { - 0x0000, 0x0000, 0x001E, 0xFFFF -}; -u16 D_800DC980[20] = { - 0xFF00, 0x0100, 0x0000, 0xFFFF, - 0xFFFF, 0x0100, 0x0100, 0x0000, - 0xFFFF, 0xFFFF, 0x0100, 0xFF00, - 0x0000, 0xFFFF, 0xFFFF, 0xFF00, - 0xFF00, 0x0000, 0xFFFF, 0xFFFF, -}; -u16 D_800DC9A8[20] = { - 0x0000, 0x0040, 0xFFC0, 0x0000, - 0xFFC0, 0xFFC0, 0x0000, 0x0040, - 0x0020, 0x0000, 0xFFC0, 0x0020, - 0x0000, 0x0040, 0x0040, 0x0000, - 0xFFC0, 0x0040, 0x0000, 0x0000, -}; -u16 D_800DC9D0[64] = { - 0x0000, 0x0301, 0x0004, 0x0000, - 0x0001, 0x0004, 0x0004, 0x0004, - 0x0000, 0x0203, 0x0004, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0004, - 0x0002, 0x0503, 0x0001, 0x0000, - 0x0000, 0x0004, 0x0001, 0x0004, - 0x0002, 0x0405, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0004, - 0x0000, 0x0103, 0x0004, 0x0000, - 0x0004, 0x0004, 0x0001, 0x0004, - 0x0000, 0x0302, 0x0004, 0x0000, - 0x0001, 0x0004, 0x0001, 0x0000, - 0x0002, 0x0305, 0x0001, 0x0000, - 0x0001, 0x0004, 0x0000, 0x0004, - 0x0002, 0x0504, 0x0001, 0x0000, - 0x0000, 0x0004, 0x0000, 0x0000, -}; -s8 D_800DCA50[8] = { - 2, 5, 6, 3, 10, 8, 7, 9 -}; -u8 D_800DCA58[9] = { - 2, 5, 6, 3, 10, 8, 7, 9, 11 -}; -s8 D_800DCA64[9] = { - 2, 5, 6, 3, 10, 8, 7, 9, 12 -}; -s8 D_800DCA70[10] = { - 2, 5, 6, 3, 10, 8, 7, 9, 11, 12 -}; -s32 D_800DCA7C[3] = { // Not sure about typing - 0, 0, 0 -}; -s32 D_800DCA88[3] = { // Not sure about typing - 0, 0, 0 -}; - -s8 D_800DCA94[8] = { - 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00 -}; - -s8 D_800DCA9C[12] = { - 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; -u16 D_800DCAA8[64] = { - 0x0000, 0x0301, 0x0000, 0x0000, - 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, - 0x0000, 0x0203, 0x0000, 0x0000, - 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, - 0x0002, 0x0503, 0xFFFF, 0x0000, - 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, - 0x0002, 0x0405, 0xFFFF, 0x0000, - 0x0000, 0x0000, 0x0000, 0xFFFF, - 0x0000, 0x0103, 0x0000, 0x0000, - 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, - 0x0000, 0x0302, 0x0000, 0x0000, - 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, - 0x0002, 0x0305, 0xFFFF, 0x0000, - 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, - 0x0002, 0x0504, 0xFFFF, 0x0000, - 0x0000, 0xFFFF, 0x0000, 0x0000, -}; -u16 D_800DCB28[20] = { - 0xFFC0, 0x0000, 0x0020, 0xFFC0, - 0x0000, 0xFFE0, 0x0000, 0x0000, - 0x0020, 0x0000, 0x0000, 0xFFE0, - 0x0040, 0x0000, 0x0020, 0x0040, - 0x0000, 0xFFE0, 0x0000, 0x0000, -}; - -/*******************************/ - -/************ .bss ************/ - -f32 D_8011D4D0; -s32 D_8011D4D4; -s32 D_8011D4D8; -s32 D_8011D4DC; -s16 D_8011D4E0; -s16 D_8011D4E2; - -/******************************/ - -#ifdef NON_EQUIVALENT -typedef struct LevelObjectEntry80033CC0 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; -} LevelObjectEntry80033CC0; - -typedef struct Object_50_80033CC0 { - f32 unk0; -} Object_50_80033CC0; - -void func_80033CC0(Object *arg0, LevelObjectEntry80033CC0 *arg1) { - f32 phi_f0; - arg0->unk6 |= 2; - phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10) { - phi_f0 = 10; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - ((Object_50_80033CC0 *)arg0->unk50)->unk0 = arg0->descriptor_ptr->unk4 * phi_f0; - arg0->unk3A = arg1->unk8; - arg0->y_rotation = arg1->unkA << 6 << 4; - if (arg1->unkB) { - // Regalloc issue here - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 1; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - arg0->unk4C->unk16 = -5; - arg0->unk4C->unk17 = arg1->unkB; - } - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } - arg0->unk78 = 0; - arg0->unk7C.word = 0; -} -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033CC0.s") -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033DD0.s") - -void func_80033F44(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033F60.s") - -void func_80034530(Object *arg0, unk80034530 *arg1) { - Object_64 *temp; - arg0->unk4C->unk14 = 0x22; - arg0->unk4C->unk11 = 0; - temp = arg0->unk64; - temp->unkE = arg1->unkA; - temp->unkF = arg1->unkB; - temp->unk10 = arg1->unkC; - temp->unk11 = arg1->unkD; - temp->unkCD.half = temp->unkF; - arg0->y_rotation = arg1->unk8 << 4 << 4; // Not sure about the shift amounts here, but it - arg0->x_rotation = arg1->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800345A0.s") - -// Literally the same function as func_80033F44() -void func_80034844(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034860.s") - -void func_80034AF0(Object *arg0, u8 *arg1) { - f32 phi_f0 = (s32)(arg1[9] & 0xFF); - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->unk78 = arg1[8]; -} - -void func_80034B4C(unk80034B4C *arg0, s32 arg1) { - arg0->unk18 += arg0->unk78 * arg1; -} - -void func_80034B68(s32 arg0, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034B74.s") - -void func_80034E70(Object *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->y_rotation = arg1[8] << 6 << 4; // Not sure about the values here. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034E9C.s") - -void func_8003522C(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035260.s") - -void func_80035640(s32 arg0, s32 arg1) { -} - -void func_8003564C(Object *arg0, s32 arg1) { - unk8003564C sp20; - Object *someObj; - - if (arg0->unk78 == 0) { - sp20.unk2 = arg0->x_position; - sp20.unk4 = arg0->y_position; - sp20.unk6 = arg0->z_position; - sp20.unk1 = 8; - sp20.unk0 = 0x34; - someObj = func_8000EA54(&sp20, 1); - if (someObj != NULL) { - Object_64_8003564C *someObj64 = someObj->unk64; - someObj64->unk4 = arg0; - arg0->unk78 = someObj; - someObj->unk3C_a.unk3C = 0; - } - } -} - -void func_8003572C(Object *arg0, LevelObjectEntry8003572C *arg1) { - f32 phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10) { - phi_f0 = 10; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->y_rotation = arg1->unkA << 6 << 4; - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -void func_800357D4(Object *obj, s32 arg1) { - Object *someObj; - Object_4C *temp_v1; - - someObj = get_object_struct(0); - if (someObj != NULL) { - temp_v1 = obj->unk4C; - if (temp_v1->unk13 < 0xC8) { - if (someObj == temp_v1->unk0) { - if ((get_buttons_pressed_from_player(0) & Z_TRIG) || someObj == obj->unk5C->unk100) { - func_8006F29C(); - } - } - } - } - obj->unk4C->unk13 = 0xFF; -} - -void func_8003588C(Object *arg0, LevelObjectEntry8003588C *arg1) { - Object_40 *obj40; - f32 phi_f0; - - phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - obj40 = arg0->descriptor_ptr; - phi_f0 /= 64; - arg0->scale = obj40->unkC * phi_f0; - arg0->y_rotation = arg1->unkA << 6 << 4; - if (arg0->unk3A >= obj40->unk55) { - arg0->unk3A = 0; - } - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - if (get_filtered_cheats() & CHEAT_TURN_OFF_ZIPPERS) { - gParticlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003596C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035AE8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035C50.s") - -void func_80035E20(unk80035E20 *arg0, s32 arg1) { - arg0->unk78 = 0; - arg0->unk7C = arg0->unk40; -} - -void func_80035E34(Object *obj, s32 arg1) { - Object *someObj; - Object *someOtherObj; - Object_64_80035E34 *someOtherObj64; - Object_60 *obj60; - - obj->unk3B = 0; - obj->unk18 = 0x28; - if (func_8001139C() == 0) { - obj->unk78 += arg1; - } - set_ghost_position_and_rotation(obj); - func_800AFC3C(obj, arg1); - someOtherObj = get_object_struct(0); - someOtherObj64 = someOtherObj->unk64; - obj60 = obj->unk60; - if (obj60->unk0 == 1) { - s8 temp = someOtherObj64->unk1D6; - if ((temp == 1) || (temp == 2)) { - someObj = (Object *)obj60->unk4; - someObj->y_rotation = 0x4000; - someObj->unk3A++; - someObj->unk3A &= 1; - } - } -} - -void func_80035EF8(Object *arg0, unk80035EF8 *arg1) { - f32 phi_f0; - arg0->unk78 = (s32)arg1->unkE; - arg0->unk7C.word = -1; - arg0->y_rotation = arg1->unkC << 6 << 4; // Not sure about the values here. - phi_f0 = (f32)(arg1->unkA & 0xFF); - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = (f32)(arg0->descriptor_ptr->unkC * phi_f0); -} - -void func_80035F6C(Object *obj, s32 arg1) { - s32 temp_t4; - s32 temp_t5; - Object *someObj; - Object_64_80035F6C *obj64; - Object_64_80035F6C_2 *someObj64; - - if (obj->unk7C.word < 0) { - someObj = get_object_struct(obj->unk78); - if (someObj != NULL) { - obj64 = obj->unk64; - someObj64 = someObj->unk64; - obj->unk7C.word = someObj64->unk3; - if (obj->unk7C.word < 0 || obj->unk7C.word >= 0xA) { - obj->unk7C.word = 0; - } - obj64->unk20 = D_800DC980; - obj64->unk24 = obj->unk68[obj->unk7C.word]; - temp_t4 = (obj64->unk24[0] - 1) << 0x15; - temp_t5 = (obj64->unk24[1] - 1) << 5; - obj64->unk0 = 0x40000103; - obj64->unk4 = 0; - obj64->unk8 = temp_t4; - obj64->unkC = temp_t5; - obj64->unk10 = 0x40010203; - obj64->unk14 = temp_t4; - obj64->unk18 = (s32)(temp_t4 | temp_t5); - obj64->unk1C = temp_t5; - } - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s") - -void func_80036194(Object *arg0, s32 arg1) { - Object_64 *temp; - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk4C->unk12 = 0; - temp = arg0->unk64; - temp->unkCD.bytes.byteD = 0xFF; - temp->unk0_a.unk0 = 0.0f; - D_8011D4D8 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800361E0.s") - -void func_80036BCC(u16 arg0, s32 arg1) { - if ((D_8011D4D8 != 0) && (arg1 & 1)) { - func_8000488C(D_8011D4D8); //This is likely wrong and will need to be fixed - D_8011D4D8 = 0; - } - if (D_8011D4D8 == 0) { - func_80001D04(arg0, &D_8011D4D8); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036C30.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800370D4.s") - -void func_80037578(unk80037578 *arg0, u8 *arg1) { - arg0->unk78 = arg1[9] * 2; - arg0->unk7C = arg1[8]; -} - -void func_80037594(Object *obj, s32 arg1) { - if (obj->unk78 > 0) { - obj->unk78 -= arg1; - obj->unk6 |= 0x4000; - } else { - obj->unk6 &= ~0x4000; - obj->unk18 += arg1 * 4; - if (obj->unk18 >= 256) { - obj->unk18 = 0; - obj->unk78 = get_random_number_from_range(0, 30) + obj->unk7C.word; - } - } -} - -void func_80037624(unk80037624 *arg0, s32 arg1) { - arg0->unk6 |= 0x4000; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003763C.s") - -void func_800376E0(Object *arg0, LevelObjectEntry800376E0 *arg1, s32 arg2) { - Object_64_800376E0 *obj64; - LevelModel *levelModel; - s16 segmentBatchCount; - - obj64 = arg0->unk64; - levelModel = func_8002C7C4(); - obj64->unk2 = arg1->unk8; - obj64->unk4 = arg1->unk9; - obj64->unk6 = arg1->unkA; - obj64->segmentId = get_level_segment_index_from_position(arg0->x_position, arg0->y_position, arg0->z_position); - if (arg2 == 0) { - obj64->unk8 = 0; - obj64->unkA = 0; - } - if (obj64->segmentId != -1) { - if (obj64->unk2 < 0) { - obj64->unk2 = 0; - } - segmentBatchCount = levelModel->segments[obj64->segmentId].numberOfBatches; - if (obj64->unk2 >= segmentBatchCount) { - obj64->unk2 = segmentBatchCount - 1; - } - } - func_800377E4(arg0, 0x20000); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800377E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037A18.s") - -void func_80037CE8(s32 arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); -} - -void func_80037D08(unk80037D08_arg0 *arg0, s32 arg1) { - s32 phi_a0; - unk80037D08_arg0_64 *sp18; - - sp18 = arg0->unk64; - phi_a0 = 1 - func_8001F460(arg0, arg1, arg0); - if (sp18->unk2A > 0) { - phi_a0 = 0; - } - func_800235D0(phi_a0); -} - -void func_80037D54(s32 arg0, s32 arg1) { -} - -/* Unused? */ -void func_80037D60(s32 arg0, s32 arg1) { -} - -void func_80037D6C(s32 arg0, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037D78.s") - -void func_800380F8(Object *obj, s32 arg1) { - Object_60_800380F8 *obj60; - Object *someObj; - - func_8001F460(obj, arg1, obj); - obj60 = obj->unk60; - if (obj60 != NULL) { - if (obj60->unk0 > 0) { - someObj = obj60->unk0 == 3 ? obj60->unkC : obj60->unk4; - someObj->y_rotation = 0x4000; - someObj->unk3A++; - if (someObj->unk3A == someObj->descriptor_ptr->unk55) { - someObj->unk3A = 0; - } - } - } -} - -void func_8003818C(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 0x81; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_80037CE8() -void func_800381C0(s32 arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); -} - -void func_800381E0(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_8003818C() -void func_80038214(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 0x81; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_800381E0() -void func_80038248(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -#ifdef NON_EQUIVALENT -// Regalloc issues -void func_8003827C(Object *obj, s32 arg1) { - Object_64_8003827C *obj64 = obj->unk64; - if (obj64->unk24 == 0) { - if (obj64->unk38 != 0) { - obj64->unk24 = (s16)(obj64->unk38 & 0xFF); - } - } - if (obj64->unk24 != 0) { - if (obj64->unk20 == 0) { - func_80009558(obj64->unk24 & 0xFFFF, obj->x_position, obj->y_position, obj->z_position, 1, &obj64->unk20); - } else { - func_800096D8(obj64->unk20, obj->x_position, obj->y_position, obj->z_position); - } - } - func_8001F460(obj, arg1, obj); -} - -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003827C.s") -#endif - -// Unused -void func_80038330(Object *obj, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003833C.s") - -void func_80038710(Object *obj, s32 arg1) { - s32 temp_v0; - s32 phi_v1; - Object_64_80038710 *obj64; - - temp_v0 = func_8001F460(obj, arg1, obj); - obj->unk6 |= 0x4000; - obj64 = obj->unk64; - if (temp_v0 == 0) { - if (get_viewport_count() == VIEWPORTS_COUNT_1_PLAYER) { - phi_v1 = func_800210CC(obj64->unk44); - } else { - phi_v1 = 1; - } - if (phi_v1) { - func_80066488(obj64->unk30, obj->x_position, obj->y_position, obj->z_position, 0x8000 - obj->y_rotation, -obj->x_rotation, obj->z_rotation); - } - } -} - -// Unused -void func_800387C0(Object *obj, s32 arg1) { -} - -void func_800387CC(Object *obj, s32 arg1) { - Object *someObj; - s32 temp_v0; - temp_v0 = obj->unk78; - someObj = NULL; - if (temp_v0 != 0) { - someObj = get_object_struct(temp_v0 - 1); - } - obj->unk7C.word = func_8001F460(obj, arg1, obj); - obj->unk6 |= 0x4000; - if (obj->unk7C.word == 0 && someObj != NULL) { - Object_64_800387CC *someObj64 = someObj->unk64; - someObj64->unk148 = obj; - } -} - -void func_80038854(Object *arg0, u8 *arg1) { - if (arg1[9] != 0) { - arg0->unk4C->unk14 = 0x21; - } else { - arg0->unk4C->unk14 = 0x22; - } - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0xF; - arg0->unk4C->unk12 = 0; - arg0->unk78 = (arg1[10] << 16) | arg1[8]; // Not sure about the values here. - arg0->unk7C.word = arg1[9]; - arg0->y_rotation = arg1[11] << 10; // Not sure about the values here. -} - -void func_800388D4(Object *arg0, s32 arg1) { - s16 temp_a0; - Object_4C *obj4C; - Object *playerObj; - - if (arg0->unk7C.word == 0) { - arg0->unk6 |= 0x4000; - } else { - arg0->unk6 &= ~0x4000; - } - - obj4C = arg0->unk4C; - if (obj4C->unk13 < ((arg0->unk78 >> 16) & 0xFF)) { - playerObj = obj4C->unk0; - if (playerObj->descriptor_ptr->unk54 == 1) { - Object_64_800388D4 *playerObj64 = playerObj->unk64; - temp_a0 = playerObj64->unk0; - if ((temp_a0 != -1) && (get_buttons_pressed_from_player(temp_a0) & Z_TRIG)) { - func_800C31EC(arg0->unk78 & 0xFF, arg0); - } - } - } -} - -void func_800389AC(s32 arg0, s32 arg1) { -} - -void func_800389B8(Object *obj, s32 arg1) { - f32 temp_f2 = arg1; - if (osTvType == TV_TYPE_PAL) { - temp_f2 *= 1.2; - } - obj->x_position += obj->x_velocity * temp_f2; - obj->unk18 += arg1 * 16; - obj->y_position += obj->y_velocity * temp_f2; - obj->z_position += obj->z_velocity * temp_f2; - if (obj->unk18 >= 256) { - gParticlePtrList_addObject(obj); - obj->unk18 = 255; - } -} - -void func_80038A6C(s32 arg0, s32 arg1) { -} - -void func_80038A78(Object *arg0, s32 arg1) { - arg0->unk18 += arg1 * 8; - if (arg0->unk18 >= 256) { - gParticlePtrList_addObject(arg0); - arg0->unk18 = 255; - } -} - -void func_80038AC8(s32 arg0, s32 arg1) { -} - -void func_80038AD4(Object *arg0, s32 arg1) { - f32 temp_f2; - - temp_f2 = (f32)arg1; - if (osTvType == TV_TYPE_PAL) { - temp_f2 *= 1.2; - } - arg0->unk18 += arg1 * 4; - arg0->y_position += temp_f2 * 0.25; - if (arg0->unk18 >= 256) { - gParticlePtrList_addObject(arg0); - arg0->unk18 = 255; - } -} - -#ifdef NON_EQUIVALENT -// regalloc issues -void func_80038B74(Object *obj, unk80038B74 *arg1) { - s32 temp; - obj->unk18 = 0; - obj->scale = 0.5f; - obj->unk3A = get_random_number_from_range(0, obj->descriptor_ptr->unk55 - 1); - obj->unk78 = 0; - obj->unk7C.word = 0xFF; - temp = (s32)arg1->unk8; - if (temp != 0) { - obj->unk7C.word |= (temp << 8) & 0xFF00; - } - obj->unk74 = 1; -} - -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038B74.s") -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038BF4.s") - -void func_80038D58(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0xF; - arg0->unk4C->unk12 = 0; - if (get_settings()->cutsceneFlags & 1) { - arg0->unk78 = 1; - } -} - -void func_80038DC4(Object *arg0, s32 arg1) { - if (arg0->unk78 != 0) { - Object_3C_80038DC4 *temp = arg0->unk3C_a.unk3C; - if (arg0->unk4C->unk13 < 0x78) { - func_8006F338(temp->unk8); - arg0->unk78 = 0; - func_80001D04(0x30, 0); - func_80000FDC(0x12A, 0, 1.0f); - } - } -} - -void func_80038E3C(Object *obj, LevelObjectEntry80038E3C *arg1) { - f32 phi_f0; - Object_64_80038E3C *obj64; - phi_f0 = arg1->unk10 & 0xFF; - if (phi_f0 < 5) { - phi_f0 = 5; - } - obj64 = obj->unk64; - phi_f0 /= 128; - obj->scale = phi_f0; - obj->y_rotation = arg1->unk11 << 6 << 4; - obj64->unk0 = func_800707C4(obj->y_rotation); - obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->y_rotation); - obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); - obj64->unk10 = arg1->unk10; - obj64->unk14 = arg1->unk18; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = arg1->unk10; - obj->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038F58.s") - -void func_80039160(unk80039160 *arg0, s8 *arg1) { - arg0->unk78 = arg1[8]; - func_80011390(); -} - -void func_80039184(s32 arg0, s32 arg1) { -} - -void func_80039190(unk80039190 *arg0, u8 *arg1) { - s32 temp; - arg0->unk78 = arg1[8]; - arg0->unk7C = arg1[9]; - arg0->unk0 = arg1[10] << 6 << 4; // Not sure about the values here. -} - -void func_800391BC(s32 arg0, s32 arg1) { -} - -void func_800391C8(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 3; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -void func_800391FC(Object *obj, s32 arg1) { - s32 sp2C; - - if (obj->unk78 > 0) { - obj->unk78 -= arg1; - arg1 *= 2; - } else { - obj->unk78 = 0; - } - sp2C = obj->unk18; - func_8001F460(obj, arg1, obj); - func_800113CC(obj, 0, sp2C, 0xAC, 0xAD); - if (obj->unk4C->unk13 < 0xFF) { - if (obj->unk78 == 0) { - obj->unk78 = 0x3C; - func_80009558(0x23B, obj->x_position, obj->y_position, obj->z_position, 4, NULL); - } - } -} - -void func_800392B8(Object *arg0, s32 arg1) { - Object_64 *temp; - arg0->unk4C->unk14 = (u16)1; - arg0->unk4C->unk11 = (u8)0; - arg0->unk4C->unk10 = (u8)0x1E; - arg0->unk4C->unk12 = (u8)0; - temp = arg0->unk64; - temp->unkCD.bytes.byteD = 0xFF; - temp->unk0_a.unk0 = 0.0f; - temp->unk28 = 0; - temp->unk2C = 0; - temp->unk34 = 0; - temp->unk36 = 0; - D_8011D4D4 = 0; - D_8011D4E2 = 0x10F; -} - -void func_80039320(s16 arg0) { - D_8011D4E2 = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80039330.s") - -void func_8003AC3C(u16 arg0, s32 arg1) { - if ((D_8011D4D4 != 0) && (arg1 & 1)) { - func_8000488C(D_8011D4D4); - D_8011D4D4 = 0; - } - if (D_8011D4D4 == 0) { - func_80001D04(arg0, &D_8011D4D4); - } -} - -void func_8003ACA0(s32 arg0, s32 arg1) { -} - -f32 func_8003ACAC(void) { - return D_8011D4D0; -} - -void func_8003ACBC(Object *arg0, u8 *arg1, s32 arg2) { - f32 phi_f0 = (s32)(arg1[8] & 0xFF); - if (phi_f0 < 5.0f) { - phi_f0 = 5.0f; - } - phi_f0 /= 64; - arg0->scale = phi_f0; - arg0->y_rotation = arg1[10] << 6 << 4; // Not sure about the values here. - func_80011390(); -} - -void func_8003AD28(s32 arg0, s32 arg1) { -} - -void func_8003AD34(Object *obj, LevelObjectEntry8003AD34 *arg1) { - f32 phi_f0; - Object_64_8003AD34 *obj64; - phi_f0 = arg1->unk8 & 0xFF; - if (phi_f0 < 5) { - phi_f0 = 5; - } - obj64 = obj->unk64; - phi_f0 /= 128; - obj->scale = phi_f0; - obj->y_rotation = arg1->unk9 << 6 << 4; - obj64->unk0 = func_800707C4(obj->y_rotation); - obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->y_rotation); - obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); - obj64->unk10 = arg1->unk8; - obj64->unk14 = arg1->unkA; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = arg1->unk8; - obj->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003AE50.s") - -// Exactly the same as func_8003AD34 -void func_8003B058(Object *obj, LevelObjectEntry8003AD34 *arg1) { - f32 phi_f0; - Object_64_8003AD34 *obj64; - phi_f0 = arg1->unk8 & 0xFF; - if (phi_f0 < 5) { - phi_f0 = 5; - } - obj64 = obj->unk64; - phi_f0 /= 128; - obj->scale = phi_f0; - obj->y_rotation = arg1->unk9 << 6 << 4; - obj64->unk0 = func_800707C4(obj->y_rotation); - obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->y_rotation); - obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); - obj64->unk10 = arg1->unk8; - obj64->unk14 = arg1->unkA; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = arg1->unk8; - obj->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B174.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B368.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B4BC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B7CC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B988.s") - -void func_8003C1E0(Object *obj, LevelObjectEntry8003C1E0 *arg1) { - f32 temp_f0; - Object_64_8003C1E0 *obj64; - f32 phi_f0; - - obj->unk3A = 0; - obj64 = obj->unk64; - obj->y_rotation = arg1->unk8 << 6 << 4; - obj64->unkF = arg1->unkE; - obj64->unk13 = arg1->unkB; - obj64->unk0 = obj->y_position; - obj64->unk8 = 0; - obj64->unk12 = arg1->unkA; - obj->unk78 = obj->y_rotation; - obj->unk7C.word = (arg1->unk9 & 0x3F) << 0xA; - phi_f0 = arg1->unkC & 0xFF; - if (phi_f0 < 10) { - phi_f0 = 10; - } - phi_f0 /= 64; - obj->scale = obj->descriptor_ptr->unkC * phi_f0; - obj->unk4C->unk14 = 0x21; - obj->unk4C->unk11 = 2; - obj->unk4C->unk10 = 0x14; - obj->unk4C->unk12 = 0; - if (obj->unk3A >= obj->descriptor_ptr->unk55) { - obj->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C2E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C644.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C7A4.s") - -void func_8003C9EC(Object *arg0, u8 *arg1) { - Object_64 *temp = arg0->unk64; - arg0->unk3A = arg1[8]; - arg0->y_rotation = arg1[9] << 6 << 4; - temp->unk0_a.unk0 = arg0->y_position; - arg0->unk4C->unk14 = 0x21; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - temp->unk4 = 0; - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003CA68.s") - -void func_8003CE64(Object *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - arg0->unk78 = arg1[8]; -} - -void func_8003CEA0(Object *arg0, s32 arg1) { - if (arg0->unk4C->unk13 < 0x2D) { - func_8001E344(arg0->unk78); - } - arg0->unk4C->unk13 = (u8)0xFF; -} - -void func_8003CF00(s32 arg0, s32 arg1) { -} - -void func_8003CF0C(s32 arg0, s32 arg1) { -} - -void func_8003CF18(unk8003CF18 *arg0, u8 *arg1) { - f32 temp_f0; - temp_f0 = arg1[8] * 8.0f; - temp_f0 = temp_f0 * temp_f0; - arg0->unk78 = temp_f0; -} - -void func_8003CF58(Object *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = arg1[9]; - arg0->unk78 = arg1[8]; - arg0->unk7C.word = arg1[9]; -} - -void func_8003CF98(Object *arg0, s32 arg1) { - if (arg0->unk4C->unk13 < arg0->unk7C.word) { - func_80028044(arg0->unk78); - } -} - -void func_8003CFE0(s32 arg0, u8 *arg1) { - if (arg1[9] == 0xFF) { - arg1[9] = func_8001C48C(arg0) & 0xFF; - } - func_8001D1BC(arg1[9]); - func_8001D1AC(); -} - -void func_8003D02C(s32 arg0, s32 arg1) { -} - -void func_8003D038(unk8003D038 *arg0, s8 *arg1) { - arg0->unk18 = 0x78; - arg0->unk78 = (arg1[8] - 1) & 3; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D058.s") - -void func_8003D2AC(s32 arg0, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D2B8.s") - -void func_8003D3EC(unk8003D3EC *arg0, s32 arg1) { - arg0->unk18 = 0x64; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D3FC.s") - -void func_8003D534(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk7C.half.upper = 0x14; - arg0->unk7C.half.lower = 0x10; - if (get_filtered_cheats() & CHEAT_DISABLE_BANANAS) { - gParticlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D5A0.s") - -void func_8003DBA0(Object *obj, s32 arg1) { - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = 0x1E; - obj->unk78 = 3; - obj->unk7C.word = 16; - if (!is_in_tracks_mode()) { - if (func_8000E1DC() && is_in_adventure_two()) { - obj->unk78 = 0; - } else { - obj->unk78 = 3; - } - } - if (obj->unk78 == 3) { - obj->unk6 |= 0x600; - gParticlePtrList_addObject(obj); - } -} - -void func_8003DC5C(Object *obj, s32 arg1) { - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = 0x1E; - obj->unk78 = 3; - obj->unk7C.word = 0; - if (!is_in_tracks_mode()) { - if (func_8000E1DC() && !is_in_adventure_two()) { - obj->unk78 = 0; - } else { - obj->unk78 = 3; - } - } - if (obj->unk78 == 3) { - obj->unk6 |= 0x600; - gParticlePtrList_addObject(obj); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DD14.s") - -void func_8003DE74(Object *obj, unk8003DE74 *arg1) { - Settings *settings; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = 0x1E; - arg1->unk8 &= 0xF; - obj->unk78 = arg1->unk8; - settings = get_settings(); - if (!is_in_tracks_mode() && !(settings->keys & (1 << obj->unk78))) { - return; - } - gParticlePtrList_addObject(obj); -} - -/** - * Rotates the key and checks to see if the player grabbed it. - */ -void obj_loop_world_key(Object *worldKeyObj, s32 speed) { - Settings *settings; - Object *playerObj; - - // Check if the player is near the key - // "worldKeyObj->unk4C->unk13" is the player's distance from the key (Up to 255). - if (worldKeyObj->unk4C->unk13 < WORLD_KEY_GRAB_CHECK_RADIUS) { - // "worldKeyObj->unk4C->unk0" is only set when the player is within 255 units of - // the key object, otherwise it is NULL. - playerObj = worldKeyObj->unk4C->unk0; - if (playerObj != NULL) { - if (playerObj->descriptor_ptr->unk54 == 1) { - Object_64_8003DF08 *obj64 = playerObj->unk64; - if (obj64->unk0 != -1) { - // Player has grabbed the key! - play_sound(SOUND_WORLD_KEY_GRAB); - settings = get_settings(); - settings->keys |= 1 << worldKeyObj->unk78; // Set key flag - gParticlePtrList_addObject(worldKeyObj); // Makes the key unload. - } - } - } - } - - // Rotate world key - worldKeyObj->y_rotation += speed * 256; -} - -typedef struct Object_64_8003DFCC { - f32 unk0; - s16 unk4; - char unk6[0x2]; - u8 unk8; - u8 unk9; - u8 unkA; -} Object_64_8003DFCC; - -void func_8003DFCC(Object *arg0, Object_64_8003DFCC *arg1) { - s32 cheats; - Object_64_8003DFCC *obj; - f32 temp; - - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 4; - arg0->unk4C->unk10 = 0x14; - - cheats = get_filtered_cheats(); - - if (cheats & CHEAT_ALL_BALLOONS_ARE_BLUE) { - arg1->unk9 = 0; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RED) { - arg1->unk9 = 1; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_GREEN) { - arg1->unk9 = 2; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_YELLOW) { - arg1->unk9 = 3; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RAINBOW) { - arg1->unk9 = 4; - } - - if (arg1->unk8 >= 6) { - arg1->unk8 = 0; - } - - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } - - arg0->unk3A = arg1->unk9; - arg0->unk78 = arg0->unk3A; - - temp = arg1->unkA & 0xFF; - if (temp < 10) { - temp = 10; - } - temp /= 64; - - obj = (Object_64_8003DFCC*)arg0->unk64; - - arg0->scale = arg0->descriptor_ptr->unkC * temp; - obj->unk0 = arg0->scale; - obj->unk4 = 0; - arg0->unk7C.word = 0; - - if (get_filtered_cheats() & CHEAT_DISABLE_WEAPONS) { - gParticlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E140.s") - -void func_8003E5B0(s32 arg0, s32 arg1) { -} - -void func_8003E5BC(s32 arg0, s32 arg1) { -} - -void func_8003E5C8(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x18; - arg0->unk4C->unk12 = 0; - arg0->unk78 = func_8000C8B4(0x1E0); - arg0->unk7C.word = 0; -} - -void func_8003E630(Object *arg0) { - Object_64 *temp = arg0->unk64; - switch (temp->unk18) { - case 0: - case 1: - func_8003E694(); - break; - case 2: - case 3: - case 10: - case 11: - func_8003F2E8(); - break; - } - return; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E694.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EC14.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EDD8.s") - -void func_8003F0D0(void) { - D_8011D4DC = 0; -} - -void func_8003F0DC(void) { - D_8011D4DC--; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F0F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F2E8.s") - -#ifdef NON_EQUIVALENT -// Regalloc issues -void func_8003FC44(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6) { - Object *someObj; - unk8003FC44 sp24; - - sp24.unk4 = (s32)arg1 + 0x24; - sp24.unk1 = 0xA; - sp24.unk2 = arg0; - sp24.unk0 = arg3; - sp24.unk7 = arg6; - sp24.unk6 = arg2; - someObj = func_8000EA54(&sp24, 1); - if (someObj != NULL) { - someObj->scale *= 3.5 * arg5; - someObj->unk3C_a.unk3C = NULL; - someObj->x_velocity = 0.0f; - someObj->y_velocity = 0.0f; - someObj->z_velocity = 0.0f; - } - if (arg4 != 0) { - func_80009558(arg4, arg0, arg1, arg2, 4, 0); - } -} -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FC44.s") -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FD68.s") - -void func_8003FEF4(Object *arg0, LevelObjectEntry8003FEF4 *arg1) { - Object_64_8003FEF4 *obj64; - - obj64 = arg0->unk64; - obj64->unk0 = arg1->unk8; - obj64->unk2 = arg1->unkA; - obj64->unkC = arg1->unkC; - obj64->unkD = arg1->unkD; - obj64->unk_union.unk8_word = 0; - obj64->unk4 = arg1->unkE; - obj64->unk11 = arg1->unk12; - obj64->unk10 = arg1->unk11; - obj64->unkE = arg1->unk9; - obj64->unkF = arg1->unk10; - obj64->unk12 = arg1->unk13; - func_800098A4(obj64->unk0, obj64->unk2, arg1->common.x, arg1->common.y, arg1->common.z, - obj64->unkF, obj64->unkE, obj64->unk10, obj64->unk12, obj64->unk4, obj64->unk11, - obj64->unkC, obj64->unkD); - gParticlePtrList_addObject(arg0); -} - -void func_8004001C(Object *arg0, LevelObjectEntry8004001C *entry) { - s32 temp; - Object_64_8004001C *obj64 = (Object_64_8004001C *)arg0->unk64; - obj64->unk2 = entry->unk8; - temp = entry->unk9; - obj64->unk4 = temp & 0xFF; - obj64->unk5 = entry->unkA; - func_80009968(entry->common.x, entry->common.y, entry->common.z, obj64->unk2, obj64->unk4, obj64->unk5); - gParticlePtrList_addObject(arg0); -} - -void func_800400A4(Object *obj, LevelObjectEntry800400A4 *arg1, s32 arg2) { - Object_64_800400A4 *obj64; - LevelModel *levelModel; - s16 numberOfTexturesInLevel; - - obj64 = obj->unk64; - levelModel = func_8002C7C4(); - obj64->unk0 = arg1->unk8; - if (obj64->unk0 < 0) { - obj64->unk0 = 0; - } - numberOfTexturesInLevel = levelModel->numberOfTextures; - if (obj64->unk0 >= numberOfTexturesInLevel) { - obj64->unk0 = numberOfTexturesInLevel - 1; - } - obj64->unk4 = (s16)arg1->unkA; - obj64->unk6 = (s16)arg1->unkB; - if (arg2 == 0) { - obj64->unk8 = 0; - obj64->unkA = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040148.s") - -void func_800403A8(Object *arg0, s32 arg1, s32 arg2) { - arg0->unk64 = func_80031CAC(arg0, arg1); -} - -void func_800403D8(Object *arg0, s32 arg1, s32 arg2) { - arg0->unk64 = func_800BE654(arg0->unk2E, arg0->x_position, arg0->z_position); - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk4C->unk12 = 0; -} - -void func_80040448(Object *arg0, s32 arg1) { - if (arg0->unk64 != NULL) { - arg0->y_position = func_800BEEB4(arg0->unk64); - } - arg0->unk18 += arg1 * 8; -} - -void func_8004049C(Object *arg0, LevelObjectEntry8004049C *arg1, s32 arg2) { - f32 phi_f0; - arg0->unk64 = func_800BE654(arg0->unk2E, arg0->x_position, arg0->z_position); - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x1E; - phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->unk3A = arg1->unk8; - arg0->y_rotation = arg1->unkA << 6 << 4; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040570.s") - -void func_80040800(unk80040800 *arg0, s16 *arg1) { - f32 temp = arg1[4]; - temp *= temp; - arg0->unk78 = temp; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040820.s") - -void func_8004092C(s32 arg0, s32 arg1) { - func_800AC8A8(arg0); -} - -void func_8004094C(Object *arg0, s16 *arg1, s32 arg2) { - func_800ACF60(arg0); - arg0->scale = arg1[4]; - arg0->scale /= 40.0f; -} - -void func_800409A4(s32 arg0, s32 arg1, s32 arg2) { - func_800BF524(arg0); //waves.c -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800409C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040C54.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041A90.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041E80.s") - -void func_80042014(unk80042014_arg0 *arg0, unk80042014_arg1 *arg1) { - unk80042014_arg0_64 *temp = arg0->unk64; - temp->unk0 = arg1->unk8; - temp->unk2 = arg1->unkA; - temp->unk3 = arg1->unkB; -} - -void func_8004203C(Object *arg0, unk8004203C_arg1 *arg1) { - func_800AF134(arg0->unk6C, arg1->unk9, arg1->unk8, 0, 0, 0); - arg0->unk78 = arg1->unkA; -} - -void func_80042090(Object *arg0, s32 arg1) { - if (arg0->unk78 >= get_random_number_from_range(0, 0x400)) { - arg0->unk74 = 1; - } else { - arg0->unk74 = 0; - } - if (get_number_of_active_players() < 2) { - func_800AFC3C(arg0, arg1); - } -} - -void func_8004210C(unk8004210C *arg0, s8 *arg1) { - arg0->unk64 = (s32)get_misc_asset(0x14) + (arg1[8] << 7); - arg0->unk3C = 0; -} - -void func_80042150(s32 arg0, s32 arg1, s32 arg2) { -} - -void func_80042160(s32 arg0, s32 arg1) { -} - -void func_8004216C(s32 arg0, s32 arg1) { -} - -void func_80042178(Object *obj, s32 arg1) { - s32 temp; - Object_3C_80042178 *obj3C; - unk80042178 sp20; - - obj3C = obj->unk3C_a.unk3C; - if (func_80016DE8(obj->x_position, 0, obj->z_position, (f32)obj3C->unk8, 1, &sp20) > 0) { - obj->unk74 = obj3C->unkA; - } else { - obj->unk74 = 0; - } - func_800AFC3C(obj, arg1); -} - -void func_80042210(Object *obj, LevelObjectEntry80042210 *arg1) { - Object_64_80042210 *obj64; - - obj64 = (Object_64_80042210 *)obj->unk64; - obj64->unk15 = arg1->unkA; - obj64->unk0 = obj->x_position; - obj64->unk4 = obj->y_position; - obj64->unk8 = obj->z_position; - obj64->unkC = arg1->unk8; - obj64->unk10 = obj64->unkC * obj64->unkC; - obj64->unk14 = 0; - obj64->unk20 = obj->x_position; - obj64->unk24 = obj->z_position; - obj64->unk19 = 0; - obj64->unk30 = 1.0f; - - if (obj64->unk15) { - obj->unk3A = 1; - if (is_drumstick_unlocked() || (get_settings()->trophies & 0xFF) != 0xFF) { - gParticlePtrList_addObject(obj); - } - } else { - obj->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800422F0.s") - -void func_80042998(s32 arg0, s32 arg1) { - Object *obj; - Object_64_80042998 *obj64; - - func_8001F460(arg0, arg1, arg0); - obj = func_8000BF44(-1); - - if (obj != NULL) { - obj64 = obj->unk64; - obj->unk78 = 0; - if (obj64 != 0) { - obj64->unk72 += arg1; - obj64->unk70 = 2; - obj64->unk74 = 1.0f; - func_8000B750(arg0, -1, 2, 1, 1); - } - } -} - -void func_80042A1C(unk80042A1C *arg0, s8 *arg1) { - arg0->unk78 = arg1[9] * 8.0f; - arg0->unk78 *= arg0->unk78; - arg0->unk7C = arg1[8]; - arg0->unk7E = 0; - if (is_in_tracks_mode()) { - gParticlePtrList_addObject(arg0); - } - func_800C56D0(4); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042A90.s") - -void func_80042CD0(unk80042CD0 *arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); - arg0->unk18 = (arg0->unk18 + (arg1 * 8)) & 0xFF; -} diff --git a/src/unknown_0348C0.h b/src/unknown_0348C0.h deleted file mode 100644 index 51552de9..00000000 --- a/src/unknown_0348C0.h +++ /dev/null @@ -1,581 +0,0 @@ -#ifndef _UNKNOWN_0348C0_H_ -#define _UNKNOWN_0348C0_H_ - -#include "types.h" -#include "structs.h" - -#define WORLD_KEY_GRAB_CHECK_RADIUS 50 -#define SOUND_WORLD_KEY_GRAB 54 - -typedef struct unk80034530 { - u8 pad0[0x8]; - u8 unk8; - u8 unk9; - s8 unkA; - s8 unkB; - u8 unkC; - u8 unkD; -} unk80034530; - -typedef struct unk80034B4C { - u8 pad0[0x18]; - s16 unk18; - u8 pad1A[0x5E]; - s32 unk78; -} unk80034B4C; - -typedef struct unk8003564C { - s8 unk0; - s8 unk1; - s16 unk2; - s16 unk4; - s16 unk6; -} unk8003564C; - -typedef struct Object_64_8003564C { - u8 pad0[4]; - Object *unk4; -} Object_64_8003564C; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry8003572C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8003572C; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry8003588C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8003588C; - -typedef struct unk80035E20 { - u8 pad0[0x40]; - s32 unk40; - u8 pad44[0x34]; - s32 unk78; - s32 unk7C; -} unk80035E20; - -typedef struct Object_64_80035E34 { - u8 pad0[0x1D6]; - s8 unk1D6; -} Object_64_80035E34; - -typedef struct unk80035EF8 { - u8 pad0[0xA]; - s16 unkA; - s16 unkC; - s16 unkE; -} unk80035EF8; - -typedef struct Object_64_80035F6C { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s16 *unk20; - u8 *unk24; -} Object_64_80035F6C; - -typedef struct Object_64_80035F6C_2 { - u8 pad0[3]; - s8 unk3; -} Object_64_80035F6C_2; - -typedef struct unk80037578 { - u8 pad0[0x78]; - s32 unk78; - s32 unk7C; -} unk80037578; - -typedef struct unk80037624 { - u8 pad0[6]; - s16 unk6; -} unk80037624; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry800376E0 { - LevelObjectEntryCommon common; - s8 unk8; - s8 unk9; - s8 unkA; -} LevelObjectEntry800376E0; - -typedef struct Object_64_800376E0 { - s16 segmentId; - s16 unk2; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; -} Object_64_800376E0; - -typedef struct unk80037D08_arg0_64 { - u8 pad0[0x2A]; - s16 unk2A; -} unk80037D08_arg0_64; - -typedef struct unk80037D08_arg0 { - u8 pad0[0x64]; - unk80037D08_arg0_64 *unk64; -} unk80037D08_arg0; - -// Not sure if Object_60 differs between objects yet. -typedef struct Object_60_800380F8 { - s32 unk0; - Object *unk4; - s32 pad8; - Object *unkC; -} Object_60_800380F8; - -typedef struct Object_64_8003827C { - u8 pad0[0x20]; - s32 unk20; - s16 unk24; - u8 pad28[0x12]; - s8 unk38; -} Object_64_8003827C; - -typedef struct Object_64_80038710 { - u8 pad0[0x30]; - s8 unk30; - u8 pad31[0x13]; - s8 unk44; -} Object_64_80038710; - -typedef struct Object_64_800387CC { - u8 pad0[0x148]; - Object *unk148; -} Object_64_800387CC; - -typedef struct Object_64_800388D4 { - s16 unk0; -} Object_64_800388D4; - -typedef struct unk80038B74 { - u8 pad0[8]; - s8 unk8; -} unk80038B74; - -typedef struct Object_3C_80038DC4 { - u8 pad0[8]; - s8 unk8; -} Object_3C_80038DC4; - -typedef struct LevelObjectEntry80038E3C { - LevelObjectEntryCommon common; - u8 pad8[8]; - u8 unk10; - u8 unk11; - u8 pad12[6]; - s8 unk18; -} LevelObjectEntry80038E3C; - -typedef struct Object_64_80038E3C { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - s32 unk10; - s8 unk14; -} Object_64_80038E3C; - -typedef struct unk80039160 { - u8 pad0[0x78]; - s32 unk78; -} unk80039160; - -typedef struct unk80039190 { - u16 unk0; - u8 pad2[0x76]; - s32 unk78; - s32 unk7C; -} unk80039190; - -typedef struct LevelObjectEntry8003AD34 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8003AD34; - -typedef struct Object_64_8003AD34 { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - s32 unk10; - s8 unk14; -} Object_64_8003AD34; - -typedef struct LevelObjectEntry8003C1E0 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 padD; - s8 unkE; -} LevelObjectEntry8003C1E0; - -typedef struct Object_64_8003C1E0 { - f32 unk0; - u8 pad4[4]; - s32 unk8; - u8 padC[3]; - s8 unkF; - u8 pad10[2]; - u8 unk12; - u8 unk13; -} Object_64_8003C1E0; - -typedef struct unk8003CF18 { - u8 pad1A[0x78]; - f32 unk78; -} unk8003CF18; - -typedef struct unk8003D038 { - u8 pad0[0x18]; - s16 unk18; - u8 pad1A[0x5E]; - s32 unk78; -} unk8003D038; - -typedef struct unk8003D3EC { - u8 pad0[0x18]; - u16 unk18; -} unk8003D3EC; - -typedef struct unk8003DE74 { - u8 pad0[8]; - u8 unk8; -} unk8003DE74; - -typedef struct Object_64_8003DF08 { - s16 unk0; -} Object_64_8003DF08; - -typedef struct unk8003FC44 { - s8 unk0; - s8 unk1; - s16 unk2; - s16 unk4; - s16 unk6; - s8 unk7; -} unk8003FC44; - - -typedef struct Object_64_8003FEF4 { - u8 unk0; - u8 pad1; - u16 unk2; - u16 unk4; - u16 unk6; - union { - struct { - u8 unk8; - u8 unk9; - u8 unkA; - u8 padB; - } unk_struct; - s32 unk8_word; - } unk_union; - u8 unkC; - u8 unkD; - u8 unkE; - u8 unkF; - u8 unk10; - u8 unk11; - u8 unk12; -} Object_64_8003FEF4; - -typedef struct LevelObjectEntry8003FEF4 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u16 unkA; - u8 unkC; - u8 unkD; - u16 unkE; - u8 unk10; - u8 unk11; - u8 unk12; - u8 unk13; -} LevelObjectEntry8003FEF4; - -typedef struct LevelObjectEntry8004001C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8004001C; - -typedef struct Object_64_8004001C { - u16 pad0; - s16 unk2; - u8 unk4; - u8 unk5; -} Object_64_8004001C; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry800400A4 { - LevelObjectEntryCommon common; - s16 unk8; - s8 unkA; - s8 unkB; -} LevelObjectEntry800400A4; - -typedef struct Object_64_800400A4 { - s16 unk0; - s16 pad2; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; -} Object_64_800400A4; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry8004049C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8004049C; - -typedef struct unk80040800 { - u8 pad0[0x78]; - f32 unk78; -} unk80040800; - -typedef struct unk80042014_arg0_64 { - u16 unk0; - u8 unk2; - u8 unk3; -} unk80042014_arg0_64; - -typedef struct unk80042014_arg0 { - u8 pad0[0x64]; - unk80042014_arg0_64 *unk64; -} unk80042014_arg0; - -typedef struct unk80042014_arg1 { - u8 pad0[8]; - u16 unk8; - u8 unkA; - u8 unkB; -} unk80042014_arg1; - -typedef struct unk8004210C { - u8 pad0[0x3C]; - s32 unk3C; - u8 pad40[0x24]; - s32 unk64; -} unk8004210C; - -typedef struct Object_3C_80042178 { - u8 pad0[8]; - u16 unk8; - u16 unkA; -} Object_3C_80042178; - -typedef struct unk8004203C_arg1 { - u8 pad0[0x8]; - u8 unk8; - u8 unk9; - u16 unkA; -} unk8004203C_arg1; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry80042210 { - LevelObjectEntryCommon common; - s16 unk8; - u8 unkA; -} LevelObjectEntry80042210; - -typedef struct Object_64_80042210 { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - f32 unk10; - u8 unk14; - u8 unk15; - u8 pad16[3]; - u8 unk19; - u8 pad1A[6]; - f32 unk20; - f32 unk24; - u8 pad28[8]; - f32 unk30; -} Object_64_80042210; - -typedef struct Object_64_80042998 { - u8 pad0[0x70]; - u8 unk70; - u8 pad71; - u8 unk72; - u8 pad73; - f32 unk74; -} Object_64_80042998; - -typedef struct unk80042A1C { - u8 pad0[0x78]; - f32 unk78; - s16 unk7C; - s16 unk7E; -} unk80042A1C; - -typedef struct unk80042CD0 { - u8 pad0[0x18]; - s16 unk18; -} unk80042CD0; - -// Unsure about the signed/unsigned with these arrays. -extern u16 D_800DC970[4]; -extern u16 D_800DC978[4]; -extern u16 D_800DC980[20]; -extern u16 D_800DC9A8[20]; -extern u16 D_800DC9D0[64]; -extern s8 D_800DCA50[8]; -extern u8 D_800DCA58[9]; -extern s8 D_800DCA64[9]; -extern s8 D_800DCA70[10]; -extern s32 D_800DCA7C[3]; -extern s32 D_800DCA88[3]; -extern s8 D_800DCA94[8]; -extern s8 D_800DCA9C[12]; -extern u16 D_800DCAA8[64]; -extern u16 D_800DCB28[20]; -extern u32 osTvType; - -f32 func_800707C4(s16); // No idea where it's located -f32 func_800707F8(s16); // No idea where it's located -s32 get_random_number_from_range(s32, s32); // Non Matching src/unknown_070110.c -s32 func_8007066C(s32, s32); // Non Matching src/unknown_070110.c - -void func_80033F44(Object *arg0, s32 arg1); -void func_80034530(Object *arg0, unk80034530 *arg1); -void func_80034844(Object *arg0, s32 arg1); -void func_80034AF0(Object *arg0, u8 *arg1); -void func_80034B4C(unk80034B4C *arg0, s32 arg1); -void func_80034B68(s32 arg0, s32 arg1); -void func_80034E70(Object *arg0, u8 *arg1); -void func_8003522C(Object *arg0, s32 arg1); -void func_80035640(s32 arg0, s32 arg1); -void func_8003564C(Object *arg0, s32 arg1); -void func_8003572C(Object *arg0, LevelObjectEntry8003572C *arg1); -void func_800357D4(Object *obj, s32 arg1); -void func_8003588C(Object *arg0, LevelObjectEntry8003588C *arg1); -void func_80035E20(unk80035E20 *arg0, s32 arg1); -void func_80035E34(Object *obj, s32 arg1); -void func_80035EF8(Object *arg0, unk80035EF8 *arg1); -void func_80035F6C(Object *obj, s32 arg1); -void func_80036194(Object *arg0, s32 arg1); -void func_80036BCC(u16 arg0, s32 arg1); -void func_80037578(unk80037578 *arg0, u8 *arg1); -void func_80037624(unk80037624 *arg0, s32 arg1); -void func_800376E0(Object *arg0, LevelObjectEntry800376E0 *arg1, s32 arg2); -void func_80037CE8(s32 arg0, s32 arg1); -void func_80037D08(unk80037D08_arg0 *arg0, s32 arg1); -void func_80037D54(s32 arg0, s32 arg1); -void func_80037D60(s32 arg0, s32 arg1); -void func_80037D6C(s32 arg0, s32 arg1); -void func_8003818C(Object *arg0, s32 arg1); -void func_800381C0(s32 arg0, s32 arg1); -void func_800381E0(Object *arg0, s32 arg1); -void func_80038214(Object *arg0, s32 arg1); -void func_80038248(Object *arg0, s32 arg1); -void func_80038330(Object *obj, s32 arg1); -void func_80038710(Object *obj, s32 arg1); -void func_800387C0(Object *obj, s32 arg1); -void func_800387CC(Object *obj, s32 arg1); -void func_80038854(Object *arg0, u8 *arg1); -void func_800388D4(Object *arg0, s32 arg1); -void func_800389AC(s32 arg0, s32 arg1); -void func_800389B8(Object *obj, s32 arg1); -void func_80038A6C(s32 arg0, s32 arg1); -void func_80038A78(Object *arg0, s32 arg1); -void func_80038AC8(s32 arg0, s32 arg1); -void func_80038AD4(Object *arg0, s32 arg1); -void func_80038D58(Object *arg0, s32 arg1); -void func_80038DC4(Object *arg0, s32 arg1); -void func_80038E3C(Object *obj, LevelObjectEntry80038E3C *arg1); -void func_80039160(unk80039160 *arg0, s8 *arg1); -void func_80039184(s32 arg0, s32 arg1); -void func_80039190(unk80039190 *arg0, u8 *arg1); -void func_800391BC(s32 arg0, s32 arg1); -void func_800391C8(Object *arg0, s32 arg1); -void func_800391FC(Object *obj, s32 arg1); -void func_800392B8(Object *arg0, s32 arg1); -void func_80039320(s16 arg0); -void func_8003AC3C(u16 arg0, s32 arg1); -void func_8003ACA0(s32 arg0, s32 arg1); -f32 func_8003ACAC(void); -void func_8003ACBC(Object *arg0, u8 *arg1, s32 arg2); -void func_8003AD28(s32 arg0, s32 arg1); -void func_8003AD34(Object *obj, LevelObjectEntry8003AD34 *arg1); -void func_8003B058(Object *obj, LevelObjectEntry8003AD34 *arg1); -void func_8003C1E0(Object *obj, LevelObjectEntry8003C1E0 *arg1); -void func_8003C9EC(Object *arg0, u8 *arg1); -void func_8003CE64(Object *arg0, u8 *arg1); -void func_8003CEA0(Object *arg0, s32 arg1); -void func_8003CF00(s32 arg0, s32 arg1); -void func_8003CF0C(s32 arg0, s32 arg1); -void func_8003CF18(unk8003CF18 *arg0, u8 *arg1); -void func_8003CF58(Object *arg0, u8 *arg1); -void func_8003CF98(Object *arg0, s32 arg1); -void func_8003CFE0(s32 arg0, u8 *arg1); -void func_8003D02C(s32 arg0, s32 arg1); -void func_8003D038(unk8003D038 *arg0, s8 *arg1); -void func_8003D2AC(s32 arg0, s32 arg1); -void func_8003D3EC(unk8003D3EC *arg0, s32 arg1); -void func_8003D534(Object *arg0, s32 arg1); -void func_8003DBA0(Object *obj, s32 arg1); -void func_8003DC5C(Object *obj, s32 arg1); -void func_8003DE74(Object *obj, unk8003DE74 *arg1); -void obj_loop_world_key(Object *worldKeyObj, s32 speed); -void func_8003E5B0(s32 arg0, s32 arg1); -void func_8003E5BC(s32 arg0, s32 arg1); -void func_8003E5C8(Object *arg0, s32 arg1); -void func_8003E630(Object *arg0); -void func_8003F0D0(void); -void func_8003F0DC(void); -void func_8003FEF4(Object *arg0, LevelObjectEntry8003FEF4 *arg1); -void func_8004001C(Object *arg0, LevelObjectEntry8004001C *entry); -void func_800400A4(Object *obj, LevelObjectEntry800400A4 *arg1, s32 arg2); -void func_800403A8(Object *arg0, s32 arg1, s32 arg2); -void func_800403D8(Object *arg0, s32 arg1, s32 arg2); -void func_80040448(Object *arg0, s32 arg1); -void func_8004049C(Object *arg0, LevelObjectEntry8004049C *arg1, s32 arg2); -void func_800409A4(s32 arg0, s32 arg1, s32 arg2); -void func_80042014(unk80042014_arg0 *arg0, unk80042014_arg1 *arg1); -void func_8004203C(Object *arg0, unk8004203C_arg1 *arg1); -void func_80042090(Object *arg0, s32 arg1); -void func_8004210C(unk8004210C *arg0, s8 *arg1); -void func_80042150(s32 arg0, s32 arg1, s32 arg2); -void func_80042160(s32 arg0, s32 arg1); -void func_8004216C(s32 arg0, s32 arg1); -void func_80042178(Object *obj, s32 arg1); -void func_80042210(Object *obj, LevelObjectEntry80042210 *arg1); -void func_80042998(s32 arg0, s32 arg1); -void func_80042A1C(unk80042A1C *arg0, s8 *arg1); -void func_80042CD0(unk80042CD0 *arg0, s32 arg1); - -//Non Matching -void func_80037594(Object *obj, s32 arg1); -void func_800377E4(Object *obj, s32 arg1); -void func_800380F8(Object *obj, s32 arg1); -void func_8003827C(Object *obj, s32 arg1); -void func_8003B4BC(s32 arg0); - -#endif diff --git a/src/unknown_078050.c b/src/unknown_078050.c index 06fc41a4..5ea3c10b 100644 --- a/src/unknown_078050.c +++ b/src/unknown_078050.c @@ -377,4 +377,4 @@ void render_textured_rectangle(Gfx **dlist, DrawTexture *arg1, s32 arg2, s32 arg GLOBAL_ASM("asm/non_matchings/unknown_078050/render_textured_rectangle.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_078050/func_80078D00.s") +GLOBAL_ASM("asm/non_matchings/unknown_078050/render_texture_rectangle_scaled.s") diff --git a/src/unknown_078050.h b/src/unknown_078050.h index c8e8c053..c711956b 100644 --- a/src/unknown_078050.h +++ b/src/unknown_078050.h @@ -43,6 +43,6 @@ void func_800787F0(void); void render_background(Gfx **dlist, s32 *arg1, s32 arg2); void render_textured_rectangle(Gfx **dlist, DrawTexture *arg1, s32 arg2, s32 arg3, u8 red, u8 green, u8 blue, u8 alpha); -void func_80078D00(Gfx**, void *element, s32, s32, f32, f32, u32, s32); +void render_texture_rectangle_scaled(Gfx **dlist, DrawTexture *element, f32 x, f32 y, f32 x_scale, f32 y_scale, u32 color, s32 flip); #endif diff --git a/src/unknown_0ABDF0.c b/src/unknown_0ABDF0.c index 4bd848a8..487d2e3e 100644 --- a/src/unknown_0ABDF0.c +++ b/src/unknown_0ABDF0.c @@ -86,17 +86,23 @@ f32 D_800E2AA0 = -200.0f; f32 D_800E2AA4 = -200.0f; f32 D_800E2AA8 = -200.0f; -s16 D_800E2AAC[80] = { - 0, 0, 0, -1, -1, 0, 0, 0, - -1, -1, 0, 0, 0, -1, -1, 0, - 0, 0, -1, -1, 0, 0, 0, -1, - -1, 0, 0, 0, -1, -1, 0, 0, - 0, -1, -1, 0, 0, 0, -1, -1, - 0, 0, 0, -1, -1, 0, 0, 0, - -1, -1, 0, 0, 0, -1, -1, 0, - 0, 0, -1, -1, 0, 0, 0, -1, - -1, 0, 0, 0, -1, -1, 0, 0, - 0, -1, -1, 0, 0, 0, -1, -1 +Vertex D_800E2AAC[16] = { + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, + { 0, 0, 0, 255, 255, 255, 255 }, }; unk800E2B4C D_800E2B4C[8] = { @@ -111,8 +117,8 @@ unk800E2B4C D_800E2B4C[8] = { }; unk800E2C2C D_800E2C2C[2] = { - { 0, 0x400, 0x400, 0x000AFFC4, 0, 0x80FF, 0xFF80, 0x80FF, 0x8000 }, - { 0, 0x600, 0x600, 0x0020FF40, 0, 0xFFFF, 0xFF00, 0x80FF, 0xFF00 } + { 0, 0, 0x400, 0x400, 0x000A, 0xFFC4, NULL, 0x80, 0xFF, 0xFF, 0x80, 0x80, 0xFF, 0x80, 0x00 }, + { 0, 0, 0x600, 0x600, 0x0020, 0xFF40, NULL, 0xFF, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x00 } }; s32 D_800E2C5C = 0; @@ -131,9 +137,8 @@ Sprite *D_800E2C8C = 0; s32 D_800E2C90 = 0; s32 D_800E2C94 = 0; -s16 D_800E2C98[4] = { - 0x40FF, 0xFFFF, 0x0005, 0x0002 -}; + +FadeTransition D_800E2C98 = FADE_TRANSITION(0x40, FADE_COLOR_WHITE, 5, 2); /*******************************/ @@ -147,11 +152,11 @@ s32 D_80127BFC; s32 D_80127C00; s32 D_80127C04; s32 D_80127C08; -s32 D_80127C0C; +Gfx *D_80127C0C; s32 D_80127C10; s32 D_80127C14; -s32 D_80127C18; -s16 *D_80127C1C; +Triangle *D_80127C18; +Object *D_80127C1C; s32 D_80127C20; s32 D_80127C24; s32 D_80127C28; @@ -161,7 +166,7 @@ Object *D_80127C40[16]; /******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AB1F0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AB1F0.s") void func_800AB308(s16 arg0, s16 arg1) { if (D_80127BF8.unk2 < D_80127BF8.unk0) { @@ -173,14 +178,14 @@ void func_800AB308(s16 arg0, s16 arg1) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AB35C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AB4A8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ABB34.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ABC5C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ABE68.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC0C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC21C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC5A4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AB35C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AB4A8.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ABB34.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ABC5C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ABE68.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC0C8.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC21C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC5A4.s") void func_800AC880(s32 arg0) { if (arg0 == D_800E2A80) { @@ -189,8 +194,8 @@ void func_800AC880(s32 arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC8A8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ACA20.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC8A8.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ACA20.s") void func_800ACF60(Object *arg0) { if (D_800E2A88 < 0x10) { @@ -219,17 +224,17 @@ void func_800ACF98(Object* arg0) { } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD030.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD144.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AD030.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AD144.s") void func_800AD220(void) { - if (D_800E2C2C[0].unkC != NULL) { - free_texture(D_800E2C2C[0].unkC); + if (D_800E2C2C[0].tex != NULL) { + free_texture(D_800E2C2C[0].tex); D_800E2C88 = 0; } - if (D_800E2C2C[1].unkC != NULL) { - free_texture(D_800E2C2C[1].unkC); + if (D_800E2C2C[1].tex != NULL) { + free_texture(D_800E2C2C[1].tex); D_800E2C88 = 0; } @@ -268,8 +273,79 @@ void func_800AD4AC(s32 arg0) { D_800E2C6C = arg0; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD4B8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD658.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ADAB8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ADBC8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ADCBC.s") +void func_800AD4B8(s32 arg0) { + s32 i; + + if ((get_viewport_count() == 0) && (D_800E2C5C != 0)) { + if (D_800E2C78 > 0) { + if (arg0 < D_800E2C78) { + D_800E2C78 -= arg0; + D_800E2C60 += D_800E2C64 * arg0; + D_800E2C6C += D_800E2C70 * arg0; + } else { + D_800E2C78 = 0; + D_800E2C60 = D_800E2C68; + D_800E2C6C = D_800E2C74; + } + } + func_800ADBC8(arg0); + func_800AD658(arg0); + func_800ADAB8(arg0); + if (D_800E2C60 >= 256) { + func_80067F2C(&D_80127C0C, &D_80127C10); + for(i = 0; i < 2; i++) { + func_800ADCBC(&D_800E2C2C[i], arg0); + } + gDPSetPrimColor(D_80127C0C++, 0, 0, 255, 255, 255, 255); + gDPSetEnvColor(D_80127C0C++, 255, 255, 255, 0); + func_8007B3D0(&D_80127C0C); + func_800682AC(&D_80127C0C); + } + } +} + +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AD658.s") + +void func_800ADAB8(s32 arg0) { + if (D_800E2C80 > 0) { + D_800E2C80 -= arg0; + if (D_800E2C80 <= 0) { + if (D_800E2C6C >= 32769 && func_800C018C() == 0) { + func_800C01D8(&D_800E2C98); + } + func_80001D04(39, 0); + D_800E2C80 = 0; + } + } else if (D_800E2C60 >= 48000) { + if (D_800E2C7C > 0) { + D_800E2C7C -= arg0; + return; + } + func_80001D04(575, 0); + D_800E2C80 = 600 - ((s32) (D_800E2C60 + -48000) >> 5); + D_800E2C7C = get_random_number_from_range(900, 1140) - ((s32) (D_800E2C60 + -48000) >> 5); + } +} + +void func_800ADBC8(UNUSED s32 arg0) { + f32 temp_f14; + f32 temp_f16; + f32 temp_f18; + f32 sp28; + f32 sp24; + f32 temp_f2; + + sp28 = 1152.0f - (f32) (D_800E2C60 >> 6); + sp24 = func_800707C4(D_80127C1C->y_rotation) * sp28; + temp_f2 = func_800707F8(D_80127C1C->y_rotation) * sp28; + temp_f14 = D_80127C1C->x_position + (temp_f2 - sp24); + temp_f16 = D_80127C1C->y_position; + temp_f18 = D_80127C1C->z_position + (-temp_f2 - sp24); + if (D_800E2C94 != 0) { + func_800096D8(D_800E2C94, temp_f14, temp_f16, temp_f18); + } else { + func_80009558(574, temp_f14, temp_f16, temp_f18, 1, &D_800E2C94); + } +} + +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ADCBC.s") diff --git a/src/unknown_0ABDF0.h b/src/unknown_0ABDF0.h index 091976e2..08c882b9 100644 --- a/src/unknown_0ABDF0.h +++ b/src/unknown_0ABDF0.h @@ -3,6 +3,7 @@ #include "types.h" #include "textures_sprites.h" +#include "audio.h" /* Size: 0x2C Bytes */ typedef struct unk800E2850 { @@ -45,15 +46,21 @@ typedef struct unk800E2B4C { /* Size: 0x18 Bytes */ typedef struct unk800E2C2C { - s32 unk0; + s16 unk0; + s16 unk2; s16 unk4; s16 unk6; - s32 unk8; - TextureHeader *unkC; - s16 unk10; - s16 unk12; - s16 unk14; - s16 unk16; + s16 unk8; + s16 unkA; + TextureHeader *tex; + u8 unk10; + u8 unk11; + u8 unk12; + u8 unk13; + u8 unk14; + u8 unk15; + u8 unk16; + u8 unk17; } unk800E2C2C; typedef struct { @@ -69,5 +76,12 @@ void func_800ACF60(Object *arg0); void func_800AD220(void); void func_800AD2C4(s32 arg0, s32 arg1, f32 arg2); void func_800AD40C(void); +void func_800ADBC8(s32); +void func_800AD658(s32); +void func_800ADAB8(s32); +void func_800ADCBC(unk800E2C2C*, s32); + +f32 func_800707C4(s16); +f32 func_800707F8(s16); #endif diff --git a/src/unknown_0CEC50.c b/src/unknown_0CEC50.c index adf6124b..afca9146 100644 --- a/src/unknown_0CEC50.c +++ b/src/unknown_0CEC50.c @@ -3,5 +3,9 @@ #include "types.h" #include "macros.h" +#include "unknown_0CEC50.h" +//Takes a char pointer, the string to populate it with, and the length of that string. +//Example: +//func_800CE050(&gameName, "DKRACING-ADV", strlen("DKRACING-ADV")); GLOBAL_ASM("lib/asm/non_matchings/unknown_0CEC50/func_800CE050.s") diff --git a/src/unknown_0CEC50.h b/src/unknown_0CEC50.h new file mode 100644 index 00000000..7f1d2158 --- /dev/null +++ b/src/unknown_0CEC50.h @@ -0,0 +1,12 @@ +#ifndef _UNKNOWN_0CEC50_H_ +#define _UNKNOWN_0CEC50_H_ + +#include "types.h" +#include "structs.h" + +//Takes a char pointer, the string to populate it with, and the length of that string. +//Example: +//func_800CE050(&gameName, "DKRACING-ADV", strlen("DKRACING-ADV")); +s32 func_800CE050(u8 *stringToPopulate, char *string, u32 stringLen); + +#endif diff --git a/src/waves.c b/src/waves.c index 3a7be0b6..30a5f224 100644 --- a/src/waves.c +++ b/src/waves.c @@ -248,4 +248,4 @@ GLOBAL_ASM("asm/non_matchings/waves/func_800BF3E4.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BF524.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BF634.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BFE98.s") -GLOBAL_ASM("asm/non_matchings/waves/func_800BFFDC.s") +GLOBAL_ASM("asm/non_matchings/waves/obj_loop_wavepower.s") diff --git a/tools/python/calc_func_checksums.py b/tools/python/calc_func_checksums.py index 1bca8970..ac121757 100644 --- a/tools/python/calc_func_checksums.py +++ b/tools/python/calc_func_checksums.py @@ -14,7 +14,7 @@ FUNCTIONS_TO_CALC = [ # function checksum variable func size variable ('func_80019808', 'gFunc80019808Checksum', 'gFunc80019808Length'), ('func_80024D54', 'gFunc80024D54Checksum', 'gFunc80024D54Length'), - ('func_8003B4BC', 'gFunc8003B4BCChecksum', 'gFunc8003B4BCLength'), + ('obj_loop_goldenballoon', 'gObjLoopGoldenBalloonChecksum', 'gObjLoopGoldenBalloonLength'), ('func_80068158', 'gFunc80068158Checksum', 'gFunc80068158Length') ] diff --git a/tools/python/diff.py b/tools/python/diff.py index 22dff4eb..e57eea22 100644 --- a/tools/python/diff.py +++ b/tools/python/diff.py @@ -132,6 +132,14 @@ if __name__ == "__main__": help="""Tweak --source handling to make it work with binutils < 2.33. Implies --source.""", ) + parser.add_argument( + "-j", + "--section", + dest="diff_section", + default=".text", + metavar="SECTION", + help="Diff restricted to a given output section.", + ) parser.add_argument( "-L", "--line-numbers", @@ -365,6 +373,7 @@ class ProjectSettings: source_directories: Optional[List[str]] source_extensions: List[str] show_line_numbers_default: bool + disassemble_all: bool @dataclass @@ -381,6 +390,7 @@ class Config: diff_obj: bool make: bool source_old_binutils: bool + diff_section: str inlines: bool max_function_size_lines: int max_function_size_bytes: int @@ -425,6 +435,7 @@ def create_project_settings(settings: Dict[str, Any]) -> ProjectSettings: map_format=settings.get("map_format", "gnu"), mw_build_dir=settings.get("mw_build_dir", "build/"), show_line_numbers_default=settings.get("show_line_numbers_default", True), + disassemble_all=settings.get("disassemble_all", False) ) @@ -463,6 +474,7 @@ def create_config(args: argparse.Namespace, project: ProjectSettings) -> Config: diff_obj=args.diff_obj, make=args.make, source_old_binutils=args.source_old_binutils, + diff_section=args.diff_section, inlines=args.inlines, max_function_size_lines=args.max_lines, max_function_size_bytes=args.max_lines * 4, @@ -1009,11 +1021,11 @@ def run_objdump(cmd: ObjdumpCommand, config: Config, project: ProjectSettings) - with open(target, "rb") as f: obj_data = f.read() - return preprocess_objdump_out(restrict, obj_data, out) + return preprocess_objdump_out(restrict, obj_data, out, config) def preprocess_objdump_out( - restrict: Optional[str], obj_data: Optional[bytes], objdump_out: str + restrict: Optional[str], obj_data: Optional[bytes], objdump_out: str, config: Config ) -> str: """ Preprocess the output of objdump into a format that `process()` expects. @@ -1033,13 +1045,13 @@ def preprocess_objdump_out( out = out.rstrip("\n") if obj_data: - out = serialize_data_references(parse_elf_data_references(obj_data)) + out + out = serialize_data_references(parse_elf_data_references(obj_data, config)) + out return out def search_map_file( - fn_name: str, project: ProjectSettings + fn_name: str, project: ProjectSettings, config: Config ) -> Tuple[Optional[str], Optional[int]]: if not project.mapfile: fail(f"No map file configured; cannot find function {fn_name}.") @@ -1059,7 +1071,7 @@ def search_map_file( cands = [] last_line = "" for line in lines: - if line.startswith(" .text"): + if line.startswith(" " + config.diff_section): cur_objfile = line.split()[3] if "load address" in line: tokens = last_line.split() + line.split() @@ -1080,13 +1092,14 @@ def search_map_file( if len(cands) == 1: return cands[0] elif project.map_format == "mw": + section_pattern = re.escape(config.diff_section) find = re.findall( re.compile( # ram elf rom r" \S+ \S+ (\S+) (\S+) . " + fn_name # object name - + r"(?: \(entry of \.(?:init|text)\))? \t(\S+)" + + r"(?: \(entry of " + section_pattern + r"\))? \t(\S+)" ), contents, ) @@ -1121,7 +1134,7 @@ def search_map_file( return None, None -def parse_elf_data_references(data: bytes) -> List[Tuple[int, int, str]]: +def parse_elf_data_references(data: bytes, config: Config) -> List[Tuple[int, int, str]]: e_ident = data[:16] if e_ident[:4] != b"\x7FELF": return [] @@ -1134,7 +1147,6 @@ def parse_elf_data_references(data: bytes) -> List[Tuple[int, int, str]]: is_little_endian = e_ident[5] == 1 str_end = "<" if is_little_endian else ">" str_off = "I" if is_32bit else "Q" - sym_size = {"B": 1, "H": 2, "I": 4, "Q": 8} def read(spec: str, offset: int) -> Tuple[int, ...]: spec = spec.replace("P", str_off) @@ -1186,17 +1198,22 @@ def parse_elf_data_references(data: bytes) -> List[Tuple[int, int, str]]: assert len(symtab_sections) == 1 symtab = sections[symtab_sections[0]] - text_sections = [i for i in range(e_shnum) if sec_names[i] == b".text"] - assert len(text_sections) == 1 + section_name = config.diff_section.encode("utf-8") + text_sections = [i for i in range(e_shnum) if sec_names[i] == section_name and sections[i].sh_size != 0] + if len(text_sections) != 1: + return [] text_section = text_sections[0] ret: List[Tuple[int, int, str]] = [] for s in sections: if s.sh_type == SHT_REL or s.sh_type == SHT_RELA: if s.sh_info == text_section: - # Skip .text -> .text references + # Skip section_name -> section_name references continue sec_name = sec_names[s.sh_info].decode("latin1") + if sec_name == ".mwcats.text": + # Skip Metrowerks CATS Utility section + continue sec_base = sections[s.sh_info].sh_offset for i in range(0, s.sh_size, s.sh_entsize): if s.sh_type == SHT_REL: @@ -1253,11 +1270,16 @@ def dump_elf( f"--stop-address={end_addr}", ] + if project.disassemble_all: + disassemble_flag = "-D" + else: + disassemble_flag = "-d" + flags2 = [ f"--disassemble={diff_elf_symbol}", ] - objdump_flags = ["-drz", "-j", ".text"] + objdump_flags = [disassemble_flag, "-rz", "-j", config.diff_section] return ( project.myimg, (objdump_flags + flags1, project.baseimg, None), @@ -1279,7 +1301,7 @@ def dump_objfile( if start.startswith("0"): fail("numerical start address not supported with -o; pass a function name") - objfile, _ = search_map_file(start, project) + objfile, _ = search_map_file(start, project, config) if not objfile: fail("Not able to find .o file for function.") @@ -1293,7 +1315,12 @@ def dump_objfile( if not os.path.isfile(refobjfile): fail(f'Please ensure an OK .o file exists at "{refobjfile}".') - objdump_flags = ["-drz", "-j", ".text"] + if project.disassemble_all: + disassemble_flag = "-D" + else: + disassemble_flag = "-d" + + objdump_flags = [disassemble_flag, "-rz", "-j", config.diff_section] return ( objfile, (objdump_flags, refobjfile, start), @@ -1310,7 +1337,7 @@ def dump_binary( run_make(project.myimg, project) start_addr = maybe_eval_int(start) if start_addr is None: - _, start_addr = search_map_file(start, project) + _, start_addr = search_map_file(start, project, config) if start_addr is None: fail("Not able to find function in map file.") if end is not None: @@ -1329,11 +1356,18 @@ def dump_binary( (objdump_flags + flags2, project.myimg, None), ) +# Example: "ldr r4, [pc, #56] ; (4c )" +ARM32_LOAD_POOL_PATTERN = r"(ldr\s+r([0-9]|1[0-3]),\s+\[pc,.*;\s*)(\([a-fA-F0-9]+.*\))" -class DifferenceNormalizer: + +# The base class is a no-op. +class AsmProcessor: def __init__(self, config: Config) -> None: self.config = config + def process_reloc(self, row: str, prev: str) -> str: + return prev + def normalize(self, mnemonic: str, row: str) -> str: """This should be called exactly once for each line.""" arch = self.config.arch @@ -1345,8 +1379,132 @@ class DifferenceNormalizer: def _normalize_arch_specific(self, mnemonic: str, row: str) -> str: return row + def post_process(self, lines: List["Line"]) -> None: + return -class DifferenceNormalizerAArch64(DifferenceNormalizer): + +class AsmProcessorMIPS(AsmProcessor): + def process_reloc(self, row: str, prev: str) -> str: + arch = self.config.arch + if "R_MIPS_NONE" in row or "R_MIPS_JALR" in row: + # GNU as emits no-op relocations immediately after real ones when + # assembling with -mabi=64. Return without trying to parse 'imm' as an + # integer. + return prev + before, imm, after = parse_relocated_line(prev) + repl = row.split()[-1] + if imm != "0": + # MIPS uses relocations with addends embedded in the code as immediates. + # If there is an immediate, show it as part of the relocation. Ideally + # we'd show this addend in both %lo/%hi, but annoyingly objdump's output + # doesn't include enough information to pair up %lo's and %hi's... + # TODO: handle unambiguous cases where all addends for a symbol are the + # same, or show "+???". + mnemonic = prev.split()[0] + if ( + mnemonic in arch.instructions_with_address_immediates + and not imm.startswith("0x") + ): + imm = "0x" + imm + repl += "+" + imm if int(imm, 0) > 0 else imm + if "R_MIPS_LO16" in row: + repl = f"%lo({repl})" + elif "R_MIPS_HI16" in row: + # Ideally we'd pair up R_MIPS_LO16 and R_MIPS_HI16 to generate a + # correct addend for each, but objdump doesn't give us the order of + # the relocations, so we can't find the right LO16. :( + repl = f"%hi({repl})" + elif "R_MIPS_26" in row: + # Function calls + pass + elif "R_MIPS_PC16" in row: + # Branch to glabel. This gives confusing output, but there's not much + # we can do here. + pass + elif "R_MIPS_GPREL16" in row: + repl = f"%gp_rel({repl})" + elif "R_MIPS_GOT16" in row: + repl = f"%got({repl})" + elif "R_MIPS_CALL16" in row: + repl = f"%call16({repl})" + else: + assert False, f"unknown relocation type '{row}' for line '{prev}'" + return before + repl + after + + +class AsmProcessorPPC(AsmProcessor): + def process_reloc(self, row: str, prev: str) -> str: + arch = self.config.arch + assert any( + r in row for r in ["R_PPC_REL24", "R_PPC_ADDR16", "R_PPC_EMB_SDA21"] + ), f"unknown relocation type '{row}' for line '{prev}'" + before, imm, after = parse_relocated_line(prev) + repl = row.split()[-1] + if "R_PPC_REL24" in row: + # function calls + pass + elif "R_PPC_ADDR16_HI" in row: + # absolute hi of addr + repl = f"{repl}@h" + elif "R_PPC_ADDR16_HA" in row: + # adjusted hi of addr + repl = f"{repl}@ha" + elif "R_PPC_ADDR16_LO" in row: + # lo of addr + repl = f"{repl}@l" + elif "R_PPC_ADDR16" in row: + # 16-bit absolute addr + if "+0x7" in repl: + # remove the very large addends as they are an artifact of (label-_SDA(2)_BASE_) + # computations and are unimportant in a diff setting. + if int(repl.split("+")[1], 16) > 0x70000000: + repl = repl.split("+")[0] + elif "R_PPC_EMB_SDA21" in row: + # small data area + pass + return before + repl + after + + +class AsmProcessorARM32(AsmProcessor): + def process_reloc(self, row: str, prev: str) -> str: + arch = self.config.arch + before, imm, after = parse_relocated_line(prev) + repl = row.split()[-1] + return before + repl + after + + def _normalize_arch_specific(self, mnemonic: str, row: str) -> str: + if self.config.ignore_addr_diffs: + row = self._normalize_bl(mnemonic, row) + row = self._normalize_data_pool(row) + return row + + def _normalize_bl(self, mnemonic: str, row: str) -> str: + if mnemonic != "bl": + return row + + row, _ = split_off_address(row) + return row + "" + + def _normalize_data_pool(self, row: str) -> str: + pool_match = re.search(ARM32_LOAD_POOL_PATTERN, row) + return pool_match.group(1) if pool_match else row + + def post_process(self, lines: List["Line"]) -> None: + lines_by_line_number = {} + for line in lines: + lines_by_line_number[line.line_num] = line + for line in lines: + if line.data_pool_addr is None: + continue + + # Add data symbol and its address to the line. + line_original = lines_by_line_number[line.data_pool_addr].original + value = line_original.split()[1] + addr = "{:x}".format(line.data_pool_addr) + line.original = line.normalized_original + f"={value} ({addr})" + + +class AsmProcessorAArch64(AsmProcessor): def __init__(self, config: Config) -> None: super().__init__(config) self._adrp_pair_registers: Set[str] = set() @@ -1396,23 +1554,6 @@ class DifferenceNormalizerAArch64(DifferenceNormalizer): return row -class DifferenceNormalizerARM32(DifferenceNormalizer): - def __init__(self, config: Config) -> None: - super().__init__(config) - - def _normalize_arch_specific(self, mnemonic: str, row: str) -> str: - if self.config.ignore_addr_diffs: - row = self._normalize_bl(mnemonic, row) - return row - - def _normalize_bl(self, mnemonic: str, row: str) -> str: - if mnemonic != "bl": - return row - - row, _ = split_off_address(row) - return row + "" - - @dataclass class ArchSettings: name: str @@ -1422,12 +1563,13 @@ class ArchSettings: re_sprel: Pattern[str] re_large_imm: Pattern[str] re_imm: Pattern[str] + re_reloc: Pattern[str] branch_instructions: Set[str] instructions_with_address_immediates: Set[str] forbidden: Set[str] = field(default_factory=lambda: set(string.ascii_letters + "_")) arch_flags: List[str] = field(default_factory=list) branch_likely_instructions: Set[str] = field(default_factory=set) - difference_normalizer: Type[DifferenceNormalizer] = DifferenceNormalizer + proc: Type[AsmProcessor] = AsmProcessor big_endian: Optional[bool] = True delay_slot_instructions: Set[str] = field(default_factory=set) @@ -1538,18 +1680,20 @@ PPC_BRANCH_INSTRUCTIONS = { MIPS_SETTINGS = ArchSettings( name="mips", re_int=re.compile(r"[0-9]+"), - re_comment=re.compile(r"<.*?>"), + re_comment=re.compile(r"<.*>"), re_reg=re.compile( r"\$?\b(a[0-7]|t[0-9]|s[0-8]|at|v[01]|f[12]?[0-9]|f3[01]|kt?[01]|fp|ra|zero)\b" ), re_sprel=re.compile(r"(?<=,)([0-9]+|0x[0-9a-f]+)\(sp\)"), re_large_imm=re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}"), re_imm=re.compile(r"(\b|-)([0-9]+|0x[0-9a-fA-F]+)\b(?!\(sp)|%(lo|hi)\([^)]*\)"), + re_reloc=re.compile(r"R_MIPS_"), arch_flags=["-m", "mips:4300"], branch_likely_instructions=MIPS_BRANCH_LIKELY_INSTRUCTIONS, branch_instructions=MIPS_BRANCH_INSTRUCTIONS, instructions_with_address_immediates=MIPS_BRANCH_INSTRUCTIONS.union({"jal", "j"}), delay_slot_instructions=MIPS_BRANCH_INSTRUCTIONS.union({"j", "jal", "jr", "jalr"}), + proc=AsmProcessorMIPS, ) MIPSEL_SETTINGS = replace(MIPS_SETTINGS, name="mipsel", big_endian=False) @@ -1557,7 +1701,7 @@ MIPSEL_SETTINGS = replace(MIPS_SETTINGS, name="mipsel", big_endian=False) ARM32_SETTINGS = ArchSettings( name="arm32", re_int=re.compile(r"[0-9]+"), - re_comment=re.compile(r"(<.*?>|//.*$)"), + re_comment=re.compile(r"(<.*>|//.*$)"), # Includes: # - General purpose registers: r0..13 # - Frame pointer registers: lr (r14), pc (r15) @@ -1569,42 +1713,50 @@ ARM32_SETTINGS = ArchSettings( re_sprel=re.compile(r"sp, #-?(0x[0-9a-fA-F]+|[0-9]+)\b"), re_large_imm=re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}"), re_imm=re.compile(r"(?|//.*$)"), - # GPRs and FP registers: X0-X30, W0-W30, [DSHQ]0..31 + re_comment=re.compile(r"(<.*>|//.*$)"), + # GPRs and FP registers: X0-X30, W0-W30, [BHSDVQ]0..31 + # (FP registers may be followed by data width and number of elements, e.g. V0.4S) # The zero registers and SP should not be in this list. - re_reg=re.compile(r"\$?\b([dshq][12]?[0-9]|[dshq]3[01]|[xw][12]?[0-9]|[xw]30)\b"), + re_reg=re.compile(r"\$?\b([bhsdvq]([12]?[0-9]|3[01])(\.\d\d?[bhsdvq])?|[xw][12]?[0-9]|[xw]30)\b"), re_sprel=re.compile(r"sp, #-?(0x[0-9a-fA-F]+|[0-9]+)\b"), re_large_imm=re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}"), re_imm=re.compile(r"(?|//.*$)"), + re_comment=re.compile(r"(<.*>|//.*$)"), re_reg=re.compile(r"\$?\b([rf][0-9]+)\b"), re_sprel=re.compile(r"(?<=,)(-?[0-9]+|-?0x[0-9a-f]+)\(r1\)"), re_large_imm=re.compile(r"-?[1-9][0-9]{2,}|-?0x[0-9a-f]{3,}"), re_imm=re.compile(r"(\b|-)([0-9]+|0x[0-9a-fA-F]+)\b(?!\(r1)|[^@]*@(ha|h|lo)"), + re_reloc=re.compile(r"R_PPC_"), branch_instructions=PPC_BRANCH_INSTRUCTIONS, instructions_with_address_immediates=PPC_BRANCH_INSTRUCTIONS.union({"bl"}), + proc=AsmProcessorPPC, ) ARCH_SETTINGS = [ MIPS_SETTINGS, MIPSEL_SETTINGS, ARM32_SETTINGS, + ARMEL_SETTINGS, AARCH64_SETTINGS, PPC_SETTINGS, ] @@ -1642,84 +1794,6 @@ def parse_relocated_line(line: str) -> Tuple[str, str, str]: return before, imm, after -def process_mips_reloc(row: str, prev: str, arch: ArchSettings) -> str: - if "R_MIPS_NONE" in row: - # GNU as emits no-op relocations immediately after real ones when - # assembling with -mabi=64. Return without trying to parse 'imm' as an - # integer. - return prev - before, imm, after = parse_relocated_line(prev) - repl = row.split()[-1] - if imm != "0": - # MIPS uses relocations with addends embedded in the code as immediates. - # If there is an immediate, show it as part of the relocation. Ideally - # we'd show this addend in both %lo/%hi, but annoyingly objdump's output - # doesn't include enough information to pair up %lo's and %hi's... - # TODO: handle unambiguous cases where all addends for a symbol are the - # same, or show "+???". - mnemonic = prev.split()[0] - if ( - mnemonic in arch.instructions_with_address_immediates - and not imm.startswith("0x") - ): - imm = "0x" + imm - repl += "+" + imm if int(imm, 0) > 0 else imm - if "R_MIPS_LO16" in row: - repl = f"%lo({repl})" - elif "R_MIPS_HI16" in row: - # Ideally we'd pair up R_MIPS_LO16 and R_MIPS_HI16 to generate a - # correct addend for each, but objdump doesn't give us the order of - # the relocations, so we can't find the right LO16. :( - repl = f"%hi({repl})" - elif "R_MIPS_26" in row: - # Function calls - pass - elif "R_MIPS_PC16" in row: - # Branch to glabel. This gives confusing output, but there's not much - # we can do here. - pass - else: - assert False, f"unknown relocation type '{row}' for line '{prev}'" - return before + repl + after - - -def process_ppc_reloc(row: str, prev: str) -> str: - assert any( - r in row for r in ["R_PPC_REL24", "R_PPC_ADDR16", "R_PPC_EMB_SDA21"] - ), f"unknown relocation type '{row}' for line '{prev}'" - before, imm, after = parse_relocated_line(prev) - repl = row.split()[-1] - if "R_PPC_REL24" in row: - # function calls - pass - elif "R_PPC_ADDR16_HI" in row: - # absolute hi of addr - repl = f"{repl}@h" - elif "R_PPC_ADDR16_HA" in row: - # adjusted hi of addr - repl = f"{repl}@ha" - elif "R_PPC_ADDR16_LO" in row: - # lo of addr - repl = f"{repl}@l" - elif "R_PPC_ADDR16" in row: - # 16-bit absolute addr - if "+0x7" in repl: - # remove the very large addends as they are an artifact of (label-_SDA(2)_BASE_) - # computations and are unimportant in a diff setting. - if int(repl.split("+")[1], 16) > 0x70000000: - repl = repl.split("+")[0] - elif "R_PPC_EMB_SDA21" in row: - # small data area - pass - return before + repl + after - - -def process_arm_reloc(row: str, prev: str, arch: ArchSettings) -> str: - before, imm, after = parse_relocated_line(prev) - repl = row.split()[-1] - return before + repl + after - - def pad_mnemonic(line: str) -> str: if "\t" not in line: return line @@ -1736,6 +1810,7 @@ class Line: scorable_line: str line_num: Optional[int] = None branch_target: Optional[int] = None + data_pool_addr: Optional[int] = None source_filename: Optional[str] = None source_line_num: Optional[int] = None source_lines: List[str] = field(default_factory=list) @@ -1744,7 +1819,7 @@ class Line: def process(dump: str, config: Config) -> List[Line]: arch = config.arch - normalizer = arch.difference_normalizer(config) + processor = arch.proc(config) skip_next = False source_lines = [] source_filename = None @@ -1786,7 +1861,7 @@ def process(dump: str, config: Config) -> List[Line]: ) break - if not re.match(r"^ +[0-9a-f]+:\t", row): + if not re.match(r"^\s+[0-9a-f]+:\s+", row): # This regex is conservative, and assumes the file path does not contain "weird" # characters like colons, tabs, or angle brackets. if re.match( @@ -1797,13 +1872,22 @@ def process(dump: str, config: Config) -> List[Line]: source_lines.append(row) continue + # If the instructions loads a data pool symbol, extract the address of + # the symbol. + data_pool_addr = None + pool_match = re.search(ARM32_LOAD_POOL_PATTERN, row) + if pool_match: + offset = pool_match.group(3).split(" ")[0][1:] + data_pool_addr = int(offset, 16) + m_comment = re.search(arch.re_comment, row) comment = m_comment[0] if m_comment else None row = re.sub(arch.re_comment, "", row) + line_num_str = row.split(":")[0] row = row.rstrip() tabs = row.split("\t") row = "\t".join(tabs[2:]) - line_num = eval_line_num(tabs[0].strip()) + line_num = eval_line_num(line_num_str.strip()) if line_num in data_refs: refs = data_refs[line_num] @@ -1838,20 +1922,13 @@ def process(dump: str, config: Config) -> List[Line]: while i < len(lines): reloc_row = lines[i] - if "R_AARCH64_" in reloc_row: - # TODO: handle relocation - pass - elif "R_MIPS_" in reloc_row: - original = process_mips_reloc(reloc_row, original, arch) - elif "R_PPC_" in reloc_row: - original = process_ppc_reloc(reloc_row, original) - elif "R_ARM_" in reloc_row: - original = process_arm_reloc(reloc_row, original, arch) + if re.search(arch.re_reloc, reloc_row): + original = processor.process_reloc(reloc_row, original) else: break i += 1 - normalized_original = normalizer.normalize(mnemonic, original) + normalized_original = processor.normalize(mnemonic, original) scorable_line = normalized_original if not config.score_stack_differences: @@ -1893,6 +1970,7 @@ def process(dump: str, config: Config) -> List[Line]: scorable_line=scorable_line, line_num=line_num, branch_target=branch_target, + data_pool_addr=data_pool_addr, source_filename=source_filename, source_line_num=source_line_num, source_lines=source_lines, @@ -1907,6 +1985,7 @@ def process(dump: str, config: Config) -> List[Line]: elif stop_after_delay_slot: break + processor.post_process(output) return output diff --git a/tools/python/diff_settings.py b/tools/python/diff_settings.py index 54214cbc..689e3644 100644 --- a/tools/python/diff_settings.py +++ b/tools/python/diff_settings.py @@ -14,7 +14,6 @@ def apply(config, args): config['mapfile'] = f'build/' + version + '/dkr.map' config['myimg'] = f'build/' + version + '/dkr.z64' config['baseimg'] = find_baserom(version) - config['makeflags'] = [f''] config['source_directories'] = ['src'] ######################################################################################## diff --git a/tools/python/fix_regional_names.py b/tools/python/fix_regional_names.py new file mode 100755 index 00000000..59ac9fec --- /dev/null +++ b/tools/python/fix_regional_names.py @@ -0,0 +1,198 @@ +#!/usr/bin/env python3 +import argparse +import json +import re +import os + +from file_util import FileUtil + +# Make sure this gets run in the project's base directory. +FileUtil.set_working_dir_to_project_base() + +# This script converts all symbol names between US and UK english. + +REGEX_MAP_SYMBOL = r"[ ]{16}0x[0-9A-Fa-f]{16}[ ]{16}([a-zA-Z_][a-zA-Z0-9_]*)\n" + +TERMINAL_COLOR_RED = "\033[31m" +TERMINAL_COLOR_GREEN = "\033[32m" +TERMINAL_COLOR_YELLOW = "\033[33m" +TERMINAL_COLOR_RESET = "\033[0m" + +REGIONAL_NAMES_JSON_PATH = 'tools/python/regional_names.json' + +# Note: All words MUST be lowercase +diffMap = json.loads(FileUtil.get_text_from_file(REGIONAL_NAMES_JSON_PATH))['diffMap'] +convertRegion = 'to_uk' + +def precheckForErrors(version): + versionBuildPath = 'build/' + version + if not FileUtil.does_file_exist(versionBuildPath): + print('Error: "' + versionBuildPath + '" could not be found. You should have an OK build before running this script!') + return None + return versionBuildPath + '/dkr.map' + +def filterSymMapText(symMapText): + newSymMapText = '' + + lines = symMapText.split('\n') + + state = 0 + # 0 = Looking for .main section + # 1 = Looking for file section + # 2 = Processing file section + + for i in range(0, len(lines)): + line = lines[i] + if state == 0 and line.startswith('.main'): + state = 1 + elif state == 1: + if line.startswith(' build/') and '/lib/' not in line: + state = 2 + elif state == 2: + if line.startswith(' build/') and '/lib/' in line: + state = 1 + continue + if line.startswith('/DISCARD/'): + break + newSymMapText += line + '\n' + return newSymMapText + +def getSymbolsFromMapText(symMapText): + symbols = set() + + matches = re.finditer(REGEX_MAP_SYMBOL, symMapText, re.MULTILINE) + + for matchNum, match in enumerate(matches, start=1): + symbols.add(match.group(1)) + + return list(symbols) + +def getReplaceProperties(subsymbol, convertTo): + replaceWith = subsymbol + if subsymbol.islower(): + replaceWith = convertTo.lower() + elif subsymbol.isupper(): + replaceWith = convertTo.upper() + elif subsymbol.istitle(): + replaceWith = convertTo.title() + + return { + "subsymbol": subsymbol, + "replaceWith": replaceWith + } + +def breakDownSymbol(symbolName): + form = 'unknown' + + if symbolName.islower(): + form = 'snakeLower' + elif symbolName.isupper(): + form = 'snakeUpper' + elif symbolName[0].islower(): + form = 'camelCase' + elif symbolName[0].isupper(): + form = 'pascalCase' + + if form == 'unknown': + return None + + parts = [] + + if form == 'snakeLower' or form == 'snakeUpper': + parts = symbolName.split('_') + elif form == 'camelCase' or form == 'pascalCase': + start = 0 + for i in range(1, len(symbolName)): + if symbolName[i].isupper(): + parts.append(symbolName[start:i]) + start = i + parts.append(symbolName[start:]) + + return parts + +def filterOutSymbols(symbols): + validSymbols = {} + + for symbol in symbols: + symbolParts = breakDownSymbol(symbol) + + if symbolParts is None: + # Symbol can't be processed, so just skip it. + continue + + for part in symbolParts: + lowerPart = part.lower() + if lowerPart in diffMap[convertRegion]: + if symbol not in validSymbols: + validSymbols[symbol] = [] + validSymbols[symbol].append(getReplaceProperties(part, diffMap[convertRegion][lowerPart])) + + return validSymbols + +def validateReplaces(symbolReplaces): + validatedReplaces = [] + + if len(symbolReplaces) == 0: + return validatedReplaces + + print(TERMINAL_COLOR_YELLOW + "Enter 'y' or nothing to accept change, 'n' to discard change, 'x' to abort" + TERMINAL_COLOR_RESET) + + for symbol in symbolReplaces: + oldSymbol = symbol + for entry in symbolReplaces[symbol]: + oldWord = entry["subsymbol"] + index = symbol.index(oldWord) + newWord = entry["replaceWith"] + symbol = symbol[0:index] + newWord + symbol[index+len(oldWord):] + while(True): + inputText = 'Replace "' + oldSymbol + '" with "' + symbol + '"? ' + response = input(inputText).lower() + if len(response) == 0 or response.startswith('y'): + validatedReplaces.append({"old": oldSymbol, "new": symbol}); + print("\033[1A\033[" + str(len(inputText)) + "C" + TERMINAL_COLOR_GREEN + "Change Accepted" + TERMINAL_COLOR_RESET) + break + elif response.startswith('n'): + print("\033[1A\033[" + str(len(inputText)) + "C" + TERMINAL_COLOR_RED + "Change Discarded" + TERMINAL_COLOR_RESET) + break + elif response.startswith('x'): + return None # None means aborted + + return validatedReplaces + +def convertName(version): + symMapPath = precheckForErrors(version) + if symMapPath is None: + return + symMapText = filterSymMapText(FileUtil.get_text_from_file(symMapPath)) + symbols = getSymbolsFromMapText(symMapText) + symbolReplaces = filterOutSymbols(symbols) + validReplaces = validateReplaces(symbolReplaces) + if validReplaces is None: + print("Name conversion has been aborted. No changes were made.") + return + if len(validReplaces) == 0: + print("No symbols can be converted. No changes were made.") + return + for entry in validReplaces: + os.system('./rename.sh ' + entry["old"] + ' ' + entry["new"]) + os.system('make clean') + print(str(len(validReplaces)) + " symbols were replaced.") + +def main(): + global convertRegion + parser = argparse.ArgumentParser(description="Converts all symbol names between US and UK naming.") + parser.add_argument("-c", "--convertTo", help="Either 'uk' or 'us'", choices=['uk', 'us'], default='uk') + parser.add_argument("-v", "--version", help="DKR Version", + choices=['us_1.0', 'us_1.1', 'eu_1.0', 'eu_1.1', 'jp'], default='us_1.0') + args = parser.parse_args() + + if args.convertTo == 'uk': + convertRegion = 'to_uk' + else: + convertRegion = 'to_us' + + convertName(args.version) + +if __name__ == "__main__": + main() + diff --git a/tools/python/regional_names.json b/tools/python/regional_names.json new file mode 100644 index 00000000..23bd5492 --- /dev/null +++ b/tools/python/regional_names.json @@ -0,0 +1,3467 @@ +{ + "note": "All words must be lower case!", + "diffMap": { + "to_uk": { + "accessorize": "accessorise", + "accessorized": "accessorised", + "accessorizes": "accessorises", + "accessorizing": "accessorising", + "acclimatization": "acclimatisation", + "acclimatize": "acclimatise", + "acclimatized": "acclimatised", + "acclimatizes": "acclimatises", + "acclimatizing": "acclimatising", + "accouterments": "accoutrements", + "eon": "aeon", + "eons": "aeons", + "aerogram": "aerogramme", + "aerograms": "aerogrammes", + "airplane": "aeroplane", + "airplanes": "aeroplanes", + "esthete": "aesthete", + "esthetes": "aesthetes", + "esthetic": "aesthetic", + "esthetically": "aesthetically", + "esthetics": "aesthetics", + "etiology": "aetiology", + "aging": "ageing", + "aggrandizement": "aggrandisement", + "agonize": "agonise", + "agonized": "agonised", + "agonizes": "agonises", + "agonizing": "agonising", + "agonizingly": "agonisingly", + "almanac": "almanack", + "almanacs": "almanacks", + "aluminum": "aluminium", + "amortizable": "amortisable", + "amortization": "amortisation", + "amortizations": "amortisations", + "amortize": "amortise", + "amortized": "amortised", + "amortizes": "amortises", + "amortizing": "amortising", + "amphitheater": "amphitheatre", + "amphitheaters": "amphitheatres", + "anemia": "anaemia", + "anemic": "anaemic", + "anesthesia": "anaesthesia", + "anesthetic": "anaesthetic", + "anesthetics": "anaesthetics", + "anesthetize": "anaesthetize", + "anesthetized": "anaesthetized", + "anesthetizes": "anaesthetizes", + "anesthetizing": "anaesthetizing", + "anesthetist": "anaesthetist", + "anesthetists": "anaesthetists", + "analog": "analogue", + "analogs": "analogues", + "analyze": "analyse", + "analyzed": "analysed", + "analyzes": "analyses", + "analyzing": "analysing", + "anglicize": "anglicise", + "anglicized": "anglicised", + "anglicizes": "anglicises", + "anglicizing": "anglicising", + "annualized": "annualised", + "antagonize": "antagonise", + "antagonized": "antagonised", + "antagonizes": "antagonises", + "antagonizing": "antagonising", + "apologize": "apologise", + "apologized": "apologised", + "apologizes": "apologises", + "apologizing": "apologising", + "appall": "appal", + "appalls": "appals", + "appetizer": "appetiser", + "appetizers": "appetisers", + "appetizing": "appetising", + "appetizingly": "appetisingly", + "arbor": "arbour", + "arbors": "arbours", + "archeological": "archaeological", + "archeologically": "archaeologically", + "archeologist": "archaeologist", + "archeologists": "archaeologists", + "archeology": "archaeology", + "ardor": "ardour", + "armor": "armour", + "armored": "armoured", + "armorer": "armourer", + "armorers": "armourers", + "armories": "armouries", + "armory": "armoury", + "artifact": "artefact", + "artifacts": "artefacts", + "authorize": "authorise", + "authorized": "authorised", + "authorizes": "authorises", + "authorizing": "authorising", + "ax": "axe", + "backpedaled": "backpedalled", + "backpedaling": "backpedalling", + "banister": "bannister", + "banisters": "bannisters", + "baptize": "baptise", + "baptized": "baptised", + "baptizes": "baptises", + "baptizing": "baptising", + "bastardize": "bastardise", + "bastardized": "bastardised", + "bastardizes": "bastardises", + "bastardizing": "bastardising", + "battleax": "battleaxe", + "balk": "baulk", + "balked": "baulked", + "balking": "baulking", + "balks": "baulks", + "bedeviled": "bedevilled", + "bedeviling": "bedevilling", + "behavior": "behaviour", + "behavioral": "behavioural", + "behaviorism": "behaviourism", + "behaviorist": "behaviourist", + "behaviorists": "behaviourists", + "behaviors": "behaviours", + "behoove": "behove", + "behooved": "behoved", + "behooves": "behoves", + "bejeweled": "bejewelled", + "belabor": "belabour", + "belabored": "belaboured", + "belaboring": "belabouring", + "belabors": "belabours", + "beveled": "bevelled", + "bevies": "bevvies", + "bevy": "bevvy", + "biased": "biassed", + "biasing": "biassing", + "binging": "bingeing", + "bougainvillea": "bougainvillaea", + "bougainvilleas": "bougainvillaeas", + "bowdlerize": "bowdlerise", + "bowdlerized": "bowdlerised", + "bowdlerizes": "bowdlerises", + "bowdlerizing": "bowdlerising", + "breathalyze": "breathalyse", + "breathalyzed": "breathalysed", + "breathalyzer": "breathalyser", + "breathalyzers": "breathalysers", + "breathalyzes": "breathalyses", + "breathalyzing": "breathalysing", + "brutalize": "brutalise", + "brutalized": "brutalised", + "brutalizes": "brutalises", + "brutalizing": "brutalising", + "busses": "buses", + "bussing": "busing", + "cesarean": "caesarean", + "cesareans": "caesareans", + "caliber": "calibre", + "calibers": "calibres", + "caliper": "calliper", + "calipers": "callipers", + "calisthenics": "callisthenics", + "canalize": "canalise", + "canalized": "canalised", + "canalizes": "canalises", + "canalizing": "canalising", + "cancelation": "cancellation", + "cancelations": "cancellations", + "canceled": "cancelled", + "canceling": "cancelling", + "candor": "candour", + "cannibalize": "cannibalise", + "cannibalized": "cannibalised", + "cannibalizes": "cannibalises", + "cannibalizing": "cannibalising", + "canonize": "canonise", + "canonized": "canonised", + "canonizes": "canonises", + "canonizing": "canonising", + "capitalize": "capitalise", + "capitalized": "capitalised", + "capitalizes": "capitalises", + "capitalizing": "capitalising", + "caramelize": "caramelise", + "caramelized": "caramelised", + "caramelizes": "caramelises", + "caramelizing": "caramelising", + "carbonize": "carbonise", + "carbonized": "carbonised", + "carbonizes": "carbonises", + "carbonizing": "carbonising", + "caroled": "carolled", + "caroling": "carolling", + "catalog": "catalogue", + "cataloged": "catalogued", + "catalogs": "catalogues", + "cataloging": "cataloguing", + "catalyze": "catalyse", + "catalyzed": "catalysed", + "catalyzes": "catalyses", + "catalyzing": "catalysing", + "categorize": "categorise", + "categorized": "categorised", + "categorizes": "categorises", + "categorizing": "categorising", + "cauterize": "cauterise", + "cauterized": "cauterised", + "cauterizes": "cauterises", + "cauterizing": "cauterising", + "caviled": "cavilled", + "caviling": "cavilling", + "centigram": "centigramme", + "centigrams": "centigrammes", + "centiliter": "centilitre", + "centiliters": "centilitres", + "centimeter": "centimetre", + "centimeters": "centimetres", + "centralize": "centralise", + "centralized": "centralised", + "centralizes": "centralises", + "centralizing": "centralising", + "center": "centre", + "centered": "centred", + "centerfold": "centrefold", + "centerfolds": "centrefolds", + "centerpiece": "centrepiece", + "centerpieces": "centrepieces", + "centers": "centres", + "channeled": "channelled", + "channeling": "channelling", + "characterize": "characterise", + "characterized": "characterised", + "characterizes": "characterises", + "characterizing": "characterising", + "checkbook": "chequebook", + "checkbooks": "chequebooks", + "checkered": "chequered", + "chili": "chilli", + "chimera": "chimaera", + "chimeras": "chimaeras", + "chiseled": "chiselled", + "chiseling": "chiselling", + "circularize": "circularise", + "circularized": "circularised", + "circularizes": "circularises", + "circularizing": "circularising", + "civilize": "civilise", + "civilized": "civilised", + "civilizes": "civilises", + "civilizing": "civilising", + "clamor": "clamour", + "clamored": "clamoured", + "clamoring": "clamouring", + "clamors": "clamours", + "clangor": "clangour", + "clarinetist": "clarinettist", + "clarinetists": "clarinettists", + "collectivize": "collectivise", + "collectivized": "collectivised", + "collectivizes": "collectivises", + "collectivizing": "collectivising", + "colonization": "colonisation", + "colonize": "colonise", + "colonized": "colonised", + "colonizer": "coloniser", + "colonizers": "colonisers", + "colonizes": "colonises", + "colonizing": "colonising", + "color": "colour", + "colorant": "colourant", + "colorants": "colourants", + "colored": "coloured", + "coloreds": "coloureds", + "colorful": "colourful", + "colorfully": "colourfully", + "coloring": "colouring", + "colorize": "colourize", + "colorized": "colourized", + "colorizes": "colourizes", + "colorizing": "colourizing", + "colorless": "colourless", + "colors": "colours", + "commercialize": "commercialise", + "commercialized": "commercialised", + "commercializes": "commercialises", + "commercializing": "commercialising", + "compartmentalize": "compartmentalise", + "compartmentalized": "compartmentalised", + "compartmentalizes": "compartmentalises", + "compartmentalizing": "compartmentalising", + "computerize": "computerise", + "computerized": "computerised", + "computerizes": "computerises", + "computerizing": "computerising", + "conceptualize": "conceptualise", + "conceptualized": "conceptualised", + "conceptualizes": "conceptualises", + "conceptualizing": "conceptualising", + "connection": "connexion", + "connections": "connexions", + "contextualize": "contextualise", + "contextualized": "contextualised", + "contextualizes": "contextualises", + "contextualizing": "contextualising", + "cozier": "cosier", + "cozies": "cosies", + "coziest": "cosiest", + "cozily": "cosily", + "coziness": "cosiness", + "cozy": "cosy", + "councilor": "councillor", + "councilors": "councillors", + "counseled": "counselled", + "counseling": "counselling", + "counselor": "counsellor", + "counselors": "counsellors", + "crenelated": "crenellated", + "criminalize": "criminalise", + "criminalized": "criminalised", + "criminalizes": "criminalises", + "criminalizing": "criminalising", + "criticize": "criticise", + "criticized": "criticised", + "criticizes": "criticises", + "criticizing": "criticising", + "crueler": "crueller", + "cruelest": "cruellest", + "crystallization": "crystallisation", + "crystallize": "crystallise", + "crystallized": "crystallised", + "crystallizes": "crystallises", + "crystallizing": "crystallising", + "cudgeled": "cudgelled", + "cudgeling": "cudgelling", + "customize": "customise", + "customized": "customised", + "customizes": "customises", + "customizing": "customising", + "cipher": "cypher", + "ciphers": "cyphers", + "decentralization": "decentralisation", + "decentralize": "decentralise", + "decentralized": "decentralised", + "decentralizes": "decentralises", + "decentralizing": "decentralising", + "decriminalization": "decriminalisation", + "decriminalize": "decriminalise", + "decriminalized": "decriminalised", + "decriminalizes": "decriminalises", + "decriminalizing": "decriminalising", + "defense": "defence", + "defenseless": "defenceless", + "defenses": "defences", + "dehumanization": "dehumanisation", + "dehumanize": "dehumanise", + "dehumanized": "dehumanised", + "dehumanizes": "dehumanises", + "dehumanizing": "dehumanising", + "demeanor": "demeanour", + "demilitarization": "demilitarisation", + "demilitarize": "demilitarise", + "demilitarized": "demilitarised", + "demilitarizes": "demilitarises", + "demilitarizing": "demilitarising", + "demobilization": "demobilisation", + "demobilize": "demobilise", + "demobilized": "demobilised", + "demobilizes": "demobilises", + "demobilizing": "demobilising", + "democratization": "democratisation", + "democratize": "democratise", + "democratized": "democratised", + "democratizes": "democratises", + "democratizing": "democratising", + "demonize": "demonise", + "demonized": "demonised", + "demonizes": "demonises", + "demonizing": "demonising", + "demoralization": "demoralisation", + "demoralize": "demoralise", + "demoralized": "demoralised", + "demoralizes": "demoralises", + "demoralizing": "demoralising", + "denationalization": "denationalisation", + "denationalize": "denationalise", + "denationalized": "denationalised", + "denationalizes": "denationalises", + "denationalizing": "denationalising", + "deodorize": "deodorise", + "deodorized": "deodorised", + "deodorizes": "deodorises", + "deodorizing": "deodorising", + "depersonalize": "depersonalise", + "depersonalized": "depersonalised", + "depersonalizes": "depersonalises", + "depersonalizing": "depersonalising", + "deputize": "deputise", + "deputized": "deputised", + "deputizes": "deputises", + "deputizing": "deputising", + "desensitization": "desensitisation", + "desensitize": "desensitise", + "desensitized": "desensitised", + "desensitizes": "desensitises", + "desensitizing": "desensitising", + "destabilization": "destabilisation", + "destabilize": "destabilise", + "destabilized": "destabilised", + "destabilizes": "destabilises", + "destabilizing": "destabilising", + "dialed": "dialled", + "dialing": "dialling", + "dialog": "dialogue", + "dialogs": "dialogues", + "diarrhea": "diarrhoea", + "digitize": "digitise", + "digitized": "digitised", + "digitizes": "digitises", + "digitizing": "digitising", + "disk": "disc", + "discolor": "discolour", + "discolored": "discoloured", + "discoloring": "discolouring", + "discolors": "discolours", + "disks": "discs", + "disemboweled": "disembowelled", + "disemboweling": "disembowelling", + "disfavor": "disfavour", + "disheveled": "dishevelled", + "dishonor": "dishonour", + "dishonorable": "dishonourable", + "dishonorably": "dishonourably", + "dishonored": "dishonoured", + "dishonoring": "dishonouring", + "dishonors": "dishonours", + "disorganization": "disorganisation", + "disorganized": "disorganised", + "distill": "distil", + "distills": "distils", + "dramatization": "dramatisation", + "dramatizations": "dramatisations", + "dramatize": "dramatise", + "dramatized": "dramatised", + "dramatizes": "dramatises", + "dramatizing": "dramatising", + "draft": "draught", + "draftboard": "draughtboard", + "draftboards": "draughtboards", + "draftier": "draughtier", + "draftiest": "draughtiest", + "drafts": "draughts", + "draftsman": "draughtsman", + "draftsmanship": "draughtsmanship", + "draftsmen": "draughtsmen", + "draftswoman": "draughtswoman", + "draftswomen": "draughtswomen", + "drafty": "draughty", + "driveled": "drivelled", + "driveling": "drivelling", + "dueled": "duelled", + "dueling": "duelling", + "economize": "economise", + "economized": "economised", + "economizes": "economises", + "economizing": "economising", + "edema": "edoema", + "editorialize": "editorialise", + "editorialized": "editorialised", + "editorializes": "editorialises", + "editorializing": "editorialising", + "empathize": "empathise", + "empathized": "empathised", + "empathizes": "empathises", + "empathizing": "empathising", + "emphasize": "emphasise", + "emphasized": "emphasised", + "emphasizes": "emphasises", + "emphasizing": "emphasising", + "enameled": "enamelled", + "enameling": "enamelling", + "enamored": "enamoured", + "encyclopedia": "encyclopaedia", + "encyclopedias": "encyclopaedias", + "encyclopedic": "encyclopaedic", + "endeavor": "endeavour", + "endeavored": "endeavoured", + "endeavoring": "endeavouring", + "endeavors": "endeavours", + "energize": "energise", + "energized": "energised", + "energizes": "energises", + "energizing": "energising", + "enroll": "enrol", + "enrolls": "enrols", + "enthrall": "enthral", + "enthralls": "enthrals", + "epaulet": "epaulette", + "epaulets": "epaulettes", + "epicenter": "epicentre", + "epicenters": "epicentres", + "epilog": "epilogue", + "epilogs": "epilogues", + "epitomize": "epitomise", + "epitomized": "epitomised", + "epitomizes": "epitomises", + "epitomizing": "epitomising", + "equalization": "equalisation", + "equalize": "equalise", + "equalized": "equalised", + "equalizer": "equaliser", + "equalizers": "equalisers", + "equalizes": "equalises", + "equalizing": "equalising", + "eulogize": "eulogise", + "eulogized": "eulogised", + "eulogizes": "eulogises", + "eulogizing": "eulogising", + "evangelize": "evangelise", + "evangelized": "evangelised", + "evangelizes": "evangelises", + "evangelizing": "evangelising", + "exorcize": "exorcise", + "exorcized": "exorcised", + "exorcizes": "exorcises", + "exorcizing": "exorcising", + "extemporization": "extemporisation", + "extemporize": "extemporise", + "extemporized": "extemporised", + "extemporizes": "extemporises", + "extemporizing": "extemporising", + "externalization": "externalisation", + "externalizations": "externalisations", + "externalize": "externalise", + "externalized": "externalised", + "externalizes": "externalises", + "externalizing": "externalising", + "factorize": "factorise", + "factorized": "factorised", + "factorizes": "factorises", + "factorizing": "factorising", + "fecal": "faecal", + "feces": "faeces", + "familiarization": "familiarisation", + "familiarize": "familiarise", + "familiarized": "familiarised", + "familiarizes": "familiarises", + "familiarizing": "familiarising", + "fantasize": "fantasise", + "fantasized": "fantasised", + "fantasizes": "fantasises", + "fantasizing": "fantasising", + "favor": "favour", + "favorable": "favourable", + "favorably": "favourably", + "favored": "favoured", + "favoring": "favouring", + "favorite": "favourite", + "favorites": "favourites", + "favoritism": "favouritism", + "favors": "favours", + "feminize": "feminise", + "feminized": "feminised", + "feminizes": "feminises", + "feminizing": "feminising", + "fertilization": "fertilisation", + "fertilize": "fertilise", + "fertilized": "fertilised", + "fertilizer": "fertiliser", + "fertilizers": "fertilisers", + "fertilizes": "fertilises", + "fertilizing": "fertilising", + "fervor": "fervour", + "fiber": "fibre", + "fiberglass": "fibreglass", + "fibers": "fibres", + "fictionalization": "fictionalisation", + "fictionalizations": "fictionalisations", + "fictionalize": "fictionalise", + "fictionalized": "fictionalised", + "fictionalizes": "fictionalises", + "fictionalizing": "fictionalising", + "filet": "fillet", + "fileted": "filleted", + "fileting": "filleting", + "filets": "fillets", + "finalization": "finalisation", + "finalize": "finalise", + "finalized": "finalised", + "finalizes": "finalises", + "finalizing": "finalising", + "flutist": "flautist", + "flutists": "flautists", + "flavor": "flavour", + "flavored": "flavoured", + "flavoring": "flavouring", + "flavorings": "flavourings", + "flavorless": "flavourless", + "flavors": "flavours", + "flavorsome": "flavoursome", + "flyer": "flier", + "fetal": "foetal", + "fetid": "foetid", + "fetus": "foetus", + "fetuses": "foetuses", + "formalization": "formalisation", + "formalize": "formalise", + "formalized": "formalised", + "formalizes": "formalises", + "formalizing": "formalising", + "fossilization": "fossilisation", + "fossilize": "fossilise", + "fossilized": "fossilised", + "fossilizes": "fossilises", + "fossilizing": "fossilising", + "fraternization": "fraternisation", + "fraternize": "fraternise", + "fraternized": "fraternised", + "fraternizes": "fraternises", + "fraternizing": "fraternising", + "fulfill": "fulfil", + "fulfillment": "fulfilment", + "fulfills": "fulfils", + "funneled": "funnelled", + "funneling": "funnelling", + "galvanize": "galvanise", + "galvanized": "galvanised", + "galvanizes": "galvanises", + "galvanizing": "galvanising", + "gamboled": "gambolled", + "gamboling": "gambolling", + "jail": "gaol", + "jailbird": "gaolbird", + "jailbirds": "gaolbirds", + "jailbreak": "gaolbreak", + "jailbreaks": "gaolbreaks", + "jailed": "gaoled", + "jailer": "gaoler", + "jailers": "gaolers", + "jailing": "gaoling", + "jails": "gaols", + "gasses": "gases", + "gage": "gauge", + "gaged": "gauged", + "gages": "gauges", + "gaging": "gauging", + "generalization": "generalisation", + "generalizations": "generalisations", + "generalize": "generalise", + "generalized": "generalised", + "generalizes": "generalises", + "generalizing": "generalising", + "ghettoize": "ghettoise", + "ghettoized": "ghettoised", + "ghettoizes": "ghettoises", + "ghettoizing": "ghettoising", + "gypsies": "gipsies", + "glamorize": "glamorise", + "glamorized": "glamorised", + "glamorizes": "glamorises", + "glamorizing": "glamorising", + "glamor": "glamour", + "globalization": "globalisation", + "globalize": "globalise", + "globalized": "globalised", + "globalizes": "globalises", + "globalizing": "globalising", + "gluing": "glueing", + "goiter": "goitre", + "goiters": "goitres", + "gonorrhea": "gonorrhoea", + "gram": "gramme", + "grams": "grammes", + "graveled": "gravelled", + "gray": "grey", + "grayed": "greyed", + "graying": "greying", + "grayish": "greyish", + "grayness": "greyness", + "grays": "greys", + "groveled": "grovelled", + "groveling": "grovelling", + "groin": "groyne", + "groins": "groynes", + "grueling": "gruelling", + "gruelingly": "gruellingly", + "griffin": "gryphon", + "griffins": "gryphons", + "gynecological": "gynaecological", + "gynecologist": "gynaecologist", + "gynecologists": "gynaecologists", + "gynecology": "gynaecology", + "hematological": "haematological", + "hematologist": "haematologist", + "hematologists": "haematologists", + "hematology": "haematology", + "hemoglobin": "haemoglobin", + "hemophilia": "haemophilia", + "hemophiliac": "haemophiliac", + "hemophiliacs": "haemophiliacs", + "hemorrhage": "haemorrhage", + "hemorrhaged": "haemorrhaged", + "hemorrhages": "haemorrhages", + "hemorrhaging": "haemorrhaging", + "hemorrhoids": "haemorrhoids", + "harbor": "harbour", + "harbored": "harboured", + "harboring": "harbouring", + "harbors": "harbours", + "harmonization": "harmonisation", + "harmonize": "harmonise", + "harmonized": "harmonised", + "harmonizes": "harmonises", + "harmonizing": "harmonising", + "homeopath": "homoeopath", + "homeopathic": "homoeopathic", + "homeopaths": "homoeopaths", + "homeopathy": "homoeopathy", + "homogenize": "homogenise", + "homogenized": "homogenised", + "homogenizes": "homogenises", + "homogenizing": "homogenising", + "honor": "honour", + "honorable": "honourable", + "honorably": "honourably", + "honored": "honoured", + "honoring": "honouring", + "honors": "honours", + "hospitalization": "hospitalisation", + "hospitalize": "hospitalise", + "hospitalized": "hospitalised", + "hospitalizes": "hospitalises", + "hospitalizing": "hospitalising", + "humanize": "humanise", + "humanized": "humanised", + "humanizes": "humanises", + "humanizing": "humanising", + "humor": "humour", + "humored": "humoured", + "humoring": "humouring", + "humorless": "humourless", + "humors": "humours", + "hybridize": "hybridise", + "hybridized": "hybridised", + "hybridizes": "hybridises", + "hybridizing": "hybridising", + "hypnotize": "hypnotise", + "hypnotized": "hypnotised", + "hypnotizes": "hypnotises", + "hypnotizing": "hypnotising", + "hypothesize": "hypothesise", + "hypothesized": "hypothesised", + "hypothesizes": "hypothesises", + "hypothesizing": "hypothesising", + "idealization": "idealisation", + "idealize": "idealise", + "idealized": "idealised", + "idealizes": "idealises", + "idealizing": "idealising", + "idolize": "idolise", + "idolized": "idolised", + "idolizes": "idolises", + "idolizing": "idolising", + "immobilization": "immobilisation", + "immobilize": "immobilise", + "immobilized": "immobilised", + "immobilizer": "immobiliser", + "immobilizers": "immobilisers", + "immobilizes": "immobilises", + "immobilizing": "immobilising", + "immortalize": "immortalise", + "immortalized": "immortalised", + "immortalizes": "immortalises", + "immortalizing": "immortalising", + "immunization": "immunisation", + "immunize": "immunise", + "immunized": "immunised", + "immunizes": "immunises", + "immunizing": "immunising", + "impaneled": "impanelled", + "impaneling": "impanelling", + "imperiled": "imperilled", + "imperiling": "imperilling", + "individualize": "individualise", + "individualized": "individualised", + "individualizes": "individualises", + "individualizing": "individualising", + "industrialize": "industrialise", + "industrialized": "industrialised", + "industrializes": "industrialises", + "industrializing": "industrialising", + "inflection": "inflexion", + "inflections": "inflexions", + "initialize": "initialise", + "initialized": "initialised", + "initializes": "initialises", + "initializing": "initialising", + "initialed": "initialled", + "initialing": "initialling", + "install": "instal", + "installment": "instalment", + "installments": "instalments", + "installs": "instals", + "instill": "instil", + "instills": "instils", + "institutionalization": "institutionalisation", + "institutionalize": "institutionalise", + "institutionalized": "institutionalised", + "institutionalizes": "institutionalises", + "institutionalizing": "institutionalising", + "intellectualize": "intellectualise", + "intellectualized": "intellectualised", + "intellectualizes": "intellectualises", + "intellectualizing": "intellectualising", + "internalization": "internalisation", + "internalize": "internalise", + "internalized": "internalised", + "internalizes": "internalises", + "internalizing": "internalising", + "internationalization": "internationalisation", + "internationalize": "internationalise", + "internationalized": "internationalised", + "internationalizes": "internationalises", + "internationalizing": "internationalising", + "ionization": "ionisation", + "ionize": "ionise", + "ionized": "ionised", + "ionizer": "ioniser", + "ionizers": "ionisers", + "ionizes": "ionises", + "ionizing": "ionising", + "italicize": "italicise", + "italicized": "italicised", + "italicizes": "italicises", + "italicizing": "italicising", + "itemize": "itemise", + "itemized": "itemised", + "itemizes": "itemises", + "itemizing": "itemising", + "jeopardize": "jeopardise", + "jeopardized": "jeopardised", + "jeopardizes": "jeopardises", + "jeopardizing": "jeopardising", + "jeweled": "jewelled", + "jeweler": "jeweller", + "jewelers": "jewellers", + "jewelry": "jewellery", + "judgment": "judgement", + "kilogram": "kilogramme", + "kilograms": "kilogrammes", + "kilometer": "kilometre", + "kilometers": "kilometres", + "labeled": "labelled", + "labeling": "labelling", + "labor": "labour", + "labored": "laboured", + "laborer": "labourer", + "laborers": "labourers", + "laboring": "labouring", + "labors": "labours", + "lackluster": "lacklustre", + "legalization": "legalisation", + "legalize": "legalise", + "legalized": "legalised", + "legalizes": "legalises", + "legalizing": "legalising", + "legitimize": "legitimise", + "legitimized": "legitimised", + "legitimizes": "legitimises", + "legitimizing": "legitimising", + "leukemia": "leukaemia", + "leveled": "levelled", + "leveler": "leveller", + "levelers": "levellers", + "leveling": "levelling", + "libeled": "libelled", + "libeling": "libelling", + "libelous": "libellous", + "liberalization": "liberalisation", + "liberalize": "liberalise", + "liberalized": "liberalised", + "liberalizes": "liberalises", + "liberalizing": "liberalising", + "license": "licence", + "licensed": "licenced", + "licenses": "licences", + "licensing": "licencing", + "likable": "likeable", + "lionization": "lionisation", + "lionize": "lionise", + "lionized": "lionised", + "lionizes": "lionises", + "lionizing": "lionising", + "liquidize": "liquidise", + "liquidized": "liquidised", + "liquidizer": "liquidiser", + "liquidizers": "liquidisers", + "liquidizes": "liquidises", + "liquidizing": "liquidising", + "liter": "litre", + "liters": "litres", + "localize": "localise", + "localized": "localised", + "localizes": "localises", + "localizing": "localising", + "louver": "louvre", + "louvered": "louvred", + "louvers": "louvres", + "luster": "lustre", + "magnetize": "magnetise", + "magnetized": "magnetised", + "magnetizes": "magnetises", + "magnetizing": "magnetising", + "maneuverability": "manoeuvrability", + "maneuverable": "manoeuvrable", + "maneuver": "manoeuvre", + "maneuvered": "manoeuvred", + "maneuvers": "manoeuvres", + "maneuvering": "manoeuvring", + "maneuverings": "manoeuvrings", + "marginalization": "marginalisation", + "marginalize": "marginalise", + "marginalized": "marginalised", + "marginalizes": "marginalises", + "marginalizing": "marginalising", + "marshaled": "marshalled", + "marshaling": "marshalling", + "marveled": "marvelled", + "marveling": "marvelling", + "marvelous": "marvellous", + "marvelously": "marvellously", + "materialization": "materialisation", + "materialize": "materialise", + "materialized": "materialised", + "materializes": "materialises", + "materializing": "materialising", + "maximization": "maximisation", + "maximize": "maximise", + "maximized": "maximised", + "maximizes": "maximises", + "maximizing": "maximising", + "meager": "meagre", + "mechanization": "mechanisation", + "mechanize": "mechanise", + "mechanized": "mechanised", + "mechanizes": "mechanises", + "mechanizing": "mechanising", + "medieval": "mediaeval", + "memorialize": "memorialise", + "memorialized": "memorialised", + "memorializes": "memorialises", + "memorializing": "memorialising", + "memorize": "memorise", + "memorized": "memorised", + "memorizes": "memorises", + "memorizing": "memorising", + "mesmerize": "mesmerise", + "mesmerized": "mesmerised", + "mesmerizes": "mesmerises", + "mesmerizing": "mesmerising", + "metabolize": "metabolise", + "metabolized": "metabolised", + "metabolizes": "metabolises", + "metabolizing": "metabolising", + "meter": "metre", + "meters": "metres", + "micrometer": "micrometre", + "micrometers": "micrometres", + "militarize": "militarise", + "militarized": "militarised", + "militarizes": "militarises", + "militarizing": "militarising", + "milligram": "milligramme", + "milligrams": "milligrammes", + "milliliter": "millilitre", + "milliliters": "millilitres", + "millimeter": "millimetre", + "millimeters": "millimetres", + "miniaturization": "miniaturisation", + "miniaturize": "miniaturise", + "miniaturized": "miniaturised", + "miniaturizes": "miniaturises", + "miniaturizing": "miniaturising", + "minibusses": "minibuses", + "minimize": "minimise", + "minimized": "minimised", + "minimizes": "minimises", + "minimizing": "minimising", + "misbehavior": "misbehaviour", + "misdemeanor": "misdemeanour", + "misdemeanors": "misdemeanours", + "misspelled": "misspelt", + "miter": "mitre", + "miters": "mitres", + "mobilization": "mobilisation", + "mobilize": "mobilise", + "mobilized": "mobilised", + "mobilizes": "mobilises", + "mobilizing": "mobilising", + "modeled": "modelled", + "modeler": "modeller", + "modelers": "modellers", + "modeling": "modelling", + "modernize": "modernise", + "modernized": "modernised", + "modernizes": "modernises", + "modernizing": "modernising", + "moisturize": "moisturise", + "moisturized": "moisturised", + "moisturizer": "moisturiser", + "moisturizers": "moisturisers", + "moisturizes": "moisturises", + "moisturizing": "moisturising", + "monolog": "monologue", + "monologs": "monologues", + "monopolization": "monopolisation", + "monopolize": "monopolise", + "monopolized": "monopolised", + "monopolizes": "monopolises", + "monopolizing": "monopolising", + "moralize": "moralise", + "moralized": "moralised", + "moralizes": "moralises", + "moralizing": "moralising", + "motorized": "motorised", + "mold": "mould", + "molded": "moulded", + "molder": "moulder", + "moldered": "mouldered", + "moldering": "mouldering", + "molders": "moulders", + "moldier": "mouldier", + "moldiest": "mouldiest", + "molding": "moulding", + "moldings": "mouldings", + "molds": "moulds", + "moldy": "mouldy", + "molt": "moult", + "molted": "moulted", + "molting": "moulting", + "molts": "moults", + "mustache": "moustache", + "mustached": "moustached", + "mustaches": "moustaches", + "mustachioed": "moustachioed", + "multicolored": "multicoloured", + "nationalization": "nationalisation", + "nationalizations": "nationalisations", + "nationalize": "nationalise", + "nationalized": "nationalised", + "nationalizes": "nationalises", + "nationalizing": "nationalising", + "naturalization": "naturalisation", + "naturalize": "naturalise", + "naturalized": "naturalised", + "naturalizes": "naturalises", + "naturalizing": "naturalising", + "neighbor": "neighbour", + "neighborhood": "neighbourhood", + "neighborhoods": "neighbourhoods", + "neighboring": "neighbouring", + "neighborliness": "neighbourliness", + "neighborly": "neighbourly", + "neighbors": "neighbours", + "neutralization": "neutralisation", + "neutralize": "neutralise", + "neutralized": "neutralised", + "neutralizes": "neutralises", + "neutralizing": "neutralising", + "normalization": "normalisation", + "normalize": "normalise", + "normalized": "normalised", + "normalizes": "normalises", + "normalizing": "normalising", + "odor": "odour", + "odorless": "odourless", + "odors": "odours", + "esophagus": "oesophagus", + "esophaguses": "oesophaguses", + "estrogen": "oestrogen", + "offense": "offence", + "offenses": "offences", + "omelet": "omelette", + "omelets": "omelettes", + "optimize": "optimise", + "optimized": "optimised", + "optimizes": "optimises", + "optimizing": "optimising", + "organization": "organisation", + "organizational": "organisational", + "organizations": "organisations", + "organize": "organise", + "organized": "organised", + "organizer": "organiser", + "organizers": "organisers", + "organizes": "organises", + "organizing": "organising", + "orthopedic": "orthopaedic", + "orthopedics": "orthopaedics", + "ostracize": "ostracise", + "ostracized": "ostracised", + "ostracizes": "ostracises", + "ostracizing": "ostracising", + "outmaneuver": "outmanoeuvre", + "outmaneuvered": "outmanoeuvred", + "outmaneuvers": "outmanoeuvres", + "outmaneuvering": "outmanoeuvring", + "overemphasize": "overemphasise", + "overemphasized": "overemphasised", + "overemphasizes": "overemphasises", + "overemphasizing": "overemphasising", + "oxidization": "oxidisation", + "oxidize": "oxidise", + "oxidized": "oxidised", + "oxidizes": "oxidises", + "oxidizing": "oxidising", + "pederast": "paederast", + "pederasts": "paederasts", + "pediatric": "paediatric", + "pediatrician": "paediatrician", + "pediatricians": "paediatricians", + "pediatrics": "paediatrics", + "pedophile": "paedophile", + "pedophiles": "paedophiles", + "pedophilia": "paedophilia", + "paleolithic": "palaeolithic", + "paleontologist": "palaeontologist", + "paleontologists": "palaeontologists", + "paleontology": "palaeontology", + "paneled": "panelled", + "paneling": "panelling", + "panelist": "panellist", + "panelists": "panellists", + "paralyze": "paralyse", + "paralyzed": "paralysed", + "paralyzes": "paralyses", + "paralyzing": "paralysing", + "parceled": "parcelled", + "parceling": "parcelling", + "parlor": "parlour", + "parlors": "parlours", + "particularize": "particularise", + "particularized": "particularised", + "particularizes": "particularises", + "particularizing": "particularising", + "passivization": "passivisation", + "passivize": "passivise", + "passivized": "passivised", + "passivizes": "passivises", + "passivizing": "passivising", + "pasteurization": "pasteurisation", + "pasteurize": "pasteurise", + "pasteurized": "pasteurised", + "pasteurizes": "pasteurises", + "pasteurizing": "pasteurising", + "patronize": "patronise", + "patronized": "patronised", + "patronizes": "patronises", + "patronizing": "patronising", + "patronizingly": "patronisingly", + "pedaled": "pedalled", + "pedaling": "pedalling", + "pedestrianization": "pedestrianisation", + "pedestrianize": "pedestrianise", + "pedestrianized": "pedestrianised", + "pedestrianizes": "pedestrianises", + "pedestrianizing": "pedestrianising", + "penalize": "penalise", + "penalized": "penalised", + "penalizes": "penalises", + "penalizing": "penalising", + "penciled": "pencilled", + "penciling": "pencilling", + "personalize": "personalise", + "personalized": "personalised", + "personalizes": "personalises", + "personalizing": "personalising", + "pharmacopeia": "pharmacopoeia", + "pharmacopeias": "pharmacopoeias", + "philosophize": "philosophise", + "philosophized": "philosophised", + "philosophizes": "philosophises", + "philosophizing": "philosophising", + "filter": "philtre", + "filters": "philtres", + "phony": "phoney", + "plagiarize": "plagiarise", + "plagiarized": "plagiarised", + "plagiarizes": "plagiarises", + "plagiarizing": "plagiarising", + "plow": "plough", + "plowed": "ploughed", + "plowing": "ploughing", + "plowman": "ploughman", + "plowmen": "ploughmen", + "plows": "ploughs", + "plowshare": "ploughshare", + "plowshares": "ploughshares", + "polarization": "polarisation", + "polarize": "polarise", + "polarized": "polarised", + "polarizes": "polarises", + "polarizing": "polarising", + "politicization": "politicisation", + "politicize": "politicise", + "politicized": "politicised", + "politicizes": "politicises", + "politicizing": "politicising", + "popularization": "popularisation", + "popularize": "popularise", + "popularized": "popularised", + "popularizes": "popularises", + "popularizing": "popularising", + "pouf": "pouffe", + "poufs": "pouffes", + "practice": "practise", + "practiced": "practised", + "practices": "practises", + "practicing": "practising", + "presidium": "praesidium", + "presidiums": "praesidiums", + "pressurization": "pressurisation", + "pressurize": "pressurise", + "pressurized": "pressurised", + "pressurizes": "pressurises", + "pressurizing": "pressurising", + "pretense": "pretence", + "pretenses": "pretences", + "primeval": "primaeval", + "prioritization": "prioritisation", + "prioritize": "prioritise", + "prioritized": "prioritised", + "prioritizes": "prioritises", + "prioritizing": "prioritising", + "privatization": "privatisation", + "privatizations": "privatisations", + "privatize": "privatise", + "privatized": "privatised", + "privatizes": "privatises", + "privatizing": "privatising", + "professionalization": "professionalisation", + "professionalize": "professionalise", + "professionalized": "professionalised", + "professionalizes": "professionalises", + "professionalizing": "professionalising", + "program": "programme", + "programs": "programmes", + "prolog": "prologue", + "prologs": "prologues", + "propagandize": "propagandise", + "propagandized": "propagandised", + "propagandizes": "propagandises", + "propagandizing": "propagandising", + "proselytize": "proselytise", + "proselytized": "proselytised", + "proselytizer": "proselytiser", + "proselytizers": "proselytisers", + "proselytizes": "proselytises", + "proselytizing": "proselytising", + "psychoanalyze": "psychoanalyse", + "psychoanalyzed": "psychoanalysed", + "psychoanalyzes": "psychoanalyses", + "psychoanalyzing": "psychoanalysing", + "publicize": "publicise", + "publicized": "publicised", + "publicizes": "publicises", + "publicizing": "publicising", + "pulverization": "pulverisation", + "pulverize": "pulverise", + "pulverized": "pulverised", + "pulverizes": "pulverises", + "pulverizing": "pulverising", + "pummel": "pummell", + "pummeled": "pummelled", + "pummeling": "pummelling", + "pajama": "pyjama", + "pajamas": "pyjamas", + "pizzazz": "pzazz", + "quarreled": "quarrelled", + "quarreling": "quarrelling", + "radicalize": "radicalise", + "radicalized": "radicalised", + "radicalizes": "radicalises", + "radicalizing": "radicalising", + "rancor": "rancour", + "randomize": "randomise", + "randomized": "randomised", + "randomizes": "randomises", + "randomizing": "randomising", + "rationalization": "rationalisation", + "rationalizations": "rationalisations", + "rationalize": "rationalise", + "rationalized": "rationalised", + "rationalizes": "rationalises", + "rationalizing": "rationalising", + "raveled": "ravelled", + "raveling": "ravelling", + "realizable": "realisable", + "realization": "realisation", + "realizations": "realisations", + "realize": "realise", + "realized": "realised", + "realizes": "realises", + "realizing": "realising", + "recognizable": "recognisable", + "recognizably": "recognisably", + "recognizance": "recognisance", + "recognize": "recognise", + "recognized": "recognised", + "recognizes": "recognises", + "recognizing": "recognising", + "reconnoiter": "reconnoitre", + "reconnoitered": "reconnoitred", + "reconnoiters": "reconnoitres", + "reconnoitering": "reconnoitring", + "refueled": "refuelled", + "refueling": "refuelling", + "regularization": "regularisation", + "regularize": "regularise", + "regularized": "regularised", + "regularizes": "regularises", + "regularizing": "regularising", + "remodeled": "remodelled", + "remodeling": "remodelling", + "remold": "remould", + "remolded": "remoulded", + "remolding": "remoulding", + "remolds": "remoulds", + "reorganization": "reorganisation", + "reorganizations": "reorganisations", + "reorganize": "reorganise", + "reorganized": "reorganised", + "reorganizes": "reorganises", + "reorganizing": "reorganising", + "reveled": "revelled", + "reveler": "reveller", + "revelers": "revellers", + "reveling": "revelling", + "revitalize": "revitalise", + "revitalized": "revitalised", + "revitalizes": "revitalises", + "revitalizing": "revitalising", + "revolutionize": "revolutionise", + "revolutionized": "revolutionised", + "revolutionizes": "revolutionises", + "revolutionizing": "revolutionising", + "rhapsodize": "rhapsodise", + "rhapsodized": "rhapsodised", + "rhapsodizes": "rhapsodises", + "rhapsodizing": "rhapsodising", + "rigor": "rigour", + "rigors": "rigours", + "ritualized": "ritualised", + "rivaled": "rivalled", + "rivaling": "rivalling", + "romanticize": "romanticise", + "romanticized": "romanticised", + "romanticizes": "romanticises", + "romanticizing": "romanticising", + "rumor": "rumour", + "rumored": "rumoured", + "rumors": "rumours", + "saber": "sabre", + "sabers": "sabres", + "saltpeter": "saltpetre", + "sanitize": "sanitise", + "sanitized": "sanitised", + "sanitizes": "sanitises", + "sanitizing": "sanitising", + "satirize": "satirise", + "satirized": "satirised", + "satirizes": "satirises", + "satirizing": "satirising", + "savior": "saviour", + "saviors": "saviours", + "savor": "savour", + "savored": "savoured", + "savories": "savouries", + "savoring": "savouring", + "savors": "savours", + "savory": "savoury", + "scandalize": "scandalise", + "scandalized": "scandalised", + "scandalizes": "scandalises", + "scandalizing": "scandalising", + "skeptic": "sceptic", + "skeptical": "sceptical", + "skeptically": "sceptically", + "skepticism": "scepticism", + "skeptics": "sceptics", + "scepter": "sceptre", + "scepters": "sceptres", + "scrutinize": "scrutinise", + "scrutinized": "scrutinised", + "scrutinizes": "scrutinises", + "scrutinizing": "scrutinising", + "secularization": "secularisation", + "secularize": "secularise", + "secularized": "secularised", + "secularizes": "secularises", + "secularizing": "secularising", + "sensationalize": "sensationalise", + "sensationalized": "sensationalised", + "sensationalizes": "sensationalises", + "sensationalizing": "sensationalising", + "sensitize": "sensitise", + "sensitized": "sensitised", + "sensitizes": "sensitises", + "sensitizing": "sensitising", + "sentimentalize": "sentimentalise", + "sentimentalized": "sentimentalised", + "sentimentalizes": "sentimentalises", + "sentimentalizing": "sentimentalising", + "sepulcher": "sepulchre", + "sepulchers": "sepulchres", + "serialization": "serialisation", + "serializations": "serialisations", + "serialize": "serialise", + "serialized": "serialised", + "serializes": "serialises", + "serializing": "serialising", + "sermonize": "sermonise", + "sermonized": "sermonised", + "sermonizes": "sermonises", + "sermonizing": "sermonising", + "sheik": "sheikh", + "shoveled": "shovelled", + "shoveling": "shovelling", + "shriveled": "shrivelled", + "shriveling": "shrivelling", + "signalize": "signalise", + "signalized": "signalised", + "signalizes": "signalises", + "signalizing": "signalising", + "signaled": "signalled", + "signaling": "signalling", + "smolder": "smoulder", + "smoldered": "smouldered", + "smoldering": "smouldering", + "smolders": "smoulders", + "sniveled": "snivelled", + "sniveling": "snivelling", + "snorkeled": "snorkelled", + "snorkeling": "snorkelling", + "snowplow": "snowploughs", + "socialization": "socialisation", + "socialize": "socialise", + "socialized": "socialised", + "socializes": "socialises", + "socializing": "socialising", + "sodomize": "sodomise", + "sodomized": "sodomised", + "sodomizes": "sodomises", + "sodomizing": "sodomising", + "solemnize": "solemnise", + "solemnized": "solemnised", + "solemnizes": "solemnises", + "solemnizing": "solemnising", + "somber": "sombre", + "specialization": "specialisation", + "specializations": "specialisations", + "specialize": "specialise", + "specialized": "specialised", + "specializes": "specialises", + "specializing": "specialising", + "specter": "spectre", + "specters": "spectres", + "spiraled": "spiralled", + "spiraling": "spiralling", + "splendor": "splendour", + "splendors": "splendours", + "squirreled": "squirrelled", + "squirreling": "squirrelling", + "stabilization": "stabilisation", + "stabilize": "stabilise", + "stabilized": "stabilised", + "stabilizer": "stabiliser", + "stabilizers": "stabilisers", + "stabilizes": "stabilises", + "stabilizing": "stabilising", + "standardization": "standardisation", + "standardize": "standardise", + "standardized": "standardised", + "standardizes": "standardises", + "standardizing": "standardising", + "stenciled": "stencilled", + "stenciling": "stencilling", + "sterilization": "sterilisation", + "sterilizations": "sterilisations", + "sterilize": "sterilise", + "sterilized": "sterilised", + "sterilizer": "steriliser", + "sterilizers": "sterilisers", + "sterilizes": "sterilises", + "sterilizing": "sterilising", + "stigmatization": "stigmatisation", + "stigmatize": "stigmatise", + "stigmatized": "stigmatised", + "stigmatizes": "stigmatises", + "stigmatizing": "stigmatising", + "story": "storey", + "stories": "storeys", + "subsidization": "subsidisation", + "subsidize": "subsidise", + "subsidized": "subsidised", + "subsidizer": "subsidiser", + "subsidizers": "subsidisers", + "subsidizes": "subsidises", + "subsidizing": "subsidising", + "succor": "succour", + "succored": "succoured", + "succoring": "succouring", + "succors": "succours", + "sulfate": "sulphate", + "sulfates": "sulphates", + "sulfide": "sulphide", + "sulfides": "sulphides", + "sulfur": "sulphur", + "sulfurous": "sulphurous", + "summarize": "summarise", + "summarized": "summarised", + "summarizes": "summarises", + "summarizing": "summarising", + "swiveled": "swivelled", + "swiveling": "swivelling", + "symbolize": "symbolise", + "symbolized": "symbolised", + "symbolizes": "symbolises", + "symbolizing": "symbolising", + "sympathize": "sympathise", + "sympathized": "sympathised", + "sympathizer": "sympathiser", + "sympathizers": "sympathisers", + "sympathizes": "sympathises", + "sympathizing": "sympathising", + "synchronization": "synchronisation", + "synchronize": "synchronise", + "synchronized": "synchronised", + "synchronizes": "synchronises", + "synchronizing": "synchronising", + "synthesize": "synthesise", + "synthesized": "synthesised", + "synthesizer": "synthesiser", + "synthesizers": "synthesisers", + "synthesizes": "synthesises", + "synthesizing": "synthesising", + "siphon": "syphon", + "siphoned": "syphoned", + "siphoning": "syphoning", + "siphons": "syphons", + "systematization": "systematisation", + "systematize": "systematise", + "systematized": "systematised", + "systematizes": "systematises", + "systematizing": "systematising", + "tantalize": "tantalise", + "tantalized": "tantalised", + "tantalizes": "tantalises", + "tantalizing": "tantalising", + "tantalizingly": "tantalisingly", + "tasseled": "tasselled", + "technicolor": "technicolour", + "temporize": "temporise", + "temporized": "temporised", + "temporizes": "temporises", + "temporizing": "temporising", + "tenderize": "tenderise", + "tenderized": "tenderised", + "tenderizes": "tenderises", + "tenderizing": "tenderising", + "terrorize": "terrorise", + "terrorized": "terrorised", + "terrorizes": "terrorises", + "terrorizing": "terrorising", + "theater": "theatre", + "theatergoer": "theatregoer", + "theatergoers": "theatregoers", + "theaters": "theatres", + "theorize": "theorise", + "theorized": "theorised", + "theorizes": "theorises", + "theorizing": "theorising", + "ton": "tonne", + "tons": "tonnes", + "toweled": "towelled", + "toweling": "towelling", + "toxemia": "toxaemia", + "tranquilize": "tranquillize", + "tranquilized": "tranquillized", + "tranquilizer": "tranquillizer", + "tranquilizers": "tranquillizers", + "tranquilizes": "tranquillizes", + "tranquilizing": "tranquillizing", + "tranquility": "tranquilly", + "transistorized": "transistorised", + "traumatize": "traumatise", + "traumatized": "traumatised", + "traumatizes": "traumatises", + "traumatizing": "traumatising", + "traveled": "travelled", + "traveler": "traveller", + "travelers": "travellers", + "traveling": "travelling", + "travelog": "travelogue", + "travelogs": "travelogues", + "trialed": "trialled", + "trialing": "trialling", + "tricolor": "tricolour", + "tricolors": "tricolours", + "trivialize": "trivialise", + "trivialized": "trivialised", + "trivializes": "trivialises", + "trivializing": "trivialising", + "tumor": "tumour", + "tumors": "tumours", + "tunneled": "tunnelled", + "tunneling": "tunnelling", + "tyrannize": "tyrannise", + "tyrannized": "tyrannised", + "tyrannizes": "tyrannises", + "tyrannizing": "tyrannising", + "tire": "tyre", + "tires": "tyres", + "unauthorized": "unauthorised", + "uncivilized": "uncivilised", + "underutilized": "underutilised", + "unequaled": "unequalled", + "unfavorable": "unfavourable", + "unfavorably": "unfavourably", + "unionization": "unionisation", + "unionize": "unionise", + "unionized": "unionised", + "unionizes": "unionises", + "unionizing": "unionising", + "unorganized": "unorganised", + "unraveled": "unravelled", + "unraveling": "unravelling", + "unrecognizable": "unrecognisable", + "unrecognized": "unrecognised", + "unrivaled": "unrivalled", + "unsavory": "unsavoury", + "untrammeled": "untrammelled", + "urbanization": "urbanisation", + "urbanize": "urbanise", + "urbanized": "urbanised", + "urbanizes": "urbanises", + "urbanizing": "urbanising", + "utilizable": "utilisable", + "utilization": "utilisation", + "utilize": "utilise", + "utilized": "utilised", + "utilizes": "utilises", + "utilizing": "utilising", + "valor": "valour", + "vandalize": "vandalise", + "vandalized": "vandalised", + "vandalizes": "vandalises", + "vandalizing": "vandalising", + "vaporization": "vaporisation", + "vaporize": "vaporise", + "vaporized": "vaporised", + "vaporizes": "vaporises", + "vaporizing": "vaporising", + "vapor": "vapour", + "vapors": "vapours", + "verbalize": "verbalise", + "verbalized": "verbalised", + "verbalizes": "verbalises", + "verbalizing": "verbalising", + "victimization": "victimisation", + "victimize": "victimise", + "victimized": "victimised", + "victimizes": "victimises", + "victimizing": "victimising", + "videodisk": "videodisc", + "videodisks": "videodiscs", + "vigor": "vigour", + "visualization": "visualisation", + "visualizations": "visualisations", + "visualize": "visualise", + "visualized": "visualised", + "visualizes": "visualises", + "visualizing": "visualising", + "vocalization": "vocalisation", + "vocalizations": "vocalisations", + "vocalize": "vocalise", + "vocalized": "vocalised", + "vocalizes": "vocalises", + "vocalizing": "vocalising", + "vulcanized": "vulcanised", + "vulgarization": "vulgarisation", + "vulgarize": "vulgarise", + "vulgarized": "vulgarised", + "vulgarizes": "vulgarises", + "vulgarizing": "vulgarising", + "wagon": "waggon", + "wagons": "waggons", + "watercolor": "watercolour", + "watercolors": "watercolours", + "weaseled": "weaselled", + "weaseling": "weaselling", + "westernization": "westernisation", + "westernize": "westernise", + "westernized": "westernised", + "westernizes": "westernises", + "westernizing": "westernising", + "womanize": "womanise", + "womanized": "womanised", + "womanizer": "womaniser", + "womanizers": "womanisers", + "womanizes": "womanises", + "womanizing": "womanising", + "woolen": "woollen", + "woolens": "woollens", + "woolies": "woollies", + "wooly": "woolly", + "worshiped": "worshipped", + "worshiping": "worshipping", + "worshiper": "worshipper", + "yodeled": "yodelled", + "yodeling": "yodelling", + "yogurt": "yoghurt", + "yogurts": "yoghurts" + }, + "to_us": { + "accessorise": "accessorize", + "accessorised": "accessorized", + "accessorises": "accessorizes", + "accessorising": "accessorizing", + "acclimatisation": "acclimatization", + "acclimatise": "acclimatize", + "acclimatised": "acclimatized", + "acclimatises": "acclimatizes", + "acclimatising": "acclimatizing", + "accoutrements": "accouterments", + "aeon": "eon", + "aeons": "eons", + "aerogramme": "aerogram", + "aerogrammes": "aerograms", + "aeroplane": "airplane", + "aeroplanes": "airplanes", + "aesthete": "esthete", + "aesthetes": "esthetes", + "aesthetic": "esthetic", + "aesthetically": "esthetically", + "aesthetics": "esthetics", + "aetiology": "etiology", + "ageing": "aging", + "aggrandisement": "aggrandizement", + "agonise": "agonize", + "agonised": "agonized", + "agonises": "agonizes", + "agonising": "agonizing", + "agonisingly": "agonizingly", + "almanack": "almanac", + "almanacks": "almanacs", + "aluminium": "aluminum", + "amortisable": "amortizable", + "amortisation": "amortization", + "amortisations": "amortizations", + "amortise": "amortize", + "amortised": "amortized", + "amortises": "amortizes", + "amortising": "amortizing", + "amphitheatre": "amphitheater", + "amphitheatres": "amphitheaters", + "anaemia": "anemia", + "anaemic": "anemic", + "anaesthesia": "anesthesia", + "anaesthetic": "anesthetic", + "anaesthetics": "anesthetics", + "anaesthetise": "anesthetize", + "anaesthetised": "anesthetized", + "anaesthetises": "anesthetizes", + "anaesthetising": "anesthetizing", + "anaesthetist": "anesthetist", + "anaesthetists": "anesthetists", + "anaesthetize": "anesthetize", + "anaesthetized": "anesthetized", + "anaesthetizes": "anesthetizes", + "anaesthetizing": "anesthetizing", + "analogue": "analog", + "analogues": "analogs", + "analyse": "analyze", + "analysed": "analyzed", + "analyses": "analyzes", + "analysing": "analyzing", + "anglicise": "anglicize", + "anglicised": "anglicized", + "anglicises": "anglicizes", + "anglicising": "anglicizing", + "annualised": "annualized", + "antagonise": "antagonize", + "antagonised": "antagonized", + "antagonises": "antagonizes", + "antagonising": "antagonizing", + "apologise": "apologize", + "apologised": "apologized", + "apologises": "apologizes", + "apologising": "apologizing", + "appal": "appall", + "appals": "appalls", + "appetiser": "appetizer", + "appetisers": "appetizers", + "appetising": "appetizing", + "appetisingly": "appetizingly", + "arbour": "arbor", + "arbours": "arbors", + "archaeological": "archeological", + "archaeologically": "archeologically", + "archaeologist": "archeologist", + "archaeologists": "archeologists", + "archaeology": "archeology", + "ardour": "ardor", + "armour": "armor", + "armoured": "armored", + "armourer": "armorer", + "armourers": "armorers", + "armouries": "armories", + "armoury": "armory", + "artefact": "artifact", + "artefacts": "artifacts", + "authorise": "authorize", + "authorised": "authorized", + "authorises": "authorizes", + "authorising": "authorizing", + "axe": "ax", + "backpedalled": "backpedaled", + "backpedalling": "backpedaling", + "bannister": "banister", + "bannisters": "banisters", + "baptise": "baptize", + "baptised": "baptized", + "baptises": "baptizes", + "baptising": "baptizing", + "bastardise": "bastardize", + "bastardised": "bastardized", + "bastardises": "bastardizes", + "bastardising": "bastardizing", + "battleaxe": "battleax", + "baulk": "balk", + "baulked": "balked", + "baulking": "balking", + "baulks": "balks", + "bedevilled": "bedeviled", + "bedevilling": "bedeviling", + "behaviour": "behavior", + "behavioural": "behavioral", + "behaviourism": "behaviorism", + "behaviourist": "behaviorist", + "behaviourists": "behaviorists", + "behaviours": "behaviors", + "behove": "behoove", + "behoved": "behooved", + "behoves": "behooves", + "bejewelled": "bejeweled", + "belabour": "belabor", + "belaboured": "belabored", + "belabouring": "belaboring", + "belabours": "belabors", + "bevelled": "beveled", + "bevvies": "bevies", + "bevvy": "bevy", + "biassed": "biased", + "biassing": "biasing", + "bingeing": "binging", + "bougainvillaea": "bougainvillea", + "bougainvillaeas": "bougainvilleas", + "bowdlerise": "bowdlerize", + "bowdlerised": "bowdlerized", + "bowdlerises": "bowdlerizes", + "bowdlerising": "bowdlerizing", + "breathalyse": "breathalyze", + "breathalysed": "breathalyzed", + "breathalyser": "breathalyzer", + "breathalysers": "breathalyzers", + "breathalyses": "breathalyzes", + "breathalysing": "breathalyzing", + "brutalise": "brutalize", + "brutalised": "brutalized", + "brutalises": "brutalizes", + "brutalising": "brutalizing", + "buses": "busses", + "busing": "bussing", + "caesarean": "cesarean", + "caesareans": "cesareans", + "calibre": "caliber", + "calibres": "calibers", + "calliper": "caliper", + "callipers": "calipers", + "callisthenics": "calisthenics", + "canalise": "canalize", + "canalised": "canalized", + "canalises": "canalizes", + "canalising": "canalizing", + "cancellation": "cancelation", + "cancellations": "cancelations", + "cancelled": "canceled", + "cancelling": "canceling", + "candour": "candor", + "cannibalise": "cannibalize", + "cannibalised": "cannibalized", + "cannibalises": "cannibalizes", + "cannibalising": "cannibalizing", + "canonise": "canonize", + "canonised": "canonized", + "canonises": "canonizes", + "canonising": "canonizing", + "capitalise": "capitalize", + "capitalised": "capitalized", + "capitalises": "capitalizes", + "capitalising": "capitalizing", + "caramelise": "caramelize", + "caramelised": "caramelized", + "caramelises": "caramelizes", + "caramelising": "caramelizing", + "carbonise": "carbonize", + "carbonised": "carbonized", + "carbonises": "carbonizes", + "carbonising": "carbonizing", + "carolled": "caroled", + "carolling": "caroling", + "catalogue": "catalog", + "catalogued": "cataloged", + "catalogues": "catalogs", + "cataloguing": "cataloging", + "catalyse": "catalyze", + "catalysed": "catalyzed", + "catalyses": "catalyzes", + "catalysing": "catalyzing", + "categorise": "categorize", + "categorised": "categorized", + "categorises": "categorizes", + "categorising": "categorizing", + "cauterise": "cauterize", + "cauterised": "cauterized", + "cauterises": "cauterizes", + "cauterising": "cauterizing", + "cavilled": "caviled", + "cavilling": "caviling", + "centigramme": "centigram", + "centigrammes": "centigrams", + "centilitre": "centiliter", + "centilitres": "centiliters", + "centimetre": "centimeter", + "centimetres": "centimeters", + "centralise": "centralize", + "centralised": "centralized", + "centralises": "centralizes", + "centralising": "centralizing", + "centre": "center", + "centred": "centered", + "centrefold": "centerfold", + "centrefolds": "centerfolds", + "centrepiece": "centerpiece", + "centrepieces": "centerpieces", + "centres": "centers", + "channelled": "channeled", + "channelling": "channeling", + "characterise": "characterize", + "characterised": "characterized", + "characterises": "characterizes", + "characterising": "characterizing", + "chequebook": "checkbook", + "chequebooks": "checkbooks", + "chequered": "checkered", + "chilli": "chili", + "chimaera": "chimera", + "chimaeras": "chimeras", + "chiselled": "chiseled", + "chiselling": "chiseling", + "circularise": "circularize", + "circularised": "circularized", + "circularises": "circularizes", + "circularising": "circularizing", + "civilise": "civilize", + "civilised": "civilized", + "civilises": "civilizes", + "civilising": "civilizing", + "clamour": "clamor", + "clamoured": "clamored", + "clamouring": "clamoring", + "clamours": "clamors", + "clangour": "clangor", + "clarinettist": "clarinetist", + "clarinettists": "clarinetists", + "collectivise": "collectivize", + "collectivised": "collectivized", + "collectivises": "collectivizes", + "collectivising": "collectivizing", + "colonisation": "colonization", + "colonise": "colonize", + "colonised": "colonized", + "coloniser": "colonizer", + "colonisers": "colonizers", + "colonises": "colonizes", + "colonising": "colonizing", + "colour": "color", + "colourant": "colorant", + "colourants": "colorants", + "coloured": "colored", + "coloureds": "coloreds", + "colourful": "colorful", + "colourfully": "colorfully", + "colouring": "coloring", + "colourize": "colorize", + "colourized": "colorized", + "colourizes": "colorizes", + "colourizing": "colorizing", + "colourless": "colorless", + "colours": "colors", + "commercialise": "commercialize", + "commercialised": "commercialized", + "commercialises": "commercializes", + "commercialising": "commercializing", + "compartmentalise": "compartmentalize", + "compartmentalised": "compartmentalized", + "compartmentalises": "compartmentalizes", + "compartmentalising": "compartmentalizing", + "computerise": "computerize", + "computerised": "computerized", + "computerises": "computerizes", + "computerising": "computerizing", + "conceptualise": "conceptualize", + "conceptualised": "conceptualized", + "conceptualises": "conceptualizes", + "conceptualising": "conceptualizing", + "connexion": "connection", + "connexions": "connections", + "contextualise": "contextualize", + "contextualised": "contextualized", + "contextualises": "contextualizes", + "contextualising": "contextualizing", + "cosier": "cozier", + "cosies": "cozies", + "cosiest": "coziest", + "cosily": "cozily", + "cosiness": "coziness", + "cosy": "cozy", + "councillor": "councilor", + "councillors": "councilors", + "counselled": "counseled", + "counselling": "counseling", + "counsellor": "counselor", + "counsellors": "counselors", + "crenellated": "crenelated", + "criminalise": "criminalize", + "criminalised": "criminalized", + "criminalises": "criminalizes", + "criminalising": "criminalizing", + "criticise": "criticize", + "criticised": "criticized", + "criticises": "criticizes", + "criticising": "criticizing", + "crueller": "crueler", + "cruellest": "cruelest", + "crystallisation": "crystallization", + "crystallise": "crystallize", + "crystallised": "crystallized", + "crystallises": "crystallizes", + "crystallising": "crystallizing", + "cudgelled": "cudgeled", + "cudgelling": "cudgeling", + "customise": "customize", + "customised": "customized", + "customises": "customizes", + "customising": "customizing", + "cypher": "cipher", + "cyphers": "ciphers", + "decentralisation": "decentralization", + "decentralise": "decentralize", + "decentralised": "decentralized", + "decentralises": "decentralizes", + "decentralising": "decentralizing", + "decriminalisation": "decriminalization", + "decriminalise": "decriminalize", + "decriminalised": "decriminalized", + "decriminalises": "decriminalizes", + "decriminalising": "decriminalizing", + "defence": "defense", + "defenceless": "defenseless", + "defences": "defenses", + "dehumanisation": "dehumanization", + "dehumanise": "dehumanize", + "dehumanised": "dehumanized", + "dehumanises": "dehumanizes", + "dehumanising": "dehumanizing", + "demeanour": "demeanor", + "demilitarisation": "demilitarization", + "demilitarise": "demilitarize", + "demilitarised": "demilitarized", + "demilitarises": "demilitarizes", + "demilitarising": "demilitarizing", + "demobilisation": "demobilization", + "demobilise": "demobilize", + "demobilised": "demobilized", + "demobilises": "demobilizes", + "demobilising": "demobilizing", + "democratisation": "democratization", + "democratise": "democratize", + "democratised": "democratized", + "democratises": "democratizes", + "democratising": "democratizing", + "demonise": "demonize", + "demonised": "demonized", + "demonises": "demonizes", + "demonising": "demonizing", + "demoralisation": "demoralization", + "demoralise": "demoralize", + "demoralised": "demoralized", + "demoralises": "demoralizes", + "demoralising": "demoralizing", + "denationalisation": "denationalization", + "denationalise": "denationalize", + "denationalised": "denationalized", + "denationalises": "denationalizes", + "denationalising": "denationalizing", + "deodorise": "deodorize", + "deodorised": "deodorized", + "deodorises": "deodorizes", + "deodorising": "deodorizing", + "depersonalise": "depersonalize", + "depersonalised": "depersonalized", + "depersonalises": "depersonalizes", + "depersonalising": "depersonalizing", + "deputise": "deputize", + "deputised": "deputized", + "deputises": "deputizes", + "deputising": "deputizing", + "desensitisation": "desensitization", + "desensitise": "desensitize", + "desensitised": "desensitized", + "desensitises": "desensitizes", + "desensitising": "desensitizing", + "destabilisation": "destabilization", + "destabilise": "destabilize", + "destabilised": "destabilized", + "destabilises": "destabilizes", + "destabilising": "destabilizing", + "dialled": "dialed", + "dialling": "dialing", + "dialogue": "dialog", + "dialogues": "dialogs", + "diarrhoea": "diarrhea", + "digitise": "digitize", + "digitised": "digitized", + "digitises": "digitizes", + "digitising": "digitizing", + "disc": "disk", + "discolour": "discolor", + "discoloured": "discolored", + "discolouring": "discoloring", + "discolours": "discolors", + "discs": "disks", + "disembowelled": "disemboweled", + "disembowelling": "disemboweling", + "disfavour": "disfavor", + "dishevelled": "disheveled", + "dishonour": "dishonor", + "dishonourable": "dishonorable", + "dishonourably": "dishonorably", + "dishonoured": "dishonored", + "dishonouring": "dishonoring", + "dishonours": "dishonors", + "disorganisation": "disorganization", + "disorganised": "disorganized", + "distil": "distill", + "distils": "distills", + "dramatisation": "dramatization", + "dramatisations": "dramatizations", + "dramatise": "dramatize", + "dramatised": "dramatized", + "dramatises": "dramatizes", + "dramatising": "dramatizing", + "draught": "draft", + "draughtboard": "draftboard", + "draughtboards": "draftboards", + "draughtier": "draftier", + "draughtiest": "draftiest", + "draughts": "drafts", + "draughtsman": "draftsman", + "draughtsmanship": "draftsmanship", + "draughtsmen": "draftsmen", + "draughtswoman": "draftswoman", + "draughtswomen": "draftswomen", + "draughty": "drafty", + "drivelled": "driveled", + "drivelling": "driveling", + "duelled": "dueled", + "duelling": "dueling", + "economise": "economize", + "economised": "economized", + "economises": "economizes", + "economising": "economizing", + "edoema": "edema", + "editorialise": "editorialize", + "editorialised": "editorialized", + "editorialises": "editorializes", + "editorialising": "editorializing", + "empathise": "empathize", + "empathised": "empathized", + "empathises": "empathizes", + "empathising": "empathizing", + "emphasise": "emphasize", + "emphasised": "emphasized", + "emphasises": "emphasizes", + "emphasising": "emphasizing", + "enamelled": "enameled", + "enamelling": "enameling", + "enamoured": "enamored", + "encyclopaedia": "encyclopedia", + "encyclopaedias": "encyclopedias", + "encyclopaedic": "encyclopedic", + "endeavour": "endeavor", + "endeavoured": "endeavored", + "endeavouring": "endeavoring", + "endeavours": "endeavors", + "energise": "energize", + "energised": "energized", + "energises": "energizes", + "energising": "energizing", + "enrol": "enroll", + "enrols": "enrolls", + "enthral": "enthrall", + "enthrals": "enthralls", + "epaulette": "epaulet", + "epaulettes": "epaulets", + "epicentre": "epicenter", + "epicentres": "epicenters", + "epilogue": "epilog", + "epilogues": "epilogs", + "epitomise": "epitomize", + "epitomised": "epitomized", + "epitomises": "epitomizes", + "epitomising": "epitomizing", + "equalisation": "equalization", + "equalise": "equalize", + "equalised": "equalized", + "equaliser": "equalizer", + "equalisers": "equalizers", + "equalises": "equalizes", + "equalising": "equalizing", + "eulogise": "eulogize", + "eulogised": "eulogized", + "eulogises": "eulogizes", + "eulogising": "eulogizing", + "evangelise": "evangelize", + "evangelised": "evangelized", + "evangelises": "evangelizes", + "evangelising": "evangelizing", + "exorcise": "exorcize", + "exorcised": "exorcized", + "exorcises": "exorcizes", + "exorcising": "exorcizing", + "extemporisation": "extemporization", + "extemporise": "extemporize", + "extemporised": "extemporized", + "extemporises": "extemporizes", + "extemporising": "extemporizing", + "externalisation": "externalization", + "externalisations": "externalizations", + "externalise": "externalize", + "externalised": "externalized", + "externalises": "externalizes", + "externalising": "externalizing", + "factorise": "factorize", + "factorised": "factorized", + "factorises": "factorizes", + "factorising": "factorizing", + "faecal": "fecal", + "faeces": "feces", + "familiarisation": "familiarization", + "familiarise": "familiarize", + "familiarised": "familiarized", + "familiarises": "familiarizes", + "familiarising": "familiarizing", + "fantasise": "fantasize", + "fantasised": "fantasized", + "fantasises": "fantasizes", + "fantasising": "fantasizing", + "favour": "favor", + "favourable": "favorable", + "favourably": "favorably", + "favoured": "favored", + "favouring": "favoring", + "favourite": "favorite", + "favourites": "favorites", + "favouritism": "favoritism", + "favours": "favors", + "feminise": "feminize", + "feminised": "feminized", + "feminises": "feminizes", + "feminising": "feminizing", + "fertilisation": "fertilization", + "fertilise": "fertilize", + "fertilised": "fertilized", + "fertiliser": "fertilizer", + "fertilisers": "fertilizers", + "fertilises": "fertilizes", + "fertilising": "fertilizing", + "fervour": "fervor", + "fibre": "fiber", + "fibreglass": "fiberglass", + "fibres": "fibers", + "fictionalisation": "fictionalization", + "fictionalisations": "fictionalizations", + "fictionalise": "fictionalize", + "fictionalised": "fictionalized", + "fictionalises": "fictionalizes", + "fictionalising": "fictionalizing", + "fillet": "filet", + "filleted": "fileted", + "filleting": "fileting", + "fillets": "filets", + "finalisation": "finalization", + "finalise": "finalize", + "finalised": "finalized", + "finalises": "finalizes", + "finalising": "finalizing", + "flautist": "flutist", + "flautists": "flutists", + "flavour": "flavor", + "flavoured": "flavored", + "flavouring": "flavoring", + "flavourings": "flavorings", + "flavourless": "flavorless", + "flavours": "flavors", + "flavoursome": "flavorsome", + "flier": "flyer", + "foetal": "fetal", + "foetid": "fetid", + "foetus": "fetus", + "foetuses": "fetuses", + "formalisation": "formalization", + "formalise": "formalize", + "formalised": "formalized", + "formalises": "formalizes", + "formalising": "formalizing", + "fossilisation": "fossilization", + "fossilise": "fossilize", + "fossilised": "fossilized", + "fossilises": "fossilizes", + "fossilising": "fossilizing", + "fraternisation": "fraternization", + "fraternise": "fraternize", + "fraternised": "fraternized", + "fraternises": "fraternizes", + "fraternising": "fraternizing", + "fulfil": "fulfill", + "fulfilment": "fulfillment", + "fulfils": "fulfills", + "funnelled": "funneled", + "funnelling": "funneling", + "galvanise": "galvanize", + "galvanised": "galvanized", + "galvanises": "galvanizes", + "galvanising": "galvanizing", + "gambolled": "gamboled", + "gambolling": "gamboling", + "gaol": "jail", + "gaolbird": "jailbird", + "gaolbirds": "jailbirds", + "gaolbreak": "jailbreak", + "gaolbreaks": "jailbreaks", + "gaoled": "jailed", + "gaoler": "jailer", + "gaolers": "jailers", + "gaoling": "jailing", + "gaols": "jails", + "gases": "gasses", + "gauge": "gage", + "gauged": "gaged", + "gauges": "gages", + "gauging": "gaging", + "generalisation": "generalization", + "generalisations": "generalizations", + "generalise": "generalize", + "generalised": "generalized", + "generalises": "generalizes", + "generalising": "generalizing", + "ghettoise": "ghettoize", + "ghettoised": "ghettoized", + "ghettoises": "ghettoizes", + "ghettoising": "ghettoizing", + "gipsies": "gypsies", + "glamorise": "glamorize", + "glamorised": "glamorized", + "glamorises": "glamorizes", + "glamorising": "glamorizing", + "glamour": "glamor", + "globalisation": "globalization", + "globalise": "globalize", + "globalised": "globalized", + "globalises": "globalizes", + "globalising": "globalizing", + "glueing": "gluing", + "goitre": "goiter", + "goitres": "goiters", + "gonorrhoea": "gonorrhea", + "gramme": "gram", + "grammes": "grams", + "gravelled": "graveled", + "grey": "gray", + "greyed": "grayed", + "greying": "graying", + "greyish": "grayish", + "greyness": "grayness", + "greys": "grays", + "grovelled": "groveled", + "grovelling": "groveling", + "groyne": "groin", + "groynes": "groins", + "gruelling": "grueling", + "gruellingly": "gruelingly", + "gryphon": "griffin", + "gryphons": "griffins", + "gynaecological": "gynecological", + "gynaecologist": "gynecologist", + "gynaecologists": "gynecologists", + "gynaecology": "gynecology", + "haematological": "hematological", + "haematologist": "hematologist", + "haematologists": "hematologists", + "haematology": "hematology", + "haemoglobin": "hemoglobin", + "haemophilia": "hemophilia", + "haemophiliac": "hemophiliac", + "haemophiliacs": "hemophiliacs", + "haemorrhage": "hemorrhage", + "haemorrhaged": "hemorrhaged", + "haemorrhages": "hemorrhages", + "haemorrhaging": "hemorrhaging", + "haemorrhoids": "hemorrhoids", + "harbour": "harbor", + "harboured": "harbored", + "harbouring": "harboring", + "harbours": "harbors", + "harmonisation": "harmonization", + "harmonise": "harmonize", + "harmonised": "harmonized", + "harmonises": "harmonizes", + "harmonising": "harmonizing", + "homoeopath": "homeopath", + "homoeopathic": "homeopathic", + "homoeopaths": "homeopaths", + "homoeopathy": "homeopathy", + "homogenise": "homogenize", + "homogenised": "homogenized", + "homogenises": "homogenizes", + "homogenising": "homogenizing", + "honour": "honor", + "honourable": "honorable", + "honourably": "honorably", + "honoured": "honored", + "honouring": "honoring", + "honours": "honors", + "hospitalisation": "hospitalization", + "hospitalise": "hospitalize", + "hospitalised": "hospitalized", + "hospitalises": "hospitalizes", + "hospitalising": "hospitalizing", + "humanise": "humanize", + "humanised": "humanized", + "humanises": "humanizes", + "humanising": "humanizing", + "humour": "humor", + "humoured": "humored", + "humouring": "humoring", + "humourless": "humorless", + "humours": "humors", + "hybridise": "hybridize", + "hybridised": "hybridized", + "hybridises": "hybridizes", + "hybridising": "hybridizing", + "hypnotise": "hypnotize", + "hypnotised": "hypnotized", + "hypnotises": "hypnotizes", + "hypnotising": "hypnotizing", + "hypothesise": "hypothesize", + "hypothesised": "hypothesized", + "hypothesises": "hypothesizes", + "hypothesising": "hypothesizing", + "idealisation": "idealization", + "idealise": "idealize", + "idealised": "idealized", + "idealises": "idealizes", + "idealising": "idealizing", + "idolise": "idolize", + "idolised": "idolized", + "idolises": "idolizes", + "idolising": "idolizing", + "immobilisation": "immobilization", + "immobilise": "immobilize", + "immobilised": "immobilized", + "immobiliser": "immobilizer", + "immobilisers": "immobilizers", + "immobilises": "immobilizes", + "immobilising": "immobilizing", + "immortalise": "immortalize", + "immortalised": "immortalized", + "immortalises": "immortalizes", + "immortalising": "immortalizing", + "immunisation": "immunization", + "immunise": "immunize", + "immunised": "immunized", + "immunises": "immunizes", + "immunising": "immunizing", + "impanelled": "impaneled", + "impanelling": "impaneling", + "imperilled": "imperiled", + "imperilling": "imperiling", + "individualise": "individualize", + "individualised": "individualized", + "individualises": "individualizes", + "individualising": "individualizing", + "industrialise": "industrialize", + "industrialised": "industrialized", + "industrialises": "industrializes", + "industrialising": "industrializing", + "inflexion": "inflection", + "inflexions": "inflections", + "initialise": "initialize", + "initialised": "initialized", + "initialises": "initializes", + "initialising": "initializing", + "initialled": "initialed", + "initialling": "initialing", + "instal": "install", + "instalment": "installment", + "instalments": "installments", + "instals": "installs", + "instil": "instill", + "instils": "instills", + "institutionalisation": "institutionalization", + "institutionalise": "institutionalize", + "institutionalised": "institutionalized", + "institutionalises": "institutionalizes", + "institutionalising": "institutionalizing", + "intellectualise": "intellectualize", + "intellectualised": "intellectualized", + "intellectualises": "intellectualizes", + "intellectualising": "intellectualizing", + "internalisation": "internalization", + "internalise": "internalize", + "internalised": "internalized", + "internalises": "internalizes", + "internalising": "internalizing", + "internationalisation": "internationalization", + "internationalise": "internationalize", + "internationalised": "internationalized", + "internationalises": "internationalizes", + "internationalising": "internationalizing", + "ionisation": "ionization", + "ionise": "ionize", + "ionised": "ionized", + "ioniser": "ionizer", + "ionisers": "ionizers", + "ionises": "ionizes", + "ionising": "ionizing", + "italicise": "italicize", + "italicised": "italicized", + "italicises": "italicizes", + "italicising": "italicizing", + "itemise": "itemize", + "itemised": "itemized", + "itemises": "itemizes", + "itemising": "itemizing", + "jeopardise": "jeopardize", + "jeopardised": "jeopardized", + "jeopardises": "jeopardizes", + "jeopardising": "jeopardizing", + "jewelled": "jeweled", + "jeweller": "jeweler", + "jewellers": "jewelers", + "jewellery": "jewelry", + "judgement": "judgment", + "kilogramme": "kilogram", + "kilogrammes": "kilograms", + "kilometre": "kilometer", + "kilometres": "kilometers", + "labelled": "labeled", + "labelling": "labeling", + "labour": "labor", + "laboured": "labored", + "labourer": "laborer", + "labourers": "laborers", + "labouring": "laboring", + "labours": "labors", + "lacklustre": "lackluster", + "legalisation": "legalization", + "legalise": "legalize", + "legalised": "legalized", + "legalises": "legalizes", + "legalising": "legalizing", + "legitimise": "legitimize", + "legitimised": "legitimized", + "legitimises": "legitimizes", + "legitimising": "legitimizing", + "leukaemia": "leukemia", + "levelled": "leveled", + "leveller": "leveler", + "levellers": "levelers", + "levelling": "leveling", + "libelled": "libeled", + "libelling": "libeling", + "libellous": "libelous", + "liberalisation": "liberalization", + "liberalise": "liberalize", + "liberalised": "liberalized", + "liberalises": "liberalizes", + "liberalising": "liberalizing", + "licence": "license", + "licenced": "licensed", + "licences": "licenses", + "licencing": "licensing", + "likeable": "likable", + "lionisation": "lionization", + "lionise": "lionize", + "lionised": "lionized", + "lionises": "lionizes", + "lionising": "lionizing", + "liquidise": "liquidize", + "liquidised": "liquidized", + "liquidiser": "liquidizer", + "liquidisers": "liquidizers", + "liquidises": "liquidizes", + "liquidising": "liquidizing", + "litre": "liter", + "litres": "liters", + "localise": "localize", + "localised": "localized", + "localises": "localizes", + "localising": "localizing", + "louvre": "louver", + "louvred": "louvered", + "louvres": "louvers", + "lustre": "luster", + "magnetise": "magnetize", + "magnetised": "magnetized", + "magnetises": "magnetizes", + "magnetising": "magnetizing", + "manoeuvrability": "maneuverability", + "manoeuvrable": "maneuverable", + "manoeuvre": "maneuver", + "manoeuvred": "maneuvered", + "manoeuvres": "maneuvers", + "manoeuvring": "maneuvering", + "manoeuvrings": "maneuverings", + "marginalisation": "marginalization", + "marginalise": "marginalize", + "marginalised": "marginalized", + "marginalises": "marginalizes", + "marginalising": "marginalizing", + "marshalled": "marshaled", + "marshalling": "marshaling", + "marvelled": "marveled", + "marvelling": "marveling", + "marvellous": "marvelous", + "marvellously": "marvelously", + "materialisation": "materialization", + "materialise": "materialize", + "materialised": "materialized", + "materialises": "materializes", + "materialising": "materializing", + "maximisation": "maximization", + "maximise": "maximize", + "maximised": "maximized", + "maximises": "maximizes", + "maximising": "maximizing", + "meagre": "meager", + "mechanisation": "mechanization", + "mechanise": "mechanize", + "mechanised": "mechanized", + "mechanises": "mechanizes", + "mechanising": "mechanizing", + "mediaeval": "medieval", + "memorialise": "memorialize", + "memorialised": "memorialized", + "memorialises": "memorializes", + "memorialising": "memorializing", + "memorise": "memorize", + "memorised": "memorized", + "memorises": "memorizes", + "memorising": "memorizing", + "mesmerise": "mesmerize", + "mesmerised": "mesmerized", + "mesmerises": "mesmerizes", + "mesmerising": "mesmerizing", + "metabolise": "metabolize", + "metabolised": "metabolized", + "metabolises": "metabolizes", + "metabolising": "metabolizing", + "metre": "meter", + "metres": "meters", + "micrometre": "micrometer", + "micrometres": "micrometers", + "militarise": "militarize", + "militarised": "militarized", + "militarises": "militarizes", + "militarising": "militarizing", + "milligramme": "milligram", + "milligrammes": "milligrams", + "millilitre": "milliliter", + "millilitres": "milliliters", + "millimetre": "millimeter", + "millimetres": "millimeters", + "miniaturisation": "miniaturization", + "miniaturise": "miniaturize", + "miniaturised": "miniaturized", + "miniaturises": "miniaturizes", + "miniaturising": "miniaturizing", + "minibuses": "minibusses", + "minimise": "minimize", + "minimised": "minimized", + "minimises": "minimizes", + "minimising": "minimizing", + "misbehaviour": "misbehavior", + "misdemeanour": "misdemeanor", + "misdemeanours": "misdemeanors", + "misspelt": "misspelled", + "mitre": "miter", + "mitres": "miters", + "mobilisation": "mobilization", + "mobilise": "mobilize", + "mobilised": "mobilized", + "mobilises": "mobilizes", + "mobilising": "mobilizing", + "modelled": "modeled", + "modeller": "modeler", + "modellers": "modelers", + "modelling": "modeling", + "modernise": "modernize", + "modernised": "modernized", + "modernises": "modernizes", + "modernising": "modernizing", + "moisturise": "moisturize", + "moisturised": "moisturized", + "moisturiser": "moisturizer", + "moisturisers": "moisturizers", + "moisturises": "moisturizes", + "moisturising": "moisturizing", + "monologue": "monolog", + "monologues": "monologs", + "monopolisation": "monopolization", + "monopolise": "monopolize", + "monopolised": "monopolized", + "monopolises": "monopolizes", + "monopolising": "monopolizing", + "moralise": "moralize", + "moralised": "moralized", + "moralises": "moralizes", + "moralising": "moralizing", + "motorised": "motorized", + "mould": "mold", + "moulded": "molded", + "moulder": "molder", + "mouldered": "moldered", + "mouldering": "moldering", + "moulders": "molders", + "mouldier": "moldier", + "mouldiest": "moldiest", + "moulding": "molding", + "mouldings": "moldings", + "moulds": "molds", + "mouldy": "moldy", + "moult": "molt", + "moulted": "molted", + "moulting": "molting", + "moults": "molts", + "moustache": "mustache", + "moustached": "mustached", + "moustaches": "mustaches", + "moustachioed": "mustachioed", + "multicoloured": "multicolored", + "nationalisation": "nationalization", + "nationalisations": "nationalizations", + "nationalise": "nationalize", + "nationalised": "nationalized", + "nationalises": "nationalizes", + "nationalising": "nationalizing", + "naturalisation": "naturalization", + "naturalise": "naturalize", + "naturalised": "naturalized", + "naturalises": "naturalizes", + "naturalising": "naturalizing", + "neighbour": "neighbor", + "neighbourhood": "neighborhood", + "neighbourhoods": "neighborhoods", + "neighbouring": "neighboring", + "neighbourliness": "neighborliness", + "neighbourly": "neighborly", + "neighbours": "neighbors", + "neutralisation": "neutralization", + "neutralise": "neutralize", + "neutralised": "neutralized", + "neutralises": "neutralizes", + "neutralising": "neutralizing", + "normalisation": "normalization", + "normalise": "normalize", + "normalised": "normalized", + "normalises": "normalizes", + "normalising": "normalizing", + "odour": "odor", + "odourless": "odorless", + "odours": "odors", + "oesophagus": "esophagus", + "oesophaguses": "esophaguses", + "oestrogen": "estrogen", + "offence": "offense", + "offences": "offenses", + "omelette": "omelet", + "omelettes": "omelets", + "optimise": "optimize", + "optimised": "optimized", + "optimises": "optimizes", + "optimising": "optimizing", + "organisation": "organization", + "organisational": "organizational", + "organisations": "organizations", + "organise": "organize", + "organised": "organized", + "organiser": "organizer", + "organisers": "organizers", + "organises": "organizes", + "organising": "organizing", + "orthopaedic": "orthopedic", + "orthopaedics": "orthopedics", + "ostracise": "ostracize", + "ostracised": "ostracized", + "ostracises": "ostracizes", + "ostracising": "ostracizing", + "outmanoeuvre": "outmaneuver", + "outmanoeuvred": "outmaneuvered", + "outmanoeuvres": "outmaneuvers", + "outmanoeuvring": "outmaneuvering", + "overemphasise": "overemphasize", + "overemphasised": "overemphasized", + "overemphasises": "overemphasizes", + "overemphasising": "overemphasizing", + "oxidisation": "oxidization", + "oxidise": "oxidize", + "oxidised": "oxidized", + "oxidises": "oxidizes", + "oxidising": "oxidizing", + "paederast": "pederast", + "paederasts": "pederasts", + "paediatric": "pediatric", + "paediatrician": "pediatrician", + "paediatricians": "pediatricians", + "paediatrics": "pediatrics", + "paedophile": "pedophile", + "paedophiles": "pedophiles", + "paedophilia": "pedophilia", + "palaeolithic": "paleolithic", + "palaeontologist": "paleontologist", + "palaeontologists": "paleontologists", + "palaeontology": "paleontology", + "panelled": "paneled", + "panelling": "paneling", + "panellist": "panelist", + "panellists": "panelists", + "paralyse": "paralyze", + "paralysed": "paralyzed", + "paralyses": "paralyzes", + "paralysing": "paralyzing", + "parcelled": "parceled", + "parcelling": "parceling", + "parlour": "parlor", + "parlours": "parlors", + "particularise": "particularize", + "particularised": "particularized", + "particularises": "particularizes", + "particularising": "particularizing", + "passivisation": "passivization", + "passivise": "passivize", + "passivised": "passivized", + "passivises": "passivizes", + "passivising": "passivizing", + "pasteurisation": "pasteurization", + "pasteurise": "pasteurize", + "pasteurised": "pasteurized", + "pasteurises": "pasteurizes", + "pasteurising": "pasteurizing", + "patronise": "patronize", + "patronised": "patronized", + "patronises": "patronizes", + "patronising": "patronizing", + "patronisingly": "patronizingly", + "pedalled": "pedaled", + "pedalling": "pedaling", + "pedestrianisation": "pedestrianization", + "pedestrianise": "pedestrianize", + "pedestrianised": "pedestrianized", + "pedestrianises": "pedestrianizes", + "pedestrianising": "pedestrianizing", + "penalise": "penalize", + "penalised": "penalized", + "penalises": "penalizes", + "penalising": "penalizing", + "pencilled": "penciled", + "pencilling": "penciling", + "personalise": "personalize", + "personalised": "personalized", + "personalises": "personalizes", + "personalising": "personalizing", + "pharmacopoeia": "pharmacopeia", + "pharmacopoeias": "pharmacopeias", + "philosophise": "philosophize", + "philosophised": "philosophized", + "philosophises": "philosophizes", + "philosophising": "philosophizing", + "philtre": "filter", + "philtres": "filters", + "phoney": "phony", + "plagiarise": "plagiarize", + "plagiarised": "plagiarized", + "plagiarises": "plagiarizes", + "plagiarising": "plagiarizing", + "plough": "plow", + "ploughed": "plowed", + "ploughing": "plowing", + "ploughman": "plowman", + "ploughmen": "plowmen", + "ploughs": "plows", + "ploughshare": "plowshare", + "ploughshares": "plowshares", + "polarisation": "polarization", + "polarise": "polarize", + "polarised": "polarized", + "polarises": "polarizes", + "polarising": "polarizing", + "politicisation": "politicization", + "politicise": "politicize", + "politicised": "politicized", + "politicises": "politicizes", + "politicising": "politicizing", + "popularisation": "popularization", + "popularise": "popularize", + "popularised": "popularized", + "popularises": "popularizes", + "popularising": "popularizing", + "pouffe": "pouf", + "pouffes": "poufs", + "practise": "practice", + "practised": "practiced", + "practises": "practices", + "practising": "practicing", + "praesidium": "presidium", + "praesidiums": "presidiums", + "pressurisation": "pressurization", + "pressurise": "pressurize", + "pressurised": "pressurized", + "pressurises": "pressurizes", + "pressurising": "pressurizing", + "pretence": "pretense", + "pretences": "pretenses", + "primaeval": "primeval", + "prioritisation": "prioritization", + "prioritise": "prioritize", + "prioritised": "prioritized", + "prioritises": "prioritizes", + "prioritising": "prioritizing", + "privatisation": "privatization", + "privatisations": "privatizations", + "privatise": "privatize", + "privatised": "privatized", + "privatises": "privatizes", + "privatising": "privatizing", + "professionalisation": "professionalization", + "professionalise": "professionalize", + "professionalised": "professionalized", + "professionalises": "professionalizes", + "professionalising": "professionalizing", + "programme": "program", + "programmes": "programs", + "prologue": "prolog", + "prologues": "prologs", + "propagandise": "propagandize", + "propagandised": "propagandized", + "propagandises": "propagandizes", + "propagandising": "propagandizing", + "proselytise": "proselytize", + "proselytised": "proselytized", + "proselytiser": "proselytizer", + "proselytisers": "proselytizers", + "proselytises": "proselytizes", + "proselytising": "proselytizing", + "psychoanalyse": "psychoanalyze", + "psychoanalysed": "psychoanalyzed", + "psychoanalyses": "psychoanalyzes", + "psychoanalysing": "psychoanalyzing", + "publicise": "publicize", + "publicised": "publicized", + "publicises": "publicizes", + "publicising": "publicizing", + "pulverisation": "pulverization", + "pulverise": "pulverize", + "pulverised": "pulverized", + "pulverises": "pulverizes", + "pulverising": "pulverizing", + "pummell": "pummel", + "pummelled": "pummeled", + "pummelling": "pummeling", + "pyjama": "pajama", + "pyjamas": "pajamas", + "pzazz": "pizzazz", + "quarrelled": "quarreled", + "quarrelling": "quarreling", + "radicalise": "radicalize", + "radicalised": "radicalized", + "radicalises": "radicalizes", + "radicalising": "radicalizing", + "rancour": "rancor", + "randomise": "randomize", + "randomised": "randomized", + "randomises": "randomizes", + "randomising": "randomizing", + "rationalisation": "rationalization", + "rationalisations": "rationalizations", + "rationalise": "rationalize", + "rationalised": "rationalized", + "rationalises": "rationalizes", + "rationalising": "rationalizing", + "ravelled": "raveled", + "ravelling": "raveling", + "realisable": "realizable", + "realisation": "realization", + "realisations": "realizations", + "realise": "realize", + "realised": "realized", + "realises": "realizes", + "realising": "realizing", + "recognisable": "recognizable", + "recognisably": "recognizably", + "recognisance": "recognizance", + "recognise": "recognize", + "recognised": "recognized", + "recognises": "recognizes", + "recognising": "recognizing", + "reconnoitre": "reconnoiter", + "reconnoitred": "reconnoitered", + "reconnoitres": "reconnoiters", + "reconnoitring": "reconnoitering", + "refuelled": "refueled", + "refuelling": "refueling", + "regularisation": "regularization", + "regularise": "regularize", + "regularised": "regularized", + "regularises": "regularizes", + "regularising": "regularizing", + "remodelled": "remodeled", + "remodelling": "remodeling", + "remould": "remold", + "remoulded": "remolded", + "remoulding": "remolding", + "remoulds": "remolds", + "reorganisation": "reorganization", + "reorganisations": "reorganizations", + "reorganise": "reorganize", + "reorganised": "reorganized", + "reorganises": "reorganizes", + "reorganising": "reorganizing", + "revelled": "reveled", + "reveller": "reveler", + "revellers": "revelers", + "revelling": "reveling", + "revitalise": "revitalize", + "revitalised": "revitalized", + "revitalises": "revitalizes", + "revitalising": "revitalizing", + "revolutionise": "revolutionize", + "revolutionised": "revolutionized", + "revolutionises": "revolutionizes", + "revolutionising": "revolutionizing", + "rhapsodise": "rhapsodize", + "rhapsodised": "rhapsodized", + "rhapsodises": "rhapsodizes", + "rhapsodising": "rhapsodizing", + "rigour": "rigor", + "rigours": "rigors", + "ritualised": "ritualized", + "rivalled": "rivaled", + "rivalling": "rivaling", + "romanticise": "romanticize", + "romanticised": "romanticized", + "romanticises": "romanticizes", + "romanticising": "romanticizing", + "rumour": "rumor", + "rumoured": "rumored", + "rumours": "rumors", + "sabre": "saber", + "sabres": "sabers", + "saltpetre": "saltpeter", + "sanitise": "sanitize", + "sanitised": "sanitized", + "sanitises": "sanitizes", + "sanitising": "sanitizing", + "satirise": "satirize", + "satirised": "satirized", + "satirises": "satirizes", + "satirising": "satirizing", + "saviour": "savior", + "saviours": "saviors", + "savour": "savor", + "savoured": "savored", + "savouries": "savories", + "savouring": "savoring", + "savours": "savors", + "savoury": "savory", + "scandalise": "scandalize", + "scandalised": "scandalized", + "scandalises": "scandalizes", + "scandalising": "scandalizing", + "sceptic": "skeptic", + "sceptical": "skeptical", + "sceptically": "skeptically", + "scepticism": "skepticism", + "sceptics": "skeptics", + "sceptre": "scepter", + "sceptres": "scepters", + "scrutinise": "scrutinize", + "scrutinised": "scrutinized", + "scrutinises": "scrutinizes", + "scrutinising": "scrutinizing", + "secularisation": "secularization", + "secularise": "secularize", + "secularised": "secularized", + "secularises": "secularizes", + "secularising": "secularizing", + "sensationalise": "sensationalize", + "sensationalised": "sensationalized", + "sensationalises": "sensationalizes", + "sensationalising": "sensationalizing", + "sensitise": "sensitize", + "sensitised": "sensitized", + "sensitises": "sensitizes", + "sensitising": "sensitizing", + "sentimentalise": "sentimentalize", + "sentimentalised": "sentimentalized", + "sentimentalises": "sentimentalizes", + "sentimentalising": "sentimentalizing", + "sepulchre": "sepulcher", + "sepulchres": "sepulchers", + "serialisation": "serialization", + "serialisations": "serializations", + "serialise": "serialize", + "serialised": "serialized", + "serialises": "serializes", + "serialising": "serializing", + "sermonise": "sermonize", + "sermonised": "sermonized", + "sermonises": "sermonizes", + "sermonising": "sermonizing", + "sheikh": "sheik", + "shovelled": "shoveled", + "shovelling": "shoveling", + "shrivelled": "shriveled", + "shrivelling": "shriveling", + "signalise": "signalize", + "signalised": "signalized", + "signalises": "signalizes", + "signalising": "signalizing", + "signalled": "signaled", + "signalling": "signaling", + "smoulder": "smolder", + "smouldered": "smoldered", + "smouldering": "smoldering", + "smoulders": "smolders", + "snivelled": "sniveled", + "snivelling": "sniveling", + "snorkelled": "snorkeled", + "snorkelling": "snorkeling", + "snowplough": "snowplow", + "snowploughs": "snowplow", + "socialisation": "socialization", + "socialise": "socialize", + "socialised": "socialized", + "socialises": "socializes", + "socialising": "socializing", + "sodomise": "sodomize", + "sodomised": "sodomized", + "sodomises": "sodomizes", + "sodomising": "sodomizing", + "solemnise": "solemnize", + "solemnised": "solemnized", + "solemnises": "solemnizes", + "solemnising": "solemnizing", + "sombre": "somber", + "specialisation": "specialization", + "specialisations": "specializations", + "specialise": "specialize", + "specialised": "specialized", + "specialises": "specializes", + "specialising": "specializing", + "spectre": "specter", + "spectres": "specters", + "spiralled": "spiraled", + "spiralling": "spiraling", + "splendour": "splendor", + "splendours": "splendors", + "squirrelled": "squirreled", + "squirrelling": "squirreling", + "stabilisation": "stabilization", + "stabilise": "stabilize", + "stabilised": "stabilized", + "stabiliser": "stabilizer", + "stabilisers": "stabilizers", + "stabilises": "stabilizes", + "stabilising": "stabilizing", + "standardisation": "standardization", + "standardise": "standardize", + "standardised": "standardized", + "standardises": "standardizes", + "standardising": "standardizing", + "stencilled": "stenciled", + "stencilling": "stenciling", + "sterilisation": "sterilization", + "sterilisations": "sterilizations", + "sterilise": "sterilize", + "sterilised": "sterilized", + "steriliser": "sterilizer", + "sterilisers": "sterilizers", + "sterilises": "sterilizes", + "sterilising": "sterilizing", + "stigmatisation": "stigmatization", + "stigmatise": "stigmatize", + "stigmatised": "stigmatized", + "stigmatises": "stigmatizes", + "stigmatising": "stigmatizing", + "storey": "story", + "storeys": "stories", + "subsidisation": "subsidization", + "subsidise": "subsidize", + "subsidised": "subsidized", + "subsidiser": "subsidizer", + "subsidisers": "subsidizers", + "subsidises": "subsidizes", + "subsidising": "subsidizing", + "succour": "succor", + "succoured": "succored", + "succouring": "succoring", + "succours": "succors", + "sulphate": "sulfate", + "sulphates": "sulfates", + "sulphide": "sulfide", + "sulphides": "sulfides", + "sulphur": "sulfur", + "sulphurous": "sulfurous", + "summarise": "summarize", + "summarised": "summarized", + "summarises": "summarizes", + "summarising": "summarizing", + "swivelled": "swiveled", + "swivelling": "swiveling", + "symbolise": "symbolize", + "symbolised": "symbolized", + "symbolises": "symbolizes", + "symbolising": "symbolizing", + "sympathise": "sympathize", + "sympathised": "sympathized", + "sympathiser": "sympathizer", + "sympathisers": "sympathizers", + "sympathises": "sympathizes", + "sympathising": "sympathizing", + "synchronisation": "synchronization", + "synchronise": "synchronize", + "synchronised": "synchronized", + "synchronises": "synchronizes", + "synchronising": "synchronizing", + "synthesise": "synthesize", + "synthesised": "synthesized", + "synthesiser": "synthesizer", + "synthesisers": "synthesizers", + "synthesises": "synthesizes", + "synthesising": "synthesizing", + "syphon": "siphon", + "syphoned": "siphoned", + "syphoning": "siphoning", + "syphons": "siphons", + "systematisation": "systematization", + "systematise": "systematize", + "systematised": "systematized", + "systematises": "systematizes", + "systematising": "systematizing", + "tantalise": "tantalize", + "tantalised": "tantalized", + "tantalises": "tantalizes", + "tantalising": "tantalizing", + "tantalisingly": "tantalizingly", + "tasselled": "tasseled", + "technicolour": "technicolor", + "temporise": "temporize", + "temporised": "temporized", + "temporises": "temporizes", + "temporising": "temporizing", + "tenderise": "tenderize", + "tenderised": "tenderized", + "tenderises": "tenderizes", + "tenderising": "tenderizing", + "terrorise": "terrorize", + "terrorised": "terrorized", + "terrorises": "terrorizes", + "terrorising": "terrorizing", + "theatre": "theater", + "theatregoer": "theatergoer", + "theatregoers": "theatergoers", + "theatres": "theaters", + "theorise": "theorize", + "theorised": "theorized", + "theorises": "theorizes", + "theorising": "theorizing", + "tonne": "ton", + "tonnes": "tons", + "towelled": "toweled", + "towelling": "toweling", + "toxaemia": "toxemia", + "tranquillise": "tranquilize", + "tranquillised": "tranquilized", + "tranquilliser": "tranquilizer", + "tranquillisers": "tranquilizers", + "tranquillises": "tranquilizes", + "tranquillising": "tranquilizing", + "tranquillity": "tranquility", + "tranquillize": "tranquilize", + "tranquillized": "tranquilized", + "tranquillizer": "tranquilizer", + "tranquillizers": "tranquilizers", + "tranquillizes": "tranquilizes", + "tranquillizing": "tranquilizing", + "tranquilly": "tranquility", + "transistorised": "transistorized", + "traumatise": "traumatize", + "traumatised": "traumatized", + "traumatises": "traumatizes", + "traumatising": "traumatizing", + "travelled": "traveled", + "traveller": "traveler", + "travellers": "travelers", + "travelling": "traveling", + "travelogue": "travelog", + "travelogues": "travelogs", + "trialled": "trialed", + "trialling": "trialing", + "tricolour": "tricolor", + "tricolours": "tricolors", + "trivialise": "trivialize", + "trivialised": "trivialized", + "trivialises": "trivializes", + "trivialising": "trivializing", + "tumour": "tumor", + "tumours": "tumors", + "tunnelled": "tunneled", + "tunnelling": "tunneling", + "tyrannise": "tyrannize", + "tyrannised": "tyrannized", + "tyrannises": "tyrannizes", + "tyrannising": "tyrannizing", + "tyre": "tire", + "tyres": "tires", + "unauthorised": "unauthorized", + "uncivilised": "uncivilized", + "underutilised": "underutilized", + "unequalled": "unequaled", + "unfavourable": "unfavorable", + "unfavourably": "unfavorably", + "unionisation": "unionization", + "unionise": "unionize", + "unionised": "unionized", + "unionises": "unionizes", + "unionising": "unionizing", + "unorganised": "unorganized", + "unravelled": "unraveled", + "unravelling": "unraveling", + "unrecognisable": "unrecognizable", + "unrecognised": "unrecognized", + "unrivalled": "unrivaled", + "unsavoury": "unsavory", + "untrammelled": "untrammeled", + "urbanisation": "urbanization", + "urbanise": "urbanize", + "urbanised": "urbanized", + "urbanises": "urbanizes", + "urbanising": "urbanizing", + "utilisable": "utilizable", + "utilisation": "utilization", + "utilise": "utilize", + "utilised": "utilized", + "utilises": "utilizes", + "utilising": "utilizing", + "valour": "valor", + "vandalise": "vandalize", + "vandalised": "vandalized", + "vandalises": "vandalizes", + "vandalising": "vandalizing", + "vaporisation": "vaporization", + "vaporise": "vaporize", + "vaporised": "vaporized", + "vaporises": "vaporizes", + "vaporising": "vaporizing", + "vapour": "vapor", + "vapours": "vapors", + "verbalise": "verbalize", + "verbalised": "verbalized", + "verbalises": "verbalizes", + "verbalising": "verbalizing", + "victimisation": "victimization", + "victimise": "victimize", + "victimised": "victimized", + "victimises": "victimizes", + "victimising": "victimizing", + "videodisc": "videodisk", + "videodiscs": "videodisks", + "vigour": "vigor", + "visualisation": "visualization", + "visualisations": "visualizations", + "visualise": "visualize", + "visualised": "visualized", + "visualises": "visualizes", + "visualising": "visualizing", + "vocalisation": "vocalization", + "vocalisations": "vocalizations", + "vocalise": "vocalize", + "vocalised": "vocalized", + "vocalises": "vocalizes", + "vocalising": "vocalizing", + "vulcanised": "vulcanized", + "vulgarisation": "vulgarization", + "vulgarise": "vulgarize", + "vulgarised": "vulgarized", + "vulgarises": "vulgarizes", + "vulgarising": "vulgarizing", + "waggon": "wagon", + "waggons": "wagons", + "watercolour": "watercolor", + "watercolours": "watercolors", + "weaselled": "weaseled", + "weaselling": "weaseling", + "westernisation": "westernization", + "westernise": "westernize", + "westernised": "westernized", + "westernises": "westernizes", + "westernising": "westernizing", + "womanise": "womanize", + "womanised": "womanized", + "womaniser": "womanizer", + "womanisers": "womanizers", + "womanises": "womanizes", + "womanising": "womanizing", + "woollen": "woolen", + "woollens": "woolens", + "woollies": "woolies", + "woolly": "wooly", + "worshipped": "worshiped", + "worshipping": "worshiping", + "worshipper": "worshiper", + "yodelled": "yodeled", + "yodelling": "yodeling", + "yoghourt": "yogurt", + "yoghourts": "yogurts", + "yoghurt": "yogurt", + "yoghurts": "yogurts" + } + } +} diff --git a/tools/python/score.py b/tools/python/score.py index c2cb6e70..93912948 100644 --- a/tools/python/score.py +++ b/tools/python/score.py @@ -34,6 +34,7 @@ FUNCTION_REGEX = r'(? 0: if showTopFiles > len(scoreFiles): diff --git a/tools/python/score_display.py b/tools/python/score_display.py index 4cc6c75b..73670111 100644 --- a/tools/python/score_display.py +++ b/tools/python/score_display.py @@ -106,7 +106,7 @@ class ScoreDisplay: out += self.makeLine(' ', dashLen, status['Msg']) return [out, dashLen] - def getDisplay(self, advOnePer, advTwoPer, showFlags=3, totalDecompFunctions=0, totalGlobalAsm=0, totalNonMatching=0, totalDocumented=0, totalUndocumented=0): + def getDisplay(self, advOnePer, advTwoPer, showFlags=3, totalDecompFunctions=0, totalGlobalAsm=0, totalNonMatching=0, totalNonEquivalent=0, totalDocumented=0, totalUndocumented=0): advOneStatus = self.getStatus(advOnePer) advTwoStatus = self.getStatus(advTwoPer) if showFlags == 3: @@ -130,6 +130,7 @@ class ScoreDisplay: out += self.makeLine(' ', dashLen, '# Decompiled functions: ' + str(totalDecompFunctions)) out += self.makeLine(' ', dashLen, '# GLOBAL_ASM remaining: ' + str(totalGlobalAsm)) out += self.makeLine(' ', dashLen, '# NON_MATCHING functions: ' + str(totalNonMatching)) + out += self.makeLine(' ', dashLen, '# NON_EQUIVALENT WIP functions: ' + str(totalNonEquivalent)) out += advOneGameStatusDisplay[0] if showFlags & 2: out += self.makeLine('=', dashLen)