diff --git a/asm/gzip/gzip_inflate_block.s b/asm/gzip/gzip_inflate_block.s index 0eba9367..023336a9 100644 --- a/asm/gzip/gzip_inflate_block.s +++ b/asm/gzip/gzip_inflate_block.s @@ -1,4 +1,4 @@ -glabel gzip_inflate_block +glabel gzip_inflate_block /* Official name: inflate_block */ /* 0C74C0 800C68C0 3C0B8013 */ lui $t3, %hi(gzip_num_bits) # $t3, 0x8013 /* 0C74C4 800C68C4 8D6BAAD4 */ lw $t3, %lo(gzip_num_bits)($t3) /* 0C74C8 800C68C8 3C018013 */ lui $at, %hi(D_8012AAD8) # $at, 0x8013 diff --git a/asm/gzip/gzip_inflate_codes.s b/asm/gzip/gzip_inflate_codes.s index 017c4fb8..bb6c0f43 100644 --- a/asm/gzip/gzip_inflate_codes.s +++ b/asm/gzip/gzip_inflate_codes.s @@ -1,4 +1,4 @@ -glabel gzip_inflate_codes +glabel gzip_inflate_codes /* Official name: inflate_codes */ /* 0C7C40 800C7040 27BDFFF0 */ addiu $sp, $sp, -0x10 /* 0C7C44 800C7044 3C0B800F */ lui $t3, %hi(gzip_mask_bits) # $t3, 0x800f /* 0C7C48 800C7048 AFB20008 */ sw $s2, 8($sp) diff --git a/asm/gzip/gzip_inflate_dynamic.s b/asm/gzip/gzip_inflate_dynamic.s index 9d646209..bd2abca5 100644 --- a/asm/gzip/gzip_inflate_dynamic.s +++ b/asm/gzip/gzip_inflate_dynamic.s @@ -1,4 +1,4 @@ -glabel gzip_inflate_dynamic +glabel gzip_inflate_dynamic /* Official name: inflate_dynamic */ /* 0C75C4 800C69C4 27BDFAC0 */ addiu $sp, $sp, -0x540 /* 0C75C8 800C69C8 AFB30028 */ sw $s3, 0x28($sp) /* 0C75CC 800C69CC 3C138013 */ lui $s3, %hi(gzip_num_bits) # $s3, 0x8013 diff --git a/asm/gzip/gzip_inflate_fixed.s b/asm/gzip/gzip_inflate_fixed.s index a23f6294..1a1b4cd2 100644 --- a/asm/gzip/gzip_inflate_fixed.s +++ b/asm/gzip/gzip_inflate_fixed.s @@ -1,4 +1,4 @@ -glabel gzip_inflate_fixed +glabel gzip_inflate_fixed /* Official name: inflate_fixed */ /* 0C79DC 800C6DDC 27BDFAD0 */ addiu $sp, $sp, -0x530 /* 0C79E0 800C6DE0 AFBF001C */ sw $ra, 0x1c($sp) /* 0C79E4 800C6DE4 23AB0044 */ addi $t3, $sp, 0x44 diff --git a/asm/gzip/gzip_inflate_stored.s b/asm/gzip/gzip_inflate_stored.s index 47aca107..38ad522e 100644 --- a/asm/gzip/gzip_inflate_stored.s +++ b/asm/gzip/gzip_inflate_stored.s @@ -1,4 +1,4 @@ -glabel gzip_inflate_stored +glabel gzip_inflate_stored /* Official name: inflate_stored */ /* 0C7B34 800C6F34 3C0D8013 */ lui $t5, %hi(gzip_num_bits) # $t5, 0x8013 /* 0C7B38 800C6F38 8DADAAD4 */ lw $t5, %lo(gzip_num_bits)($t5) /* 0C7B3C 800C6F3C 3C0C8013 */ lui $t4, %hi(gzip_bit_buffer) # $t4, 0x8013 diff --git a/asm/math_util/clear_status_register_flags.s b/asm/math_util/clear_status_register_flags.s index d0296317..05ae352e 100644 --- a/asm/math_util/clear_status_register_flags.s +++ b/asm/math_util/clear_status_register_flags.s @@ -1,4 +1,4 @@ -glabel clear_status_register_flags +glabel clear_status_register_flags /* Official name: disableInterrupts */ /* 070110 8006F510 3C08800E */ lui $t0, %hi(D_800DD430) # $t0, 0x800e /* 070114 8006F514 8108D430 */ lb $t0, %lo(D_800DD430)($t0) /* 070118 8006F518 11000006 */ beqz $t0, .L8006F534 diff --git a/asm/math_util/coss.s b/asm/math_util/coss.s index b3de160e..ae17eebc 100644 --- a/asm/math_util/coss.s +++ b/asm/math_util/coss.s @@ -1,6 +1,6 @@ glabel coss /* 07142C 8007082C 24844000 */ addiu $a0, $a0, 0x4000 -glabel sins +glabel sins /* Official name: mathSinInterp */ /* 071430 80070830 00041440 */ sll $v0, $a0, 0x11 /* 071434 80070834 04430003 */ bgezl $v0, .L80070844 /* 071438 80070838 000450C2 */ srl $t2, $a0, 3 diff --git a/asm/math_util/set_status_register_flags.s b/asm/math_util/set_status_register_flags.s index 4631b581..092d2480 100644 --- a/asm/math_util/set_status_register_flags.s +++ b/asm/math_util/set_status_register_flags.s @@ -1,4 +1,4 @@ -glabel set_status_register_flags +glabel set_status_register_flags /* Official name: enableInterrupts */ /* 07013C 8006F53C 3C08800E */ lui $t0, %hi(D_800DD430) # $t0, 0x800e /* 070140 8006F540 8108D430 */ lb $t0, %lo(D_800DD430)($t0) /* 070144 8006F544 11000005 */ beqz $t0, .L8006F55C # Identical to __osRestoreInt below this line diff --git a/asm/math_util/sins_2.s b/asm/math_util/sins_2.s index eb1128e0..ece436a5 100644 --- a/asm/math_util/sins_2.s +++ b/asm/math_util/sins_2.s @@ -1,6 +1,6 @@ glabel coss_2 /* 07148C 8007088C 24844000 */ addiu $a0, $a0, 0x4000 -glabel sins_2 +glabel sins_2 /* Official name: mathSin */ /* 071490 80070890 00041440 */ sll $v0, $a0, 0x11 /* 071494 80070894 04430003 */ bgezl $v0, .L800708A4 /* 071498 80070898 000450C2 */ srl $t2, $a0, 3 diff --git a/asm/non_matchings/menu/func_800862C4.s b/asm/non_matchings/menu/func_800862C4.s index 07175729..9b083ad4 100644 --- a/asm/non_matchings/menu/func_800862C4.s +++ b/asm/non_matchings/menu/func_800862C4.s @@ -291,7 +291,7 @@ glabel func_800862C4 /* 087308 80086708 24010010 */ li $at, 16 /* 08730C 8008670C 1661FF6E */ bne $s3, $at, .L800864C8 /* 087310 80086710 26B50001 */ addiu $s5, $s5, 1 -/* 087314 80086714 0C01D859 */ jal func_80076164 +/* 087314 80086714 0C01D859 */ jal packDirectoryFree /* 087318 80086718 AFA80138 */ sw $t0, 0x138($sp) /* 08731C 8008671C 8FA80138 */ lw $t0, 0x138($sp) /* 087320 80086720 1000001E */ b .L8008679C diff --git a/asm/non_matchings/menu/func_80087F14.s b/asm/non_matchings/menu/func_80087F14.s index 4bf7fff1..7cb29aae 100644 --- a/asm/non_matchings/menu/func_80087F14.s +++ b/asm/non_matchings/menu/func_80087F14.s @@ -261,7 +261,7 @@ glabel func_80087F14 /* 088EB8 800882B8 25080004 */ addiu $t0, $t0, 4 /* 088EBC 800882BC 14BFFFBE */ bne $a1, $ra, .L800881B8 /* 088EC0 800882C0 A3200000 */ sb $zero, ($t9) -/* 088EC4 800882C4 0C01D859 */ jal func_80076164 +/* 088EC4 800882C4 0C01D859 */ jal packDirectoryFree /* 088EC8 800882C8 AFAA0078 */ sw $t2, 0x78($sp) /* 088ECC 800882CC 8FAE0090 */ lw $t6, 0x90($sp) /* 088ED0 800882D0 3C108012 */ lui $s0, %hi(sCurrentControllerPakFreeSpace) # $s0, 0x8012 diff --git a/asm/non_matchings/menu/func_8008F618.s b/asm/non_matchings/menu/func_8008F618.s index 74917d22..d693b59c 100644 --- a/asm/non_matchings/menu/func_8008F618.s +++ b/asm/non_matchings/menu/func_8008F618.s @@ -14,7 +14,7 @@ glabel func_8008F618 /* 090248 8008F648 AFB1001C */ sw $s1, 0x1c($sp) /* 09024C 8008F64C 00002025 */ move $a0, $zero /* 090250 8008F650 24050001 */ li $a1, 1 -/* 090254 8008F654 0C019A25 */ jal func_80066894 +/* 090254 8008F654 0C019A25 */ jal camDisableUserView /* 090258 8008F658 AFA00058 */ sw $zero, 0x58($sp) /* 09025C 8008F65C 02C02025 */ move $a0, $s6 /* 090260 8008F660 0C01988C */ jal func_80066230 @@ -269,7 +269,7 @@ glabel func_8008F618 .L8008FA14: /* 090614 8008FA14 00002025 */ move $a0, $zero .L8008FA18: -/* 090618 8008FA18 0C019A06 */ jal func_80066818 +/* 090618 8008FA18 0C019A06 */ jal camEnableUserView /* 09061C 8008FA1C 24050001 */ li $a1, 1 /* 090620 8008FA20 00001025 */ move $v0, $zero .L8008FA24: diff --git a/asm/non_matchings/menu/func_8008FF1C.s b/asm/non_matchings/menu/func_8008FF1C.s index 66e02faa..8c6df15a 100644 --- a/asm/non_matchings/menu/func_8008FF1C.s +++ b/asm/non_matchings/menu/func_8008FF1C.s @@ -308,7 +308,7 @@ glabel func_8008FF1C /* 090F94 80090394 1420FF28 */ bnez $at, .L80090038 /* 090F98 80090398 AFAB007C */ sw $t3, 0x7c($sp) /* 090F9C 8009039C 00002025 */ move $a0, $zero -/* 090FA0 800903A0 0C019A25 */ jal func_80066894 +/* 090FA0 800903A0 0C019A25 */ jal camDisableUserView /* 090FA4 800903A4 24050001 */ li $a1, 1 /* 090FA8 800903A8 0C026F57 */ jal func_8009BD5C /* 090FAC 800903AC 00000000 */ nop diff --git a/asm/non_matchings/menu/func_800904E8.s b/asm/non_matchings/menu/func_800904E8.s index c8254dc6..e08df19a 100644 --- a/asm/non_matchings/menu/func_800904E8.s +++ b/asm/non_matchings/menu/func_800904E8.s @@ -275,7 +275,7 @@ glabel func_800904E8 /* 0914F4 800908F4 0C019AEA */ jal copy_viewport_background_size_to_coords /* 0914F8 800908F8 27A7003C */ addiu $a3, $sp, 0x3c /* 0914FC 800908FC 00002025 */ move $a0, $zero -/* 091500 80090900 0C019A06 */ jal func_80066818 +/* 091500 80090900 0C019A06 */ jal camEnableUserView /* 091504 80090904 00002825 */ move $a1, $zero /* 091508 80090908 8FBF001C */ lw $ra, 0x1c($sp) /* 09150C 8009090C 27BD0048 */ addiu $sp, $sp, 0x48 diff --git a/asm/non_matchings/menu/func_80092188.s b/asm/non_matchings/menu/func_80092188.s index dac9faa9..99f265e7 100644 --- a/asm/non_matchings/menu/func_80092188.s +++ b/asm/non_matchings/menu/func_80092188.s @@ -173,7 +173,7 @@ glabel func_80092188 .L800923FC: /* 092FFC 800923FC 00002025 */ move $a0, $zero .L80092400: -/* 093000 80092400 0C019A06 */ jal func_80066818 +/* 093000 80092400 0C019A06 */ jal camEnableUserView /* 093004 80092404 24050001 */ li $a1, 1 /* 093008 80092408 8FB90030 */ lw $t9, 0x30($sp) /* 09300C 8009240C 3C04800E */ lui $a0, %hi(gTrackIdForPreview) # $a0, 0x800e diff --git a/asm/non_matchings/menu/func_80094D28.s b/asm/non_matchings/menu/func_80094D28.s index acd5bfca..95dc60f7 100644 --- a/asm/non_matchings/menu/func_80094D28.s +++ b/asm/non_matchings/menu/func_80094D28.s @@ -26,7 +26,7 @@ glabel func_80094D28 /* 09596C 80094D6C 248463A0 */ addiu $a0, %lo(sMenuCurrDisplayList) # addiu $a0, $a0, 0x63a0 .L80094D70: /* 095970 80094D70 00002025 */ move $a0, $zero -/* 095974 80094D74 0C019A25 */ jal func_80066894 +/* 095974 80094D74 0C019A25 */ jal camDisableUserView /* 095978 80094D78 24050001 */ li $a1, 1 /* 09597C 80094D7C 3C138012 */ lui $s3, %hi(gOptionBlinkTimer) # $s3, 0x8012 /* 095980 80094D80 8E7363BC */ lw $s3, %lo(gOptionBlinkTimer)($s3) @@ -602,7 +602,7 @@ glabel L80095588 /* 0961AC 800955AC 00002025 */ move $a0, $zero /* 0961B0 800955B0 15600016 */ bnez $t3, .L8009560C /* 0961B4 800955B4 8FBF002C */ lw $ra, 0x2c($sp) -/* 0961B8 800955B8 0C019A06 */ jal func_80066818 +/* 0961B8 800955B8 0C019A06 */ jal camEnableUserView /* 0961BC 800955BC 24050001 */ li $a1, 1 /* 0961C0 800955C0 3C0C8000 */ lui $t4, %hi(osTvType) # $t4, 0x8000 /* 0961C4 800955C4 8D8C0300 */ lw $t4, %lo(osTvType)($t4) diff --git a/asm/non_matchings/menu/func_80095728.s b/asm/non_matchings/menu/func_80095728.s index 8653d65d..f76bc229 100644 --- a/asm/non_matchings/menu/func_80095728.s +++ b/asm/non_matchings/menu/func_80095728.s @@ -994,7 +994,7 @@ glabel L800964DC /* 097154 80096554 00000000 */ nop /* 097158 80096558 00002025 */ move $a0, $zero .L8009655C: -/* 09715C 8009655C 0C019A25 */ jal func_80066894 +/* 09715C 8009655C 0C019A25 */ jal camDisableUserView /* 097160 80096560 00002825 */ move $a1, $zero /* 097164 80096564 0C0259E4 */ jal func_80096790 /* 097168 80096568 00000000 */ nop diff --git a/asm/non_matchings/menu/menu_track_select_init.s b/asm/non_matchings/menu/menu_track_select_init.s index 044fcf57..920422e8 100644 --- a/asm/non_matchings/menu/menu_track_select_init.s +++ b/asm/non_matchings/menu/menu_track_select_init.s @@ -325,7 +325,7 @@ glabel menu_track_select_init /* 08F88C 8008EC8C 0C019984 */ jal copy_viewports_to_stack /* 08F890 8008EC90 00000000 */ nop /* 08F894 8008EC94 00002025 */ move $a0, $zero -/* 08F898 8008EC98 0C019A06 */ jal func_80066818 +/* 08F898 8008EC98 0C019A06 */ jal camEnableUserView /* 08F89C 8008EC9C 00002825 */ move $a1, $zero /* 08F8A0 8008ECA0 240A0001 */ li $t2, 1 /* 08F8A4 8008ECA4 3C01800E */ lui $at, %hi(D_800E097C) # $at, 0x800e 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 29d42ed7..50d525b8 100644 --- a/asm/non_matchings/menu/render_track_select_setup_ui.s +++ b/asm/non_matchings/menu/render_track_select_setup_ui.s @@ -46,7 +46,7 @@ glabel render_track_select_setup_ui /* 091BC8 80090FC8 00000000 */ nop /* 091BCC 80090FCC AFA90074 */ sw $t1, 0x74($sp) .L80090FD0: -/* 091BD0 80090FD0 0C019A25 */ jal func_80066894 +/* 091BD0 80090FD0 0C019A25 */ jal camDisableUserView /* 091BD4 80090FD4 24050001 */ li $a1, 1 /* 091BD8 80090FD8 0C026F57 */ jal func_8009BD5C /* 091BDC 80090FDC 00000000 */ nop diff --git a/asm/non_matchings/objects/func_8000F99C.s b/asm/non_matchings/objects/func_8000F99C.s index 4a0a6908..548ac025 100644 --- a/asm/non_matchings/objects/func_8000F99C.s +++ b/asm/non_matchings/objects/func_8000F99C.s @@ -49,7 +49,7 @@ glabel func_8000F99C /* 010648 8000FA48 02002025 */ move $a0, $s0 /* 01064C 8000FA4C 80450055 */ lb $a1, 0x55($v0) /* 010650 8000FA50 80460053 */ lb $a2, 0x53($v0) -/* 010654 8000FA54 0C003D92 */ jal func_8000F648 +/* 010654 8000FA54 0C003D92 */ jal objFreeAssets /* 010658 8000FA58 00000000 */ nop /* 01065C 8000FA5C 8604002C */ lh $a0, 0x2c($s0) /* 010660 8000FA60 0C003211 */ jal func_8000C844 diff --git a/asm/non_matchings/objects/func_8000FD54.s b/asm/non_matchings/objects/func_8000FD54.s index c74c0e37..79aa9ba5 100644 --- a/asm/non_matchings/objects/func_8000FD54.s +++ b/asm/non_matchings/objects/func_8000FD54.s @@ -150,7 +150,7 @@ glabel func_8000FD54 /* 010B68 8000FF68 02401025 */ move $v0, $s2 /* 010B6C 8000FF6C 8FA60034 */ lw $a2, 0x34($sp) /* 010B70 8000FF70 02402025 */ move $a0, $s2 -/* 010B74 8000FF74 0C003D92 */ jal func_8000F648 +/* 010B74 8000FF74 0C003D92 */ jal objFreeAssets /* 010B78 8000FF78 02802825 */ move $a1, $s4 /* 010B7C 8000FF7C 8FA40038 */ lw $a0, 0x38($sp) /* 010B80 8000FF80 0C003211 */ jal func_8000C844 diff --git a/asm/non_matchings/objects/func_80010994.s b/asm/non_matchings/objects/func_80010994.s index 6f6dbe9c..d7bac426 100644 --- a/asm/non_matchings/objects/func_80010994.s +++ b/asm/non_matchings/objects/func_80010994.s @@ -364,7 +364,7 @@ glabel func_80010994 /* 011AC0 80010EC0 1420FFEF */ bnez $at, .L80010E80 /* 011AC4 80010EC4 00000000 */ nop .L80010EC8: -/* 011AC8 80010EC8 0C00C8E6 */ jal func_80032398 +/* 011AC8 80010EC8 0C00C8E6 */ jal lightUpdateLights /* 011ACC 80010ECC 02802025 */ move $a0, $s4 /* 011AD0 80010ED0 0C00CB1B */ jal func_80032C6C /* 011AD4 80010ED4 00000000 */ nop diff --git a/asm/non_matchings/objects/func_800135B8.s b/asm/non_matchings/objects/func_800135B8.s index a4706808..d1ea96a6 100644 --- a/asm/non_matchings/objects/func_800135B8.s +++ b/asm/non_matchings/objects/func_800135B8.s @@ -55,7 +55,7 @@ glabel func_800135B8 /* 014270 80013670 8FB80078 */ lw $t8, 0x78($sp) /* 014274 80013674 00000000 */ nop /* 014278 80013678 8F040078 */ lw $a0, 0x78($t8) -/* 01427C 8001367C 0C004BCC */ jal func_80012F30 +/* 01427C 8001367C 0C004BCC */ jal objUndoPlayerTumble /* 014280 80013680 00000000 */ nop /* 014284 80013684 8FA30050 */ lw $v1, 0x50($sp) /* 014288 80013688 00000000 */ nop diff --git a/asm/non_matchings/objects/func_8001A8F4.s b/asm/non_matchings/objects/func_8001A8F4.s index 06f5f624..e6d8e169 100644 --- a/asm/non_matchings/objects/func_8001A8F4.s +++ b/asm/non_matchings/objects/func_8001A8F4.s @@ -339,7 +339,7 @@ glabel func_8001A8F4 /* 01B9E0 8001ADE0 00000000 */ nop /* 01B9E4 8001ADE4 12000013 */ beqz $s0, .L8001AE34 /* 01B9E8 8001ADE8 8FBF001C */ lw $ra, 0x1c($sp) -/* 01B9EC 8001ADEC 0C030063 */ jal func_800C018C +/* 01B9EC 8001ADEC 0C030063 */ jal fxFadeOn /* 01B9F0 8001ADF0 00000000 */ nop /* 01B9F4 8001ADF4 1440000F */ bnez $v0, .L8001AE34 /* 01B9F8 8001ADF8 8FBF001C */ lw $ra, 0x1c($sp) diff --git a/asm/non_matchings/objects/func_8001F460.s b/asm/non_matchings/objects/func_8001F460.s index bc52409f..be798d31 100644 --- a/asm/non_matchings/objects/func_8001F460.s +++ b/asm/non_matchings/objects/func_8001F460.s @@ -357,7 +357,7 @@ glabel func_8001F460 /* 020548 8001F948 00580019 */ multu $v0, $t8 /* 02054C 8001F94C 0000C812 */ mflo $t9 /* 020550 8001F950 A7B900A8 */ sh $t9, 0xa8($sp) -/* 020554 8001F954 0C030063 */ jal func_800C018C +/* 020554 8001F954 0C030063 */ jal fxFadeOn /* 020558 8001F958 00000000 */ nop /* 02055C 8001F95C 10400006 */ beqz $v0, .L8001F978 /* 020560 8001F960 00000000 */ nop diff --git a/asm/non_matchings/objects/render_3d_model.s b/asm/non_matchings/objects/render_3d_model.s index 3997a0ab..3e3ce85b 100644 --- a/asm/non_matchings/objects/render_3d_model.s +++ b/asm/non_matchings/objects/render_3d_model.s @@ -192,7 +192,7 @@ glabel render_3d_model /* 012F8C 8001238C E7A80010 */ swc1 $f8, 0x10($sp) /* 012F90 80012390 12600014 */ beqz $s3, .L800123E4 /* 012F94 80012394 AFA000B0 */ sw $zero, 0xb0($sp) -/* 012F98 80012398 0C004BCC */ jal func_80012F30 +/* 012F98 80012398 0C004BCC */ jal objUndoPlayerTumble /* 012F9C 8001239C 02402025 */ move $a0, $s2 /* 012FA0 800123A0 8258003B */ lb $t8, 0x3b($s2) /* 012FA4 800123A4 02202025 */ move $a0, $s1 diff --git a/asm/non_matchings/objects/spawn_object.s b/asm/non_matchings/objects/spawn_object.s index 6adf67b6..f32b9f34 100644 --- a/asm/non_matchings/objects/spawn_object.s +++ b/asm/non_matchings/objects/spawn_object.s @@ -456,7 +456,7 @@ glabel L8000EDE0 /* 00FCC4 8000F0C4 10600009 */ beqz $v1, .L8000F0EC /* 00FCC8 8000F0C8 02402025 */ move $a0, $s2 /* 00FCCC 8000F0CC 8FA60064 */ lw $a2, 0x64($sp) -/* 00FCD0 8000F0D0 0C003D92 */ jal func_8000F648 +/* 00FCD0 8000F0D0 0C003D92 */ jal objFreeAssets /* 00FCD4 8000F0D4 02602825 */ move $a1, $s3 /* 00FCD8 8000F0D8 87A4004E */ lh $a0, 0x4e($sp) /* 00FCDC 8000F0DC 0C003211 */ jal func_8000C844 @@ -501,7 +501,7 @@ glabel L8000EDE0 /* 00FD70 8000F170 00C23021 */ addu $a2, $a2, $v0 /* 00FD74 8000F174 8FA60064 */ lw $a2, 0x64($sp) /* 00FD78 8000F178 02402025 */ move $a0, $s2 -/* 00FD7C 8000F17C 0C003D92 */ jal func_8000F648 +/* 00FD7C 8000F17C 0C003D92 */ jal objFreeAssets /* 00FD80 8000F180 02602825 */ move $a1, $s3 /* 00FD84 8000F184 87A4004E */ lh $a0, 0x4e($sp) /* 00FD88 8000F188 0C003211 */ jal func_8000C844 @@ -529,7 +529,7 @@ glabel L8000EDE0 /* 00FDDC 8000F1DC 8FA60064 */ lw $a2, 0x64($sp) .L8000F1E0: /* 00FDE0 8000F1E0 02402025 */ move $a0, $s2 -/* 00FDE4 8000F1E4 0C003D92 */ jal func_8000F648 +/* 00FDE4 8000F1E4 0C003D92 */ jal objFreeAssets /* 00FDE8 8000F1E8 02602825 */ move $a1, $s3 /* 00FDEC 8000F1EC 87A4004E */ lh $a0, 0x4e($sp) /* 00FDF0 8000F1F0 0C003211 */ jal func_8000C844 @@ -616,7 +616,7 @@ glabel L8000EDE0 /* 00FF18 8000F318 8FA60064 */ lw $a2, 0x64($sp) .L8000F31C: /* 00FF1C 8000F31C 02002025 */ move $a0, $s0 -/* 00FF20 8000F320 0C003D92 */ jal func_8000F648 +/* 00FF20 8000F320 0C003D92 */ jal objFreeAssets /* 00FF24 8000F324 02602825 */ move $a1, $s3 /* 00FF28 8000F328 87A4004E */ lh $a0, 0x4e($sp) /* 00FF2C 8000F32C 0C003211 */ jal func_8000C844 @@ -799,7 +799,7 @@ glabel L8000EDE0 /* 0101B0 8000F5B0 8FA60064 */ lw $a2, 0x64($sp) .L8000F5B4: /* 0101B4 8000F5B4 02402025 */ move $a0, $s2 -/* 0101B8 8000F5B8 0C003D92 */ jal func_8000F648 +/* 0101B8 8000F5B8 0C003D92 */ jal objFreeAssets /* 0101BC 8000F5BC 02602825 */ move $a1, $s3 /* 0101C0 8000F5C0 87A4004E */ lh $a0, 0x4e($sp) /* 0101C4 8000F5C4 0C003211 */ jal func_8000C844 @@ -822,7 +822,7 @@ glabel L8000EDE0 /* 010200 8000F600 00000000 */ nop /* 010204 8000F604 19C00003 */ blez $t6, .L8000F614 /* 010208 8000F608 00000000 */ nop -/* 01020C 8000F60C 0C003DD6 */ jal func_8000F758 +/* 01020C 8000F60C 0C003DD6 */ jal lightSetupLightSources /* 010210 8000F610 02402025 */ move $a0, $s2 .L8000F614: /* 010214 8000F614 0C01867D */ jal func_800619F4 diff --git a/asm/non_matchings/particles/func_800AF714.s b/asm/non_matchings/particles/func_800AF714.s index e3295518..4324213a 100644 --- a/asm/non_matchings/particles/func_800AF714.s +++ b/asm/non_matchings/particles/func_800AF714.s @@ -347,7 +347,7 @@ glabel func_800AF714 /* 0B07FC 800AFBFC 1420FEE0 */ bnez $at, .L800AF780 /* 0B0800 800AFC00 01A0B825 */ move $s7, $t5 .L800AFC04: -/* 0B0804 800AFC04 0C004BCC */ jal func_80012F30 +/* 0B0804 800AFC04 0C004BCC */ jal objUndoPlayerTumble /* 0B0808 800AFC08 02402025 */ move $a0, $s2 /* 0B080C 800AFC0C 8FBF003C */ lw $ra, 0x3c($sp) /* 0B0810 800AFC10 8FB00018 */ lw $s0, 0x18($sp) diff --git a/asm/non_matchings/printf/func_800B4940.s b/asm/non_matchings/printf/_itoa.s similarity index 96% rename from asm/non_matchings/printf/func_800B4940.s rename to asm/non_matchings/printf/_itoa.s index 4227afa4..622dec86 100644 --- a/asm/non_matchings/printf/func_800B4940.s +++ b/asm/non_matchings/printf/_itoa.s @@ -1,4 +1,4 @@ -glabel func_800B4940 +glabel _itoa /* 0B5540 800B4940 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 0B5544 800B4944 8FAE0048 */ lw $t6, 0x48($sp) /* 0B5548 800B4948 AFBF001C */ sw $ra, 0x1c($sp) @@ -34,14 +34,14 @@ glabel func_800B4940 /* 0B55AC 800B49AC 2610FFFF */ addiu $s0, $s0, -1 /* 0B55B0 800B49B0 00715021 */ addu $t2, $v1, $s1 /* 0B55B4 800B49B4 914B0000 */ lbu $t3, ($t2) -/* 0B55B8 800B49B8 00000000 */ nop +/* 0B55B8 800B49B8 00000000 */ nop /* 0B55BC 800B49BC A20B0000 */ sb $t3, ($s0) /* 0B55C0 800B49C0 8FA70024 */ lw $a3, 0x24($sp) /* 0B55C4 800B49C4 8FA60020 */ lw $a2, 0x20($sp) /* 0B55C8 800B49C8 8FA5003C */ lw $a1, 0x3c($sp) /* 0B55CC 800B49CC 8FA40038 */ lw $a0, 0x38($sp) /* 0B55D0 800B49D0 0C033AB2 */ jal __ull_div -/* 0B55D4 800B49D4 00000000 */ nop +/* 0B55D4 800B49D4 00000000 */ nop /* 0B55D8 800B49D8 AFA20038 */ sw $v0, 0x38($sp) /* 0B55DC 800B49DC AFA3003C */ sw $v1, 0x3c($sp) /* 0B55E0 800B49E0 1440FFED */ bnez $v0, .L800B4998 diff --git a/asm/non_matchings/printf/render_printf.s b/asm/non_matchings/printf/render_printf.s index f8e34e5f..6580cb4f 100644 --- a/asm/non_matchings/printf/render_printf.s +++ b/asm/non_matchings/printf/render_printf.s @@ -1,4 +1,4 @@ -glabel render_printf +glabel render_printf /* official name: diPrintf */ /* 0B6ADC 800B5EDC 3C0E8013 */ lui $t6, %hi(gDebugPrintBufferEnd) # $t6, 0x8013 /* 0B6AE0 800B5EE0 8DCE85D8 */ lw $t6, %lo(gDebugPrintBufferEnd)($t6) /* 0B6AE4 800B5EE4 27BDFFE0 */ addiu $sp, $sp, -0x20 diff --git a/asm/non_matchings/printf/sprintf.s b/asm/non_matchings/printf/sprintf.s index daa4f703..d3621371 100644 --- a/asm/non_matchings/printf/sprintf.s +++ b/asm/non_matchings/printf/sprintf.s @@ -4,7 +4,7 @@ glabel jpt_800E8CAC glabel jpt_800E8CF0 .word L800B4DB0, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DB8, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4D90, L800B4DC4, L800B4DC4, L800B4DC4, L800B4D98, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC4, L800B4DC0 glabel jpt_800E8D88 -.word L800B52C4, L800B5E0C, L800B5794, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B4F84, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5AC4, L800B4E38, L800B52C4, L800B57A4, L800B5794, L800B5E0C, L800B4E38, L800B5E0C, L800B5E0C, L800B5E0C, L800B5E0C, L800B5D78, L800B4F64, L800B5C8C, L800B5E0C, L800B5E0C, L800B5B48, L800B5E0C, L800B4F44, L800B5E0C, L800B5E0C, L800B4FA4 +.word L800B52C4, amGetSfxCount, L800B5794, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, L800B4F84, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, L800B5AC4, L800B4E38, L800B52C4, L800B57A4, L800B5794, amGetSfxCount, L800B4E38, amGetSfxCount, amGetSfxCount, amGetSfxCount, amGetSfxCount, L800B5D78, L800B4F64, L800B5C8C, amGetSfxCount, amGetSfxCount, L800B5B48, amGetSfxCount, L800B4F44, amGetSfxCount, amGetSfxCount, L800B4FA4 .text glabel sprintf @@ -288,7 +288,7 @@ glabel L800B4DC4 /* 0B5A08 800B4E08 266EFFBB */ addiu $t6, $s3, -0x45 /* 0B5A0C 800B4E0C 2DC10034 */ sltiu $at, $t6, 0x34 /* 0B5A10 800B4E10 256B0001 */ addiu $t3, $t3, 1 -/* 0B5A14 800B4E14 102003FD */ beqz $at, .L800B5E0C +/* 0B5A14 800B4E14 102003FD */ beqz $at, .amGetSfxCount /* 0B5A18 800B4E18 A3B3019A */ sb $s3, 0x19a($sp) /* 0B5A1C 800B4E1C 000E7080 */ sll $t6, $t6, 2 /* 0B5A20 800B4E20 3C01800F */ lui $at, %hi(jpt_800E8D88) # $at, 0x800f @@ -477,7 +477,7 @@ glabel L800B4FA4 /* 0B5CAC 800B50AC AFAB01B4 */ sw $t3, 0x1b4($sp) /* 0B5CB0 800B50B0 A3AC01A4 */ sb $t4, 0x1a4($sp) /* 0B5CB4 800B50B4 E7B100E0 */ swc1 $f17, 0xe0($sp) -/* 0B5CB8 800B50B8 0C02D250 */ jal func_800B4940 +/* 0B5CB8 800B50B8 0C02D250 */ jal _itoa /* 0B5CBC 800B50BC E7B000E4 */ swc1 $f16, 0xe4($sp) /* 0B5CC0 800B50C0 27AE017B */ addiu $t6, $sp, 0x17b /* 0B5CC4 800B50C4 8FA801A0 */ lw $t0, 0x1a0($sp) @@ -1460,8 +1460,8 @@ glabel L800B5D78 /* 0B6A00 800B5E00 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B6A04 800B5E04 10000004 */ b .L800B5E18 /* 0B6A08 800B5E08 00000000 */ nop -.L800B5E0C: -glabel L800B5E0C +.amGetSfxCount: +glabel amGetSfxCount /* 0B6A0C 800B5E0C 3C03800E */ lui $v1, %hi(D_800E2EF0) # $v1, 0x800e /* 0B6A10 800B5E10 8C632EF0 */ lw $v1, %lo(D_800E2EF0)($v1) /* 0B6A14 800B5E14 00000000 */ nop diff --git a/asm/non_matchings/racer/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s index 08a27b36..7a6936f7 100644 --- a/asm/non_matchings/racer/func_800452A0.s +++ b/asm/non_matchings/racer/func_800452A0.s @@ -333,7 +333,7 @@ glabel L800456DC /* 0462F4 800456F4 3C01800E */ lui $at, %hi(D_800E6378) # $at, 0x800e /* 0462F8 800456F8 C4386378 */ lwc1 $f24, %lo(D_800E6378)($at) /* 0462FC 800456FC 27A50090 */ addiu $a1, $sp, 0x90 -/* 046300 80045700 0C003A62 */ jal func_8000E988 +/* 046300 80045700 0C003A62 */ jal objGetObjList /* 046304 80045704 0000F025 */ move $fp, $zero /* 046308 80045708 8FA80090 */ lw $t0, 0x90($sp) /* 04630C 8004570C 0040A025 */ move $s4, $v0 diff --git a/asm/non_matchings/textures_sprites/func_8007AC70.s b/asm/non_matchings/textures_sprites/texInitTextures.s similarity index 99% rename from asm/non_matchings/textures_sprites/func_8007AC70.s rename to asm/non_matchings/textures_sprites/texInitTextures.s index ee41aa14..d36cc6ba 100644 --- a/asm/non_matchings/textures_sprites/func_8007AC70.s +++ b/asm/non_matchings/textures_sprites/texInitTextures.s @@ -1,4 +1,4 @@ -glabel func_8007AC70 +glabel texInitTextures /* 07B870 8007AC70 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 07B874 8007AC74 AFBF0014 */ sw $ra, 0x14($sp) /* 07B878 8007AC78 3C05FF00 */ lui $a1, (0xFF00FFFF >> 16) # lui $a1, 0xff00 diff --git a/asm/non_matchings/unknown_0255E0/func_800278E8.s b/asm/non_matchings/unknown_0255E0/func_800278E8.s index d54604d7..91d8e9d2 100644 --- a/asm/non_matchings/unknown_0255E0/func_800278E8.s +++ b/asm/non_matchings/unknown_0255E0/func_800278E8.s @@ -75,7 +75,7 @@ glabel func_800278E8 /* 0285F0 800279F0 00000000 */ nop .L800279F4: /* 0285F4 800279F4 822401FD */ lb $a0, 0x1fd($s1) -/* 0285F8 800279F8 0C006F65 */ jal func_8001BD94 +/* 0285F8 800279F8 0C006F65 */ jal objGetObject /* 0285FC 800279FC AFA50054 */ sw $a1, 0x54($sp) /* 028600 80027A00 3C0F8012 */ lui $t7, %hi(D_8011B104) # $t7, 0x8012 /* 028604 80027A04 8DEFB104 */ lw $t7, %lo(D_8011B104)($t7) diff --git a/asm/non_matchings/unknown_05CEF0/func_8005CB68.s b/asm/non_matchings/unknown_05CEF0/func_8005CB68.s index c67db604..53c73200 100644 --- a/asm/non_matchings/unknown_05CEF0/func_8005CB68.s +++ b/asm/non_matchings/unknown_05CEF0/func_8005CB68.s @@ -191,7 +191,7 @@ glabel func_8005CB68 /* 05DA28 8005CE28 00000000 */ nop /* 05DA2C 8005CE2C 0C01BC50 */ jal func_8006F140 /* 05DA30 8005CE30 24040004 */ li $a0, 4 -/* 05DA34 8005CE34 0C00384A */ jal func_8000E128 +/* 05DA34 8005CE34 0C00384A */ jal instShowBearBar /* 05DA38 8005CE38 00000000 */ nop /* 05DA3C 8005CE3C 1000000A */ b .L8005CE68 /* 05DA40 8005CE40 83AE0043 */ lb $t6, 0x43($sp) @@ -303,7 +303,7 @@ glabel func_8005CB68 .L8005CFC8: /* 05DBC8 8005CFC8 0C01BC50 */ jal func_8006F140 /* 05DBCC 8005CFCC 24040004 */ li $a0, 4 -/* 05DBD0 8005CFD0 0C00384A */ jal func_8000E128 +/* 05DBD0 8005CFD0 0C00384A */ jal instShowBearBar /* 05DBD4 8005CFD4 00000000 */ nop /* 05DBD8 8005CFD8 1000000D */ b .L8005D010 /* 05DBDC 8005CFDC 83AE0043 */ lb $t6, 0x43($sp) diff --git a/include/libc/math.h b/include/libc/math.h index 8cea459b..1586b056 100644 --- a/include/libc/math.h +++ b/include/libc/math.h @@ -3,7 +3,7 @@ #define M_PI 3.14159265358979323846 -float sinf(float); +float sinf(float); //official name: fsin double sin(double); float cosf(float); double cos(double); diff --git a/lib/asm/bcopy.s b/lib/asm/bcopy.s index 0ede373b..9eec765e 100644 --- a/lib/asm/bcopy.s +++ b/lib/asm/bcopy.s @@ -7,7 +7,7 @@ .set noreorder # dont insert nops after branches .set gp=64 # 64-bit instructions are used -glabel bcopy +glabel bcopy /* Official name: _bcopy */ /* 0CA9A0 800C9DA0 10C0001A */ beqz $a2, .L800C9E0C /* 0CA9A4 800C9DA4 00A03825 */ move $a3, $a1 /* 0CA9A8 800C9DA8 10850018 */ beq $a0, $a1, .L800C9E0C diff --git a/lib/asm/bzero.s b/lib/asm/bzero.s index 81481b1a..863d1e19 100644 --- a/lib/asm/bzero.s +++ b/lib/asm/bzero.s @@ -7,7 +7,7 @@ .set noreorder # dont insert nops after branches .set gp=64 # 64-bit instructions are used -glabel bzero +glabel bzero /* Official name: _blkclr */ /* 0D10E0 800D04E0 28A1000C */ slti $at, $a1, 0xc /* 0D10E4 800D04E4 1420001D */ bnez $at, .L800D055C /* 0D10E8 800D04E8 00041823 */ negu $v1, $a0 diff --git a/lib/asm/non_matchings/unknown_0CEC50/func_800CE050.s b/lib/asm/non_matchings/unknown_0CEC50/_bcmp.s similarity index 93% rename from lib/asm/non_matchings/unknown_0CEC50/func_800CE050.s rename to lib/asm/non_matchings/unknown_0CEC50/_bcmp.s index c1067da1..35b20eec 100644 --- a/lib/asm/non_matchings/unknown_0CEC50/func_800CE050.s +++ b/lib/asm/non_matchings/unknown_0CEC50/_bcmp.s @@ -1,4 +1,4 @@ -glabel func_800CE050 +glabel _bcmp /* 0CEC50 800CE050 28C10010 */ slti $at, $a2, 0x10 /* 0CEC54 800CE054 14200037 */ bnez $at, .L800CE134 /* 0CEC58 800CE058 00851026 */ xor $v0, $a0, $a1 @@ -26,11 +26,11 @@ glabel func_800CE050 /* 0CECA8 800CE0A8 24840004 */ addiu $a0, $a0, 4 /* 0CECAC 800CE0AC 24A50004 */ addiu $a1, $a1, 4 /* 0CECB0 800CE0B0 1443002C */ bne $v0, $v1, .L800CE164 -/* 0CECB4 800CE0B4 00000000 */ nop +/* 0CECB4 800CE0B4 00000000 */ nop /* 0CECB8 800CE0B8 5487FFFA */ bnel $a0, $a3, .L800CE0A4 /* 0CECBC 800CE0BC 8C820000 */ lw $v0, ($a0) /* 0CECC0 800CE0C0 1000001C */ b .L800CE134 -/* 0CECC4 800CE0C4 00000000 */ nop +/* 0CECC4 800CE0C4 00000000 */ nop .L800CE0C8: /* 0CECC8 800CE0C8 00053823 */ negu $a3, $a1 /* 0CECCC 800CE0CC 30E70003 */ andi $a3, $a3, 3 @@ -43,7 +43,7 @@ glabel func_800CE050 /* 0CECE4 800CE0E4 24840001 */ addiu $a0, $a0, 1 /* 0CECE8 800CE0E8 24A50001 */ addiu $a1, $a1, 1 /* 0CECEC 800CE0EC 1443001D */ bne $v0, $v1, .L800CE164 -/* 0CECF0 800CE0F0 00000000 */ nop +/* 0CECF0 800CE0F0 00000000 */ nop /* 0CECF4 800CE0F4 5487FFFA */ bnel $a0, $a3, .L800CE0E0 /* 0CECF8 800CE0F8 90820000 */ lbu $v0, ($a0) .L800CE0FC: @@ -59,7 +59,7 @@ glabel func_800CE050 /* 0CED1C 800CE11C 24840004 */ addiu $a0, $a0, 4 /* 0CED20 800CE120 24A50004 */ addiu $a1, $a1, 4 /* 0CED24 800CE124 1443000F */ bne $v0, $v1, .L800CE164 -/* 0CED28 800CE128 00000000 */ nop +/* 0CED28 800CE128 00000000 */ nop /* 0CED2C 800CE12C 5487FFF9 */ bnel $a0, $a3, .L800CE114 /* 0CED30 800CE130 88820000 */ lwl $v0, ($a0) .L800CE134: @@ -71,7 +71,7 @@ glabel func_800CE050 /* 0CED44 800CE144 24840001 */ addiu $a0, $a0, 1 /* 0CED48 800CE148 24A50001 */ addiu $a1, $a1, 1 /* 0CED4C 800CE14C 14430005 */ bne $v0, $v1, .L800CE164 -/* 0CED50 800CE150 00000000 */ nop +/* 0CED50 800CE150 00000000 */ nop /* 0CED54 800CE154 5487FFFA */ bnel $a0, $a3, .L800CE140 /* 0CED58 800CE158 90820000 */ lbu $v0, ($a0) .L800CE15C: @@ -82,5 +82,5 @@ glabel func_800CE050 /* 0CED64 800CE164 03E00008 */ jr $ra /* 0CED68 800CE168 24020001 */ li $v0, 1 -/* 0CED6C 800CE16C 00000000 */ nop +/* 0CED6C 800CE16C 00000000 */ nop diff --git a/lib/src/libc/rmonPrintf.c b/lib/src/libc/rmonPrintf.c index 6c23cd91..39f898fc 100644 --- a/lib/src/libc/rmonPrintf.c +++ b/lib/src/libc/rmonPrintf.c @@ -18,6 +18,7 @@ static char *is_proutSyncPrintf(UNUSED char *str, UNUSED const char *buf, UNUSED * Like sprintf, but simpler. It just hardcodes NULL for the dst, * and calls a function that just hardcodes a fake pointer. * Could still be an earlier version of osSyncPrintf + * Official name: osSyncPrintf */ void rmonPrintf(const char *format, ...) { va_list args; diff --git a/lib/src/os/osMotor.c b/lib/src/os/osMotor.c index 3a9ca083..b21e8c59 100644 --- a/lib/src/os/osMotor.c +++ b/lib/src/os/osMotor.c @@ -14,6 +14,7 @@ OSPifRam _MotorStopData[MAXCONTROLLERS]; OSPifRam _MotorStartData[MAXCONTROLLERS]; u8 _motorstopbuf[BLOCKSIZE]; u8 _motorstartbuf[BLOCKSIZE]; +/* Official name: nosMotorStop */ s32 osMotorStop(OSPfs *pfs) { int i; s32 ret; @@ -97,6 +98,7 @@ static void _MakeMotorData(int channel, u16 address, u8 *buffer, OSPifRam *mdata ptr[0] = CONT_CMD_END; } +/* Official name: nosMotorInit */ s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int channel) { int i; s32 ret; diff --git a/src/asset_loading.c b/src/asset_loading.c index a4c0da91..34cc2e47 100644 --- a/src/asset_loading.c +++ b/src/asset_loading.c @@ -63,6 +63,7 @@ u32 *load_asset_section_from_rom(u32 assetIndex) { /** * Loads a gzip compressed asset from the ROM file. * Returns a pointer to the decompressed data. + * Official name: piRomLoadCompressed */ UNUSED u8 *load_compressed_asset_from_rom(u32 assetIndex, s32 extraMemory) { s32 size; @@ -115,6 +116,7 @@ UNUSED s32 load_asset_section_from_rom_to_address(u32 assetIndex, u32 address) { /** * Loads part of an asset section to a specific memory address. * Returns the size argument. + * Official name: piRomLoadSection */ s32 load_asset_to_address(u32 assetIndex, u32 address, s32 assetOffset, s32 size) { u32 *index; @@ -133,6 +135,7 @@ s32 load_asset_to_address(u32 assetIndex, u32 address, s32 assetOffset, s32 size /** * Returns a rom offset of an asset given its asset section and a local offset. + * Official name: piRomGetSectionPtr */ u8 *get_rom_offset_of_asset(u32 assetIndex, u32 assetOffset) { u32 *index; @@ -150,6 +153,7 @@ u8 *get_rom_offset_of_asset(u32 assetIndex, u32 assetOffset) { /** * Returns the size of an asset section. + * Official name: piRomGetFileSize */ s32 get_size_of_asset_section(u32 assetIndex) { u32 *index; @@ -167,6 +171,7 @@ s32 get_size_of_asset_section(u32 assetIndex) { /** * Copies data from the game cartridge to a ram address. + * Official name: romCopy */ void dmacopy(u32 romOffset, u32 ramAddress, s32 numBytes) { OSMesg dmaMesg; diff --git a/src/audio.c b/src/audio.c index c6c914b7..b5b1a97e 100644 --- a/src/audio.c +++ b/src/audio.c @@ -736,7 +736,7 @@ UNUSED void func_8000208C(void *sndState, u8 arg1) { } } -UNUSED void func_800020BC(void *sndState, u32 arg1) { +UNUSED void amSndSetPitchDirect(void *sndState, u32 arg1) { u32 *temp = &arg1; if (sndState != NULL) { func_800049F8((s32) sndState, 16, *temp); diff --git a/src/camera.c b/src/camera.c index bea72a16..b37ebac7 100644 --- a/src/camera.c +++ b/src/camera.c @@ -459,7 +459,7 @@ void copy_viewports_to_stack(void) { } } -void func_80066818(s32 viewPortIndex, s32 arg1) { +void camEnableUserView(s32 viewPortIndex, s32 arg1) { if (arg1 != 0) { gScreenViewports[viewPortIndex].flags |= VIEWPORT_EXTRA_BG; } else { @@ -468,7 +468,7 @@ void func_80066818(s32 viewPortIndex, s32 arg1) { gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_UNK_04; } -void func_80066894(s32 viewPortIndex, s32 arg1) { +void camDisableUserView(s32 viewPortIndex, s32 arg1) { if (arg1 != 0) { gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_EXTRA_BG; } else { @@ -480,6 +480,7 @@ void func_80066894(s32 viewPortIndex, s32 arg1) { /** * Return's the current viewport's flag status for extended backgrounds. * Required to draw some extra things used in menus. + * Official name: camIsUserView */ s32 check_viewport_background_flag(s32 viewPortIndex) { return gScreenViewports[viewPortIndex].flags & VIEWPORT_EXTRA_BG; @@ -543,6 +544,7 @@ void resize_viewport(s32 viewPortIndex, s32 x1, s32 y1, s32 x2, s32 y2) { /** * Set the selected viewport's coordinate offsets and view size. * If you pass VIEWPORT_AUTO through, then the property will be automatically set when the game creates the viewports. + * Official name: camSetUserViewSpecial */ void set_viewport_properties(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s32 height) { if (posX != VIEWPORT_AUTO) { @@ -576,6 +578,7 @@ void set_viewport_properties(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s /** * Sets the passed values to be equal to the selected viewports scissor size, before drawing the background elements. * Usually, this is the same size as the viewport's size. + * Official name: camGetVisibleUserView */ s32 copy_viewport_background_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2) { //gDPFillRectangle values @@ -591,6 +594,7 @@ s32 copy_viewport_background_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, /** * Sets the passed values to the coordinate size of the passed viewport. + * Official name: camGetUserView */ void copy_viewport_frame_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2) { *x1 = gScreenViewports[viewPortIndex].x1; @@ -1410,6 +1414,7 @@ GLOBAL_ASM("asm/non_matchings/camera/func_8006A1C4.s") /** * Set the first 4 player ID's to the controller numbers, so players can input in the menus after boot. + * Official name: joyResetMap */ void initialise_player_ids(void) { s32 i; @@ -1421,6 +1426,7 @@ void initialise_player_ids(void) { /** * Assign the first four player ID's to the index of the connected players. * Assign the next four player ID's to the index of the players who are not connected. + * Official name: joyCreateMap */ void assign_player_ids(s8 *activePlayers) { s32 i; @@ -1439,6 +1445,7 @@ void assign_player_ids(s8 *activePlayers) { /** * Returns the id of the selected index. + * Official name: joyGetController */ u8 get_player_id(s32 player) { return sPlayerID[player]; @@ -1456,6 +1463,7 @@ void swap_player_1_and_2_ids(void) { /** * Returns the buttons that are currently pressed down on the controller. + * Official name: joyGetButtons */ u16 get_buttons_held_from_player(s32 player) { return sControllerData[sPlayerID[player]].button; diff --git a/src/camera.h b/src/camera.h index f60649b4..1df7cf4d 100644 --- a/src/camera.h +++ b/src/camera.h @@ -44,7 +44,7 @@ enum ViewportCount { }; enum ViewPortFlags { - VIEWPORT_EXTRA_BG = 0x0001, + VIEWPORT_EXTRA_BG = 0x0001, //official name (guessed): VIEWPORT_IS_USER_VIEW VIEWPORT_UNK_02 = 0x0002, VIEWPORT_UNK_04 = 0x0004, VIEWPORT_X_CUSTOM = 0x0008, @@ -96,8 +96,8 @@ void disable_cutscene_camera(void); s8 check_if_showing_cutscene_camera(void); s32 set_active_viewports_and_max(s32 arg0); void set_active_camera(s32 arg0); -void func_80066818(s32 viewPortIndex, s32 arg1); -void func_80066894(s32 viewPortIndex, s32 arg1); +void camEnableUserView(s32 viewPortIndex, s32 arg1); +void camDisableUserView(s32 viewPortIndex, s32 arg1); s32 check_viewport_background_flag(s32 viewPortIndex); void resize_viewport(s32 viewPortIndex, s32 x1, s32 y1, s32 x2, s32 y2); void set_viewport_properties(s32 viewPortIndex, s32 x1, s32 x2, s32 y1, s32 y2); diff --git a/src/fade_transition.c b/src/fade_transition.c index 33e3f1da..88a90f2d 100644 --- a/src/fade_transition.c +++ b/src/fade_transition.c @@ -226,7 +226,7 @@ void disable_new_screen_transitions(void) { } //@bug: This doesn't seem to guarantee a return. -u32 func_800C018C(void) { +u32 fxFadeOn(void) { u32 isActive = sTransitionFadeTimer != 0; if (isActive == FALSE) { isActive = sTransitionFlags != 0; diff --git a/src/fade_transition.h b/src/fade_transition.h index 676c2df1..eacca4b6 100644 --- a/src/fade_transition.h +++ b/src/fade_transition.h @@ -38,7 +38,7 @@ extern u32 osTvType; void enable_new_screen_transitions(void); void disable_new_screen_transitions(void); -u32 func_800C018C(void); +u32 fxFadeOn(void); void transition_end(void); s32 handle_transitions(s32 updateRate); void render_fade_transition(Gfx **dList, MatrixS **mats, Vertex **verts); diff --git a/src/game.c b/src/game.c index 97f7d428..6138f4d7 100644 --- a/src/game.c +++ b/src/game.c @@ -641,7 +641,7 @@ void load_level(s32 levelId, s32 numberOfPlayers, s32 entranceId, Vehicle vehicl settings->courseId = levelId; if (gCurrentLevelHeader->weatherEnable > 0) { func_800AB4A8(gCurrentLevelHeader->weatherType, gCurrentLevelHeader->weatherEnable, gCurrentLevelHeader->weatherVelX << 8, gCurrentLevelHeader->weatherVelY << 8, gCurrentLevelHeader->weatherVelZ << 8, gCurrentLevelHeader->weatherIntensity * 257, gCurrentLevelHeader->weatherOpacity * 257); - func_800AB308(-1, -0x200); + setWeatherLimits(-1, -0x200); } if (gCurrentLevelHeader->unk49 == -1) { gCurrentLevelHeader->unkA4 = load_texture((s32) gCurrentLevelHeader->unkA4); @@ -673,6 +673,7 @@ s32 func_8006BD88(void) { /** * Return the race type ID of the current level. + * Official name: levelGetType */ u8 get_current_level_race_type(void) { return gCurrentLevelHeader->race_type; @@ -732,7 +733,7 @@ char *get_level_name(s32 levelId) { } void func_8006BEFC(void) { - func_8006C164(); + frontCleanupMultiSelect(); set_background_prim_colour(0, 0, 0); free_from_memory_pool(gCurrentLevelHeader); func_800049D8(); @@ -807,7 +808,7 @@ void func_8006BFC8(s8 *arg0) { free_from_memory_pool(gTempAssetTable); } -void func_8006C164(void) { +void frontCleanupMultiSelect(void) { free_from_memory_pool(D_801211C0); } @@ -897,7 +898,7 @@ void init_game(void) { s32 viMode; init_main_memory_pool(); - func_800C6170(); // Initialise gzip decompression related things + rzipInit(); // Initialise gzip decompression related things sAntiPiracyTriggered = TRUE; if (check_imem_validity()) { sAntiPiracyTriggered = FALSE; @@ -924,10 +925,10 @@ void init_game(void) { audio_init(&gMainSched); func_80008040(); // Should be very similar to func_8005F850 sControllerStatus = init_controllers(); - func_8007AC70(); // Should be very similar to func_8005F850 + texInitTextures(); // Should be very similar to func_8005F850 func_8005F850(); // Matched allocate_object_pools(); - func_800B5E88(); + diPrintfInit(); func_800598D0(); init_particle_assets(); func_800AB1F0(); @@ -1882,6 +1883,7 @@ s8 is_postrace_viewport_active(void) { /** * Sets and returns (nonzero) the message set when pressing the reset button. + * Official name: mainResetPressed */ s32 is_reset_pressed(void) { if (gNMIMesgBuf[0] == 0) { @@ -2108,6 +2110,7 @@ void pre_intro_loop(void) { /** * Returns TRUE if the game doesn't detect any controllers. + * Official name: mainDemoOnly */ s32 is_controller_missing(void) { if (sControllerStatus == CONTROLLER_MISSING) { diff --git a/src/game.h b/src/game.h index 08ada5e5..828c2245 100644 --- a/src/game.h +++ b/src/game.h @@ -50,7 +50,7 @@ u8 get_total_level_header_count(void); char *get_level_name(s32 levelId); void func_8006BEFC(void); void func_8006BFC8(s8 *arg0); -void func_8006C164(void); +void frontCleanupMultiSelect(void); TempStruct5 *func_8006C18C(void); s8 func_8006C19C(void); void func_8006C1AC(s32 levelId, s32 entranceId, Vehicle vehicleId, s32 cutsceneId); diff --git a/src/game_ui.c b/src/game_ui.c index fd6eba60..f0689d14 100644 --- a/src/game_ui.c +++ b/src/game_ui.c @@ -389,8 +389,8 @@ void render_hud(Gfx **dList, MatrixS **mtx, Vertex **vertexList, Object *arg3, s gDPPipeSync(gHUDCurrDisplayList++); init_rsp(&gHUDCurrDisplayList); init_rdp_and_framebuffer(&gHUDCurrDisplayList); - func_8007AE28(0xFFFFFFFF); - func_8007AE0C(RENDER_Z_COMPARE); + texDisableModes(0xFFFFFFFF); + texEnableModes(RENDER_Z_COMPARE); func_8007BF1C(FALSE); if (check_if_showing_cutscene_camera() == FALSE && D_80126D34 == 0 && racer->racer.playerIndex == PLAYER_ONE) { if (D_80126D35 != 0) { @@ -488,7 +488,7 @@ block_95: *dList = gHUDCurrDisplayList; *mtx = gHUDCurrMatrix; *vertexList = gHUDCurrVertex; - func_8007AE28(0xFFFFFFFF); + texDisableModes(0xFFFFFFFF); } } } diff --git a/src/gzip.c b/src/gzip.c index 8b5560f4..c4b60699 100644 --- a/src/gzip.c +++ b/src/gzip.c @@ -22,13 +22,15 @@ s32 D_8012AAD8; /******************************/ -void func_800C6170(void) { +void rzipInit(void) { D_800E3760 = (huft *)allocate_from_main_pool_safe(0x2800, COLOUR_TAG_BLACK); gAssetAddress = (s32 *)allocate_from_main_pool_safe(0x10, COLOUR_TAG_BLACK); } /** * Converts a little endian value to big endian. + * Official name: rzipUncompressSize + * (so, this probably expects a gzip header) */ s32 byteswap32(u8 *arg0) { s32 value; @@ -41,6 +43,7 @@ s32 byteswap32(u8 *arg0) { /** * Returns the uncompressed size of a gzip compressed asset. + * Official name: rzipUncompressSizeROM */ s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset) { load_asset_to_address(assetIndex, (u32) gAssetAddress, assetOffset, 8); @@ -50,6 +53,7 @@ s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset) { /** * Decompresses gzip data. * Returns the pointer to the decompressed data. + * Official name: rzipUncompress */ u8 *gzip_inflate(u8 *compressedInput, u8 *decompressedOutput) { gzip_inflate_input = compressedInput + 5; // The compression header is 5 bytes. @@ -60,6 +64,7 @@ u8 *gzip_inflate(u8 *compressedInput, u8 *decompressedOutput) { return decompressedOutput; } +/* Official name: huft_build */ void gzip_huft_build(u32 *b, u32 n, u32 s, u16 *d, u16 *e, huft **t, s32 *m) { u32 a; /* counter for codes of length k */ u32 c[BMAX+1]; /* bit length count table */ diff --git a/src/gzip.h b/src/gzip.h index bd2f2143..15bcc3c9 100644 --- a/src/gzip.h +++ b/src/gzip.h @@ -18,7 +18,7 @@ typedef struct huft { #define BMAX 16 /* maximum bit length of any code (16 for explode) */ #define N_MAX 288 /* maximum number of codes in any set */ -void func_800C6170(void); +void rzipInit(void); s32 byteswap32(u8 *arg0); s32 get_asset_uncompressed_size(s32 assetIndex, s32 assetOffset); u8 *gzip_inflate(u8 *compressedInput, u8 *decompressedOutput); diff --git a/src/main.c b/src/main.c index 56aad644..8d48ddd4 100644 --- a/src/main.c +++ b/src/main.c @@ -21,6 +21,7 @@ UNUSED u64 gUnusedThreadStack[0x200]; //Thread1 stack? * Where it all begins. * Once the boot procedure is finished in IPL3, this function is run. * It kicks things off by initialising thread1, which serves as the top level + * Official name: boot */ void main(void) { osInitialize(); @@ -32,6 +33,7 @@ void main(void) { * Initialise the crash handler thread, then initialise the main game thread. * Reset the start and endpoint of the game thread stack, then set thread priority to zero, effectively * stopping this thread, as it's no longer needed. + * Official name: main */ void thread1_main(UNUSED void *unused) { thread0_create(); diff --git a/src/math_util.c b/src/math_util.c index 98a9d834..3df85705 100644 --- a/src/math_util.c +++ b/src/math_util.c @@ -60,6 +60,7 @@ GLOBAL_ASM("asm/math_util/f32_matrix_to_s32_matrix.s") #endif #ifdef NON_MATCHING +/* Official name: mathMtxXFMF */ void guMtxXFMF(Matrix mf, float x, float y, float z, float *ox, float *oy, float *oz) { *ox = mf[0][0]*x + mf[1][0]*y + mf[2][0]*z + mf[3][0]; *oy = mf[0][1]*x + mf[1][1]*y + mf[2][1]*z + mf[3][1]; @@ -70,6 +71,7 @@ GLOBAL_ASM("asm/math_util/guMtxXFMF.s") #endif #ifdef NON_EQUIVALENT +/* Official name: mathMtxFastXFMF */ void f32_matrix_dot(Matrix *mat1, Matrix *mat2, Matrix *output) { (*output)[0][0] = ((*mat2)[0][0] * (*mat1)[0][0]) + ((*mat2)[0][1] * (*mat1)[1][0]) + ((*mat2)[0][2] * (*mat1)[2][0]); (*output)[0][1] = ((*mat2)[0][0] * (*mat1)[0][1]) + ((*mat2)[0][1] * (*mat1)[1][1]) + ((*mat2)[0][2] * (*mat1)[2][1]); @@ -80,6 +82,7 @@ GLOBAL_ASM("asm/math_util/f32_matrix_dot.s") #endif #ifdef NON_EQUIVALENT +/* Official name: mathMtxCatF */ void f32_matrix_mult(Matrix *mat1, Matrix *mat2, Matrix *output) { s32 i; for(i = 0; i < 4; i++) { @@ -94,6 +97,7 @@ GLOBAL_ASM("asm/math_util/f32_matrix_mult.s") #endif #ifdef NON_EQUIVALENT +/* Official name: mathMtxF2L */ void f32_matrix_to_s16_matrix(Matrix *input, MatrixS *output) { s32 temp_f10; s32 temp_f4; @@ -141,6 +145,7 @@ s32 get_rng_seed(void) { GLOBAL_ASM("asm/math_util/rng.s") #ifdef NON_EQUIVALENT +/* Official name: fastShortReflection(?) */ void s16_matrix_rotate(s16 *arg0[4][4], s16 arg1[4][4]) { s32 temp_t6; @@ -227,6 +232,7 @@ GLOBAL_ASM("asm/math_util/object_transform_to_matrix.s") #endif #ifdef NON_MATCHING +/* Official name: mathSquashY(?) */ void f32_matrix_scale(Matrix *input, f32 scale) { input[0][1][0] *= scale; input[0][1][1] *= scale; @@ -237,6 +243,7 @@ GLOBAL_ASM("asm/math_util/f32_matrix_scale.s") #endif #ifdef NON_MATCHING +/* Official name: mathTransY(?) */ void f32_matrix_y_scale(Matrix *input, f32 scale) { input[0][3][0] += input[0][1][0] * scale; input[0][3][1] += input[0][1][1] * scale; diff --git a/src/memory.c b/src/memory.c index 3a85fef1..59ad5aaf 100644 --- a/src/memory.c +++ b/src/memory.c @@ -60,6 +60,7 @@ void init_main_memory_pool(void) { /** * Creates a new memory pool that is sectioned off the main one. + * Official name: mmAllocRegion */ MemoryPoolSlot *new_sub_memory_pool(s32 poolDataSize, s32 numSlots) { s32 size; @@ -178,6 +179,7 @@ MemoryPoolSlot *allocate_from_memory_pool(s32 poolIndex, s32 size, u32 colourTag return 0; } +/* Official name: mmAllocR */ void *allocate_from_pool_containing_slots(MemoryPoolSlot *slots, s32 size) { s32 i; for (i = gNumberOfMemoryPools; i != 0; i--) { @@ -228,6 +230,7 @@ void *allocate_at_address_in_main_pool(s32 size, u8 *address, u32 colorTag) { /** * Sets the state of the free queue. State is either 0, 1, or 2. * The free queue will get flushed if the state is set to 0. + * Official name: mmSetDelay */ void set_free_queue_state(s32 state) { s32 *flags = clear_status_register_flags(); @@ -278,6 +281,7 @@ void clear_free_queue(void) { set_status_register_flags(flags); } +/* Official name: heapFree */ void free_slot_containing_address(u8 *address) { s32 slotIndex; s32 poolIndex; @@ -390,6 +394,7 @@ s32 func_80071538(u8 *address) { /** * Returns the index of the memory pool containing the memory address. + * Official(?) name: getHeapIdxOf */ s32 get_memory_pool_index_containing_address(u8 *address) { s32 i; @@ -454,7 +459,7 @@ void free_memory_pool_slot(s32 poolIndex, s32 slotIndex) { } // Unused? -MemoryPoolSlot *func_80071774(s32 poolIndex) { +MemoryPoolSlot *mmGetSlotPtr(s32 poolIndex) { return gMemoryPools[poolIndex].slots; } @@ -495,6 +500,7 @@ s32 allocate_memory_pool_slot(s32 poolIndex, s32 slotIndex, s32 size, s32 slotIs /** * Returns the passed in address aligned to the next 16-byte boundary. + * Official name: mmAlign16 */ u8 *align16(u8 *address) { s32 remainder = (s32)address & 0xF; @@ -507,6 +513,7 @@ u8 *align16(u8 *address) { /** * Returns the passed in address aligned to the next 8-byte boundary. * Unused. + * Official name: mmAlign8 */ u8 *align8(u8 *address) { s32 remainder = (s32)address & 0x7; @@ -519,6 +526,7 @@ u8 *align8(u8 *address) { /** * Returns the passed in address aligned to the next 4-byte boundary. * Unused. + * Official name: mmAlign4 */ u8 *align4(u8 *address) { s32 remainder = (s32)address & 0x3; @@ -628,7 +636,7 @@ UNUSED void render_memory_colour_tags(void) { render_printf("ORANGE %d\n\n", get_memory_colour_tag_count(COLOUR_TAG_ORANGE)); } -UNUSED void func_80071C74(void) { +UNUSED void mmSlotPrint(void) { s32 i; s32 skip; s32 index; diff --git a/src/menu.c b/src/menu.c index 60ceb12a..f9f82686 100644 --- a/src/menu.c +++ b/src/menu.c @@ -2316,7 +2316,7 @@ void menu_logos_screen_init(void) { set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, SCREEN_WIDTH, SCREEN_HEIGHT); } copy_viewports_to_stack(); //Init viewports - func_80066818(0, 1); + camEnableUserView(0, 1); } /** @@ -2343,7 +2343,7 @@ s32 menu_logo_screen_loop(s32 updateRate) { sBootScreenTimer -= updateRate / 60.0f; } if (sBootScreenTimer <= 0.0f) { - func_80066894(0, 0); + camDisableUserView(0, 0); set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO); init_title_screen_variables(); menu_init(MENU_TITLE); @@ -3462,7 +3462,7 @@ SIDeviceStatus func_80087F14(s32 *controllerIndex, s32 arg1) { D_80126AA0[i - 1][j] = 0; } while (&D_80126AA0 != &sCurrentControllerPakAllFileNames); - func_80076164(); //Free D_800DE440 from memory + packDirectoryFree(); //Free D_800DE440 from memory get_free_space(*controllerIndex, &sCurrentControllerPakFreeSpace, NULL); //Get Available Space in Controller Pak sCurrentControllerPakFreeSpace = sCurrentControllerPakFreeSpace / 256; //Bytes ret = pakStatus; //Really? @@ -3583,7 +3583,7 @@ s32 menu_boot_loop(s32 updateRate) { } break; case 2: - if (gMenuDelay && func_800C018C() == 0) { + if (gMenuDelay && fxFadeOn() == 0) { transition_begin(&sMenuTransitionFadeInFast); } temp = 300; @@ -5440,7 +5440,7 @@ s32 menu_file_select_loop(s32 updateRate) { } gIsInTwoPlayerAdventure = (gNumberOfActivePlayers == 2); if (gIsInTwoPlayerAdventure) { - func_8000E1B8(); + fontUseFont(); } gNumberOfActivePlayers = 1; D_800E0FAC = 1; @@ -5591,7 +5591,7 @@ void menu_track_select_init(void) { set_background_draw_function(func_8008F618); resize_viewport(0, 80, gTrackSelectViewPortHalfY - (gTrackSelectViewPortHalfY >> 1), 240, (gTrackSelectViewPortHalfY >> 1) + gTrackSelectViewPortHalfY); copy_viewports_to_stack(); - func_80066818(0, 0); + camEnableUserView(0, 0); D_800E097C = 1; func_8009C674(D_800E07C4); allocate_menu_images(D_800E07E0); @@ -5808,7 +5808,7 @@ s32 menu_track_select_loop(s32 updateRate) { void func_8008F534(void) { s32 i; - func_80066894(0, 0); + camDisableUserView(0, 0); func_8009C4A8(D_800E07C4); set_free_queue_state(0); free_from_memory_pool(D_800E0970); @@ -5925,7 +5925,7 @@ void func_8008FF1C(s32 updateRate) { } trackSelectY++; } - func_80066894(0, 1); + camDisableUserView(0, 1); func_8009BD5C(); set_ortho_matrix_view(&sMenuCurrDisplayList, &sMenuCurrHudMat); reset_render_settings(&sMenuCurrDisplayList); @@ -5994,7 +5994,7 @@ void func_80090918(s32 updateRate) { gMenuImageStack[6].unk8 = (f32) (sMenuImageProperties[6].unk8 * (1.0f + ((f32) var_t1 / 20.0f))); gMenuImageStack[5].unk8 = (f32) (sMenuImageProperties[5].unk8 * (1.0f + ((f32) var_t1 / 20.0f))); } - func_80066818(0, 0); + camEnableUserView(0, 0); if (get_thread30_level_id_to_load() == 0) { if (gMenuDelay < 0) { sMenuMusicVolume -= updateRate * 4; @@ -6023,7 +6023,7 @@ void func_80090918(s32 updateRate) { func_8008F00C(1); } else if (gMenuDelay < -30) { disable_new_screen_transitions(); - func_80066894(0, 0); + camDisableUserView(0, 0); func_8008F00C(-1); } } @@ -6108,7 +6108,7 @@ void render_track_select_setup_ui(s32 updateRate) { if ((gNumberOfActivePlayers == 2) && (D_801269C8 < 4) && (D_801263E0 >= 2)) { sp74 = TRUE; } - func_80066894(0, 1); + camDisableUserView(0, 1); func_8009BD5C(); set_ortho_matrix_view(&sMenuCurrDisplayList, &sMenuCurrHudMat); if (gMenuDelay < 0) { @@ -7059,7 +7059,7 @@ void func_80094688(s32 arg0, s32 arg1) { if (get_render_context() == 0) { func_80078170(D_80126BB8, D_80126BBC, D_80126BC0); } - func_80066818(0, 1); + camEnableUserView(0, 1); resize_viewport(0, 0, 0, gTrackSelectViewPortX, gTrackSelectViewportY); } adjust_audio_volume(VOLUME_LOWER_AMBIENT); @@ -7954,7 +7954,7 @@ void menu_credits_init(void) { set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, SCREEN_WIDTH, SCREEN_HEIGHT); } copy_viewports_to_stack(); - func_80066818(0, 1); + camEnableUserView(0, 1); func_8009C674(D_800E17D8); allocate_menu_images(D_800E17F0); assign_racer_portrait_textures(); @@ -8022,7 +8022,7 @@ GLOBAL_ASM("asm/non_matchings/menu/menu_credits_loop.s") void func_8009BCF0(void) { set_music_player_voice_limit(0x12); disable_new_screen_transitions(); - func_80066894(0, 0); + camDisableUserView(0, 0); set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO); func_8009C4A8(D_800E17D8); unload_font(ASSET_FONTS_BIGFONT); diff --git a/src/object_functions.c b/src/object_functions.c index cf15b0f4..40bc89ac 100644 --- a/src/object_functions.c +++ b/src/object_functions.c @@ -1338,6 +1338,7 @@ void obj_loop_posarrow(Object *obj, UNUSED s32 updateRate) { } } +/* Offical name: animInit */ void obj_init_animator(Object *obj, LevelObjectEntry_Animator *entry, s32 arg2) { Object_Animator *obj64; LevelModel *levelModel; @@ -3332,6 +3333,7 @@ void obj_init_seamonster(UNUSED Object *obj, UNUSED LevelObjectEntry_SeaMonster void obj_loop_seamonster(UNUSED Object *obj, UNUSED s32 updateRate) { } +/* Official name: fogInit(?) */ void obj_init_fogchanger(Object *obj, LevelObjectEntry_FogChanger *entry) { f32 temp_f0; temp_f0 = entry->unk8 * 8.0f; @@ -4340,6 +4342,7 @@ void obj_init_audio(Object *obj, LevelObjectEntry_Audio *entry) { gParticlePtrList_addObject(obj); } +/* Official name: audioLineInit */ void obj_init_audioline(Object *obj, LevelObjectEntry_AudioLine *entry) { Object_AudioLine *obj64; @@ -4372,6 +4375,7 @@ void obj_init_audioreverb(Object *obj, LevelObjectEntry_AudioReverb *entry) { gParticlePtrList_addObject(obj); } +/* Official name: texscrollInit */ void obj_init_texscroll(Object *obj, LevelObjectEntry_TexScroll *entry, s32 arg2) { Object_TexScroll *obj64; LevelModel *levelModel; @@ -4397,6 +4401,7 @@ void obj_init_texscroll(Object *obj, LevelObjectEntry_TexScroll *entry, s32 arg2 GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_texscroll.s") +/* Official name: rgbalightInit */ void obj_init_rgbalight(Object *obj, LevelObjectEntry_RgbaLight *entry, UNUSED s32 arg2) { obj->unk64 = func_80031CAC(obj, entry); } @@ -4504,6 +4509,7 @@ void obj_loop_log(Object *obj, s32 updateRate) { obj->unk5C->unk100 = NULL; } +/* Official name: weatherInit */ void obj_init_weather(Object *obj, LevelObjectEntry_Weather *entry) { f32 temp = entry->unk8; temp *= temp; @@ -4544,7 +4550,7 @@ void obj_loop_weather(Object *obj, UNUSED s32 updateRate) { entry = (LevelObjectEntry_Weather *)obj->segment.unk3C_a.level_entry; if (((diffX * diffX) + (diffZ * diffZ)) <= dist){ if (((!obj->segment.unk3C_a.level_entry) && (!obj->segment.unk3C_a.level_entry)) && (!obj->segment.unk3C_a.level_entry)){} // Fakematch - func_800ABC5C(entry->unkA * 256, entry->unkC * 256, entry->unkE * 256, entry->unk10 * 257, entry->unk11 * 257, entry->unk12); + changeWeather(entry->unkA * 256, entry->unkC * 256, entry->unkE * 256, entry->unk10 * 257, entry->unk11 * 257, entry->unk12); } } } @@ -4554,7 +4560,7 @@ void obj_init_lensflare(Object *obj, UNUSED LevelObjectEntry_LensFlare *entry) { } void obj_init_lensflareswitch(Object *obj, LevelObjectEntry_LensFlareSwitch *entry, UNUSED s32 arg2) { - func_800ACF60(obj); + cameraAddOverrideObject(obj); obj->segment.trans.scale = entry->unk8; obj->segment.trans.scale /= 40.0f; } @@ -4684,6 +4690,7 @@ void obj_init_midichset(Object *obj, LevelObjectEntry_Midichset *entry) { temp->unk3 = entry->unkB; } +/* Official name: bubblerInit */ void obj_init_bubbler(Object *obj, LevelObjectEntry_Bubbler *entry) { func_800AF134((Particle *) obj->unk6C, entry->unk9, entry->unk8, 0, 0, 0); obj->unk78 = entry->unkA; @@ -4714,6 +4721,7 @@ void obj_loop_unknown94(UNUSED Object *obj, s32 UNUSED updateRate) { void obj_init_rangetrigger(UNUSED Object *obj, UNUSED LevelObjectEntry_RangeTrigger *entry) { } +/* Official name: rangetriggerControl */ void obj_loop_rangetrigger(Object *obj, s32 updateRate) { UNUSED s32 temp; LevelObjectEntry_RangeTrigger *level_entry; diff --git a/src/objects.c b/src/objects.c index 4941ee6e..fa1b8eee 100644 --- a/src/objects.c +++ b/src/objects.c @@ -582,7 +582,7 @@ u32 func_8000E0B0(void) { } } -void func_8000E128(void) { +void instShowBearBar(void) { D_800DC708 = 0x8000; } @@ -611,7 +611,7 @@ void func_8000E194(void) { D_800DC740 = 0; } -void func_8000E1B8(void) { +void fontUseFont(void) { D_800DC73C = 0; D_800DC740 = 0; } @@ -762,6 +762,7 @@ GLOBAL_ASM("asm/non_matchings/objects/func_8000E898.s") /** * Returns the object at the current offset by ID. + * Official name: objGetObject */ Object *get_object(s32 index) { if (index < 0 || index >= objCount) { @@ -770,7 +771,7 @@ Object *get_object(s32 index) { return gObjPtrList[index]; } -Object **func_8000E988(s32 *arg0, s32 *cnt) { +Object **objGetObjList(s32 *arg0, s32 *cnt) { *arg0 = D_8011AE60; *cnt = objCount; return gObjPtrList; @@ -796,7 +797,7 @@ void func_8000E9D0(Object *arg0) { GLOBAL_ASM("asm/non_matchings/objects/spawn_object.s") -void func_8000F648(Object *obj, s32 count, s32 objType) { +void objFreeAssets(Object *obj, s32 count, s32 objType) { s32 i; if (objType == 0) { // 3D model for (i = 0; i < count; i++) { @@ -819,7 +820,7 @@ void func_8000F648(Object *obj, s32 count, s32 objType) { } } -void func_8000F758(Object *obj) { +void lightSetupLightSources(Object *obj) { s32 i; for(i = 0; i < obj->segment.header->unk5A; i++) { obj->unk70[i] = func_80031F88(obj, &obj->segment.header->unk24[i]); @@ -837,7 +838,7 @@ s32 func_8000FAC4(Object *obj, Object_6C *arg1) { particleDataEntry = obj->segment.header->objectParticles; for(i = 0; i < obj->segment.header->unk57; i++) { if ((particleDataEntry[i].upper & 0xFFFF0000) == 0xFFFF0000) { - func_800AF1E0((Particle *) &obj->unk6C[i], (particleDataEntry[i].upper >> 8) & 0xFF, particleDataEntry[i].upper & 0xFF); + partInitTrigger((Particle *) &obj->unk6C[i], (particleDataEntry[i].upper >> 8) & 0xFF, particleDataEntry[i].upper & 0xFF); } else { func_800AF29C((Particle *) &obj->unk6C[i], (particleDataEntry[i].upper >> 0x18) & 0xFF, @@ -1349,7 +1350,7 @@ void func_80012E28(Object *this) { } } -void func_80012F30(Object *obj) { +void objUndoPlayerTumble(Object *obj) { if (obj->behaviorId == BHV_RACER) { Object_Racer *racer = &obj->unk64->racer; obj->segment.trans.y_rotation -= racer->y_rotation_offset; @@ -2020,7 +2021,7 @@ UNUSED void debug_render_checkpoint_node(UNUSED s32 checkpointID, UNUSED s32 pat GLOBAL_ASM("asm/non_matchings/objects/func_8001BC54.s") -u32 func_8001BD94(s32 arg0) { +u32 objGetObject(s32 arg0) { if (arg0 < 0 || arg0 >= D_8011AEE0) { return 0; } @@ -2136,6 +2137,7 @@ GLOBAL_ASM("asm/non_matchings/objects/func_8001D4B4.s") /** * Take the normalised length of the position set by the perspective and set the world angle for the envmap. + * Official name: setObjectViewNormal */ void update_envmap_position(f32 x, f32 y, f32 z) { f32 vecLength = sqrtf((x * x) + (y * y) + (z * z)); @@ -2192,6 +2194,7 @@ GLOBAL_ASM("asm/non_matchings/objects/func_8001E13C.s") /** * Returns a pointer to the asset in the misc. section. If index is out of range, then this * function just returns the pointer to gAssetsMiscSection. + * Official name: objGetTable */ s32 *get_misc_asset(s32 index) { if (index < 0 || index >= gAssetsMiscTableLength) { diff --git a/src/objects.h b/src/objects.h index f6c2a4d7..447bb2ae 100644 --- a/src/objects.h +++ b/src/objects.h @@ -286,13 +286,13 @@ s32 normalise_time(s32 timer); void func_8000CBC0(void); s32 func_8000CC20(Object *arg0); u32 func_8000E0B0(void); -void func_8000E128(void); +void instShowBearBar(void); s8 func_8000E138(); s8 func_8000E148(); s8 func_8000E158(void); s8 func_8000E184(); void func_8000E194(void); -void func_8000E1B8(void); +void fontUseFont(void); s8 find_non_car_racers(void); s8 check_if_silver_coin_race(); void func_8000E1EC(Object *obj, s32 vehicleID); @@ -300,7 +300,7 @@ void set_time_trial_enabled(s32 arg0); u8 is_time_trial_enabled(); u8 func_8000E4D8(void); Object *get_object(s32 index); -Object **func_8000E988(s32 *arg0, s32 *cnt); +Object **objGetObjList(s32 *arg0, s32 *cnt); s32 getObjectCount(void); s32 func_8000E9C0(void); void func_8000E9D0(Object *arg0); @@ -317,7 +317,7 @@ void func_80012C3C(Gfx** dlist); void func_80012C98(Gfx **dlist); void func_80012CE8(Gfx **dlist); void func_80012D5C(Gfx **dlist, MatrixS **mtx, Vertex **verts, Object *object); -void func_80012F30(Object *obj); +void objUndoPlayerTumble(Object *obj); void render_object(Object *this); void func_80013548(Object *arg0); void func_800142B8(void); @@ -345,7 +345,7 @@ Object **get_racer_objects_by_port(s32 *numRacers); Object **get_racer_objects_by_position(s32 *numRacers); Object *get_racer_object(s32 index); void debug_render_checkpoint_node(s32 checkpointID, s32 pathID, Gfx** dList, MatrixS **mtx, Vertex **vtx); -u32 func_8001BD94(s32 arg0); +u32 objGetObject(s32 arg0); void func_8001D1AC(void); void func_8001D1BC(s32 arg0); Object *func_8001D1E4(s32 *arg0); @@ -402,7 +402,7 @@ void func_80022CFC(s32 arg0, f32 x, f32 y, f32 z); Object *func_8001B7A8(Object *racer, s32 position, f32 *distance); s32 func_8000FD34(Object *arg0, Object_5C *arg1); void func_8000E4E8(s32 index); -void func_8000F648(Object *obj, s32 count, s32 objType); +void objFreeAssets(Object *obj, s32 count, s32 objType); void func_8001709C(Object *obj); //Non Matching diff --git a/src/particles.c b/src/particles.c index c446acf7..fab73c0c 100644 --- a/src/particles.c +++ b/src/particles.c @@ -469,7 +469,7 @@ void func_800AF134(Particle *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s16 a } } -void func_800AF1E0(Particle *arg0, s32 arg1, s32 arg2) { +void partInitTrigger(Particle *arg0, s32 arg1, s32 arg2) { ParticleBehavior *temp_v0; if (arg1 < gParticleBehavioursAssetTableCount) { diff --git a/src/particles.h b/src/particles.h index 35aea9c9..2d179921 100644 --- a/src/particles.h +++ b/src/particles.h @@ -325,7 +325,7 @@ void func_800AEF88(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2); void func_800AF024(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2); void func_800AF0A4(Object *obj); void func_800AF0F0(Object *obj); -void func_800AF1E0(Particle *arg0, s32 arg1, s32 arg2); +void partInitTrigger(Particle *arg0, s32 arg1, s32 arg2); void func_800AF29C(Particle *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s16 arg5); void func_800AF6E4(Object *obj, s32 arg1); void func_800B2260(Particle *arg0); diff --git a/src/printf.c b/src/printf.c index 5b83b038..63def063 100644 --- a/src/printf.c +++ b/src/printf.c @@ -81,15 +81,15 @@ GLOBAL_ASM("asm/non_matchings/printf/func_800B3564.s") UNUSED void func_800B3678(Gfx **arg0, MatrixS **arg1, Vertex **arg2) { UNUSED s32 pad; UNUSED s32 pad2; - Object **temp_s0; - s32 sp38; - s32 sp34; + Object **objects; + s32 iObj; + s32 nObjs; - temp_s0 = func_8000E988(&sp38, &sp34); - for (; sp38 < sp34; sp38++) { - if (temp_s0[sp38]->segment.trans.unk6 & 0x8000) { - if ((s32) temp_s0[sp38]->segment.header & 0x8000) { - func_800B3740(temp_s0[sp38], arg0, arg1, arg2, 0); + objects = objGetObjList(&iObj, &nObjs); + for (; iObj < nObjs; iObj++) { + if (objects[iObj]->segment.trans.unk6 & 0x8000) { + if ((s32) objects[iObj]->segment.header & 0x8000) { + func_800B3740(objects[iObj], arg0, arg1, arg2, 0); } } } @@ -129,22 +129,24 @@ GLOBAL_ASM("asm/non_matchings/printf/func_800B45C4.s") GLOBAL_ASM("asm/non_matchings/printf/func_800B461C.s") GLOBAL_ASM("asm/non_matchings/printf/func_800B4668.s") GLOBAL_ASM("asm/non_matchings/printf/func_800B46BC.s") -GLOBAL_ASM("asm/non_matchings/printf/func_800B4940.s") +GLOBAL_ASM("asm/non_matchings/printf/_itoa.s") void func_800B4A08(s32 arg0) { D_800E2EF0 = arg0; } -void func_800B4A14(char *s, char *format, ...) { +/* Official name: sprintf(?) */ +UNUSED void func_800B4A14(char *s, char *format, ...) { va_list args; va_start(args, format); + //!@bug Should be calling vsprintf here. sprintf(s, format, args); va_end(args); } GLOBAL_ASM("asm/non_matchings/printf/sprintf.s") -void func_800B5E88(void) { +void diPrintfInit(void) { gTexture0 = load_texture(0); gTexture1 = load_texture(1); gTexture2 = load_texture(2); @@ -229,6 +231,7 @@ void set_render_printf_background_colour(u8 red, u8 green, u8 blue, u8 alpha) { /** * Sets the character position of further prints to the given coordinates. + * Official name: diPrintfSetXY */ void set_render_printf_position(u16 x, u16 y) { RENDER_PRINTF_CMD_SET_POSITION(x, y) diff --git a/src/printf.h b/src/printf.h index 3ea7caba..3f570ca7 100644 --- a/src/printf.h +++ b/src/printf.h @@ -43,7 +43,7 @@ void func_800B4A08(s32 arg0); -void func_800B5E88(void); +void diPrintfInit(void); 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 func_800B695C(Gfx** dList, u32 arg1, u32 arg2, u32 arg3, u32 arg4); diff --git a/src/save_data.c b/src/save_data.c index 1a62d6da..65d47a43 100644 --- a/src/save_data.c +++ b/src/save_data.c @@ -667,10 +667,10 @@ SIDeviceStatus get_file_extension(s32 controllerIndex, s32 fileType, char *fileE continue; } if (fileType == 3) { - if((func_800CE050((u8 *) fileNames[fileNum], (char *) sDKRacingAdv1, strlen((char *) sDKRacingAdv2)) != 0)) { + if((_bcmp((u8 *) fileNames[fileNum], (char *) sDKRacingAdv1, strlen((char *) sDKRacingAdv2)) != 0)) { continue; } - } else if((func_800CE050((u8 *) fileNames[fileNum], (char *) sDKRacingTimes1, strlen((char *) sDKRacingTimes2)) != 0)) { + } else if((_bcmp((u8 *) fileNames[fileNum], (char *) sDKRacingTimes1, strlen((char *) sDKRacingTimes2)) != 0)) { continue; } @@ -1547,6 +1547,7 @@ SIDeviceStatus func_800756D4(s32 controllerIndex, u8 *arg1, u8 *arg2, u8 *arg3, return ret; } +/* Official name: packOpen */ SIDeviceStatus get_si_device_status(s32 controllerIndex) { OSMesg unusedMsg; s32 ret; @@ -1603,6 +1604,7 @@ SIDeviceStatus get_si_device_status(s32 controllerIndex) { return NO_CONTROLLER_PAK; } +/* Official name: packClose */ s32 start_reading_controller_data(UNUSED s32 controllerIndex) { osContStartReadData(sControllerMesgQueue); return 0; @@ -1657,6 +1659,7 @@ void init_controller_paks(void) { osContStartReadData(sControllerMesgQueue); } +/* Official name: packIsPresent */ UNUSED SIDeviceStatus check_for_rumble_pak(s32 controllerIndex) { s32 ret; @@ -1671,6 +1674,7 @@ UNUSED SIDeviceStatus check_for_rumble_pak(s32 controllerIndex) { } //Inspects and repairs the Controller Pak's file system +/* Official name: packRepair */ SIDeviceStatus repair_controller_pak(s32 controllerIndex) { s32 ret; s32 status = get_si_device_status(controllerIndex); @@ -1691,6 +1695,7 @@ SIDeviceStatus repair_controller_pak(s32 controllerIndex) { } //Reformat Controller Pak +/* Official name: packFormat */ SIDeviceStatus reformat_controller_pak(s32 controllerIndex) { s32 ret; s32 status = get_si_device_status(controllerIndex); @@ -1796,7 +1801,7 @@ s32 get_controller_pak_file_list(s32 controllerIndex, s32 maxNumOfFilesToGet, ch } //Free D_800DE440 -void func_80076164(void) { +void packDirectoryFree(void) { if (D_800DE440 != 0) { free_from_memory_pool(D_800DE440); } @@ -1910,6 +1915,7 @@ s32 copy_controller_pak_data(s32 controllerIndex, s32 fileNumber, s32 secondCont // s32 fileType; // u8 game_name[PFS_FILE_NAME_LEN]; // } fileStruct; +/* Official name: packOpenFile */ SIDeviceStatus get_file_number(s32 controllerIndex, char *fileName, char *fileExt, s32 *fileNumber) { u32 gameCode; char fileNameAsFontCodes[PFS_FILE_NAME_LEN]; @@ -1950,6 +1956,7 @@ SIDeviceStatus get_file_number(s32 controllerIndex, char *fileName, char *fileEx return CONTROLLER_PAK_BAD_DATA; } +/* Official name: packReadFile */ 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); @@ -1973,6 +1980,7 @@ SIDeviceStatus read_data_from_controller_pak(s32 controllerIndex, s32 fileNum, u } //If fileNumber -1, it creates a new file? +/* Official name: packWriteFile */ SIDeviceStatus write_controller_pak_file(s32 controllerIndex, s32 fileNumber, char *fileName, char *fileExt, u8 *dataToWrite, s32 fileSize) { s32 temp; u8 fileNameAsFontCodes[PFS_FILE_NAME_LEN]; @@ -2048,6 +2056,7 @@ SIDeviceStatus write_controller_pak_file(s32 controllerIndex, s32 fileNumber, ch } //Get File size for given controller's Control Pak +/* Official name: packFileSize */ SIDeviceStatus get_file_size(s32 controllerIndex, s32 fileNum, s32 *fileSize) { OSPfsState state; diff --git a/src/save_data.h b/src/save_data.h index f6beaf81..d08d1724 100644 --- a/src/save_data.h +++ b/src/save_data.h @@ -65,7 +65,7 @@ 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, char **fileNames, char **fileExtensions, u32 *fileSizes, u8 *fileTypes); -void func_80076164(void); +void packDirectoryFree(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); diff --git a/src/set_rsp_segment.c b/src/set_rsp_segment.c index b5b688f3..d958c48d 100644 --- a/src/set_rsp_segment.c +++ b/src/set_rsp_segment.c @@ -9,6 +9,7 @@ /** * Set the offset for the given address, so the RSP can get the correct physical address. * This is used for the colour and depth buffers. + * Official(?) name: segSetBase */ void set_rsp_segment(Gfx **dlist, s32 segment, s32 base) { gSPSegment((*dlist)++, segment, base + K0BASE) diff --git a/src/textures_sprites.c b/src/textures_sprites.c index ac9b7ec3..9a389378 100644 --- a/src/textures_sprites.c +++ b/src/textures_sprites.c @@ -894,13 +894,14 @@ s16 D_80126384; /******************************/ -GLOBAL_ASM("asm/non_matchings/textures_sprites/func_8007AC70.s") +GLOBAL_ASM("asm/non_matchings/textures_sprites/texInitTextures.s") -void func_8007AE0C(s32 flags) { +/* these two are possibly wrong */ +void texEnableModes(s32 flags) { D_80126378 |= flags; } -void func_8007AE28(s32 flags) { +void texDisableModes(s32 flags) { D_80126378 &= ~flags; } @@ -1465,6 +1466,7 @@ GLOBAL_ASM("asm/non_matchings/textures_sprites/func_8007CA68.s") #ifdef NON_EQUIVALENT // andi 0xff instead of a simple mov for j = i. s32 doesn't work. +/* Official name: texFreeSprite */ void free_sprite(Sprite *sprite) { s32 i; u8 j; @@ -1594,6 +1596,7 @@ void func_8007F1E8(unk8007F1E8 *arg0) { GLOBAL_ASM("asm/non_matchings/textures_sprites/func_8007F24C.s") +/* Official name: resetMixCycle */ void init_pulsating_light_data(PulsatingLightData *data) { s32 i; data->currentFrame = 0; diff --git a/src/textures_sprites.h b/src/textures_sprites.h index 4e15f06d..e4524e26 100644 --- a/src/textures_sprites.h +++ b/src/textures_sprites.h @@ -115,8 +115,8 @@ typedef struct TempTexHeader { /* 0x25 */ u8 pad25[3]; // padding } TempTexHeader; -void func_8007AE0C(s32 flags); -void func_8007AE28(s32 flags); +void texEnableModes(s32 flags); +void texDisableModes(s32 flags); s32 func_8007AE44(void); s32 func_8007AE54(void); s32 func_8007AE64(void); @@ -146,7 +146,7 @@ void free_sprite(Sprite *sprite); // Non Matching void func_8007F594(Gfx **dlist, u32 index, u32 primitiveColor, u32 environmentColor); // Non Matching void func_8007CA68(s32 spriteID, s32 arg1, s32 *arg2, s32 *arg3, s32 *arg4); // Non Matching MemoryPoolSlot *func_8007C12C(s32 spriteID, s32 arg1); // Non Matching -void func_8007AC70(void); // Non Matching +void texInitTextures(void); // Non Matching void func_8007BF34(Gfx **dlist, s32 arg1); // Non Matching void load_blinking_lights_texture(Gfx **dlist, TextureHeader *arg1, u32 flags, s32 arg3); // Non Matching void build_tex_display_list(TextureHeader *tex, u8 *addr); diff --git a/src/thread0_epc.c b/src/thread0_epc.c index 9076acd8..53a1737c 100644 --- a/src/thread0_epc.c +++ b/src/thread0_epc.c @@ -224,6 +224,7 @@ s32 get_lockup_status(void) { return sLockupStatus; } +/* Official name: diCpuTraceTick */ void lockup_screen_loop(s32 updateRate) { sLockupDelay += updateRate; if (sLockupDelay > 60) { diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index e220ed18..d6267173 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -378,7 +378,7 @@ void render_scene(Gfx **dList, MatrixS **mtx, Vertex **vtx, TriangleList **tris, } gDPPipeSync(gSceneCurrDisplayList++); initialise_player_viewport_vars(updateRate); - func_800AB308(-1, -512); + setWeatherLimits(-1, -512); if (gCurrentLevelHeader2->weatherEnable > 0 && numViewports < VIEWPORTS_COUNT_3_PLAYERS) { process_weather(&gSceneCurrDisplayList, &gSceneCurrMatrix, &gSceneCurrVertexList, &gSceneCurrTriList, tempUpdateRate); } @@ -405,7 +405,7 @@ void render_scene(Gfx **dList, MatrixS **mtx, Vertex **vtx, TriangleList **tris, func_80068408(&gSceneCurrDisplayList, &gSceneCurrMatrix); gDPPipeSync(gSceneCurrDisplayList++); initialise_player_viewport_vars(updateRate); - func_800AB308(-1, -512); + setWeatherLimits(-1, -512); func_800AD030(get_active_camera_segment()); func_800ACA20(&gSceneCurrDisplayList, &gSceneCurrMatrix, &gSceneCurrVertexList, get_active_camera_segment()); set_text_font(0); @@ -1102,6 +1102,7 @@ s32 get_inside_segment_count_xz(s32 x, s32 z, s32 *arg2) { /** * Carbon copy of the above function, but takes into account the Y axis, too. + * Official name: trackGetCubeBlockList */ s32 get_inside_segment_count_xyz(s32 *arg0, s16 xPos1, s16 yPos1, s16 zPos1, s16 xPos2, s16 yPos2, s16 zPos2) { s32 cnt; @@ -1143,6 +1144,7 @@ LevelModelSegment *get_segment(s32 segmentID) { /** * Returns the bounding box data of this segment. + * Official name: trackBlockDim */ LevelModelSegmentBoundingBox *get_segment_bounding_box(s32 segmentID) { if (segmentID < 0 || gCurrentLevelModel->numberOfSegments < segmentID) @@ -1315,7 +1317,7 @@ UNUSED void func_8002AC00(s32 arg0, s32 arg1, s32 arg2) { } // These types are probably wrong because the vars are likely still unidentified structs, but the code matches still. -UNUSED void func_8002ACA0(s32 *arg0, s32 *arg1, s32 *arg2) { +UNUSED void dayGetTrackFade(s32 *arg0, s32 *arg1, s32 *arg2) { *arg0 = (unsigned) D_8011D378; *arg1 = (unsigned) D_8011D370; *arg2 = (unsigned) D_8011D374; @@ -1652,7 +1654,7 @@ typedef struct unk8002D30C_a0 { struct unk8002D30C_a0 *unk08; } unk8002D30C_a0; -void func_8002D30C(unk8002D30C_a0 *arg0, s32 arg1) { +void trackMakeAbsolute(unk8002D30C_a0 *arg0, s32 arg1) { while(1) { if(!arg0) { return; @@ -1664,7 +1666,7 @@ void func_8002D30C(unk8002D30C_a0 *arg0, s32 arg1) { arg0->unk08 = (unk8002D30C_a0 *)((s32)arg0->unk08 + arg1); } - func_8002D30C(arg0->unk04, arg1); + trackMakeAbsolute(arg0->unk04, arg1); arg0 = arg0->unk08; } } @@ -1792,7 +1794,7 @@ void func_8002D8DC(s32 arg0, s32 arg1, s32 updateRate) { D_8011D368 = 0; D_8011D36C = 0; numViewports = get_viewport_count(); - objects = func_8000E988(&sp94, &sp90); + objects = objGetObjList(&sp94, &sp90); while (sp94 < sp90) { obj = objects[sp94]; objHeader = obj->segment.header; diff --git a/src/unknown_032760.c b/src/unknown_032760.c index 8e4c4a7d..a544a761 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -105,7 +105,7 @@ void func_80032344(unk800DC950 *arg0, s32 arg1, s32 arg2) { } } -void func_80032398(s32 arg0) { +void lightUpdateLights(s32 arg0) { s32 i; for (i = 0; i < D_800DC95C; i++) { func_80032424(D_800DC950[i], arg0); diff --git a/src/unknown_032760.h b/src/unknown_032760.h index a68e0be8..253c4b0a 100644 --- a/src/unknown_032760.h +++ b/src/unknown_032760.h @@ -90,7 +90,7 @@ void func_80032218(unk800DC950 *arg0); void func_80032224(unk800DC950 *arg0); void func_80032248(unk800DC950 *arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); void func_80032344(unk800DC950 *arg0, s32 arg1, s32 arg2); -void func_80032398(s32 arg0); +void lightUpdateLights(s32 arg0); void func_80032BAC(unk800DC950 *arg0); s32 func_80032C6C(void); f32 func_80033A14(unk800DC950 *arg0); diff --git a/src/unknown_078050.c b/src/unknown_078050.c index e078a1a0..215413e2 100644 --- a/src/unknown_078050.c +++ b/src/unknown_078050.c @@ -396,6 +396,7 @@ UNUSED void func_80077AAC(void *bufPtr, s32 bufSize, UNUSED s32 unused) { /** * Sets the primitive colour for the cyclemode fillrect background. + * Official name: rcpSetScreenColour */ void set_background_prim_colour(u8 red, u8 green, u8 blue) { sBackgroundPrimColourR = red; @@ -406,6 +407,7 @@ void set_background_prim_colour(u8 red, u8 green, u8 blue) { /** * Sets the fill colour for the fillmode fillrect background. * Uses RGBA5551 + * Official name: rcpSetBorderColour */ void set_background_fill_colour(s32 red, s32 green, s32 blue) { sBackgroundFillColour = GPACK_RGBA5551(red, green, blue, 1); @@ -486,6 +488,7 @@ void init_rdp_and_framebuffer(Gfx **dList) { /** * Calls the draw command that sets all the OtherModes, ready for use. + * Official name: rcpInitSp or rcpInitDpNoSize */ void init_rsp(Gfx **dList) { gSPDisplayList((*dList)++, dRspInit); diff --git a/src/unknown_0CEC50.c b/src/unknown_0CEC50.c index afca9146..90e97f3a 100644 --- a/src/unknown_0CEC50.c +++ b/src/unknown_0CEC50.c @@ -7,5 +7,5 @@ //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") +//_bcmp(&gameName, "DKRACING-ADV", strlen("DKRACING-ADV")); +GLOBAL_ASM("lib/asm/non_matchings/unknown_0CEC50/_bcmp.s") diff --git a/src/unknown_0CEC50.h b/src/unknown_0CEC50.h index 7f1d2158..fcca86ba 100644 --- a/src/unknown_0CEC50.h +++ b/src/unknown_0CEC50.h @@ -6,7 +6,7 @@ //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); +//_bcmp(&gameName, "DKRACING-ADV", strlen("DKRACING-ADV")); +s32 _bcmp(u8 *stringToPopulate, char *string, u32 stringLen); #endif diff --git a/src/vehicle_smokey.c b/src/vehicle_smokey.c index 97453ba2..9fd5c404 100644 --- a/src/vehicle_smokey.c +++ b/src/vehicle_smokey.c @@ -255,7 +255,7 @@ void func_8005E204(Object *obj, Object_Racer *racer, f32 arg2, s32 objectID, s32 f32 diffZ; f32 diffY; - var_s6 = func_8000E988(&sp80, &sp7C); + var_s6 = objGetObjList(&sp80, &sp7C); spawnObj.objectID = objectID; spawnObj.size = (((objectID & 0x100) & 0xFFFF) >> 1) | 8; spawnObj.x = obj->segment.trans.x_position - (racer->ox1 * arg2); diff --git a/src/vehicle_tricky.c b/src/vehicle_tricky.c index 109368f8..9c4fadac 100644 --- a/src/vehicle_tricky.c +++ b/src/vehicle_tricky.c @@ -193,7 +193,7 @@ void update_tricky(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r D_8011D5C0 = firstRacerObj->segment.trans.y_position; } if ((firstRacerObj->segment.trans.y_position + 400.0) < D_8011D5C0) { - if (func_800C018C() == 0 && is_in_two_player_adventure()) { + if (fxFadeOn() == 0 && is_in_two_player_adventure()) { func_8006F398(); } func_8006F140(1); @@ -318,7 +318,7 @@ void func_8005CB68(Object_Racer *racer, s8 *arg1) { if (settings->courseFlagsPtr[settings->courseId] & 2) { if (racerUnk1AC == 1) { func_8006F140(4); - func_8000E128(); + instShowBearBar(); } else { func_8006F140(3); if (is_in_two_player_adventure()) { @@ -358,7 +358,7 @@ void func_8005CB68(Object_Racer *racer, s8 *arg1) { func_8006C1AC(miscAsset67CourseByte, 4, -1, 4); } func_8006F140(4); - func_8000E128(); + instShowBearBar(); } else { func_8006C1AC((s32)SPECIAL_MAP_ID_UNK_NEG10, 0, VEHICLE_CAR, 0); func_8006C1AC(miscAsset67CourseByte, 5, -1, 5); diff --git a/src/weather.c b/src/weather.c index 49b59eab..b22cc175 100644 --- a/src/weather.c +++ b/src/weather.c @@ -193,7 +193,7 @@ void func_800AB1F0(void) { D_80127C08 = 0; } -void func_800AB308(s16 arg0, s16 arg1) { +void setWeatherLimits(s16 arg0, s16 arg1) { if (D_80127BF8.unk2 < D_80127BF8.unk0) { D_80127BF8.unk0 = arg0; D_80127BF8.unk2 = arg1; @@ -262,7 +262,7 @@ void func_800ABB34(void) { } -void func_800ABC5C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { +void changeWeather(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { if ((arg5 > 0) && ((arg0 != D_80127BB8[5]) || (arg1 != D_80127BB8[8]) || (arg2 != D_80127BB8[11]) || (arg3 != D_80127BB8[0]) || (arg4 != D_80127BB8[12]))) { D_80127BB8[5] = arg0; @@ -389,7 +389,7 @@ void func_800AC880(s32 arg0) { 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) { +void cameraAddOverrideObject(Object *arg0) { if (D_800E2A88 < 0x10) { D_80127C40[D_800E2A88] = arg0; D_800E2A88++; @@ -532,7 +532,7 @@ void handle_rain_lightning(s32 updateRate) { if (gThunderTimer > 0) { gThunderTimer -= updateRate; if (gThunderTimer <= 0) { - if (D_800E2C6C >= 32769 && func_800C018C() == 0) { + if (D_800E2C6C >= 32769 && fxFadeOn() == 0) { transition_begin(&D_800E2C98); } play_sound_global(SOUND_LIGHTNING, NULL); diff --git a/src/weather.h b/src/weather.h index 5c2fa53d..c2395370 100644 --- a/src/weather.h +++ b/src/weather.h @@ -83,9 +83,9 @@ typedef struct { extern u32 osTvType; -void func_800AB308(s16 arg0, s16 arg1); +void setWeatherLimits(s16 arg0, s16 arg1); void func_800AC880(s32 arg0); -void func_800ACF60(Object *arg0); +void cameraAddOverrideObject(Object *arg0); void free_rain_memory(void); void func_800AD2C4(s32 arg0, s32 arg1, f32 arg2); void func_800AD40C(void); @@ -97,7 +97,7 @@ void render_rain_overlay(unk800E2C2C*, s32); void process_weather(Gfx **currDisplayList, MatrixS **currHudMat, Vertex **currHudVerts, TriangleList **currHudTris, s32 updateRate); void render_falling_snow(void); void free_weather_memory(void); -void func_800ABC5C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5); +void changeWeather(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5); s32 coss(s16); s32 sins(s16);