1668 lines
58 KiB
C
1668 lines
58 KiB
C
#include <ultra64.h>
|
|
#include "constants.h"
|
|
#include "game/cheats.h"
|
|
#include "game/data/data_000000.h"
|
|
#include "game/data/data_0083d0.h"
|
|
#include "game/data/data_00e460.h"
|
|
#include "game/data/data_0160b0.h"
|
|
#include "game/data/data_01a3a0.h"
|
|
#include "game/data/data_020df0.h"
|
|
#include "game/data/data_02da90.h"
|
|
#include "game/game_005fd0.h"
|
|
#include "game/title.h"
|
|
#include "game/game_01b0a0.h"
|
|
#include "game/game_095320.h"
|
|
#include "game/game_097ba0.h"
|
|
#include "game/game_0b0420.h"
|
|
#include "game/game_0b63b0.h"
|
|
#include "game/game_0d4690.h"
|
|
#include "game/game_0e0770.h"
|
|
#include "game/game_0f09f0.h"
|
|
#include "game/game_102240.h"
|
|
#include "game/game_107fb0.h"
|
|
#include "game/endscreen.h"
|
|
#include "game/game_1655c0.h"
|
|
#include "game/game_167ae0.h"
|
|
#include "game/game_177e00.h"
|
|
#include "game/game_19aa80.h"
|
|
#include "game/gamefile.h"
|
|
#include "game/lang.h"
|
|
#include "game/pdoptions.h"
|
|
#include "gvars/gvars.h"
|
|
#include "lib/lib_09660.h"
|
|
#include "lib/lib_0d520.h"
|
|
#include "lib/lib_13130.h"
|
|
#include "types.h"
|
|
|
|
s32 menuhandlerDeclineMission(u32 operation, struct menuitem *item, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_SET) {
|
|
menuPopDialog();
|
|
menuPopDialog();
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
s32 menudialogRetryMission(u32 operation, struct menudialog *dialog, union handlerdata *data)
|
|
{
|
|
switch (operation) {
|
|
case MENUOP_TICK:
|
|
{
|
|
/**
|
|
* NTSC Final adds this check to make sure the given dialog is
|
|
* either the one being displayed or its sibling. This most likely
|
|
* fixes a bug - perhaps there is some way that this handler is run
|
|
* when the dialog is not on screen?
|
|
*/
|
|
#if VERSION >= VERSION_NTSC_FINAL
|
|
if (g_Menus[g_MpPlayerNum].curframe) {
|
|
if (dialog == g_Menus[g_MpPlayerNum].curframe->dialog
|
|
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
|
|
#endif
|
|
struct menuthing *thing = data->dialog2.ptr;
|
|
bool pass = false;
|
|
|
|
if (thing->back) {
|
|
menuPopDialog();
|
|
menuPopDialog();
|
|
}
|
|
|
|
thing->back = false;
|
|
|
|
if (thing->start) {
|
|
pass = true;
|
|
}
|
|
|
|
thing->start = false;
|
|
|
|
if (thing->forward
|
|
&& g_Menus[g_MpPlayerNum].curframe
|
|
&& dialog->nextsibling
|
|
&& dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog) {
|
|
pass = true;
|
|
thing->forward = false;
|
|
}
|
|
|
|
if (pass) {
|
|
union handlerdata data2;
|
|
menuhandlerAcceptMission(MENUOP_SET, &dialog->items[1], &data2);
|
|
}
|
|
#if VERSION >= VERSION_NTSC_FINAL
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
|
|
menudialog00103608(operation, dialog, data);
|
|
}
|
|
|
|
char *menuDialogTitleRetryStageName(struct menudialog *dialog)
|
|
{
|
|
char *name;
|
|
char *prefix;
|
|
|
|
if (g_Menus[g_MpPlayerNum].curframe->dialog != dialog) {
|
|
return langGet(L_OPTIONS(300)); // "Objectives"
|
|
}
|
|
|
|
prefix = langGet(L_OPTIONS(296)); // "Retry"
|
|
name = langGet(g_StageNames[g_MissionConfig.stageindex].name3);
|
|
|
|
sprintf(g_StringPointer, "%s: %s\n", prefix, name);
|
|
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *menuDialogTitleNextMissionStageName(struct menudialog *dialog)
|
|
{
|
|
char *name;
|
|
char *prefix;
|
|
|
|
if (g_Menus[g_MpPlayerNum].curframe->dialog != dialog) {
|
|
return langGet(L_OPTIONS(300)); // "Objectives"
|
|
}
|
|
|
|
prefix = langGet(L_OPTIONS(297)); // "Next Mission"
|
|
name = langGet(g_StageNames[g_MissionConfig.stageindex].name3);
|
|
|
|
sprintf(g_StringPointer, "%s: %s\n", prefix, name);
|
|
|
|
return g_StringPointer;
|
|
}
|
|
|
|
s32 menuhandlerReplayPreviousMission(u32 operation, struct menuitem *item, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_SET) {
|
|
g_MissionConfig.stageindex--;
|
|
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
|
|
}
|
|
|
|
return menuhandlerAcceptMission(operation, NULL, data);
|
|
}
|
|
|
|
struct menuitem g_MenuItemsRetryMission[] = {
|
|
{ MENUITEMTYPE_OBJECTIVES, 1, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_OPTIONS(298), 0x00000000, menuhandlerAcceptMission }, // "Accept"
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_OPTIONS(299), 0x00000000, menuhandlerDeclineMission }, // "Decline"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
struct menudialog g_MenuDialogRetryMission = {
|
|
MENUDIALOGTYPE_DEFAULT,
|
|
(u32)&menuDialogTitleRetryStageName,
|
|
g_MenuItemsRetryMission,
|
|
menudialogRetryMission,
|
|
0x0000000c,
|
|
&menudialog_briefing,
|
|
};
|
|
|
|
struct menuitem g_MenuItemsPromptNextMission[] = {
|
|
{ MENUITEMTYPE_OBJECTIVES, 1, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_OPTIONS(298), 0x00000000, menuhandlerAcceptMission }, // "Accept"
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_OPTIONS(299), 0x00000000, menuhandlerDeclineMission }, // "Decline"
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_MISC(470), 0x00000000, menuhandlerReplayPreviousMission }, // "Replay Previous Mission"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
struct menudialog g_MenuDialogPromptNextMission = {
|
|
MENUDIALOGTYPE_DEFAULT,
|
|
(u32)&menuDialogTitleNextMissionStageName,
|
|
g_MenuItemsPromptNextMission,
|
|
menudialogRetryMission,
|
|
0x0000000c,
|
|
&menudialog_briefing,
|
|
};
|
|
|
|
char *soloMenuTextNumKills(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%d", currentPlayerGetNumKills());
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextNumShots(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%d", currentPlayerGetShotCount(SHOTCOUNT_TOTAL));
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextNumHeadShots(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%d", currentPlayerGetShotCount(SHOTCOUNT_HEAD));
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextNumBodyShots(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%d", currentPlayerGetShotCount(SHOTCOUNT_BODY));
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextNumLimbShots(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%d", currentPlayerGetShotCount(SHOTCOUNT_LIMB));
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextNumOtherShots(struct menuitem *item)
|
|
{
|
|
u32 total = currentPlayerGetShotCount(SHOTCOUNT_GUN) + currentPlayerGetShotCount(SHOTCOUNT_5);
|
|
sprintf(g_StringPointer, "%d", total);
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextAccuracy(struct menuitem *item)
|
|
{
|
|
s32 total = currentPlayerGetShotCount(SHOTCOUNT_TOTAL);
|
|
s32 numhead = currentPlayerGetShotCount(SHOTCOUNT_HEAD);
|
|
s32 numbody = currentPlayerGetShotCount(SHOTCOUNT_BODY);
|
|
s32 numlimb = currentPlayerGetShotCount(SHOTCOUNT_LIMB);
|
|
s32 numgun = currentPlayerGetShotCount(SHOTCOUNT_GUN);
|
|
s32 num5 = currentPlayerGetShotCount(SHOTCOUNT_5);
|
|
s32 numobject = currentPlayerGetShotCount(SHOTCOUNT_OBJECT);
|
|
f32 accuracy;
|
|
|
|
if (total > 0) {
|
|
s32 hits = numhead + numbody + numlimb + numgun + num5 + numobject;
|
|
accuracy = hits * 100.0f / total;
|
|
} else {
|
|
accuracy = 0;
|
|
}
|
|
|
|
if (accuracy > 100.0f) {
|
|
accuracy = 100.0f;
|
|
}
|
|
|
|
sprintf(g_StringPointer, "%s%s%.1f%%", "", "", accuracy);
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextMissionStatus(struct menuitem *item)
|
|
{
|
|
if (g_CheatsActiveBank0 || g_CheatsActiveBank1) {
|
|
return langGet(L_MPWEAPONS(135)); // "Cheated"
|
|
}
|
|
|
|
if (g_Vars.coopplayernum >= 0) {
|
|
if (g_Vars.bond->aborted || g_Vars.coop->aborted) {
|
|
return langGet(L_OPTIONS(295)); // "Aborted"
|
|
}
|
|
|
|
if (g_Vars.bond->isdead && g_Vars.coop->isdead) {
|
|
return langGet(L_OPTIONS(293)); // "Failed"
|
|
}
|
|
} else if (g_Vars.antiplayernum >= 0) {
|
|
if (g_Vars.currentplayer == g_Vars.bond) {
|
|
if (g_Vars.bond->aborted) {
|
|
return langGet(L_OPTIONS(295)); // "Aborted"
|
|
}
|
|
|
|
if (g_Vars.anti->aborted) {
|
|
return langGet(L_OPTIONS(295)); // "Aborted"
|
|
}
|
|
|
|
if (g_Vars.bond->isdead) {
|
|
return langGet(L_OPTIONS(293)); // "Failed"
|
|
}
|
|
} else {
|
|
if (g_Vars.anti->aborted) {
|
|
return langGet(L_OPTIONS(295)); // "Aborted"
|
|
}
|
|
|
|
if (!g_Vars.bond->aborted && !g_Vars.bond->isdead) {
|
|
return langGet(L_OPTIONS(293)); // "Failed"
|
|
}
|
|
}
|
|
} else {
|
|
if (g_Vars.bond->aborted) {
|
|
return langGet(L_OPTIONS(295)); // "Aborted"
|
|
}
|
|
|
|
if (g_Vars.bond->isdead) {
|
|
return langGet(L_OPTIONS(293)); // "Failed"
|
|
}
|
|
}
|
|
|
|
if (objectiveIsAllComplete() == false) {
|
|
return langGet(L_OPTIONS(293)); // "Failed"
|
|
}
|
|
|
|
if (g_StageIndex == STAGEINDEX_DEFENSE) {
|
|
return langGet(L_MPWEAPONS(62)); // "Unknown"
|
|
}
|
|
|
|
return langGet(L_OPTIONS(294)); // "Completed"
|
|
}
|
|
|
|
char *soloMenuTextAgentStatus(struct menuitem *item)
|
|
{
|
|
if (g_CheatsActiveBank0 || g_CheatsActiveBank1) {
|
|
return langGet(L_MPWEAPONS(134)); // "Dishonored"
|
|
}
|
|
|
|
if (g_Vars.currentplayer->aborted) {
|
|
return langGet(L_OPTIONS(292)); // "Disavowed"
|
|
}
|
|
|
|
if (g_Vars.currentplayer->isdead) {
|
|
return langGet(L_OPTIONS(290)); // "Deceased"
|
|
}
|
|
|
|
if (g_StageIndex == STAGEINDEX_DEFENSE) {
|
|
return langGet(L_MPWEAPONS(63)); // "Missing"
|
|
}
|
|
|
|
return langGet(L_OPTIONS(291)); // "Active"
|
|
}
|
|
|
|
char *menuTitleStageCompleted(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%s: %s\n",
|
|
langGet(g_StageNames[g_Menus[g_MpPlayerNum].data.endscreen.stageindex].name3),
|
|
langGet(L_OPTIONS(276))); // "Completed"
|
|
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *menuTextCurrentStageName3(struct menuitem *item)
|
|
{
|
|
char *name = langGet(g_StageNames[g_MissionConfig.stageindex].name3);
|
|
sprintf(g_StringPointer, "%s\n", name);
|
|
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *menuTitleStageFailed(struct menuitem *item)
|
|
{
|
|
sprintf(g_StringPointer, "%s: %s\n",
|
|
langGet(g_StageNames[g_MissionConfig.stageindex].name3),
|
|
langGet(L_OPTIONS(277))); // "Failed"
|
|
|
|
return g_StringPointer;
|
|
}
|
|
|
|
char *soloMenuTextMissionTime(struct menuitem *item)
|
|
{
|
|
formatTime(g_StringPointer, getMissionTime(), 3);
|
|
strcat(g_StringPointer, "\n");
|
|
|
|
return g_StringPointer;
|
|
}
|
|
|
|
struct menudialog *func0f10d730(void)
|
|
{
|
|
g_MissionConfig.stageindex++;
|
|
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
|
|
|
|
return &g_MenuDialogPromptNextMission;
|
|
}
|
|
|
|
void func0f10d770(void)
|
|
{
|
|
func0f0f8bb4(&g_Menus[0].unk840, func0f09ddfc() - func0f0e4fe0(), 0);
|
|
g_Menus[0].unk844 = func0f09ddec() + func0f0e4fe0();
|
|
|
|
func0f0f8bb4(&g_Menus[1].unk840, func0f09ddfc() - func0f0e4fe0(), 0);
|
|
g_Menus[1].unk844 = func0f09ddec() + func0f0e4fe0();
|
|
|
|
func0f0f8bb4(&g_Menus[2].unk840, func0f09ddfc() - func0f0e4fe0(), 0);
|
|
g_Menus[2].unk844 = func0f09ddec() + func0f0e4fe0();
|
|
|
|
func0f0f8bb4(&g_Menus[3].unk840, func0f09ddfc() - func0f0e4fe0(), 0);
|
|
g_Menus[3].unk844 = func0f09ddec() + func0f0e4fe0();
|
|
}
|
|
|
|
s32 menuhandlerReplayLastLevel(u32 operation, struct menuitem *item, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_SET) {
|
|
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
|
|
return menuhandlerAcceptMission(operation, NULL, data);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
struct menuitem g_MenuItemsSolo2PObjectivesNarrow[] = {
|
|
{ MENUITEMTYPE_OBJECTIVES, 2, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000020, L_OPTIONS(301), 0x00000000, NULL }, // "Press START"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
struct menuitem g_MenuItemsSolo2PObjectivesWide[] = {
|
|
{ MENUITEMTYPE_OBJECTIVES, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000020, L_OPTIONS(301), 0x00000000, NULL }, // "Press START"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
struct menudialog g_MenuDialogObjectivesFailedWide = {
|
|
MENUDIALOGTYPE_DANGER,
|
|
L_OPTIONS(300), // "Objectives"
|
|
g_MenuItemsSolo2PObjectivesWide,
|
|
soloMenuDialogPauseStatus,
|
|
0x00000048,
|
|
NULL,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogObjectivesCompletedWide = {
|
|
MENUDIALOGTYPE_SUCCESS,
|
|
L_OPTIONS(300), // "Objectives"
|
|
g_MenuItemsSolo2PObjectivesWide,
|
|
soloMenuDialogPauseStatus,
|
|
0x00000048,
|
|
NULL,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogObjectivesFailedNarrow = {
|
|
MENUDIALOGTYPE_DANGER,
|
|
L_OPTIONS(300), // "Objectives"
|
|
g_MenuItemsSolo2PObjectivesNarrow,
|
|
soloMenuDialogPauseStatus,
|
|
0x00000048,
|
|
NULL,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogObjectivesCompletedNarrow = {
|
|
MENUDIALOGTYPE_SUCCESS,
|
|
L_OPTIONS(300), // "Objectives"
|
|
g_MenuItemsSolo2PObjectivesNarrow,
|
|
soloMenuDialogPauseStatus,
|
|
0x00000048,
|
|
NULL,
|
|
};
|
|
|
|
|
|
/**
|
|
* Displayed after Defense and Skedar Ruins completion screens.
|
|
*/
|
|
s32 menuhandlerContinueMission(u32 operation, struct menuitem *item, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_SET) {
|
|
endscreenHandleContinue(2);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
struct menuitem g_MenuItemsContinueOrReplay[] = {
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000020, L_MPWEAPONS(244), 0x00000000, menuhandlerContinueMission }, // "Continue"
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000020, L_MPWEAPONS(245), 0x00000000, menuhandlerReplayLastLevel }, // "Replay Last Level"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
struct menudialog g_MenuDialogContinueOrReplay = {
|
|
MENUDIALOGTYPE_DEFAULT,
|
|
(u32)&menuTextCurrentStageName3,
|
|
g_MenuItemsContinueOrReplay,
|
|
NULL,
|
|
0x00000004,
|
|
NULL,
|
|
};
|
|
|
|
/**
|
|
* Context is:
|
|
*
|
|
* 0 when closing a completed endscreen
|
|
* 1 unsure - is invoked directly by menuTickAll
|
|
* 2 when pressing continue
|
|
*/
|
|
void endscreenHandleContinue(s32 context)
|
|
{
|
|
if (g_Vars.antiplayernum >= 0) {
|
|
menuPopDialog();
|
|
} else if (g_Vars.coopplayernum >= 0 && PLAYERCOUNT() >= 2 && context == 0) {
|
|
menuPopDialog();
|
|
} else {
|
|
if (g_Vars.stagenum == STAGE_DEEPSEA || g_Vars.stagenum == STAGE_SKEDARRUINS) {
|
|
if (context == 2 || g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion) {
|
|
// Pressed continue
|
|
if (g_Vars.stagenum == STAGE_DEEPSEA) {
|
|
if (!isStageDifficultyUnlocked(g_MissionConfig.stageindex + 1, g_MissionConfig.difficulty)) {
|
|
menuPopDialog();
|
|
menuPopDialog();
|
|
} else {
|
|
// Commit to starting next stage
|
|
g_MissionConfig.stageindex++;
|
|
g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum;
|
|
|
|
titleSetNextStage(g_MissionConfig.stagenum);
|
|
|
|
if (g_MissionConfig.iscoop) {
|
|
if (g_Vars.numaibuddies == 0) {
|
|
g_Vars.bondplayernum = 0;
|
|
g_Vars.coopplayernum = 1;
|
|
g_Vars.antiplayernum = -1;
|
|
setNumPlayers(2);
|
|
} else {
|
|
g_Vars.bondplayernum = 0;
|
|
g_Vars.coopplayernum = -1;
|
|
g_Vars.antiplayernum = -1;
|
|
setNumPlayers(1);
|
|
}
|
|
} else {
|
|
g_Vars.bondplayernum = 0;
|
|
g_Vars.coopplayernum = -1;
|
|
g_Vars.antiplayernum = -1;
|
|
setNumPlayers(1);
|
|
}
|
|
|
|
setDifficulty(g_MissionConfig.difficulty);
|
|
titleSetNextMode(TITLEMODE_SKIP);
|
|
func0000e95c(g_MissionConfig.stagenum);
|
|
func00009ec4(true);
|
|
}
|
|
} else if (g_Vars.stagenum == STAGE_SKEDARRUINS) {
|
|
// Commit to starting credits
|
|
g_MissionConfig.stagenum = STAGE_CREDITS;
|
|
titleSetNextStage(g_MissionConfig.stagenum);
|
|
setDifficulty(g_MissionConfig.difficulty);
|
|
titleSetNextMode(TITLEMODE_SKIP);
|
|
func0000e95c(g_MissionConfig.stagenum);
|
|
func00009ec4(true);
|
|
}
|
|
} else {
|
|
if (context == 1) {
|
|
menuPushRootDialog(&g_MenuDialogContinueOrReplay, MENUROOT_9);
|
|
} else {
|
|
menuPushDialog(&g_MenuDialogContinueOrReplay);
|
|
}
|
|
}
|
|
} else {
|
|
if (context == 2) {
|
|
menuPopDialog();
|
|
}
|
|
|
|
if (isStageDifficultyUnlocked(g_MissionConfig.stageindex + 1, g_MissionConfig.difficulty) == 0) {
|
|
if (context == 2) {
|
|
menuPopDialog();
|
|
menuPopDialog();
|
|
} else {
|
|
menuPushDialog(&g_MenuDialogContinueOrReplay);
|
|
}
|
|
} else if (stageGetIndex(g_MissionConfig.stagenum) < 0
|
|
|| g_Vars.stagenum == STAGE_CITRAINING
|
|
|| g_MissionConfig.stageindex >= SOLOSTAGEINDEX_MBR) {
|
|
if (context == 2) {
|
|
menuPopDialog();
|
|
menuPopDialog();
|
|
} else {
|
|
menuPushDialog(&g_MenuDialogContinueOrReplay);
|
|
}
|
|
} else {
|
|
func0f10d770();
|
|
|
|
if (context == 1) {
|
|
menuPushRootDialog(func0f10d730(), MENUROOT_9);
|
|
} else {
|
|
menuPushDialog(func0f10d730());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
s32 menudialogSolo2PEndscreenCompleted(u32 operation, struct menudialog *dialog, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_OPEN) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.unke1c = 0;
|
|
}
|
|
|
|
if (operation == MENUOP_TICK) {
|
|
if (g_Menus[g_MpPlayerNum].curframe) {
|
|
if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog
|
|
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
|
|
struct menuthing *thing = data->dialog2.ptr;
|
|
|
|
if (thing->forward || thing->back || thing->start) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.unke1c = 6;
|
|
}
|
|
|
|
if (g_Menus[g_MpPlayerNum].data.endscreen.unke1c) {
|
|
if (var8009dfc0) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.unke1c--;
|
|
}
|
|
|
|
if (g_Menus[g_MpPlayerNum].data.endscreen.unke1c == 0) {
|
|
endscreenHandleContinue(0);
|
|
}
|
|
}
|
|
|
|
thing->forward = thing->back = thing->start = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
s32 menudialogSolo2PEndscreenFailed(u32 operation, struct menudialog *dialog, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_OPEN) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.unke1c = 0;
|
|
}
|
|
|
|
if (operation == MENUOP_TICK) {
|
|
if (g_Menus[g_MpPlayerNum].curframe) {
|
|
if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog
|
|
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
|
|
struct menuthing *thing = data->dialog2.ptr;
|
|
|
|
if (thing->forward || thing->back || thing->start) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.unke1c = 6;
|
|
}
|
|
|
|
if (g_Menus[g_MpPlayerNum].data.endscreen.unke1c) {
|
|
if (var8009dfc0) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.unke1c--;
|
|
}
|
|
|
|
if (g_Menus[g_MpPlayerNum].data.endscreen.unke1c == 0) {
|
|
if (g_Vars.antiplayernum >= 0
|
|
|| (g_Vars.coopplayernum >= 0 && PLAYERCOUNT() >= 2)
|
|
|| stageGetIndex(g_MissionConfig.stagenum) < 0
|
|
|| g_Vars.stagenum == STAGE_CITRAINING) {
|
|
menuPopDialog();
|
|
} else {
|
|
func0f10d770();
|
|
menuPushDialog(&g_MenuDialogRetryMission);
|
|
}
|
|
}
|
|
}
|
|
|
|
thing->forward = thing->back = thing->start = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
struct menuitem g_MenuItemsSoloEndscreenNarrow[] = {
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000210, L_OPTIONS(278), 0x00000000, NULL }, // "Mission Status:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)&soloMenuTextMissionStatus, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000210, L_OPTIONS(279), 0x00000000, NULL }, // "Agent Status:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)&soloMenuTextAgentStatus, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000210, L_OPTIONS(280), 0x00000000, NULL }, // "Mission Time:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)&soloMenuTextMissionTime, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000210, L_MPWEAPONS(129), 0x00000000, NULL }, // "Difficulty"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)soloMenuTextDifficulty, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000210, L_OPTIONS(281), 0x00000000, NULL }, // "Weapon of Choice:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)&mpMenuTextWeaponOfChoiceName, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(282), (u32)&soloMenuTextNumKills, NULL }, // "Kills:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(283), (u32)&soloMenuTextAccuracy, NULL }, // "Accuracy:"
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(284), (u32)&soloMenuTextNumShots, NULL }, // "Shot Total:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000200, L_OPTIONS(285), (u32)&soloMenuTextNumHeadShots, NULL }, // "Head Shots:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000200, L_OPTIONS(286), (u32)&soloMenuTextNumBodyShots, NULL }, // "Body Shots:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000200, L_OPTIONS(287), (u32)&soloMenuTextNumLimbShots, NULL }, // "Limb Shots:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000200, L_OPTIONS(288), (u32)&soloMenuTextNumOtherShots, NULL }, // "Others:"
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000020, L_OPTIONS(289), 0x00000000, NULL }, // "Press START"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
u32 g_CheatColour = 0xff7f7fff;
|
|
|
|
struct menuitem g_MenuItemsSoloEndscreenWide[] = {
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(278), (u32)&soloMenuTextMissionStatus, NULL }, // "Mission Status:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(279), (u32)&soloMenuTextAgentStatus, NULL }, // "Agent Status:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x01000000, L_OPTIONS(280), (u32)&soloMenuTextMissionTime, menuhandlerEndscreenCheats }, // "Mission Time:"
|
|
{ MENUITEMTYPE_LABEL, 1, 0x01000000, L_MPWEAPONS(242), (u32)&soloMenuTextTargetTime, menuhandlerEndscreenCheats }, // "Target Time:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_MPWEAPONS(129), (u32)&soloMenuTextDifficulty, NULL }, // "Difficulty:"
|
|
{ MENUITEMTYPE_SEPARATOR, 2, 0x00000000, 0x00000000, 0x00000000, menuhandlerEndscreenCheats },
|
|
{ MENUITEMTYPE_LABEL, 2, 0x00000000, L_MPWEAPONS(243), 0x00000000, menuhandlerEndscreenCheats }, // "New Cheat Available!:"
|
|
{ MENUITEMTYPE_LABEL, 3, 0x01000020, (u32)&soloMenuTextTimedCheatName, 0x00000000, menuhandlerEndscreenCheats },
|
|
{ MENUITEMTYPE_LABEL, 5, 0x01000020, (u32)&soloMenuTextCompletionCheatName, 0x00000000, menuhandlerEndscreenCheats },
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(281), (u32)&mpMenuTextWeaponOfChoiceName, NULL }, // "Weapon of Choice"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(282), (u32)&soloMenuTextNumKills, NULL }, // "Kills:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(283), (u32)&soloMenuTextAccuracy, NULL }, // "Accuracy:"
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(284), (u32)&soloMenuTextNumShots, NULL }, // "Shot Total:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(285), (u32)&soloMenuTextNumHeadShots, NULL }, // "Head Shots:"
|
|
{ MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(286), (u32)&soloMenuTextNumBodyShots, NULL }, // "Body Shots:"
|
|
{ MENUITEMTYPE_LABEL, 6, 0x00000000, L_OPTIONS(287), (u32)&soloMenuTextNumLimbShots, menuhandlerEndscreenCheats }, // "Limb Shots:"
|
|
{ MENUITEMTYPE_LABEL, 4, 0x00000000, L_OPTIONS(288), (u32)&soloMenuTextNumOtherShots, menuhandlerEndscreenCheats }, // "Others:"
|
|
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000020, L_OPTIONS(289), 0x00000000, NULL }, // "Press START"
|
|
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
|
|
};
|
|
|
|
/**
|
|
* This function is re-used for several values on the endscreen.
|
|
* item->param is used to determine which value it is. Values are:
|
|
*
|
|
* 0 = mission time
|
|
* 1 = target time
|
|
* 2 = separator and new cheat available
|
|
* 3 = completion cheat name
|
|
* 4 = others (shots)
|
|
* 5 = timed cheat name
|
|
* 6 = limb shots
|
|
*/
|
|
s32 menuhandlerEndscreenCheats(u32 operation, struct menuitem *item, union handlerdata *data)
|
|
{
|
|
if (operation == MENUOP_GETCOLOUR
|
|
&& ((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x200) || item->param == 5)) {
|
|
// Timed cheat just got unlocked, and this item is the timed cheat name
|
|
u32 weight = func0f006b08(40) * 255;
|
|
|
|
func0000db30("ctcol", &g_CheatColour);
|
|
|
|
if (item->param == 0
|
|
&& cheatGetTime(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff) == 0) {
|
|
return 0;
|
|
}
|
|
|
|
data->label.colour2 = colourBlend(data->label.colour2, g_CheatColour, weight);
|
|
|
|
if (item->param == 3) { // completion cheat name
|
|
data->label.colour1 = colourBlend(data->label.colour1, g_CheatColour, weight);
|
|
}
|
|
|
|
if (item->param == 5) { // timed cheat name
|
|
data->label.colour1 = colourBlend(data->label.colour1, g_CheatColour, weight);
|
|
}
|
|
}
|
|
|
|
if (operation == MENUOP_CHECKHIDDEN) {
|
|
if (item->param == 1) { // target time
|
|
u32 info = g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo;
|
|
|
|
if (info & 0x800) { // completion cheat just got unlocked
|
|
return true;
|
|
}
|
|
|
|
// (has timed cheat)
|
|
// and (timed cheat just got unlocked or timed cheat already unlocked) == 0
|
|
// and cheat has a target time configured
|
|
if ((info & 0x100) && (info & 0x600) == 0 && cheatGetTime(info & 0xff) > 0) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
} else if (item->param == 2 && (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xa00) == 0) {
|
|
// new cheat available
|
|
return true;
|
|
} else if (item->param == 3 && (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x200) == 0) {
|
|
// completion cheat name
|
|
return true;
|
|
} else if (item->param == 4 && (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xa00)) {
|
|
// others (shots)
|
|
return true;
|
|
} else if (item->param == 6 && (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xa00) == 0xa00) {
|
|
// limb shots
|
|
return true;
|
|
} else if (item->param == 5 && (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x800) == 0) {
|
|
// timed cheat name
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
char *soloMenuTextTimedCheatName(struct menuitem *item)
|
|
{
|
|
if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x00000300) {
|
|
return cheatGetName(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff);
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
char *soloMenuTextCompletionCheatName(struct menuitem *item)
|
|
{
|
|
if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x00000800) {
|
|
return cheatGetName((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff);
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
GLOBAL_ASM(
|
|
glabel soloMenuTextTargetTime
|
|
/* f10e4d8: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum)
|
|
/* f10e4dc: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6)
|
|
/* f10e4e0: 3c02800a */ lui $v0,%hi(g_Menus+0xe20)
|
|
/* f10e4e4: 27bdffe8 */ addiu $sp,$sp,-24
|
|
/* f10e4e8: 000e78c0 */ sll $t7,$t6,0x3
|
|
/* f10e4ec: 01ee7823 */ subu $t7,$t7,$t6
|
|
/* f10e4f0: 000f7880 */ sll $t7,$t7,0x2
|
|
/* f10e4f4: 01ee7821 */ addu $t7,$t7,$t6
|
|
/* f10e4f8: 000f78c0 */ sll $t7,$t7,0x3
|
|
/* f10e4fc: 01ee7823 */ subu $t7,$t7,$t6
|
|
/* f10e500: 000f7900 */ sll $t7,$t7,0x4
|
|
/* f10e504: 004f1021 */ addu $v0,$v0,$t7
|
|
/* f10e508: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0)
|
|
/* f10e50c: afbf0014 */ sw $ra,0x14($sp)
|
|
/* f10e510: afa40018 */ sw $a0,0x18($sp)
|
|
/* f10e514: 30580100 */ andi $t8,$v0,0x100
|
|
/* f10e518: 17000003 */ bnez $t8,.L0f10e528
|
|
/* f10e51c: 00000000 */ nop
|
|
/* f10e520: 10000015 */ b .L0f10e578
|
|
/* f10e524: 00001025 */ or $v0,$zero,$zero
|
|
.L0f10e528:
|
|
/* f10e528: 0fc41fd9 */ jal cheatGetTime
|
|
/* f10e52c: 304400ff */ andi $a0,$v0,0xff
|
|
/* f10e530: 14400003 */ bnez $v0,.L0f10e540
|
|
/* f10e534: 00403825 */ or $a3,$v0,$zero
|
|
/* f10e538: 1000000f */ b .L0f10e578
|
|
/* f10e53c: 00001025 */ or $v0,$zero,$zero
|
|
.L0f10e540:
|
|
/* f10e540: 00072900 */ sll $a1,$a3,0x4
|
|
/* f10e544: 00a72823 */ subu $a1,$a1,$a3
|
|
/* f10e548: 3c048007 */ lui $a0,%hi(g_StringPointer)
|
|
/* f10e54c: 8c841440 */ lw $a0,%lo(g_StringPointer)($a0)
|
|
/* f10e550: 00052880 */ sll $a1,$a1,0x2
|
|
/* f10e554: 0fc355f8 */ jal formatTime
|
|
/* f10e558: 24060003 */ addiu $a2,$zero,0x3
|
|
/* f10e55c: 3c048007 */ lui $a0,%hi(g_StringPointer)
|
|
/* f10e560: 3c057f1b */ lui $a1,%hi(var7f1b38bc)
|
|
/* f10e564: 24a538bc */ addiu $a1,$a1,%lo(var7f1b38bc)
|
|
/* f10e568: 0c004c89 */ jal strcat
|
|
/* f10e56c: 8c841440 */ lw $a0,%lo(g_StringPointer)($a0)
|
|
/* f10e570: 3c028007 */ lui $v0,%hi(g_StringPointer)
|
|
/* f10e574: 8c421440 */ lw $v0,%lo(g_StringPointer)($v0)
|
|
.L0f10e578:
|
|
/* f10e578: 8fbf0014 */ lw $ra,0x14($sp)
|
|
/* f10e57c: 27bd0018 */ addiu $sp,$sp,0x18
|
|
/* f10e580: 03e00008 */ jr $ra
|
|
/* f10e584: 00000000 */ nop
|
|
);
|
|
|
|
const char var7f1b38bc[] = "\n";
|
|
|
|
// regalloc
|
|
//char *soloMenuTextTargetTime(struct menuitem *item)
|
|
//{
|
|
// s32 time;
|
|
//
|
|
// if ((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x00000100) == 0) {
|
|
// return NULL;
|
|
// }
|
|
//
|
|
// time = cheatGetTime(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff);
|
|
//
|
|
// if (!time) {
|
|
// return NULL;
|
|
// }
|
|
//
|
|
// formatTime(g_StringPointer, time * 60, 3);
|
|
// strcat(g_StringPointer, "\n");
|
|
// return g_StringPointer;
|
|
//}
|
|
|
|
void endscreenSetCoopCompleted(void)
|
|
{
|
|
if (g_CheatsActiveBank0 == 0 && g_CheatsActiveBank1 == 0) {
|
|
if (g_SoloSaveFile.coopcompletions[g_MissionConfig.difficulty] & (1 << g_MissionConfig.stageindex)) {
|
|
g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = true;
|
|
}
|
|
|
|
g_SoloSaveFile.coopcompletions[g_MissionConfig.difficulty] |= (1 << g_MissionConfig.stageindex);
|
|
}
|
|
}
|
|
|
|
struct menudialog g_MenuDialogSoloEndscreenCompleted = {
|
|
MENUDIALOGTYPE_SUCCESS,
|
|
(u32)&menuTitleStageCompleted,
|
|
g_MenuItemsSoloEndscreenWide,
|
|
menudialogSolo2PEndscreenCompleted,
|
|
0x00000048,
|
|
&g_MenuDialogObjectivesCompletedWide,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogSoloEndscreenFailed = {
|
|
MENUDIALOGTYPE_DANGER,
|
|
(u32)&menuTitleStageFailed,
|
|
g_MenuItemsSoloEndscreenWide,
|
|
menudialogSolo2PEndscreenFailed,
|
|
0x00000048,
|
|
&g_MenuDialogObjectivesFailedWide,
|
|
};
|
|
|
|
GLOBAL_ASM(
|
|
glabel endscreenPrepare
|
|
/* f10e620: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum)
|
|
/* f10e624: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6)
|
|
/* f10e628: 3c07800a */ lui $a3,%hi(g_MissionConfig)
|
|
/* f10e62c: 24e7dfe8 */ addiu $a3,$a3,%lo(g_MissionConfig)
|
|
/* f10e630: 000e78c0 */ sll $t7,$t6,0x3
|
|
/* f10e634: 01ee7823 */ subu $t7,$t7,$t6
|
|
/* f10e638: 000f7880 */ sll $t7,$t7,0x2
|
|
/* f10e63c: 01ee7821 */ addu $t7,$t7,$t6
|
|
/* f10e640: 000f78c0 */ sll $t7,$t7,0x3
|
|
/* f10e644: 90e60002 */ lbu $a2,0x2($a3)
|
|
/* f10e648: 3c18800a */ lui $t8,%hi(g_Menus)
|
|
/* f10e64c: 01ee7823 */ subu $t7,$t7,$t6
|
|
/* f10e650: 000f7900 */ sll $t7,$t7,0x4
|
|
/* f10e654: 2718e000 */ addiu $t8,$t8,%lo(g_Menus)
|
|
/* f10e658: 01f84021 */ addu $t0,$t7,$t8
|
|
/* f10e65c: 3c03800a */ lui $v1,%hi(g_MenuData+0x4)
|
|
/* f10e660: ad060e2c */ sw $a2,0xe2c($t0)
|
|
/* f10e664: 8c6319c4 */ lw $v1,%lo(g_MenuData+0x4)($v1)
|
|
/* f10e668: 27bdffc8 */ addiu $sp,$sp,-56
|
|
/* f10e66c: 24010001 */ addiu $at,$zero,0x1
|
|
/* f10e670: 10610183 */ beq $v1,$at,.L0f10ec80
|
|
/* f10e674: afbf0014 */ sw $ra,0x14($sp)
|
|
/* f10e678: 3c19800a */ lui $t9,%hi(g_Vars+0x314)
|
|
/* f10e67c: 8f39a2d4 */ lw $t9,%lo(g_Vars+0x314)($t9)
|
|
/* f10e680: 57200180 */ bnezl $t9,.L0f10ec84
|
|
/* f10e684: 24010001 */ addiu $at,$zero,0x1
|
|
/* f10e688: 80ea0003 */ lb $t2,0x3($a3)
|
|
/* f10e68c: ad000e20 */ sw $zero,0xe20($t0)
|
|
/* f10e690: ad000e24 */ sw $zero,0xe24($t0)
|
|
/* f10e694: 05400033 */ bltz $t2,.L0f10e764
|
|
/* f10e698: a100083b */ sb $zero,0x83b($t0)
|
|
/* f10e69c: 8ce20000 */ lw $v0,0x0($a3)
|
|
/* f10e6a0: 00026640 */ sll $t4,$v0,0x19
|
|
/* f10e6a4: 0580002f */ bltz $t4,.L0f10e764
|
|
/* f10e6a8: 00000000 */ nop
|
|
/* f10e6ac: 90ed0000 */ lbu $t5,0x0($a3)
|
|
/* f10e6b0: 00c02025 */ or $a0,$a2,$zero
|
|
/* f10e6b4: 31ae0001 */ andi $t6,$t5,0x1
|
|
/* f10e6b8: 15c0002a */ bnez $t6,.L0f10e764
|
|
/* f10e6bc: 00000000 */ nop
|
|
/* f10e6c0: 0fc41fae */ jal cheatGetByTimedStageIndex
|
|
/* f10e6c4: 00022e42 */ srl $a1,$v0,0x19
|
|
/* f10e6c8: 3c04800a */ lui $a0,%hi(g_MissionConfig+0x2)
|
|
/* f10e6cc: 9084dfea */ lbu $a0,%lo(g_MissionConfig+0x2)($a0)
|
|
/* f10e6d0: 0fc41fc6 */ jal cheatGetByCompletedStageIndex
|
|
/* f10e6d4: afa20034 */ sw $v0,0x34($sp)
|
|
/* f10e6d8: 8fa30034 */ lw $v1,0x34($sp)
|
|
/* f10e6dc: 3c188007 */ lui $t8,%hi(g_MpPlayerNum)
|
|
/* f10e6e0: 3c098007 */ lui $t1,%hi(g_MpPlayerNum)
|
|
/* f10e6e4: 0460000d */ bltz $v1,.L0f10e71c
|
|
/* f10e6e8: 00000000 */ nop
|
|
/* f10e6ec: 8f181448 */ lw $t8,%lo(g_MpPlayerNum)($t8)
|
|
/* f10e6f0: 3c01800a */ lui $at,%hi(g_Menus+0xe20)
|
|
/* f10e6f4: 346f0100 */ ori $t7,$v1,0x100
|
|
/* f10e6f8: 0018c8c0 */ sll $t9,$t8,0x3
|
|
/* f10e6fc: 0338c823 */ subu $t9,$t9,$t8
|
|
/* f10e700: 0019c880 */ sll $t9,$t9,0x2
|
|
/* f10e704: 0338c821 */ addu $t9,$t9,$t8
|
|
/* f10e708: 0019c8c0 */ sll $t9,$t9,0x3
|
|
/* f10e70c: 0338c823 */ subu $t9,$t9,$t8
|
|
/* f10e710: 0019c900 */ sll $t9,$t9,0x4
|
|
/* f10e714: 00390821 */ addu $at,$at,$t9
|
|
/* f10e718: ac2fee20 */ sw $t7,%lo(g_Menus+0xe20)($at)
|
|
.L0f10e71c:
|
|
/* f10e71c: 04400011 */ bltz $v0,.L0f10e764
|
|
/* f10e720: 00000000 */ nop
|
|
/* f10e724: 8d291448 */ lw $t1,%lo(g_MpPlayerNum)($t1)
|
|
/* f10e728: 3c0b800a */ lui $t3,%hi(g_Menus)
|
|
/* f10e72c: 256be000 */ addiu $t3,$t3,%lo(g_Menus)
|
|
/* f10e730: 000950c0 */ sll $t2,$t1,0x3
|
|
/* f10e734: 01495023 */ subu $t2,$t2,$t1
|
|
/* f10e738: 000a5080 */ sll $t2,$t2,0x2
|
|
/* f10e73c: 01495021 */ addu $t2,$t2,$t1
|
|
/* f10e740: 000a50c0 */ sll $t2,$t2,0x3
|
|
/* f10e744: 01495023 */ subu $t2,$t2,$t1
|
|
/* f10e748: 000a5100 */ sll $t2,$t2,0x4
|
|
/* f10e74c: 014b4021 */ addu $t0,$t2,$t3
|
|
/* f10e750: 8d0c0e20 */ lw $t4,0xe20($t0)
|
|
/* f10e754: 00026c00 */ sll $t5,$v0,0x10
|
|
/* f10e758: 35ae1000 */ ori $t6,$t5,0x1000
|
|
/* f10e75c: 018ec025 */ or $t8,$t4,$t6
|
|
/* f10e760: ad180e20 */ sw $t8,0xe20($t0)
|
|
.L0f10e764:
|
|
/* f10e764: 3c02800a */ lui $v0,%hi(g_Vars+0x284)
|
|
/* f10e768: 8c42a244 */ lw $v0,%lo(g_Vars+0x284)($v0)
|
|
/* f10e76c: 8c4f00d8 */ lw $t7,0xd8($v0)
|
|
/* f10e770: 15e00008 */ bnez $t7,.L0f10e794
|
|
/* f10e774: 00000000 */ nop
|
|
/* f10e778: 8c59048c */ lw $t9,0x48c($v0)
|
|
/* f10e77c: 17200005 */ bnez $t9,.L0f10e794
|
|
/* f10e780: 00000000 */ nop
|
|
/* f10e784: 0fc256d9 */ jal objectiveIsAllComplete
|
|
/* f10e788: 00000000 */ nop
|
|
/* f10e78c: 1440000a */ bnez $v0,.L0f10e7b8
|
|
/* f10e790: 3c048007 */ lui $a0,%hi(g_MenuDialogSoloEndscreenCompleted)
|
|
.L0f10e794:
|
|
/* f10e794: 3c048007 */ lui $a0,%hi(g_MenuDialogSoloEndscreenFailed)
|
|
/* f10e798: 24845b3c */ addiu $a0,$a0,%lo(g_MenuDialogSoloEndscreenFailed)
|
|
/* f10e79c: 0fc3e0cc */ jal menuPushRootDialog
|
|
/* f10e7a0: 24050001 */ addiu $a1,$zero,0x1
|
|
/* f10e7a4: 3c02800a */ lui $v0,%hi(g_MissionConfig+0x3)
|
|
/* f10e7a8: 9042dfeb */ lbu $v0,%lo(g_MissionConfig+0x3)($v0)
|
|
/* f10e7ac: 000249c2 */ srl $t1,$v0,0x7
|
|
/* f10e7b0: 1000000f */ b .L0f10e7f0
|
|
/* f10e7b4: 01201025 */ or $v0,$t1,$zero
|
|
.L0f10e7b8:
|
|
/* f10e7b8: 24845b24 */ addiu $a0,$a0,%lo(g_MenuDialogSoloEndscreenCompleted)
|
|
/* f10e7bc: 0fc3e0cc */ jal menuPushRootDialog
|
|
/* f10e7c0: 24050001 */ addiu $a1,$zero,0x1
|
|
/* f10e7c4: 3c02800a */ lui $v0,%hi(g_MissionConfig+0x3)
|
|
/* f10e7c8: 9042dfeb */ lbu $v0,%lo(g_MissionConfig+0x3)($v0)
|
|
/* f10e7cc: 000251c2 */ srl $t2,$v0,0x7
|
|
/* f10e7d0: 11400007 */ beqz $t2,.L0f10e7f0
|
|
/* f10e7d4: 01401025 */ or $v0,$t2,$zero
|
|
/* f10e7d8: 0fc43962 */ jal endscreenSetCoopCompleted
|
|
/* f10e7dc: 00000000 */ nop
|
|
/* f10e7e0: 3c02800a */ lui $v0,%hi(g_MissionConfig+0x3)
|
|
/* f10e7e4: 9042dfeb */ lbu $v0,%lo(g_MissionConfig+0x3)($v0)
|
|
/* f10e7e8: 000259c2 */ srl $t3,$v0,0x7
|
|
/* f10e7ec: 01601025 */ or $v0,$t3,$zero
|
|
.L0f10e7f0:
|
|
/* f10e7f0: 1440011c */ bnez $v0,.L0f10ec64
|
|
/* f10e7f4: 3c0d800a */ lui $t5,%hi(g_MissionConfig)
|
|
/* f10e7f8: 8daddfe8 */ lw $t5,%lo(g_MissionConfig)($t5)
|
|
/* f10e7fc: 3c188007 */ lui $t8,%hi(g_MpPlayerNum)
|
|
/* f10e800: 000d7640 */ sll $t6,$t5,0x19
|
|
/* f10e804: 05c00117 */ bltz $t6,.L0f10ec64
|
|
/* f10e808: 00000000 */ nop
|
|
/* f10e80c: 8f181448 */ lw $t8,%lo(g_MpPlayerNum)($t8)
|
|
/* f10e810: 3c02800a */ lui $v0,%hi(g_Menus+0xe20)
|
|
/* f10e814: afa00020 */ sw $zero,0x20($sp)
|
|
/* f10e818: 001878c0 */ sll $t7,$t8,0x3
|
|
/* f10e81c: 01f87823 */ subu $t7,$t7,$t8
|
|
/* f10e820: 000f7880 */ sll $t7,$t7,0x2
|
|
/* f10e824: 01f87821 */ addu $t7,$t7,$t8
|
|
/* f10e828: 000f78c0 */ sll $t7,$t7,0x3
|
|
/* f10e82c: 01f87823 */ subu $t7,$t7,$t8
|
|
/* f10e830: 000f7900 */ sll $t7,$t7,0x4
|
|
/* f10e834: 004f1021 */ addu $v0,$v0,$t7
|
|
/* f10e838: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0)
|
|
/* f10e83c: afa0001c */ sw $zero,0x1c($sp)
|
|
/* f10e840: 30590100 */ andi $t9,$v0,0x100
|
|
/* f10e844: 13200014 */ beqz $t9,.L0f10e898
|
|
/* f10e848: 00000000 */ nop
|
|
/* f10e84c: 0fc41b50 */ jal cheatIsUnlocked
|
|
/* f10e850: 304400ff */ andi $a0,$v0,0xff
|
|
/* f10e854: 10400010 */ beqz $v0,.L0f10e898
|
|
/* f10e858: afa20020 */ sw $v0,0x20($sp)
|
|
/* f10e85c: 3c098007 */ lui $t1,%hi(g_MpPlayerNum)
|
|
/* f10e860: 8d291448 */ lw $t1,%lo(g_MpPlayerNum)($t1)
|
|
/* f10e864: 3c0b800a */ lui $t3,%hi(g_Menus)
|
|
/* f10e868: 256be000 */ addiu $t3,$t3,%lo(g_Menus)
|
|
/* f10e86c: 000950c0 */ sll $t2,$t1,0x3
|
|
/* f10e870: 01495023 */ subu $t2,$t2,$t1
|
|
/* f10e874: 000a5080 */ sll $t2,$t2,0x2
|
|
/* f10e878: 01495021 */ addu $t2,$t2,$t1
|
|
/* f10e87c: 000a50c0 */ sll $t2,$t2,0x3
|
|
/* f10e880: 01495023 */ subu $t2,$t2,$t1
|
|
/* f10e884: 000a5100 */ sll $t2,$t2,0x4
|
|
/* f10e888: 014b4021 */ addu $t0,$t2,$t3
|
|
/* f10e88c: 8d0d0e20 */ lw $t5,0xe20($t0)
|
|
/* f10e890: 35ac0400 */ ori $t4,$t5,0x400
|
|
/* f10e894: ad0c0e20 */ sw $t4,0xe20($t0)
|
|
.L0f10e898:
|
|
/* f10e898: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum)
|
|
/* f10e89c: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6)
|
|
/* f10e8a0: 3c02800a */ lui $v0,%hi(g_Menus+0xe20)
|
|
/* f10e8a4: 000ec0c0 */ sll $t8,$t6,0x3
|
|
/* f10e8a8: 030ec023 */ subu $t8,$t8,$t6
|
|
/* f10e8ac: 0018c080 */ sll $t8,$t8,0x2
|
|
/* f10e8b0: 030ec021 */ addu $t8,$t8,$t6
|
|
/* f10e8b4: 0018c0c0 */ sll $t8,$t8,0x3
|
|
/* f10e8b8: 030ec023 */ subu $t8,$t8,$t6
|
|
/* f10e8bc: 0018c100 */ sll $t8,$t8,0x4
|
|
/* f10e8c0: 00581021 */ addu $v0,$v0,$t8
|
|
/* f10e8c4: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0)
|
|
/* f10e8c8: 304f1000 */ andi $t7,$v0,0x1000
|
|
/* f10e8cc: 11e00005 */ beqz $t7,.L0f10e8e4
|
|
/* f10e8d0: 00022402 */ srl $a0,$v0,0x10
|
|
/* f10e8d4: 309900ff */ andi $t9,$a0,0xff
|
|
/* f10e8d8: 0fc41b50 */ jal cheatIsUnlocked
|
|
/* f10e8dc: 03202025 */ or $a0,$t9,$zero
|
|
/* f10e8e0: afa2001c */ sw $v0,0x1c($sp)
|
|
.L0f10e8e4:
|
|
/* f10e8e4: 0fc3089f */ jal getMissionTime
|
|
/* f10e8e8: 00000000 */ nop
|
|
/* f10e8ec: 2401003c */ addiu $at,$zero,0x3c
|
|
/* f10e8f0: 0041001a */ div $zero,$v0,$at
|
|
/* f10e8f4: 00001812 */ mflo $v1
|
|
/* f10e8f8: 3c047fff */ lui $a0,0x7fff
|
|
/* f10e8fc: 10600010 */ beqz $v1,.L0f10e940
|
|
/* f10e900: 3484ffff */ ori $a0,$a0,0xffff
|
|
/* f10e904: 0064082b */ sltu $at,$v1,$a0
|
|
/* f10e908: 10200007 */ beqz $at,.L0f10e928
|
|
/* f10e90c: 3c05800a */ lui $a1,%hi(g_SoloSaveFile)
|
|
/* f10e910: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile)
|
|
/* f10e914: 8ca20010 */ lw $v0,0x10($a1)
|
|
/* f10e918: 00834823 */ subu $t1,$a0,$v1
|
|
/* f10e91c: 0049082b */ sltu $at,$v0,$t1
|
|
/* f10e920: 14200005 */ bnez $at,.L0f10e938
|
|
/* f10e924: 00435021 */ addu $t2,$v0,$v1
|
|
.L0f10e928:
|
|
/* f10e928: 3c05800a */ lui $a1,%hi(g_SoloSaveFile)
|
|
/* f10e92c: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile)
|
|
/* f10e930: 10000003 */ b .L0f10e940
|
|
/* f10e934: aca40010 */ sw $a0,0x10($a1)
|
|
.L0f10e938:
|
|
/* f10e938: 3c01800a */ lui $at,%hi(g_SoloSaveFile+0x10)
|
|
/* f10e93c: ac2a2210 */ sw $t2,%lo(g_SoloSaveFile+0x10)($at)
|
|
.L0f10e940:
|
|
/* f10e940: 3c03800a */ lui $v1,%hi(g_MissionConfig)
|
|
/* f10e944: 2463dfe8 */ addiu $v1,$v1,%lo(g_MissionConfig)
|
|
/* f10e948: 3c05800a */ lui $a1,%hi(g_SoloSaveFile)
|
|
/* f10e94c: 8c6d0000 */ lw $t5,0x0($v1)
|
|
/* f10e950: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile)
|
|
/* f10e954: 90af000b */ lbu $t7,0xb($a1)
|
|
/* f10e958: 906b0002 */ lbu $t3,0x2($v1)
|
|
/* f10e95c: 000d7642 */ srl $t6,$t5,0x19
|
|
/* f10e960: 31d80007 */ andi $t8,$t6,0x7
|
|
/* f10e964: 31f9fff8 */ andi $t9,$t7,0xfff8
|
|
/* f10e968: 03194825 */ or $t1,$t8,$t9
|
|
/* f10e96c: a0a9000b */ sb $t1,0xb($a1)
|
|
/* f10e970: 3c0a800a */ lui $t2,%hi(g_CheatsActiveBank0)
|
|
/* f10e974: a0ab000c */ sb $t3,0xc($a1)
|
|
/* f10e978: 8d4a21d0 */ lw $t2,%lo(g_CheatsActiveBank0)($t2)
|
|
/* f10e97c: 3c0b800a */ lui $t3,%hi(g_CheatsActiveBank1)
|
|
/* f10e980: 154000b8 */ bnez $t2,.L0f10ec64
|
|
/* f10e984: 00000000 */ nop
|
|
/* f10e988: 8d6b21d4 */ lw $t3,%lo(g_CheatsActiveBank1)($t3)
|
|
/* f10e98c: 156000b5 */ bnez $t3,.L0f10ec64
|
|
/* f10e990: 00000000 */ nop
|
|
/* f10e994: 906d0000 */ lbu $t5,0x0($v1)
|
|
/* f10e998: 3c02800a */ lui $v0,%hi(g_Vars+0x284)
|
|
/* f10e99c: 31ac0001 */ andi $t4,$t5,0x1
|
|
/* f10e9a0: 158000b0 */ bnez $t4,.L0f10ec64
|
|
/* f10e9a4: 00000000 */ nop
|
|
/* f10e9a8: 8c42a244 */ lw $v0,%lo(g_Vars+0x284)($v0)
|
|
/* f10e9ac: 8c4e00d8 */ lw $t6,0xd8($v0)
|
|
/* f10e9b0: 15c000ac */ bnez $t6,.L0f10ec64
|
|
/* f10e9b4: 00000000 */ nop
|
|
/* f10e9b8: 8c4f048c */ lw $t7,0x48c($v0)
|
|
/* f10e9bc: 15e000a9 */ bnez $t7,.L0f10ec64
|
|
/* f10e9c0: 00000000 */ nop
|
|
/* f10e9c4: 0fc256d9 */ jal objectiveIsAllComplete
|
|
/* f10e9c8: 00000000 */ nop
|
|
/* f10e9cc: 104000a5 */ beqz $v0,.L0f10ec64
|
|
/* f10e9d0: 00000000 */ nop
|
|
/* f10e9d4: 0fc3089f */ jal getMissionTime
|
|
/* f10e9d8: 00000000 */ nop
|
|
/* f10e9dc: 2401003c */ addiu $at,$zero,0x3c
|
|
/* f10e9e0: 0041001a */ div $zero,$v0,$at
|
|
/* f10e9e4: 00002012 */ mflo $a0
|
|
/* f10e9e8: 3c05800a */ lui $a1,%hi(g_SoloSaveFile)
|
|
/* f10e9ec: 2c811000 */ sltiu $at,$a0,0x1000
|
|
/* f10e9f0: 14200002 */ bnez $at,.L0f10e9fc
|
|
/* f10e9f4: 24a52200 */ addiu $a1,$a1,%lo(g_SoloSaveFile)
|
|
/* f10e9f8: 24040fff */ addiu $a0,$zero,0xfff
|
|
.L0f10e9fc:
|
|
/* f10e9fc: 14800002 */ bnez $a0,.L0f10ea08
|
|
/* f10ea00: 3c06800a */ lui $a2,%hi(g_MissionConfig+0x2)
|
|
/* f10ea04: 24040001 */ addiu $a0,$zero,0x1
|
|
.L0f10ea08:
|
|
/* f10ea08: 90c6dfea */ lbu $a2,%lo(g_MissionConfig+0x2)($a2)
|
|
/* f10ea0c: 3c09800a */ lui $t1,%hi(g_MissionConfig)
|
|
/* f10ea10: 8d29dfe8 */ lw $t1,%lo(g_MissionConfig)($t1)
|
|
/* f10ea14: 0006c080 */ sll $t8,$a2,0x2
|
|
/* f10ea18: 0306c023 */ subu $t8,$t8,$a2
|
|
/* f10ea1c: 0018c040 */ sll $t8,$t8,0x1
|
|
/* f10ea20: 00095642 */ srl $t2,$t1,0x19
|
|
/* f10ea24: 000a5840 */ sll $t3,$t2,0x1
|
|
/* f10ea28: 00b8c821 */ addu $t9,$a1,$t8
|
|
/* f10ea2c: 032b3821 */ addu $a3,$t9,$t3
|
|
/* f10ea30: 94e30020 */ lhu $v1,0x20($a3)
|
|
/* f10ea34: 3c0c8007 */ lui $t4,%hi(g_MpPlayerNum)
|
|
/* f10ea38: 3c09800a */ lui $t1,%hi(g_Menus)
|
|
/* f10ea3c: 1460000d */ bnez $v1,.L0f10ea74
|
|
/* f10ea40: 3c0f8007 */ lui $t7,%hi(g_MpPlayerNum)
|
|
/* f10ea44: 8d8c1448 */ lw $t4,%lo(g_MpPlayerNum)($t4)
|
|
/* f10ea48: 3c01800a */ lui $at,%hi(g_Menus+0xe24)
|
|
/* f10ea4c: 240d0001 */ addiu $t5,$zero,0x1
|
|
/* f10ea50: 000c70c0 */ sll $t6,$t4,0x3
|
|
/* f10ea54: 01cc7023 */ subu $t6,$t6,$t4
|
|
/* f10ea58: 000e7080 */ sll $t6,$t6,0x2
|
|
/* f10ea5c: 01cc7021 */ addu $t6,$t6,$t4
|
|
/* f10ea60: 000e70c0 */ sll $t6,$t6,0x3
|
|
/* f10ea64: 01cc7023 */ subu $t6,$t6,$t4
|
|
/* f10ea68: 000e7100 */ sll $t6,$t6,0x4
|
|
/* f10ea6c: 002e0821 */ addu $at,$at,$t6
|
|
/* f10ea70: ac2dee24 */ sw $t5,%lo(g_Menus+0xe24)($at)
|
|
.L0f10ea74:
|
|
/* f10ea74: 8def1448 */ lw $t7,%lo(g_MpPlayerNum)($t7)
|
|
/* f10ea78: 2529e000 */ addiu $t1,$t1,%lo(g_Menus)
|
|
/* f10ea7c: 0083082b */ sltu $at,$a0,$v1
|
|
/* f10ea80: 000fc0c0 */ sll $t8,$t7,0x3
|
|
/* f10ea84: 030fc023 */ subu $t8,$t8,$t7
|
|
/* f10ea88: 0018c080 */ sll $t8,$t8,0x2
|
|
/* f10ea8c: 030fc021 */ addu $t8,$t8,$t7
|
|
/* f10ea90: 0018c0c0 */ sll $t8,$t8,0x3
|
|
/* f10ea94: 030fc023 */ subu $t8,$t8,$t7
|
|
/* f10ea98: 0018c100 */ sll $t8,$t8,0x4
|
|
/* f10ea9c: 14200003 */ bnez $at,.L0f10eaac
|
|
/* f10eaa0: 03094021 */ addu $t0,$t8,$t1
|
|
/* f10eaa4: 54600003 */ bnezl $v1,.L0f10eab4
|
|
/* f10eaa8: 28c10011 */ slti $at,$a2,0x11
|
|
.L0f10eaac:
|
|
/* f10eaac: a4e40020 */ sh $a0,0x20($a3)
|
|
/* f10eab0: 28c10011 */ slti $at,$a2,0x11
|
|
.L0f10eab4:
|
|
/* f10eab4: 1020001d */ beqz $at,.L0f10eb2c
|
|
/* f10eab8: 24ca0001 */ addiu $t2,$a2,0x1
|
|
/* f10eabc: 315900ff */ andi $t9,$t2,0xff
|
|
/* f10eac0: 2b210011 */ slti $at,$t9,0x11
|
|
/* f10eac4: 14200003 */ bnez $at,.L0f10ead4
|
|
/* f10eac8: a0aa000c */ sb $t2,0xc($a1)
|
|
/* f10eacc: 240b0010 */ addiu $t3,$zero,0x10
|
|
/* f10ead0: a0ab000c */ sb $t3,0xc($a1)
|
|
.L0f10ead4:
|
|
/* f10ead4: 00003025 */ or $a2,$zero,$zero
|
|
/* f10ead8: 24070006 */ addiu $a3,$zero,0x6
|
|
/* f10eadc: 24040011 */ addiu $a0,$zero,0x11
|
|
.L0f10eae0:
|
|
/* f10eae0: 3c0c800a */ lui $t4,%hi(g_SoloSaveFile)
|
|
/* f10eae4: 258c2200 */ addiu $t4,$t4,%lo(g_SoloSaveFile)
|
|
/* f10eae8: 00cc1821 */ addu $v1,$a2,$t4
|
|
/* f10eaec: 00001025 */ or $v0,$zero,$zero
|
|
.L0f10eaf0:
|
|
/* f10eaf0: 946d0020 */ lhu $t5,0x20($v1)
|
|
/* f10eaf4: 51a00008 */ beqzl $t5,.L0f10eb18
|
|
/* f10eaf8: 24420001 */ addiu $v0,$v0,0x1
|
|
/* f10eafc: 90aa000b */ lbu $t2,0xb($a1)
|
|
/* f10eb00: 244f0001 */ addiu $t7,$v0,0x1
|
|
/* f10eb04: 000f48c0 */ sll $t1,$t7,0x3
|
|
/* f10eb08: 3159ff07 */ andi $t9,$t2,0xff07
|
|
/* f10eb0c: 01395825 */ or $t3,$t1,$t9
|
|
/* f10eb10: a0ab000b */ sb $t3,0xb($a1)
|
|
/* f10eb14: 24420001 */ addiu $v0,$v0,0x1
|
|
.L0f10eb18:
|
|
/* f10eb18: 1444fff5 */ bne $v0,$a0,.L0f10eaf0
|
|
/* f10eb1c: 24630006 */ addiu $v1,$v1,0x6
|
|
/* f10eb20: 24c60002 */ addiu $a2,$a2,0x2
|
|
/* f10eb24: 14c7ffee */ bne $a2,$a3,.L0f10eae0
|
|
/* f10eb28: 00000000 */ nop
|
|
.L0f10eb2c:
|
|
/* f10eb2c: 8d020e20 */ lw $v0,0xe20($t0)
|
|
/* f10eb30: 304c0100 */ andi $t4,$v0,0x100
|
|
/* f10eb34: 11800016 */ beqz $t4,.L0f10eb90
|
|
/* f10eb38: 00000000 */ nop
|
|
/* f10eb3c: 0fc41b50 */ jal cheatIsUnlocked
|
|
/* f10eb40: 304400ff */ andi $a0,$v0,0xff
|
|
/* f10eb44: 8fad0020 */ lw $t5,0x20($sp)
|
|
/* f10eb48: 15a00011 */ bnez $t5,.L0f10eb90
|
|
/* f10eb4c: 00000000 */ nop
|
|
/* f10eb50: 1040000f */ beqz $v0,.L0f10eb90
|
|
/* f10eb54: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum)
|
|
/* f10eb58: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6)
|
|
/* f10eb5c: 3c18800a */ lui $t8,%hi(g_Menus)
|
|
/* f10eb60: 2718e000 */ addiu $t8,$t8,%lo(g_Menus)
|
|
/* f10eb64: 000e78c0 */ sll $t7,$t6,0x3
|
|
/* f10eb68: 01ee7823 */ subu $t7,$t7,$t6
|
|
/* f10eb6c: 000f7880 */ sll $t7,$t7,0x2
|
|
/* f10eb70: 01ee7821 */ addu $t7,$t7,$t6
|
|
/* f10eb74: 000f78c0 */ sll $t7,$t7,0x3
|
|
/* f10eb78: 01ee7823 */ subu $t7,$t7,$t6
|
|
/* f10eb7c: 000f7900 */ sll $t7,$t7,0x4
|
|
/* f10eb80: 01f84021 */ addu $t0,$t7,$t8
|
|
/* f10eb84: 8d0a0e20 */ lw $t2,0xe20($t0)
|
|
/* f10eb88: 35490200 */ ori $t1,$t2,0x200
|
|
/* f10eb8c: ad090e20 */ sw $t1,0xe20($t0)
|
|
.L0f10eb90:
|
|
/* f10eb90: 3c198007 */ lui $t9,%hi(g_MpPlayerNum)
|
|
/* f10eb94: 8f391448 */ lw $t9,%lo(g_MpPlayerNum)($t9)
|
|
/* f10eb98: 3c02800a */ lui $v0,%hi(g_Menus+0xe20)
|
|
/* f10eb9c: 001958c0 */ sll $t3,$t9,0x3
|
|
/* f10eba0: 01795823 */ subu $t3,$t3,$t9
|
|
/* f10eba4: 000b5880 */ sll $t3,$t3,0x2
|
|
/* f10eba8: 01795821 */ addu $t3,$t3,$t9
|
|
/* f10ebac: 000b58c0 */ sll $t3,$t3,0x3
|
|
/* f10ebb0: 01795823 */ subu $t3,$t3,$t9
|
|
/* f10ebb4: 000b5900 */ sll $t3,$t3,0x4
|
|
/* f10ebb8: 004b1021 */ addu $v0,$v0,$t3
|
|
/* f10ebbc: 8c42ee20 */ lw $v0,%lo(g_Menus+0xe20)($v0)
|
|
/* f10ebc0: 304c1000 */ andi $t4,$v0,0x1000
|
|
/* f10ebc4: 11800017 */ beqz $t4,.L0f10ec24
|
|
/* f10ebc8: 00022402 */ srl $a0,$v0,0x10
|
|
/* f10ebcc: 308d00ff */ andi $t5,$a0,0xff
|
|
/* f10ebd0: 0fc41b50 */ jal cheatIsUnlocked
|
|
/* f10ebd4: 01a02025 */ or $a0,$t5,$zero
|
|
/* f10ebd8: 8fae001c */ lw $t6,0x1c($sp)
|
|
/* f10ebdc: 15c00011 */ bnez $t6,.L0f10ec24
|
|
/* f10ebe0: 00000000 */ nop
|
|
/* f10ebe4: 1040000f */ beqz $v0,.L0f10ec24
|
|
/* f10ebe8: 3c0f8007 */ lui $t7,%hi(g_MpPlayerNum)
|
|
/* f10ebec: 8def1448 */ lw $t7,%lo(g_MpPlayerNum)($t7)
|
|
/* f10ebf0: 3c0a800a */ lui $t2,%hi(g_Menus)
|
|
/* f10ebf4: 254ae000 */ addiu $t2,$t2,%lo(g_Menus)
|
|
/* f10ebf8: 000fc0c0 */ sll $t8,$t7,0x3
|
|
/* f10ebfc: 030fc023 */ subu $t8,$t8,$t7
|
|
/* f10ec00: 0018c080 */ sll $t8,$t8,0x2
|
|
/* f10ec04: 030fc021 */ addu $t8,$t8,$t7
|
|
/* f10ec08: 0018c0c0 */ sll $t8,$t8,0x3
|
|
/* f10ec0c: 030fc023 */ subu $t8,$t8,$t7
|
|
/* f10ec10: 0018c100 */ sll $t8,$t8,0x4
|
|
/* f10ec14: 030a4021 */ addu $t0,$t8,$t2
|
|
/* f10ec18: 8d090e20 */ lw $t1,0xe20($t0)
|
|
/* f10ec1c: 35390800 */ ori $t9,$t1,0x800
|
|
/* f10ec20: ad190e20 */ sw $t9,0xe20($t0)
|
|
.L0f10ec24:
|
|
/* f10ec24: 0fc66bf7 */ jal func0f19afdc
|
|
/* f10ec28: 00000000 */ nop
|
|
/* f10ec2c: 3c0b800a */ lui $t3,%hi(g_MissionConfig+0x1)
|
|
/* f10ec30: 916bdfe9 */ lbu $t3,%lo(g_MissionConfig+0x1)($t3)
|
|
/* f10ec34: 2401002a */ addiu $at,$zero,0x2a
|
|
/* f10ec38: 3c02800a */ lui $v0,%hi(var800a2328+0x3)
|
|
/* f10ec3c: 15610009 */ bne $t3,$at,.L0f10ec64
|
|
/* f10ec40: 2442232b */ addiu $v0,$v0,%lo(var800a2328+0x3)
|
|
/* f10ec44: 904c0000 */ lbu $t4,0x0($v0)
|
|
/* f10ec48: 240d0001 */ addiu $t5,$zero,0x1
|
|
/* f10ec4c: 240e0001 */ addiu $t6,$zero,0x1
|
|
/* f10ec50: 15800004 */ bnez $t4,.L0f10ec64
|
|
/* f10ec54: 3c01800a */ lui $at,%hi(g_AltTitle)
|
|
/* f10ec58: a04d0000 */ sb $t5,0x0($v0)
|
|
/* f10ec5c: 0fc44270 */ jal func0f1109c0
|
|
/* f10ec60: a02e232c */ sb $t6,%lo(g_AltTitle)($at)
|
|
.L0f10ec64:
|
|
/* f10ec64: 3c04800a */ lui $a0,%hi(var800a22c0)
|
|
/* f10ec68: 248422c0 */ addiu $a0,$a0,%lo(var800a22c0)
|
|
/* f10ec6c: 00002825 */ or $a1,$zero,$zero
|
|
/* f10ec70: 0fc42539 */ jal func0f1094e4
|
|
/* f10ec74: 00003025 */ or $a2,$zero,$zero
|
|
/* f10ec78: 3c03800a */ lui $v1,%hi(g_MenuData+0x4)
|
|
/* f10ec7c: 8c6319c4 */ lw $v1,%lo(g_MenuData+0x4)($v1)
|
|
.L0f10ec80:
|
|
/* f10ec80: 24010001 */ addiu $at,$zero,0x1
|
|
.L0f10ec84:
|
|
/* f10ec84: 54610008 */ bnel $v1,$at,.L0f10eca8
|
|
/* f10ec88: 8fbf0014 */ lw $ra,0x14($sp)
|
|
/* f10ec8c: 0fc5b350 */ jal soloSetPaused
|
|
/* f10ec90: 24040001 */ addiu $a0,$zero,0x1
|
|
/* f10ec94: 3c18800a */ lui $t8,%hi(g_Vars+0x284)
|
|
/* f10ec98: 8f18a244 */ lw $t8,%lo(g_Vars+0x284)($t8)
|
|
/* f10ec9c: 240f0003 */ addiu $t7,$zero,0x3
|
|
/* f10eca0: af0f1a24 */ sw $t7,0x1a24($t8)
|
|
/* f10eca4: 8fbf0014 */ lw $ra,0x14($sp)
|
|
.L0f10eca8:
|
|
/* f10eca8: 27bd0038 */ addiu $sp,$sp,0x38
|
|
/* f10ecac: 03e00008 */ jr $ra
|
|
/* f10ecb0: 00000000 */ nop
|
|
);
|
|
|
|
// Mismatch because address of var800a2328[3] is calcualted differently
|
|
//void endscreenPrepare(void)
|
|
//{
|
|
// s32 timedcheatid;
|
|
// s32 complcheatid;
|
|
// s32 d;
|
|
// s32 s;
|
|
// u32 secs;
|
|
// s32 timedalreadyunlocked;
|
|
// s32 complalreadyunlocked;
|
|
// u16 prevbest;
|
|
// bool nowunlocked;
|
|
//
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.stageindex = g_MissionConfig.stageindex;
|
|
//
|
|
// if (g_MenuData.root != MENUROOT_ENDSCREEN && g_Vars.mplayerisrunning == false) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0;
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = false;
|
|
// g_Menus[g_MpPlayerNum].playernum = 0;
|
|
//
|
|
// // Set cheat info
|
|
// if (g_MissionConfig.iscoop == false
|
|
// && g_MissionConfig.isanti == false
|
|
// && g_MissionConfig.pdmode == false) {
|
|
// timedcheatid = cheatGetByTimedStageIndex(g_MissionConfig.stageindex, g_MissionConfig.difficulty);
|
|
// complcheatid = cheatGetByCompletedStageIndex(g_MissionConfig.stageindex);
|
|
//
|
|
// if (timedcheatid >= 0) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0x0100 | timedcheatid;
|
|
// }
|
|
//
|
|
// if (complcheatid >= 0) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x1000 | (complcheatid << 16);
|
|
// }
|
|
// }
|
|
//
|
|
// // Push the endscreen
|
|
// if (g_Vars.currentplayer->isdead
|
|
// || g_Vars.currentplayer->aborted
|
|
// || !objectiveIsAllComplete()) {
|
|
// menuPushRootDialog(&g_MenuDialogSoloEndscreenFailed, MENUROOT_ENDSCREEN);
|
|
// } else {
|
|
// menuPushRootDialog(&g_MenuDialogSoloEndscreenCompleted, MENUROOT_ENDSCREEN);
|
|
//
|
|
// if (g_MissionConfig.iscoop) {
|
|
// endscreenSetCoopCompleted();
|
|
// }
|
|
// }
|
|
//
|
|
// if (g_MissionConfig.iscoop == false && g_MissionConfig.isanti == false) {
|
|
// timedalreadyunlocked = false;
|
|
// complalreadyunlocked = false;
|
|
//
|
|
// // If there's a timed cheat for this stage + difficulty
|
|
// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x100) {
|
|
// timedalreadyunlocked = cheatIsUnlocked(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff);
|
|
//
|
|
// if (timedalreadyunlocked) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x400;
|
|
// }
|
|
// }
|
|
//
|
|
// // If there's a completion cheat for this stage (ie. not a special stage)
|
|
// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x1000) {
|
|
// complalreadyunlocked = cheatIsUnlocked((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff);
|
|
// }
|
|
//
|
|
// // Update total mission time
|
|
// secs = getMissionTime() / 60;
|
|
//
|
|
// if (secs != 0) {
|
|
// if (secs >= S32_MAX || S32_MAX - secs <= g_SoloSaveFile.totaltime) {
|
|
// g_SoloSaveFile.totaltime = S32_MAX;
|
|
// } else {
|
|
// g_SoloSaveFile.totaltime += secs;
|
|
// }
|
|
// }
|
|
//
|
|
// g_SoloSaveFile.autostageindex = g_MissionConfig.stageindex;
|
|
// g_SoloSaveFile.autodifficulty = g_MissionConfig.difficulty;
|
|
//
|
|
// if (g_CheatsActiveBank0 == 0
|
|
// && g_CheatsActiveBank1 == 0
|
|
// && g_MissionConfig.pdmode == false
|
|
// && g_Vars.currentplayer->isdead == false
|
|
// && g_Vars.currentplayer->aborted == false
|
|
// && objectiveIsAllComplete()) {
|
|
// secs = getMissionTime() / 60;
|
|
//
|
|
// // The save file allows 12 bits per time, which is up to
|
|
// // 1h 8m 16s. If the timer is higher than this, reduce it.
|
|
// if (secs > 0xfff) {
|
|
// secs = 0xfff;
|
|
// }
|
|
//
|
|
// // Zero is used as an indicator that the stage is not completed,
|
|
// // so if the player managed to legitly complete a stage in 0:00
|
|
// // adjust it to 0:01.
|
|
// if (secs == 0) {
|
|
// secs = 1;
|
|
// }
|
|
//
|
|
// // Set best time
|
|
// prevbest = g_SoloSaveFile.besttimes[g_MissionConfig.stageindex][g_MissionConfig.difficulty];
|
|
//
|
|
// if (prevbest == 0) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = true;
|
|
// }
|
|
//
|
|
// if (secs < prevbest || prevbest == 0) {
|
|
// g_SoloSaveFile.besttimes[g_MissionConfig.stageindex][g_MissionConfig.difficulty] = secs;
|
|
// }
|
|
//
|
|
// // Recalculate thumbnail for file select screen
|
|
// if (g_MissionConfig.stageindex <= SOLOSTAGEINDEX_SKEDARRUINS) {
|
|
// g_SoloSaveFile.autostageindex = g_MissionConfig.stageindex + 1;
|
|
//
|
|
// if (g_SoloSaveFile.autostageindex > SOLOSTAGEINDEX_SKEDARRUINS) {
|
|
// g_SoloSaveFile.autostageindex = SOLOSTAGEINDEX_SKEDARRUINS;
|
|
// }
|
|
//
|
|
// for (d = 0; d != 3; d++) {
|
|
// for (s = 0; s <= SOLOSTAGEINDEX_SKEDARRUINS; s++) {
|
|
// if (g_SoloSaveFile.besttimes[s][d]) {
|
|
// g_SoloSaveFile.thumbnail = s + 1;
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x100) {
|
|
// nowunlocked = cheatIsUnlocked(g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0xff);
|
|
//
|
|
// if (!timedalreadyunlocked && nowunlocked) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x0200;
|
|
// }
|
|
// }
|
|
//
|
|
// if (g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo & 0x1000) {
|
|
// nowunlocked = cheatIsUnlocked((g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo >> 16) & 0xff);
|
|
//
|
|
// if (!complalreadyunlocked && nowunlocked) {
|
|
// g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo |= 0x0800;
|
|
// }
|
|
// }
|
|
//
|
|
// func0f19afdc();
|
|
//
|
|
// if (g_MissionConfig.stagenum == STAGE_SKEDARRUINS && var800a2328[3] == 0) {
|
|
// var800a2328[3] = 1;
|
|
// g_AltTitle = true;
|
|
// func0f1109c0();
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
// func0f1094e4(&var800a22c0, 0, 0);
|
|
// }
|
|
//
|
|
// if (g_MenuData.root == MENUROOT_ENDSCREEN) {
|
|
// soloSetPaused(true);
|
|
// g_Vars.currentplayer->pausemode = PAUSEMODE_3;
|
|
// }
|
|
//}
|
|
|
|
struct menudialog g_MenuDialogSolo2PEndscreenCompletedWide = {
|
|
MENUDIALOGTYPE_SUCCESS,
|
|
(u32)&menuTitleStageCompleted,
|
|
g_MenuItemsSoloEndscreenWide,
|
|
menudialogSolo2PEndscreenCompleted,
|
|
0x00000048,
|
|
&g_MenuDialogObjectivesCompletedWide,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogSolo2PEndscreenFailedWide = {
|
|
MENUDIALOGTYPE_DANGER,
|
|
(u32)&menuTitleStageFailed,
|
|
g_MenuItemsSoloEndscreenWide,
|
|
menudialogSolo2PEndscreenFailed,
|
|
0x00000048,
|
|
&g_MenuDialogObjectivesFailedWide,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogSolo2PEndscreenCompletedNarrow = {
|
|
MENUDIALOGTYPE_SUCCESS,
|
|
L_OPTIONS(276), // "Completed"
|
|
g_MenuItemsSoloEndscreenNarrow,
|
|
menudialogSolo2PEndscreenCompleted,
|
|
0x00000048,
|
|
&g_MenuDialogObjectivesCompletedNarrow,
|
|
};
|
|
|
|
struct menudialog g_MenuDialogSolo2PEndscreenFailedNarrow = {
|
|
MENUDIALOGTYPE_DANGER,
|
|
L_OPTIONS(277), // "Failed"
|
|
g_MenuItemsSoloEndscreenNarrow,
|
|
menudialogSolo2PEndscreenFailed,
|
|
0x00000048,
|
|
&g_MenuDialogObjectivesFailedNarrow,
|
|
};
|
|
|
|
void soloPushCoopModeEndscreen(void)
|
|
{
|
|
u32 prevplayernum = g_MpPlayerNum;
|
|
|
|
soloSetPaused(true);
|
|
|
|
g_MpPlayerNum = g_Vars.currentplayerstats->mpindex;
|
|
|
|
g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0;
|
|
g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = false;
|
|
g_Menus[g_MpPlayerNum].data.endscreen.stageindex = g_MissionConfig.stageindex;
|
|
g_Menus[g_MpPlayerNum].playernum = g_Vars.currentplayernum;
|
|
|
|
if ((g_Vars.bond->isdead && g_Vars.coop->isdead)
|
|
|| g_Vars.bond->aborted
|
|
|| g_Vars.coop->aborted
|
|
|| !objectiveIsAllComplete()) {
|
|
// Failed or aborted
|
|
if (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenFailedNarrow, MENUROOT_MPENDSCREEN);
|
|
} else {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenFailedWide, MENUROOT_MPENDSCREEN);
|
|
}
|
|
} else {
|
|
// Completed
|
|
if (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenCompletedNarrow, MENUROOT_MPENDSCREEN);
|
|
} else {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenCompletedWide, MENUROOT_MPENDSCREEN);
|
|
}
|
|
|
|
endscreenSetCoopCompleted();
|
|
}
|
|
|
|
if (g_Vars.currentplayer == g_Vars.bond) {
|
|
func0f1094e4(&var800a22c0, 0, 0);
|
|
}
|
|
|
|
g_MpPlayerNum = prevplayernum;
|
|
}
|
|
|
|
/**
|
|
* This function is misnamed. It pushes the menu after the endscreen
|
|
* (ie. retry, next mission or continue), and it looks like it might be for coop
|
|
* only but I'm not 100% sure.
|
|
*
|
|
* This function is only called from menuTickAll, which is a bit weird...
|
|
*/
|
|
void soloPushSoloModeEndscreen(void)
|
|
{
|
|
u32 prevplayernum = g_MpPlayerNum;
|
|
|
|
g_MpPlayerNum = 0;
|
|
g_Menus[g_MpPlayerNum].playernum = 0;
|
|
|
|
if ((g_Vars.bond->isdead && g_Vars.coop->isdead)
|
|
|| g_Vars.bond->aborted
|
|
|| g_Vars.coop->aborted
|
|
|| !objectiveIsAllComplete()) {
|
|
// Failed or aborted
|
|
func0f10d770();
|
|
menuPushRootDialog(&g_MenuDialogRetryMission, MENUROOT_9);
|
|
} else {
|
|
// Completed
|
|
endscreenHandleContinue(1);
|
|
}
|
|
|
|
g_MpPlayerNum = prevplayernum;
|
|
}
|
|
|
|
void soloPushAntiModeEndscreen(void)
|
|
{
|
|
u32 prevplayernum = g_MpPlayerNum;
|
|
|
|
soloSetPaused(true);
|
|
|
|
g_MpPlayerNum = g_Vars.currentplayerstats->mpindex;
|
|
|
|
g_Menus[g_MpPlayerNum].data.endscreen.cheatinfo = 0;
|
|
g_Menus[g_MpPlayerNum].data.endscreen.isfirstcompletion = false;
|
|
g_Menus[g_MpPlayerNum].data.endscreen.stageindex = g_MissionConfig.stageindex;
|
|
g_Menus[g_MpPlayerNum].playernum = g_Vars.currentplayernum;
|
|
|
|
if (g_Vars.currentplayer == g_Vars.bond) {
|
|
if (g_Vars.anti->aborted == 0 &&
|
|
(g_Vars.bond->isdead || g_Vars.bond->aborted || objectiveIsAllComplete() == false)) {
|
|
// Bond - failed or aborted
|
|
if (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenFailedNarrow, MENUROOT_MPENDSCREEN);
|
|
} else {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenFailedWide, MENUROOT_MPENDSCREEN);
|
|
}
|
|
} else {
|
|
// Bond - completed
|
|
if (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenCompletedNarrow, MENUROOT_MPENDSCREEN);
|
|
} else {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenCompletedWide, MENUROOT_MPENDSCREEN);
|
|
}
|
|
}
|
|
|
|
func0f1094e4(&var800a22c0, 0, 0);
|
|
} else {
|
|
if (g_Vars.anti->aborted == 0 &&
|
|
(g_Vars.bond->isdead || g_Vars.bond->aborted || objectiveIsAllComplete() == false)) {
|
|
// Anti - completed
|
|
if (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenCompletedNarrow, MENUROOT_MPENDSCREEN);
|
|
} else {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenCompletedWide, MENUROOT_MPENDSCREEN);
|
|
}
|
|
} else {
|
|
// Anti - failed or aborted
|
|
if (optionsGetScreenSplit() == SCREENSPLIT_VERTICAL) {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenFailedNarrow, MENUROOT_MPENDSCREEN);
|
|
} else {
|
|
menuPushRootDialog(&g_MenuDialogSolo2PEndscreenFailedWide, MENUROOT_MPENDSCREEN);
|
|
}
|
|
}
|
|
}
|
|
|
|
g_MpPlayerNum = prevplayernum;
|
|
}
|
|
|
|
u32 var80075bb4 = 0;
|
|
u32 var80075bb8 = 0;
|