From bb26a1d7e299f210b6ad6c6dcb93e0d37c965358 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 3 Jan 2020 22:11:12 +1000 Subject: [PATCH] Decompile menuhandlerMpDropOut --- src/game/game_176d70.c | 28 +++++++++------------------- src/include/game/game_176d70.h | 2 +- src/setup/setup_020df0.c | 2 +- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/game/game_176d70.c b/src/game/game_176d70.c index 733145156..7206c3837 100644 --- a/src/game/game_176d70.c +++ b/src/game/game_176d70.c @@ -2996,25 +2996,15 @@ glabel func0f178ef0 /* f17905c: 00000000 */ sll $zero,$zero,0x0 ); -GLOBAL_ASM( -glabel menuhandler00179060 -/* f179060: 27bdffe8 */ addiu $sp,$sp,-24 -/* f179064: 24010006 */ addiu $at,$zero,0x6 -/* f179068: afbf0014 */ sw $ra,0x14($sp) -/* f17906c: afa5001c */ sw $a1,0x1c($sp) -/* f179070: 14810005 */ bne $a0,$at,.L0f179088 -/* f179074: afa60020 */ sw $a2,0x20($sp) -/* f179078: 0fc3cdb7 */ jal menuPopDialog -/* f17907c: 00000000 */ sll $zero,$zero,0x0 -/* f179080: 0fc3cdb7 */ jal menuPopDialog -/* f179084: 00000000 */ sll $zero,$zero,0x0 -.L0f179088: -/* f179088: 8fbf0014 */ lw $ra,0x14($sp) -/* f17908c: 27bd0018 */ addiu $sp,$sp,0x18 -/* f179090: 00001025 */ or $v0,$zero,$zero -/* f179094: 03e00008 */ jr $ra -/* f179098: 00000000 */ sll $zero,$zero,0x0 -); +s32 menuhandlerMpDropOut(u32 operation, struct menu_item *item, s32 *value) +{ + if (operation == MENUOP_SET) { + menuPopDialog(); + menuPopDialog(); + } + + return 0; +} GLOBAL_ASM( glabel func0f17909c diff --git a/src/include/game/game_176d70.h b/src/include/game/game_176d70.h index a4be9e5ba..1266acee0 100644 --- a/src/include/game/game_176d70.h +++ b/src/include/game/game_176d70.h @@ -188,7 +188,7 @@ s32 menuhandler001785c4(u32, u32, u32 *); s32 menuhandler001786d8(u32, u32, u32 *); s32 menuhandler00178a94(u32, u32, u32 *); s32 menuhandler00178bf4(u32, u32, u32 *); -s32 menuhandler00179060(u32, u32, u32 *); +s32 menuhandlerMpDropOut(u32 operation, struct menu_item *item, s32 *value); s32 menuhandlerMpTeamsLabel(u32 operation, struct menu_item *item, s32 *value); s32 menuhandler001791c8(u32, u32, u32 *); s32 menuhandler00179634(u32, u32, u32 *); diff --git a/src/setup/setup_020df0.c b/src/setup/setup_020df0.c index 19287b682..ecf244c89 100644 --- a/src/setup/setup_020df0.c +++ b/src/setup/setup_020df0.c @@ -10275,7 +10275,7 @@ u32 var80084b2c = 0x00000000; // 2ab50 struct menu_item menuitems_2ab50[] = { { MENUITEMTYPE_LABEL, 0, 0x00000010, 0x000050c4, 0x00000000, NULL }, // "Are you sure you want to drop out?" - { MENUITEMTYPE_SELECTABLE, 0, 0x00000000, 0x000050c5, 0x00000000, menuhandler00179060 }, // "Drop Out" + { MENUITEMTYPE_SELECTABLE, 0, 0x00000000, 0x000050c5, 0x00000000, menuhandlerMpDropOut }, // "Drop Out" { MENUITEMTYPE_SELECTABLE, 0, 0x00000008, 0x000050c6, 0x00000000, NULL }, // "Cancel" { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, };