From 7c50dca3045fb7711ca2d67dfefda467ed9c2c92 Mon Sep 17 00:00:00 2001 From: Fazana <52551480+FazanaJ@users.noreply.github.com> Date: Fri, 10 Dec 2021 19:03:19 +0000 Subject: [PATCH] Camera and menu labelling (#191) * Update generate_ld.py * Menu, viewports and camera --- asm/non_matchings/menu/MenuBootLoop.s | 8 +- asm/non_matchings/menu/draw_menu_elements.s | 40 +- asm/non_matchings/menu/func_80080580.s | 20 +- asm/non_matchings/menu/func_80080BC8.s | 20 +- asm/non_matchings/menu/func_80080E90.s | 12 +- asm/non_matchings/menu/func_80081C04.s | 36 +- asm/non_matchings/menu/func_8008377C.s | 12 +- asm/non_matchings/menu/func_800853D0.s | 16 +- asm/non_matchings/menu/func_800890AC.s | 16 +- asm/non_matchings/menu/func_8008B4C8.s | 4 +- asm/non_matchings/menu/func_8008B758.s | 4 +- asm/non_matchings/menu/func_8008F00C.s | 2 +- asm/non_matchings/menu/func_8008FA54.s | 6 +- asm/non_matchings/menu/func_800904E8.s | 2 +- asm/non_matchings/menu/func_80090918.s | 16 +- asm/non_matchings/menu/func_80092188.s | 16 +- asm/non_matchings/menu/func_80092E94.s | 8 +- asm/non_matchings/menu/func_80094A5C.s | 2 +- asm/non_matchings/menu/func_80094D28.s | 8 +- asm/non_matchings/menu/func_80095728.s | 24 +- asm/non_matchings/menu/func_80096978.s | 24 +- asm/non_matchings/menu/func_80099E8C.s | 12 +- asm/non_matchings/menu/func_8009CA60.s | 36 +- asm/non_matchings/menu/func_8009CD7C.s | 4 +- asm/non_matchings/menu/func_8009E3D0.s | 4 +- asm/non_matchings/menu/menu_5_loop.s | 12 +- .../menu/menu_audio_options_loop.s | 4 +- asm/non_matchings/menu/menu_credits_loop.s | 4 +- .../menu/menu_file_select_loop.s | 8 +- .../menu/menu_game_select_init.s | 4 +- .../menu/menu_game_select_loop.s | 8 +- asm/non_matchings/menu/menu_ghost_data_init.s | 6 +- asm/non_matchings/menu/menu_ghost_data_loop.s | 8 +- .../menu/menu_magic_codes_list_loop.s | 4 +- .../menu/menu_magic_codes_loop.s | 4 +- asm/non_matchings/menu/menu_options_loop.s | 4 +- asm/non_matchings/menu/menu_results_loop.s | 8 +- .../menu/menu_save_options_loop.s | 4 +- .../menu/menu_title_screen_loop.s | 20 +- .../menu/menu_track_select_init.s | 12 +- .../menu/menu_track_select_loop.s | 4 +- .../menu/menu_trophy_race_rankings_init.s | 2 +- .../menu/menu_trophy_race_rankings_loop.s | 4 +- .../menu/menu_trophy_race_round_loop.s | 4 +- .../menu/render_file_select_menu.s | 28 +- .../menu/render_track_select_setup_ui.s | 44 +- asm/non_matchings/menu/tt_menu_loop.s | 4 +- .../unknown_032760/func_80039330.s | 4 +- asm/non_matchings/unknown_06B2B0/load_level.s | 2 +- .../unknown_078050/render_background.s | 30 +- src/camera.c | 286 ++++---- src/camera.h | 50 +- src/font.c | 6 +- src/font.h | 1 + src/menu.c | 653 ++++++++++-------- src/menu.h | 47 +- src/unknown_06B2B0.c | 8 +- src/unknown_078050.c | 55 +- src/unknown_078050.h | 12 +- 59 files changed, 899 insertions(+), 807 deletions(-) diff --git a/asm/non_matchings/menu/MenuBootLoop.s b/asm/non_matchings/menu/MenuBootLoop.s index 68cdeb1c..7334a874 100644 --- a/asm/non_matchings/menu/MenuBootLoop.s +++ b/asm/non_matchings/menu/MenuBootLoop.s @@ -81,8 +81,8 @@ glabel menu_boot_loop /* 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(D_800DF76C) # $a0, 0x800e -/* 08933C 8008873C 2484F76C */ addiu $a0, %lo(D_800DF76C) # addiu $a0, $a0, -0x894 +/* 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) @@ -100,7 +100,7 @@ glabel menu_boot_loop .L8008876C: /* 08936C 8008876C 10200011 */ beqz $at, .L800887B4 /* 089370 80088770 3C048012 */ lui $a0, %hi(D_801263A0) # $a0, 0x8012 -/* 089374 80088774 3C05800E */ lui $a1, %hi(D_800DF7DC) # $a1, 0x800e +/* 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 @@ -109,7 +109,7 @@ glabel menu_boot_loop /* 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(D_800DF7DC) # addiu $a1, $a1, -0x824 +/* 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 diff --git a/asm/non_matchings/menu/draw_menu_elements.s b/asm/non_matchings/menu/draw_menu_elements.s index 8add2aae..41c146e0 100644 --- a/asm/non_matchings/menu/draw_menu_elements.s +++ b/asm/non_matchings/menu/draw_menu_elements.s @@ -36,10 +36,10 @@ glabel draw_menu_elements /* 082E60 80082260 12200175 */ beqz $s1, .L80082838 /* 082E64 80082264 3C17800E */ lui $s7, %hi(D_800DF7A0) # $s7, 0x800e /* 082E68 80082268 3C1E800E */ lui $fp, %hi(D_800DF79C) # $fp, 0x800e -/* 082E6C 8008226C 3C14800E */ lui $s4, %hi(D_800DF75C) # $s4, 0x800e +/* 082E6C 8008226C 3C14800E */ lui $s4, %hi(gMenuImageStack) # $s4, 0x800e /* 082E70 80082270 4481B000 */ mtc1 $at, $f22 /* 082E74 80082274 8FA40070 */ lw $a0, 0x70($sp) -/* 082E78 80082278 2694F75C */ addiu $s4, %lo(D_800DF75C) # addiu $s4, $s4, -0x8a4 +/* 082E78 80082278 2694F75C */ addiu $s4, %lo(gMenuImageStack) # addiu $s4, $s4, -0x8a4 /* 082E7C 8008227C 27DEF79C */ addiu $fp, %lo(D_800DF79C) # addiu $fp, $fp, -0x864 /* 082E80 80082280 26F7F7A0 */ addiu $s7, %lo(D_800DF7A0) # addiu $s7, $s7, -0x860 .L80082284: @@ -171,8 +171,8 @@ glabel L80082454 /* 083060 80082460 0000A825 */ move $s5, $zero .L80082464: /* 083064 80082464 92180010 */ lbu $t8, 0x10($s0) -/* 083068 80082468 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e -/* 08306C 8008246C AC38F764 */ sw $t8, %lo(D_800DF764)($at) +/* 083068 80082468 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e +/* 08306C 8008246C AC38F764 */ sw $t8, %lo(sMenuGuiOpacity)($at) /* 083070 80082470 8E190014 */ lw $t9, 0x14($s0) /* 083074 80082474 920A000D */ lbu $t2, 0xd($s0) /* 083078 80082478 9207000C */ lbu $a3, 0xc($s0) @@ -340,23 +340,23 @@ glabel L80082608 /* 0832E8 800826E8 000E7940 */ sll $t7, $t6, 5 /* 0832EC 800826EC 01AFC821 */ addu $t9, $t5, $t7 /* 0832F0 800826F0 46169102 */ mul.s $f4, $f18, $f22 -/* 0832F4 800826F4 3C01800E */ lui $at, %hi(D_800DF4A4) # $at, 0x800e +/* 0832F4 800826F4 3C01800E */ lui $at, %hi(sMenuGuiColourR) # $at, 0x800e /* 0832F8 800826F8 E7240008 */ swc1 $f4, 8($t9) /* 0832FC 800826FC 920C000C */ lbu $t4, 0xc($s0) /* 083300 80082700 00000000 */ nop -/* 083304 80082704 A02CF4A4 */ sb $t4, %lo(D_800DF4A4)($at) +/* 083304 80082704 A02CF4A4 */ sb $t4, %lo(sMenuGuiColourR)($at) /* 083308 80082708 920B000D */ lbu $t3, 0xd($s0) -/* 08330C 8008270C 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e -/* 083310 80082710 A02BF4A8 */ sb $t3, %lo(D_800DF4A8)($at) +/* 08330C 8008270C 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e +/* 083310 80082710 A02BF4A8 */ sb $t3, %lo(sMenuGuiColourG)($at) /* 083314 80082714 9208000E */ lbu $t0, 0xe($s0) -/* 083318 80082718 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e -/* 08331C 8008271C A028F4AC */ sb $t0, %lo(D_800DF4AC)($at) +/* 083318 80082718 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e +/* 08331C 8008271C A028F4AC */ sb $t0, %lo(sMenuGuiColourB)($at) /* 083320 80082720 9209000F */ lbu $t1, 0xf($s0) /* 083324 80082724 3C01800E */ lui $at, %hi(D_800DF4B0) # $at, 0x800e /* 083328 80082728 A029F4B0 */ sb $t1, %lo(D_800DF4B0)($at) /* 08332C 8008272C 920A0010 */ lbu $t2, 0x10($s0) -/* 083330 80082730 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e -/* 083334 80082734 AC2AF764 */ sw $t2, %lo(D_800DF764)($at) +/* 083330 80082730 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e +/* 083334 80082734 AC2AF764 */ sw $t2, %lo(sMenuGuiOpacity)($at) /* 083338 80082738 8E040014 */ lw $a0, 0x14($s0) /* 08333C 8008273C 0C027298 */ jal func_8009CA60 /* 083340 80082740 00000000 */ nop @@ -432,17 +432,17 @@ glabel L800827C0 /* 083444 80082844 02C02025 */ move $a0, $s6 /* 083448 80082848 240200FF */ li $v0, 255 .L8008284C: -/* 08344C 8008284C 3C01800E */ lui $at, %hi(D_800DF4A4) # $at, 0x800e -/* 083450 80082850 A022F4A4 */ sb $v0, %lo(D_800DF4A4)($at) -/* 083454 80082854 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e -/* 083458 80082858 A022F4A8 */ sb $v0, %lo(D_800DF4A8)($at) -/* 08345C 8008285C 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e -/* 083460 80082860 A022F4AC */ sb $v0, %lo(D_800DF4AC)($at) +/* 08344C 8008284C 3C01800E */ lui $at, %hi(sMenuGuiColourR) # $at, 0x800e +/* 083450 80082850 A022F4A4 */ sb $v0, %lo(sMenuGuiColourR)($at) +/* 083454 80082854 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e +/* 083458 80082858 A022F4A8 */ sb $v0, %lo(sMenuGuiColourG)($at) +/* 08345C 8008285C 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e +/* 083460 80082860 A022F4AC */ sb $v0, %lo(sMenuGuiColourB)($at) /* 083464 80082864 3C01800E */ lui $at, %hi(D_800DF4B0) # $at, 0x800e /* 083468 80082868 A020F4B0 */ sb $zero, %lo(D_800DF4B0)($at) -/* 08346C 8008286C 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e +/* 08346C 8008286C 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e /* 083470 80082870 240D00FF */ li $t5, 255 -/* 083474 80082874 AC2DF764 */ sw $t5, %lo(D_800DF764)($at) +/* 083474 80082874 AC2DF764 */ sw $t5, %lo(sMenuGuiOpacity)($at) .L80082878: /* 083478 80082878 8FBF006C */ lw $ra, 0x6c($sp) /* 08347C 8008287C C7B50038 */ lwc1 $f21, 0x38($sp) diff --git a/asm/non_matchings/menu/func_80080580.s b/asm/non_matchings/menu/func_80080580.s index 53598c02..197f48c1 100644 --- a/asm/non_matchings/menu/func_80080580.s +++ b/asm/non_matchings/menu/func_80080580.s @@ -274,10 +274,10 @@ glabel func_80080580 /* 0815B0 800809B0 24190001 */ li $t9, 1 /* 0815B4 800809B4 ADF90018 */ sw $t9, 0x18($t7) /* 0815B8 800809B8 8EE20000 */ lw $v0, ($s7) -/* 0815BC 800809BC 3C19800E */ lui $t9, %hi(D_800E1C70) # $t9, 0x800e +/* 0815BC 800809BC 3C19800E */ lui $t9, %hi(dMenuHudSettings) # $t9, 0x800e /* 0815C0 800809C0 244E0008 */ addiu $t6, $v0, 8 /* 0815C4 800809C4 AEEE0000 */ sw $t6, ($s7) -/* 0815C8 800809C8 27391C70 */ addiu $t9, %lo(D_800E1C70) # addiu $t9, $t9, 0x1c70 +/* 0815C8 800809C8 27391C70 */ addiu $t9, %lo(dMenuHudSettings) # addiu $t9, $t9, 0x1c70 /* 0815CC 800809CC 3C180600 */ lui $t8, 0x600 /* 0815D0 800809D0 AC580000 */ sw $t8, ($v0) /* 0815D4 800809D4 10C0001C */ beqz $a2, .L80080A48 @@ -286,10 +286,10 @@ glabel func_80080580 /* 0815E0 800809E0 3C0E0702 */ lui $t6, (0x07020010 >> 16) # lui $t6, 0x702 /* 0815E4 800809E4 244F0008 */ addiu $t7, $v0, 8 /* 0815E8 800809E8 AEEF0000 */ sw $t7, ($s7) - # D_800E1C70 - 0x7FFFFFC0 = 0xE1CB0 -/* 0815EC 800809EC 3C18000E */ lui $t8, %hi(D_800E1C70 - 0x7FFFFFC0) # $t8, 0xe - # D_800E1C70 - 0x7FFFFFC0 = 0xE1CB0 -/* 0815F0 800809F0 27181CB0 */ addiu $t8, %lo(D_800E1C70 - 0x7FFFFFC0) # addiu $t8, $t8, 0x1cb0 + # dMenuHudSettings - 0x7FFFFFC0 = 0xE1CB0 +/* 0815EC 800809EC 3C18000E */ lui $t8, %hi(dMenuHudSettings - 0x7FFFFFC0) # $t8, 0xe + # dMenuHudSettings - 0x7FFFFFC0 = 0xE1CB0 +/* 0815F0 800809F0 27181CB0 */ addiu $t8, %lo(dMenuHudSettings - 0x7FFFFFC0) # addiu $t8, $t8, 0x1cb0 /* 0815F4 800809F4 35CE0010 */ ori $t6, (0x07020010 & 0xFFFF) # ori $t6, $t6, 0x10 /* 0815F8 800809F8 AC4E0000 */ sw $t6, ($v0) /* 0815FC 800809FC AC580004 */ sw $t8, 4($v0) @@ -316,10 +316,10 @@ glabel func_80080580 /* 08164C 80080A4C 3C0E0702 */ lui $t6, (0x07020010 >> 16) # lui $t6, 0x702 /* 081650 80080A50 244F0008 */ addiu $t7, $v0, 8 /* 081654 80080A54 AEEF0000 */ sw $t7, ($s7) - # D_800E1C70 - 0x7FFFFFD0 = 0xE1CA0 -/* 081658 80080A58 3C19000E */ lui $t9, %hi(D_800E1C70 - 0x7FFFFFD0) # $t9, 0xe - # D_800E1C70 - 0x7FFFFFD0 = 0xE1CA0 -/* 08165C 80080A5C 27391CA0 */ addiu $t9, %lo(D_800E1C70 - 0x7FFFFFD0) # addiu $t9, $t9, 0x1ca0 + # dMenuHudSettings - 0x7FFFFFD0 = 0xE1CA0 +/* 081658 80080A58 3C19000E */ lui $t9, %hi(dMenuHudSettings - 0x7FFFFFD0) # $t9, 0xe + # dMenuHudSettings - 0x7FFFFFD0 = 0xE1CA0 +/* 08165C 80080A5C 27391CA0 */ addiu $t9, %lo(dMenuHudSettings - 0x7FFFFFD0) # addiu $t9, $t9, 0x1ca0 /* 081660 80080A60 35CE0010 */ ori $t6, (0x07020010 & 0xFFFF) # ori $t6, $t6, 0x10 /* 081664 80080A64 0000F825 */ move $ra, $zero /* 081668 80080A68 3C098000 */ lui $t1, 0x8000 diff --git a/asm/non_matchings/menu/func_80080BC8.s b/asm/non_matchings/menu/func_80080BC8.s index 4f307d8f..758f9301 100644 --- a/asm/non_matchings/menu/func_80080BC8.s +++ b/asm/non_matchings/menu/func_80080BC8.s @@ -9,10 +9,10 @@ glabel func_80080BC8 /* 0817E4 80080BE4 AFB1001C */ sw $s1, 0x1c($sp) /* 0817E8 80080BE8 AFB00018 */ sw $s0, 0x18($sp) /* 0817EC 80080BEC 8C820000 */ lw $v0, ($a0) -/* 0817F0 80080BF0 3C18800E */ lui $t8, %hi(D_800E1C70) # $t8, 0x800e +/* 0817F0 80080BF0 3C18800E */ lui $t8, %hi(dMenuHudSettings) # $t8, 0x800e /* 0817F4 80080BF4 244E0008 */ addiu $t6, $v0, 8 /* 0817F8 80080BF8 AC8E0000 */ sw $t6, ($a0) -/* 0817FC 80080BFC 27181C70 */ addiu $t8, %lo(D_800E1C70) # addiu $t8, $t8, 0x1c70 +/* 0817FC 80080BFC 27181C70 */ addiu $t8, %lo(dMenuHudSettings) # addiu $t8, $t8, 0x1c70 /* 081800 80080C00 3C0F0600 */ lui $t7, 0x600 /* 081804 80080C04 3C09800E */ lui $t1, %hi(D_800E1DB8) # $t1, 0x800e /* 081808 80080C08 AC4F0000 */ sw $t7, ($v0) @@ -23,20 +23,20 @@ glabel func_80080BC8 /* 08181C 80080C1C 00006825 */ move $t5, $zero /* 081820 80080C20 1920007E */ blez $t1, .L80080E1C /* 081824 80080C24 00003825 */ move $a3, $zero - # D_800E1C70 - 0x7FFFFFD0 = 0xE1CA0 -/* 081828 80080C28 3C16000E */ lui $s6, %hi(D_800E1C70 - 0x7FFFFFD0) # $s6, 0xe - # D_800E1C70 - 0x7FFFFFC0 = 0xE1CB0 -/* 08182C 80080C2C 3C11000E */ lui $s1, %hi(D_800E1C70 - 0x7FFFFFC0) # $s1, 0xe + # dMenuHudSettings - 0x7FFFFFD0 = 0xE1CA0 +/* 081828 80080C28 3C16000E */ lui $s6, %hi(dMenuHudSettings - 0x7FFFFFD0) # $s6, 0xe + # dMenuHudSettings - 0x7FFFFFC0 = 0xE1CB0 +/* 08182C 80080C2C 3C11000E */ lui $s1, %hi(dMenuHudSettings - 0x7FFFFFC0) # $s1, 0xe /* 081830 80080C30 3C1F0702 */ lui $ra, (0x07020010 >> 16) # lui $ra, 0x702 /* 081834 80080C34 3C0B8012 */ lui $t3, %hi(D_80126C2C) # $t3, 0x8012 /* 081838 80080C38 3C0A800E */ lui $t2, %hi(D_800E1DB4) # $t2, 0x800e /* 08183C 80080C3C 254A1DB4 */ addiu $t2, %lo(D_800E1DB4) # addiu $t2, $t2, 0x1db4 /* 081840 80080C40 256B6C2C */ addiu $t3, %lo(D_80126C2C) # addiu $t3, $t3, 0x6c2c /* 081844 80080C44 37FF0010 */ ori $ra, (0x07020010 & 0xFFFF) # ori $ra, $ra, 0x10 - # D_800E1C70 - 0x7FFFFFC0 = 0xE1CB0 -/* 081848 80080C48 26311CB0 */ addiu $s1, %lo(D_800E1C70 - 0x7FFFFFC0) # addiu $s1, $s1, 0x1cb0 - # D_800E1C70 - 0x7FFFFFD0 = 0xE1CA0 -/* 08184C 80080C4C 26D61CA0 */ addiu $s6, %lo(D_800E1C70 - 0x7FFFFFD0) # addiu $s6, $s6, 0x1ca0 + # dMenuHudSettings - 0x7FFFFFC0 = 0xE1CB0 +/* 081848 80080C48 26311CB0 */ addiu $s1, %lo(dMenuHudSettings - 0x7FFFFFC0) # addiu $s1, $s1, 0x1cb0 + # dMenuHudSettings - 0x7FFFFFD0 = 0xE1CA0 +/* 08184C 80080C4C 26D61CA0 */ addiu $s6, %lo(dMenuHudSettings - 0x7FFFFFD0) # addiu $s6, $s6, 0x1ca0 /* 081850 80080C50 3C150500 */ lui $s5, 0x500 /* 081854 80080C54 3C140400 */ lui $s4, 0x400 /* 081858 80080C58 3C13E700 */ lui $s3, 0xe700 diff --git a/asm/non_matchings/menu/func_80080E90.s b/asm/non_matchings/menu/func_80080E90.s index 0886cc4d..4820e0ba 100644 --- a/asm/non_matchings/menu/func_80080E90.s +++ b/asm/non_matchings/menu/func_80080E90.s @@ -11,22 +11,22 @@ glabel func_80080E90 /* 081AB4 80080EB4 AFB1001C */ sw $s1, 0x1c($sp) /* 081AB8 80080EB8 AFB00018 */ sw $s0, 0x18($sp) /* 081ABC 80080EBC 8C830000 */ lw $v1, ($a0) -/* 081AC0 80080EC0 3C18800E */ lui $t8, %hi(D_800E1C70) # $t8, 0x800e +/* 081AC0 80080EC0 3C18800E */ lui $t8, %hi(dMenuHudSettings) # $t8, 0x800e /* 081AC4 80080EC4 246E0008 */ addiu $t6, $v1, 8 /* 081AC8 80080EC8 AC8E0000 */ sw $t6, ($a0) -/* 081ACC 80080ECC 27181C70 */ addiu $t8, %lo(D_800E1C70) # addiu $t8, $t8, 0x1c70 +/* 081ACC 80080ECC 27181C70 */ addiu $t8, %lo(dMenuHudSettings) # addiu $t8, $t8, 0x1c70 /* 081AD0 80080ED0 3C0F0600 */ lui $t7, 0x600 /* 081AD4 80080ED4 AC6F0000 */ sw $t7, ($v1) /* 081AD8 80080ED8 AC780004 */ sw $t8, 4($v1) /* 081ADC 80080EDC 8C830000 */ lw $v1, ($a0) - # D_800E1C70 - 0x7FFFFFB0 = 0xE1CC0 -/* 081AE0 80080EE0 3C0F000E */ lui $t7, %hi(D_800E1C70 - 0x7FFFFFB0) # $t7, 0xe + # dMenuHudSettings - 0x7FFFFFB0 = 0xE1CC0 +/* 081AE0 80080EE0 3C0F000E */ lui $t7, %hi(dMenuHudSettings - 0x7FFFFFB0) # $t7, 0xe /* 081AE4 80080EE4 24790008 */ addiu $t9, $v1, 8 /* 081AE8 80080EE8 AC990000 */ sw $t9, ($a0) /* 081AEC 80080EEC 3C0E0702 */ lui $t6, (0x07020010 >> 16) # lui $t6, 0x702 /* 081AF0 80080EF0 35CE0010 */ ori $t6, (0x07020010 & 0xFFFF) # ori $t6, $t6, 0x10 - # D_800E1C70 - 0x7FFFFFB0 = 0xE1CC0 -/* 081AF4 80080EF4 25EF1CC0 */ addiu $t7, %lo(D_800E1C70 - 0x7FFFFFB0) # addiu $t7, $t7, 0x1cc0 + # dMenuHudSettings - 0x7FFFFFB0 = 0xE1CC0 +/* 081AF4 80080EF4 25EF1CC0 */ addiu $t7, %lo(dMenuHudSettings - 0x7FFFFFB0) # addiu $t7, $t7, 0x1cc0 /* 081AF8 80080EF8 AC6F0004 */ sw $t7, 4($v1) /* 081AFC 80080EFC AC6E0000 */ sw $t6, ($v1) /* 081B00 80080F00 8FB70058 */ lw $s7, 0x58($sp) diff --git a/asm/non_matchings/menu/func_80081C04.s b/asm/non_matchings/menu/func_80081C04.s index dcda4470..716c7f82 100644 --- a/asm/non_matchings/menu/func_80081C04.s +++ b/asm/non_matchings/menu/func_80081C04.s @@ -90,7 +90,7 @@ glabel func_80081C04 .L80081D40: /* 082940 80081D40 304B0008 */ andi $t3, $v0, 8 /* 082944 80081D44 11600003 */ beqz $t3, .L80081D54 -/* 082948 80081D48 3C01800E */ lui $at, %hi(D_800DF4A4) # $at, 0x800e +/* 082948 80081D48 3C01800E */ lui $at, %hi(sMenuGuiColourR) # $at, 0x800e /* 08294C 80081D4C 10000005 */ b .L80081D64 /* 082950 80081D50 24C60007 */ addiu $a2, $a2, 7 .L80081D54: @@ -101,24 +101,24 @@ glabel func_80081C04 .L80081D64: /* 082964 80081D64 8FAD0070 */ lw $t5, 0x70($sp) .L80081D68: -/* 082968 80081D68 A027F4A4 */ sb $a3, %lo(D_800DF4A4)($at) -/* 08296C 80081D6C 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e +/* 082968 80081D68 A027F4A4 */ sb $a3, %lo(sMenuGuiColourR)($at) +/* 08296C 80081D6C 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e /* 082970 80081D70 8FAE0074 */ lw $t6, 0x74($sp) -/* 082974 80081D74 A02DF4A8 */ sb $t5, %lo(D_800DF4A8)($at) -/* 082978 80081D78 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e +/* 082974 80081D74 A02DF4A8 */ sb $t5, %lo(sMenuGuiColourG)($at) +/* 082978 80081D78 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e /* 08297C 80081D7C 8FAF0078 */ lw $t7, 0x78($sp) -/* 082980 80081D80 A02EF4AC */ sb $t6, %lo(D_800DF4AC)($at) -/* 082984 80081D84 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e +/* 082980 80081D80 A02EF4AC */ sb $t6, %lo(sMenuGuiColourB)($at) +/* 082984 80081D84 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e /* 082988 80081D88 00002025 */ move $a0, $zero /* 08298C 80081D8C AFA60068 */ sw $a2, 0x68($sp) /* 082990 80081D90 0C01EFC7 */ jal func_8007BF1C -/* 082994 80081D94 AC2FF764 */ sw $t7, %lo(D_800DF764)($at) +/* 082994 80081D94 AC2FF764 */ sw $t7, %lo(sMenuGuiOpacity)($at) /* 082998 80081D98 0C01A142 */ jal func_80068508 /* 08299C 80081D9C 24040001 */ li $a0, 1 /* 0829A0 80081DA0 8FA60068 */ lw $a2, 0x68($sp) -/* 0829A4 80081DA4 3C12800E */ lui $s2, %hi(D_800DF75C) # $s2, 0x800e +/* 0829A4 80081DA4 3C12800E */ lui $s2, %hi(gMenuImageStack) # $s2, 0x800e /* 0829A8 80081DA8 44862000 */ mtc1 $a2, $f4 -/* 0829AC 80081DAC 2652F75C */ addiu $s2, %lo(D_800DF75C) # addiu $s2, $s2, -0x8a4 +/* 0829AC 80081DAC 2652F75C */ addiu $s2, %lo(gMenuImageStack) # addiu $s2, $s2, -0x8a4 /* 0829B0 80081DB0 468021A0 */ cvt.s.w $f6, $f4 /* 0829B4 80081DB4 8E580000 */ lw $t8, ($s2) /* 0829B8 80081DB8 00008025 */ move $s0, $zero @@ -145,21 +145,21 @@ glabel func_80081C04 /* 082A04 80081E04 0C01A142 */ jal func_80068508 /* 082A08 80081E08 00002025 */ move $a0, $zero /* 082A0C 80081E0C 240200FF */ li $v0, 255 -/* 082A10 80081E10 3C01800E */ lui $at, %hi(D_800DF4A4) # $at, 0x800e -/* 082A14 80081E14 A022F4A4 */ sb $v0, %lo(D_800DF4A4)($at) -/* 082A18 80081E18 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e -/* 082A1C 80081E1C A022F4A8 */ sb $v0, %lo(D_800DF4A8)($at) -/* 082A20 80081E20 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e +/* 082A10 80081E10 3C01800E */ lui $at, %hi(sMenuGuiColourR) # $at, 0x800e +/* 082A14 80081E14 A022F4A4 */ sb $v0, %lo(sMenuGuiColourR)($at) +/* 082A18 80081E18 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e +/* 082A1C 80081E1C A022F4A8 */ sb $v0, %lo(sMenuGuiColourG)($at) +/* 082A20 80081E20 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e /* 082A24 80081E24 8FBF002C */ lw $ra, 0x2c($sp) -/* 082A28 80081E28 A022F4AC */ sb $v0, %lo(D_800DF4AC)($at) -/* 082A2C 80081E2C 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e +/* 082A28 80081E28 A022F4AC */ sb $v0, %lo(sMenuGuiColourB)($at) +/* 082A2C 80081E2C 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e /* 082A30 80081E30 240B00FF */ li $t3, 255 /* 082A34 80081E34 8FB00018 */ lw $s0, 0x18($sp) /* 082A38 80081E38 8FB1001C */ lw $s1, 0x1c($sp) /* 082A3C 80081E3C 8FB20020 */ lw $s2, 0x20($sp) /* 082A40 80081E40 8FB30024 */ lw $s3, 0x24($sp) /* 082A44 80081E44 8FB40028 */ lw $s4, 0x28($sp) -/* 082A48 80081E48 AC2BF764 */ sw $t3, %lo(D_800DF764)($at) +/* 082A48 80081E48 AC2BF764 */ sw $t3, %lo(sMenuGuiOpacity)($at) /* 082A4C 80081E4C 03E00008 */ jr $ra /* 082A50 80081E50 27BD0060 */ addiu $sp, $sp, 0x60 diff --git a/asm/non_matchings/menu/func_8008377C.s b/asm/non_matchings/menu/func_8008377C.s index 4badf1e7..9da16249 100644 --- a/asm/non_matchings/menu/func_8008377C.s +++ b/asm/non_matchings/menu/func_8008377C.s @@ -26,10 +26,10 @@ glabel func_8008377C /* 0843DC 800837DC 44822000 */ mtc1 $v0, $f4 /* 0843E0 800837E0 44814000 */ mtc1 $at, $f8 /* 0843E4 800837E4 468021A0 */ cvt.s.w $f6, $f4 -/* 0843E8 800837E8 3C17800E */ lui $s7, %hi(D_800DF764) # $s7, 0x800e +/* 0843E8 800837E8 3C17800E */ lui $s7, %hi(sMenuGuiOpacity) # $s7, 0x800e /* 0843EC 800837EC 000278C0 */ sll $t7, $v0, 3 /* 0843F0 800837F0 46083002 */ mul.s $f0, $f6, $f8 -/* 0843F4 800837F4 26F7F764 */ addiu $s7, %lo(D_800DF764) # addiu $s7, $s7, -0x89c +/* 0843F4 800837F4 26F7F764 */ addiu $s7, %lo(sMenuGuiOpacity) # addiu $s7, $s7, -0x89c /* 0843F8 800837F8 25F8FFFF */ addiu $t8, $t7, -1 /* 0843FC 800837FC AEF80000 */ sw $t8, ($s7) /* 084400 80083800 E7A00048 */ swc1 $f0, 0x48($sp) @@ -38,17 +38,17 @@ glabel func_8008377C /* 08440C 8008380C 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 084410 80083810 C7A00048 */ lwc1 $f0, 0x48($sp) /* 084414 80083814 44815000 */ mtc1 $at, $f10 -/* 084418 80083818 3C05800E */ lui $a1, %hi(D_800DF7DC) # $a1, 0x800e +/* 084418 80083818 3C05800E */ lui $a1, %hi(sGameTitleTileOffsets) # $a1, 0x800e /* 08441C 8008381C 460A0032 */ c.eq.s $f0, $f10 -/* 084420 80083820 24A5F7DC */ addiu $a1, %lo(D_800DF7DC) # addiu $a1, $a1, -0x824 +/* 084420 80083820 24A5F7DC */ addiu $a1, %lo(sGameTitleTileOffsets) # addiu $a1, $a1, -0x824 /* 084424 80083824 4501000F */ bc1t .L80083864 /* 084428 80083828 02C02025 */ move $a0, $s6 -/* 08442C 8008382C 3C05800E */ lui $a1, %hi(D_800DF7DC) # $a1, 0x800e +/* 08442C 8008382C 3C05800E */ lui $a1, %hi(sGameTitleTileOffsets) # $a1, 0x800e /* 084430 80083830 2419FFFE */ li $t9, -2 /* 084434 80083834 24080001 */ li $t0, 1 /* 084438 80083838 AFA8001C */ sw $t0, 0x1c($sp) /* 08443C 8008383C AFB90018 */ sw $t9, 0x18($sp) -/* 084440 80083840 24A5F7DC */ addiu $a1, %lo(D_800DF7DC) # addiu $a1, $a1, -0x824 +/* 084440 80083840 24A5F7DC */ addiu $a1, %lo(sGameTitleTileOffsets) # addiu $a1, $a1, -0x824 /* 084444 80083844 02C02025 */ move $a0, $s6 /* 084448 80083848 3C064320 */ lui $a2, 0x4320 /* 08444C 8008384C 3C074250 */ lui $a3, 0x4250 diff --git a/asm/non_matchings/menu/func_800853D0.s b/asm/non_matchings/menu/func_800853D0.s index e6982d9a..5a83ac16 100644 --- a/asm/non_matchings/menu/func_800853D0.s +++ b/asm/non_matchings/menu/func_800853D0.s @@ -366,11 +366,11 @@ glabel L80085828 /* 08650C 8008590C AFA5007C */ sw $a1, 0x7c($sp) /* 086510 80085910 8FA5007C */ lw $a1, 0x7c($sp) /* 086514 80085914 8FAC0088 */ lw $t4, 0x88($sp) -/* 086518 80085918 3C03800E */ lui $v1, %hi(D_800DF75C) # $v1, 0x800e +/* 086518 80085918 3C03800E */ lui $v1, %hi(gMenuImageStack) # $v1, 0x800e /* 08651C 8008591C 00AC1023 */ subu $v0, $a1, $t4 /* 086520 80085920 244EFFCF */ addiu $t6, $v0, -0x31 /* 086524 80085924 448E2000 */ mtc1 $t6, $f4 -/* 086528 80085928 2463F75C */ addiu $v1, %lo(D_800DF75C) # addiu $v1, $v1, -0x8a4 +/* 086528 80085928 2463F75C */ addiu $v1, %lo(gMenuImageStack) # addiu $v1, $v1, -0x8a4 /* 08652C 8008592C 468021A0 */ cvt.s.w $f6, $f4 /* 086530 80085930 8C6D0000 */ lw $t5, ($v1) /* 086534 80085934 2458FFE8 */ addiu $t8, $v0, -0x18 @@ -386,10 +386,10 @@ glabel L80085828 /* 08655C 8008595C 0C01EFC7 */ jal func_8007BF1C /* 086560 80085960 00002025 */ move $a0, $zero /* 086564 80085964 8FAB0084 */ lw $t3, 0x84($sp) -/* 086568 80085968 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e +/* 086568 80085968 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e /* 08656C 8008596C 256CFF7B */ addiu $t4, $t3, -0x85 /* 086570 80085970 448C8000 */ mtc1 $t4, $f16 -/* 086574 80085974 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 086574 80085974 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 086578 80085978 468084A0 */ cvt.s.w $f18, $f16 /* 08657C 8008597C 8C4E0000 */ lw $t6, ($v0) /* 086580 80085980 24040002 */ li $a0, 2 @@ -399,10 +399,10 @@ glabel L80085828 /* 086590 80085990 0C027298 */ jal func_8009CA60 /* 086594 80085994 A5ED0058 */ sh $t5, 0x58($t7) /* 086598 80085998 8FB80084 */ lw $t8, 0x84($sp) -/* 08659C 8008599C 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e +/* 08659C 8008599C 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e /* 0865A0 800859A0 270AFF83 */ addiu $t2, $t8, -0x7d /* 0865A4 800859A4 448A2000 */ mtc1 $t2, $f4 -/* 0865A8 800859A8 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 0865A8 800859A8 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 0865AC 800859AC 468021A0 */ cvt.s.w $f6, $f4 /* 0865B0 800859B0 8C590000 */ lw $t9, ($v0) /* 0865B4 800859B4 24040002 */ li $a0, 2 @@ -414,10 +414,10 @@ glabel L80085828 /* 0865CC 800859CC 0C01EFC7 */ jal func_8007BF1C /* 0865D0 800859D0 24040001 */ li $a0, 1 /* 0865D4 800859D4 8FAE0084 */ lw $t6, 0x84($sp) -/* 0865D8 800859D8 3C0F800E */ lui $t7, %hi(D_800DF75C) # $t7, 0x800e +/* 0865D8 800859D8 3C0F800E */ lui $t7, %hi(gMenuImageStack) # $t7, 0x800e /* 0865DC 800859DC 25CDFF80 */ addiu $t5, $t6, -0x80 /* 0865E0 800859E0 448D4000 */ mtc1 $t5, $f8 -/* 0865E4 800859E4 8DEFF75C */ lw $t7, %lo(D_800DF75C)($t7) +/* 0865E4 800859E4 8DEFF75C */ lw $t7, %lo(gMenuImageStack)($t7) /* 0865E8 800859E8 468042A0 */ cvt.s.w $f10, $f8 /* 0865EC 800859EC 01F0C021 */ addu $t8, $t7, $s0 /* 0865F0 800859F0 E70A000C */ swc1 $f10, 0xc($t8) diff --git a/asm/non_matchings/menu/func_800890AC.s b/asm/non_matchings/menu/func_800890AC.s index dbc41455..13cd5c84 100644 --- a/asm/non_matchings/menu/func_800890AC.s +++ b/asm/non_matchings/menu/func_800890AC.s @@ -94,11 +94,11 @@ glabel func_800890AC /* 089E0C 8008920C 15E000C0 */ bnez $t7, .L80089510 /* 089E10 80089210 24190001 */ li $t9, 1 /* 089E14 80089214 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 089E18 80089218 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 089E18 80089218 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 089E1C 8008921C AFB80030 */ sw $t8, 0x30($sp) /* 089E20 80089220 AC39F47C */ sw $t9, %lo(gMenuDelay)($at) /* 089E24 80089224 0C030076 */ jal func_800C01D8 -/* 089E28 80089228 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 089E28 80089228 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 089E2C 8008922C 100000B9 */ b .L80089514 /* 089E30 80089230 8FAF0030 */ lw $t7, 0x30($sp) .L80089234: @@ -126,11 +126,11 @@ glabel func_800890AC /* 089E88 80089288 240E0001 */ li $t6, 1 /* 089E8C 8008928C 240F0001 */ li $t7, 1 /* 089E90 80089290 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 089E94 80089294 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 089E94 80089294 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 089E98 80089298 AFAE0030 */ sw $t6, 0x30($sp) /* 089E9C 8008929C AC2FF47C */ sw $t7, %lo(gMenuDelay)($at) /* 089EA0 800892A0 0C030076 */ jal func_800C01D8 -/* 089EA4 800892A4 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 089EA4 800892A4 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 089EA8 800892A8 3C0A8012 */ lui $t2, %hi(D_801263E0) # $t2, 0x8012 /* 089EAC 800892AC 10000013 */ b .L800892FC /* 089EB0 800892B0 254A63E0 */ addiu $t2, %lo(D_801263E0) # addiu $t2, $t2, 0x63e0 @@ -146,11 +146,11 @@ glabel func_800890AC /* 089ED4 800892D4 24190001 */ li $t9, 1 /* 089ED8 800892D8 240C0001 */ li $t4, 1 /* 089EDC 800892DC 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 089EE0 800892E0 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 089EE0 800892E0 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 089EE4 800892E4 AFB90030 */ sw $t9, 0x30($sp) /* 089EE8 800892E8 AC2CF47C */ sw $t4, %lo(gMenuDelay)($at) /* 089EEC 800892EC 0C030076 */ jal func_800C01D8 -/* 089EF0 800892F0 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 089EF0 800892F0 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 089EF4 800892F4 3C0A8012 */ lui $t2, %hi(D_801263E0) # $t2, 0x8012 /* 089EF8 800892F8 254A63E0 */ addiu $t2, %lo(D_801263E0) # addiu $t2, $t2, 0x63e0 .L800892FC: @@ -206,11 +206,11 @@ glabel func_800890AC /* 089FA4 800893A4 240C0001 */ li $t4, 1 /* 089FA8 800893A8 240D0001 */ li $t5, 1 /* 089FAC 800893AC 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 089FB0 800893B0 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 089FB0 800893B0 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 089FB4 800893B4 AFAC0030 */ sw $t4, 0x30($sp) /* 089FB8 800893B8 AC2DF47C */ sw $t5, %lo(gMenuDelay)($at) /* 089FBC 800893BC 0C030076 */ jal func_800C01D8 -/* 089FC0 800893C0 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 089FC0 800893C0 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 089FC4 800893C4 10000053 */ b .L80089514 /* 089FC8 800893C8 8FAF0030 */ lw $t7, 0x30($sp) .L800893CC: diff --git a/asm/non_matchings/menu/func_8008B4C8.s b/asm/non_matchings/menu/func_8008B4C8.s index 5b79d560..cf14a99a 100644 --- a/asm/non_matchings/menu/func_8008B4C8.s +++ b/asm/non_matchings/menu/func_8008B4C8.s @@ -36,9 +36,9 @@ glabel func_8008B4C8 /* 08C148 8008B548 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 08C14C 8008B54C 0C01BAEA */ jal func_8006EBA8 /* 08C150 8008B550 AC32F47C */ sw $s2, %lo(gMenuDelay)($at) -/* 08C154 8008B554 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08C154 8008B554 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08C158 8008B558 0C030076 */ jal func_800C01D8 -/* 08C15C 8008B55C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 08C15C 8008B55C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 08C160 8008B560 3C028012 */ lui $v0, %hi(D_801267D8) # $v0, 0x8012 /* 08C164 8008B564 2411FFFF */ li $s1, -1 /* 08C168 8008B568 244267D8 */ addiu $v0, %lo(D_801267D8) # addiu $v0, $v0, 0x67d8 diff --git a/asm/non_matchings/menu/func_8008B758.s b/asm/non_matchings/menu/func_8008B758.s index dfb66d3d..15834f04 100644 --- a/asm/non_matchings/menu/func_8008B758.s +++ b/asm/non_matchings/menu/func_8008B758.s @@ -128,10 +128,10 @@ glabel func_8008B758 /* 08C534 8008B934 A24B0000 */ sb $t3, ($s2) /* 08C538 8008B938 240FFFFF */ li $t7, -1 /* 08C53C 8008B93C 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 08C540 8008B940 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08C540 8008B940 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08C544 8008B944 AC2FF47C */ sw $t7, %lo(gMenuDelay)($at) /* 08C548 8008B948 0C030076 */ jal func_800C01D8 -/* 08C54C 8008B94C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 08C54C 8008B94C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 08C550 8008B950 1000006A */ b .L8008BAFC /* 08C554 8008B954 8FA2004C */ lw $v0, 0x4c($sp) .L8008B958: diff --git a/asm/non_matchings/menu/func_8008F00C.s b/asm/non_matchings/menu/func_8008F00C.s index b75eb561..e7509c2d 100644 --- a/asm/non_matchings/menu/func_8008F00C.s +++ b/asm/non_matchings/menu/func_8008F00C.s @@ -68,7 +68,7 @@ glabel func_8008F00C /* 08FD00 8008F100 0C02719D */ jal func_8009C674 /* 08FD04 8008F104 248407E8 */ addiu $a0, %lo(D_800E07E8) # addiu $a0, $a0, 0x7e8 /* 08FD08 8008F108 3C04800E */ lui $a0, %hi(D_800E0830) # $a0, 0x800e -/* 08FD0C 8008F10C 0C027229 */ jal func_8009C8A4 +/* 08FD0C 8008F10C 0C027229 */ jal allocate_menu_images /* 08FD10 8008F110 24840830 */ addiu $a0, %lo(D_800E0830) # addiu $a0, $a0, 0x830 /* 08FD14 8008F114 0C023917 */ jal func_8008E45C /* 08FD18 8008F118 00000000 */ nop diff --git a/asm/non_matchings/menu/func_8008FA54.s b/asm/non_matchings/menu/func_8008FA54.s index 938f9fda..eef02572 100644 --- a/asm/non_matchings/menu/func_8008FA54.s +++ b/asm/non_matchings/menu/func_8008FA54.s @@ -154,7 +154,7 @@ glabel func_8008FA54 /* 090880 8008FC80 00002025 */ move $a0, $zero /* 090884 8008FC84 27A50068 */ addiu $a1, $sp, 0x68 /* 090888 8008FC88 27A60064 */ addiu $a2, $sp, 0x64 -/* 09088C 8008FC8C 0C019B0B */ jal func_80066C2C +/* 09088C 8008FC8C 0C019B0B */ jal copy_viewport_frame_size_to_coords /* 090890 8008FC90 27A70060 */ addiu $a3, $sp, 0x60 /* 090894 8008FC94 8FA20068 */ lw $v0, 0x68($sp) /* 090898 8008FC98 8FAB0060 */ lw $t3, 0x60($sp) @@ -230,10 +230,10 @@ glabel func_8008FA54 .L8008FDA0: /* 0909A0 8008FDA0 8FAD0080 */ lw $t5, 0x80($sp) .L8008FDA4: -/* 0909A4 8008FDA4 3C03800E */ lui $v1, %hi(D_800DF75C) # $v1, 0x800e +/* 0909A4 8008FDA4 3C03800E */ lui $v1, %hi(gMenuImageStack) # $v1, 0x800e /* 0909A8 8008FDA8 448D3000 */ mtc1 $t5, $f6 /* 0909AC 8008FDAC 8FA40094 */ lw $a0, 0x94($sp) -/* 0909B0 8008FDB0 2463F75C */ addiu $v1, %lo(D_800DF75C) # addiu $v1, $v1, -0x8a4 +/* 0909B0 8008FDB0 2463F75C */ addiu $v1, %lo(gMenuImageStack) # addiu $v1, $v1, -0x8a4 /* 0909B4 8008FDB4 46803220 */ cvt.s.w $f8, $f6 /* 0909B8 8008FDB8 8C6E0000 */ lw $t6, ($v1) /* 0909BC 8008FDBC 00041140 */ sll $v0, $a0, 5 diff --git a/asm/non_matchings/menu/func_800904E8.s b/asm/non_matchings/menu/func_800904E8.s index 72ccfc38..d9318cd5 100644 --- a/asm/non_matchings/menu/func_800904E8.s +++ b/asm/non_matchings/menu/func_800904E8.s @@ -272,7 +272,7 @@ glabel func_800904E8 /* 0914E8 800908E8 00002025 */ move $a0, $zero /* 0914EC 800908EC 27A50044 */ addiu $a1, $sp, 0x44 /* 0914F0 800908F0 27A60040 */ addiu $a2, $sp, 0x40 -/* 0914F4 800908F4 0C019AEA */ jal func_80066BA8 +/* 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 diff --git a/asm/non_matchings/menu/func_80090918.s b/asm/non_matchings/menu/func_80090918.s index 98607ead..fa7b14a8 100644 --- a/asm/non_matchings/menu/func_80090918.s +++ b/asm/non_matchings/menu/func_80090918.s @@ -129,11 +129,11 @@ glabel func_80090918 /* 0916FC 80090AFC 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 091700 80090B00 44818000 */ mtc1 $at, $f16 /* 091704 80090B04 460A2203 */ div.s $f8, $f4, $f10 -/* 091708 80090B08 3C03800E */ lui $v1, %hi(D_800DF510) # $v1, 0x800e -/* 09170C 80090B0C 2463F510 */ addiu $v1, %lo(D_800DF510) # addiu $v1, $v1, -0xaf0 +/* 091708 80090B08 3C03800E */ lui $v1, %hi(sMenuImageProperties) # $v1, 0x800e +/* 09170C 80090B0C 2463F510 */ addiu $v1, %lo(sMenuImageProperties) # addiu $v1, $v1, -0xaf0 /* 091710 80090B10 C4720088 */ lwc1 $f18, 0x88($v1) -/* 091714 80090B14 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e -/* 091718 80090B18 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 091714 80090B14 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e +/* 091718 80090B18 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 09171C 80090B1C 8C580000 */ lw $t8, ($v0) /* 091720 80090B20 46088000 */ add.s $f0, $f16, $f8 /* 091724 80090B24 46009182 */ mul.s $f6, $f18, $f0 @@ -158,9 +158,9 @@ glabel func_80090918 /* 09176C 80090B6C 3C0A8012 */ lui $t2, %hi(D_801269C8) # $t2, 0x8012 /* 091770 80090B70 04610008 */ bgez $v1, .L80090B94 /* 091774 80090B74 254A69C8 */ addiu $t2, %lo(D_801269C8) # addiu $t2, $t2, 0x69c8 -/* 091778 80090B78 3C02800E */ lui $v0, %hi(D_800DF760) # $v0, 0x800e +/* 091778 80090B78 3C02800E */ lui $v0, %hi(sMenuMusicVolume) # $v0, 0x800e /* 09177C 80090B7C 8FAF0048 */ lw $t7, 0x48($sp) -/* 091780 80090B80 2442F760 */ addiu $v0, %lo(D_800DF760) # addiu $v0, $v0, -0x8a0 +/* 091780 80090B80 2442F760 */ addiu $v0, %lo(sMenuMusicVolume) # addiu $v0, $v0, -0x8a0 /* 091784 80090B84 8C4E0000 */ lw $t6, ($v0) /* 091788 80090B88 000FC080 */ sll $t8, $t7, 2 /* 09178C 80090B8C 01D8C823 */ subu $t9, $t6, $t8 @@ -287,9 +287,9 @@ glabel func_80090918 /* 09193C 80090D3C 3C048012 */ lui $a0, %hi(D_80126820) # $a0, 0x8012 /* 091940 80090D40 0C030060 */ jal func_800C0180 /* 091944 80090D44 00000000 */ nop -/* 091948 80090D48 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 091948 80090D48 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 09194C 80090D4C 0C030076 */ jal func_800C01D8 -/* 091950 80090D50 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 091950 80090D50 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 091954 80090D54 0C03005C */ jal func_800C0170 /* 091958 80090D58 00000000 */ nop /* 09195C 80090D5C 240FFFFF */ li $t7, -1 diff --git a/asm/non_matchings/menu/func_80092188.s b/asm/non_matchings/menu/func_80092188.s index 43aea1ce..52782c75 100644 --- a/asm/non_matchings/menu/func_80092188.s +++ b/asm/non_matchings/menu/func_80092188.s @@ -116,11 +116,11 @@ glabel func_80092188 /* 092F24 80092324 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 092F28 80092328 44818000 */ mtc1 $at, $f16 /* 092F2C 8009232C 46083283 */ div.s $f10, $f6, $f8 -/* 092F30 80092330 3C04800E */ lui $a0, %hi(D_800DF510) # $a0, 0x800e -/* 092F34 80092334 2484F510 */ addiu $a0, %lo(D_800DF510) # addiu $a0, $a0, -0xaf0 +/* 092F30 80092330 3C04800E */ lui $a0, %hi(sMenuImageProperties) # $a0, 0x800e +/* 092F34 80092334 2484F510 */ addiu $a0, %lo(sMenuImageProperties) # addiu $a0, $a0, -0xaf0 /* 092F38 80092338 C4920088 */ lwc1 $f18, 0x88($a0) -/* 092F3C 8009233C 3C03800E */ lui $v1, %hi(D_800DF75C) # $v1, 0x800e -/* 092F40 80092340 2463F75C */ addiu $v1, %lo(D_800DF75C) # addiu $v1, $v1, -0x8a4 +/* 092F3C 8009233C 3C03800E */ lui $v1, %hi(gMenuImageStack) # $v1, 0x800e +/* 092F40 80092340 2463F75C */ addiu $v1, %lo(gMenuImageStack) # addiu $v1, $v1, -0x8a4 /* 092F44 80092344 8C6E0000 */ lw $t6, ($v1) /* 092F48 80092348 3C02800E */ lui $v0, %hi(gMenuDelay) # $v0, 0x800e /* 092F4C 8009234C 460A8000 */ add.s $f0, $f16, $f10 @@ -139,9 +139,9 @@ glabel func_80092188 .L80092380: /* 092F80 80092380 18400008 */ blez $v0, .L800923A4 /* 092F84 80092384 28410029 */ slti $at, $v0, 0x29 -/* 092F88 80092388 3C03800E */ lui $v1, %hi(D_800DF760) # $v1, 0x800e +/* 092F88 80092388 3C03800E */ lui $v1, %hi(sMenuMusicVolume) # $v1, 0x800e /* 092F8C 8009238C 8FAE0058 */ lw $t6, 0x58($sp) -/* 092F90 80092390 2463F760 */ addiu $v1, %lo(D_800DF760) # addiu $v1, $v1, -0x8a0 +/* 092F90 80092390 2463F760 */ addiu $v1, %lo(sMenuMusicVolume) # addiu $v1, $v1, -0x8a0 /* 092F94 80092394 8C790000 */ lw $t9, ($v1) /* 092F98 80092398 000E7880 */ sll $t7, $t6, 2 /* 092F9C 8009239C 032FC023 */ subu $t8, $t9, $t7 @@ -577,9 +577,9 @@ glabel L8009287C /* 0935A8 800929A8 3C01800E */ lui $at, %hi(D_800E097C) # $at, 0x800e /* 0935AC 800929AC 0C030060 */ jal func_800C0180 /* 0935B0 800929B0 AC20097C */ sw $zero, %lo(D_800E097C)($at) -/* 0935B4 800929B4 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 0935B4 800929B4 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 0935B8 800929B8 0C030076 */ jal func_800C01D8 -/* 0935BC 800929BC 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 0935BC 800929BC 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 0935C0 800929C0 3C198012 */ lui $t9, %hi(D_801269C8) # $t9, 0x8012 /* 0935C4 800929C4 8F3969C8 */ lw $t9, %lo(D_801269C8)($t9) /* 0935C8 800929C8 24010005 */ li $at, 5 diff --git a/asm/non_matchings/menu/func_80092E94.s b/asm/non_matchings/menu/func_80092E94.s index a0877356..c899695f 100644 --- a/asm/non_matchings/menu/func_80092E94.s +++ b/asm/non_matchings/menu/func_80092E94.s @@ -104,8 +104,8 @@ glabel func_80092E94 /* 093C28 80093028 0C024AF8 */ jal func_80092BE0 /* 093C2C 8009302C 00000000 */ nop /* 093C30 80093030 04400010 */ bltz $v0, .L80093074 -/* 093C34 80093034 3C0A800E */ lui $t2, %hi(D_800DF764) # $t2, 0x800e -/* 093C38 80093038 8D4AF764 */ lw $t2, %lo(D_800DF764)($t2) +/* 093C34 80093034 3C0A800E */ lui $t2, %hi(sMenuGuiOpacity) # $t2, 0x800e +/* 093C38 80093038 8D4AF764 */ lw $t2, %lo(sMenuGuiOpacity)($t2) /* 093C3C 8009303C 8FA70060 */ lw $a3, 0x60($sp) /* 093C40 80093040 3C05800E */ lui $a1, %hi(D_800E0614) # $a1, 0x800e /* 093C44 80093044 241900FF */ li $t9, 255 @@ -382,8 +382,8 @@ glabel func_80092E94 /* 094060 80093460 02203825 */ move $a3, $s1 /* 094064 80093464 0C01ECF4 */ jal func_8007B3D0 /* 094068 80093468 02402025 */ move $a0, $s2 -/* 09406C 8009346C 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e -/* 094070 80093470 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 09406C 8009346C 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e +/* 094070 80093470 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 094074 80093474 3C0141A8 */ li $at, 0x41A80000 # 21.000000 /* 094078 80093478 44812000 */ mtc1 $at, $f4 /* 09407C 8009347C 8C4F0000 */ lw $t7, ($v0) diff --git a/asm/non_matchings/menu/func_80094A5C.s b/asm/non_matchings/menu/func_80094A5C.s index e5cfdde5..923caacc 100644 --- a/asm/non_matchings/menu/func_80094A5C.s +++ b/asm/non_matchings/menu/func_80094A5C.s @@ -19,7 +19,7 @@ glabel func_80094A5C /* 09569C 80094A9C 14810052 */ bne $a0, $at, .L80094BE8 /* 0956A0 80094AA0 00000000 */ nop /* 0956A4 80094AA4 3C04800E */ lui $a0, %hi(D_800E0A40) # $a0, 0x800e -/* 0956A8 80094AA8 0C027229 */ jal func_8009C8A4 +/* 0956A8 80094AA8 0C027229 */ jal allocate_menu_images /* 0956AC 80094AAC 24840A40 */ addiu $a0, %lo(D_800E0A40) # addiu $a0, $a0, 0xa40 /* 0956B0 80094AB0 0C025181 */ jal func_80094604 /* 0956B4 80094AB4 00000000 */ nop diff --git a/asm/non_matchings/menu/func_80094D28.s b/asm/non_matchings/menu/func_80094D28.s index 28e7c3bd..a1710f36 100644 --- a/asm/non_matchings/menu/func_80094D28.s +++ b/asm/non_matchings/menu/func_80094D28.s @@ -154,9 +154,9 @@ glabel L80094DD0 /* 095B34 80094F34 01A53823 */ subu $a3, $t5, $a1 /* 095B38 80094F38 0C019A50 */ jal func_80066940 /* 095B3C 80094F3C 00000000 */ nop -/* 095B40 80094F40 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e +/* 095B40 80094F40 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e /* 095B44 80094F44 44905000 */ mtc1 $s0, $f10 -/* 095B48 80094F48 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 095B48 80094F48 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 095B4C 80094F4C 8C4E0000 */ lw $t6, ($v0) /* 095B50 80094F50 44802000 */ mtc1 $zero, $f4 /* 095B54 80094F54 46805420 */ cvt.s.w $f16, $f10 @@ -174,9 +174,9 @@ glabel L80094DD0 /* 095B84 80094F84 3C014000 */ li $at, 0x40000000 # 2.000000 /* 095B88 80094F88 46803220 */ cvt.s.w $f8, $f6 /* 095B8C 80094F8C 44813000 */ mtc1 $at, $f6 -/* 095B90 80094F90 3C01800E */ lui $at, %hi(D_800DF510+0x88) # $at, 0x800e +/* 095B90 80094F90 3C01800E */ lui $at, %hi(sMenuImageProperties+0x88) # $at, 0x800e /* 095B94 80094F94 E5880090 */ swc1 $f8, 0x90($t4) -/* 095B98 80094F98 C42AF598 */ lwc1 $f10, %lo(D_800DF510+0x88)($at) +/* 095B98 80094F98 C42AF598 */ lwc1 $f10, %lo(sMenuImageProperties+0x88)($at) /* 095B9C 80094F9C 46043201 */ sub.s $f8, $f6, $f4 /* 095BA0 80094FA0 8C4D0000 */ lw $t5, ($v0) /* 095BA4 80094FA4 46085402 */ mul.s $f16, $f10, $f8 diff --git a/asm/non_matchings/menu/func_80095728.s b/asm/non_matchings/menu/func_80095728.s index 845aa1a6..0b899a0b 100644 --- a/asm/non_matchings/menu/func_80095728.s +++ b/asm/non_matchings/menu/func_80095728.s @@ -206,18 +206,18 @@ glabel L80095964 /* 096600 80095A00 0302C821 */ addu $t9, $t8, $v0 /* 096604 80095A04 0C019A50 */ jal func_80066940 /* 096608 80095A08 AFB90010 */ sw $t9, 0x10($sp) -/* 09660C 80095A0C 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e -/* 096610 80095A10 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 09660C 80095A0C 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e +/* 096610 80095A10 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 096614 80095A14 8C4C0000 */ lw $t4, ($v0) /* 096618 80095A18 44802000 */ mtc1 $zero, $f4 /* 09661C 80095A1C 3C014210 */ li $at, 0x42100000 # 36.000000 /* 096620 80095A20 E584008C */ swc1 $f4, 0x8c($t4) /* 096624 80095A24 8C4D0000 */ lw $t5, ($v0) /* 096628 80095A28 44813000 */ mtc1 $at, $f6 -/* 09662C 80095A2C 3C01800E */ lui $at, %hi(D_800DF510+0x88) # $at, 0x800e +/* 09662C 80095A2C 3C01800E */ lui $at, %hi(sMenuImageProperties+0x88) # $at, 0x800e /* 096630 80095A30 E5A60090 */ swc1 $f6, 0x90($t5) /* 096634 80095A34 8C4E0000 */ lw $t6, ($v0) -/* 096638 80095A38 C428F598 */ lwc1 $f8, %lo(D_800DF510+0x88)($at) +/* 096638 80095A38 C428F598 */ lwc1 $f8, %lo(sMenuImageProperties+0x88)($at) /* 09663C 80095A3C 00000000 */ nop /* 096640 80095A40 E5C80088 */ swc1 $f8, 0x88($t6) /* 096644 80095A44 8FAF002C */ lw $t7, 0x2c($sp) @@ -294,9 +294,9 @@ glabel L80095B34 /* 096754 80095B54 00000000 */ nop /* 096758 80095B58 0C000326 */ jal set_music_fade_timer /* 09675C 80095B5C 2404FF80 */ li $a0, -128 -/* 096760 80095B60 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 096760 80095B60 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 096764 80095B64 0C030076 */ jal func_800C01D8 -/* 096768 80095B68 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 096768 80095B68 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 09676C 80095B6C 240D0008 */ li $t5, 8 /* 096770 80095B70 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 096774 80095B74 100002E7 */ b .L80096714 @@ -628,9 +628,9 @@ glabel L80095EC8 /* 096C40 80096040 AFB80050 */ sw $t8, 0x50($sp) /* 096C44 80096044 0C000326 */ jal set_music_fade_timer /* 096C48 80096048 2404FF80 */ li $a0, -128 -/* 096C4C 8009604C 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 096C4C 8009604C 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 096C50 80096050 0C030076 */ jal func_800C01D8 -/* 096C54 80096054 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 096C54 80096054 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 096C58 80096058 240D0008 */ li $t5, 8 /* 096C5C 8009605C 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 096C60 80096060 100000FC */ b .L80096454 @@ -786,9 +786,9 @@ glabel L80095EC8 .L8009626C: /* 096E6C 8009626C 0C000326 */ jal set_music_fade_timer /* 096E70 80096270 2404FF80 */ li $a0, -128 -/* 096E74 80096274 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 096E74 80096274 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 096E78 80096278 0C030076 */ jal func_800C01D8 -/* 096E7C 8009627C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 096E7C 8009627C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 096E80 80096280 24190008 */ li $t9, 8 /* 096E84 80096284 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 096E88 80096288 10000072 */ b .L80096454 @@ -952,9 +952,9 @@ glabel L800964AC /* 0970B4 800964B4 00000000 */ nop /* 0970B8 800964B8 0C000326 */ jal set_music_fade_timer /* 0970BC 800964BC 2404FF80 */ li $a0, -128 -/* 0970C0 800964C0 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 0970C0 800964C0 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 0970C4 800964C4 0C030076 */ jal func_800C01D8 -/* 0970C8 800964C8 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 0970C8 800964C8 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 0970CC 800964CC 24180008 */ li $t8, 8 /* 0970D0 800964D0 3C018012 */ lui $at, %hi(D_801263E0) # $at, 0x8012 /* 0970D4 800964D4 1000008F */ b .L80096714 diff --git a/asm/non_matchings/menu/func_80096978.s b/asm/non_matchings/menu/func_80096978.s index 1f946ea7..b3c0fd93 100644 --- a/asm/non_matchings/menu/func_80096978.s +++ b/asm/non_matchings/menu/func_80096978.s @@ -48,9 +48,9 @@ glabel func_80096978 .L80096A28: /* 097628 80096A28 46142181 */ sub.s $f6, $f4, $f20 /* 09762C 80096A2C 44814000 */ mtc1 $at, $f8 -/* 097630 80096A30 3C10800E */ lui $s0, %hi(D_800DF764) # $s0, 0x800e +/* 097630 80096A30 3C10800E */ lui $s0, %hi(sMenuGuiOpacity) # $s0, 0x800e /* 097634 80096A34 46083282 */ mul.s $f10, $f6, $f8 -/* 097638 80096A38 2610F764 */ addiu $s0, %lo(D_800DF764) # addiu $s0, $s0, -0x89c +/* 097638 80096A38 2610F764 */ addiu $s0, %lo(sMenuGuiOpacity) # addiu $s0, $s0, -0x89c /* 09763C 80096A3C 24040002 */ li $a0, 2 /* 097640 80096A40 444FF800 */ cfc1 $t7, $31 /* 097644 80096A44 00000000 */ nop @@ -185,14 +185,14 @@ glabel func_80096978 /* 097834 80096C34 246E0004 */ addiu $t6, $v1, 4 /* 097838 80096C38 24790002 */ addiu $t9, $v1, 2 /* 09783C 80096C3C 241800FF */ li $t8, 255 -/* 097840 80096C40 3C13800E */ lui $s3, %hi(D_800DF75C) # $s3, 0x800e +/* 097840 80096C40 3C13800E */ lui $s3, %hi(gMenuImageStack) # $s3, 0x800e /* 097844 80096C44 2448FFDE */ addiu $t0, $v0, -0x22 /* 097848 80096C48 2449FFE0 */ addiu $t1, $v0, -0x20 /* 09784C 80096C4C 4481A000 */ mtc1 $at, $f20 /* 097850 80096C50 AFAC00A8 */ sw $t4, 0xa8($sp) /* 097854 80096C54 AFA90064 */ sw $t1, 0x64($sp) /* 097858 80096C58 AFA80068 */ sw $t0, 0x68($sp) -/* 09785C 80096C5C 2673F75C */ addiu $s3, %lo(D_800DF75C) # addiu $s3, $s3, -0x8a4 +/* 09785C 80096C5C 2673F75C */ addiu $s3, %lo(gMenuImageStack) # addiu $s3, $s3, -0x8a4 /* 097860 80096C60 AFB80070 */ sw $t8, 0x70($sp) /* 097864 80096C64 AFB90074 */ sw $t9, 0x74($sp) /* 097868 80096C68 AFAE007C */ sw $t6, 0x7c($sp) @@ -243,15 +243,15 @@ glabel func_80096978 /* 097918 80096D18 0C01EFC7 */ jal func_8007BF1C /* 09791C 80096D1C 00002025 */ move $a0, $zero /* 097920 80096D20 240200FF */ li $v0, 255 -/* 097924 80096D24 3C01800E */ lui $at, %hi(D_800DF4A4) # $at, 0x800e +/* 097924 80096D24 3C01800E */ lui $at, %hi(sMenuGuiColourR) # $at, 0x800e /* 097928 80096D28 8FB90070 */ lw $t9, 0x70($sp) -/* 09792C 80096D2C A022F4A4 */ sb $v0, %lo(D_800DF4A4)($at) -/* 097930 80096D30 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e -/* 097934 80096D34 A039F4A8 */ sb $t9, %lo(D_800DF4A8)($at) -/* 097938 80096D38 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e +/* 09792C 80096D2C A022F4A4 */ sb $v0, %lo(sMenuGuiColourR)($at) +/* 097930 80096D30 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e +/* 097934 80096D34 A039F4A8 */ sb $t9, %lo(sMenuGuiColourG)($at) +/* 097938 80096D38 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e /* 09793C 80096D3C 3C18800E */ lui $t8, %hi(gNumberOfActivePlayers) # $t8, 0x800e /* 097940 80096D40 8F18F4BC */ lw $t8, %lo(gNumberOfActivePlayers)($t8) -/* 097944 80096D44 A022F4AC */ sb $v0, %lo(D_800DF4AC)($at) +/* 097944 80096D44 A022F4AC */ sb $v0, %lo(sMenuGuiColourB)($at) /* 097948 80096D48 3C01800E */ lui $at, %hi(D_800DF4B0) # $at, 0x800e /* 09794C 80096D4C 1B00006E */ blez $t8, .L80096F08 /* 097950 80096D50 A022F4B0 */ sb $v0, %lo(D_800DF4B0)($at) @@ -388,9 +388,9 @@ glabel func_80096978 /* 097B34 80096F34 0C01EFC7 */ jal func_8007BF1C /* 097B38 80096F38 24040001 */ li $a0, 1 /* 097B3C 80096F3C 240E00FF */ li $t6, 255 -/* 097B40 80096F40 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e +/* 097B40 80096F40 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e /* 097B44 80096F44 8FAF00A0 */ lw $t7, 0xa0($sp) -/* 097B48 80096F48 A02EF4A8 */ sb $t6, %lo(D_800DF4A8)($at) +/* 097B48 80096F48 A02EF4A8 */ sb $t6, %lo(sMenuGuiColourG)($at) /* 097B4C 80096F4C 8FB80078 */ lw $t8, 0x78($sp) /* 097B50 80096F50 8FA80070 */ lw $t0, 0x70($sp) /* 097B54 80096F54 3C01800E */ lui $at, %hi(D_800DF4B0) # $at, 0x800e diff --git a/asm/non_matchings/menu/func_80099E8C.s b/asm/non_matchings/menu/func_80099E8C.s index befda9d0..95fd3a3f 100644 --- a/asm/non_matchings/menu/func_80099E8C.s +++ b/asm/non_matchings/menu/func_80099E8C.s @@ -345,10 +345,10 @@ glabel func_80099E8C /* 09AF98 8009A398 0C01ECF4 */ jal func_8007B3D0 /* 09AF9C 8009A39C 02E02025 */ move $a0, $s7 /* 09AFA0 8009A3A0 8638000C */ lh $t8, 0xc($s1) -/* 09AFA4 8009A3A4 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e +/* 09AFA4 8009A3A4 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e /* 09AFA8 8009A3A8 2719FF88 */ addiu $t9, $t8, -0x78 /* 09AFAC 8009A3AC 44993000 */ mtc1 $t9, $f6 -/* 09AFB0 8009A3B0 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 09AFB0 8009A3B0 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 09AFB4 8009A3B4 46803220 */ cvt.s.w $f8, $f6 /* 09AFB8 8009A3B8 8C490000 */ lw $t1, ($v0) /* 09AFBC 8009A3BC 3C01800F */ lui $at, %hi(D_800E8570) # $at, 0x800f @@ -369,8 +369,8 @@ glabel func_80099E8C /* 09AFF8 8009A3F8 0C027298 */ jal func_8009CA60 /* 09AFFC 8009A3FC E73200E8 */ swc1 $f18, 0xe8($t9) /* 09B000 8009A400 24090080 */ li $t1, 128 -/* 09B004 8009A404 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e -/* 09B008 8009A408 AC29F764 */ sw $t1, %lo(D_800DF764)($at) +/* 09B004 8009A404 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e +/* 09B008 8009A408 AC29F764 */ sw $t1, %lo(sMenuGuiOpacity)($at) /* 09B00C 8009A40C 862B0012 */ lh $t3, 0x12($s1) /* 09B010 8009A410 8FAA006C */ lw $t2, 0x6c($sp) /* 09B014 8009A414 8FAE00D0 */ lw $t6, 0xd0($sp) @@ -387,8 +387,8 @@ glabel func_80099E8C /* 09B040 8009A440 0C020600 */ jal func_80081800 /* 09B044 8009A444 24A5FF89 */ addiu $a1, $a1, -0x77 /* 09B048 8009A448 240F00FF */ li $t7, 255 -/* 09B04C 8009A44C 3C01800E */ lui $at, %hi(D_800DF764) # $at, 0x800e -/* 09B050 8009A450 AC2FF764 */ sw $t7, %lo(D_800DF764)($at) +/* 09B04C 8009A44C 3C01800E */ lui $at, %hi(sMenuGuiOpacity) # $at, 0x800e +/* 09B050 8009A450 AC2FF764 */ sw $t7, %lo(sMenuGuiOpacity)($at) /* 09B054 8009A454 86390012 */ lh $t9, 0x12($s1) /* 09B058 8009A458 8FB8006C */ lw $t8, 0x6c($sp) /* 09B05C 8009A45C 8FAB00D0 */ lw $t3, 0xd0($sp) diff --git a/asm/non_matchings/menu/func_8009CA60.s b/asm/non_matchings/menu/func_8009CA60.s index bbcc171d..80fb8719 100644 --- a/asm/non_matchings/menu/func_8009CA60.s +++ b/asm/non_matchings/menu/func_8009CA60.s @@ -1,6 +1,6 @@ glabel func_8009CA60 -/* 09D660 8009CA60 3C0B800E */ lui $t3, %hi(D_800DF75C) # $t3, 0x800e -/* 09D664 8009CA64 256BF75C */ addiu $t3, %lo(D_800DF75C) # addiu $t3, $t3, -0x8a4 +/* 09D660 8009CA60 3C0B800E */ lui $t3, %hi(gMenuImageStack) # $t3, 0x800e +/* 09D664 8009CA64 256BF75C */ addiu $t3, %lo(gMenuImageStack) # addiu $t3, $t3, -0x8a4 /* 09D668 8009CA68 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 09D66C 8009CA6C 8D630000 */ lw $v1, ($t3) /* 09D670 8009CA70 00044140 */ sll $t0, $a0, 5 @@ -47,7 +47,7 @@ glabel func_8009CA60 /* 09D714 8009CB14 260463A0 */ addiu $a0, $s0, %lo(D_801263A0) /* 09D718 8009CB18 E5480014 */ swc1 $f8, 0x14($t2) /* 09D71C 8009CB1C C44A0008 */ lwc1 $f10, 8($v0) -/* 09D720 8009CB20 3C0C800E */ lui $t4, %hi(D_800DF764) # $t4, 0x800e +/* 09D720 8009CB20 3C0C800E */ lui $t4, %hi(sMenuGuiOpacity) # $t4, 0x800e /* 09D724 8009CB24 E54A0008 */ swc1 $f10, 8($t2) /* 09D728 8009CB28 8DEFF468 */ lw $t7, %lo(D_800DF468)($t7) /* 09D72C 8009CB2C 24C663AC */ addiu $a2, %lo(D_801263AC) # addiu $a2, $a2, 0x63ac @@ -60,7 +60,7 @@ glabel func_8009CA60 /* 09D748 8009CB48 00000000 */ nop /* 09D74C 8009CB4C A159003A */ sb $t9, 0x3a($t2) .L8009CB50: -/* 09D750 8009CB50 8D8CF764 */ lw $t4, %lo(D_800DF764)($t4) +/* 09D750 8009CB50 8D8CF764 */ lw $t4, %lo(sMenuGuiOpacity)($t4) /* 09D754 8009CB54 0C004B57 */ jal func_80012D5C /* 09D758 8009CB58 A0EC0039 */ sb $t4, 0x39($a3) /* 09D75C 8009CB5C 10000084 */ b .L8009CD70 @@ -73,18 +73,18 @@ glabel func_8009CA60 /* 09D774 8009CB74 3C0FFA00 */ lui $t7, 0xfa00 /* 09D778 8009CB78 244E0008 */ addiu $t6, $v0, 8 /* 09D77C 8009CB7C AE0E0000 */ sw $t6, ($s0) -/* 09D780 8009CB80 3C18800E */ lui $t8, %hi(D_800DF4A4) # $t8, 0x800e +/* 09D780 8009CB80 3C18800E */ lui $t8, %hi(sMenuGuiColourR) # $t8, 0x800e /* 09D784 8009CB84 AC4F0000 */ sw $t7, ($v0) -/* 09D788 8009CB88 9319F4A4 */ lbu $t9, %lo(D_800DF4A4)($t8) -/* 09D78C 8009CB8C 3C0D800E */ lui $t5, %hi(D_800DF4A8) # $t5, 0x800e -/* 09D790 8009CB90 91AEF4A8 */ lbu $t6, %lo(D_800DF4A8)($t5) +/* 09D788 8009CB88 9319F4A4 */ lbu $t9, %lo(sMenuGuiColourR)($t8) +/* 09D78C 8009CB8C 3C0D800E */ lui $t5, %hi(sMenuGuiColourG) # $t5, 0x800e +/* 09D790 8009CB90 91AEF4A8 */ lbu $t6, %lo(sMenuGuiColourG)($t5) /* 09D794 8009CB94 00196600 */ sll $t4, $t9, 0x18 /* 09D798 8009CB98 000E7C00 */ sll $t7, $t6, 0x10 /* 09D79C 8009CB9C 018FC025 */ or $t8, $t4, $t7 -/* 09D7A0 8009CBA0 3C19800E */ lui $t9, %hi(D_800DF4AC) # $t9, 0x800e -/* 09D7A4 8009CBA4 932DF4AC */ lbu $t5, %lo(D_800DF4AC)($t9) -/* 09D7A8 8009CBA8 3C0F800E */ lui $t7, %hi(D_800DF764) # $t7, 0x800e -/* 09D7AC 8009CBAC 8DEFF764 */ lw $t7, %lo(D_800DF764)($t7) +/* 09D7A0 8009CBA0 3C19800E */ lui $t9, %hi(sMenuGuiColourB) # $t9, 0x800e +/* 09D7A4 8009CBA4 932DF4AC */ lbu $t5, %lo(sMenuGuiColourB)($t9) +/* 09D7A8 8009CBA8 3C0F800E */ lui $t7, %hi(sMenuGuiOpacity) # $t7, 0x800e +/* 09D7AC 8009CBAC 8DEFF764 */ lw $t7, %lo(sMenuGuiOpacity)($t7) /* 09D7B0 8009CBB0 000D7200 */ sll $t6, $t5, 8 /* 09D7B4 8009CBB4 030E6025 */ or $t4, $t8, $t6 /* 09D7B8 8009CBB8 31F900FF */ andi $t9, $t7, 0xff @@ -120,8 +120,8 @@ glabel func_8009CA60 /* 09D830 8009CC30 1000004E */ b .L8009CD6C /* 09D834 8009CC34 AC4F0000 */ sw $t7, ($v0) .L8009CC38: -/* 09D838 8009CC38 3C09800E */ lui $t1, %hi(D_800DF764) # $t1, 0x800e -/* 09D83C 8009CC3C 2529F764 */ addiu $t1, %lo(D_800DF764) # addiu $t1, $t1, -0x89c +/* 09D838 8009CC38 3C09800E */ lui $t1, %hi(sMenuGuiOpacity) # $t1, 0x800e +/* 09D83C 8009CC3C 2529F764 */ addiu $t1, %lo(sMenuGuiOpacity) # addiu $t1, $t1, -0x89c /* 09D840 8009CC40 8D390000 */ lw $t9, ($t1) /* 09D844 8009CC44 3C058012 */ lui $a1, %hi(D_801263A8) # $a1, 0x8012 /* 09D848 8009CC48 2B2100FF */ slti $at, $t9, 0xff @@ -169,8 +169,8 @@ glabel func_8009CA60 /* 09D8E8 8009CCE8 01B83021 */ addu $a2, $t5, $t8 /* 09D8EC 8009CCEC 0C01A521 */ jal func_80069484 /* 09D8F0 8009CCF0 E7B00010 */ swc1 $f16, 0x10($sp) -/* 09D8F4 8009CCF4 3C0B800E */ lui $t3, %hi(D_800DF75C) # $t3, 0x800e -/* 09D8F8 8009CCF8 256BF75C */ addiu $t3, %lo(D_800DF75C) # addiu $t3, $t3, -0x8a4 +/* 09D8F4 8009CCF4 3C0B800E */ lui $t3, %hi(gMenuImageStack) # $t3, 0x800e +/* 09D8F8 8009CCF8 256BF75C */ addiu $t3, %lo(gMenuImageStack) # addiu $t3, $t3, -0x8a4 /* 09D8FC 8009CCFC 8FA8002C */ lw $t0, 0x2c($sp) /* 09D900 8009CD00 8D6E0000 */ lw $t6, ($t3) /* 09D904 8009CD04 3C028012 */ lui $v0, %hi(D_80126550) # $v0, 0x8012 @@ -186,8 +186,8 @@ glabel func_8009CA60 /* 09D92C 8009CD2C 00000000 */ nop /* 09D930 8009CD30 0C01A690 */ jal func_80069A40 /* 09D934 8009CD34 02002025 */ move $a0, $s0 -/* 09D938 8009CD38 3C0D800E */ lui $t5, %hi(D_800DF764) # $t5, 0x800e -/* 09D93C 8009CD3C 8DADF764 */ lw $t5, %lo(D_800DF764)($t5) +/* 09D938 8009CD38 3C0D800E */ lui $t5, %hi(sMenuGuiOpacity) # $t5, 0x800e +/* 09D93C 8009CD3C 8DADF764 */ lw $t5, %lo(sMenuGuiOpacity)($t5) /* 09D940 8009CD40 00000000 */ nop /* 09D944 8009CD44 29A100FF */ slti $at, $t5, 0xff /* 09D948 8009CD48 10200009 */ beqz $at, .L8009CD70 diff --git a/asm/non_matchings/menu/func_8009CD7C.s b/asm/non_matchings/menu/func_8009CD7C.s index 948f472a..3182035e 100644 --- a/asm/non_matchings/menu/func_8009CD7C.s +++ b/asm/non_matchings/menu/func_8009CD7C.s @@ -1,7 +1,7 @@ glabel func_8009CD7C /* 09D97C 8009CD7C 27BDFF90 */ addiu $sp, $sp, -0x70 -/* 09D980 8009CD80 3C0F800E */ lui $t7, %hi(D_800DF764) # $t7, 0x800e -/* 09D984 8009CD84 8DEFF764 */ lw $t7, %lo(D_800DF764)($t7) +/* 09D980 8009CD80 3C0F800E */ lui $t7, %hi(sMenuGuiOpacity) # $t7, 0x800e +/* 09D984 8009CD84 8DEFF764 */ lw $t7, %lo(sMenuGuiOpacity)($t7) /* 09D988 8009CD88 AFB5002C */ sw $s5, 0x2c($sp) /* 09D98C 8009CD8C 240E0009 */ li $t6, 9 /* 09D990 8009CD90 240100FF */ li $at, 255 diff --git a/asm/non_matchings/menu/func_8009E3D0.s b/asm/non_matchings/menu/func_8009E3D0.s index 6e2e38b5..5f0b4aca 100644 --- a/asm/non_matchings/menu/func_8009E3D0.s +++ b/asm/non_matchings/menu/func_8009E3D0.s @@ -27,7 +27,7 @@ glabel func_8009E3D0 /* 09F030 8009E430 8DEF0300 */ lw $t7, %lo(osTvType)($t7) /* 09F034 8009E434 8FB80048 */ lw $t8, 0x48($sp) /* 09F038 8009E438 15E00003 */ bnez $t7, .L8009E448 -/* 09F03C 8009E43C 3C12800E */ lui $s2, %hi(D_800DF75C) # $s2, 0x800e +/* 09F03C 8009E43C 3C12800E */ lui $s2, %hi(gMenuImageStack) # $s2, 0x800e /* 09F040 8009E440 10000002 */ b .L8009E44C /* 09F044 8009E444 2415000A */ li $s5, 10 .L8009E448: @@ -37,7 +37,7 @@ glabel func_8009E3D0 /* 09F050 8009E450 24130008 */ li $s3, 8 /* 09F054 8009E454 33280004 */ andi $t0, $t9, 4 /* 09F058 8009E458 11000002 */ beqz $t0, .L8009E464 -/* 09F05C 8009E45C 2652F75C */ addiu $s2, %lo(D_800DF75C) # addiu $s2, $s2, -0x8a4 +/* 09F05C 8009E45C 2652F75C */ addiu $s2, %lo(gMenuImageStack) # addiu $s2, $s2, -0x8a4 /* 09F060 8009E460 24130009 */ li $s3, 9 .L8009E464: /* 09F064 8009E464 2409FFB6 */ li $t1, -74 diff --git a/asm/non_matchings/menu/menu_5_loop.s b/asm/non_matchings/menu/menu_5_loop.s index 18a137a9..3504220c 100644 --- a/asm/non_matchings/menu/menu_5_loop.s +++ b/asm/non_matchings/menu/menu_5_loop.s @@ -129,10 +129,10 @@ glabel menu_5_loop /* 0943DC 800937DC 24C6F47C */ addiu $a2, %lo(gMenuDelay) # addiu $a2, $a2, -0xb84 /* 0943E0 800937E0 240B0001 */ li $t3, 1 .L800937E4: -/* 0943E4 800937E4 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 0943E4 800937E4 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 0943E8 800937E8 ACCB0000 */ sw $t3, ($a2) /* 0943EC 800937EC 0C030076 */ jal func_800C01D8 -/* 0943F0 800937F0 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 0943F0 800937F0 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 0943F4 800937F4 240400EF */ li $a0, 239 /* 0943F8 800937F8 0C000741 */ jal func_80001D04 /* 0943FC 800937FC 00002825 */ move $a1, $zero @@ -157,9 +157,9 @@ glabel menu_5_loop /* 094440 80093840 0C030C7B */ jal func_800C31EC /* 094444 80093844 24042710 */ li $a0, 10000 .L80093848: -/* 094448 80093848 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 094448 80093848 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 09444C 8009384C 0C030076 */ jal func_800C01D8 -/* 094450 80093850 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 094450 80093850 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 094454 80093854 2418FFFF */ li $t8, -1 /* 094458 80093858 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 09445C 8009385C 10000064 */ b .L800939F0 @@ -177,9 +177,9 @@ glabel menu_5_loop /* 094484 80093884 24040241 */ li $a0, 577 /* 094488 80093888 0C000741 */ jal func_80001D04 /* 09448C 8009388C 00002825 */ move $a1, $zero -/* 094490 80093890 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 094490 80093890 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 094494 80093894 0C030076 */ jal func_800C01D8 -/* 094498 80093898 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 094498 80093898 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 09449C 8009389C 2419FFFF */ li $t9, -1 /* 0944A0 800938A0 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 0944A4 800938A4 10000052 */ b .L800939F0 diff --git a/asm/non_matchings/menu/menu_audio_options_loop.s b/asm/non_matchings/menu/menu_audio_options_loop.s index 6b7a728b..4c9db625 100644 --- a/asm/non_matchings/menu/menu_audio_options_loop.s +++ b/asm/non_matchings/menu/menu_audio_options_loop.s @@ -113,10 +113,10 @@ glabel menu_audio_options_loop /* 085A10 80084E10 2418FFFF */ li $t8, -1 .L80084E14: /* 085A14 80084E14 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 085A18 80084E18 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 085A18 80084E18 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 085A1C 80084E1C AC38F47C */ sw $t8, %lo(gMenuDelay)($at) /* 085A20 80084E20 0C030076 */ jal func_800C01D8 -/* 085A24 80084E24 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 085A24 80084E24 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 085A28 80084E28 3C198012 */ lui $t9, %hi(D_801263D8) # $t9, 0x8012 /* 085A2C 80084E2C 8F3963D8 */ lw $t9, %lo(D_801263D8)($t9) /* 085A30 80084E30 00000000 */ nop diff --git a/asm/non_matchings/menu/menu_credits_loop.s b/asm/non_matchings/menu/menu_credits_loop.s index 2018fadb..e8e750a3 100644 --- a/asm/non_matchings/menu/menu_credits_loop.s +++ b/asm/non_matchings/menu/menu_credits_loop.s @@ -634,9 +634,9 @@ glabel L8009BB9C /* 09C828 8009BC28 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 09C82C 8009BC2C 0C030060 */ jal func_800C0180 /* 09C830 8009BC30 AC2EF47C */ sw $t6, %lo(gMenuDelay)($at) -/* 09C834 8009BC34 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 09C834 8009BC34 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 09C838 8009BC38 0C030076 */ jal func_800C01D8 -/* 09C83C 8009BC3C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 09C83C 8009BC3C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 09C840 8009BC40 0C03005C */ jal func_800C0170 /* 09C844 8009BC44 00000000 */ nop /* 09C848 8009BC48 0C000326 */ jal set_music_fade_timer diff --git a/asm/non_matchings/menu/menu_file_select_loop.s b/asm/non_matchings/menu/menu_file_select_loop.s index b2853807..a057cba3 100644 --- a/asm/non_matchings/menu/menu_file_select_loop.s +++ b/asm/non_matchings/menu/menu_file_select_loop.s @@ -199,9 +199,9 @@ glabel menu_file_select_loop /* 08ED54 8008E154 00000000 */ nop /* 08ED58 8008E158 0C000326 */ jal set_music_fade_timer /* 08ED5C 8008E15C 2404FF80 */ li $a0, -128 -/* 08ED60 8008E160 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08ED60 8008E160 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08ED64 8008E164 0C030076 */ jal func_800C01D8 -/* 08ED68 8008E168 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 08ED68 8008E168 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 08ED6C 8008E16C 240D0001 */ li $t5, 1 /* 08ED70 8008E170 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 08ED74 8008E174 10000045 */ b .L8008E28C @@ -271,11 +271,11 @@ glabel menu_file_select_loop .L8008E268: /* 08EE68 8008E268 8FB80040 */ lw $t8, 0x40($sp) .L8008E26C: -/* 08EE6C 8008E26C 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08EE6C 8008E26C 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08EE70 8008E270 13000006 */ beqz $t8, .L8008E28C /* 08EE74 8008E274 00000000 */ nop /* 08EE78 8008E278 0C030076 */ jal func_800C01D8 -/* 08EE7C 8008E27C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 08EE7C 8008E27C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 08EE80 8008E280 8FB90040 */ lw $t9, 0x40($sp) /* 08EE84 8008E284 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 08EE88 8008E288 AC39F47C */ sw $t9, %lo(gMenuDelay)($at) diff --git a/asm/non_matchings/menu/menu_game_select_init.s b/asm/non_matchings/menu/menu_game_select_init.s index eb66887b..7bdc46f9 100644 --- a/asm/non_matchings/menu/menu_game_select_init.s +++ b/asm/non_matchings/menu/menu_game_select_init.s @@ -11,14 +11,14 @@ glabel menu_game_select_init /* 08D12C 8008C52C AFBF002C */ sw $ra, 0x2c($sp) /* 08D130 8008C530 AC20F460 */ sw $zero, %lo(D_800DF460)($at) /* 08D134 8008C534 240E0002 */ li $t6, 2 -/* 08D138 8008C538 3C04800E */ lui $a0, %hi(D_800DF77C) # $a0, 0x800e +/* 08D138 8008C538 3C04800E */ lui $a0, %hi(sMenuTransitionFadeOut) # $a0, 0x800e /* 08D13C 8008C53C AFB30024 */ sw $s3, 0x24($sp) /* 08D140 8008C540 AFB20020 */ sw $s2, 0x20($sp) /* 08D144 8008C544 AFB1001C */ sw $s1, 0x1c($sp) /* 08D148 8008C548 AFB00018 */ sw $s0, 0x18($sp) /* 08D14C 8008C54C AE8E0000 */ sw $t6, ($s4) /* 08D150 8008C550 0C030076 */ jal func_800C01D8 -/* 08D154 8008C554 2484F77C */ addiu $a0, %lo(D_800DF77C) # addiu $a0, $a0, -0x884 +/* 08D154 8008C554 2484F77C */ addiu $a0, %lo(sMenuTransitionFadeOut) # addiu $a0, $a0, -0x884 /* 08D158 8008C558 0C01BAEA */ jal func_8006EBA8 /* 08D15C 8008C55C 00000000 */ nop /* 08D160 8008C560 0C006DE4 */ jal func_8001B790 diff --git a/asm/non_matchings/menu/menu_game_select_loop.s b/asm/non_matchings/menu/menu_game_select_loop.s index e0f6e3d7..d3e9260f 100644 --- a/asm/non_matchings/menu/menu_game_select_loop.s +++ b/asm/non_matchings/menu/menu_game_select_loop.s @@ -154,9 +154,9 @@ glabel menu_game_select_loop /* 08D5F4 8008C9F4 0C000326 */ jal set_music_fade_timer /* 08D5F8 8008C9F8 2404FF80 */ li $a0, -128 .L8008C9FC: -/* 08D5FC 8008C9FC 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08D5FC 8008C9FC 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08D600 8008CA00 0C030076 */ jal func_800C01D8 -/* 08D604 8008CA04 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 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) @@ -167,9 +167,9 @@ glabel menu_game_select_loop /* 08D624 8008CA24 00000000 */ nop .L8008CA28: /* 08D628 8008CA28 11800007 */ beqz $t4, .L8008CA48 -/* 08D62C 8008CA2C 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08D62C 8008CA2C 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08D630 8008CA30 0C030076 */ jal func_800C01D8 -/* 08D634 8008CA34 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 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 diff --git a/asm/non_matchings/menu/menu_ghost_data_init.s b/asm/non_matchings/menu/menu_ghost_data_init.s index 58118dca..ff1ec4fe 100644 --- a/asm/non_matchings/menu/menu_ghost_data_init.s +++ b/asm/non_matchings/menu/menu_ghost_data_init.s @@ -31,7 +31,7 @@ glabel menu_ghost_data_init /* 09A6CC 80099ACC 0C02719D */ jal func_8009C674 /* 09A6D0 80099AD0 24841708 */ addiu $a0, %lo(D_800E1708) # addiu $a0, $a0, 0x1708 /* 09A6D4 80099AD4 3C04800E */ lui $a0, %hi(D_800E174C) # $a0, 0x800e -/* 09A6D8 80099AD8 0C027229 */ jal func_8009C8A4 +/* 09A6D8 80099AD8 0C027229 */ jal allocate_menu_images /* 09A6DC 80099ADC 2484174C */ addiu $a0, %lo(D_800E174C) # addiu $a0, $a0, 0x174c /* 09A6E0 80099AE0 0C03105C */ jal func_800C4170 /* 09A6E4 80099AE4 24040002 */ li $a0, 2 @@ -249,9 +249,9 @@ glabel menu_ghost_data_init /* 09AA34 80099E34 3C018012 */ lui $at, %hi(D_80126498) # $at, 0x8012 /* 09AA38 80099E38 17200006 */ bnez $t9, .L80099E54 /* 09AA3C 80099E3C AC206498 */ sw $zero, %lo(D_80126498)($at) -/* 09AA40 80099E40 3C04800E */ lui $a0, %hi(D_800DF77C) # $a0, 0x800e +/* 09AA40 80099E40 3C04800E */ lui $a0, %hi(sMenuTransitionFadeOut) # $a0, 0x800e /* 09AA44 80099E44 0C030076 */ jal func_800C01D8 -/* 09AA48 80099E48 2484F77C */ addiu $a0, %lo(D_800DF77C) # addiu $a0, $a0, -0x884 +/* 09AA48 80099E48 2484F77C */ addiu $a0, %lo(sMenuTransitionFadeOut) # addiu $a0, $a0, -0x884 /* 09AA4C 80099E4C 10000004 */ b .L80099E60 /* 09AA50 80099E50 8FBF0044 */ lw $ra, 0x44($sp) .L80099E54: diff --git a/asm/non_matchings/menu/menu_ghost_data_loop.s b/asm/non_matchings/menu/menu_ghost_data_loop.s index bb206f25..f32a73ed 100644 --- a/asm/non_matchings/menu/menu_ghost_data_loop.s +++ b/asm/non_matchings/menu/menu_ghost_data_loop.s @@ -113,10 +113,10 @@ glabel menu_ghost_data_loop /* 09B574 8009A974 1540000A */ bnez $t2, .L8009A9A0 .L8009A978: /* 09B578 8009A978 24030001 */ li $v1, 1 -/* 09B57C 8009A97C 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 09B57C 8009A97C 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 09B580 8009A980 AD230000 */ sw $v1, ($t1) /* 09B584 8009A984 0C030076 */ jal func_800C01D8 -/* 09B588 8009A988 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 09B588 8009A988 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 09B58C 8009A98C 24040241 */ li $a0, 577 /* 09B590 8009A990 0C000741 */ jal func_80001D04 /* 09B594 8009A994 00002825 */ move $a1, $zero @@ -213,10 +213,10 @@ glabel menu_ghost_data_loop /* 09B6DC 8009AADC 24C663E0 */ addiu $a2, %lo(D_801263E0) # addiu $a2, $a2, 0x63e0 .L8009AAE0: /* 09B6E0 8009AAE0 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 09B6E4 8009AAE4 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 09B6E4 8009AAE4 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 09B6E8 8009AAE8 AC23F47C */ sw $v1, %lo(gMenuDelay)($at) /* 09B6EC 8009AAEC 0C030076 */ jal func_800C01D8 -/* 09B6F0 8009AAF0 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 09B6F0 8009AAF0 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 09B6F4 8009AAF4 24040241 */ li $a0, 577 /* 09B6F8 8009AAF8 0C000741 */ jal func_80001D04 /* 09B6FC 8009AAFC 00002825 */ move $a1, $zero diff --git a/asm/non_matchings/menu/menu_magic_codes_list_loop.s b/asm/non_matchings/menu/menu_magic_codes_list_loop.s index 6104383a..a1824d6f 100644 --- a/asm/non_matchings/menu/menu_magic_codes_list_loop.s +++ b/asm/non_matchings/menu/menu_magic_codes_list_loop.s @@ -240,10 +240,10 @@ glabel menu_magic_codes_list_loop /* 08B8A0 8008ACA0 8FA90048 */ lw $t1, 0x48($sp) /* 08B8A4 8008ACA4 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 08B8A8 8008ACA8 11200007 */ beqz $t1, .L8008ACC8 -/* 08B8AC 8008ACAC 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 08B8AC 8008ACAC 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 08B8B0 8008ACB0 AC29F47C */ sw $t1, %lo(gMenuDelay)($at) /* 08B8B4 8008ACB4 0C030076 */ jal func_800C01D8 -/* 08B8B8 8008ACB8 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 08B8B8 8008ACB8 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 08B8BC 8008ACBC 24040241 */ li $a0, 577 /* 08B8C0 8008ACC0 0C000741 */ jal func_80001D04 /* 08B8C4 8008ACC4 00002825 */ move $a1, $zero diff --git a/asm/non_matchings/menu/menu_magic_codes_loop.s b/asm/non_matchings/menu/menu_magic_codes_loop.s index 6a44c5bc..a902ad69 100644 --- a/asm/non_matchings/menu/menu_magic_codes_loop.s +++ b/asm/non_matchings/menu/menu_magic_codes_loop.s @@ -488,8 +488,8 @@ glabel menu_magic_codes_loop /* 08AFAC 8008A3AC AFB8003C */ sw $t8, 0x3c($sp) .L8008A3B0: /* 08AFB0 8008A3B0 8FB90040 */ lw $t9, 0x40($sp) -/* 08AFB4 8008A3B4 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e -/* 08AFB8 8008A3B8 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 08AFB4 8008A3B4 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e +/* 08AFB8 8008A3B8 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 08AFBC 8008A3BC 0C030076 */ jal func_800C01D8 /* 08AFC0 8008A3C0 AC39F47C */ sw $t9, %lo(gMenuDelay)($at) .L8008A3C4: diff --git a/asm/non_matchings/menu/menu_options_loop.s b/asm/non_matchings/menu/menu_options_loop.s index 5eed90fb..76f449b5 100644 --- a/asm/non_matchings/menu/menu_options_loop.s +++ b/asm/non_matchings/menu/menu_options_loop.s @@ -86,10 +86,10 @@ glabel menu_options_loop /* 085094 80084494 2404FF80 */ li $a0, -128 /* 085098 80084498 2419FFFF */ li $t9, -1 /* 08509C 8008449C 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 0850A0 800844A0 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 0850A0 800844A0 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 0850A4 800844A4 AC39F47C */ sw $t9, %lo(gMenuDelay)($at) /* 0850A8 800844A8 0C030076 */ jal func_800C01D8 -/* 0850AC 800844AC 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 0850AC 800844AC 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 0850B0 800844B0 24040241 */ li $a0, 577 /* 0850B4 800844B4 0C000741 */ jal func_80001D04 /* 0850B8 800844B8 00002825 */ move $a1, $zero diff --git a/asm/non_matchings/menu/menu_results_loop.s b/asm/non_matchings/menu/menu_results_loop.s index 82e160f4..57aa80ba 100644 --- a/asm/non_matchings/menu/menu_results_loop.s +++ b/asm/non_matchings/menu/menu_results_loop.s @@ -115,9 +115,9 @@ glabel menu_results_loop /* 098058 80097458 AFA80020 */ sw $t0, 0x20($sp) /* 09805C 8009745C 0C000326 */ jal set_music_fade_timer /* 098060 80097460 2404FF80 */ li $a0, -128 -/* 098064 80097464 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 098064 80097464 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 098068 80097468 0C030076 */ jal func_800C01D8 -/* 09806C 8009746C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 09806C 8009746C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 098070 80097470 24080001 */ li $t0, 1 /* 098074 80097474 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 098078 80097478 10000050 */ b .L800975BC @@ -177,10 +177,10 @@ glabel menu_results_loop /* 098138 80097538 10000020 */ b .L800975BC /* 09813C 8009753C AC8F0000 */ sw $t7, ($a0) .L80097540: -/* 098140 80097540 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 098140 80097540 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 098144 80097544 AD280000 */ sw $t0, ($t1) /* 098148 80097548 0C030076 */ jal func_800C01D8 -/* 09814C 8009754C 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 09814C 8009754C 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 098150 80097550 0C000326 */ jal set_music_fade_timer /* 098154 80097554 2404FF80 */ li $a0, -128 /* 098158 80097558 10000019 */ b .L800975C0 diff --git a/asm/non_matchings/menu/menu_save_options_loop.s b/asm/non_matchings/menu/menu_save_options_loop.s index b600ab56..ef436535 100644 --- a/asm/non_matchings/menu/menu_save_options_loop.s +++ b/asm/non_matchings/menu/menu_save_options_loop.s @@ -224,11 +224,11 @@ glabel L80087E1C .L80087E70: /* 088A70 80087E70 3C08800E */ lui $t0, %hi(gMenuDelay) # $t0, 0x800e /* 088A74 80087E74 8D08F47C */ lw $t0, %lo(gMenuDelay)($t0) -/* 088A78 80087E78 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 088A78 80087E78 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 088A7C 80087E7C 11000003 */ beqz $t0, .L80087E8C /* 088A80 80087E80 00000000 */ nop /* 088A84 80087E84 0C030076 */ jal func_800C01D8 -/* 088A88 80087E88 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 088A88 80087E88 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c .L80087E8C: /* 088A8C 80087E8C 3C018012 */ lui $at, %hi(gIgnorePlayerInput) # $at, 0x8012 /* 088A90 80087E90 AC2063C4 */ sw $zero, %lo(gIgnorePlayerInput)($at) diff --git a/asm/non_matchings/menu/menu_title_screen_loop.s b/asm/non_matchings/menu/menu_title_screen_loop.s index ccb31e16..4ae68efe 100644 --- a/asm/non_matchings/menu/menu_title_screen_loop.s +++ b/asm/non_matchings/menu/menu_title_screen_loop.s @@ -280,12 +280,12 @@ glabel menu_title_screen_loop /* 0849DC 80083DDC 4500004B */ bc1f .L80083F0C /* 0849E0 80083DE0 00000000 */ nop /* 0849E4 80083DE4 44818000 */ mtc1 $at, $f16 -/* 0849E8 80083DE8 3C0A800E */ lui $t2, %hi(D_800DF760) # $t2, 0x800e +/* 0849E8 80083DE8 3C0A800E */ lui $t2, %hi(sMenuMusicVolume) # $t2, 0x800e /* 0849EC 80083DEC 4610003C */ c.lt.s $f0, $f16 /* 0849F0 80083DF0 3C014090 */ li $at, 0x40900000 # 4.500000 /* 0849F4 80083DF4 45000017 */ bc1f .L80083E54 /* 0849F8 80083DF8 00000000 */ nop -/* 0849FC 80083DFC 8D4AF760 */ lw $t2, %lo(D_800DF760)($t2) +/* 0849FC 80083DFC 8D4AF760 */ lw $t2, %lo(sMenuMusicVolume)($t2) /* 084A00 80083E00 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 084A04 80083E04 448A9000 */ mtc1 $t2, $f18 /* 084A08 80083E08 44813000 */ mtc1 $at, $f6 @@ -309,12 +309,12 @@ glabel menu_title_screen_loop /* 084A50 80083E50 2463686C */ addiu $v1, %lo(D_8012686C) # addiu $v1, $v1, 0x686c .L80083E54: /* 084A54 80083E54 44819000 */ mtc1 $at, $f18 -/* 084A58 80083E58 3C04800E */ lui $a0, %hi(D_800DF760) # $a0, 0x800e +/* 084A58 80083E58 3C04800E */ lui $a0, %hi(sMenuMusicVolume) # $a0, 0x800e /* 084A5C 80083E5C 4612003C */ c.lt.s $f0, $f18 /* 084A60 80083E60 3C0140A0 */ li $at, 0x40A00000 # 5.000000 /* 084A64 80083E64 45000009 */ bc1f .L80083E8C /* 084A68 80083E68 00000000 */ nop -/* 084A6C 80083E6C 8C84F760 */ lw $a0, %lo(D_800DF760)($a0) +/* 084A6C 80083E6C 8C84F760 */ lw $a0, %lo(sMenuMusicVolume)($a0) /* 084A70 80083E70 00000000 */ nop /* 084A74 80083E74 00046843 */ sra $t5, $a0, 1 /* 084A78 80083E78 0C000664 */ jal set_relative_volume_for_music @@ -326,10 +326,10 @@ glabel menu_title_screen_loop /* 084A8C 80083E8C 44813000 */ mtc1 $at, $f6 /* 084A90 80083E90 3C014080 */ li $at, 0x40800000 # 4.000000 /* 084A94 80083E94 4606003C */ c.lt.s $f0, $f6 -/* 084A98 80083E98 3C0F800E */ lui $t7, %hi(D_800DF760) # $t7, 0x800e +/* 084A98 80083E98 3C0F800E */ lui $t7, %hi(sMenuMusicVolume) # $t7, 0x800e /* 084A9C 80083E9C 45000016 */ bc1f .L80083EF8 -/* 084AA0 80083EA0 3C04800E */ lui $a0, %hi(D_800DF760+3) # $a0, 0x800e -/* 084AA4 80083EA4 8DEFF760 */ lw $t7, %lo(D_800DF760)($t7) +/* 084AA0 80083EA0 3C04800E */ lui $a0, %hi(sMenuMusicVolume+3) # $a0, 0x800e +/* 084AA4 80083EA4 8DEFF760 */ lw $t7, %lo(sMenuMusicVolume)($t7) /* 084AA8 80083EA8 44815000 */ mtc1 $at, $f10 /* 084AAC 80083EAC 448F2000 */ mtc1 $t7, $f4 /* 084AB0 80083EB0 460A0401 */ sub.s $f16, $f0, $f10 @@ -351,7 +351,7 @@ glabel menu_title_screen_loop /* 084AF0 80083EF0 10000006 */ b .L80083F0C /* 084AF4 80083EF4 2463686C */ addiu $v1, %lo(D_8012686C) # addiu $v1, $v1, 0x686c .L80083EF8: -/* 084AF8 80083EF8 9084F763 */ lbu $a0, %lo(D_800DF760+3)($a0) +/* 084AF8 80083EF8 9084F763 */ lbu $a0, %lo(sMenuMusicVolume+3)($a0) /* 084AFC 80083EFC 0C000664 */ jal set_relative_volume_for_music /* 084B00 80083F00 00000000 */ nop /* 084B04 80083F04 3C038012 */ lui $v1, %hi(D_8012686C) # $v1, 0x8012 @@ -434,10 +434,10 @@ glabel menu_title_screen_loop /* 084C1C 8008401C 00C02025 */ move $a0, $a2 /* 084C20 80084020 240F0001 */ li $t7, 1 /* 084C24 80084024 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e -/* 084C28 80084028 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 084C28 80084028 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 084C2C 8008402C AC2FF47C */ sw $t7, %lo(gMenuDelay)($at) /* 084C30 80084030 0C030076 */ jal func_800C01D8 -/* 084C34 80084034 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 084C34 80084034 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 084C38 80084038 0C03005C */ jal func_800C0170 /* 084C3C 8008403C 00000000 */ nop /* 084C40 80084040 240400EF */ li $a0, 239 diff --git a/asm/non_matchings/menu/menu_track_select_init.s b/asm/non_matchings/menu/menu_track_select_init.s index cec61731..a09b35e3 100644 --- a/asm/non_matchings/menu/menu_track_select_init.s +++ b/asm/non_matchings/menu/menu_track_select_init.s @@ -90,14 +90,14 @@ glabel menu_track_select_init /* 08F4FC 8008E8FC 3C018012 */ lui $at, %hi(D_801267D0) # $at, 0x8012 /* 08F500 8008E900 0C023C03 */ jal func_8008F00C /* 08F504 8008E904 AC3567D0 */ sw $s5, %lo(D_801267D0)($at) -/* 08F508 8008E908 3C04800E */ lui $a0, %hi(D_800DF77C) # $a0, 0x800e +/* 08F508 8008E908 3C04800E */ lui $a0, %hi(sMenuTransitionFadeOut) # $a0, 0x800e /* 08F50C 8008E90C 0C030076 */ jal func_800C01D8 -/* 08F510 8008E910 2484F77C */ addiu $a0, %lo(D_800DF77C) # addiu $a0, $a0, -0x884 +/* 08F510 8008E910 2484F77C */ addiu $a0, %lo(sMenuTransitionFadeOut) # addiu $a0, $a0, -0x884 /* 08F514 8008E914 0C03005C */ jal func_800C0170 /* 08F518 8008E918 00000000 */ nop /* 08F51C 8008E91C 24040032 */ li $a0, 50 /* 08F520 8008E920 24050069 */ li $a1, 105 -/* 08F524 8008E924 0C01DED7 */ jal func_80077B5C +/* 08F524 8008E924 0C01DED7 */ jal set_background_fill_colour /* 08F528 8008E928 240600DF */ li $a2, 223 /* 08F52C 8008E92C 3C11800E */ lui $s1, %hi(D_800E0710) # $s1, 0x800e /* 08F530 8008E930 3C168012 */ lui $s6, %hi(D_80126550) # $s6, 0x8012 @@ -334,7 +334,7 @@ glabel menu_track_select_init /* 08F8B0 8008ECB0 0C02719D */ jal func_8009C674 /* 08F8B4 8008ECB4 248407C4 */ addiu $a0, %lo(D_800E07C4) # addiu $a0, $a0, 0x7c4 /* 08F8B8 8008ECB8 3C04800E */ lui $a0, %hi(D_800E07E0) # $a0, 0x800e -/* 08F8BC 8008ECBC 0C027229 */ jal func_8009C8A4 +/* 08F8BC 8008ECBC 0C027229 */ jal allocate_menu_images /* 08F8C0 8008ECC0 248407E0 */ addiu $a0, %lo(D_800E07E0) # addiu $a0, $a0, 0x7e0 /* 08F8C4 8008ECC4 0C02392C */ jal func_8008E4B0 /* 08F8C8 8008ECC8 00000000 */ nop @@ -520,9 +520,9 @@ glabel menu_track_select_init /* 08FB68 8008EF68 24040002 */ li $a0, 2 /* 08FB6C 8008EF6C 3C018012 */ lui $at, %hi(D_80126840) # $at, 0x8012 /* 08FB70 8008EF70 AC206840 */ sw $zero, %lo(D_80126840)($at) -/* 08FB74 8008EF74 3C10800E */ lui $s0, %hi(D_800DF760) # $s0, 0x800e +/* 08FB74 8008EF74 3C10800E */ lui $s0, %hi(sMenuMusicVolume) # $s0, 0x800e /* 08FB78 8008EF78 3C018012 */ lui $at, %hi(D_80126848) # $at, 0x8012 -/* 08FB7C 8008EF7C 2610F760 */ addiu $s0, %lo(D_800DF760) # addiu $s0, $s0, -0x8a0 +/* 08FB7C 8008EF7C 2610F760 */ addiu $s0, %lo(sMenuMusicVolume) # addiu $s0, $s0, -0x8a0 /* 08FB80 8008EF80 AC206848 */ sw $zero, %lo(D_80126848)($at) /* 08FB84 8008EF84 AE000000 */ sw $zero, ($s0) /* 08FB88 8008EF88 0C0002F8 */ jal set_music_player_voice_limit diff --git a/asm/non_matchings/menu/menu_track_select_loop.s b/asm/non_matchings/menu/menu_track_select_loop.s index 318b57ee..319cef00 100644 --- a/asm/non_matchings/menu/menu_track_select_loop.s +++ b/asm/non_matchings/menu/menu_track_select_loop.s @@ -75,8 +75,8 @@ glabel menu_track_select_loop /* 08FF48 8008F348 0C024862 */ jal func_80092188 /* 08FF4C 8008F34C 00000000 */ nop .L8008F350: -/* 08FF50 8008F350 3C03800E */ lui $v1, %hi(D_800DF760) # $v1, 0x800e -/* 08FF54 8008F354 2463F760 */ addiu $v1, %lo(D_800DF760) # addiu $v1, $v1, -0x8a0 +/* 08FF50 8008F350 3C03800E */ lui $v1, %hi(sMenuMusicVolume) # $v1, 0x800e +/* 08FF54 8008F354 2463F760 */ addiu $v1, %lo(sMenuMusicVolume) # addiu $v1, $v1, -0x8a0 /* 08FF58 8008F358 8C620000 */ lw $v0, ($v1) /* 08FF5C 8008F35C 8FAF0020 */ lw $t7, 0x20($sp) /* 08FF60 8008F360 04410005 */ bgez $v0, .L8008F378 diff --git a/asm/non_matchings/menu/menu_trophy_race_rankings_init.s b/asm/non_matchings/menu/menu_trophy_race_rankings_init.s index 2c09bef4..019dbc3a 100644 --- a/asm/non_matchings/menu/menu_trophy_race_rankings_init.s +++ b/asm/non_matchings/menu/menu_trophy_race_rankings_init.s @@ -20,7 +20,7 @@ glabel menu_trophy_race_rankings_init /* 09966C 80098A6C 0C02719D */ jal func_8009C674 /* 099670 80098A70 24841024 */ addiu $a0, %lo(D_800E1024) # addiu $a0, $a0, 0x1024 /* 099674 80098A74 3C04800E */ lui $a0, %hi(D_800E1040) # $a0, 0x800e -/* 099678 80098A78 0C027229 */ jal func_8009C8A4 +/* 099678 80098A78 0C027229 */ jal allocate_menu_images /* 09967C 80098A7C 24841040 */ addiu $a0, %lo(D_800E1040) # addiu $a0, $a0, 0x1040 /* 099680 80098A80 3C03800E */ lui $v1, %hi(D_800E0FEC) # $v1, 0x800e /* 099684 80098A84 24630FEC */ addiu $v1, %lo(D_800E0FEC) # addiu $v1, $v1, 0xfec diff --git a/asm/non_matchings/menu/menu_trophy_race_rankings_loop.s b/asm/non_matchings/menu/menu_trophy_race_rankings_loop.s index c59d92ba..e77f5c80 100644 --- a/asm/non_matchings/menu/menu_trophy_race_rankings_loop.s +++ b/asm/non_matchings/menu/menu_trophy_race_rankings_loop.s @@ -199,9 +199,9 @@ glabel menu_trophy_race_rankings_loop /* 099EAC 800992AC AFA0004C */ sw $zero, 0x4c($sp) /* 099EB0 800992B0 0C000326 */ jal set_music_fade_timer /* 099EB4 800992B4 AFAB002C */ sw $t3, 0x2c($sp) -/* 099EB8 800992B8 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 099EB8 800992B8 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 099EBC 800992BC 0C030076 */ jal func_800C01D8 -/* 099EC0 800992C0 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 099EC0 800992C0 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 099EC4 800992C4 3C0D800E */ lui $t5, %hi(D_800E0FE4) # $t5, 0x800e /* 099EC8 800992C8 8DAD0FE4 */ lw $t5, %lo(D_800E0FE4)($t5) /* 099ECC 800992CC 8FA5004C */ lw $a1, 0x4c($sp) diff --git a/asm/non_matchings/menu/menu_trophy_race_round_loop.s b/asm/non_matchings/menu/menu_trophy_race_round_loop.s index 3f64a0b6..e5b867df 100644 --- a/asm/non_matchings/menu/menu_trophy_race_round_loop.s +++ b/asm/non_matchings/menu/menu_trophy_race_round_loop.s @@ -68,12 +68,12 @@ glabel menu_trophy_race_round_loop /* 099294 80098694 00000000 */ nop /* 099298 80098698 3C198012 */ lui $t9, %hi(D_801267E8) # $t9, 0x8012 /* 09929C 8009869C 8F3967E8 */ lw $t9, %lo(D_801267E8)($t9) -/* 0992A0 800986A0 3C04800E */ lui $a0, %hi(D_800DF774) # $a0, 0x800e +/* 0992A0 800986A0 3C04800E */ lui $a0, %hi(sMenuTransitionFadeIn) # $a0, 0x800e /* 0992A4 800986A4 33289000 */ andi $t0, $t9, 0x9000 /* 0992A8 800986A8 11000008 */ beqz $t0, .L800986CC /* 0992AC 800986AC 00000000 */ nop /* 0992B0 800986B0 0C030076 */ jal func_800C01D8 -/* 0992B4 800986B4 2484F774 */ addiu $a0, %lo(D_800DF774) # addiu $a0, $a0, -0x88c +/* 0992B4 800986B4 2484F774 */ addiu $a0, %lo(sMenuTransitionFadeIn) # addiu $a0, $a0, -0x88c /* 0992B8 800986B8 24090001 */ li $t1, 1 /* 0992BC 800986BC 3C01800E */ lui $at, %hi(gMenuDelay) # $at, 0x800e /* 0992C0 800986C0 AC29F47C */ sw $t1, %lo(gMenuDelay)($at) diff --git a/asm/non_matchings/menu/render_file_select_menu.s b/asm/non_matchings/menu/render_file_select_menu.s index a0aee289..90bc01d5 100644 --- a/asm/non_matchings/menu/render_file_select_menu.s +++ b/asm/non_matchings/menu/render_file_select_menu.s @@ -89,8 +89,8 @@ glabel render_file_select_menu /* 08DABC 8008CEBC 3C118012 */ lui $s1, %hi(gSavefileInfo) # $s1, 0x8012 /* 08DAC0 8008CEC0 3C10800E */ lui $s0, %hi(D_800E03CC) # $s0, 0x800e /* 08DAC4 8008CEC4 3C14800E */ lui $s4, %hi(D_800E03FC) # $s4, 0x800e -/* 08DAC8 8008CEC8 3C13800E */ lui $s3, %hi(D_800DF75C) # $s3, 0x800e -/* 08DACC 8008CECC 2673F75C */ addiu $s3, %lo(D_800DF75C) # addiu $s3, $s3, -0x8a4 +/* 08DAC8 8008CEC8 3C13800E */ lui $s3, %hi(gMenuImageStack) # $s3, 0x800e +/* 08DACC 8008CECC 2673F75C */ addiu $s3, %lo(gMenuImageStack) # addiu $s3, $s3, -0x8a4 /* 08DAD0 8008CED0 269403FC */ addiu $s4, %lo(D_800E03FC) # addiu $s4, $s4, 0x3fc /* 08DAD4 8008CED4 261003CC */ addiu $s0, %lo(D_800E03CC) # addiu $s0, $s0, 0x3cc /* 08DAD8 8008CED8 263164A0 */ addiu $s1, %lo(gSavefileInfo) # addiu $s1, $s1, 0x64a0 @@ -118,7 +118,7 @@ glabel render_file_select_menu /* 08DB28 8008CF28 AFA00014 */ sw $zero, 0x14($sp) /* 08DB2C 8008CF2C AFAB0018 */ sw $t3, 0x18($sp) /* 08DB30 8008CF30 03282821 */ addu $a1, $t9, $t0 -/* 08DB34 8008CF34 0C02330A */ jal func_8008CC28 +/* 08DB34 8008CF34 0C02330A */ jal render_menu_image /* 08DB38 8008CF38 012A3021 */ addu $a2, $t1, $t2 /* 08DB3C 8008CF3C 0C01A142 */ jal func_80068508 /* 08DB40 8008CF40 24040001 */ li $a0, 1 @@ -150,7 +150,7 @@ glabel render_file_select_menu /* 08DBA0 8008CFA0 AFA90018 */ sw $t1, 0x18($sp) /* 08DBA4 8008CFA4 AFA00014 */ sw $zero, 0x14($sp) /* 08DBA8 8008CFA8 AFA00010 */ sw $zero, 0x10($sp) -/* 08DBAC 8008CFAC 0C02330A */ jal func_8008CC28 +/* 08DBAC 8008CFAC 0C02330A */ jal render_menu_image /* 08DBB0 8008CFB0 03283021 */ addu $a2, $t9, $t0 /* 08DBB4 8008CFB4 962A0002 */ lhu $t2, 2($s1) /* 08DBB8 8008CFB8 8E6C0000 */ lw $t4, ($s3) @@ -180,15 +180,15 @@ glabel render_file_select_menu /* 08DC10 8008D010 AFB90018 */ sw $t9, 0x18($sp) /* 08DC14 8008D014 AFA00014 */ sw $zero, 0x14($sp) /* 08DC18 8008D018 AFA00010 */ sw $zero, 0x10($sp) -/* 08DC1C 8008D01C 0C02330A */ jal func_8008CC28 +/* 08DC1C 8008D01C 0C02330A */ jal render_menu_image /* 08DC20 8008D020 01F83021 */ addu $a2, $t7, $t8 /* 08DC24 8008D024 0C01A142 */ jal func_80068508 /* 08DC28 8008D028 00002025 */ move $a0, $zero /* 08DC2C 8008D02C 24020040 */ li $v0, 64 -/* 08DC30 8008D030 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e -/* 08DC34 8008D034 A022F4A8 */ sb $v0, %lo(D_800DF4A8)($at) -/* 08DC38 8008D038 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e -/* 08DC3C 8008D03C A022F4AC */ sb $v0, %lo(D_800DF4AC)($at) +/* 08DC30 8008D030 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e +/* 08DC34 8008D034 A022F4A8 */ sb $v0, %lo(sMenuGuiColourG)($at) +/* 08DC38 8008D038 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e +/* 08DC3C 8008D03C A022F4AC */ sb $v0, %lo(sMenuGuiColourB)($at) /* 08DC40 8008D040 860B0002 */ lh $t3, 2($s0) /* 08DC44 8008D044 868A0012 */ lh $t2, 0x12($s4) /* 08DC48 8008D048 86090000 */ lh $t1, ($s0) @@ -200,13 +200,13 @@ glabel render_file_select_menu /* 08DC60 8008D060 AFA00010 */ sw $zero, 0x10($sp) /* 08DC64 8008D064 AFA00014 */ sw $zero, 0x14($sp) /* 08DC68 8008D068 014B3021 */ addu $a2, $t2, $t3 -/* 08DC6C 8008D06C 0C02330A */ jal func_8008CC28 +/* 08DC6C 8008D06C 0C02330A */ jal render_menu_image /* 08DC70 8008D070 01092821 */ addu $a1, $t0, $t1 /* 08DC74 8008D074 240200FF */ li $v0, 255 -/* 08DC78 8008D078 3C01800E */ lui $at, %hi(D_800DF4A8) # $at, 0x800e -/* 08DC7C 8008D07C A022F4A8 */ sb $v0, %lo(D_800DF4A8)($at) -/* 08DC80 8008D080 3C01800E */ lui $at, %hi(D_800DF4AC) # $at, 0x800e -/* 08DC84 8008D084 A022F4AC */ sb $v0, %lo(D_800DF4AC)($at) +/* 08DC78 8008D078 3C01800E */ lui $at, %hi(sMenuGuiColourG) # $at, 0x800e +/* 08DC7C 8008D07C A022F4A8 */ sb $v0, %lo(sMenuGuiColourG)($at) +/* 08DC80 8008D080 3C01800E */ lui $at, %hi(sMenuGuiColourB) # $at, 0x800e +/* 08DC84 8008D084 A022F4AC */ sb $v0, %lo(sMenuGuiColourB)($at) /* 08DC88 8008D088 0C01EFC7 */ jal func_8007BF1C /* 08DC8C 8008D08C 24040001 */ li $a0, 1 /* 08DC90 8008D090 10000014 */ b .L8008D0E4 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 a89951db..430154f4 100644 --- a/asm/non_matchings/menu/render_track_select_setup_ui.s +++ b/asm/non_matchings/menu/render_track_select_setup_ui.s @@ -57,9 +57,9 @@ glabel render_track_select_setup_ui /* 091BF0 80090FF0 248463A0 */ addiu $a0, %lo(D_801263A0) # addiu $a0, $a0, 0x63a0 /* 091BF4 80090FF4 3C02800E */ lui $v0, %hi(gMenuDelay) # $v0, 0x800e /* 091BF8 80090FF8 8C42F47C */ lw $v0, %lo(gMenuDelay)($v0) -/* 091BFC 80090FFC 3C03800E */ lui $v1, %hi(D_800DF75C) # $v1, 0x800e +/* 091BFC 80090FFC 3C03800E */ lui $v1, %hi(gMenuImageStack) # $v1, 0x800e /* 091C00 80091000 04410029 */ bgez $v0, .L800910A8 -/* 091C04 80091004 2463F75C */ addiu $v1, %lo(D_800DF75C) # addiu $v1, $v1, -0x8a4 +/* 091C04 80091004 2463F75C */ addiu $v1, %lo(gMenuImageStack) # addiu $v1, $v1, -0x8a4 /* 091C08 80091008 3C028012 */ lui $v0, %hi(D_801269F4) # $v0, 0x8012 /* 091C0C 8009100C 8C4269F4 */ lw $v0, %lo(D_801269F4)($v0) /* 091C10 80091010 24010004 */ li $at, 4 @@ -111,15 +111,15 @@ glabel render_track_select_setup_ui /* 091CB4 800910B4 10200428 */ beqz $at, .L80092158 /* 091CB8 800910B8 3C04800E */ lui $a0, %hi(gTrackIdForPreview) # $a0, 0x800e /* 091CBC 800910BC 04410006 */ bgez $v0, .L800910D8 -/* 091CC0 800910C0 3C1E800E */ lui $fp, %hi(D_800DF764) # $fp, 0x800e +/* 091CC0 800910C0 3C1E800E */ lui $fp, %hi(sMenuGuiOpacity) # $fp, 0x800e /* 091CC4 800910C4 0002C900 */ sll $t9, $v0, 4 /* 091CC8 800910C8 272800FF */ addiu $t0, $t9, 0xff -/* 091CCC 800910CC 27DEF764 */ addiu $fp, %lo(D_800DF764) # addiu $fp, $fp, -0x89c +/* 091CCC 800910CC 27DEF764 */ addiu $fp, %lo(sMenuGuiOpacity) # addiu $fp, $fp, -0x89c /* 091CD0 800910D0 10000005 */ b .L800910E8 /* 091CD4 800910D4 AFC80000 */ sw $t0, ($fp) .L800910D8: -/* 091CD8 800910D8 3C1E800E */ lui $fp, %hi(D_800DF764) # $fp, 0x800e -/* 091CDC 800910DC 27DEF764 */ addiu $fp, %lo(D_800DF764) # addiu $fp, $fp, -0x89c +/* 091CD8 800910D8 3C1E800E */ lui $fp, %hi(sMenuGuiOpacity) # $fp, 0x800e +/* 091CDC 800910DC 27DEF764 */ addiu $fp, %lo(sMenuGuiOpacity) # addiu $fp, $fp, -0x89c /* 091CE0 800910E0 240900FF */ li $t1, 255 /* 091CE4 800910E4 AFC90000 */ sw $t1, ($fp) .L800910E8: @@ -880,8 +880,8 @@ glabel render_track_select_setup_ui /* 092814 80091C14 10200022 */ beqz $at, .L80091CA0 /* 092818 80091C18 8FAC0074 */ lw $t4, 0x74($sp) /* 09281C 80091C1C 15E0001F */ bnez $t7, .L80091C9C -/* 092820 80091C20 3C02800E */ lui $v0, %hi(D_800DF75C) # $v0, 0x800e -/* 092824 80091C24 2442F75C */ addiu $v0, %lo(D_800DF75C) # addiu $v0, $v0, -0x8a4 +/* 092820 80091C20 3C02800E */ lui $v0, %hi(gMenuImageStack) # $v0, 0x800e +/* 092824 80091C24 2442F75C */ addiu $v0, %lo(gMenuImageStack) # addiu $v0, $v0, -0x8a4 /* 092828 80091C28 3C01C250 */ li $at, 0xC2500000 # -52.000000 /* 09282C 80091C2C 44814000 */ mtc1 $at, $f8 /* 092830 80091C30 8C590000 */ lw $t9, ($v0) @@ -906,8 +906,8 @@ glabel render_track_select_setup_ui /* 092878 80091C78 0C027298 */ jal func_8009CA60 /* 09287C 80091C7C E51000EC */ swc1 $f16, 0xec($t0) /* 092880 80091C80 3C014240 */ li $at, 0x42400000 # 48.000000 -/* 092884 80091C84 3C0B800E */ lui $t3, %hi(D_800DF75C) # $t3, 0x800e -/* 092888 80091C88 8D6BF75C */ lw $t3, %lo(D_800DF75C)($t3) +/* 092884 80091C84 3C0B800E */ lui $t3, %hi(gMenuImageStack) # $t3, 0x800e +/* 092888 80091C88 8D6BF75C */ lw $t3, %lo(gMenuImageStack)($t3) /* 09288C 80091C8C 44819000 */ mtc1 $at, $f18 /* 092890 80091C90 24040007 */ li $a0, 7 /* 092894 80091C94 0C027298 */ jal func_8009CA60 @@ -1014,10 +1014,10 @@ glabel render_track_select_setup_ui /* 092A18 80091E18 0C01EFC7 */ jal func_8007BF1C /* 092A1C 80091E1C 00002025 */ move $a0, $zero /* 092A20 80091E20 3C15800E */ lui $s5, %hi(gMultiplayerSelectedNumberOfRacers) # $s5, 0x800e -/* 092A24 80091E24 3C11800E */ lui $s1, %hi(D_800DF4AC) # $s1, 0x800e -/* 092A28 80091E28 3C10800E */ lui $s0, %hi(D_800DF4A8) # $s0, 0x800e -/* 092A2C 80091E2C 2610F4A8 */ addiu $s0, %lo(D_800DF4A8) # addiu $s0, $s0, -0xb58 -/* 092A30 80091E30 2631F4AC */ addiu $s1, %lo(D_800DF4AC) # addiu $s1, $s1, -0xb54 +/* 092A24 80091E24 3C11800E */ lui $s1, %hi(sMenuGuiColourB) # $s1, 0x800e +/* 092A28 80091E28 3C10800E */ lui $s0, %hi(sMenuGuiColourG) # $s0, 0x800e +/* 092A2C 80091E2C 2610F4A8 */ addiu $s0, %lo(sMenuGuiColourG) # addiu $s0, $s0, -0xb58 +/* 092A30 80091E30 2631F4AC */ addiu $s1, %lo(sMenuGuiColourB) # addiu $s1, $s1, -0xb54 /* 092A34 80091E34 26B50410 */ addiu $s5, %lo(gMultiplayerSelectedNumberOfRacers) # addiu $s5, $s5, 0x410 /* 092A38 80091E38 0000A025 */ move $s4, $zero /* 092A3C 80091E3C 241300FF */ li $s3, 255 @@ -1045,11 +1045,11 @@ glabel render_track_select_setup_ui /* 092A84 80091E84 02581821 */ addu $v1, $s2, $t8 /* 092A88 80091E88 846F0010 */ lh $t7, 0x10($v1) /* 092A8C 80091E8C 864E0000 */ lh $t6, ($s2) -/* 092A90 80091E90 3C05800E */ lui $a1, %hi(D_800DF75C) # $a1, 0x800e +/* 092A90 80091E90 3C05800E */ lui $a1, %hi(gMenuImageStack) # $a1, 0x800e /* 092A94 80091E94 01EEC821 */ addu $t9, $t7, $t6 /* 092A98 80091E98 2729FF60 */ addiu $t1, $t9, -0xa0 /* 092A9C 80091E9C 44892000 */ mtc1 $t1, $f4 -/* 092AA0 80091EA0 24A5F75C */ addiu $a1, %lo(D_800DF75C) # addiu $a1, $a1, -0x8a4 +/* 092AA0 80091EA0 24A5F75C */ addiu $a1, %lo(gMenuImageStack) # addiu $a1, $a1, -0x8a4 /* 092AA4 80091EA4 468021A0 */ cvt.s.w $f6, $f4 /* 092AA8 80091EA8 8CAA0000 */ lw $t2, ($a1) /* 092AAC 80091EAC 244E0002 */ addiu $t6, $v0, 2 @@ -1091,8 +1091,8 @@ glabel render_track_select_setup_ui /* 092B38 80091F38 3C014228 */ li $at, 0x42280000 # 42.000000 /* 092B3C 80091F3C 2415000C */ li $s5, 12 .L80091F40: -/* 092B40 80091F40 3C08800E */ lui $t0, %hi(D_800DF75C) # $t0, 0x800e -/* 092B44 80091F44 8D08F75C */ lw $t0, %lo(D_800DF75C)($t0) +/* 092B40 80091F40 3C08800E */ lui $t0, %hi(gMenuImageStack) # $t0, 0x800e +/* 092B44 80091F44 8D08F75C */ lw $t0, %lo(gMenuImageStack)($t0) /* 092B48 80091F48 44818000 */ mtc1 $at, $f16 /* 092B4C 80091F4C 00158140 */ sll $s0, $s5, 5 /* 092B50 80091F50 01105821 */ addu $t3, $t0, $s0 @@ -1112,8 +1112,8 @@ glabel render_track_select_setup_ui /* 092B88 80091F88 00000000 */ nop /* 092B8C 80091F8C 10400008 */ beqz $v0, .L80091FB0 .L80091F90: -/* 092B90 80091F90 3C0A800E */ lui $t2, %hi(D_800DF75C) # $t2, 0x800e -/* 092B94 80091F94 8D4AF75C */ lw $t2, %lo(D_800DF75C)($t2) +/* 092B90 80091F90 3C0A800E */ lui $t2, %hi(gMenuImageStack) # $t2, 0x800e +/* 092B94 80091F94 8D4AF75C */ lw $t2, %lo(gMenuImageStack)($t2) /* 092B98 80091F98 3C01C300 */ li $at, 0xC3000000 # -128.000000 /* 092B9C 80091F9C 44819000 */ mtc1 $at, $f18 /* 092BA0 80091FA0 01504021 */ addu $t0, $t2, $s0 @@ -1136,8 +1136,8 @@ glabel render_track_select_setup_ui /* 092BE0 80091FE0 00000000 */ nop /* 092BE4 80091FE4 10400008 */ beqz $v0, .L80092008 .L80091FE8: -/* 092BE8 80091FE8 3C09800E */ lui $t1, %hi(D_800DF75C) # $t1, 0x800e -/* 092BEC 80091FEC 8D29F75C */ lw $t1, %lo(D_800DF75C)($t1) +/* 092BE8 80091FE8 3C09800E */ lui $t1, %hi(gMenuImageStack) # $t1, 0x800e +/* 092BEC 80091FEC 8D29F75C */ lw $t1, %lo(gMenuImageStack)($t1) /* 092BF0 80091FF0 3C0142F0 */ li $at, 0x42F00000 # 120.000000 /* 092BF4 80091FF4 44812000 */ mtc1 $at, $f4 /* 092BF8 80091FF8 01305021 */ addu $t2, $t1, $s0 diff --git a/asm/non_matchings/menu/tt_menu_loop.s b/asm/non_matchings/menu/tt_menu_loop.s index ce00811b..69a093d5 100644 --- a/asm/non_matchings/menu/tt_menu_loop.s +++ b/asm/non_matchings/menu/tt_menu_loop.s @@ -141,7 +141,7 @@ glabel L8009DC60 /* 09E928 8009DD28 8DC40014 */ lw $a0, 0x14($t6) /* 09E92C 8009DD2C 0C02746E */ jal render_dialogue_option /* 09E930 8009DD30 24060002 */ li $a2, 2 -/* 09E934 8009DD34 0C02749B */ jal func_8009D26C +/* 09E934 8009DD34 0C02749B */ jal handle_menu_joystick_input /* 09E938 8009DD38 00000000 */ nop /* 09E93C 8009DD3C 3C0F8012 */ lui $t7, %hi(D_80126516) # $t7, 0x8012 /* 09E940 8009DD40 81EF6516 */ lb $t7, %lo(D_80126516)($t7) @@ -220,7 +220,7 @@ glabel L8009DC60 /* 09EA4C 8009DE4C 0C02719D */ jal func_8009C674 /* 09EA50 8009DE50 24841E2C */ addiu $a0, %lo(D_800E1E2C) # addiu $a0, $a0, 0x1e2c /* 09EA54 8009DE54 3C04800E */ lui $a0, %hi(D_800E1E40) # $a0, 0x800e -/* 09EA58 8009DE58 0C027229 */ jal func_8009C8A4 +/* 09EA58 8009DE58 0C027229 */ jal allocate_menu_images /* 09EA5C 8009DE5C 24841E40 */ addiu $a0, %lo(D_800E1E40) # addiu $a0, $a0, 0x1e40 /* 09EA60 8009DE60 240B0001 */ li $t3, 1 /* 09EA64 8009DE64 3C01800E */ lui $at, %hi(D_800E1E28) # $at, 0x800e diff --git a/asm/non_matchings/unknown_032760/func_80039330.s b/asm/non_matchings/unknown_032760/func_80039330.s index fa8c5cb6..606a17af 100644 --- a/asm/non_matchings/unknown_032760/func_80039330.s +++ b/asm/non_matchings/unknown_032760/func_80039330.s @@ -705,7 +705,7 @@ glabel L80039BB8 /* 03A908 80039D08 10000005 */ b .L80039D20 /* 03A90C 80039D0C 00000000 */ nop .L80039D10: -/* 03A910 80039D10 0C0274CF */ jal func_8009D33C +/* 03A910 80039D10 0C0274CF */ jal set_menu_id_if_option_equal /* 03A914 80039D14 24050002 */ li $a1, 2 /* 03A918 80039D18 8FA6007C */ lw $a2, 0x7c($sp) /* 03A91C 80039D1C 00000000 */ nop @@ -893,7 +893,7 @@ glabel L80039ED8 /* 03ABC4 80039FC4 E62A0004 */ swc1 $f10, 4($s1) .L80039FC8: /* 03ABC8 80039FC8 AE190078 */ sw $t9, 0x78($s0) -/* 03ABCC 80039FCC 0C0274CF */ jal func_8009D33C +/* 03ABCC 80039FCC 0C0274CF */ jal set_menu_id_if_option_equal /* 03ABD0 80039FD0 24050002 */ li $a1, 2 .L80039FD4: /* 03ABD4 80039FD4 100002CB */ b .L8003AB04 diff --git a/asm/non_matchings/unknown_06B2B0/load_level.s b/asm/non_matchings/unknown_06B2B0/load_level.s index 02844f6c..03ea7f18 100644 --- a/asm/non_matchings/unknown_06B2B0/load_level.s +++ b/asm/non_matchings/unknown_06B2B0/load_level.s @@ -726,7 +726,7 @@ glabel load_level /* 06C8C4 8006BCC4 9064009D */ lbu $a0, 0x9d($v1) /* 06C8C8 8006BCC8 9065009E */ lbu $a1, 0x9e($v1) /* 06C8CC 8006BCCC 9066009F */ lbu $a2, 0x9f($v1) -/* 06C8D0 8006BCD0 0C01DECD */ jal func_80077B34 +/* 06C8D0 8006BCD0 0C01DECD */ jal set_background_prim_colour /* 06C8D4 8006BCD4 00000000 */ nop /* 06C8D8 8006BCD8 0C01EA5D */ jal func_8007A974 /* 06C8DC 8006BCDC 00000000 */ nop diff --git a/asm/non_matchings/unknown_078050/render_background.s b/asm/non_matchings/unknown_078050/render_background.s index 43213722..31825785 100644 --- a/asm/non_matchings/unknown_078050/render_background.s +++ b/asm/non_matchings/unknown_078050/render_background.s @@ -129,7 +129,7 @@ glabel render_background /* 078994 80077D94 27AF0084 */ addiu $t7, $sp, 0x84 .L80077D98: /* 078998 80077D98 8C42E4D0 */ lw $v0, %lo(D_800DE4D0)($v0) -/* 07899C 80077D9C 3C18800E */ lui $t8, %hi(D_800DE4BC) # $t8, 0x800e +/* 07899C 80077D9C 3C18800E */ lui $t8, %hi(sBackgroundFillColour) # $t8, 0x800e /* 0789A0 80077DA0 10400006 */ beqz $v0, .L80077DBC /* 0789A4 80077DA4 2599FFFF */ addiu $t9, $t4, -1 /* 0789A8 80077DA8 8FA500A4 */ lw $a1, 0xa4($sp) @@ -143,7 +143,7 @@ glabel render_background /* 0789C4 80077DC4 246F0008 */ addiu $t7, $v1, 8 /* 0789C8 80077DC8 AE0F0000 */ sw $t7, ($s0) /* 0789CC 80077DCC AC670000 */ sw $a3, ($v1) -/* 0789D0 80077DD0 8F18E4BC */ lw $t8, %lo(D_800DE4BC)($t8) +/* 0789D0 80077DD0 8F18E4BC */ lw $t8, %lo(sBackgroundFillColour)($t8) /* 0789D4 80077DD4 332F03FF */ andi $t7, $t9, 0x3ff /* 0789D8 80077DD8 AC780004 */ sw $t8, 4($v1) /* 0789DC 80077DDC 8E030000 */ lw $v1, ($s0) @@ -163,7 +163,7 @@ glabel render_background /* 078A10 80077E10 00002025 */ move $a0, $zero /* 078A14 80077E14 27A50090 */ addiu $a1, $sp, 0x90 /* 078A18 80077E18 27A6008C */ addiu $a2, $sp, 0x8c -/* 078A1C 80077E1C 0C019AEA */ jal func_80066BA8 +/* 078A1C 80077E1C 0C019AEA */ jal copy_viewport_background_size_to_coords /* 078A20 80077E20 27A70088 */ addiu $a3, $sp, 0x88 /* 078A24 80077E24 1040007F */ beqz $v0, .L80078024 /* 078A28 80077E28 3C18BA00 */ lui $t8, (0xBA001402 >> 16) # lui $t8, 0xba00 @@ -177,16 +177,16 @@ glabel render_background /* 078A48 80077E48 3C0FFA00 */ lui $t7, 0xfa00 /* 078A4C 80077E4C 24790008 */ addiu $t9, $v1, 8 /* 078A50 80077E50 AE190000 */ sw $t9, ($s0) -/* 078A54 80077E54 3C0E800E */ lui $t6, %hi(D_800DE4B0) # $t6, 0x800e +/* 078A54 80077E54 3C0E800E */ lui $t6, %hi(sBackgroundPrimColourR) # $t6, 0x800e /* 078A58 80077E58 AC6F0000 */ sw $t7, ($v1) -/* 078A5C 80077E5C 91D8E4B0 */ lbu $t8, %lo(D_800DE4B0)($t6) -/* 078A60 80077E60 3C0F800E */ lui $t7, %hi(D_800DE4B4) # $t7, 0x800e -/* 078A64 80077E64 91EEE4B4 */ lbu $t6, %lo(D_800DE4B4)($t7) +/* 078A5C 80077E5C 91D8E4B0 */ lbu $t8, %lo(sBackgroundPrimColourR)($t6) +/* 078A60 80077E60 3C0F800E */ lui $t7, %hi(sBackgroundPrimColourG) # $t7, 0x800e +/* 078A64 80077E64 91EEE4B4 */ lbu $t6, %lo(sBackgroundPrimColourG)($t7) /* 078A68 80077E68 0018CE00 */ sll $t9, $t8, 0x18 /* 078A6C 80077E6C 000EC400 */ sll $t8, $t6, 0x10 /* 078A70 80077E70 03387825 */ or $t7, $t9, $t8 -/* 078A74 80077E74 3C0E800E */ lui $t6, %hi(D_800DE4B8) # $t6, 0x800e -/* 078A78 80077E78 91D9E4B8 */ lbu $t9, %lo(D_800DE4B8)($t6) +/* 078A74 80077E74 3C0E800E */ lui $t6, %hi(sBackgroundPrimColourB) # $t6, 0x800e +/* 078A78 80077E78 91D9E4B8 */ lbu $t9, %lo(sBackgroundPrimColourB)($t6) /* 078A7C 80077E7C 3C01F600 */ lui $at, 0xf600 /* 078A80 80077E80 0019C200 */ sll $t8, $t9, 8 /* 078A84 80077E84 01F87025 */ or $t6, $t7, $t8 @@ -256,7 +256,7 @@ glabel render_background /* 078B78 80077F78 8C42E4D0 */ lw $v0, %lo(D_800DE4D0)($v0) /* 078B7C 80077F7C 8FA500A4 */ lw $a1, 0xa4($sp) /* 078B80 80077F80 10400005 */ beqz $v0, .L80077F98 -/* 078B84 80077F84 3C19800E */ lui $t9, %hi(D_800DE4B0) # $t9, 0x800e +/* 078B84 80077F84 3C19800E */ lui $t9, %hi(sBackgroundPrimColourR) # $t9, 0x800e /* 078B88 80077F88 0040F809 */ jalr $v0 /* 078B8C 80077F8C 02002025 */ move $a0, $s0 /* 078B90 80077F90 10000025 */ b .L80078028 @@ -267,15 +267,15 @@ glabel render_background /* 078BA0 80077FA0 246E0008 */ addiu $t6, $v1, 8 /* 078BA4 80077FA4 AE0E0000 */ sw $t6, ($s0) /* 078BA8 80077FA8 AC670000 */ sw $a3, ($v1) -/* 078BAC 80077FAC 9339E4B0 */ lbu $t9, %lo(D_800DE4B0)($t9) -/* 078BB0 80077FB0 3C0E800E */ lui $t6, %hi(D_800DE4B4) # $t6, 0x800e -/* 078BB4 80077FB4 91CEE4B4 */ lbu $t6, %lo(D_800DE4B4)($t6) +/* 078BAC 80077FAC 9339E4B0 */ lbu $t9, %lo(sBackgroundPrimColourR)($t9) +/* 078BB0 80077FB0 3C0E800E */ lui $t6, %hi(sBackgroundPrimColourG) # $t6, 0x800e +/* 078BB4 80077FB4 91CEE4B4 */ lbu $t6, %lo(sBackgroundPrimColourG)($t6) /* 078BB8 80077FB8 00197A00 */ sll $t7, $t9, 8 /* 078BBC 80077FBC 31F8F800 */ andi $t8, $t7, 0xf800 /* 078BC0 80077FC0 000EC8C0 */ sll $t9, $t6, 3 /* 078BC4 80077FC4 332F07C0 */ andi $t7, $t9, 0x7c0 -/* 078BC8 80077FC8 3C19800E */ lui $t9, %hi(D_800DE4B8) # $t9, 0x800e -/* 078BCC 80077FCC 9339E4B8 */ lbu $t9, %lo(D_800DE4B8)($t9) +/* 078BC8 80077FC8 3C19800E */ lui $t9, %hi(sBackgroundPrimColourB) # $t9, 0x800e +/* 078BCC 80077FCC 9339E4B8 */ lbu $t9, %lo(sBackgroundPrimColourB)($t9) /* 078BD0 80077FD0 030F7025 */ or $t6, $t8, $t7 /* 078BD4 80077FD4 0019C083 */ sra $t8, $t9, 2 /* 078BD8 80077FD8 330F003E */ andi $t7, $t8, 0x3e diff --git a/src/camera.c b/src/camera.c index 1b749f97..ce8f89bd 100644 --- a/src/camera.c +++ b/src/camera.c @@ -120,7 +120,7 @@ u16 perspNorm[12]; Mtx *D_80120D70[6]; s32 D_80120D88[6]; Mtx D_80120DA0[5]; -Matrix D_80120EE0; +Matrix D_80120EE0; // Perspective matrix? Matrix D_80120F20; Matrix D_80120F60; Matrix D_80120FA0; @@ -193,11 +193,17 @@ void func_800660C0(void) { void func_800660D0(void) { D_80120D18 = 0; } -/* Unused? */ -f32 get_current_camera_fov(void) { + +/** + * Unused function that will return the current camera's FoV. + */ +UNUSED f32 get_current_camera_fov(void) { return gCurCamFOV; } +/** + * Set the FoV of the viewspace, then recalculate the perspective matrix. + */ void update_camera_fov(f32 camFieldOfView) { if (CAMERA_MIN_FOV < camFieldOfView && camFieldOfView < CAMERA_MAX_FOV && camFieldOfView != gCurCamFOV) { gCurCamFOV = camFieldOfView; @@ -206,7 +212,10 @@ void update_camera_fov(f32 camFieldOfView) { } } -void func_80066194(void) { +/** + * Unused function that recalculates the perspective matrix. + */ +UNUSED void calculate_camera_perspective(void) { guPerspectiveF(D_80120EE0, &perspNorm[10], CAMERA_DEFAULT_FOV, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); func_8006F870(D_80120EE0, D_80120FE0); } @@ -352,62 +361,63 @@ void func_800665E8(s32 arg0) { #ifdef NON_MATCHING // Has regalloc/stack issues +// Proposed name: init_viewports void func_80066610(void) { - s32 s1; - s32 s2; + s32 width; + s32 height; s32 s3; - s32 s4; - s32 s5; + s32 yPos; + s32 xPos; s32 i; D_800DD134 = 1 - D_800DD134; for (i = 0; i < 4; i++) { - if (gScreenViewports[i].flags & 4) { - gScreenViewports[i].flags &= ~1; - } else if (gScreenViewports[i].flags & 2) { - gScreenViewports[i].flags |= 1; + if (gScreenViewports[i].flags & VIEWPORT_UNK_04) { + gScreenViewports[i].flags &= ~VIEWPORT_UNK_01; + } else if (gScreenViewports[i].flags & VIEWPORT_UNK_02) { + gScreenViewports[i].flags |= VIEWPORT_UNK_01; } - gScreenViewports[i].flags &= ~6; + gScreenViewports[i].flags &= ~VIEWPORT_UNK_02 | VIEWPORT_UNK_04; if (gScreenViewports[i].flags & 1) { - if (!(gScreenViewports[i].flags & 8)) { + if (!(gScreenViewports[i].flags & VIEWPORT_X_CUSTOM)) { // Issue here - s5 = (gScreenViewports[i].unk0 * 4) + (((gScreenViewports[i].unk8 - gScreenViewports[i].unk0) + 1) * 2); + xPos = (gScreenViewports[i].x1 * 4) + (((gScreenViewports[i].x2 - gScreenViewports[i].x1) + 1) * 2); } else { - s5 = gScreenViewports[i].unk10; - s5 *= 4; + xPos = gScreenViewports[i].posX; + xPos *= 4; } - if (!(gScreenViewports[i].flags & 0x10)) { + if (!(gScreenViewports[i].flags & VIEWPORT_Y_CUSTOM)) { // Issue here - s4 = (gScreenViewports[i].unk4 * 4) + (((gScreenViewports[i].unkC - gScreenViewports[i].unk4) + 1) * 2); + yPos = (gScreenViewports[i].y1 * 4) + (((gScreenViewports[i].y2 - gScreenViewports[i].y1) + 1) * 2); } else { - s4 = gScreenViewports[i].unk14; - s4 *= 4; + yPos = gScreenViewports[i].posY; + yPos *= 4; } - if (!(gScreenViewports[i].flags & 0x20)) { - s1 = gScreenViewports[i].unk8 - gScreenViewports[i].unk0; - s1 += 1; - s1 *= 2; + if (!(gScreenViewports[i].flags & VIEWPORT_WIDTH_CUSTOM)) { + width = gScreenViewports[i].x2 - gScreenViewports[i].x1; + width += 1; + width *= 2; } else { - s1 = gScreenViewports[i].unk18; - s1 *= 2; + width = gScreenViewports[i].width; + width *= 2; } - if (!(gScreenViewports[i].flags & 0x40)) { - s2 = gScreenViewports[i].unkC - gScreenViewports[i].unk4; - s2 += 1; - s2 *= 2; + if (!(gScreenViewports[i].flags & VIEWPORT_HEIGHT_CUSTOM)) { + height = gScreenViewports[i].y2 - gScreenViewports[i].y1; + height += 1; + height *= 2; } else { - s2 = gScreenViewports[i].unk1C; - s2 *= 2; + height = gScreenViewports[i].height; + height *= 2; } s3 = i + (D_800DD134 * 5); s3 += 10; if (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) { - s2 = -s2; + height = -height; } - D_800DD148[s3].vp.vtrans[0] = s5; - D_800DD148[s3].vp.vtrans[1] = s4; - D_800DD148[s3].vp.vscale[0] = s1; - D_800DD148[s3].vp.vscale[1] = s2; + D_800DD148[s3].vp.vtrans[0] = xPos; + D_800DD148[s3].vp.vtrans[1] = yPos; + D_800DD148[s3].vp.vscale[0] = width; + D_800DD148[s3].vp.vscale[1] = height; } } } @@ -417,139 +427,155 @@ GLOBAL_ASM("asm/non_matchings/camera/func_80066610.s") void func_80066818(s32 viewPortIndex, s32 arg1) { if (arg1 != 0) { - gScreenViewports[viewPortIndex].flags |= 1; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_UNK_01; } else { - gScreenViewports[viewPortIndex].flags |= 2; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_UNK_02; } - gScreenViewports[viewPortIndex].flags &= ~4; + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_UNK_04; } void func_80066894(s32 viewPortIndex, s32 arg1) { if (arg1 != 0) { - gScreenViewports[viewPortIndex].flags &= ~1; + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_UNK_01; } else { - gScreenViewports[viewPortIndex].flags |= 4; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_UNK_04; } - gScreenViewports[viewPortIndex].flags &= ~2; + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_UNK_02; } s32 func_80066910(s32 viewPortIndex) { - return gScreenViewports[viewPortIndex].flags & 0x1; + return gScreenViewports[viewPortIndex].flags & VIEWPORT_UNK_01; } #ifdef NON_MATCHING // Should be functionally equivalent. -void func_80066940(s32 viewPortIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { +// proposed name: reesize_viewport +void func_80066940(s32 viewPortIndex, s32 x1, s32 x2, s32 y1, s32 y2) { s32 widthAndHeight, width, height; - s32 phi_a1; - s32 phi_a2; - s32 phi_a3; + s32 tempX1; + s32 tempY2; + s32 tempX2; widthAndHeight = get_video_width_and_height_as_s32(); width = widthAndHeight & 0xFFFF; // Placement issues with the height variable. height = (widthAndHeight >> 0x10) & 0xFFFF; - phi_a2 = arg4; - phi_a3 = arg3; - phi_a1 = arg1; - if (arg3 < arg1) { - phi_a1 = arg3; - phi_a3 = arg1; + tempY2 = y2; + tempX2 = x2; + tempX1 = x1; + if (x2 < x1) { + tempX1 = x2; + tempX2 = x1; } - if (arg4 < arg2) { - arg2 = arg4; - phi_a2 = arg2; + if (y2 < y1) { + y1 = y2; + tempY2 = y1; } - if ((phi_a1 >= width) || (phi_a3 < 0) || (arg2 >= height) || (phi_a2 < 0)) { - gScreenViewports[viewPortIndex].upperLeftX = 0; - gScreenViewports[viewPortIndex].upperLeftY = 0; - gScreenViewports[viewPortIndex].lowerRightX = 0; - gScreenViewports[viewPortIndex].lowerRightY = 0; + if ((tempX1 >= width) || (tempX2 < 0) || (y1 >= height) || (tempY2 < 0)) { + gScreenViewports[viewPortIndex].scissorX1 = 0; + gScreenViewports[viewPortIndex].scissorY1 = 0; + gScreenViewports[viewPortIndex].scissorX2 = 0; + gScreenViewports[viewPortIndex].scissorY2 = 0; } else { - if (phi_a1 < 0) { - gScreenViewports[viewPortIndex].upperLeftX = 0; + if (tempX1 < 0) { + gScreenViewports[viewPortIndex].scissorX1 = 0; } else { - gScreenViewports[viewPortIndex].upperLeftX = phi_a1; + gScreenViewports[viewPortIndex].scissorX1 = tempX1; } - if (arg2 < 0) { - gScreenViewports[viewPortIndex].upperLeftY = 0; + if (y1 < 0) { + gScreenViewports[viewPortIndex].scissorY1 = 0; } else { - gScreenViewports[viewPortIndex].upperLeftY = arg2; + gScreenViewports[viewPortIndex].scissorY1 = y1; } - if (phi_a3 >= width) { - gScreenViewports[viewPortIndex].lowerRightX = width - 1; + if (tempX2 >= width) { + gScreenViewports[viewPortIndex].scissorX2 = width - 1; } else { - gScreenViewports[viewPortIndex].lowerRightX = phi_a3; + gScreenViewports[viewPortIndex].scissorX2 = tempX2; } - if (phi_a2 >= height) { - gScreenViewports[viewPortIndex].lowerRightY = height - 1; + if (tempY2 >= height) { + gScreenViewports[viewPortIndex].scissorY2 = height - 1; } else { - gScreenViewports[viewPortIndex].lowerRightY = phi_a2; + gScreenViewports[viewPortIndex].scissorY2 = tempY2; } } - gScreenViewports[viewPortIndex].unk4 = arg2; - gScreenViewports[viewPortIndex].unk0 = phi_a1; - gScreenViewports[viewPortIndex].unk8 = phi_a3; - gScreenViewports[viewPortIndex].unkC = phi_a2; + gScreenViewports[viewPortIndex].y1 = y1; + gScreenViewports[viewPortIndex].x1 = tempX1; + gScreenViewports[viewPortIndex].x2 = tempX2; + gScreenViewports[viewPortIndex].y2 = tempY2; } #else GLOBAL_ASM("asm/non_matchings/camera/func_80066940.s") #endif -void func_80066AA8(s32 viewPortIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - if (arg1 != 0x8000) { - gScreenViewports[viewPortIndex].unk10 = arg1; - gScreenViewports[viewPortIndex].flags |= 8; +/** + * 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. + */ +void set_viewport_properties(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s32 height) { + if (posX != VIEWPORT_AUTO) { + gScreenViewports[viewPortIndex].posX = posX; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_X_CUSTOM; } else { - gScreenViewports[viewPortIndex].flags &= ~8; + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_X_CUSTOM; } - if (arg2 != 0x8000) { - gScreenViewports[viewPortIndex].unk10 = arg2; - gScreenViewports[viewPortIndex].flags |= 0x10; + if (posY != VIEWPORT_AUTO) { +// !@bug Viewport Y writes to the X value. Luckily, all cases this function is called use VIEWPORT_AUTO, +// so this bug doesn't happen in practice. + gScreenViewports[viewPortIndex].posX = posY; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_Y_CUSTOM; } else { - gScreenViewports[viewPortIndex].flags &= ~0x10; + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_Y_CUSTOM; } - if (arg3 != 0x8000) { - gScreenViewports[viewPortIndex].unk18 = arg3; - gScreenViewports[viewPortIndex].flags |= 0x20; + if (width != VIEWPORT_AUTO) { + gScreenViewports[viewPortIndex].width = width; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_WIDTH_CUSTOM; } else { - gScreenViewports[viewPortIndex].flags &= ~0x20; + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_WIDTH_CUSTOM; } - if (arg4 != 0x8000) { - gScreenViewports[viewPortIndex].unk1C = arg4; - gScreenViewports[viewPortIndex].flags |= 0x40; - return; + if (height != VIEWPORT_AUTO) { + gScreenViewports[viewPortIndex].height = height; + gScreenViewports[viewPortIndex].flags |= VIEWPORT_HEIGHT_CUSTOM; + } else { + gScreenViewports[viewPortIndex].flags &= ~VIEWPORT_HEIGHT_CUSTOM; } - gScreenViewports[viewPortIndex].flags &= ~0x40; } -s32 func_80066BA8(s32 viewPortIndex, s32 *upperLeftX, s32 *upperLeftY, s32 *lowerRightX, s32 *lowerRightY) { +/** + * 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. + */ +s32 copy_viewport_background_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2) { //gDPFillRectangle values - *upperLeftX = gScreenViewports[viewPortIndex].upperLeftX; - *lowerRightX = gScreenViewports[viewPortIndex].lowerRightX; - *upperLeftY = gScreenViewports[viewPortIndex].upperLeftY; - *lowerRightY = gScreenViewports[viewPortIndex].lowerRightY; - if ((*upperLeftX | *lowerRightX | *upperLeftY | *lowerRightY) == 0) { + *x1 = gScreenViewports[viewPortIndex].scissorX1; + *x2 = gScreenViewports[viewPortIndex].scissorX2; + *y1 = gScreenViewports[viewPortIndex].scissorY1; + *y2 = gScreenViewports[viewPortIndex].scissorY2; + if ((*x1 | *x2 | *y1 | *y2) == 0) { return 0; } return 1; } -void func_80066C2C(s32 viewPortIndex, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4) { - *arg1 = gScreenViewports[viewPortIndex].unk0; - *arg2 = gScreenViewports[viewPortIndex].unk4; - *arg3 = gScreenViewports[viewPortIndex].unk8; - *arg4 = gScreenViewports[viewPortIndex].unkC; +/** + * Sets the passed values to the coordinate size of the passed viewport. + */ +void copy_viewport_frame_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2) { + *x1 = gScreenViewports[viewPortIndex].x1; + *y1 = gScreenViewports[viewPortIndex].x2; + *x2 = gScreenViewports[viewPortIndex].y1; + *y2 = gScreenViewports[viewPortIndex].y2; } -// Unused? -void func_80066C80(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3) { - u32 temp_v0 = get_video_width_and_height_as_s32(); - *arg0 = 0; - *arg1 = 0; - *arg2 = temp_v0 & 0xFFFF; - *arg3 = temp_v0 >> 0x10; +/** + * Unused function that sets the passed values to the framebuffer's size in coordinates. + */ +UNUSED void copy_framebuffer_size_to_coords(s32 *x1, s32 *y1, s32 *x2, s32 *y2) { + u32 width = get_video_width_and_height_as_s32(); + *x1 = 0; + *y1 = 0; + *x2 = width & 0xFFFF; + *y2 = width >> 16; } #ifdef NON_MATCHING @@ -580,12 +606,12 @@ void func_80066CDC(Gfx **dlist, s32 arg1) { widthAndHeight = get_video_width_and_height_as_s32(); temp_t0 = widthAndHeight >> 16; temp_a3 = temp_t0 >> 1; - if (gScreenViewports[D_80120CE4].flags & 1) { + if (gScreenViewports[D_80120CE4].flags & VIEWPORT_UNK_01) { gDPSetScissor((*dlist)++, SCISSOR_INTERLACE, - gScreenViewports[D_80120CE4].upperLeftX, - gScreenViewports[D_80120CE4].upperLeftY, - gScreenViewports[D_80120CE4].lowerRightX, - gScreenViewports[D_80120CE4].lowerRightY + gScreenViewports[D_80120CE4].scissorX1, + gScreenViewports[D_80120CE4].scissorY1, + gScreenViewports[D_80120CE4].scissorX2, + gScreenViewports[D_80120CE4].scissorY2 ); func_80068158(dlist, 0, 0, 0, 0); if (arg1 != 0) { @@ -749,17 +775,17 @@ void func_8006807C(Gfx **dlist, s32 *arg1) { D_80120D08 = 0; } -void func_80068158(Gfx **dlist, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - s32 tempArg1 = (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) ? -arg1 : arg1; +void func_80068158(Gfx **dlist, s32 width, s32 height, s32 posX, s32 posY) { + s32 tempWidth = (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) ? -width : width; if (D_800DD060 != 0) { - arg2 = -arg2; - tempArg1 = -arg1; + height = -height; + tempWidth = -width; } - if (!(gScreenViewports[D_80120CE4].flags & 1)) { - D_800DD148[D_80120CE4].vp.vtrans[0] = arg3 * 4; - D_800DD148[D_80120CE4].vp.vtrans[1] = arg4 * 4; - D_800DD148[D_80120CE4].vp.vscale[0] = tempArg1 * 4; - D_800DD148[D_80120CE4].vp.vscale[1] = arg2 * 4; + if (!(gScreenViewports[D_80120CE4].flags & VIEWPORT_UNK_01)) { + D_800DD148[D_80120CE4].vp.vtrans[0] = posX * 4; + D_800DD148[D_80120CE4].vp.vtrans[1] = posY * 4; + D_800DD148[D_80120CE4].vp.vscale[0] = tempWidth * 4; + D_800DD148[D_80120CE4].vp.vscale[1] = height * 4; gSPViewport((*dlist)++, (u8 *)&D_800DD148[D_80120CE4] + 0x80000000); } else { gSPViewport((*dlist)++, (u8 *)&D_800DD148[D_80120CE4 + 10 + (D_800DD134 * 5)] + 0x80000000); @@ -772,7 +798,7 @@ void func_800682AC(Gfx **dlist) { widthAndHeight = get_video_width_and_height_as_s32(); height = widthAndHeight >> 0x10; width = widthAndHeight & 0xFFFF; - if (!(gScreenViewports[D_80120CE4].flags & 1)) { + if (!(gScreenViewports[D_80120CE4].flags & VIEWPORT_UNK_01)) { gDPSetScissor((*dlist)++, G_SC_NON_INTERLACE, 0, 0, width - 1, height - 1); func_80068158(dlist, width >> 1, height >> 1, width >> 1, height >> 1); } else { diff --git a/src/camera.h b/src/camera.h index 9086ca11..b8955939 100644 --- a/src/camera.h +++ b/src/camera.h @@ -30,6 +30,8 @@ #define JOYSTICK_DEADZONE 8 #define JOYSTICK_MAX_RANGE 70 +#define VIEWPORT_AUTO 0x8000 + enum ViewportCount { VIEWPORTS_COUNT_1_PLAYER, VIEWPORTS_COUNT_2_PLAYERS, @@ -37,22 +39,32 @@ enum ViewportCount { VIEWPORTS_COUNT_4_PLAYERS }; +enum ViewPortFlags { + VIEWPORT_UNK_01 = 0x0001, + VIEWPORT_UNK_02 = 0x0002, + VIEWPORT_UNK_04 = 0x0004, + VIEWPORT_X_CUSTOM = 0x0008, + VIEWPORT_Y_CUSTOM = 0x0010, + VIEWPORT_WIDTH_CUSTOM = 0x0020, + VIEWPORT_HEIGHT_CUSTOM = 0x0040, +}; + extern s8 D_800DD060; /* Size: 0x34 bytes. */ typedef struct ScreenViewport { - /* 0x00 */ s32 unk0; - /* 0x04 */ s32 unk4; - /* 0x08 */ s32 unk8; - /* 0x0C */ s32 unkC; - /* 0x10 */ s32 unk10; - /* 0x14 */ s32 unk14; - /* 0x18 */ s32 unk18; - /* 0x1C */ s32 unk1C; - /* 0x20 */ s32 upperLeftX; //gDPFillRectangle values - /* 0x24 */ s32 upperLeftY; - /* 0x28 */ s32 lowerRightX; - /* 0x2C */ s32 lowerRightY; + /* 0x00 */ s32 x1; + /* 0x04 */ s32 x2; + /* 0x08 */ s32 y1; + /* 0x0C */ s32 y2; + /* 0x10 */ s32 posX; + /* 0x14 */ s32 posY; + /* 0x18 */ s32 width; + /* 0x1C */ s32 height; + /* 0x20 */ s32 scissorX1; + /* 0x24 */ s32 scissorY1; + /* 0x28 */ s32 scissorX2; + /* 0x2C */ s32 scissorY2; /* 0x30 */ s32 flags; } ScreenViewport; @@ -97,9 +109,9 @@ void func_80066060(s32 arg0, s32 arg1); void func_80066098(s8 arg0); void func_800660C0(void); void func_800660D0(void); -f32 get_current_camera_fov(void); +UNUSED f32 get_current_camera_fov(void); void update_camera_fov(f32 camFieldOfView); -void func_80066194(void); +UNUSED void calculate_camera_perspective(void); Matrix *func_80066204(void); s32 get_viewport_count(void); s32 func_80066220(void); @@ -115,11 +127,11 @@ void func_800665E8(s32 arg0); void func_80066818(s32 viewPortIndex, s32 arg1); void func_80066894(s32 viewPortIndex, s32 arg1); s32 func_80066910(s32 viewPortIndex); -void func_80066940(s32 viewPortIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4); -void func_80066AA8(s32 viewPortIndex, s32 arg1, s32 arg2, s32 arg3, s32 arg4); -s32 func_80066BA8(s32 viewPortIndex, s32 *upperLeftX, s32 *upperLeftY, s32 *lowerRightX, s32 *lowerRightY); -void func_80066C2C(s32 viewPortIndex, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4); -void func_80066C80(s32 *arg0, s32 *arg1, s32 *arg2, s32 *arg3); +void func_80066940(s32 viewPortIndex, s32 posX, s32 posY, s32 width, s32 height); +void set_viewport_properties(s32 viewPortIndex, s32 x1, s32 x2, s32 y1, s32 y2); +s32 copy_viewport_background_size_to_coords(s32 viewPortIndex, s32 *x1, s32 *y1, s32 *x2, s32 *y2); +void copy_viewport_frame_size_to_coords(s32 viewPortIndex, s32 *arg1, s32 *arg2, s32 *arg3, s32 *arg4); +void copy_framebuffer_size_to_coords(s32 *x1, s32 *y1, s32 *x2, s32 *y2); void func_80066CDC(Gfx **dlist, s32 arg1); void set_ortho_matrix_height(f32 value); void func_80067F2C(Gfx **dlist, s32 *arg1); diff --git a/src/font.c b/src/font.c index f39915f3..f8c34f4d 100644 --- a/src/font.c +++ b/src/font.c @@ -180,9 +180,9 @@ GLOBAL_ASM("asm/non_matchings/font/func_800C4170.s") #ifdef NON_MATCHING // Mostly has regalloc issues. -void func_800C422C(s32 arg0) { - if (arg0 < gNumberOfFonts) { - FontData *fontData = &gFonts[arg0]; +void func_800C422C(s32 fontID) { + if (fontID < gNumberOfFonts) { + FontData *fontData = &gFonts[fontID]; if (fontData->unk28[0] > 0) { fontData->unk28[0]--; if ((fontData->unk28[0] & 0xFF) == 0) { diff --git a/src/font.h b/src/font.h index 3b842021..b81f8baf 100644 --- a/src/font.h +++ b/src/font.h @@ -21,6 +21,7 @@ enum TextFonts { FONT_COLOURFUL, FONT_SMALL, + FONT_LARGE, FONT_UNK_FF = 255, }; diff --git a/src/menu.c b/src/menu.c index f7dcdc71..a378ea78 100644 --- a/src/menu.c +++ b/src/menu.c @@ -48,7 +48,7 @@ s32 D_801263BC; unk801263C0 D_801263C0; s32 gIgnorePlayerInput; -s32 D_801263C8; +UNUSED s32 sUnused_801263C8; // Set to 0 in menu_init, and never again. unk801263CC (*D_801263CC)[8]; s32 D_801263D0; @@ -68,7 +68,7 @@ s8 D_80126431; s32 D_80126434; s32 D_80126438[4]; s64 D_80126448; -f32 D_80126450; +f32 sBootScreenTimer; s8 gControllersXAxisDelay[4]; s8 gControllersYAxisDelay[4]; s8 gControllersXAxisDirection[4]; // X axis (-1 = left, 1 = right) for controller @@ -76,7 +76,7 @@ MenuElement **D_80126460; s8 gControllersYAxisDirection[4]; // Y axis (-1 = down, 1 = up) for controller s8 gControllersXAxis[4]; s8 gControllersYAxis[4]; -s32 D_80126470; +s32 sUnused_80126470; // Set to 0 in the magic codes menu and 0xD000 elsewhere, otherwise unused. s32 D_80126474; s32 D_80126478; s32 D_8012647C; @@ -144,7 +144,7 @@ s32 D_80126818; s32 D_8012681C; s32 D_80126820; s32 D_80126824; -s8 D_80126828; +UNUSED s8 sUnused_80126828; // Set to 0 in menu_init, and never used again. s32 D_8012682C; s16 D_80126830; s32 D_80126834; @@ -298,9 +298,9 @@ s32 *gMenuTextLangTable = NULL; char **gMenuText = NULL; -u8 D_800DF4A4 = 0xFF; -u8 D_800DF4A8 = 0xFF; -u8 D_800DF4AC = 0xFF; +u8 sMenuGuiColourR = 0xFF; +u8 sMenuGuiColourG = 0xFF; +u8 sMenuGuiColourB = 0xFF; u8 D_800DF4B0 = 0; s32 D_800DF4B4 = 0; @@ -328,7 +328,7 @@ s32 D_800DF4F0[] = { 0x4000, 0x8000, 0x1000, 0x2000, 0x8000, 0x10, 0x400, 0x00 }; -unk800DF510 D_800DF510[18] = { +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 }, { 0, 0, 0, 0x02, 1.0f, 0.0f, 0.0f, -32.0f, 0, 0, 0, 0, 0 }, @@ -352,19 +352,17 @@ unk800DF510 D_800DF510[18] = { s16 *D_800DF750[1] = { NULL }; // This is probably not correct. s16 D_800DF754 = 0; s16 D_800DF758 = 0; -unk800DF510 *D_800DF75C = NULL; +unk800DF510 *gMenuImageStack = NULL; -s32 D_800DF760 = 0x7F; -s32 D_800DF764 = 0xFF; +s32 sMenuMusicVolume = 0x7F; +s32 sMenuGuiOpacity = 0xFF; s32 D_800DF768 = 1; -FadeTransition D_800DF76C = FADE_TRANSITION(0, FADE_COLOR_BLACK, 10, -1); -FadeTransition D_800DF774 = FADE_TRANSITION(0, FADE_COLOR_BLACK, 18, -1); -FadeTransition D_800DF77C = FADE_TRANSITION(0x80, FADE_COLOR_BLACK, 18, 0); - -// These two are unused? -FadeTransition D_800DF784 = FADE_TRANSITION(0, FADE_COLOR_WHITE, 18, -1); -FadeTransition D_800DF78C = FADE_TRANSITION(0x80, FADE_COLOR_WHITE, 18, 0); +FadeTransition sMenuTransitionFadeInFast = FADE_TRANSITION(0, FADE_COLOR_BLACK, 10, -1); +FadeTransition sMenuTransitionFadeIn = FADE_TRANSITION(0, FADE_COLOR_BLACK, 18, -1); +FadeTransition sMenuTransitionFadeOut = FADE_TRANSITION(0x80, FADE_COLOR_BLACK, 18, 0); +UNUSED FadeTransition sMenuTransitionFadeInWhite = FADE_TRANSITION(0, FADE_COLOR_WHITE, 18, -1); +UNUSED FadeTransition sMenuTransitionFadeOutWhite = FADE_TRANSITION(0x80, FADE_COLOR_WHITE, 18, 0); s32 D_800DF794 = 4; s32 D_800DF798 = 0; @@ -377,11 +375,11 @@ char *gTitleMenuStrings[3] = { 0, 0, 0 }; char gVersionDisplayText[20] = "VERSION XXXXXXXX"; // "Diddy Kong Racing" logo texture indices? -s16 D_800DF7C4[12] = { +s16 sGameTitleTileTextures[12] = { 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, -1 }; -DrawTexture D_800DF7DC[12] = { +DrawTexture sGameTitleTileOffsets[12] = { { NULL, -75, -32 }, { NULL, -60, -32 }, { NULL, -45, -32 }, @@ -420,7 +418,7 @@ char *gOptionMenuStrings[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; -s16 D_800DFA2C[8] = { +s16 gOptionMenuTextures[8] = { 0x3D, 0x3C, 0x3F, 0x3E, 0x44, -1, -1, 0 }; @@ -1351,7 +1349,7 @@ MenuElement D_800E1B50[9] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0 }, }; -Gfx D_800E1C70[] = { +Gfx dMenuHudSettings[] = { gsDPPipeSync(), gsDPSetTextureLOD(G_TL_TILE), gsDPSetTextureLUT(G_TT_NONE), @@ -1360,8 +1358,7 @@ Gfx D_800E1C70[] = { gsSPEndDisplayList(), }; -// Unused? -Gfx D_800E1CA0[][2] = { +UNUSED Gfx dMenuHudDrawModes[][2] = { { gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE), gsDPSetOtherMode(DKR_OMH_1CYC_POINT_NOPERSP, DKR_OML_COMMON | G_RM_XLU_SURF | G_RM_XLU_SURF2), @@ -1451,10 +1448,12 @@ s8 D_800E1E20[8] = { s8 D_800E1E28 = 0; +// TT Game Status textures, think these are potentially multi-part images. s16 D_800E1E2C[10] = { 0x4C, 0x4D, 0x4E, 0x4F, 0x5B, 0x5C, 0x00, 0x42, -1, 0 }; +// TT game status textures. And these maybe just standalone ones. s16 D_800E1E40[10] = { 0x0D, 0x0E, 0x0F, 0x10, 0x08, 0x09, 0x00, 0x0A, -1, 0 }; @@ -1702,6 +1701,10 @@ void func_800813C0(void) { D_800DF458 = 1; } +/** + * Core function for initialising all menu elements. + * Gets the current menu ID, then runs the init function of the respective menu element. + */ void menu_init(u32 menuId) { s32 i; @@ -1709,8 +1712,8 @@ void menu_init(u32 menuId) { reset_controller_sticks(); gIgnorePlayerInput = 1; D_801263BC = 0; - D_801263C8 = 0; - D_80126828 = 0; + sUnused_801263C8 = 0; + sUnused_80126828 = 0; // Does not match with a for loop i = 0; @@ -1781,7 +1784,7 @@ void menu_init(u32 menuId) { menu_caution_init(); break; } - D_80126470 = 0xD000; + sUnused_80126470 = 0xD000; } /** @@ -1874,12 +1877,12 @@ void func_80081800(s32 arg0, s32 arg1, s32 arg2, u8 arg3, u8 arg4, u8 arg5, u8 a s32 sp44; s32 sp40; - D_800DF4A4 = arg3; - D_800DF4A8 = arg4; - D_800DF4AC = arg5; + sMenuGuiColourR = arg3; + sMenuGuiColourG = arg4; + sMenuGuiColourB = arg5; if (arg6 == 0) { - D_800DF75C[0].unk10 = arg2; - D_800DF75C[1].unk10 = arg2 - 2; + gMenuImageStack[0].unk10 = arg2; + gMenuImageStack[1].unk10 = arg2 - 2; phi_s3 = 0; phi_s5 = 1; arg1 -= 0x27; @@ -1887,8 +1890,8 @@ void func_80081800(s32 arg0, s32 arg1, s32 arg2, u8 arg3, u8 arg4, u8 arg5, u8 a sp44 = 0xB; sp40 = 0xA; } else { - D_800DF75C[2].unk10 = arg2; - D_800DF75C[3].unk10 = arg2 - 1; + gMenuImageStack[2].unk10 = arg2; + gMenuImageStack[3].unk10 = arg2 - 1; phi_s3 = 2; phi_s5 = 3; arg1 -= 0x1C; @@ -1899,40 +1902,40 @@ void func_80081800(s32 arg0, s32 arg1, s32 arg2, u8 arg3, u8 arg4, u8 arg5, u8 a func_80059790(arg0, &sp5C, &sp58, &sp54); func_80068508(1); func_8007BF1C(0); - D_800DF75C[phi_s3].unk18 = sp5C / 10; - D_800DF75C[phi_s3].unkC = arg1; + gMenuImageStack[phi_s3].unk18 = sp5C / 10; + gMenuImageStack[phi_s3].unkC = arg1; func_8009CA60(phi_s3); arg1 += phi_s6; - D_800DF75C[phi_s3].unk18 = sp5C % 10; - D_800DF75C[phi_s3].unkC = arg1; + gMenuImageStack[phi_s3].unk18 = sp5C % 10; + gMenuImageStack[phi_s3].unkC = arg1; func_8009CA60(phi_s3); arg1 += sp44; - D_800DF75C[phi_s5].unkC = arg1; + gMenuImageStack[phi_s5].unkC = arg1; func_8009CA60(phi_s5); arg1 += sp40; - D_800DF75C[phi_s3].unk18 = sp58 / 10; - D_800DF75C[phi_s3].unkC = arg1; + gMenuImageStack[phi_s3].unk18 = sp58 / 10; + gMenuImageStack[phi_s3].unkC = arg1; func_8009CA60(phi_s3); arg1 += phi_s6; - D_800DF75C[phi_s3].unk18 = sp58 % 10; - D_800DF75C[phi_s3].unkC = arg1; + gMenuImageStack[phi_s3].unk18 = sp58 % 10; + gMenuImageStack[phi_s3].unkC = arg1; func_8009CA60(phi_s3); arg1 += sp44; - D_800DF75C[phi_s5].unkC = arg1; + gMenuImageStack[phi_s5].unkC = arg1; func_8009CA60(phi_s5); arg1 += sp40; - D_800DF75C[phi_s3].unk18 = sp54 / 10; - D_800DF75C[phi_s3].unkC = arg1; + gMenuImageStack[phi_s3].unk18 = sp54 / 10; + gMenuImageStack[phi_s3].unkC = arg1; func_8009CA60(phi_s3); arg1 += phi_s6; - D_800DF75C[phi_s3].unk18 = sp54 % 10; - D_800DF75C[phi_s3].unkC = arg1; + gMenuImageStack[phi_s3].unk18 = sp54 % 10; + gMenuImageStack[phi_s3].unkC = arg1; func_8009CA60(phi_s3); func_80068508(0); func_8007BF1C(1); - D_800DF4A4 = (u8)0xFF; - D_800DF4A8 = (u8)0xFF; - D_800DF4AC = (u8)0xFF; + sMenuGuiColourR = (u8)0xFF; + sMenuGuiColourG = (u8)0xFF; + sMenuGuiColourB = (u8)0xFF; } GLOBAL_ASM("asm/non_matchings/menu/func_80081C04.s") @@ -1995,7 +1998,7 @@ void draw_menu_elements(s32 arg0, MenuElement *elem, f32 arg2) { s5 = FALSE; func_8007B3D0(&D_801263A0); } - D_800DF764 = elem->opacity; + sMenuGuiOpacity = elem->opacity; func_80081800( *elem->unk14_a.numberU16, xPos - 0xA0, @@ -2052,18 +2055,18 @@ void draw_menu_elements(s32 arg0, MenuElement *elem, f32 arg2) { } func_80068508(1); func_8007BF1C(0); - D_800DF75C[elem->unk14_a.value].unkC = xPos - 0xA0; - D_800DF75C[elem->unk14_a.value].unk10 = (-yPos - D_800DF7A0) + 0x78; - D_800DF75C[elem->unk14_a.value].unk18 = elem->textFont; - D_800DF75C[elem->unk14_a.value].unk4 = elem->backgroundRed; - D_800DF75C[elem->unk14_a.value].unk2 = elem->backgroundGreen; - D_800DF75C[elem->unk14_a.value].unk0 = elem->backgroundBlue; - D_800DF75C[elem->unk14_a.value].unk8 = elem->backgroundAlpha / 256.0f; - D_800DF4A4 = elem->filterRed; - D_800DF4A8 = elem->filterGreen; - D_800DF4AC = elem->filterBlue; + gMenuImageStack[elem->unk14_a.value].unkC = xPos - 0xA0; + gMenuImageStack[elem->unk14_a.value].unk10 = (-yPos - D_800DF7A0) + 0x78; + gMenuImageStack[elem->unk14_a.value].unk18 = elem->textFont; + gMenuImageStack[elem->unk14_a.value].unk4 = elem->backgroundRed; + gMenuImageStack[elem->unk14_a.value].unk2 = elem->backgroundGreen; + gMenuImageStack[elem->unk14_a.value].unk0 = elem->backgroundBlue; + gMenuImageStack[elem->unk14_a.value].unk8 = elem->backgroundAlpha / 256.0f; + sMenuGuiColourR = elem->filterRed; + sMenuGuiColourG = elem->filterGreen; + sMenuGuiColourB = elem->filterBlue; D_800DF4B0 = elem->filterAlpha; - D_800DF764 = elem->opacity; + sMenuGuiOpacity = elem->opacity; func_8009CA60(elem->unk14_a.value); func_80068508(0); func_8007BF1C(1); @@ -2101,11 +2104,11 @@ void draw_menu_elements(s32 arg0, MenuElement *elem, f32 arg2) { if (s5) { func_8007B3D0(&D_801263A0); } - D_800DF4A4 = 0xFF; - D_800DF4A8 = 0xFF; - D_800DF4AC = 0xFF; + sMenuGuiColourR = 0xFF; + sMenuGuiColourG = 0xFF; + sMenuGuiColourB = 0xFF; D_800DF4B0 = 0; - D_800DF764 = 0xFF; + sMenuGuiOpacity = 0xFF; } } #else @@ -2147,7 +2150,7 @@ void print_missing_controller_text(Gfx *dl, s32 updateRate) { if (D_800DF46C & 0x10) { load_menu_text(get_language()); - set_text_font(0); + set_text_font(FONT_COLOURFUL); set_text_color(255, 255, 255, 0, 0xFF); set_text_background_color(0, 0, 0, 0); posY = 208; @@ -2158,79 +2161,90 @@ void print_missing_controller_text(Gfx *dl, s32 updateRate) { } } +/** + * Initialises the viewport and background settings for the screen with the rotating N64 and Rareware Logo. + * It then sets a 16 second timer that will count down. + */ void menu_logos_screen_init(void) { gMenuDelay = 0; - D_80126450 = 16.0f; // 16 seconds - func_80077B5C(0, 0, 0); + sBootScreenTimer = 16.0f; + set_background_fill_colour(0, 0, 0); if (osTvType == TV_TYPE_PAL) { - func_80066940(0, 0, 0x26, 0x140, 0xE0); - func_80066AA8(0, 0x8000, 0x8000, 0x140, 0x11C); + func_80066940(0, 0, 38, SCREEN_WIDTH, 224); + set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, SCREEN_WIDTH, SCREEN_HEIGHT + 44); } else { - func_80066940(0, 0, 0x28, 0x140, 0xC4); - func_80066AA8(0, 0x8000, 0x8000, 0x140, 0xF0); + func_80066940(0, 0, 40, SCREEN_WIDTH, 196); + set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, SCREEN_WIDTH, SCREEN_HEIGHT); } func_80066610(); func_80066818(0, 1); } +/** + * Handler of everything that happens in the space of those 16 seconds. + */ s32 menu_logo_screen_loop(s32 updateRate) { - s32 phi_v0; // sp24? - s32 yOffset; // sp28 - s32 sp20; + s32 opacity; + s32 yOffset; + s32 yOffsetShadow; if (osTvType == TV_TYPE_PAL) { - yOffset = 0x1A; - if (D_80126450 < 2.6f && gMenuDelay == 0) { + yOffset = 26; + if (sBootScreenTimer < 2.6f && gMenuDelay == 0) { func_800C01D8(&D_800E1DE8); gMenuDelay = 1; } - D_80126450 -= updateRate / 50.0f; + sBootScreenTimer -= updateRate / 50.0f; } else { yOffset = 0; - if (D_80126450 < 2.17f && gMenuDelay == 0) { + if (sBootScreenTimer < 2.17f && gMenuDelay == 0) { func_800C01D8(&D_800E1DE8); gMenuDelay = 1; } - D_80126450 -= updateRate / 60.0f; + sBootScreenTimer -= updateRate / 60.0f; } - if (D_80126450 <= 0.0f) { + if (sBootScreenTimer <= 0.0f) { func_80066894(0, 0); - func_80066AA8(0, 0x8000, 0x8000, 0x8000, 0x8000); - func_80082FAC(); + set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO); + init_title_screen_variables(); menu_init(MENU_TITLE); } - if (8.5 > D_80126450) { // This is a little weird, but it matches. - set_text_font(1); +// 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); - if ((D_80126450 < 8.0) && (D_80126450 >= 7.5)) { - phi_v0 = (8.0 - D_80126450) * 510.0; + if ((sBootScreenTimer < 8.0) && (sBootScreenTimer >= 7.5)) { + opacity = (8.0 - sBootScreenTimer) * 510.0; } else { - if ((D_80126450 < 7.5) && (D_80126450 >= 7.0)) { - phi_v0 = (D_80126450 - 7.0) * 510.0; + if ((sBootScreenTimer < 7.5) && (sBootScreenTimer >= 7.0)) { + opacity = (sBootScreenTimer - 7.0) * 510.0; } else { - phi_v0 = 0; + opacity = 0; } } - if (phi_v0 != 0) { - set_text_color(0xFF, 0xFF, 0, 0xFF, phi_v0); - draw_text(&D_801263A0, 0x9F, yOffset + 0xD4, gRareCopyrightString, 0xC); - draw_text(&D_801263A0, 0xA1, yOffset + 0xD4, gRareCopyrightString, 0xC); - draw_text(&D_801263A0, POS_CENTRED, yOffset + 0xD3, gRareCopyrightString, 0xC); - draw_text(&D_801263A0, POS_CENTRED, yOffset + 0xD5, gRareCopyrightString, 0xC); + if (opacity != 0) { + set_text_color(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); + draw_text(&D_801263A0, POS_CENTRED, yOffset + 213, gRareCopyrightString, 0xC); } - sp20 = yOffset + 0xD4; - if (D_80126450 > 8.0) { - phi_v0 = (8.5 - D_80126450) * 510.0; + yOffsetShadow = yOffset + 212; + if (sBootScreenTimer > 8.0) { + opacity = (8.5 - sBootScreenTimer) * 510.0; } else { - phi_v0 = 0xFF; + opacity = 0xFF; } - set_text_color(0xFF, 0xFF, 0xFF, 0xFF, phi_v0); - draw_text(&D_801263A0, POS_CENTRED, sp20, gRareCopyrightString, 0xC); + set_text_color(0xFF, 0xFF, 0xFF, 0xFF, opacity); + draw_text(&D_801263A0, POS_CENTRED, yOffsetShadow, gRareCopyrightString, 0xC); } return 0; } -void func_80082FAC(void) { +/** + * Sets some things needed after the title screen from the save buffer. + */ +void init_title_screen_variables(void) { if (D_80126448 & 2) { set_magic_code_flags(2); } @@ -2264,8 +2278,8 @@ void menu_title_screen_init(void) { gNumberOfActivePlayers = 4; initialise_player_ids(); play_music(1); - D_800DF760 = musicGetRelativeVolume(); - if (D_800DF458 != 0) { + sMenuMusicVolume = musicGetRelativeVolume(); + if (D_800DF458) { D_8012686C = 0; D_800DF458 = 0; } else { @@ -2273,13 +2287,13 @@ void menu_title_screen_init(void) { } D_80126870 = 0; D_801263E0 = 0; - func_8009C674(D_800DF7C4); + func_8009C674(sGameTitleTileTextures); for (i = 0; i < 11; i++) { - D_800DF7DC[i].texture = D_80126550[D_800DF7C4[i]]; + sGameTitleTileOffsets[i].texture = D_80126550[sGameTitleTileTextures[i]]; } set_music_player_voice_limit(0x1B); func_800660C0(); - set_text_font(0); + set_text_font(FONT_COLOURFUL); func_800C4170(2); func_80000890(0); set_time_trial_enabled(FALSE); @@ -2304,7 +2318,7 @@ GLOBAL_ASM("asm/non_matchings/menu/func_8008377C.s") GLOBAL_ASM("asm/non_matchings/menu/menu_title_screen_loop.s") void func_80084118(void) { - func_8009C4A8(D_800DF7C4); + func_8009C4A8(sGameTitleTileTextures); set_music_player_voice_limit(0x10); func_800660D0(); func_800C422C(2); @@ -2314,9 +2328,9 @@ void func_80084118(void) { void menu_options_init(void) { D_801263BC = 0; gMenuDelay = 0; - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); func_800C4170(2); - set_text_font(2); + set_text_font(FONT_LARGE); set_music_player_voice_limit(0x18); play_music(0x18); func_80000B18(); @@ -2327,7 +2341,7 @@ void func_800841B8(s32 arg0) { s32 phi_a3; s32 phi_s2; - set_text_font(2); + 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); @@ -2337,7 +2351,7 @@ void func_800841B8(s32 arg0) { phi_s1 = 0; phi_s2 = 0x4C; - set_text_font(0); + set_text_font(FONT_COLOURFUL); while (gOptionMenuStrings[phi_s1] != NULL) { if (phi_s1 == D_800DF460) { @@ -2394,7 +2408,7 @@ s32 menu_options_loop(s32 arg0) { // Leave the option menu set_music_fade_timer(-0x80); gMenuDelay = -1; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); func_80001D04(0x241, 0); } else if ((buttonsPressed & 0x9000) && D_800DF460 >= 2) { // Go to a sub-menu @@ -2483,10 +2497,10 @@ void menu_audio_options_init(void) { gMenuDelay = 0; D_801269FC = NULL; D_801263D8 = -1; - func_8009C674(D_800DFA2C); - func_8009C8A4(&D_800DFA2C[6]); + func_8009C674(gOptionMenuTextures); + allocate_menu_images(&gOptionMenuTextures[6]); func_8008E4B0(); - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); func_8007FFEC(2); gMusicVolumeSliderValue = musicGetVolSliderPercentage(); gSfxVolumeSliderValue = sfxGetVolumeSlider(); @@ -2556,7 +2570,7 @@ s32 menu_audio_options_loop(s32 arg0) { if (((buttonInputs & (A_BUTTON | START_BUTTON)) && (D_801263E0 == gOptionsMenuItemIndex + 1)) || (buttonInputs & B_BUTTON)) { gMenuDelay = -1; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); if (D_801263D8 >= 0) { set_music_fade_timer(-0x80); } @@ -2664,7 +2678,7 @@ void func_800851FC(void) { set_music_fade_timer(0x100); func_80000B18(); } - func_8009C4A8(D_800DFA2C); + func_8009C4A8(gOptionMenuTextures); func_800C422C(2); } @@ -2688,7 +2702,7 @@ void menu_save_options_init(void) { D_80126BE4 = 0; D_80126BEC = 0.0f; func_8009C674(D_800DFC78); - func_8009C8A4(D_800DFCAC); + allocate_menu_images(D_800DFCAC); func_8007FFEC(0xA); func_800C4170(2); D_800DFC10.unk0 = D_80126550[71]; @@ -2699,7 +2713,7 @@ void menu_save_options_init(void) { D_800DFC60.unk0 = D_80126550[70]; func_8008E4B0(); func_8006EBA8(); - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); } GLOBAL_ASM("asm/non_matchings/menu/func_800853D0.s") @@ -2847,13 +2861,13 @@ GLOBAL_ASM("asm/non_matchings/menu/func_8008832C.s") void menu_boot_init(void) { s32 i; - func_800C01D8(&D_800DF77C); - func_80077B34(0, 0, 0); - func_8009C674(&D_800DF7C4); + func_800C01D8(&sMenuTransitionFadeOut); + set_background_prim_colour(0, 0, 0); + func_8009C674(&sGameTitleTileTextures); // Sets up the 11 texture pointers for the "Diddy Kong Racing" logo. for (i = 0; i < 11; i++) { - D_800DF7DC[i].texture = D_80126550[D_800DF7C4[i]]; + sGameTitleTileOffsets[i].texture = D_80126550[sGameTitleTileTextures[i]]; } // Reset variables for menu_boot_loop() @@ -2910,7 +2924,7 @@ s32 menu_boot_loop(s32 arg0) { break; case 2: if (gMenuDelay && func_800C018C() == 0) { - func_800C01D8(&D_800DF76C); + func_800C01D8(&sMenuTransitionFadeInFast); } y = 300; out = func_800890AC(arg0); @@ -2918,7 +2932,7 @@ s32 menu_boot_loop(s32 arg0) { } if (y < 300) { - render_textured_rectangle(&D_801263A0, &D_800DF7DC, 160, y, 255, 255, 255, 255); + render_textured_rectangle(&D_801263A0, &sGameTitleTileOffsets, 160, y, 255, 255, 255, 255); func_8007B3D0(&D_801263A0); } @@ -2929,7 +2943,7 @@ GLOBAL_ASM("asm/non_matchings/menu/MenuBootLoop.s") #endif void func_800887C4(void) { - func_8009C4A8((s16 *)D_800DF7C4); + func_8009C4A8((s16 *)sGameTitleTileTextures); } void func_800887E8(void) { @@ -2986,14 +3000,14 @@ void menu_magic_codes_init(void) { gCheatInputCurrentColumn = 0; gOptionsMenuItemIndex = 0; gCheatInputStringLength = 0; - D_80126470 = 0; + sUnused_80126470 = 0; D_80126C4C = -1; D_80126C58[0] = 0; D_801263BC = 0; gMenuDelay = 0; D_801263D8 = 0; D_801263E0 = 0; - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); set_current_dialogue_box_coords(7, 0x32, 0x32, 0x10E, 0x84); set_current_dialogue_background_colour(7, 0, 0, 0, 0x80); assign_dialogue_box_id(7); @@ -3012,12 +3026,12 @@ void render_magic_codes_ui(s32 arg0) { set_text_background_color(0, 0, 0, 0); render_dialogue_box(&D_801263A0, 0, 0, 7); - set_text_font(2); + set_text_font(FONT_LARGE); set_text_color(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); draw_text(&D_801263A0, 0xA0, 0x20, gMenuText[17], 0xC); // gMenuText[17] = "MAGIC CODES" - set_text_font(0); + set_text_font(FONT_COLOURFUL); set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); c = 'A'; @@ -3054,7 +3068,7 @@ void render_magic_codes_ui(s32 arg0) { temp = 0x1FF - temp; } - set_text_font(0); + set_text_font(FONT_COLOURFUL); yPos = 0xA4; yIncr = 16; if (osTvType == TV_TYPE_PAL) { @@ -3070,7 +3084,7 @@ void render_magic_codes_ui(s32 arg0) { draw_text(&D_801263A0, POS_CENTRED, yPos, gMagicCodeMenuStrings[i], 0xC); yPos += yIncr; } - set_text_font(0); + set_text_font(FONT_COLOURFUL); set_text_color(0xFF, 0xFF, 0x80, 0x80, 0xFF); set_text_background_color(0, 0, 0x80, 0x80); if (gOptionsMenuItemIndex == 4) { @@ -3139,7 +3153,7 @@ void menu_magic_codes_list_init(void) { func_800C4170(2); func_8009C6D4(0x3F); func_8008E4B0(); - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); if (osTvType == TV_TYPE_PAL) { D_80126C70 = 0xB; } else { @@ -3158,7 +3172,7 @@ void render_magic_codes_list_menu_text(s32 arg0) { s32 i; set_text_background_color(0, 0, 0, 0); - set_text_font(2); + set_text_font(FONT_LARGE); set_text_color(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); @@ -3178,7 +3192,7 @@ void render_magic_codes_list_menu_text(s32 arg0) { if (fp >= 0x100) { fp = 0x1FF - fp; } - set_text_font(0); + set_text_font(FONT_COLOURFUL); set_text_color(0xFF, 0xFF, 0xFF, 0, 0xFF); for (i = D_801263E0; (i < D_801263E0 + D_80126C70) && (i < numOfUnlockedCheats); i++) { if (i == gOptionsMenuItemIndex) { @@ -3312,7 +3326,7 @@ s32 menu_magic_codes_list_loop(s32 arg0) { } if (sp48 != 0) { gMenuDelay = sp48; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); func_80001D04(0x241, NULL); } if (gMenuDelay < -0x1E) { @@ -3457,8 +3471,8 @@ void menu_character_select_init(void) { func_80001114(6); func_80000B18(); func_8009C674(D_800DFDC8); - func_8009C8A4(D_800DFDCC); - func_800C01D8(&D_800DF77C); + allocate_menu_images(D_800DFDCC); + func_800C01D8(&sMenuTransitionFadeOut); func_800C4170(2); } @@ -3468,7 +3482,7 @@ void menu_character_select_init(void) { void draw_character_select_text(s32 arg0) { s32 yPos; if (gMenuDelay >= -0x16 && gMenuDelay < 0x17) { - set_text_font(2); // Set font to the Big Yellow Text + set_text_font(FONT_LARGE); set_text_background_color(0, 0, 0, 0); set_text_color(0, 0, 0, 0xFF, 0x80); // Draw "Player Select" text drop shadow @@ -3667,27 +3681,35 @@ void func_8008C128(void) { GLOBAL_ASM("asm/non_matchings/menu/func_8008C168.s") +/** + * Initialises the timer and transition for the controller pak warning screen. + * Only seen once per game session, as set by gPlayerHasSeenCautionMenu. + */ void menu_caution_init(void) { - gIgnorePlayerInput = 0x3C; + gIgnorePlayerInput = 60; gMenuDelay = 0; func_800C4170(2); - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); gPlayerHasSeenCautionMenu = 1; } +/** + * Loops through the display of the caution screen. + * Blocks player input for one second. + */ s32 menu_caution_loop(s32 updateRate) { - if (gMenuDelay != 0) { + if (gMenuDelay) { gMenuDelay += updateRate; } else if (gIgnorePlayerInput <= 0 && (get_buttons_pressed_from_player(0) & (A_BUTTON | B_BUTTON | START_BUTTON))) { func_80001D04(0xEF, NULL); gMenuDelay = 1; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); } - if (gMenuDelay < 0x14) { + if (gMenuDelay < 20) { draw_menu_elements(1, gCautionMenuTextElements, 1.0f); } - if (gMenuDelay >= 0x1F) { - func_8008C4E8(); + if (gMenuDelay > 30) { + unload_large_font(); menu_init(MENU_GAME_SELECT); } if (gIgnorePlayerInput > 0) { @@ -3696,8 +3718,11 @@ s32 menu_caution_loop(s32 updateRate) { return 0; } -void func_8008C4E8(void) { - func_800C422C(2); +/** + * Explicitly says to unload the FONT_LARGE type. + */ +void unload_large_font(void) { + func_800C422C(FONT_LARGE); } #ifdef NON_MATCHING @@ -3709,7 +3734,7 @@ void menu_game_select_init(void) { D_801263BC = 0; D_800DF460 = 0; D_801263E0 = 2; - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); func_8006EBA8(); func_8001B790(); D_801263D8 = 1; @@ -3856,11 +3881,11 @@ s32 menu_game_select_loop(s32 arg0) { if (D_800DF460 == D_801263E0) { set_music_fade_timer(-0x80); } - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); gMenuDelay = 1; func_80001D04(0xEF, 0); } else if (playerInputs & B_BUTTON) { - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); gMenuDelay = -1; } else { if (playerYDir < 0) { @@ -3898,7 +3923,7 @@ void menu_file_select_init(void) { get_number_of_levels_and_worlds(&numLevels, &numWorlds); func_8009C674(D_800E0398); - func_8009C8A4(D_800E03A4); + allocate_menu_images(D_800E03A4); func_8007FFEC(6); func_8006EBA8(); D_801263D8 = 1; @@ -3909,7 +3934,7 @@ void menu_file_select_init(void) { D_80126484 = 0; D_80126488 = 0; D_80126CC0 = 0; - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); func_800C4170(2); play_music(0x1A); for (i = 0; i < 10; i++) { @@ -3922,30 +3947,36 @@ void menu_file_select_init(void) { func_80000B18(); } -void func_8008CC28(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { - s32 saved0 = D_800DF4A4; - s32 saved1 = D_800DF4A8; - s32 saved2 = D_800DF4AC; - s32 saved3 = D_800DF764; - D_800DF4A4 = arg3; - D_800DF4A8 = arg4; - D_800DF4AC = arg5; - D_800DF764 = arg6; - D_800DF75C[arg0].unkC = arg1 - 0x9F; - D_800DF75C[arg0].unk10 = 0x77 - arg2; - func_8009CA60(arg0); - D_800DF4A4 = saved0; - D_800DF4A8 = saved1; - D_800DF4AC = saved2; - D_800DF764 = saved3; - D_800DF75C[arg0].unkC = arg1 - 0xA1; - D_800DF75C[arg0].unk10 = 0x79 - arg2; - func_8009CA60(arg0); +/** + * Sets the colour properties of the selected image index in the menu texture stack, then renders it on screen. + * Rendering it twice using different colour settings, it casts a shadow. + */ +void render_menu_image(s32 imageID, s32 xOffset, s32 yOffset, s32 red, s32 green, s32 blue, s32 opacity) { + s32 tempRed = sMenuGuiColourR; + s32 tempGreen = sMenuGuiColourG; + s32 tempBlue = sMenuGuiColourB; + s32 tempOpacity = sMenuGuiOpacity; +// This first section is the shadow + sMenuGuiColourR = red; + sMenuGuiColourG = green; + sMenuGuiColourB = blue; + sMenuGuiOpacity = opacity; + gMenuImageStack[imageID].unkC = xOffset - 159; + gMenuImageStack[imageID].unk10 = 119 - yOffset; + func_8009CA60(imageID); +// And this then draws it again, with colour + sMenuGuiColourR = tempRed; + sMenuGuiColourG = tempGreen; + sMenuGuiColourB = tempBlue; + sMenuGuiOpacity = tempOpacity; + gMenuImageStack[imageID].unkC = xOffset - 161; + gMenuImageStack[imageID].unk10 = 121 - yOffset; + func_8009CA60(imageID); } #ifdef NON_MATCHING // Shouldn't have any major issues. -void render_file_select_menu(s32 arg0) { +void render_file_select_menu(UNUSED s32 updateRate) { s32 s2; s32 s5; s32 y; @@ -3973,7 +4004,7 @@ void render_file_select_menu(s32 arg0) { } func_80080BC8(&D_801263A0); if (D_801263D8 == 0) { - set_text_font(2); + set_text_font(FONT_LARGE); set_text_background_color(0, 0, 0, 0); s5 = 10; for (i = 0; i < 3; i++) { @@ -3983,18 +4014,18 @@ void render_file_select_menu(s32 arg0) { if (gSavefileInfo[i].isAdventure2 != 0) { s2 = 0xC; } - func_8008CC28(s2, D_800E03FC[2] + D_800E03CC[i].unk0, D_800E03FC[3] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); + render_menu_image(s2, D_800E03FC[2] + D_800E03CC[i].unk0, D_800E03FC[3] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); func_80068508(1); - D_800DF75C->unk18 = gSavefileInfo[i].balloonCount / s5; - func_8008CC28(0, (D_800E03FC[6] + D_800E03CC[i].unk0) - 6, D_800E03FC[7] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); - D_800DF75C->unk18 = gSavefileInfo[i].balloonCount % s5; - func_8008CC28(0, D_800E03FC[6] + D_800E03CC[i].unk0 + 6, D_800E03FC[7] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); + gMenuImageStack->unk18 = gSavefileInfo[i].balloonCount / s5; + render_menu_image(0, (D_800E03FC[6] + D_800E03CC[i].unk0) - 6, D_800E03FC[7] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); + gMenuImageStack->unk18 = gSavefileInfo[i].balloonCount % s5; + render_menu_image(0, D_800E03FC[6] + D_800E03CC[i].unk0 + 6, D_800E03FC[7] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); func_80068508(0); - D_800DF4A8 = 0x40; - D_800DF4AC = 0x40; - func_8008CC28(s5, D_800E03FC[8] + D_800E03CC[i].unk0, D_800E03FC[9] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); - D_800DF4A8 = 0xFF; - D_800DF4AC = 0xFF; + sMenuGuiColourG = 0x40; + sMenuGuiColourB = 0x40; + render_menu_image(s5, D_800E03FC[8] + D_800E03CC[i].unk0, D_800E03FC[9] + D_800E03CC[i].unk2, 0, 0, 0, 0x80); + sMenuGuiColourG = 0xFF; + sMenuGuiColourB = 0xFF; func_8007BF1C(1); } else { set_text_color(255, 255, 255, 64, 255); @@ -4006,7 +4037,7 @@ void render_file_select_menu(s32 arg0) { if (phi_v0_2 >= 0x100) { phi_v0_2 = 0x1FF - phi_v0_2; } - set_text_font(0); + set_text_font(FONT_COLOURFUL); set_text_background_color(0, 0, 0, 0); set_text_color(255, 255, 255, 0, 255); for (i = 0; i < 3; i++) { @@ -4037,7 +4068,7 @@ void render_file_select_menu(s32 arg0) { } } } - set_text_font(2); + set_text_font(FONT_LARGE); set_text_color(0, 0, 0, 255, 128); draw_text(&D_801263A0, 0xA1, 0x13, gMenuText[76], 4); set_text_color(255, 255, 255, 0, 255); @@ -4046,10 +4077,10 @@ void render_file_select_menu(s32 arg0) { y += 0xBB; if (D_80126484 != 0) { if (D_80126494 == 0) { - set_text_font(0); + set_text_font(FONT_COLOURFUL); draw_text(&D_801263A0, 0xA0, y, gMenuText[77], 0xC); } else if (D_80126494 == 1) { - set_text_font(0); + set_text_font(FONT_COLOURFUL); draw_text(&D_801263A0, 0xA0, y, gMenuText[78], 0xC); } else { draw_text(&D_801263A0, 0xA0, y, &D_800E8234, 0xC); @@ -4058,7 +4089,7 @@ void render_file_select_menu(s32 arg0) { } if (D_80126488 != 0) { if (D_80126494 == 0) { - set_text_font(0); + set_text_font(FONT_COLOURFUL); draw_text(&D_801263A0, 0xA0, y, gMenuText[79], 0xC); } else { draw_text(&D_801263A0, 0xA0, y, &D_800E8238, 0xC); @@ -4223,14 +4254,14 @@ s32 menu_track_select_loop(s32 arg0) { break; } - if (D_800DF760 < 0) { + if (sMenuMusicVolume < 0) { set_relative_volume_for_music(0); } else { - D_800DF760 += arg0 * 2; - if (D_800DF760 >= 0x51) { - D_800DF760 = 0x50; + sMenuMusicVolume += arg0 * 2; + if (sMenuMusicVolume >= 0x51) { + sMenuMusicVolume = 0x50; } - set_relative_volume_for_music((u8)D_800DF760); + set_relative_volume_for_music((u8)sMenuMusicVolume); } if (D_801267D0 < 0) { func_8008F534(); @@ -4350,8 +4381,8 @@ void render_track_select_setup_ui(s32 arg0) { } else { sp84 = 4; } - D_800DF75C[sp84].unkC = 0.0f; - D_800DF75C[sp84].unk10 = 0.0f; + gMenuImageStack[sp84].unkC = 0.0f; + gMenuImageStack[sp84].unk10 = 0.0f; if (osTvType == TV_TYPE_PAL) { D_800DF454 = 1.2f; } @@ -4360,23 +4391,23 @@ void render_track_select_setup_ui(s32 arg0) { } if ((gMenuDelay >= -0x16) && (gMenuDelay < 0x1F)) { if (gMenuDelay < 0) { - D_800DF764 = (gMenuDelay * 0x10) + 0xFF; + sMenuGuiOpacity = (gMenuDelay * 0x10) + 0xFF; } else { - D_800DF764 = 0xFF; + sMenuGuiOpacity = 0xFF; } - if (D_800DF764 < 0) { - D_800DF764 = 0; + if (sMenuGuiOpacity < 0) { + sMenuGuiOpacity = 0; } sp7C = func_8006B0F8(gTrackIdForPreview); - set_text_font(2); - set_text_color(0xC0, 0xC0, 0xFF, 0, D_800DF764); + set_text_font(FONT_LARGE); + set_text_color(0xC0, 0xC0, 0xFF, 0, sMenuGuiOpacity); set_text_background_color(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) { sp84 = 0x1FF - sp84; } - set_current_dialogue_background_colour(7, 0xFF, sp84, 0, D_800DF764); + set_current_dialogue_background_colour(7, 0xFF, sp84, 0, sMenuGuiOpacity); if ((D_801263E0 == -1) || ((D_801263E0 == 2) && (D_801269C8 == 4) && is_adventure_two_unlocked())) { s4 = func_800C4DA0(gMenuText[146], 0, 0); // gMenuText[146] = "ADVENTURE" temp = func_800C4DA0(gMenuText[147], 0, 0); // gMenuText[147] = "ADVENTURE TWO" @@ -4389,21 +4420,21 @@ void render_track_select_setup_ui(s32 arg0) { s4 += 0xC; } func_80080580(&D_801263A0, -(s4 >> 1), 0x78 - D_800E0700[1], s4, D_800E0700[3], - D_800E0700[4], D_800E0700[5], D_800DF764 + 0xB0E0C000, D_8012665C); + D_800E0700[4], D_800E0700[5], sMenuGuiOpacity + 0xB0E0C000, D_8012665C); func_80080E6C(); - set_text_font(0); + set_text_font(FONT_COLOURFUL); s7 = D_800E0700[7] + D_800E0700[1] + sp80; s7++; for (i = 0; i < 2; i++) { for (j = 0; j < 4; j += 2) { if (j == 0) { - set_text_color(0, 0, 0, 0xFF, D_800DF764 >> 1); + set_text_color(0, 0, 0, 0xFF, sMenuGuiOpacity >> 1); } else { s32 alpha = i; if (i == D_800E0418) { alpha = sp84; } - set_text_color(0xFF, 0xFF, 0xFF, alpha, D_800DF764); + set_text_color(0xFF, 0xFF, 0xFF, alpha, sMenuGuiOpacity); } // gMenuText[146] = "ADVENTURE", gMenuText[147] = "ADVENTURE TWO" draw_text(&D_801263A0, 0xA1 - j, s7 - j, gMenuText[146 + i], 0xC); @@ -4412,11 +4443,11 @@ void render_track_select_setup_ui(s32 arg0) { } } if (D_801269C8 < 4) { - set_text_font(0); - set_text_color(0xFF, 0x40, 0x40, 0x60, D_800DF764); + set_text_font(FONT_COLOURFUL); + set_text_color(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, D_800DF764); + set_text_color(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); @@ -4429,15 +4460,15 @@ void render_track_select_setup_ui(s32 arg0) { set_current_dialogue_box_coords(7, 0x86, sp80 + 0x70, 0xBA, sp80 + 0x89); render_dialogue_box(&D_801263A0, 0, 0, 7); if (D_801263E0 <= 0) { - render_textured_rectangle(&D_801263A0, &D_800E05B4, 0x88, sp80 + 0x72, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, &D_800E05B4, 0x88, sp80 + 0x72, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } else { - render_textured_rectangle(&D_801263A0, &D_800E05C4, 0x88, sp80 + 0x72, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, &D_800E05C4, 0x88, sp80 + 0x72, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); for (i = 0; i < 2; i++) { s32 yTemp = 0x97 + sp80 + (i * 0x18); if (i == D_800E0414) { - render_textured_rectangle(&D_801263A0, D_800E0648[(i * 3) + 1], 0x68, yTemp, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0648[(i * 3) + 1], 0x68, yTemp, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } else { - render_textured_rectangle(&D_801263A0, D_800E0648[(i * 3) + 2], 0x68, yTemp, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0648[(i * 3) + 2], 0x68, yTemp, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } } } @@ -4455,7 +4486,7 @@ void render_track_select_setup_ui(s32 arg0) { } // "Player" text image - render_textured_rectangle(&D_801263A0, D_800E0660[i], D_800E0688[s3 + (i * 2)], D_800E0688[s3 + (i * 2) + 1] + sp80, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0660[i], D_800E0688[s3 + (i * 2)], D_800E0688[s3 + (i * 2) + 1] + sp80, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } } } @@ -4471,13 +4502,13 @@ void render_track_select_setup_ui(s32 arg0) { for (j = 0; j < gNumberOfActivePlayers; j++) { if (i == gPlayerSelectVehicle[j]) { // Highlighted - render_textured_rectangle(&D_801263A0, D_800E0624[(i * 3) + 1], D_800E06B0[s3 + j], yTemp, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0624[(i * 3) + 1], D_800E06B0[s3 + j], yTemp, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } else if (settings->courseFlagsPtr[gTrackIdForPreview] & 2) { // Not highlighted - render_textured_rectangle(&D_801263A0, D_800E0624[(i * 3) + 2], D_800E06B0[s3 + j], yTemp, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0624[(i * 3) + 2], D_800E06B0[s3 + j], yTemp, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } else { // Not available (Ghosted out) - render_textured_rectangle(&D_801263A0, D_800E0624[(i * 3) + 2], D_800E06B0[s3 + j], yTemp, 0xFF, 0xFF, 0xFF, D_800DF764 / 2); + render_textured_rectangle(&D_801263A0, D_800E0624[(i * 3) + 2], D_800E06B0[s3 + j], yTemp, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity / 2); } } } @@ -4494,21 +4525,21 @@ void render_track_select_setup_ui(s32 arg0) { if (gNumberOfActivePlayers == 1) { if (D_801263E0 == 0) { // Draw vehicle image for one player - render_textured_rectangle(&D_801263A0, D_800E0624[gPlayerSelectVehicle[0] * 3], 0x95, s7, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0624[gPlayerSelectVehicle[0] * 3], 0x95, s7, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } else { // Draw T.T. image for one player - render_textured_rectangle(&D_801263A0, D_800E0648[D_800E0414 * 3], 0x95, sp80, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0648[D_800E0414 * 3], 0x95, sp80, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } } if ((gNumberOfActivePlayers == 2) && (!sp74)) { s7 = sp80; // Draw vehicle image for first player - render_textured_rectangle(&D_801263A0, D_800E0624[gPlayerSelectVehicle[0] * 3], 0x4F, s7, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0624[gPlayerSelectVehicle[0] * 3], 0x4F, s7, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); if (gPlayerSelectVehicle[1] == 2) { s7 = sp80 + 2; } // Draw vehicle image for second player - render_textured_rectangle(&D_801263A0, D_800E0624[gPlayerSelectVehicle[1] * 3], 0xB0, s7, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, D_800E0624[gPlayerSelectVehicle[1] * 3], 0xB0, s7, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); } func_8007B3D0(&D_801263A0); @@ -4516,14 +4547,14 @@ void render_track_select_setup_ui(s32 arg0) { if (gNumberOfActivePlayers < 3) { // Draw border around vehicle images if (!sp74) { - D_800DF75C[7].unk10 = -52.0f; + gMenuImageStack[7].unk10 = -52.0f; if (gNumberOfActivePlayers == 1) { - D_800DF75C[7].unkC = 21.0f; + gMenuImageStack[7].unkC = 21.0f; func_8009CA60(7); } else { - D_800DF75C[7].unkC = -48.0f; + gMenuImageStack[7].unkC = -48.0f; func_8009CA60(7); - D_800DF75C[7].unkC = 48.0f; + gMenuImageStack[7].unkC = 48.0f; func_8009CA60(7); } } @@ -4538,7 +4569,7 @@ 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(0); + set_text_font(FONT_COLOURFUL); set_text_color(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); @@ -4550,22 +4581,22 @@ void render_track_select_setup_ui(s32 arg0) { s32 index = i * 2; if (i == gMultiplayerSelectedNumberOfRacers) { if (D_801263E0 < 3) { - D_800DF4A8 = 0xFF - sp84; - D_800DF4AC = 0xFF - sp84; + sMenuGuiColourG = 0xFF - sp84; + sMenuGuiColourB = 0xFF - sp84; } else { - D_800DF4A8 = 0; - D_800DF4AC = 0; + sMenuGuiColourG = 0; + sMenuGuiColourB = 0; } } // X position - D_800DF75C[0].unkC = (D_800E06E4[index + 8] + D_800E06E4[0]) - 0xA0; + gMenuImageStack[0].unkC = (D_800E06E4[index + 8] + D_800E06E4[0]) - 0xA0; // Y position - D_800DF75C[0].unk10 = (-D_800E06E4[index + 9] - D_800E06E4[1]) + 0x78; + gMenuImageStack[0].unk10 = (-D_800E06E4[index + 9] - D_800E06E4[1]) + 0x78; // Number value to draw. - D_800DF75C[0].unk18 = index + 2; + gMenuImageStack[0].unk18 = index + 2; func_8009CA60(0); - D_800DF4A8 = 0xFF; - D_800DF4AC = 0xFF; + sMenuGuiColourG = 0xFF; + sMenuGuiColourB = 0xFF; } func_8007BF1C(1); func_80068508(0); @@ -4578,33 +4609,33 @@ void render_track_select_setup_ui(s32 arg0) { if (gIsInAdventureTwo) { i = 12; } - D_800DF75C[i].unk10 = 42.0f; + gMenuImageStack[i].unk10 = 42.0f; if ((settings->courseFlagsPtr[gTrackIdForPreview] & 2) || is_adventure_two_unlocked()) { - D_800DF75C[i].unkC = -128.0f; + gMenuImageStack[i].unkC = -128.0f; func_8009CA60(i); } if ((settings->courseFlagsPtr[gTrackIdForPreview] & 4) || is_adventure_two_unlocked()) { - D_800DF75C[i].unkC = 120.0f; + gMenuImageStack[i].unkC = 120.0f; func_8009CA60(i); } func_8007BF1C(1); } if ((gNumberOfActivePlayers == 1) && (D_801263E0 >= 0) && (func_80092BE0(gTrackIdForPreview) >= 0)) { // Render small T.T. icon. - render_textured_rectangle(&D_801263A0, &D_800E0614, 0xCC, 0x7A, 0xFF, 0xFF, 0xFF, D_800DF764); + render_textured_rectangle(&D_801263A0, &D_800E0614, 0xCC, 0x7A, 0xFF, 0xFF, 0xFF, sMenuGuiOpacity); func_8007B3D0(&D_801263A0); } if (D_801269C8 != 5) { if (((D_801263E0 == 2) && !sp74) || ((D_801263E0 == 3) && sp74) || (D_801263E0 == 4)) { - set_text_font(2); - set_text_color(0xFF, 0xFF, 0xFF, 0, D_800DF764); + set_text_font(FONT_LARGE); + set_text_color(0xFF, 0xFF, 0xFF, 0, sMenuGuiOpacity); if (D_801269C8 >= 4) { sp80 += 0x18; } draw_text(&D_801263A0, 0xA0, 0xAC, D_800E823C, 0xC); // D_800E823C = "OK?" } } - D_800DF764 = 0xFF; + sMenuGuiOpacity = 0xFF; } } #else @@ -4673,7 +4704,7 @@ void menu_5_init(void) { func_80000B18(); D_801263E0 = 0; func_8009C674(&D_800E0FB4); - func_8009C8A4(&D_800E0FD8); + allocate_menu_images(&D_800E0FD8); func_8008E45C(); D_800E04D4.unk0 = D_80126550[31]; D_800E04E4.unk0 = D_80126550[30]; @@ -4683,7 +4714,7 @@ void menu_5_init(void) { D_800E0524.unk0 = D_80126550[34]; D_800E05B4.unk0 = D_80126550[48]; D_800E0614.unk0 = D_80126550[94]; - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); D_801263BC = 0; gMenuDelay = 0; D_800E0980 = 0x1E; @@ -4752,7 +4783,7 @@ s32 menu_5_loop(s32 arg0) { func_800C31EC(0x2710); } gMenuDelay = 1; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); func_80001D04(0xEF, NULL); } else if (D_801267D8[0] & 0x4000) { func_80001D04(0x241, NULL); @@ -4760,7 +4791,7 @@ s32 menu_5_loop(s32 arg0) { if (sp28) { func_800C31EC(0x2710); } - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); gMenuDelay = -1; } else { D_801263E0 = 0; @@ -4769,7 +4800,7 @@ s32 menu_5_loop(s32 arg0) { } else { if (D_801267D8[0] & 0x4000) { func_80001D04(0x241, NULL); - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); gMenuDelay = -1; } else if (D_801267D8[0] & 0x9000) { D_801263E0 = 1; @@ -4966,10 +4997,10 @@ void menu_11_init(void) { gIgnorePlayerInput = 1; D_800E0988 = 0; func_8009C674(D_800E0A24); - func_8009C8A4(D_800E0A40); + allocate_menu_images(D_800E0A40); func_80094604(); func_800C4170(2); - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); set_music_player_voice_limit(0x18); play_music(0x18); set_music_fade_timer(0x80); @@ -5162,7 +5193,7 @@ void func_800983C0(s32 arg0) { 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_font(2); + 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); @@ -5242,7 +5273,7 @@ void menu_ghost_data_init(void) { func_8009963C(); } func_8009C674(&D_800E1708); - func_8009C8A4(&D_800E174C); + allocate_menu_images(&D_800E174C); func_800C4170(2); D_800E153C[0].texture = D_80126550[14]; D_800E153C[5].texture = D_80126550[15]; @@ -5285,7 +5316,7 @@ void menu_ghost_data_init(void) { gMenuDelay = 0; D_80126498 = 0; if (sp70 == 0) { - func_800C01D8(&D_800DF77C); + func_800C01D8(&sMenuTransitionFadeOut); return; } gMenuDelay = 0x1E; @@ -5336,7 +5367,7 @@ s32 menu_ghost_data_loop(s32 arg0) { func_80001D04(0xEF, 0); } else if ((pressedButtons & B_BUTTON) || ((pressedButtons & (START_BUTTON | A_BUTTON)) && (D_801264D4 == 0))) { gMenuDelay = 1; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); func_80001D04(0x241, 0); } else { temp = D_80126498; @@ -5376,7 +5407,7 @@ s32 menu_ghost_data_loop(s32 arg0) { func_80001D04(0xEF, 0); } else { gMenuDelay = 1; - func_800C01D8(&D_800DF774); + func_800C01D8(&sMenuTransitionFadeIn); func_80001D04(0x241, 0); } D_801263E0 = 0; @@ -5472,18 +5503,18 @@ void menu_credits_init(void) { D_80126BD0 = 0; D_80126BD8 = 0; D_80126BE0 = 0; - func_80077B5C(0, 0, 0); + set_background_fill_colour(0, 0, 0); if (osTvType == TV_TYPE_PAL) { - func_80066940(0, 0, 0x26, 0x140, 0xE0); - func_80066AA8(0, 0x8000, 0x8000, 0x140, 0x11C); + func_80066940(0, 0, 38, SCREEN_WIDTH, 224); + set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, SCREEN_WIDTH, SCREEN_HEIGHT + 44); } else { - func_80066940(0, 0, 0x28, 0x140, 0xC4); - func_80066AA8(0, 0x8000, 0x8000, 0x140, 0xF0); + func_80066940(0, 0, 40, SCREEN_WIDTH, 196); + set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, SCREEN_WIDTH, SCREEN_HEIGHT); } func_80066610(); func_80066818(0, 1); func_8009C674(D_800E17D8); - func_8009C8A4(D_800E17F0); + allocate_menu_images(D_800E17F0); func_80094604(); func_800C4170(2); set_music_player_voice_limit(0x18); @@ -5547,7 +5578,7 @@ void func_8009BCF0(void) { set_music_player_voice_limit(0x12); func_800C0180(); func_80066894(0, 0); - func_80066AA8(0, 0x8000, 0x8000, 0x8000, 0x8000); + set_viewport_properties(0, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO, VIEWPORT_AUTO); func_8009C4A8(D_800E17D8); func_800C422C(2); func_8006F564(0); @@ -5875,9 +5906,9 @@ void func_8009C508(s32 arg0) { gParticlePtrList_flush(); } if (D_800DF758 == 0) { - if (D_800DF75C != NULL) { - free_from_memory_pool(D_800DF75C); - D_800DF75C = NULL; + if (gMenuImageStack != NULL) { + free_from_memory_pool(gMenuImageStack); + gMenuImageStack = NULL; } if (*D_800DF750 != NULL) { free_from_memory_pool(*D_800DF750); @@ -5887,40 +5918,41 @@ void func_8009C508(s32 arg0) { } } -void func_8009C674(s16 *arg0) { +void func_8009C674(s16 *textureIndex) { s32 index = 0; - while (arg0[index] != -1) { - func_8009C6D4(arg0[index++]); + while (textureIndex[index] != -1) { + func_8009C6D4(textureIndex[index++]); } } +// Educated guess says this is a function that renders texture tiles on screen. GLOBAL_ASM("asm/non_matchings/menu/func_8009C6D4.s") -void func_8009C8A4(s16 *arg0) { +void allocate_menu_images(s16 *imageSet) { s32 index = 0; - while (arg0[index] != -1) { - func_8009C904(arg0[index++]); + while (imageSet[index] != -1) { + allocate_and_set_menu_image_properties(imageSet[index++]); } } -void func_8009C904(s32 arg0) { - if (D_800DF75C == NULL) { - D_800DF75C = allocate_from_main_pool_safe(sizeof(unk800DF510) * 18, COLOR_TAG_RED); +void allocate_and_set_menu_image_properties(s32 imageID) { + if (gMenuImageStack == NULL) { + gMenuImageStack = allocate_from_main_pool_safe(sizeof(unk800DF510) * 18, COLOR_TAG_RED); } - D_800DF75C[arg0].unk0 = D_800DF510[arg0].unk0; - D_800DF75C[arg0].unk2 = D_800DF510[arg0].unk2; - D_800DF75C[arg0].unk4 = D_800DF510[arg0].unk4; - D_800DF75C[arg0].unk6 = D_800DF510[arg0].unk6; - D_800DF75C[arg0].unkC = D_800DF510[arg0].unkC; - D_800DF75C[arg0].unk10 = D_800DF510[arg0].unk10; - D_800DF75C[arg0].unk14 = D_800DF510[arg0].unk14; - D_800DF75C[arg0].unk8 = D_800DF510[arg0].unk8; - D_800DF75C[arg0].unk18 = D_800DF510[arg0].unk18; - D_800DF75C[arg0].unk1A = get_random_number_from_range(0, 0xFFFF); - D_800DF75C[arg0].unk1B = get_random_number_from_range(0, 0xFFFF); - D_800DF75C[arg0].unk1C = get_random_number_from_range(0, 0xFFFF); - D_800DF75C[arg0].unk1D = D_800DF510[arg0].unk1D; + gMenuImageStack[imageID].unk0 = sMenuImageProperties[imageID].unk0; + gMenuImageStack[imageID].unk2 = sMenuImageProperties[imageID].unk2; + gMenuImageStack[imageID].unk4 = sMenuImageProperties[imageID].unk4; + gMenuImageStack[imageID].unk6 = sMenuImageProperties[imageID].unk6; + gMenuImageStack[imageID].unkC = sMenuImageProperties[imageID].unkC; + gMenuImageStack[imageID].unk10 = sMenuImageProperties[imageID].unk10; + gMenuImageStack[imageID].unk14 = sMenuImageProperties[imageID].unk14; + gMenuImageStack[imageID].unk8 = sMenuImageProperties[imageID].unk8; + gMenuImageStack[imageID].unk18 = sMenuImageProperties[imageID].unk18; + gMenuImageStack[imageID].unk1A = get_random_number_from_range(0, 0xFFFF); + gMenuImageStack[imageID].unk1B = get_random_number_from_range(0, 0xFFFF); + gMenuImageStack[imageID].unk1C = get_random_number_from_range(0, 0xFFFF); + gMenuImageStack[imageID].unk1D = sMenuImageProperties[imageID].unk1D; } void func_8009CA58(void) { @@ -5958,7 +5990,7 @@ s32 func_8009CFEC(u32 dialogueOption) { if (D_800DF4E0 != 0) { return 0; } - if (dialogueOption != 3) { + if (dialogueOption != DIALOG_CHALLENGE) { func_8006F388(1); } result = 0; @@ -5981,7 +6013,7 @@ s32 func_8009CFEC(u32 dialogueOption) { result = trophy_race_cabinet_menu_loop(); // Trophy race cabinet menu break; case DIALOG_RACERESULT: - result = func_8009D9F4(); + result = dialogue_race_defeat(); break; } return result; @@ -6016,7 +6048,11 @@ void render_dialogue_option(char *text, s32 yOffset, s32 optionID) { sDialogueOptionMax = (s8)(sDialogueOptionMax + 1); } -void func_8009D26C(void) { +/** + * Sets dialogue option when the joystick is moved. + * Will wrap around if it goes out of bounds. + */ +void handle_menu_joystick_input(void) { if (gControllersYAxisDirection[0] < 0) { sDialogueOption = sDialogueOption + 1; func_80001D04(0xB2, NULL); @@ -6042,9 +6078,12 @@ void func_8009D330(s32 arg0) { D_800DF4DC = arg0; } -void func_8009D33C(s32 arg0, s32 arg1) { - if (sCurrentMenuID == arg0) { - sCurrentMenuID = arg1; +/** + * Sets the menu ID to the second passed number if it's equal to the first. + */ +void set_menu_id_if_option_equal(s32 IDToCheck, s32 IDToSet) { + if (sCurrentMenuID == IDToCheck) { + sCurrentMenuID = IDToSet; } } @@ -6116,7 +6155,7 @@ s32 taj_menu_loop(void) { render_dialogue_option(gMenuText[39], 0x14, 1); // CHALLENGES } render_dialogue_option(gMenuText[5], 0x14, 2); // RETURN - func_8009D26C(); + handle_menu_joystick_input(); if (buttonsPressed & B_BUTTON) { sp2C = 3; func_80001D04(0x241, 0); @@ -6140,7 +6179,7 @@ s32 taj_menu_loop(void) { } break; case 2: - func_8009D26C(); + handle_menu_joystick_input(); if (buttonsPressed & B_BUTTON) { func_80001D04(0x241, 0); func_8003AC3C(0x238, 1); @@ -6158,7 +6197,7 @@ s32 taj_menu_loop(void) { } break; case 3: - func_8009D26C(); + handle_menu_joystick_input(); if ((buttonsPressed & B_BUTTON) || ((buttonsPressed & A_BUTTON) && (D_80126516 == 3))) { func_80001D04(0x241, 0); func_8003AC3C(0x23A, 1); @@ -6219,7 +6258,10 @@ s32 taj_menu_loop(void) { return sp2C; } -s32 func_8009D9F4(void) { +/** + * Shows the dialogue options after you finish an unbeaten race in P2 or lower. + */ +s32 dialogue_race_defeat(void) { s32 state; s32 playerInput; @@ -6234,7 +6276,7 @@ s32 func_8009D9F4(void) { gDialogOptionYOffset = 50; render_dialogue_option(gMenuText[23], 20, 0); // TRY AGAIN render_dialogue_option(gMenuText[51], 20, 1); // EXIT - func_8009D26C(); + handle_menu_joystick_input(); if (playerInput & A_BUTTON) { func_80001D04(0xEF, NULL); switch (D_80126516) { @@ -6300,7 +6342,7 @@ s32 tt_menu_loop(void) { } } render_dialogue_option(gMenuText[5], 0x14, 2); // RETURN - func_8009D26C(); + handle_menu_joystick_input(); if (D_80126516 == 0) { if (gControllersXAxisDirection[0] > 0) { if (!is_time_trial_enabled()) { @@ -6326,7 +6368,7 @@ s32 tt_menu_loop(void) { func_80001D04(0xEF, 0); func_80036BCC(0x22E, 1); func_8009C674(&D_800E1E2C); - func_8009C8A4(&D_800E1E40); + allocate_menu_images(&D_800E1E40); D_800E1E28 = 1; sCurrentMenuID = TT_MENU_GAME_STATUS; break; @@ -6499,14 +6541,12 @@ s32 trophy_race_cabinet_menu_loop(void) { /** * Blank function called when a dialogue box is opened. */ - void dialogue_open_stub(void) { } /** * Blank function called when a dialogue box is closed. */ - void dialogue_close_stub(void) { } @@ -6514,7 +6554,6 @@ void dialogue_close_stub(void) { * Renders a textbox with a displaylist. * Return value goes completely unused. */ - f32 func_8009E9B0(UNUSED DialogueBoxBackground *textbox, Gfx **dlist, Gfx **mat, VertexList **verts) { D_801263A0 = *dlist; D_801263A8 = *mat; diff --git a/src/menu.h b/src/menu.h index 78ec1a24..bcd279b4 100644 --- a/src/menu.h +++ b/src/menu.h @@ -101,14 +101,15 @@ enum Language { }; /* Size: 0x20 bytes */ +// So this is looking to be a struct for menu images. typedef struct unk800DF510 { - s16 unk0; - s16 unk2; + s16 unk0; //X1 + s16 unk2; //Y1 s16 unk4; s16 unk6; f32 unk8; - f32 unkC; - f32 unk10; + f32 unkC; // X offset + f32 unk10; // Y offset f32 unk14; s16 unk18; s8 unk1A; @@ -257,9 +258,9 @@ extern s32 *gMenuTextLangTable; extern char **gMenuText; -extern u8 D_800DF4A4; -extern u8 D_800DF4A8; -extern u8 D_800DF4AC; +extern u8 sMenuGuiColourR; +extern u8 sMenuGuiColourG; +extern u8 sMenuGuiColourB; extern u8 D_800DF4B0; extern s32 D_800DF4B4; @@ -282,15 +283,15 @@ extern s8 gDialogOptionTangible; // Unused? extern s32 D_800DF4F0[]; -extern unk800DF510 D_800DF510[18]; +extern unk800DF510 sMenuImageProperties[18]; extern s16 *D_800DF750[1]; extern s16 D_800DF754; extern s16 D_800DF758; -extern unk800DF510 *D_800DF75C; +extern unk800DF510 *gMenuImageStack; -extern s32 D_800DF760; -extern s32 D_800DF764; +extern s32 sMenuMusicVolume; +extern s32 sMenuGuiOpacity; extern s32 D_800DF768; extern s32 D_800DF794; @@ -303,9 +304,9 @@ extern char *gTitleMenuStrings[3]; // Version text shown on the title screen? See 1:15 in https://www.youtube.com/watch?v=OHSCLcA74ao. extern char gVersionDisplayText[20]; -extern s16 D_800DF7C4[12]; +extern s16 sGameTitleTileTextures[12]; -extern DrawTexture D_800DF7DC[12]; +extern DrawTexture sGameTitleTileOffsets[12]; // Title screen cinematic text extern unk800DF83C D_800DF83C[10]; @@ -316,7 +317,7 @@ extern u16 D_800DF9F8[12]; extern char *gOptionMenuStrings[7]; -extern s16 D_800DFA2C[8]; +extern s16 gOptionMenuTextures[8]; extern unk800DFA3C gAudioMenuStrings[8]; @@ -613,7 +614,7 @@ extern s32 gViewingCreditsFromCheat; extern MenuElement D_800E1B50[9]; -//extern u32 D_800E1C70[24]; +//extern u32 dMenuHudSettings[24]; extern s8 D_800E1CD0[32]; @@ -669,7 +670,7 @@ void func_800828B8(void); void print_missing_controller_text(Gfx *dl, s32 updateRate); void menu_logos_screen_init(void); s32 menu_logo_screen_loop(s32 arg0); -void func_80082FAC(void); +void init_title_screen_variables(void); void menu_title_screen_init(void); void func_80084118(void); void menu_options_init(void); @@ -699,10 +700,10 @@ void draw_character_select_text(s32 arg0); void func_8008BFE8(s32 arg0, s8 *arg1, s32 arg2, u16 arg3, u16 arg4); void func_8008C128(void); void menu_caution_init(void); -void func_8008C4E8(void); +void unload_large_font(void); void func_8008CACC(void); void menu_file_select_init(void); -void func_8008CC28(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); +void render_menu_image(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); void func_8008E428(void); void func_8008E45C(void); void func_8008E4B0(void); @@ -758,20 +759,20 @@ void func_8009C49C(void); void func_8009C4A8(s16 *arg0); void func_8009C508(s32 arg0); void func_8009C674(s16 *arg0); -void func_8009C8A4(s16 *arg0); -void func_8009C904(s32 arg0); +void allocate_menu_images(s16 *imageSet); +void allocate_and_set_menu_image_properties(s32 imageID); void func_8009CA58(void); void func_8009CF68(s32 arg0); void func_8009CFB0(void); s32 func_8009CFEC(u32 arg0); void set_option_text_colour(s32 condition); void render_dialogue_option(char *text, s32 yOffset, s32 optionID); -void func_8009D26C(void); +void handle_menu_joystick_input(void); void func_8009D324(void); void func_8009D330(s32 arg0); -void func_8009D33C(s32 arg0, s32 arg1); +void set_menu_id_if_option_equal(s32 IDToCheck, s32 IDToSet); s32 taj_menu_loop(void); -s32 func_8009D9F4(void); +s32 dialogue_race_defeat(void); s32 trophy_race_cabinet_menu_loop(void); void dialogue_open_stub(void); void dialogue_close_stub(void); diff --git a/src/unknown_06B2B0.c b/src/unknown_06B2B0.c index 253c8826..ac3acc6d 100644 --- a/src/unknown_06B2B0.c +++ b/src/unknown_06B2B0.c @@ -585,7 +585,7 @@ void load_level(s32 levelId, s32 numberOfPlayers, s32 entranceId, s32 vehicleId, init_pulsating_light_data(gCurrentLevelHeader->pulseLightData); } update_camera_fov(gCurrentLevelHeader->cameraFOV); - func_80077B34(gCurrentLevelHeader->bgColorRed, gCurrentLevelHeader->bgColorGreen, gCurrentLevelHeader->bgColorBlue); + set_background_prim_colour(gCurrentLevelHeader->bgColorRed, gCurrentLevelHeader->bgColorGreen, gCurrentLevelHeader->bgColorBlue); func_8007A974(); func_8007AB24(gCurrentLevelHeader->unk4[numberOfPlayers]); } @@ -656,7 +656,7 @@ u8 *func_8006BDDC(s32 arg0) { void func_8006BEFC(void) { func_8006C164(); - func_80077B34(0, 0, 0); + set_background_prim_colour(0, 0, 0); free_from_memory_pool(gCurrentLevelHeader); func_800049D8(); func_80001844(); @@ -1964,8 +1964,8 @@ void func_8006F338(s32 arg0) { } } -void func_8006F388(u8 arg0) { - D_800DD398 = arg0; +void func_8006F388(u8 time) { + D_800DD398 = time; } void func_8006F398(void) { diff --git a/src/unknown_078050.c b/src/unknown_078050.c index 9387e3fb..2ea9dc83 100644 --- a/src/unknown_078050.c +++ b/src/unknown_078050.c @@ -14,10 +14,10 @@ s16 D_800DE490[16] = { 0, 0, 0, 0, 0, 0, 0, 0 }; -u8 D_800DE4B0 = 0; -u8 D_800DE4B4 = 0; -u8 D_800DE4B8 = 0; -s32 D_800DE4BC = 0x00010001; +u8 sBackgroundPrimColourR = 0; +u8 sBackgroundPrimColourG = 0; +u8 sBackgroundPrimColourB = 0; +s32 sBackgroundFillColour = 0x00010001; u32 D_800DE4C0 = 0x40; u32 D_800DE4C4 = 0; @@ -189,25 +189,31 @@ void func_80077AAC(void *bufPtr, s32 arg1, s32 arg2) { while (osDpGetStatus() & DPC_CLR_CMD_CTR) {} } -//Probable red, green, blue -void func_80077B34(u8 arg0, u8 arg1, u8 arg2) { - D_800DE4B0 = arg0; - D_800DE4B4 = arg1; - D_800DE4B8 = arg2; +/** + * Sets the primitive colour for the cyclemode fillrect background. + */ +void set_background_prim_colour(u8 red, u8 green, u8 blue) { + sBackgroundPrimColourR = red; + sBackgroundPrimColourG = green; + sBackgroundPrimColourB = blue; } -void func_80077B5C(s32 red, s32 green, s32 blue) { - D_800DE4BC = ((red << 8) & 0xF800) | ((green * 8) & 0x7C0) | ((blue >> 2) & 0x3E) | 1; - D_800DE4BC |= (D_800DE4BC << 0x10); +/** + * Sets the fill colour for the fillmode fillrect background. + * Uses RGBA5551 + */ +void set_background_fill_colour(s32 red, s32 green, s32 blue) { + sBackgroundFillColour = ((red << 8) & 0xF800) | ((green * 8) & 0x7C0) | ((blue >> 2) & 0x3E) | 1; + sBackgroundFillColour |= (sBackgroundFillColour << 16); } #ifdef NON_MATCHING // Stack issues void render_background(Gfx **dlist, s32 *arg1, s32 arg2) { - s32 sp90; - s32 sp8C; - s32 sp88; - s32 sp84; + s32 x1; + s32 y1; + s32 x2; + s32 y2; s32 widthAndHeight; s32 w, h; s32 rgba16Color; @@ -233,15 +239,15 @@ void render_background(Gfx **dlist, s32 *arg1, s32 arg2) { } else if (D_800DE4D0.ptr != NULL) { D_800DE4D0.function(dlist, arg1); } else { - gDPSetFillColor((*dlist)++, D_800DE4BC); + gDPSetFillColor((*dlist)++, sBackgroundFillColour); gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1); } - if (func_80066BA8(0, &sp90, &sp8C, &sp88, &sp84)) { + if (copy_viewport_background_size_to_coords(0, &x1, &y1, &x2, &y2)) { gDPSetCycleType((*dlist)++, G_CYC_1CYCLE); - gDPSetPrimColor((*dlist)++, 0, 0, D_800DE4B0, D_800DE4B4, D_800DE4B8, 0xFF); + gDPSetPrimColor((*dlist)++, 0, 0, sBackgroundPrimColourR, sBackgroundPrimColourG, sBackgroundPrimColourB, 0xFF); gDPSetCombineMode((*dlist)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); gDPSetRenderMode((*dlist)++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - gDPFillRectangle((*dlist)++, sp90, sp8C, sp88, sp84); + gDPFillRectangle((*dlist)++, x1, y1, x2, y2); } } else { if (D_800DE4CC) { @@ -252,7 +258,7 @@ void render_background(Gfx **dlist, s32 *arg1, s32 arg2) { D_800DE4D0.function(dlist, arg1); } else { //Also has an issue here. - rgba16Color = ((D_800DE4B0 << 8) & 0xF800) | ((D_800DE4B4 * 8) & 0x7C0) | ((D_800DE4B8 >> 2) & 0x3E) | 1; + rgba16Color = ((sBackgroundPrimColourR << 8) & 0xF800) | ((sBackgroundPrimColourG * 8) & 0x7C0) | ((sBackgroundPrimColourB >> 2) & 0x3E) | 1; rgba16Color |= rgba16Color << 0x10; gDPSetFillColor((*dlist)++, rgba16Color); gDPFillRectangle((*dlist)++, 0, 0, w - 1, h - 1); @@ -266,6 +272,10 @@ void render_background(Gfx **dlist, s32 *arg1, s32 arg2) { GLOBAL_ASM("asm/non_matchings/unknown_078050/render_background.s") #endif +/** + * Gets the framebuffer height, then points to the start of segment 0x01 in memory. + * afterwards, alls the draw command that initialises all the rendermodes, ready for use. + */ void init_rdp_and_framebuffer(Gfx **dlist) { s32 width = get_video_width_and_height_as_s32() & 0xFFF; gDPSetColorImage((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, 0x01000000); @@ -273,6 +283,9 @@ void init_rdp_and_framebuffer(Gfx **dlist) { gSPDisplayList((*dlist)++, dRdpInit); } +/** + * Calls the draw command that sets all the OtherModes, ready for use. + */ void init_rsp(Gfx **dlist) { gSPDisplayList((*dlist)++, dRspInit); } diff --git a/src/unknown_078050.h b/src/unknown_078050.h index 30b8af57..c8e8c053 100644 --- a/src/unknown_078050.h +++ b/src/unknown_078050.h @@ -14,10 +14,10 @@ typedef union { extern s16 D_800DE490[16]; -extern u8 D_800DE4B0; -extern u8 D_800DE4B4; -extern u8 D_800DE4B8; -extern s32 D_800DE4BC; +extern u8 sBackgroundPrimColourR; +extern u8 sBackgroundPrimColourG; +extern u8 sBackgroundPrimColourB; +extern s32 sBackgroundFillColour; extern u32 D_800DE4C0; extern u32 D_800DE4C4; @@ -30,8 +30,8 @@ extern s32 D_800DE4DC; s32 func_80077A54(void); void func_80077AAC(void *bufPtr, s32 arg1, s32 arg2); -void func_80077B34(u8 arg0, u8 arg1, u8 arg2); -void func_80077B5C(s32 red, s32 green, s32 blue); +void set_background_prim_colour(u8 arg0, u8 arg1, u8 arg2); +void set_background_fill_colour(s32 red, s32 green, s32 blue); void init_rdp_and_framebuffer(Gfx **dlist); void init_rsp(Gfx **dlist); void func_80078100(OSSched *sc);