Remove redundant control axes & cleanup

This commit is contained in:
spherallic 2022-12-22 01:40:33 +01:00
parent b772c3a00d
commit 1964869c69
7 changed files with 40 additions and 260 deletions

View file

@ -2177,132 +2177,6 @@ static void CV_EnforceExecVersion(void)
CV_StealthSetValue(&cv_execversion, EXECVERSION);
}
static boolean CV_FilterJoyAxisVars(consvar_t *v, const char *valstr)
{
// If ALL axis settings are previous defaults, set them to the new defaults
// EXECVERSION < 26 (2.1.21)
if (joyaxis_default)
{
if (!stricmp(v->name, "joyaxis_turn"))
{
if (joyaxis_count > 6) return false;
// we're currently setting the new defaults, don't interfere
else if (joyaxis_count == 6) return true;
if (!stricmp(valstr, "X-Axis")) joyaxis_count++;
else joyaxis_default = false;
}
if (!stricmp(v->name, "joyaxis_move"))
{
if (joyaxis_count > 6) return false;
else if (joyaxis_count == 6) return true;
if (!stricmp(valstr, "Y-Axis")) joyaxis_count++;
else joyaxis_default = false;
}
if (!stricmp(v->name, "joyaxis_side"))
{
if (joyaxis_count > 6) return false;
else if (joyaxis_count == 6) return true;
if (!stricmp(valstr, "Z-Axis")) joyaxis_count++;
else joyaxis_default = false;
}
if (!stricmp(v->name, "joyaxis_look"))
{
if (joyaxis_count > 6) return false;
else if (joyaxis_count == 6) return true;
if (!stricmp(valstr, "None")) joyaxis_count++;
else joyaxis_default = false;
}
if (!stricmp(v->name, "joyaxis_fire")
|| !stricmp(v->name, "joyaxis_firenormal"))
{
if (joyaxis_count > 6) return false;
else if (joyaxis_count == 6) return true;
if (!stricmp(valstr, "None")) joyaxis_count++;
else joyaxis_default = false;
}
// reset all axis settings to defaults
if (joyaxis_count == 6)
{
COM_BufInsertText(va("%s \"%s\"\n", cv_turnaxis[0].name, cv_turnaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_moveaxis[0].name, cv_moveaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_sideaxis[0].name, cv_sideaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_lookaxis[0].name, cv_lookaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_fireaxis[0].name, cv_fireaxis[0].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_firenaxis[0].name, cv_firenaxis[0].defaultvalue));
joyaxis_count++;
return false;
}
}
if (joyaxis2_default)
{
if (!stricmp(v->name, "joyaxis2_turn"))
{
if (joyaxis2_count > 6) return false;
// we're currently setting the new defaults, don't interfere
else if (joyaxis2_count == 6) return true;
if (!stricmp(valstr, "X-Axis")) joyaxis2_count++;
else joyaxis2_default = false;
}
if (!stricmp(v->name, "joyaxis2_move"))
{
if (joyaxis2_count > 6) return false;
else if (joyaxis2_count == 6) return true;
if (!stricmp(valstr, "Y-Axis")) joyaxis2_count++;
else joyaxis2_default = false;
}
if (!stricmp(v->name, "joyaxis2_side"))
{
if (joyaxis2_count > 6) return false;
else if (joyaxis2_count == 6) return true;
if (!stricmp(valstr, "Z-Axis")) joyaxis2_count++;
else joyaxis2_default = false;
}
if (!stricmp(v->name, "joyaxis2_look"))
{
if (joyaxis2_count > 6) return false;
else if (joyaxis2_count == 6) return true;
if (!stricmp(valstr, "None")) joyaxis2_count++;
else joyaxis2_default = false;
}
if (!stricmp(v->name, "joyaxis2_fire")
|| !stricmp(v->name, "joyaxis2_firenormal"))
{
if (joyaxis2_count > 6) return false;
else if (joyaxis2_count == 6) return true;
if (!stricmp(valstr, "None")) joyaxis2_count++;
else joyaxis2_default = false;
}
// reset all axis settings to defaults
if (joyaxis2_count == 6)
{
COM_BufInsertText(va("%s \"%s\"\n", cv_turnaxis[1].name, cv_turnaxis[1].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_moveaxis[1].name, cv_moveaxis[1].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_sideaxis[1].name, cv_sideaxis[1].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_lookaxis[1].name, cv_lookaxis[1].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_fireaxis[1].name, cv_fireaxis[1].defaultvalue));
COM_BufInsertText(va("%s \"%s\"\n", cv_firenaxis[1].name, cv_firenaxis[1].defaultvalue));
joyaxis2_count++;
return false;
}
}
// we haven't reached our counts yet, or we're not default
return true;
}
#ifndef OLD_GAMEPAD_AXES
static boolean CV_ConvertOldJoyAxisVars(consvar_t *v, const char *valstr)
{
@ -2355,40 +2229,6 @@ static boolean CV_FilterVarByVersion(consvar_t *v, const char *valstr)
if (!(v->flags & CV_SAVE))
return true;
if (GETMAJOREXECVERSION(cv_execversion.value) < 26) // 26 = 2.1.21
{
// MOUSE SETTINGS
// alwaysfreelook split between first and third person (chasefreelook)
// mousemove was on by default, which invalidates the current approach
if (!stricmp(v->name, "alwaysmlook")
|| !stricmp(v->name, "alwaysmlook2")
|| !stricmp(v->name, "mousemove")
|| !stricmp(v->name, "mousemove2"))
return false;
// mousesens was changed from 35 to 20 due to oversensitivity
if ((!stricmp(v->name, "mousesens")
|| !stricmp(v->name, "mousesens2")
|| !stricmp(v->name, "mouseysens")
|| !stricmp(v->name, "mouseysens2"))
&& atoi(valstr) == 35)
return false;
// GAMEPAD DEFAULTS
// use_gamepad was changed from 0 to 1 to automatically use a gamepad if available
#if defined(HAVE_SDL) || defined(_WINDOWS)
if ((!stricmp(v->name, "use_joystick")
|| !stricmp(v->name, "use_joystick2"))
&& atoi(valstr) == 0)
return false;
#endif
// axis defaults were changed to be friendly to 360 controllers
// if ALL axis settings are defaults, then change them to new values
if (!CV_FilterJoyAxisVars(v, valstr))
return false;
}
#ifndef OLD_GAMEPAD_AXES
if (GETMAJOREXECVERSION(cv_execversion.value) <= 51 && GETMINOREXECVERSION(cv_execversion.value) < 1)
{

View file

@ -814,14 +814,6 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_moveaxis[1]);
CV_RegisterVar(&cv_lookaxis[0]);
CV_RegisterVar(&cv_lookaxis[1]);
CV_RegisterVar(&cv_jumpaxis[0]);
CV_RegisterVar(&cv_jumpaxis[1]);
CV_RegisterVar(&cv_spinaxis[0]);
CV_RegisterVar(&cv_spinaxis[1]);
CV_RegisterVar(&cv_fireaxis[0]);
CV_RegisterVar(&cv_fireaxis[1]);
CV_RegisterVar(&cv_firenaxis[0]);
CV_RegisterVar(&cv_firenaxis[1]);
CV_RegisterVar(&cv_deadzone[0]);
CV_RegisterVar(&cv_deadzone[1]);
CV_RegisterVar(&cv_digitaldeadzone[0]);

View file

@ -5648,11 +5648,6 @@ struct int_const_s const INT_CONST[] = {
{"JA_MOVE",JA_MOVE},
{"JA_LOOK",JA_LOOK},
{"JA_STRAFE",JA_STRAFE},
{"JA_DIGITAL",JA_DIGITAL},
{"JA_JUMP",JA_JUMP},
{"JA_SPIN",JA_SPIN},
{"JA_FIRE",JA_FIRE},
{"JA_FIRENORMAL",JA_FIRENORMAL},
{"JOYAXISRANGE",OLDJOYAXISRANGE},
// Game controls

View file

@ -299,15 +299,11 @@ CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"},
#define SIDEAXIS_DEFAULT "Left Stick X"
#define LOOKAXIS_DEFAULT "Right Stick Y"
#define TURNAXIS_DEFAULT "Right Stick X"
#define FIREAXIS_DEFAULT "None"
#define FIRENAXIS_DEFAULT "None"
#else
#define MOVEAXIS_DEFAULT "Y-Axis"
#define SIDEAXIS_DEFAULT "X-Axis"
#define LOOKAXIS_DEFAULT "Y-Rudder-"
#define TURNAXIS_DEFAULT "X-Rudder"
#define FIREAXIS_DEFAULT "Z-Rudder"
#define FIRENAXIS_DEFAULT "Z-Axis"
#endif
// don't mind me putting these here, I was lazy to figure out where else I could put those without blowing up the compiler.
@ -439,22 +435,6 @@ consvar_t cv_turnaxis[2] = {
CVAR_INIT ("joyaxis_turn", TURNAXIS_DEFAULT, CV_SAVE, joyaxis_cons_t, NULL),
CVAR_INIT ("joyaxis2_turn", TURNAXIS_DEFAULT, CV_SAVE, joyaxis_cons_t, NULL)
};
consvar_t cv_jumpaxis[2] = {
CVAR_INIT ("joyaxis_jump", "None", CV_SAVE, joyaxis_cons_t, NULL),
CVAR_INIT ("joyaxis2_jump", "None", CV_SAVE, joyaxis_cons_t, NULL)
};
consvar_t cv_spinaxis[2] = {
CVAR_INIT ("joyaxis_spin", "None", CV_SAVE, joyaxis_cons_t, NULL),
CVAR_INIT ("joyaxis2_spin", "None", CV_SAVE, joyaxis_cons_t, NULL)
};
consvar_t cv_fireaxis[2] = {
CVAR_INIT ("joyaxis_fire", FIREAXIS_DEFAULT, CV_SAVE, joyaxis_cons_t, NULL),
CVAR_INIT ("joyaxis2_fire", FIREAXIS_DEFAULT, CV_SAVE, joyaxis_cons_t, NULL)
};
consvar_t cv_firenaxis[2] = {
CVAR_INIT ("joyaxis_firenormal", FIRENAXIS_DEFAULT, CV_SAVE, joyaxis_cons_t, NULL),
CVAR_INIT ("joyaxis2_firenormal", FIRENAXIS_DEFAULT, CV_SAVE, joyaxis_cons_t, NULL)
};
consvar_t cv_deadzone[2] = {
CVAR_INIT ("joy_deadzone", "0.125", CV_FLOAT|CV_SAVE, zerotoone_cons_t, NULL),
CVAR_INIT ("joy_deadzone2", "0.125", CV_FLOAT|CV_SAVE, zerotoone_cons_t, NULL)
@ -890,7 +870,7 @@ static gamepad_axis_e ConvertXboxControllerAxes(int type)
}
#endif
static INT16 GetJoystickAxisValue(UINT8 which, joyaxis_e axissel, INT32 axisval)
static INT16 GetJoystickAxisValue(INT32 axisval)
{
boolean flp = false;
@ -925,14 +905,7 @@ static INT16 GetJoystickAxisValue(UINT8 which, joyaxis_e axissel, INT32 axisval)
}
INT16 retaxis = G_GetGamepadAxisValue(0, gp_axis);
if (gamepads[which].digital && axissel >= JA_DIGITAL)
{
const UINT16 jdeadzone = G_GetGamepadDigitalDeadZone(which) / 2;
if (-jdeadzone < retaxis && retaxis < jdeadzone)
return 0;
}
// flip it around
if (flp)
{
@ -965,23 +938,11 @@ INT16 G_JoyAxis(UINT8 which, joyaxis_e axissel)
case JA_STRAFE:
axisval = cv_sideaxis[which].value;
break;
case JA_JUMP:
axisval = cv_jumpaxis[which].value;
break;
case JA_SPIN:
axisval = cv_spinaxis[which].value;
break;
case JA_FIRE:
axisval = cv_fireaxis[which].value;
break;
case JA_FIRENORMAL:
axisval = cv_firenaxis[which].value;
break;
default:
return 0;
}
value = GetJoystickAxisValue(which, axissel, axisval);
value = GetJoystickAxisValue(axisval);
if (axissel == JA_LOOK)
{
// Look is inverted because +Y goes _down_ in gamepads.
@ -1092,7 +1053,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
boolean forcestrafe = false;
boolean forcefullinput = false;
INT32 tspeed, forward, side, axis, strafeaxis, moveaxis, turnaxis, lookaxis, i;
INT32 tspeed, forward, side, strafeaxis, moveaxis, turnaxis, lookaxis, i;
joystickvector2_t movejoystickvector, lookjoystickvector;
@ -1378,13 +1339,11 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
}
// fire with any button/key
axis = G_JoyAxis(forplayer, JA_FIRE);
if (G_PlayerInputDown(forplayer, GC_FIRE) || (usegamepad && axis > 0))
if (G_PlayerInputDown(forplayer, GC_FIRE))
cmd->buttons |= BT_ATTACK;
// fire normal with any button/key
axis = G_JoyAxis(forplayer, JA_FIRENORMAL);
if (G_PlayerInputDown(forplayer, GC_FIRENORMAL) || (usegamepad && axis > 0))
if (G_PlayerInputDown(forplayer, GC_FIRENORMAL))
cmd->buttons |= BT_FIRENORMAL;
if (G_PlayerInputDown(forplayer, GC_TOSSFLAG))
@ -1399,8 +1358,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
cmd->buttons |= BT_CUSTOM3;
// spin with any button/key
axis = G_JoyAxis(forplayer, JA_SPIN);
if (G_PlayerInputDown(forplayer, GC_SPIN) || (usegamepad && axis > 0))
if (G_PlayerInputDown(forplayer, GC_SPIN))
cmd->buttons |= BT_SPIN;
// Centerview can be a toggle in simple mode!
@ -1516,8 +1474,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
resetdown[forplayer] = false;
// jump button
axis = G_JoyAxis(forplayer, JA_JUMP);
if (G_PlayerInputDown(forplayer, GC_JUMP) || (usegamepad && axis > 0))
if (G_PlayerInputDown(forplayer, GC_JUMP))
cmd->buttons |= BT_JUMP;
// player aiming shit, ahhhh...

View file

@ -71,7 +71,6 @@ extern consvar_t cv_autobrake, cv_autobrake2;
extern consvar_t cv_ghost_bestscore, cv_ghost_besttime, cv_ghost_bestrings, cv_ghost_last, cv_ghost_guest;
extern consvar_t cv_sideaxis[2], cv_turnaxis[2], cv_moveaxis[2], cv_lookaxis[2],
cv_jumpaxis[2], cv_spinaxis[2], cv_fireaxis[2], cv_firenaxis[2],
cv_deadzone[2], cv_digitaldeadzone[2];
extern CV_PossibleValue_t joyaxis_cons_t[];
@ -98,13 +97,6 @@ typedef enum
JA_MOVE,
JA_LOOK,
JA_STRAFE,
JA_DIGITAL, // axes henceforth use digital deadzone
JA_JUMP = JA_DIGITAL,
JA_SPIN,
JA_FIRE,
JA_FIRENORMAL,
} joyaxis_e;
INT16 G_JoyAxis(UINT8 which, joyaxis_e axissel);

View file

@ -1506,7 +1506,7 @@ INT32 G_CheckDoubleUsage(INT32 keynum, boolean modify, UINT8 player)
return result;
}
static INT32 G_FilterSpecialKeys(INT32 keyidx, INT32 player, INT32 *keynum1, INT32 *keynum2)
static INT32 G_FilterSpecialKeys(INT32 keyidx, INT32 *keynum1, INT32 *keynum2)
{
// Special case: ignore KEY_PAUSE because it's hardcoded
if (keyidx == 0 && *keynum1 == KEY_PAUSE)
@ -1529,11 +1529,6 @@ static INT32 G_FilterSpecialKeys(INT32 keyidx, INT32 player, INT32 *keynum1, INT
return *keynum1;
}
static INT32 G_TranslateJoyKeys(INT32 *keynum1, INT32 *keynum2)
{
}
static void setcontrol(INT32 (*gc)[2])
{
INT32 numctrl;
@ -1554,7 +1549,7 @@ static void setcontrol(INT32 (*gc)[2])
}
keynum1 = G_KeyNameToNum(COM_Argv(2));
keynum2 = G_KeyNameToNum(COM_Argv(3));
keynum = G_FilterSpecialKeys(0, player, &keynum1, &keynum2);
keynum = G_FilterSpecialKeys(0, &keynum1, &keynum2);
if (keynum >= 0)
{
@ -1565,7 +1560,7 @@ static void setcontrol(INT32 (*gc)[2])
{
keynum1 = keynum2; // push down keynum2
keynum2 = 0;
keynum = G_FilterSpecialKeys(0, player, &keynum1, &keynum2);
keynum = G_FilterSpecialKeys(0, &keynum1, &keynum2);
if (keynum >= 0)
(void)G_CheckDoubleUsage(keynum, true, player+1);
}
@ -1576,7 +1571,7 @@ static void setcontrol(INT32 (*gc)[2])
if (keynum2)
{
keynum = G_FilterSpecialKeys(1, player, &keynum1, &keynum2);
keynum = G_FilterSpecialKeys(1, &keynum1, &keynum2);
if (keynum >= 0)
{
if (keynum != gc[numctrl][0])

View file

@ -1071,7 +1071,8 @@ static menuitem_t OP_MainMenu[] =
{IT_SUBMENU | IT_STRING, NULL, "Player 1 Controls...", &OP_P1ControlsDef, 10},
{IT_SUBMENU | IT_STRING, NULL, "Player 2 Controls...", &OP_P2ControlsDef, 20},
{IT_CALL | IT_STRING, NULL, "Video Options...", M_VideoOptions, 50},
{IT_CALL | IT_STRING, NULL, "Video Options...", M_VideoOptions, 40},
{IT_SUBMENU | IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 60},
{IT_CALL | IT_STRING, NULL, "Server Options...", M_ServerOptions, 80},
@ -1079,6 +1080,16 @@ static menuitem_t OP_MainMenu[] =
{IT_SUBMENU | IT_STRING, NULL, "Data Options...", &OP_DataOptionsDef, 100},
};
enum
{
opplayer1,
opplayer2,
opvideo,
opsound,
opserver,
opdata
};
static menuitem_t OP_P1ControlsMenu[] =
{
{IT_CALL | IT_STRING, NULL, "Control Configuration...", M_Setup1PControlsMenu, 10},
@ -1166,15 +1177,11 @@ static menuitem_t OP_Gamepad1Menu[] =
{IT_STRING | IT_CVAR, NULL, "Move \x18 Axis" , &cv_sideaxis[0] , 40},
{IT_STRING | IT_CVAR, NULL, "Camera \x17 Axis" , &cv_lookaxis[0] , 50},
{IT_STRING | IT_CVAR, NULL, "Camera \x18 Axis" , &cv_turnaxis[0] , 60},
{IT_STRING | IT_CVAR, NULL, "Jump Axis" , &cv_jumpaxis[0] , 70},
{IT_STRING | IT_CVAR, NULL, "Spin Axis" , &cv_spinaxis[0] , 80},
{IT_STRING | IT_CVAR, NULL, "Fire Axis" , &cv_fireaxis[0] , 90},
{IT_STRING | IT_CVAR, NULL, "Fire Normal Axis" , &cv_firenaxis[0] ,100},
{IT_STRING | IT_CVAR, NULL, "First-Person Vert-Look", &cv_alwaysfreelook, 120},
{IT_STRING | IT_CVAR, NULL, "Third-Person Vert-Look", &cv_chasefreelook, 130},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Analog Deadzone", &cv_deadzone[0], 140},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Digital Deadzone", &cv_digitaldeadzone[0], 150},
{IT_STRING | IT_CVAR, NULL, "First-Person Vert-Look", &cv_alwaysfreelook, 80},
{IT_STRING | IT_CVAR, NULL, "Third-Person Vert-Look", &cv_chasefreelook, 90},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Analog Deadzone", &cv_deadzone[0], 100},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Digital Deadzone", &cv_digitaldeadzone[0], 110},
};
static menuitem_t OP_Gamepad2Menu[] =
@ -1184,15 +1191,11 @@ static menuitem_t OP_Gamepad2Menu[] =
{IT_STRING | IT_CVAR, NULL, "Move \x18 Axis" , &cv_sideaxis[1] , 40},
{IT_STRING | IT_CVAR, NULL, "Camera \x17 Axis" , &cv_lookaxis[1] , 50},
{IT_STRING | IT_CVAR, NULL, "Camera \x18 Axis" , &cv_turnaxis[1] , 60},
{IT_STRING | IT_CVAR, NULL, "Jump Axis" , &cv_jumpaxis[1] , 70},
{IT_STRING | IT_CVAR, NULL, "Spin Axis" , &cv_spinaxis[1] , 80},
{IT_STRING | IT_CVAR, NULL, "Fire Axis" , &cv_fireaxis[1] , 90},
{IT_STRING | IT_CVAR, NULL, "Fire Normal Axis" , &cv_firenaxis[1] ,100},
{IT_STRING | IT_CVAR, NULL, "First-Person Vert-Look", &cv_alwaysfreelook2,120},
{IT_STRING | IT_CVAR, NULL, "Third-Person Vert-Look", &cv_chasefreelook2, 130},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Analog Deadzone", &cv_deadzone[1],140},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Digital Deadzone", &cv_digitaldeadzone[1],150},
{IT_STRING | IT_CVAR, NULL, "First-Person Vert-Look", &cv_alwaysfreelook2,80},
{IT_STRING | IT_CVAR, NULL, "Third-Person Vert-Look", &cv_chasefreelook2, 90},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Analog Deadzone", &cv_deadzone[1],100},
{IT_STRING | IT_CVAR | IT_CV_FLOATSLIDER, NULL, "Digital Deadzone", &cv_digitaldeadzone[1],110},
};
static menuitem_t OP_GamepadSetMenu[MAX_CONNECTED_GAMEPADS + 1];
@ -1540,6 +1543,12 @@ static menuitem_t OP_DataOptionsMenu[] =
{IT_STRING | IT_SUBMENU, NULL, "\x85" "Erase Data...", &OP_EraseDataDef, 40},
};
enum{
opdataaddon,
opdatascreenshot,
opdataerase
};
static menuitem_t OP_ScreenshotOptionsMenu[] =
{
{IT_HEADER, NULL, "General", NULL, 0},
@ -7028,10 +7037,10 @@ static void M_Options(INT32 choice)
(void)choice;
// if the player is not admin or server, disable server options
OP_MainMenu[5].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL);
OP_MainMenu[opserver].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL);
// if the player is playing _at all_, disable the erase data options
OP_DataOptionsMenu[2].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
OP_DataOptionsMenu[opdataerase].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
OP_MainDef.prevMenu = currentMenu;
M_SetupNextMenu(&OP_MainDef);