diff --git a/src/game/game_10ccd0.c b/src/game/game_10ccd0.c index 269f48c52..925818e05 100644 --- a/src/game/game_10ccd0.c +++ b/src/game/game_10ccd0.c @@ -910,35 +910,15 @@ glabel func0f10d770 /* f10d878: 27bd0020 */ addiu $sp,$sp,0x20 ); -GLOBAL_ASM( -glabel menuhandlerReplyLastLevel -/* f10d87c: 27bdffe8 */ addiu $sp,$sp,-24 -/* f10d880: 24010006 */ addiu $at,$zero,0x6 -/* f10d884: afbf0014 */ sw $ra,0x14($sp) -/* f10d888: 1481000f */ bne $a0,$at,.L0f10d8c8 -/* f10d88c: afa5001c */ sw $a1,0x1c($sp) -/* f10d890: 3c02800a */ lui $v0,%hi(g_MissionConfig) -/* f10d894: 2442dfe8 */ addiu $v0,$v0,%lo(g_MissionConfig) -/* f10d898: 904e0002 */ lbu $t6,0x2($v0) -/* f10d89c: 3c188007 */ lui $t8,0x8007 -/* f10d8a0: 00002825 */ or $a1,$zero,$zero -/* f10d8a4: 000e7880 */ sll $t7,$t6,0x2 -/* f10d8a8: 01ee7823 */ subu $t7,$t7,$t6 -/* f10d8ac: 000f7880 */ sll $t7,$t7,0x2 -/* f10d8b0: 030fc021 */ addu $t8,$t8,$t7 -/* f10d8b4: 8f181e6c */ lw $t8,0x1e6c($t8) -/* f10d8b8: 0fc40cfe */ jal menuhandlerAcceptMission -/* f10d8bc: a0580001 */ sb $t8,0x1($v0) -/* f10d8c0: 10000003 */ beqz $zero,.L0f10d8d0 -/* f10d8c4: 8fbf0014 */ lw $ra,0x14($sp) -.L0f10d8c8: -/* f10d8c8: 00001025 */ or $v0,$zero,$zero -/* f10d8cc: 8fbf0014 */ lw $ra,0x14($sp) -.L0f10d8d0: -/* f10d8d0: 27bd0018 */ addiu $sp,$sp,0x18 -/* f10d8d4: 03e00008 */ jr $ra -/* f10d8d8: 00000000 */ sll $zero,$zero,0x0 -); +s32 menuhandlerReplayLastLevel(u32 operation, struct menu_item *item, s32 *value) +{ + if (operation == MENUOP_SET) { + g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stage_id; + return menuhandlerAcceptMission(operation, NULL, value); + } + + return 0; +} GLOBAL_ASM( glabel menuhandlerContinueToCredits diff --git a/src/include/game/game_10ccd0.h b/src/include/game/game_10ccd0.h index b0717552d..b567152db 100644 --- a/src/include/game/game_10ccd0.h +++ b/src/include/game/game_10ccd0.h @@ -57,7 +57,7 @@ s32 menudialog0010de58(u32, u32, u32 *); s32 menuhandlerDeclineMission(u32 operation, struct menu_item *item, s32 *value); s32 menuhandler0010e064(u32, u32, u32 *); s32 menuhandlerContinueToCredits(u32, u32, u32 *); -s32 menuhandlerReplyLastLevel(u32, u32, u32 *); +s32 menuhandlerReplayLastLevel(u32 operation, struct menu_item *item, s32 *value); s32 menuhandlerReplayPreviousMission(u32 operation, struct menu_item *item, s32 *value); #endif diff --git a/src/setup/setup_0160b0.c b/src/setup/setup_0160b0.c index 1b31ee79c..b5180e03b 100644 --- a/src/setup/setup_0160b0.c +++ b/src/setup/setup_0160b0.c @@ -3997,7 +3997,7 @@ struct menu_dialog menudialog_1b750 = { // 1b768 struct menu_item menuitems_1b768[] = { { MENUITEMTYPE_SELECTABLE, 0, 0x00000020, 0x000054f4, 0x00000000, menuhandlerContinueToCredits }, // "Continue" - { MENUITEMTYPE_SELECTABLE, 0, 0x00000020, 0x000054f5, 0x00000000, menuhandlerReplyLastLevel }, // "Replay Last Level" + { MENUITEMTYPE_SELECTABLE, 0, 0x00000020, 0x000054f5, 0x00000000, menuhandlerReplayLastLevel }, // "Replay Last Level" { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, };