From 8f65d39fe1d360a707e397f7dc63fe2673b165da Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 3 Nov 2019 21:15:36 +1000 Subject: [PATCH] Decompile countdownTimerSetValue --- src/game/chr/chraicommands.c | 2 +- src/game/game_0601b0.c | 10 ++++------ src/include/setup/setup_000000.h | 1 + src/setup/setup_000000.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 529927f8c..fdf4c6660 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -6351,7 +6351,7 @@ glabel ai00c0 /* f0553e8: 44813000 */ mtc1 $at,$f6 /* f0553ec: 46802020 */ cvt.s.w $f0,$f4 /* f0553f0: 46060302 */ mul.s $f12,$f0,$f6 -/* f0553f4: 0fc24216 */ jal func0f090858 +/* f0553f4: 0fc24216 */ jal countdownTimerSetValue /* f0553f8: 00000000 */ sll $zero,$zero,0x0 /* f0553fc: 3c03800a */ lui $v1,0x800a /* f055400: 24639fc0 */ addiu $v1,$v1,-24640 diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index ee44af449..44fa6e535 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -54857,12 +54857,10 @@ glabel func0f090844 /* f090854: 01c01025 */ or $v0,$t6,$zero ); -GLOBAL_ASM( -glabel func0f090858 -/* f090858: 3c018007 */ lui $at,0x8007 -/* f09085c: 03e00008 */ jr $ra -/* f090860: e42c990c */ swc1 $f12,-0x66f4($at) -); +void countdownTimerSetValue(float seconds) +{ + g_CountdownTimerValue = seconds; +} GLOBAL_ASM( glabel func0f090864 diff --git a/src/include/setup/setup_000000.h b/src/include/setup/setup_000000.h index 5da776e20..083bb8690 100644 --- a/src/include/setup/setup_000000.h +++ b/src/include/setup/setup_000000.h @@ -24,6 +24,7 @@ extern u32 var80067b30; extern u32 var80067b78; extern u32 g_CountdownTimerVisible; extern bool g_CountdownTimerRunning; +extern float g_CountdownTimerValue; extern u32 g_StageFlags; extern struct audiodefinition audiodefinitions[]; diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index 5e5cee394..5b7221fe3 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -14960,8 +14960,8 @@ u32 var80069900 = 0x00000000; u32 g_CountdownTimerVisible = 1; // 80069904 bool g_CountdownTimerRunning = false; // 80069908 +float g_CountdownTimerValue = 0; // 8006990c -u32 var8006990c = 0x00000000; u32 var80069910 = 0x00000000; u32 var80069914 = 0x00000000; u32 var80069918 = 0x00000000;