mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Merge pull request #245 from DavidSM64/menu
Decompiled menu_title_screen_loop and func_8008377C
This commit is contained in:
@@ -113,25 +113,25 @@ s32 is_drumstick_unlocked(void) {
|
||||
}
|
||||
```
|
||||
|
||||
As of September 24th, 2022, this is our current score:
|
||||
As of September 27th, 2022, this is our current score:
|
||||
```
|
||||
========================================================
|
||||
ADVENTURE ONE (ASM -> C Decompilation)
|
||||
------------------- 31.18% Complete --------------------
|
||||
# Decompiled functions: 1271
|
||||
# GLOBAL_ASM remaining: 562
|
||||
------------------- 31.46% Complete --------------------
|
||||
# Decompiled functions: 1273
|
||||
# GLOBAL_ASM remaining: 561
|
||||
# NON_MATCHING functions: 15
|
||||
# NON_EQUIVALENT WIP functions: 101
|
||||
--------------------- Game Status ----------------------
|
||||
Balloons: 16/47, Keys: 2/4, Trophies: 1/5
|
||||
T.T. Amulets: 1/4, Wizpig Amulets: 1/4
|
||||
--------------------------------------------------------
|
||||
We are racing in Frosty Village. (Lap 2/3)
|
||||
We are racing in Frosty Village. (Lap 3/3)
|
||||
========================================================
|
||||
ADVENTURE TWO (Cleanup & Documentation)
|
||||
------------------- 5.39% Complete --------------------
|
||||
# Documented functions: 195
|
||||
# Undocumented remaining: 1638
|
||||
# Undocumented remaining: 1639
|
||||
--------------------- Game Status ----------------------
|
||||
Balloons: 3/47, Keys: 0/4, Trophies: 0/5
|
||||
T.T. Amulets: 0/4, Wizpig Amulets: 0/4
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
glabel func_8008377C
|
||||
/* 08437C 8008377C 27BDFFA8 */ addiu $sp, $sp, -0x58
|
||||
/* 084380 80083780 AFB00024 */ sw $s0, 0x24($sp)
|
||||
/* 084384 80083784 3C108012 */ lui $s0, %hi(D_8012686C) # $s0, 0x8012
|
||||
/* 084388 80083788 2610686C */ addiu $s0, %lo(D_8012686C) # addiu $s0, $s0, 0x686c
|
||||
/* 08438C 8008378C 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 084390 80083790 44856000 */ mtc1 $a1, $f12
|
||||
/* 084394 80083794 AFBF0044 */ sw $ra, 0x44($sp)
|
||||
/* 084398 80083798 AFB70040 */ sw $s7, 0x40($sp)
|
||||
/* 08439C 8008379C AFB6003C */ sw $s6, 0x3c($sp)
|
||||
/* 0843A0 800837A0 AFB50038 */ sw $s5, 0x38($sp)
|
||||
/* 0843A4 800837A4 AFB40034 */ sw $s4, 0x34($sp)
|
||||
/* 0843A8 800837A8 AFB30030 */ sw $s3, 0x30($sp)
|
||||
/* 0843AC 800837AC AFB2002C */ sw $s2, 0x2c($sp)
|
||||
/* 0843B0 800837B0 AFB10028 */ sw $s1, 0x28($sp)
|
||||
/* 0843B4 800837B4 11C00073 */ beqz $t6, .L80083984
|
||||
/* 0843B8 800837B8 AFA40058 */ sw $a0, 0x58($sp)
|
||||
/* 0843BC 800837BC 3C168012 */ lui $s6, %hi(sMenuCurrDisplayList) # $s6, 0x8012
|
||||
/* 0843C0 800837C0 26D663A0 */ addiu $s6, %lo(sMenuCurrDisplayList) # addiu $s6, $s6, 0x63a0
|
||||
/* 0843C4 800837C4 3C058012 */ lui $a1, %hi(sMenuCurrHudMat) # $a1, 0x8012
|
||||
/* 0843C8 800837C8 24A563A8 */ addiu $a1, %lo(sMenuCurrHudMat) # addiu $a1, $a1, 0x63a8
|
||||
/* 0843CC 800837CC 0C019FCB */ jal func_80067F2C
|
||||
/* 0843D0 800837D0 02C02025 */ move $a0, $s6
|
||||
/* 0843D4 800837D4 8E020000 */ lw $v0, ($s0)
|
||||
/* 0843D8 800837D8 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 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(sMenuGuiOpacity) # $s7, 0x800e
|
||||
/* 0843EC 800837EC 000278C0 */ sll $t7, $v0, 3
|
||||
/* 0843F0 800837F0 46083002 */ mul.s $f0, $f6, $f8
|
||||
/* 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)
|
||||
/* 084404 80083804 0C01A142 */ jal func_80068508
|
||||
/* 084408 80083808 00002025 */ move $a0, $zero
|
||||
/* 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(sGameTitleTileOffsets) # $a1, 0x800e
|
||||
/* 08441C 8008381C 460A0032 */ c.eq.s $f0, $f10
|
||||
/* 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(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(sGameTitleTileOffsets) # addiu $a1, $a1, -0x824
|
||||
/* 084444 80083844 02C02025 */ move $a0, $s6
|
||||
/* 084448 80083848 3C064320 */ lui $a2, 0x4320
|
||||
/* 08444C 8008384C 3C074250 */ lui $a3, 0x4250
|
||||
/* 084450 80083850 E7A00010 */ swc1 $f0, 0x10($sp)
|
||||
/* 084454 80083854 0C01E340 */ jal render_texture_rectangle_scaled
|
||||
/* 084458 80083858 E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* 08445C 8008385C 1000000C */ b .L80083890
|
||||
/* 084460 80083860 00000000 */ nop
|
||||
.L80083864:
|
||||
/* 084464 80083864 240900FF */ li $t1, 255
|
||||
/* 084468 80083868 240A00FF */ li $t2, 255
|
||||
/* 08446C 8008386C 240B00FF */ li $t3, 255
|
||||
/* 084470 80083870 240C00FF */ li $t4, 255
|
||||
/* 084474 80083874 AFAC001C */ sw $t4, 0x1c($sp)
|
||||
/* 084478 80083878 AFAB0018 */ sw $t3, 0x18($sp)
|
||||
/* 08447C 8008387C AFAA0014 */ sw $t2, 0x14($sp)
|
||||
/* 084480 80083880 AFA90010 */ sw $t1, 0x10($sp)
|
||||
/* 084484 80083884 240600A0 */ li $a2, 160
|
||||
/* 084488 80083888 0C01E2AE */ jal render_textured_rectangle
|
||||
/* 08448C 8008388C 24070034 */ li $a3, 52
|
||||
.L80083890:
|
||||
/* 084490 80083890 0C01BD32 */ jal is_controller_missing
|
||||
/* 084494 80083894 00000000 */ nop
|
||||
/* 084498 80083898 14400047 */ bnez $v0, .L800839B8
|
||||
/* 08449C 8008389C 3C0D8000 */ lui $t5, %hi(osTvType) # $t5, 0x8000
|
||||
/* 0844A0 800838A0 8DAD0300 */ lw $t5, %lo(osTvType)($t5)
|
||||
/* 0844A4 800838A4 00008825 */ move $s1, $zero
|
||||
/* 0844A8 800838A8 15A00003 */ bnez $t5, .L800838B8
|
||||
/* 0844AC 800838AC 241200C0 */ li $s2, 192
|
||||
/* 0844B0 800838B0 10000001 */ b .L800838B8
|
||||
/* 0844B4 800838B4 241200DA */ li $s2, 218
|
||||
.L800838B8:
|
||||
/* 0844B8 800838B8 0C0310BB */ jal set_text_font
|
||||
/* 0844BC 800838BC 00002025 */ move $a0, $zero
|
||||
/* 0844C0 800838C0 00002025 */ move $a0, $zero
|
||||
/* 0844C4 800838C4 00002825 */ move $a1, $zero
|
||||
/* 0844C8 800838C8 00003025 */ move $a2, $zero
|
||||
/* 0844CC 800838CC 0C0310F3 */ jal set_text_background_colour
|
||||
/* 0844D0 800838D0 00003825 */ move $a3, $zero
|
||||
/* 0844D4 800838D4 3C0E800E */ lui $t6, %hi(gTitleMenuStrings) # $t6, 0x800e
|
||||
/* 0844D8 800838D8 8DCEF7A4 */ lw $t6, %lo(gTitleMenuStrings)($t6)
|
||||
/* 0844DC 800838DC 00117880 */ sll $t7, $s1, 2
|
||||
/* 0844E0 800838E0 11C00035 */ beqz $t6, .L800839B8
|
||||
/* 0844E4 800838E4 3C18800E */ lui $t8, %hi(gTitleMenuStrings) # $t8, 0x800e
|
||||
/* 0844E8 800838E8 2718F7A4 */ addiu $t8, %lo(gTitleMenuStrings) # addiu $t8, $t8, -0x85c
|
||||
/* 0844EC 800838EC 3C148012 */ lui $s4, %hi(D_801263BC) # $s4, 0x8012
|
||||
/* 0844F0 800838F0 3C13800E */ lui $s3, %hi(gTitleScreenCurrentOption) # $s3, 0x800e
|
||||
/* 0844F4 800838F4 2673F45C */ addiu $s3, %lo(gTitleScreenCurrentOption) # addiu $s3, $s3, -0xba4
|
||||
/* 0844F8 800838F8 269463BC */ addiu $s4, %lo(D_801263BC) # addiu $s4, $s4, 0x63bc
|
||||
/* 0844FC 800838FC 01F88021 */ addu $s0, $t7, $t8
|
||||
/* 084500 80083900 241501FF */ li $s5, 511
|
||||
.L80083904:
|
||||
/* 084504 80083904 8E790000 */ lw $t9, ($s3)
|
||||
/* 084508 80083908 240400FF */ li $a0, 255
|
||||
/* 08450C 8008390C 1639000A */ bne $s1, $t9, .L80083938
|
||||
/* 084510 80083910 240500FF */ li $a1, 255
|
||||
/* 084514 80083914 8E870000 */ lw $a3, ($s4)
|
||||
/* 084518 80083918 00000000 */ nop
|
||||
/* 08451C 8008391C 30E8001F */ andi $t0, $a3, 0x1f
|
||||
/* 084520 80083920 00084900 */ sll $t1, $t0, 4
|
||||
/* 084524 80083924 29210100 */ slti $at, $t1, 0x100
|
||||
/* 084528 80083928 14200004 */ bnez $at, .L8008393C
|
||||
/* 08452C 8008392C 01203825 */ move $a3, $t1
|
||||
/* 084530 80083930 10000002 */ b .L8008393C
|
||||
/* 084534 80083934 02A93823 */ subu $a3, $s5, $t1
|
||||
.L80083938:
|
||||
/* 084538 80083938 00003825 */ move $a3, $zero
|
||||
.L8008393C:
|
||||
/* 08453C 8008393C 8EEA0000 */ lw $t2, ($s7)
|
||||
/* 084540 80083940 240600FF */ li $a2, 255
|
||||
/* 084544 80083944 0C0310E1 */ jal set_text_colour
|
||||
/* 084548 80083948 AFAA0010 */ sw $t2, 0x10($sp)
|
||||
/* 08454C 8008394C 8E070000 */ lw $a3, ($s0)
|
||||
/* 084550 80083950 240B000C */ li $t3, 12
|
||||
/* 084554 80083954 AFAB0010 */ sw $t3, 0x10($sp)
|
||||
/* 084558 80083958 02C02025 */ move $a0, $s6
|
||||
/* 08455C 8008395C 24058000 */ li $a1, -32768
|
||||
/* 084560 80083960 0C031110 */ jal draw_text
|
||||
/* 084564 80083964 02403025 */ move $a2, $s2
|
||||
/* 084568 80083968 8E0C0004 */ lw $t4, 4($s0)
|
||||
/* 08456C 8008396C 26520010 */ addiu $s2, $s2, 0x10
|
||||
/* 084570 80083970 26310001 */ addiu $s1, $s1, 1
|
||||
/* 084574 80083974 1580FFE3 */ bnez $t4, .L80083904
|
||||
/* 084578 80083978 26100004 */ addiu $s0, $s0, 4
|
||||
/* 08457C 8008397C 1000000F */ b .L800839BC
|
||||
/* 084580 80083980 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L80083984:
|
||||
/* 084584 80083984 3C028012 */ lui $v0, %hi(sTitleScreenDemoIds) # $v0, 0x8012
|
||||
/* 084588 80083988 3C0D8012 */ lui $t5, %hi(D_80126864) # $t5, 0x8012
|
||||
/* 08458C 8008398C 8DAD6864 */ lw $t5, %lo(D_80126864)($t5)
|
||||
/* 084590 80083990 8C426874 */ lw $v0, %lo(sTitleScreenDemoIds)($v0)
|
||||
/* 084594 80083994 00000000 */ nop
|
||||
/* 084598 80083998 004D7021 */ addu $t6, $v0, $t5
|
||||
/* 08459C 8008399C 81CF0000 */ lb $t7, ($t6)
|
||||
/* 0845A0 800839A0 80580000 */ lb $t8, ($v0)
|
||||
/* 0845A4 800839A4 00000000 */ nop
|
||||
/* 0845A8 800839A8 15F80004 */ bne $t7, $t8, .L800839BC
|
||||
/* 0845AC 800839AC 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
/* 0845B0 800839B0 0C020C26 */ jal func_80083098
|
||||
/* 0845B4 800839B4 00000000 */ nop
|
||||
.L800839B8:
|
||||
/* 0845B8 800839B8 8FBF0044 */ lw $ra, 0x44($sp)
|
||||
.L800839BC:
|
||||
/* 0845BC 800839BC 8FB00024 */ lw $s0, 0x24($sp)
|
||||
/* 0845C0 800839C0 8FB10028 */ lw $s1, 0x28($sp)
|
||||
/* 0845C4 800839C4 8FB2002C */ lw $s2, 0x2c($sp)
|
||||
/* 0845C8 800839C8 8FB30030 */ lw $s3, 0x30($sp)
|
||||
/* 0845CC 800839CC 8FB40034 */ lw $s4, 0x34($sp)
|
||||
/* 0845D0 800839D0 8FB50038 */ lw $s5, 0x38($sp)
|
||||
/* 0845D4 800839D4 8FB6003C */ lw $s6, 0x3c($sp)
|
||||
/* 0845D8 800839D8 8FB70040 */ lw $s7, 0x40($sp)
|
||||
/* 0845DC 800839DC 03E00008 */ jr $ra
|
||||
/* 0845E0 800839E0 27BD0058 */ addiu $sp, $sp, 0x58
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+204
-8
@@ -177,10 +177,10 @@ s32 D_80126858;
|
||||
s32 D_8012685C;
|
||||
s32 D_80126860;
|
||||
s32 D_80126864;
|
||||
s16 D_80126868;
|
||||
s16 gTitleDemoTimer;
|
||||
s32 D_8012686C;
|
||||
f32 D_80126870;
|
||||
TitleScreenDemos *sTitleScreenDemoIds; //Misc Asset 66 - title_screen_demo_ids.bin - 12 or 13 values.
|
||||
s8 *sTitleScreenDemoIds; //Misc Asset 66 - title_screen_demo_ids.bin - 12 or 13 values.
|
||||
s32 D_80126878[24];
|
||||
f32 D_801268D8;
|
||||
s32 D_801268DC;
|
||||
@@ -2324,13 +2324,13 @@ void menu_title_screen_init(void) {
|
||||
set_time_trial_enabled(FALSE);
|
||||
D_80126864 = 0;
|
||||
sTitleScreenDemoIds = (TitleScreenDemos *)get_misc_asset(MISC_ASSET_UNK42);
|
||||
numberOfPlayers = sTitleScreenDemoIds->numberOfPlayers;
|
||||
D_80126868 = 0;
|
||||
numberOfPlayers = sTitleScreenDemoIds[1];
|
||||
gTitleDemoTimer = 0;
|
||||
if (numberOfPlayers == -2) {
|
||||
numberOfPlayers = 0;
|
||||
D_80126868 = 0x258;
|
||||
gTitleDemoTimer = 600;
|
||||
}
|
||||
load_level_for_menu(sTitleScreenDemoIds->levelId, numberOfPlayers, sTitleScreenDemoIds->cutsceneId);
|
||||
load_level_for_menu(sTitleScreenDemoIds[0], numberOfPlayers, sTitleScreenDemoIds[2]);
|
||||
D_801268D8 = 0;
|
||||
D_801268E0 = 0;
|
||||
D_801268DC = 0;
|
||||
@@ -2339,8 +2339,204 @@ void menu_title_screen_init(void) {
|
||||
gIsInTracksMode = FALSE;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/menu/func_8008377C.s")
|
||||
GLOBAL_ASM("asm/non_matchings/menu/menu_title_screen_loop.s")
|
||||
void func_8008377C(s32 arg0, f32 arg1) {
|
||||
u32 foo[2];
|
||||
s32 var_a3;
|
||||
f32 temp_f0;
|
||||
s32 i;
|
||||
s32 var_s2;
|
||||
|
||||
if (D_8012686C != 0) {
|
||||
func_80067F2C(&sMenuCurrDisplayList, &sMenuCurrHudMat);
|
||||
temp_f0 = (f32) D_8012686C * 0.03125f;
|
||||
sMenuGuiOpacity = (D_8012686C * 8) - 1;
|
||||
func_80068508(0);
|
||||
if (temp_f0 != 1.0f) {
|
||||
render_texture_rectangle_scaled(&sMenuCurrDisplayList, sGameTitleTileOffsets, 160.0f, 52.0f, temp_f0, temp_f0, -2U, 1);
|
||||
} else {
|
||||
render_textured_rectangle(&sMenuCurrDisplayList, sGameTitleTileOffsets, 160, 52, 255, 255, 255, 255);
|
||||
}
|
||||
if (is_controller_missing() == 0) {
|
||||
i = 0;
|
||||
if (osTvType == OS_TV_TYPE_PAL) {
|
||||
var_s2 = 0xDA;
|
||||
} else {
|
||||
var_s2 = 0xC0;
|
||||
}
|
||||
set_text_font(0);
|
||||
set_text_background_colour(0, 0, 0, 0);
|
||||
while(gTitleMenuStrings[i] != NULL) {
|
||||
if (i == gTitleScreenCurrentOption) {
|
||||
var_a3 = (D_801263BC & 0x1F) * 0x10;
|
||||
if (var_a3 >= 0x100) {
|
||||
var_a3 = 0x1FF - var_a3;
|
||||
}
|
||||
} else {
|
||||
var_a3 = 0;
|
||||
}
|
||||
set_text_colour(255, 255, 255, var_a3, sMenuGuiOpacity);
|
||||
draw_text(&sMenuCurrDisplayList, POS_CENTRED, var_s2, gTitleMenuStrings[i], ALIGN_MIDDLE_CENTER);
|
||||
var_s2 += 0x10;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sTitleScreenDemoIds[D_80126864] == sTitleScreenDemoIds[0]) {
|
||||
func_80083098(arg1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 menu_title_screen_loop(s32 updateRate) {
|
||||
s32 temp_v0_5;
|
||||
s32 sp28;
|
||||
TitleScreenDemos *demo;
|
||||
s32 contrIndex;
|
||||
f32 sp1C;
|
||||
ObjectSegment* sp18;
|
||||
s8 var_a1;
|
||||
|
||||
sp18 = func_80069D20();
|
||||
D_801263BC = (D_801263BC + updateRate) & 0x3F;
|
||||
func_8008E4EC();
|
||||
if (osTvType == 0) {
|
||||
sp1C = (f32) updateRate / 50.0f;
|
||||
} else {
|
||||
sp1C = (f32) updateRate / 60.0f;
|
||||
}
|
||||
if (gMenuDelay < 20) {
|
||||
func_8008377C(updateRate, sp1C);
|
||||
}
|
||||
if (gMenuDelay != 0) {
|
||||
gMenuDelay += updateRate;
|
||||
}
|
||||
if (sTitleScreenDemoIds[D_80126864] == sTitleScreenDemoIds[0]) {
|
||||
D_801263D8 += updateRate;
|
||||
}
|
||||
sp28 = 0;
|
||||
if (gTitleDemoTimer > 0) {
|
||||
gTitleDemoTimer -= updateRate;
|
||||
if ((gTitleDemoTimer < 60) && ((gTitleDemoTimer + updateRate) >= 60)) {
|
||||
set_music_fade_timer(-0x300);
|
||||
sp28 = 0;
|
||||
func_800C01D8((FadeTransition* ) D_800E1E08);
|
||||
}
|
||||
if (gTitleDemoTimer <= 0) {
|
||||
sp28 = 1;
|
||||
}
|
||||
} else {
|
||||
gTitleDemoTimer = 0;
|
||||
}
|
||||
if ((gMenuDelay == 0) && (func_800214C4() || sp28)) {
|
||||
if(gTitleDemoTimer){}
|
||||
D_80126864 += 3;
|
||||
demo = &sTitleScreenDemoIds[D_80126864];
|
||||
if (demo->levelId == -1) {
|
||||
D_80126864 = 0;
|
||||
demo = &sTitleScreenDemoIds[D_80126864];
|
||||
}
|
||||
if (D_8012686C == 0) {
|
||||
D_8012686C = 1;
|
||||
}
|
||||
var_a1 = demo->numberOfPlayers;
|
||||
gTitleDemoTimer = 0;
|
||||
if (var_a1 == -2) {
|
||||
var_a1 = 0;
|
||||
gTitleDemoTimer = 1500;
|
||||
}
|
||||
load_level_for_menu(demo->levelId, var_a1, demo->cutsceneId);
|
||||
if (sTitleScreenDemoIds[D_80126864] == sTitleScreenDemoIds[0]) {
|
||||
D_801268D8 = 0.0f;
|
||||
D_801268E0 = 0;
|
||||
D_801268DC = 0;
|
||||
D_800DF9F4 = 0;
|
||||
D_801263D8 = 0;
|
||||
}
|
||||
}
|
||||
if (D_8012686C != 0) {
|
||||
if (D_8012686C < 32) {
|
||||
if (D_8012686C == 1) {
|
||||
play_sound_global(SOUND_WHOOSH1, 0);
|
||||
}
|
||||
D_8012686C += updateRate;
|
||||
if (D_8012686C >= 32) {
|
||||
D_8012686C = 32;
|
||||
sp18->unk30 = 8.0f;
|
||||
play_sound_global(SOUND_EXPLOSION, 0);
|
||||
}
|
||||
} else {
|
||||
if (D_80126870 < 6.0f) {
|
||||
D_80126870 += sp1C;
|
||||
if ((D_80126870 > 0.67f) && (D_801263E0 == 0)) {
|
||||
play_sound_global(SOUND_VOICE_TT_DIDDY_KONG_RACING, 0);
|
||||
D_801263E0 = 1;
|
||||
} else if ((D_80126870 > 2.83f) && (D_801263E0 == 1)) {
|
||||
play_sound_global(SOUND_VOICE_TT_PRESS_START, 0);
|
||||
D_801263E0 = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (D_80126870 > 0.0f) {
|
||||
if (D_80126870 < 0.5f) {
|
||||
set_relative_volume_for_music((s32) ((f32) sMenuMusicVolume * (1.0f - D_80126870)));
|
||||
} else if (D_80126870 < 4.5f) {
|
||||
set_relative_volume_for_music(((s32) sMenuMusicVolume >> 1));
|
||||
} else if (D_80126870 < 5.0f) {
|
||||
set_relative_volume_for_music((s32) ((f32) sMenuMusicVolume * (D_80126870 - 4.0f)));
|
||||
} else {
|
||||
set_relative_volume_for_music(*((s8*)&sMenuMusicVolume + 3));
|
||||
}
|
||||
}
|
||||
if (D_8012686C == 0) {
|
||||
if (D_801267D8[4] & (A_BUTTON | START_BUTTON)) {
|
||||
D_8012686C = 1;
|
||||
}
|
||||
} else if ((gMenuDelay == 0) && !is_controller_missing()) {
|
||||
s32 temp0 = gTitleScreenCurrentOption;
|
||||
// D_80126838 = +1 when going up, and -1 when going down.
|
||||
if ((D_80126838 < 0) && (gTitleScreenCurrentOption < 1)) {
|
||||
gTitleScreenCurrentOption++;
|
||||
}
|
||||
if ((D_80126838 > 0) && (gTitleScreenCurrentOption > 0)) {
|
||||
gTitleScreenCurrentOption--;
|
||||
}
|
||||
if (temp0 != gTitleScreenCurrentOption) {
|
||||
play_sound_global(SOUND_MENU_PICK2, 0 * contrIndex); // TODO: The `* contrIndex` here is a fake match.
|
||||
}
|
||||
if (D_801267D8[4] & (A_BUTTON | START_BUTTON)) {
|
||||
for(contrIndex = 3; contrIndex > 0 && !(D_801267D8[contrIndex] & (A_BUTTON | START_BUTTON)); contrIndex--){}
|
||||
set_active_player_index(contrIndex);
|
||||
gMenuDelay = 1;
|
||||
func_800C01D8(&sMenuTransitionFadeIn);
|
||||
func_800C0170();
|
||||
play_sound_global(SOUND_SELECT2, 0);
|
||||
}
|
||||
}
|
||||
if (gMenuDelay > 30) {
|
||||
func_80084118();
|
||||
func_800C0180();
|
||||
if (gTitleScreenCurrentOption == 0) {
|
||||
sp28 = 0;
|
||||
if (is_drumstick_unlocked()) {
|
||||
sp28 = 1;
|
||||
}
|
||||
if (is_tt_unlocked()) {
|
||||
sp28 ^= 3;
|
||||
}
|
||||
load_level_for_menu(0x16, -1, sp28);
|
||||
func_8008AEB4(0, NULL);
|
||||
menu_init(3U);
|
||||
return 0;
|
||||
}
|
||||
D_800DF460 = 0;
|
||||
load_level_for_menu(0x27, -1, 0);
|
||||
menu_init(MENU_OPTIONS);
|
||||
return 0;
|
||||
}
|
||||
gIgnorePlayerInput = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func_80084118(void) {
|
||||
func_8009C4A8(sGameTitleTileTextures);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "types.h"
|
||||
#include "structs.h"
|
||||
#include "PR/gbi.h"
|
||||
#include "audio.h"
|
||||
#include "fade_transition.h"
|
||||
#include "font.h"
|
||||
#include "save_data.h"
|
||||
@@ -809,6 +810,7 @@ void func_80093A40(void);
|
||||
s32 func_80094170(UNUSED Gfx **dl, s32 updateRate);
|
||||
s32 menu_track_select_loop(s32 updateRate);
|
||||
s32 func_800867D4(void);
|
||||
void func_80083098(f32);
|
||||
|
||||
// Non Matching functions below here
|
||||
void load_menu_text(s32 language); // Non Matching
|
||||
|
||||
Reference in New Issue
Block a user