Merge branch 'menu-reordering' into 'master'

Menu reordering (also renaming secrets to extras)

See merge request STJr/SRB2Internal!511
This commit is contained in:
MascaraSnake 2019-11-23 17:51:46 -05:00
commit a24949cfa6
5 changed files with 52 additions and 60 deletions

View file

@ -4349,9 +4349,9 @@ static void Command_Isgamemodified_f(void)
if (savemoddata) if (savemoddata)
CONS_Printf(M_GetText("modifiedgame is true, but you can save emblem and time data in this mod.\n")); CONS_Printf(M_GetText("modifiedgame is true, but you can save emblem and time data in this mod.\n"));
else if (modifiedgame) else if (modifiedgame)
CONS_Printf(M_GetText("modifiedgame is true, secrets will not be unlocked\n")); CONS_Printf(M_GetText("modifiedgame is true, extras will not be unlocked\n"));
else else
CONS_Printf(M_GetText("modifiedgame is false, you can unlock secrets\n")); CONS_Printf(M_GetText("modifiedgame is false, you can unlock extras\n"));
} }
static void Command_Cheats_f(void) static void Command_Cheats_f(void)

View file

@ -8897,7 +8897,7 @@ static const char *const MENUTYPES_LIST[] = {
"OP_SCREENSHOTS", "OP_SCREENSHOTS",
"OP_ERASEDATA", "OP_ERASEDATA",
// Secrets // Extras
"SR_MAIN", "SR_MAIN",
"SR_PANDORA", "SR_PANDORA",
"SR_LEVELSELECT", "SR_LEVELSELECT",

View file

@ -1386,7 +1386,7 @@ boolean F_CreditResponder(event_t *event)
void F_StartGameEvaluation(void) void F_StartGameEvaluation(void)
{ {
// Credits option in secrets menu // Credits option in extras menu
if (cursaveslot == -1) if (cursaveslot == -1)
{ {
S_FadeOutStopMusic(2*MUSICRATE); S_FadeOutStopMusic(2*MUSICRATE);
@ -1541,9 +1541,9 @@ void F_GameEvaluationDrawer(void)
} }
} }
else if (netgame) else if (netgame)
V_DrawString(8, 96, V_YELLOWMAP, "Prizes only\nawarded in\nsingle player!"); V_DrawString(8, 96, V_YELLOWMAP, "Multiplayer games\ncan't unlock\nextras!");
else else
V_DrawString(8, 96, V_YELLOWMAP, "Prizes not\nawarded in\nmodified games!"); V_DrawString(8, 96, V_YELLOWMAP, "Modified games\ncan't unlock\nextras!");
} }
#endif #endif
} }
@ -1590,7 +1590,7 @@ void F_GameEvaluationTicker(void)
{ {
HU_SetCEchoFlags(V_YELLOWMAP|V_RETURN8); HU_SetCEchoFlags(V_YELLOWMAP|V_RETURN8);
HU_SetCEchoDuration(6); HU_SetCEchoDuration(6);
HU_DoCEcho("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Prizes only awarded in singleplayer!"); HU_DoCEcho("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Multiplayer games can't unlock extras!");
S_StartSound(NULL, sfx_s3k68); S_StartSound(NULL, sfx_s3k68);
} }
else if (!modifiedgame || savemoddata) else if (!modifiedgame || savemoddata)
@ -1612,7 +1612,7 @@ void F_GameEvaluationTicker(void)
{ {
HU_SetCEchoFlags(V_YELLOWMAP|V_RETURN8); HU_SetCEchoFlags(V_YELLOWMAP|V_RETURN8);
HU_SetCEchoDuration(6); HU_SetCEchoDuration(6);
HU_DoCEcho("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Prizes not awarded in modified games!"); HU_DoCEcho("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Modified games can't unlock extras!");
S_StartSound(NULL, sfx_s3k68); S_StartSound(NULL, sfx_s3k68);
} }
} }

View file

@ -312,9 +312,7 @@ menu_t OP_VideoOptionsDef, OP_VideoModeDef, OP_ColorOptionsDef;
menu_t OP_OpenGLOptionsDef, OP_OpenGLFogDef, OP_OpenGLColorDef; menu_t OP_OpenGLOptionsDef, OP_OpenGLFogDef, OP_OpenGLColorDef;
#endif #endif
menu_t OP_SoundOptionsDef; menu_t OP_SoundOptionsDef;
#ifdef HAVE_MIXERX
menu_t OP_SoundAdvancedDef; menu_t OP_SoundAdvancedDef;
#endif
//Misc //Misc
menu_t OP_DataOptionsDef, OP_ScreenshotOptionsDef, OP_EraseDataDef; menu_t OP_DataOptionsDef, OP_ScreenshotOptionsDef, OP_EraseDataDef;
@ -474,25 +472,25 @@ static consvar_t cv_dummymares = {"dummymares", "Overall", CV_HIDEN|CV_CALL, dum
// --------- // ---------
static menuitem_t MainMenu[] = static menuitem_t MainMenu[] =
{ {
{IT_STRING|IT_CALL, NULL, "Secrets", M_SecretsMenu, 76}, {IT_STRING|IT_CALL, NULL, "1 Player", M_SinglePlayerMenu, 76},
{IT_STRING|IT_CALL, NULL, "1 player", M_SinglePlayerMenu, 84},
#ifndef NONET #ifndef NONET
{IT_STRING|IT_SUBMENU, NULL, "multiplayer", &MP_MainDef, 92}, {IT_STRING|IT_SUBMENU, NULL, "Multiplayer", &MP_MainDef, 84},
#else #else
{IT_STRING|IT_CALL, NULL, "multiplayer", M_StartSplitServerMenu, 92}, {IT_STRING|IT_CALL, NULL, "Multiplayer", M_StartSplitServerMenu, 84},
#endif #endif
{IT_STRING|IT_CALL, NULL, "options", M_Options, 100}, {IT_STRING|IT_CALL, NULL, "Extras", M_SecretsMenu, 92},
{IT_CALL |IT_STRING, NULL, "addons", M_Addons, 108}, {IT_CALL |IT_STRING, NULL, "Addons", M_Addons, 100},
{IT_STRING|IT_CALL, NULL, "quit game", M_QuitSRB2, 116}, {IT_STRING|IT_CALL, NULL, "Options", M_Options, 108},
{IT_STRING|IT_CALL, NULL, "Quit Game", M_QuitSRB2, 116},
}; };
typedef enum typedef enum
{ {
secrets = 0, singleplr = 0,
singleplr,
multiplr, multiplr,
options, secrets,
addons, addons,
options,
quitdoom quitdoom
} main_e; } main_e;
@ -661,7 +659,7 @@ static menuitem_t SR_PandorasBox[] =
// Sky Room Custom Unlocks // Sky Room Custom Unlocks
static menuitem_t SR_MainMenu[] = static menuitem_t SR_MainMenu[] =
{ {
{IT_STRING|IT_SUBMENU,NULL, "Secrets Checklist", &SR_UnlockChecklistDef, 0}, {IT_STRING|IT_SUBMENU,NULL, "Extras Checklist", &SR_UnlockChecklistDef, 0},
{IT_DISABLED, NULL, "", NULL, 0}, // Custom1 {IT_DISABLED, NULL, "", NULL, 0}, // Custom1
{IT_DISABLED, NULL, "", NULL, 0}, // Custom2 {IT_DISABLED, NULL, "", NULL, 0}, // Custom2
{IT_DISABLED, NULL, "", NULL, 0}, // Custom3 {IT_DISABLED, NULL, "", NULL, 0}, // Custom3
@ -726,19 +724,19 @@ static menuitem_t SR_EmblemHintMenu[] =
// Single Player Main // Single Player Main
static menuitem_t SP_MainMenu[] = static menuitem_t SP_MainMenu[] =
{ {
{IT_CALL | IT_STRING, NULL, "Tutorial", M_StartTutorial, 84}, {IT_CALL | IT_STRING, NULL, "Start Game", M_LoadGame, 84},
{IT_CALL | IT_STRING, NULL, "Start Game", M_LoadGame, 92}, {IT_SECRET, NULL, "Record Attack", M_TimeAttack, 92},
{IT_SECRET, NULL, "Record Attack", M_TimeAttack, 100}, {IT_SECRET, NULL, "NiGHTS Mode", M_NightsAttack, 100},
{IT_SECRET, NULL, "NiGHTS Mode", M_NightsAttack, 108}, {IT_CALL | IT_STRING, NULL, "Tutorial", M_StartTutorial, 108},
{IT_CALL | IT_STRING | IT_CALL_NOTMODIFIED, NULL, "Statistics", M_Statistics, 116}, {IT_CALL | IT_STRING | IT_CALL_NOTMODIFIED, NULL, "Statistics", M_Statistics, 116}
}; };
enum enum
{ {
sptutorial,
sploadgame, sploadgame,
sprecordattack, sprecordattack,
spnightsmode, spnightsmode,
sptutorial,
spstatistics spstatistics
}; };
@ -1348,29 +1346,22 @@ static menuitem_t OP_OpenGLColorMenu[] =
static menuitem_t OP_SoundOptionsMenu[] = static menuitem_t OP_SoundOptionsMenu[] =
{ {
{IT_HEADER, NULL, "Game Audio", NULL, 0}, {IT_HEADER, NULL, "Game Audio", NULL, 0},
{IT_STRING | IT_CVAR, NULL, "Sound Effects", &cv_gamesounds, 6}, {IT_STRING | IT_CVAR, NULL, "Sound Effects", &cv_gamesounds, 12},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Sound Volume", &cv_soundvolume, 11}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Sound Volume", &cv_soundvolume, 22},
{IT_STRING | IT_CVAR, NULL, "Digital Music", &cv_gamedigimusic, 21}, {IT_STRING | IT_CVAR, NULL, "Digital Music", &cv_gamedigimusic, 42},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Digital Music Volume", &cv_digmusicvolume, 26}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Digital Music Volume", &cv_digmusicvolume, 52},
{IT_STRING | IT_CVAR, NULL, "MIDI Music", &cv_gamemidimusic, 36}, {IT_STRING | IT_CVAR, NULL, "MIDI Music", &cv_gamemidimusic, 72},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "MIDI Music Volume", &cv_midimusicvolume, 41}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "MIDI Music Volume", &cv_midimusicvolume, 82},
{IT_HEADER, NULL, "Accessibility", NULL, 50}, {IT_HEADER, NULL, "Miscellaneous", NULL, 102},
{IT_STRING | IT_CVAR, NULL, "Closed Captioning", &cv_closedcaptioning, 56}, {IT_STRING | IT_CVAR, NULL, "Closed Captioning", &cv_closedcaptioning, 114},
{IT_STRING | IT_CVAR, NULL, "Reset Music Upon Dying", &cv_resetmusic, 61}, {IT_STRING | IT_CVAR, NULL, "Reset Music Upon Dying", &cv_resetmusic, 124},
{IT_STRING | IT_CVAR, NULL, "Play Sound Effects if Unfocused", &cv_playsoundsifunfocused, 71}, {IT_STRING | IT_SUBMENU, NULL, "Advanced Settings...", &OP_SoundAdvancedDef, 144},
{IT_STRING | IT_CVAR, NULL, "Play Music if Unfocused", &cv_playmusicifunfocused, 76},
#ifdef HAVE_MIXERX
{IT_STRING | IT_SUBMENU, NULL, "Advanced Settings...", &OP_SoundAdvancedDef, 94},
#endif
}; };
#ifdef HAVE_MIXERX
#ifdef HAVE_OPENMPT #ifdef HAVE_OPENMPT
#define OPENMPT_MENUOFFSET 32 #define OPENMPT_MENUOFFSET 32
#else #else
@ -1386,24 +1377,25 @@ static menuitem_t OP_SoundOptionsMenu[] =
static menuitem_t OP_SoundAdvancedMenu[] = static menuitem_t OP_SoundAdvancedMenu[] =
{ {
#ifdef HAVE_OPENMPT #ifdef HAVE_OPENMPT
{IT_HEADER, NULL, "OpenMPT Settings", NULL, 10}, {IT_HEADER, NULL, "OpenMPT Settings", NULL, 0},
{IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 22}, {IT_STRING | IT_CVAR, NULL, "Instrument Filter", &cv_modfilter, 12},
#endif #endif
#ifdef HAVE_MIXERX #ifdef HAVE_MIXERX
{IT_HEADER, NULL, "MIDI Settings", NULL, OPENMPT_MENUOFFSET+10}, {IT_HEADER, NULL, "MIDI Settings", NULL, OPENMPT_MENUOFFSET},
{IT_STRING | IT_CVAR, NULL, "MIDI Player", &cv_midiplayer, OPENMPT_MENUOFFSET+22}, {IT_STRING | IT_CVAR, NULL, "MIDI Player", &cv_midiplayer, OPENMPT_MENUOFFSET+12},
{IT_STRING | IT_CVAR | IT_CV_STRING, NULL, "FluidSynth Sound Font File", &cv_midisoundfontpath, OPENMPT_MENUOFFSET+34}, {IT_STRING | IT_CVAR | IT_CV_STRING, NULL, "FluidSynth Sound Font File", &cv_midisoundfontpath, OPENMPT_MENUOFFSET+24},
{IT_STRING | IT_CVAR | IT_CV_STRING, NULL, "TiMidity++ Config Folder", &cv_miditimiditypath, OPENMPT_MENUOFFSET+61}, {IT_STRING | IT_CVAR | IT_CV_STRING, NULL, "TiMidity++ Config Folder", &cv_miditimiditypath, OPENMPT_MENUOFFSET+51},
#endif #endif
{IT_HEADER, NULL, "Miscellaneous", NULL, OPENMPT_MENUOFFSET+MIXERX_MENUOFFSET+10}, {IT_HEADER, NULL, "Miscellaneous", NULL, OPENMPT_MENUOFFSET+MIXERX_MENUOFFSET},
{IT_STRING | IT_CVAR, NULL, "Let Levels Force Reset Music", &cv_resetmusicbyheader, OPENMPT_MENUOFFSET+MIXERX_MENUOFFSET+22}, {IT_STRING | IT_CVAR, NULL, "Play Sound Effects if Unfocused", &cv_playsoundsifunfocused, OPENMPT_MENUOFFSET+MIXERX_MENUOFFSET+12},
{IT_STRING | IT_CVAR, NULL, "Play Music if Unfocused", &cv_playmusicifunfocused, OPENMPT_MENUOFFSET+MIXERX_MENUOFFSET+22},
{IT_STRING | IT_CVAR, NULL, "Let Levels Force Reset Music", &cv_resetmusicbyheader, OPENMPT_MENUOFFSET+MIXERX_MENUOFFSET+32},
}; };
#undef OPENMPT_MENUOFFSET #undef OPENMPT_MENUOFFSET
#undef MIXERX_MENUOFFSET #undef MIXERX_MENUOFFSET
#endif
static menuitem_t OP_DataOptionsMenu[] = static menuitem_t OP_DataOptionsMenu[] =
{ {
@ -1455,7 +1447,7 @@ enum
static menuitem_t OP_EraseDataMenu[] = static menuitem_t OP_EraseDataMenu[] =
{ {
{IT_STRING | IT_CALL, NULL, "Erase Record Data", M_EraseData, 10}, {IT_STRING | IT_CALL, NULL, "Erase Record Data", M_EraseData, 10},
{IT_STRING | IT_CALL, NULL, "Erase Secrets Data", M_EraseData, 20}, {IT_STRING | IT_CALL, NULL, "Erase Extras Data", M_EraseData, 20},
{IT_STRING | IT_CALL, NULL, "\x85" "Erase ALL Data", M_EraseData, 40}, {IT_STRING | IT_CALL, NULL, "\x85" "Erase ALL Data", M_EraseData, 40},
}; };
@ -1666,7 +1658,7 @@ menu_t SP_MainDef = //CENTERMENUSTYLE(NULL, SP_MainMenu, &MainDef, 72);
SP_MainMenu, SP_MainMenu,
M_DrawCenteredMenu, M_DrawCenteredMenu,
BASEVIDWIDTH/2, 72, BASEVIDWIDTH/2, 72,
1, // start at "Start Game" on first entry 0,
NULL NULL
}; };
@ -1992,12 +1984,10 @@ menu_t OP_ColorOptionsDef =
0, 0,
NULL NULL
}; };
menu_t OP_SoundOptionsDef = DEFAULTSCROLLMENUSTYLE( menu_t OP_SoundOptionsDef = DEFAULTMENUSTYLE(
MN_OP_MAIN + (MN_OP_SOUND << 6), MN_OP_MAIN + (MN_OP_SOUND << 6),
"M_SOUND", OP_SoundOptionsMenu, &OP_MainDef, 30, 30); "M_SOUND", OP_SoundOptionsMenu, &OP_MainDef, 30, 30);
#ifdef HAVE_MIXERX
menu_t OP_SoundAdvancedDef = DEFAULTMENUSTYLE(MN_OP_MAIN + (MN_OP_SOUND << 6), "M_SOUND", OP_SoundAdvancedMenu, &OP_SoundOptionsDef, 30, 30); menu_t OP_SoundAdvancedDef = DEFAULTMENUSTYLE(MN_OP_MAIN + (MN_OP_SOUND << 6), "M_SOUND", OP_SoundAdvancedMenu, &OP_SoundOptionsDef, 30, 30);
#endif
menu_t OP_ServerOptionsDef = DEFAULTSCROLLMENUSTYLE( menu_t OP_ServerOptionsDef = DEFAULTSCROLLMENUSTYLE(
MN_OP_MAIN + (MN_OP_SERVER << 6), MN_OP_MAIN + (MN_OP_SERVER << 6),
@ -3434,6 +3424,8 @@ void M_StartControlPanel(void)
if (!Playing()) if (!Playing())
{ {
// Secret menu! // Secret menu!
MainMenu[singleplr].alphaKey = (M_AnySecretUnlocked()) ? 76 : 84;
MainMenu[multiplr].alphaKey = (M_AnySecretUnlocked()) ? 84 : 92;
MainMenu[secrets].status = (M_AnySecretUnlocked()) ? (IT_STRING | IT_CALL) : (IT_DISABLED); MainMenu[secrets].status = (M_AnySecretUnlocked()) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
currentMenu = &MainDef; currentMenu = &MainDef;
@ -10905,7 +10897,7 @@ static void M_EraseData(INT32 choice)
if (choice == 0) if (choice == 0)
eschoice = M_GetText("Record Attack data"); eschoice = M_GetText("Record Attack data");
else if (choice == 1) else if (choice == 1)
eschoice = M_GetText("Secrets data"); eschoice = M_GetText("Extras data");
else else
eschoice = M_GetText("ALL game data"); eschoice = M_GetText("ALL game data");

View file

@ -99,7 +99,7 @@ typedef enum
MN_OP_SCREENSHOTS, MN_OP_SCREENSHOTS,
MN_OP_ERASEDATA, MN_OP_ERASEDATA,
// Secrets // Extras
MN_SR_MAIN, MN_SR_MAIN,
MN_SR_PANDORA, MN_SR_PANDORA,
MN_SR_LEVELSELECT, MN_SR_LEVELSELECT,