From 5b2e61bcfe762d80fd059e049fcdcb6f924623f0 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 1 Jan 2020 21:22:30 +1000 Subject: [PATCH] Decompile menuhandlerMpEndGame --- src/game/game_176d70.c | 29 +++++++++-------------------- src/include/game/game_176d70.h | 2 +- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/game/game_176d70.c b/src/game/game_176d70.c index ab82779be..e22fdb4d7 100644 --- a/src/game/game_176d70.c +++ b/src/game/game_176d70.c @@ -1798,26 +1798,15 @@ glabel menuhandler00177e00 /* f177fd4: 00000000 */ sll $zero,$zero,0x0 ); -GLOBAL_ASM( -glabel menuhandlerMpEndGame -/* f177fd8: 27bdffe8 */ addiu $sp,$sp,-24 -/* f177fdc: 24010006 */ addiu $at,$zero,0x6 -/* f177fe0: afbf0014 */ sw $ra,0x14($sp) -/* f177fe4: afa5001c */ sw $a1,0x1c($sp) -/* f177fe8: 14810006 */ bne $a0,$at,.L0f178004 -/* f177fec: afa60020 */ sw $a2,0x20($sp) -/* f177ff0: 3c0f800a */ lui $t7,0x800a -/* f177ff4: 8defa244 */ lw $t7,-0x5dbc($t7) -/* f177ff8: 240e0001 */ addiu $t6,$zero,0x1 -/* f177ffc: 0c0039a1 */ jal func0000e684 -/* f178000: adee048c */ sw $t6,0x48c($t7) -.L0f178004: -/* f178004: 8fbf0014 */ lw $ra,0x14($sp) -/* f178008: 27bd0018 */ addiu $sp,$sp,0x18 -/* f17800c: 00001025 */ or $v0,$zero,$zero -/* f178010: 03e00008 */ jr $ra -/* f178014: 00000000 */ sll $zero,$zero,0x0 -); +s32 menuhandlerMpEndGame(u32 operation, struct menu_item *item, s32 *value) +{ + if (operation == MENUOP_SET) { + g_Vars.currentplayer->aborted = true; + func0000e684(); + } + + return 0; +} GLOBAL_ASM( glabel menuhandler00178018 diff --git a/src/include/game/game_176d70.h b/src/include/game/game_176d70.h index 40584bf10..0711fda80 100644 --- a/src/include/game/game_176d70.h +++ b/src/include/game/game_176d70.h @@ -229,7 +229,7 @@ s32 menuhandlerMpControlCheckbox(u32, u32, u32 *); s32 menuhandlerMpControlStyle(u32, u32, u32 *); s32 menuhandlerMpDeleteSimulant(u32, u32, u32 *); s32 menuhandlerMpDisplayTeam(u32, u32, u32 *); -s32 menuhandlerMpEndGame(u32, u32, u32 *); +s32 menuhandlerMpEndGame(u32 operation, struct menu_item *item, s32 *value); s32 menuhandlerMpFinishedSetup(u32, u32, u32 *); s32 menuhandlerMpFourTeams(u32 operation, struct menu_item *item, s32 *value); s32 menuhandlerMpHandicapPlayer(u32, u32, u32 *);