gl_rmain.c: Fix up brighten cvar/arg properly so it can be setrom'ed

vid.c: Get rid of the redundancy, much nicer.
quakeforge.lsm.in: Update Linux Software Map data file.
This commit is contained in:
Jeff Teunissen 2000-11-04 08:20:20 +00:00
parent ba11d00aba
commit 59b79d250a
3 changed files with 38 additions and 24 deletions

View file

@ -148,15 +148,18 @@ GL_CheckBrightness (unsigned char *pal)
int i, inf;
float brightness;
brighten = Cvar_Get ("brighten", "1", CVAR_ROM,
brighten = Cvar_Get ("brighten", "1", CVAR_NONE,
"Palette hack equivalent to brightness");
if ((i = COM_CheckParm ("-brighten"))) {
brightness = atof (com_argv[i + 1]);
} else {
brightness = brighten->value;
}
brightness = bound (1, brightness, 5);
Cvar_SetROM (brighten, va("%f", brightness));
Cvar_SetValue (brighten, brightness);
Cvar_SetFlags (brighten, brighten->flags | CVAR_ROM);
// Build gamma table
if (brightness == 1.0) { // screw the math