mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Remove "controls per key" option
This commit is contained in:
parent
7abdab09bd
commit
b772c3a00d
4 changed files with 28 additions and 30 deletions
|
@ -841,7 +841,6 @@ void D_RegisterClientCommands(void)
|
|||
#if defined (__unix__) || defined (__APPLE__) || defined (UNIXCOMMON)
|
||||
CV_RegisterVar(&cv_mouse2opt);
|
||||
#endif
|
||||
CV_RegisterVar(&cv_controlperkey);
|
||||
|
||||
CV_RegisterVar(&cv_usemouse);
|
||||
CV_RegisterVar(&cv_usemouse2);
|
||||
|
|
|
@ -24,14 +24,12 @@
|
|||
#define MAXMOUSESENSITIVITY 100 // sensitivity steps
|
||||
|
||||
static CV_PossibleValue_t mousesens_cons_t[] = {{1, "MIN"}, {MAXMOUSESENSITIVITY, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t onecontrolperkey_cons_t[] = {{1, "One"}, {2, "Several"}, {0, NULL}};
|
||||
|
||||
// mouse values are used once
|
||||
consvar_t cv_mousesens = CVAR_INIT ("mousesens", "20", CV_SAVE, mousesens_cons_t, NULL);
|
||||
consvar_t cv_mousesens2 = CVAR_INIT ("mousesens2", "20", CV_SAVE, mousesens_cons_t, NULL);
|
||||
consvar_t cv_mouseysens = CVAR_INIT ("mouseysens", "20", CV_SAVE, mousesens_cons_t, NULL);
|
||||
consvar_t cv_mouseysens2 = CVAR_INIT ("mouseysens2", "20", CV_SAVE, mousesens_cons_t, NULL);
|
||||
consvar_t cv_controlperkey = CVAR_INIT ("controlperkey", "One", CV_SAVE, onecontrolperkey_cons_t, NULL);
|
||||
|
||||
mouse_t mouse;
|
||||
mouse_t mouse2;
|
||||
|
@ -1478,35 +1476,33 @@ void G_SaveKeySetting(FILE *f, INT32 (*fromcontrols)[2], INT32 (*fromcontrolsbis
|
|||
INT32 G_CheckDoubleUsage(INT32 keynum, boolean modify, UINT8 player)
|
||||
{
|
||||
INT32 result = GC_NULL;
|
||||
if (cv_controlperkey.value == 1)
|
||||
INT32 i;
|
||||
for (i = 0; i < NUM_GAMECONTROLS; i++)
|
||||
{
|
||||
INT32 i;
|
||||
for (i = 0; i < NUM_GAMECONTROLS; i++)
|
||||
if (gamecontrol[i][0] == keynum && player != 2)
|
||||
{
|
||||
if (gamecontrol[i][0] == keynum && player != 2)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrol[i][0] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrol[i][1] == keynum && player != 2)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrol[i][1] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrolbis[i][0] == keynum && player != 1)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrolbis[i][0] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrolbis[i][1] == keynum && player != 1)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrolbis[i][1] = KEY_NULL;
|
||||
}
|
||||
if (result && !modify)
|
||||
return result;
|
||||
result = i;
|
||||
if (modify) gamecontrol[i][0] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrol[i][1] == keynum && player != 2)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrol[i][1] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrolbis[i][0] == keynum && player != 1)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrolbis[i][0] = KEY_NULL;
|
||||
}
|
||||
if (gamecontrolbis[i][1] == keynum && player != 1)
|
||||
{
|
||||
result = i;
|
||||
if (modify) gamecontrolbis[i][1] = KEY_NULL;
|
||||
}
|
||||
if (result && !modify)
|
||||
return result;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1533,6 +1529,11 @@ 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;
|
||||
|
|
|
@ -249,7 +249,6 @@ typedef enum
|
|||
// mouse values are used once
|
||||
extern consvar_t cv_mousesens, cv_mouseysens;
|
||||
extern consvar_t cv_mousesens2, cv_mouseysens2;
|
||||
extern consvar_t cv_controlperkey;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -1070,7 +1070,6 @@ 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_CVAR | IT_STRING, NULL, "Controls per key", &cv_controlperkey, 30},
|
||||
|
||||
{IT_CALL | IT_STRING, NULL, "Video Options...", M_VideoOptions, 50},
|
||||
{IT_SUBMENU | IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 60},
|
||||
|
|
Loading…
Reference in a new issue