Menutype header
Also add more than 1 freeslot
This commit is contained in:
parent
eb481b6ac4
commit
8a6a49ce03
3 changed files with 93 additions and 183 deletions
|
|
@ -610,95 +610,9 @@ const char *const HUDITEMS_LIST[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *const MENUTYPES_LIST[] = {
|
const char *const MENUTYPES_LIST[] = {
|
||||||
"NONE",
|
#define _(name, ...) #name,
|
||||||
|
#include "info/menus.h"
|
||||||
"MAIN",
|
#undef _
|
||||||
|
|
||||||
// Single Player
|
|
||||||
"SP_MAIN",
|
|
||||||
|
|
||||||
"SP_LEVELSTATS",
|
|
||||||
|
|
||||||
"SP_TIMEATTACK",
|
|
||||||
"SP_GUESTREPLAY",
|
|
||||||
"SP_REPLAY",
|
|
||||||
"SP_GHOST",
|
|
||||||
|
|
||||||
// Multiplayer
|
|
||||||
"MP_MAIN",
|
|
||||||
"MP_SPLITSCREEN", // SplitServer
|
|
||||||
"MP_SERVER",
|
|
||||||
"MP_CONNECT",
|
|
||||||
"MP_PLAYERSETUP", // MP_PlayerSetupDef shared with SPLITSCREEN if #defined NONET
|
|
||||||
|
|
||||||
// Options
|
|
||||||
"OP_MAIN",
|
|
||||||
|
|
||||||
"OP_CHANGECONTROLS", // OP_ChangeControlsDef shared with P2
|
|
||||||
"OP_JOYSTICKSET", // OP_JoystickSetDef shared with P2
|
|
||||||
"OP_P1CAMERA",
|
|
||||||
|
|
||||||
"OP_P2CAMERA",
|
|
||||||
|
|
||||||
"OP_VIDEO",
|
|
||||||
"OP_VIDEOMODE",
|
|
||||||
"OP_OPENGL",
|
|
||||||
|
|
||||||
"OP_SOUND",
|
|
||||||
|
|
||||||
"OP_SERVER",
|
|
||||||
"OP_MONITORTOGGLE",
|
|
||||||
|
|
||||||
"OP_DATA",
|
|
||||||
"OP_ADDONS",
|
|
||||||
"OP_SCREENSHOTS",
|
|
||||||
"OP_ERASEDATA",
|
|
||||||
|
|
||||||
// Extras
|
|
||||||
"SR_MAIN",
|
|
||||||
"SR_PANDORA",
|
|
||||||
"SR_UNLOCKCHECKLIST",
|
|
||||||
"SR_EMBLEMHINT",
|
|
||||||
"SR_SOUNDTEST",
|
|
||||||
|
|
||||||
// Addons (Part of MISC, but let's make it our own)
|
|
||||||
"AD_MAIN",
|
|
||||||
|
|
||||||
// MISC
|
|
||||||
// "MESSAGE",
|
|
||||||
"SPAUSE",
|
|
||||||
|
|
||||||
"MPAUSE",
|
|
||||||
"SCRAMBLETEAM",
|
|
||||||
"CHANGETEAM",
|
|
||||||
"CHANGELEVEL",
|
|
||||||
|
|
||||||
"MAPAUSE",
|
|
||||||
"HELP",
|
|
||||||
|
|
||||||
// SRB2Kart
|
|
||||||
"OP_HUD",
|
|
||||||
"OP_CHAT",
|
|
||||||
"OP_GAME",
|
|
||||||
"OP_BLANKARTGAME",
|
|
||||||
"OP_ADVANCEDSERVER",
|
|
||||||
"OP_CAMERA",
|
|
||||||
"OP_P3CAMERA",
|
|
||||||
"OP_P4CAMERA",
|
|
||||||
"MISC_REPLAYOPTIONS",
|
|
||||||
"SP_GRANDPRIX",
|
|
||||||
"MISC_REPLAYHUT",
|
|
||||||
"CHANGESPECTATE",
|
|
||||||
"MISC_REPLAYSTART",
|
|
||||||
"PLAYBACK",
|
|
||||||
"OP_CONTROLSETUP",
|
|
||||||
"OP_GAMEHUD",
|
|
||||||
"OP_VISUAL",
|
|
||||||
|
|
||||||
#ifdef HAVE_DISCORDRPC
|
|
||||||
"OP_DISCORD",
|
|
||||||
"MISC_DISCORDREQUESTS",
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct menu_routine_s const MENU_ROUTINES[] = {
|
struct menu_routine_s const MENU_ROUTINES[] = {
|
||||||
|
|
|
||||||
85
src/info/menus.h
Normal file
85
src/info/menus.h
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
_(NONE)
|
||||||
|
|
||||||
|
_(MAIN)
|
||||||
|
_(PLAYBACK)
|
||||||
|
|
||||||
|
// Single Player
|
||||||
|
_(SP_MAIN)
|
||||||
|
_(SP_GRANDPRIX)
|
||||||
|
_(SP_TIMEATTACK)
|
||||||
|
_(SP_GUESTREPLAY)
|
||||||
|
_(SP_REPLAY)
|
||||||
|
_(SP_GHOST)
|
||||||
|
|
||||||
|
// Multiplayer
|
||||||
|
_(MP_MAIN)
|
||||||
|
_(MP_SPLITSCREEN) // SplitServer
|
||||||
|
_(MP_SERVER)
|
||||||
|
_(MP_CONNECT)
|
||||||
|
_(MP_PLAYERSETUP)
|
||||||
|
|
||||||
|
// Options
|
||||||
|
_(OP_MAIN)
|
||||||
|
|
||||||
|
_(OP_CONTROLSETUP)
|
||||||
|
_(OP_CHANGECONTROLS)
|
||||||
|
_(OP_JOYSTICKSET)
|
||||||
|
|
||||||
|
_(OP_VIDEO)
|
||||||
|
_(OP_VIDEOMODE)
|
||||||
|
_(OP_VISUAL)
|
||||||
|
_(OP_OPENGL)
|
||||||
|
|
||||||
|
_(OP_SOUND)
|
||||||
|
_(SR_SOUNDTEST)
|
||||||
|
|
||||||
|
_(OP_HUD)
|
||||||
|
_(OP_CHAT)
|
||||||
|
_(OP_GAMEHUD)
|
||||||
|
|
||||||
|
_(OP_CAMERA)
|
||||||
|
_(OP_P1CAMERA)
|
||||||
|
_(OP_P2CAMERA)
|
||||||
|
_(OP_P3CAMERA)
|
||||||
|
_(OP_P4CAMERA)
|
||||||
|
|
||||||
|
_(OP_GAME)
|
||||||
|
_(OP_BLANKARTGAME)
|
||||||
|
|
||||||
|
_(OP_SERVER)
|
||||||
|
_(OP_MONITORTOGGLE)
|
||||||
|
_(OP_ADVANCEDSERVER)
|
||||||
|
|
||||||
|
_(OP_DATA)
|
||||||
|
_(OP_SCREENSHOTS)
|
||||||
|
_(OP_ADDONS)
|
||||||
|
_(MISC_REPLAYOPTIONS)
|
||||||
|
_(OP_ERASEDATA)
|
||||||
|
#ifdef HAVE_DISCORDRPC
|
||||||
|
_(OP_DISCORD)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Extras
|
||||||
|
_(SR_MAIN)
|
||||||
|
_(SP_LEVELSTATS)
|
||||||
|
_(SR_UNLOCKCHECKLIST)
|
||||||
|
_(MISC_REPLAYHUT)
|
||||||
|
_(MISC_REPLAYSTART)
|
||||||
|
_(SR_PANDORA)
|
||||||
|
_(SR_EMBLEMHINT)
|
||||||
|
|
||||||
|
// Addons (Part of MISC, but let's make it our own)
|
||||||
|
_(AD_MAIN)
|
||||||
|
|
||||||
|
// MISC
|
||||||
|
_(HELP)
|
||||||
|
_(SPAUSE)
|
||||||
|
_(MPAUSE)
|
||||||
|
_(MAPAUSE)
|
||||||
|
_(SCRAMBLETEAM)
|
||||||
|
_(CHANGETEAM)
|
||||||
|
_(CHANGELEVEL)
|
||||||
|
_(CHANGESPECTATE)
|
||||||
|
#ifdef HAVE_DISCORDRPC
|
||||||
|
_(MISC_DISCORDREQUESTS)
|
||||||
|
#endif
|
||||||
99
src/m_menu.h
99
src/m_menu.h
|
|
@ -38,105 +38,16 @@ extern "C" {
|
||||||
#define NUMMENULEVELS 8
|
#define NUMMENULEVELS 8
|
||||||
|
|
||||||
// Menu IDs sectioned by numeric places to signify hierarchy
|
// Menu IDs sectioned by numeric places to signify hierarchy
|
||||||
/**
|
|
||||||
* IF YOU MODIFY THIS, MODIFY MENUTYPES_LIST[] IN dehacked.c TO MATCH.
|
|
||||||
*/
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
MN_NONE,
|
#define _(name, ...) MN_##name,
|
||||||
|
#include "info/menus.h"
|
||||||
MN_MAIN,
|
#undef _
|
||||||
|
|
||||||
// Single Player
|
|
||||||
MN_SP_MAIN,
|
|
||||||
|
|
||||||
MN_SP_LEVELSTATS,
|
|
||||||
|
|
||||||
MN_SP_TIMEATTACK,
|
|
||||||
MN_SP_GUESTREPLAY,
|
|
||||||
MN_SP_REPLAY,
|
|
||||||
MN_SP_GHOST,
|
|
||||||
|
|
||||||
// Multiplayer
|
|
||||||
MN_MP_MAIN,
|
|
||||||
MN_MP_SPLITSCREEN, // SplitServer
|
|
||||||
MN_MP_SERVER,
|
|
||||||
MN_MP_CONNECT,
|
|
||||||
MN_MP_PLAYERSETUP, // MP_PlayerSetupDef shared with SPLITSCREEN if #defined NONET
|
|
||||||
|
|
||||||
// Options
|
|
||||||
MN_OP_MAIN,
|
|
||||||
|
|
||||||
MN_OP_CHANGECONTROLS, // OP_ChangeControlsDef shared with P2
|
|
||||||
MN_OP_JOYSTICKSET, // OP_JoystickSetDef shared with P2
|
|
||||||
MN_OP_P1CAMERA,
|
|
||||||
MN_OP_P2CAMERA,
|
|
||||||
|
|
||||||
|
|
||||||
MN_OP_VIDEO,
|
|
||||||
MN_OP_VIDEOMODE,
|
|
||||||
MN_OP_OPENGL,
|
|
||||||
|
|
||||||
MN_OP_SOUND,
|
|
||||||
|
|
||||||
MN_OP_SERVER,
|
|
||||||
MN_OP_MONITORTOGGLE,
|
|
||||||
|
|
||||||
MN_OP_DATA,
|
|
||||||
MN_OP_ADDONS,
|
|
||||||
MN_OP_SCREENSHOTS,
|
|
||||||
MN_OP_ERASEDATA,
|
|
||||||
|
|
||||||
// Extras
|
|
||||||
MN_SR_MAIN,
|
|
||||||
MN_SR_PANDORA,
|
|
||||||
MN_SR_UNLOCKCHECKLIST,
|
|
||||||
MN_SR_EMBLEMHINT,
|
|
||||||
MN_SR_SOUNDTEST,
|
|
||||||
|
|
||||||
// Addons (Part of MISC, but let's make it our own)
|
|
||||||
MN_AD_MAIN,
|
|
||||||
|
|
||||||
// MISC
|
|
||||||
// MN_MESSAGE,
|
|
||||||
MN_SPAUSE,
|
|
||||||
|
|
||||||
MN_MPAUSE,
|
|
||||||
MN_SCRAMBLETEAM,
|
|
||||||
MN_CHANGETEAM,
|
|
||||||
MN_CHANGELEVEL,
|
|
||||||
|
|
||||||
MN_MAPAUSE,
|
|
||||||
MN_HELP,
|
|
||||||
|
|
||||||
// SRB2Kart
|
|
||||||
MN_OP_HUD,
|
|
||||||
MN_OP_CHAT,
|
|
||||||
MN_OP_GAME,
|
|
||||||
MN_OP_BLANKARTGAME,
|
|
||||||
MN_OP_ADVANCEDSERVER,
|
|
||||||
MN_OP_CAMERA,
|
|
||||||
MN_OP_P3CAMERA,
|
|
||||||
MN_OP_P4CAMERA,
|
|
||||||
MN_MISC_REPLAYOPTIONS,
|
|
||||||
MN_SP_GRANDPRIX,
|
|
||||||
MN_MISC_REPLAYHUT,
|
|
||||||
MN_CHANGESPECTATE,
|
|
||||||
MN_MISC_REPLAYSTART,
|
|
||||||
MN_PLAYBACK,
|
|
||||||
MN_OP_CONTROLSETUP,
|
|
||||||
MN_OP_GAMEHUD,
|
|
||||||
MN_OP_VISUAL,
|
|
||||||
|
|
||||||
#ifdef HAVE_DISCORDRPC
|
|
||||||
MN_OP_DISCORD,
|
|
||||||
MN_MISC_DISCORDREQUESTS,
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MN_FIRSTFREESLOT,
|
MN_FIRSTFREESLOT,
|
||||||
MN_LASTFREESLOT,
|
MN_LASTFREESLOT = MN_FIRSTFREESLOT + 128,
|
||||||
NUMMENUTYPES,
|
NUMMENUTYPES,
|
||||||
} menutype_t; // up to 63
|
} menutype_t;
|
||||||
#define NUMMENUFREESLOTS (NUMMENUTYPES - MN_FIRSTFREESLOT)
|
#define NUMMENUFREESLOTS (NUMMENUTYPES - MN_FIRSTFREESLOT)
|
||||||
|
|
||||||
extern menu_t *menudefs[NUMMENUTYPES];
|
extern menu_t *menudefs[NUMMENUTYPES];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue