forked from Ports/perfect_dark
port: move unlock everything option to cheats
This commit is contained in:
1 parent
5a68daf18c
commit
45a44cd37e
3 files changed
+85
-85
No files matched your search
@@ -1073,83 +1073,6 @@ static MenuItemHandlerResult menuhandlerOpenBindsMenu(s32 operation, struct menu
|
||||
return 0;
|
||||
}
|
||||
|
||||
static MenuItemHandlerResult menuhandlerUnlockEverything(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
gamefileUnlockEverything();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct menuitem g_ConfirmUnlockMenuItems[] = {
|
||||
{
|
||||
MENUITEMTYPE_LABEL,
|
||||
0,
|
||||
MENUITEMFLAG_LITERAL_TEXT,
|
||||
(uintptr_t)"Are you sure?\n\nThis will overwrite any progress\nsaved to the current profile.\n",
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
0,
|
||||
0x00000082,
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_MARQUEE,
|
||||
0,
|
||||
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES | MENUITEMFLAG_LITERAL_TEXT,
|
||||
(uintptr_t)"Unlocks all cheats, weapons, missions, challenges and combat simulator items.\n",
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
0,
|
||||
0x00000082,
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
0,
|
||||
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
|
||||
L_OPTIONS_191, // "No"
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
0,
|
||||
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
|
||||
L_OPTIONS_190, // "Yes"
|
||||
0,
|
||||
menuhandlerUnlockEverything,
|
||||
},
|
||||
{ MENUITEMTYPE_END },
|
||||
};
|
||||
|
||||
struct menudialogdef g_ConfirmUnlockMenuDialog = {
|
||||
MENUDIALOGTYPE_DANGER,
|
||||
L_OPTIONS_188, // "Warning"
|
||||
g_ConfirmUnlockMenuItems,
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static MenuItemHandlerResult menuhandlerUnlockEverythingPrompt(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
menuPushDialog(&g_ConfirmUnlockMenuDialog);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct menuitem g_ExtendedMenuItems[] = {
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
@@ -1191,14 +1114,6 @@ struct menuitem g_ExtendedMenuItems[] = {
|
||||
0,
|
||||
menuhandlerOpenBindsMenu,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
0,
|
||||
MENUITEMFLAG_LITERAL_TEXT,
|
||||
(uintptr_t)"Unlock Everything\n",
|
||||
0,
|
||||
menuhandlerUnlockEverythingPrompt,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
|
||||
@@ -859,6 +859,79 @@ char *cheatGetName(s32 cheat_id)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
|
||||
static MenuItemHandlerResult menuhandlerUnlockEverything(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||
{
|
||||
if (operation == MENUOP_SET) {
|
||||
gamefileUnlockEverything();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct menuitem g_CheatsConfirmUnlockMenuItems[] = {
|
||||
{
|
||||
MENUITEMTYPE_LABEL,
|
||||
0,
|
||||
MENUITEMFLAG_LITERAL_TEXT,
|
||||
(uintptr_t)"Are you sure?\n\nThis will overwrite any progress\nsaved to the current profile.\n",
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
0,
|
||||
0x00000082,
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_MARQUEE,
|
||||
0,
|
||||
MENUITEMFLAG_SMALLFONT | MENUITEMFLAG_MARQUEE_FADEBOTHSIDES | MENUITEMFLAG_LITERAL_TEXT,
|
||||
(uintptr_t)"Unlocks all cheats, weapons, missions, challenges and combat simulator items.\n",
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
0,
|
||||
0x00000082,
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
0,
|
||||
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
|
||||
L_OPTIONS_191, // "No"
|
||||
0,
|
||||
NULL,
|
||||
},
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
0,
|
||||
MENUITEMFLAG_SELECTABLE_CENTRE | MENUITEMFLAG_SELECTABLE_CLOSESDIALOG,
|
||||
L_OPTIONS_190, // "Yes"
|
||||
0,
|
||||
menuhandlerUnlockEverything,
|
||||
},
|
||||
{ MENUITEMTYPE_END },
|
||||
};
|
||||
|
||||
struct menudialogdef g_CheatsConfirmUnlockMenuDialog = {
|
||||
MENUDIALOGTYPE_DANGER,
|
||||
L_OPTIONS_188, // "Warning"
|
||||
g_CheatsConfirmUnlockMenuItems,
|
||||
NULL,
|
||||
0,
|
||||
NULL,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct menuitem g_CheatsFunMenuItems[] = {
|
||||
{
|
||||
MENUITEMTYPE_CHECKBOX,
|
||||
@@ -1538,6 +1611,16 @@ struct menuitem g_CheatsMenuItems[] = {
|
||||
0,
|
||||
cheatMenuHandleTurnOffAllCheats,
|
||||
},
|
||||
#ifndef PLATFORM_N64
|
||||
{
|
||||
MENUITEMTYPE_SELECTABLE,
|
||||
0,
|
||||
MENUITEMFLAG_LITERAL_TEXT | MENUITEMFLAG_SELECTABLE_OPENSDIALOG,
|
||||
(uintptr_t)"Unlock Everything\n",
|
||||
0,
|
||||
(void *)&g_CheatsConfirmUnlockMenuDialog,
|
||||
},
|
||||
#endif
|
||||
{
|
||||
MENUITEMTYPE_SEPARATOR,
|
||||
0,
|
||||
|
||||
@@ -569,6 +569,7 @@ void gamefileGetOverview(char *arg0, char *name, u8 *stage, u8 *difficulty, u32
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_N64
|
||||
|
||||
// Unlock all of the unlockables.
|
||||
// These hacks are taken from the original debug mode.
|
||||
void gamefileUnlockEverything(void)
|
||||
@@ -620,4 +621,5 @@ void gamefileUnlockEverything(void)
|
||||
gamefileSetFlag(GAMEFILEFLAG_CI_ECMMINE_DONE);
|
||||
gamefileSetFlag(GAMEFILEFLAG_CI_UPLINK_DONE);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user