From 299f7d5c7f15a0cc6038dcedc267cab2c7a58e89 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 3 Mar 2020 18:34:22 +1000 Subject: [PATCH] Decompile menutextMatchTime --- src/game/data/data_020df0.c | 2 +- src/game/game_177e00.c | 22 +++++----------------- src/include/game/game_177e00.h | 2 +- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index 4c0b63aaa..48d091b4b 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -10072,7 +10072,7 @@ struct menu_item menuitems_2a6cc[] = { { MENUITEMTYPE_LABEL, 1, 0x00000200, 0x000054a3, (u32)&func0f178050, menuhandlerMpInGameLimitLabel }, // "Score Limit:" { MENUITEMTYPE_LABEL, 2, 0x00000200, 0x000054a4, (u32)&func0f178050, menuhandlerMpInGameLimitLabel }, // "Team Score Limit:" { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000082, 0x00000000, NULL }, - { MENUITEMTYPE_LABEL, 0, 0x00000000, 0x0000511e, (u32)&func0f1782f8, NULL }, // "Game Time:" + { MENUITEMTYPE_LABEL, 0, 0x00000000, 0x0000511e, (u32)&menutextMatchTime, NULL }, // "Game Time:" { MENUITEMTYPE_SELECTABLE, 1, 0x00000020, (u32)&menutextPauseOrUnpause, 0x00000000, menuhandlerMpPause }, { MENUITEMTYPE_SELECTABLE, 0, 0x00000024, 0x0000511f, 0x00000000, &menudialog_mpendgame }, // "End Game" { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, diff --git a/src/game/game_177e00.c b/src/game/game_177e00.c index ab8b69746..cbf0b0540 100644 --- a/src/game/game_177e00.c +++ b/src/game/game_177e00.c @@ -292,23 +292,11 @@ char *menutextPauseOrUnpause(s32 arg0) return langGet(0x5120); // "Pause" } -GLOBAL_ASM( -glabel func0f1782f8 -/* f1782f8: 27bdffe8 */ addiu $sp,$sp,-24 -/* f1782fc: afbf0014 */ sw $ra,0x14($sp) -/* f178300: 0fc5b37e */ jal mpGetMatchTime -/* f178304: afa40018 */ sw $a0,0x18($sp) -/* f178308: 3c048007 */ lui $a0,0x8007 -/* f17830c: 8c841440 */ lw $a0,0x1440($a0) -/* f178310: 00402825 */ or $a1,$v0,$zero -/* f178314: 0fc355f8 */ jal formatTime -/* f178318: 24060003 */ addiu $a2,$zero,0x3 -/* f17831c: 8fbf0014 */ lw $ra,0x14($sp) -/* f178320: 3c028007 */ lui $v0,0x8007 -/* f178324: 8c421440 */ lw $v0,0x1440($v0) -/* f178328: 03e00008 */ jr $ra -/* f17832c: 27bd0018 */ addiu $sp,$sp,0x18 -); +char *menutextMatchTime(s32 arg0) +{ + formatTime(g_StringPointer, mpGetMatchTime(), 3); + return g_StringPointer; +} GLOBAL_ASM( glabel func0f178330 diff --git a/src/include/game/game_177e00.h b/src/include/game/game_177e00.h index 46f7f3935..3313ab1c4 100644 --- a/src/include/game/game_177e00.h +++ b/src/include/game/game_177e00.h @@ -6,7 +6,7 @@ s32 menuhandler00177e00(u32, u32, u32 *); u32 func0f178050(void); char *menutextPauseOrUnpause(s32 arg0); -u32 func0f1782f8(void); +char *menutextMatchTime(s32 arg0); u32 func0f178330(void); u32 func0f1783a0(void); u32 func0f178450(void);