Decompile menuhandlerReplayPreviousMission
This commit is contained in:
parent
1d307048c0
commit
c43a30b87b
|
|
@ -1743,7 +1743,7 @@ s32 menuhandlerSoloDifficulty(u32 operation, struct menu_item *item, s32 *value)
|
|||
{
|
||||
switch (operation) {
|
||||
case MENUOP_CHECKPREFOCUSED:
|
||||
if (isStageDifficultyUnlocked(g_MissionConfig.unk02, item->param)) {
|
||||
if (isStageDifficultyUnlocked(g_MissionConfig.stageindex, item->param)) {
|
||||
if (item->right == 0) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1760,7 +1760,7 @@ s32 menuhandlerSoloDifficulty(u32 operation, struct menu_item *item, s32 *value)
|
|||
menuPushDialog(&g_ObjectivesMenuDialog);
|
||||
break;
|
||||
case MENUOP_CHECKDISABLED:
|
||||
if (!isStageDifficultyUnlocked(g_MissionConfig.unk02, item->param)) {
|
||||
if (!isStageDifficultyUnlocked(g_MissionConfig.stageindex, item->param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2250,7 +2250,7 @@ s32 menuhandlerCoopDifficulty(u32 operation, struct menu_item *item, s32 *value)
|
|||
menuPushDialog(&g_CoopOptionsMenuDialog);
|
||||
break;
|
||||
case MENUOP_CHECKDISABLED:
|
||||
if (!isStageDifficultyUnlocked(g_MissionConfig.unk02, item->param)) {
|
||||
if (!isStageDifficultyUnlocked(g_MissionConfig.stageindex, item->param)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,34 +290,15 @@ glabel func0f10cf2c
|
|||
/* f10cfe0: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel menuhandlerReplyPreviousMission
|
||||
/* f10cfe4: 27bdffe8 */ addiu $sp,$sp,-24
|
||||
/* f10cfe8: 24010006 */ addiu $at,$zero,0x6
|
||||
/* f10cfec: afbf0014 */ sw $ra,0x14($sp)
|
||||
/* f10cff0: 1481000e */ bne $a0,$at,.L0f10d02c
|
||||
/* f10cff4: afa5001c */ sw $a1,0x1c($sp)
|
||||
/* f10cff8: 3c02800a */ lui $v0,%hi(g_MissionConfig)
|
||||
/* f10cffc: 2442dfe8 */ addiu $v0,$v0,%lo(g_MissionConfig)
|
||||
/* f10d000: 904e0002 */ lbu $t6,0x2($v0)
|
||||
/* f10d004: 3c088007 */ lui $t0,0x8007
|
||||
/* f10d008: 25cfffff */ addiu $t7,$t6,-1
|
||||
/* f10d00c: 31f800ff */ andi $t8,$t7,0xff
|
||||
/* f10d010: 0018c880 */ sll $t9,$t8,0x2
|
||||
/* f10d014: 0338c823 */ subu $t9,$t9,$t8
|
||||
/* f10d018: 0019c880 */ sll $t9,$t9,0x2
|
||||
/* f10d01c: a04f0002 */ sb $t7,0x2($v0)
|
||||
/* f10d020: 01194021 */ addu $t0,$t0,$t9
|
||||
/* f10d024: 8d081e6c */ lw $t0,0x1e6c($t0)
|
||||
/* f10d028: a0480001 */ sb $t0,0x1($v0)
|
||||
.L0f10d02c:
|
||||
/* f10d02c: 0fc40cfe */ jal menuhandlerAcceptMission
|
||||
/* f10d030: 00002825 */ or $a1,$zero,$zero
|
||||
/* f10d034: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* f10d038: 27bd0018 */ addiu $sp,$sp,0x18
|
||||
/* f10d03c: 03e00008 */ jr $ra
|
||||
/* f10d040: 00000000 */ sll $zero,$zero,0x0
|
||||
);
|
||||
s32 menuhandlerReplayPreviousMission(u32 operation, struct menu_item *item, s32 *value)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
g_MissionConfig.stageindex--;
|
||||
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stage_id;
|
||||
}
|
||||
|
||||
return menuhandlerAcceptMission(operation, NULL, value);
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f10d044
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ char *menutextDifficulty(s32 arg0);
|
|||
s32 func0f102330(u32 operation, struct menu_item *item, s32 *value, s32 arg3);
|
||||
u32 func0f103550(void);
|
||||
f32 func0f1036ac(s32 arg0, s32 arg1);
|
||||
bool isStageDifficultyUnlocked(s32 stagenum, s32 difficulty);
|
||||
bool isStageDifficultyUnlocked(s32 stageindex, s32 difficulty);
|
||||
u32 func0f103e68(void);
|
||||
u32 func0f10408c(void);
|
||||
u32 func0f104664(void);
|
||||
|
|
|
|||
|
|
@ -58,6 +58,6 @@ 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 menuhandlerReplyPreviousMission(u32, u32, u32 *);
|
||||
s32 menuhandlerReplayPreviousMission(u32 operation, struct menu_item *item, s32 *value);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3985,7 +3985,7 @@ struct missionconfig {
|
|||
u8 pdmode : 1;
|
||||
|
||||
/*0x01*/ u8 stagenum;
|
||||
/*0x02*/ u8 unk02;
|
||||
/*0x02*/ u8 stageindex;
|
||||
|
||||
u8 iscoop : 1;
|
||||
u8 isanti : 1;
|
||||
|
|
|
|||
|
|
@ -3924,7 +3924,7 @@ struct menu_item menuitems_promptnextmission[] = {
|
|||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, 0x0000572a, 0x00000000, menuhandlerAcceptMission }, // "Accept"
|
||||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, 0x0000572b, 0x00000000, menuhandlerDeclineMission }, // "Decline"
|
||||
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, 0x000059d6, 0x00000000, menuhandlerReplyPreviousMission }, // "Replay Previous Mission"
|
||||
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, 0x000059d6, 0x00000000, menuhandlerReplayPreviousMission }, // "Replay Previous Mission"
|
||||
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue