Remove WeaponChoice* from eduke32.cfg and transition setting to "wchoice" cvar. This commit also removes an Android hack and changes the order of some of the in-game "F" key handling, just because it bugged me that some of them were out of order.

git-svn-id: https://svn.eduke32.com/eduke32@5065 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2015-03-24 00:39:52 +00:00
parent 201e353771
commit 61f35b827a
5 changed files with 195 additions and 169 deletions

View file

@ -142,20 +142,26 @@ static int32_t OSD_CvarModified(const osdcvar_t *cvar)
return 0;
}
switch (cvar->c.type & (CVAR_BOOL|CVAR_INT|CVAR_UINT|CVAR_FLOAT|CVAR_DOUBLE))
int rv = 0;
switch (cvar->c.type & (CVAR_BOOL|CVAR_INT|CVAR_UINT|CVAR_FLOAT|CVAR_DOUBLE|CVAR_STRING))
{
case CVAR_BOOL:
case CVAR_INT:
return (cvar->dval.i != *(int32_t *)cvar->c.vptr);
rv = (cvar->dval.i != *(int32_t *)cvar->c.vptr); break;
case CVAR_UINT:
return (cvar->dval.uint != *(uint32_t *)cvar->c.vptr);
rv = (cvar->dval.uint != *(uint32_t *)cvar->c.vptr); break;
case CVAR_FLOAT:
return (cvar->dval.f != *(float *)cvar->c.vptr);
rv = (cvar->dval.f != *(float *)cvar->c.vptr); break;
case CVAR_DOUBLE:
return (cvar->dval.d != *(double *)cvar->c.vptr);
rv = (cvar->dval.d != *(double *)cvar->c.vptr); break;
case CVAR_STRING:
rv = 1; break;
default:
EDUKE32_UNREACHABLE_SECTION(return 0);
EDUKE32_UNREACHABLE_SECTION(break);
}
return rv;
}
// color code format is as follows:

View file

@ -725,17 +725,6 @@ int32_t CONFIG_ReadSetup(void)
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Executions",&ud.executions);
// weapon choices are defaulted in G_CheckCommandLine, which may override them
if (!g_forceWeaponChoice)
for (i=0; i<=FREEZE_WEAPON; i++)
{
Bsprintf(buf,"WeaponChoice%d",i);
dummy = -1;
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", buf, &dummy);
if (dummy >= 0 && dummy <= FREEZE_WEAPON)
g_player[0].wchoice[i] = dummy;
}
#ifdef _WIN32
SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", &ud.config.CheckForUpdates);
SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", &ud.config.LastUpdateCheck);
@ -858,12 +847,6 @@ void CONFIG_WriteSetup(uint32_t flags)
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "MaxRefreshFreq", maxrefreshfreq, FALSE, FALSE);
#endif
for (dummy=0; dummy<10; dummy++)
{
Bsprintf(buf,"WeaponChoice%d",dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Misc",buf,g_player[myconnectindex].wchoice[dummy],FALSE,FALSE);
}
if (!NAM)
{
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Out",ud.lockout,FALSE,FALSE);
@ -875,118 +858,120 @@ void CONFIG_WriteSetup(uint32_t flags)
SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", ud.config.LastUpdateCheck, FALSE, FALSE);
#endif
for (dummy=0; dummy<MAXMOUSEBUTTONS; dummy++)
if (ud.config.UseMouse)
{
if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]))
for (dummy=0; dummy<MAXMOUSEBUTTONS; dummy++)
{
Bsprintf(buf,"MouseButton%d",dummy);
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]));
if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]))
{
Bsprintf(buf, "MouseButton%d", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0]));
}
if (dummy >= (MAXMOUSEBUTTONS-2)) continue;
if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]))
{
Bsprintf(buf, "MouseButtonClicked%d", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]));
}
}
if (dummy >= (MAXMOUSEBUTTONS-2)) continue;
if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]))
for (dummy=0; dummy<MAXMOUSEAXES; dummy++)
{
Bsprintf(buf,"MouseButtonClicked%d",dummy);
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][1]));
if (CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]))
{
Bsprintf(buf, "MouseAnalogAxes%d", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]));
}
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]))
{
Bsprintf(buf, "MouseDigitalAxes%d_0", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]));
}
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]))
{
Bsprintf(buf, "MouseDigitalAxes%d_1", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]));
}
if (ud.config.MouseAnalogueScale[dummy] != DEFAULTMOUSEANALOGUESCALE)
{
Bsprintf(buf, "MouseAnalogScale%d", dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE);
}
}
}
for (dummy=0; dummy<MAXMOUSEAXES; dummy++)
if (ud.config.UseJoystick)
{
if (CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]))
for (dummy=0; dummy<MAXJOYBUTTONSANDHATS; dummy++)
{
Bsprintf(buf,"MouseAnalogAxes%d",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]));
}
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]))
{
Bsprintf(buf, "JoystickButton%d", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]));
}
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]))
{
Bsprintf(buf,"MouseDigitalAxes%d_0",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][0]));
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]))
{
Bsprintf(buf, "JoystickButtonClicked%d", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]));
}
}
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]))
for (dummy=0; dummy<MAXJOYAXES; dummy++)
{
Bsprintf(buf,"MouseDigitalAxes%d_1",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[dummy][1]));
}
if (CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]))
{
Bsprintf(buf, "JoystickAnalogAxes%d", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]));
}
if (ud.config.MouseAnalogueScale[dummy] != DEFAULTMOUSEANALOGUESCALE)
{
Bsprintf(buf,"MouseAnalogScale%d",dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE);
}
}
if (CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]))
{
Bsprintf(buf, "JoystickDigitalAxes%d_0", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]));
}
Bsprintf(tempbuf,"%.2f",CONTROL_MouseSensitivity);
SCRIPT_PutString(ud.config.scripthandle, "Controls","Mouse_Sensitivity",tempbuf);
if (CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]))
{
Bsprintf(buf, "JoystickDigitalAxes%d_1", dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]));
}
for (dummy=0; dummy<MAXJOYBUTTONSANDHATS; dummy++)
{
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]))
{
Bsprintf(buf,"JoystickButton%d",dummy);
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]));
}
if (ud.config.JoystickAnalogueScale[dummy] != DEFAULTJOYSTICKANALOGUESCALE)
{
Bsprintf(buf, "JoystickAnalogScale%d", dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueScale[dummy], FALSE, FALSE);
}
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]))
{
Bsprintf(buf,"JoystickButtonClicked%d",dummy);
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][1]));
}
}
for (dummy=0; dummy<MAXJOYAXES; dummy++)
{
if (CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]))
{
Bsprintf(buf,"JoystickAnalogAxes%d",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[dummy]));
}
if (ud.config.JoystickAnalogueDead[dummy] != DEFAULTJOYSTICKANALOGUEDEAD)
{
Bsprintf(buf, "JoystickAnalogDead%d", dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueDead[dummy], FALSE, FALSE);
}
if (CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]))
{
Bsprintf(buf,"JoystickDigitalAxes%d_0",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][0]));
}
if (CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]))
{
Bsprintf(buf,"JoystickDigitalAxes%d_1",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickDigitalFunctions[dummy][1]));
}
if (ud.config.JoystickAnalogueScale[dummy] != DEFAULTJOYSTICKANALOGUESCALE)
{
Bsprintf(buf,"JoystickAnalogScale%d",dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueScale[dummy], FALSE, FALSE);
}
if (ud.config.JoystickAnalogueDead[dummy] != DEFAULTJOYSTICKANALOGUEDEAD)
{
Bsprintf(buf,"JoystickAnalogDead%d",dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueDead[dummy], FALSE, FALSE);
}
if (ud.config.JoystickAnalogueSaturate[dummy] != DEFAULTJOYSTICKANALOGUESATURATE)
{
Bsprintf(buf,"JoystickAnalogSaturate%d",dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE);
if (ud.config.JoystickAnalogueSaturate[dummy] != DEFAULTJOYSTICKANALOGUESATURATE)
{
Bsprintf(buf, "JoystickAnalogSaturate%d", dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE);
}
}
}
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","PlayerName",&szPlayerName[0]);
if (g_rtsNamePtr == NULL)
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]);
{
char commmacro[] = "CommbatMacro# ";
char commmacro[] = "CommbatMacro# ";
for (dummy = 0; dummy < MAXRIDECULE; dummy++)
{
commmacro[13] = dummy+'0';
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
}
for (dummy = 0; dummy < MAXRIDECULE; dummy++)
{
commmacro[13] = dummy+'0';
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
}
SCRIPT_Save(ud.config.scripthandle, setupfilename);

View file

@ -4435,11 +4435,6 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
if (pub > 0 || getrendermode() >= REND_POLYMOST) // JBF 20040101: redraw background always
{
#ifdef __ANDROID__
// HACK: this is needed or else we get leftover UI texture crap where we'd get HOM on PC
clearview(0L);
#endif
#ifndef EDUKE32_TOUCH_DEVICES
if (ud.screen_size >= 8)
#endif
@ -9047,6 +9042,22 @@ FAKE_F3:
}
if (KB_UnBoundKeyPressed(sc_F5) && ud.config.MusicToggle)
{
map_t *map = &MapInfo[g_musicIndex];
char *const qmusic = ScriptQuotes[QUOTE_MUSIC];
KB_ClearKeyDown(sc_F5);
if (map->musicfn != NULL)
Bsnprintf(qmusic, MAXQUOTELEN, "%s. Use SHIFT-F5 to change.",
map->musicfn);
else
qmusic[0] = '\0';
P_DoQuote(QUOTE_MUSIC, g_player[myconnectindex].ps);
}
if ((KB_UnBoundKeyPressed(sc_F6) || g_doQuickSave == 1) && (g_player[myconnectindex].ps->gm&MODE_GAME))
{
KB_ClearKeyDown(sc_F6);
@ -9092,22 +9103,6 @@ FAKE_F3:
P_DoQuote(QUOTE_VIEW_MODE_OFF+g_player[myconnectindex].ps->over_shoulder_on,g_player[myconnectindex].ps);
}
if (KB_UnBoundKeyPressed(sc_F5) && ud.config.MusicToggle)
{
map_t *map = &MapInfo[g_musicIndex];
char *const qmusic = ScriptQuotes[QUOTE_MUSIC];
KB_ClearKeyDown(sc_F5);
if (map->musicfn != NULL)
Bsnprintf(qmusic, MAXQUOTELEN, "%s. Use SHIFT-F5 to change.",
map->musicfn);
else
qmusic[0] = '\0';
P_DoQuote(QUOTE_MUSIC, g_player[myconnectindex].ps);
}
if (KB_UnBoundKeyPressed(sc_F8))
{
KB_ClearKeyDown(sc_F8);
@ -9153,6 +9148,20 @@ FAKE_F3:
}
}
if (KB_UnBoundKeyPressed(sc_F11))
{
KB_ClearKeyDown(sc_F11);
M_ChangeMenu(MENU_COLCORR_INGAME);
FX_StopAllSounds();
S_ClearSoundLocks();
M_OpenMenu(myconnectindex);
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
{
ready2send = 0;
totalclock = ototalclock;
}
}
if (ud.overhead_on != 0)
{
@ -9216,20 +9225,6 @@ FAKE_F3:
g_restorePalette = 1;
G_UpdateScreenArea();
}
if (KB_UnBoundKeyPressed(sc_F11))
{
KB_ClearKeyDown(sc_F11);
M_ChangeMenu(MENU_COLCORR_INGAME);
FX_StopAllSounds();
S_ClearSoundLocks();
M_OpenMenu(myconnectindex);
if ((!g_netServer && ud.multimode < 2) && ud.recstat != 2)
{
ready2send = 0;
totalclock = ototalclock;
}
}
}
static void G_ShowParameterHelp(void)
@ -9809,6 +9804,7 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
g_player[0].wchoice[7] = 2;
g_player[0].wchoice[8] = 9;
g_player[0].wchoice[9] = 1;
Bsprintf(ud.wchoice, "3457860291");
#ifdef HAVE_CLIPSHAPE_FEATURE
// pre-form the default 10 clipmaps
@ -10352,15 +10348,23 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
while (*c)
{
g_player[0].wchoice[j] = *c-'0';
ud.wchoice[j] = *c;
c++;
j++;
}
while (j < 10)
{
if (j == 9)
{
g_player[0].wchoice[9] = 1;
ud.wchoice[9] = '1';
}
else
{
g_player[0].wchoice[j] = 2;
ud.wchoice[j] = '2';
}
j++;
}
@ -10378,6 +10382,8 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
g_player[0].wchoice[7] = 2;
g_player[0].wchoice[8] = 9;
g_player[0].wchoice[9] = 1;
Bsprintf(ud.wchoice, "3457860291");
}
break;
case 'v':

View file

@ -254,6 +254,7 @@ typedef struct {
char pwlockout[MAXPWLOCKOUT],rtsname[MAXRTSNAME];
char display_bonus_screen;
char show_level_text;
char wchoice[MAX_WEAPONS];
} user_defs;

View file

@ -864,6 +864,7 @@ static int32_t osdcmd_name(const osdfuncparm_t *parm)
return OSDCMD_OK;
}
static int32_t osdcmd_button(const osdfuncparm_t *parm)
{
char *p = (char *)parm->name+9; // skip "gamefunc_"
@ -1402,56 +1403,40 @@ static int32_t osdcmd_cvar_set_game(const osdfuncparm_t *parm)
{
ud.statusbarmode = (ud.screen_size < 8);
G_UpdateScreenArea();
return r;
}
else if (!Bstrcasecmp(parm->name, "r_maxfps"))
{
g_frameDelay = r_maxfps ? Blrintf(1000.f/(float)r_maxfps) : 0;
return r;
}
else if (!Bstrcasecmp(parm->name, "r_ambientlight"))
{
if (r_ambientlight == 0)
r_ambientlightrecip = 256.f;
else r_ambientlightrecip = 1.f/r_ambientlight;
return r;
}
else if (!Bstrcasecmp(parm->name, "in_mouse"))
{
CONTROL_MouseEnabled = (ud.config.UseMouse && CONTROL_MousePresent);
return r;
}
else if (!Bstrcasecmp(parm->name, "in_joystick"))
{
CONTROL_JoystickEnabled = (ud.config.UseJoystick && CONTROL_JoyPresent);
return r;
}
else if (!Bstrcasecmp(parm->name, "vid_gamma"))
{
ud.brightness = GAMMA_CALC;
ud.brightness <<= 2;
setbrightness(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
return r;
}
else if (!Bstrcasecmp(parm->name, "vid_brightness") || !Bstrcasecmp(parm->name, "vid_contrast"))
{
setbrightness(ud.brightness>>2,g_player[myconnectindex].ps->palette,0);
return r;
}
else if (!Bstrcasecmp(parm->name, "hud_scale")
|| !Bstrcasecmp(parm->name, "hud_statusbarmode")
|| !Bstrcasecmp(parm->name, "r_rotatespritenowidescreen"))
{
G_UpdateScreenArea();
return r;
}
else if (!Bstrcasecmp(parm->name, "skill"))
{
@ -1459,15 +1444,11 @@ static int32_t osdcmd_cvar_set_game(const osdfuncparm_t *parm)
return r;
ud.player_skill = ud.m_player_skill;
return r;
}
else if (!Bstrcasecmp(parm->name, "color"))
{
G_CheckPlayerColor((int32_t *)&ud.color,-1);
g_player[0].ps->palookup = g_player[0].pcolor = ud.color;
return r;
}
else if (!Bstrcasecmp(parm->name, "osdscale"))
{
@ -1475,8 +1456,54 @@ static int32_t osdcmd_cvar_set_game(const osdfuncparm_t *parm)
if (xdim && ydim)
OSD_ResizeDisplay(xdim, ydim);
}
else if (!Bstrcasecmp(parm->name, "wchoice"))
{
if (parm->numparms == 1)
{
if (g_forceWeaponChoice) // rewrite ud.wchoice because osdcmd_cvar_set already changed it
{
int j = 0;
return r;
while (j < 10)
{
ud.wchoice[j] = g_player[myconnectindex].wchoice[j] + '0';
j++;
}
ud.wchoice[j] = 0;
}
else
{
char const *c = parm->parms[0];
if (*c)
{
int j = 0;
while (*c && j < 10)
{
g_player[myconnectindex].wchoice[j] = *c - '0';
c++;
j++;
}
while (j < 10)
{
if (j == 9)
g_player[myconnectindex].wchoice[9] = 1;
else
g_player[myconnectindex].wchoice[j] = 2;
j++;
}
}
}
g_forceWeaponChoice = 0;
}
/* Net_SendClientInfo();*/
}
return r;
@ -1609,16 +1636,17 @@ int32_t registerosdcommands(void)
{ "team","change team in multiplayer", (void *)&ud.team, CVAR_INT|CVAR_MULTI, 0, 3 },
#ifdef EDUKE32_TOUCH_DEVICES
{ "touch_sens_move_x","touch input sensitivity for moving froward/back", (void *)&droidinput.forward_sens, CVAR_FLOAT, 0, 10 },
{ "touch_sens_move_y","touch input sensitivity for strafing", (void *)&droidinput.strafe_sens, CVAR_FLOAT, 0, 10 },
{ "touch_sens_look_x", "touch input sensitivity for turning left/right", (void *) &droidinput.yaw_sens, CVAR_FLOAT, 0, 10 },
{ "touch_sens_move_y", "touch input sensitivity for looking up/down", (void *) &droidinput.pitch_sens, CVAR_FLOAT, 0, 10 },
{ "touch_sens_move_x","touch input sensitivity for moving froward/back", (void *)&droidinput.forward_sens, CVAR_FLOAT, 1, 9 },
{ "touch_sens_move_y","touch input sensitivity for strafing", (void *)&droidinput.strafe_sens, CVAR_FLOAT, 1, 9 },
{ "touch_sens_look_x", "touch input sensitivity for turning left/right", (void *) &droidinput.yaw_sens, CVAR_FLOAT, 1, 9 },
{ "touch_sens_look_y", "touch input sensitivity for looking up/down", (void *) &droidinput.pitch_sens, CVAR_FLOAT, 1, 9 },
{ "touch_invert", "invert look up/down touch input", (void *) &droidinput.invertLook, CVAR_INT, 0, 1 },
#endif
{ "vid_gamma","adjusts gamma component of gamma ramp",(void *)&vid_gamma, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
{ "vid_contrast","adjusts contrast component of gamma ramp",(void *)&vid_contrast, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
{ "vid_brightness","adjusts brightness component of gamma ramp",(void *)&vid_brightness, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
{ "wchoice","sets weapon autoselection order", (void *)ud.wchoice, CVAR_STRING|CVAR_FUNCPTR, 0, MAX_WEAPONS },
};
osdcmd_cheatsinfo_stat.cheatnum = -1;