Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 5064 → Rev 5065

/polymer/eduke32/build/src/osd.c
142,20 → 142,26
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:
/polymer/eduke32/source/config.c
725,17 → 725,6
 
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
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
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 (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 (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]));
}
}
}
 
for (dummy=0; dummy<MAXMOUSEAXES; dummy++)
{
if (CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]))
for (dummy=0; dummy<MAXMOUSEAXES; dummy++)
{
Bsprintf(buf,"MouseAnalogAxes%d",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[dummy]));
}
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][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 (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);
if (ud.config.MouseAnalogueScale[dummy] != DEFAULTMOUSEANALOGUESCALE)
{
Bsprintf(buf, "MouseAnalogScale%d", dummy);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE);
}
}
}
 
Bsprintf(tempbuf,"%.2f",CONTROL_MouseSensitivity);
SCRIPT_PutString(ud.config.scripthandle, "Controls","Mouse_Sensitivity",tempbuf);
 
for (dummy=0; dummy<MAXJOYBUTTONSANDHATS; dummy++)
if (ud.config.UseJoystick)
{
if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]))
for (dummy=0; dummy<MAXJOYBUTTONSANDHATS; dummy++)
{
Bsprintf(buf,"JoystickButton%d",dummy);
SCRIPT_PutString(ud.config.scripthandle,"Controls", buf, CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0]));
}
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.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.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]))
for (dummy=0; dummy<MAXJOYAXES; dummy++)
{
Bsprintf(buf,"JoystickAnalogAxes%d",dummy);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.JoystickAnalogueAxes[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 (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][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 (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.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.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# ";
 
for (dummy = 0; dummy < MAXRIDECULE; dummy++)
{
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]);
}
commmacro[13] = dummy+'0';
SCRIPT_PutString(ud.config.scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]);
}
 
SCRIPT_Save(ud.config.scripthandle, setupfilename);
/polymer/eduke32/source/game.c
4435,11 → 4435,6
 
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
 
}
 
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
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
}
}
 
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
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
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
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
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':
/polymer/eduke32/source/game.h
254,6 → 254,7
char pwlockout[MAXPWLOCKOUT],rtsname[MAXRTSNAME];
char display_bonus_screen;
char show_level_text;
char wchoice[MAX_WEAPONS];
} user_defs;
 
 
/polymer/eduke32/source/osdcmds.c
864,6 → 864,7
return OSDCMD_OK;
}
 
 
static int32_t osdcmd_button(const osdfuncparm_t *parm)
{
char *p = (char *)parm->name+9; // skip "gamefunc_"
1402,14 → 1403,10
{
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"))
{
1416,20 → 1413,14
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"))
{
1436,14 → 1427,10
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")
1450,8 → 1437,6
|| !Bstrcasecmp(parm->name, "r_rotatespritenowidescreen"))
{
G_UpdateScreenArea();
 
return r;
}
else if (!Bstrcasecmp(parm->name, "skill"))
{
1459,15 → 1444,11
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
 
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,10 → 1636,10
{ "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
 
1619,6 → 1646,7
{ "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;