mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
make the new -brighten a cvar (ROM) as well so it can be set in the config
file. Also includes a cvar from my sky hacking, but it's harmless :)
This commit is contained in:
parent
2070b1a5a1
commit
9b458ba730
1 changed files with 9 additions and 2 deletions
|
@ -44,6 +44,7 @@
|
|||
#include "render.h"
|
||||
#include "sys.h"
|
||||
#include "r_dynamic.h"
|
||||
#include "va.h"
|
||||
|
||||
entity_t r_worldentity;
|
||||
|
||||
|
@ -113,10 +114,13 @@ cvar_t *gl_particles;
|
|||
|
||||
cvar_t *r_skyname;
|
||||
cvar_t *gl_skymultipass;
|
||||
cvar_t *gl_sky_clip;
|
||||
|
||||
cvar_t *gl_fb_models;
|
||||
cvar_t *gl_fb_bmodels;
|
||||
|
||||
cvar_t *brighten;
|
||||
|
||||
extern cvar_t *scr_fov;
|
||||
|
||||
extern byte gammatable[256];
|
||||
|
@ -139,12 +143,15 @@ GL_CheckBrightness (unsigned char *pal)
|
|||
int i, inf;
|
||||
float brightness;
|
||||
|
||||
brighten = Cvar_Get ("brighten", "1", CVAR_ROM,
|
||||
"Palette hack equivalent to brightness");
|
||||
if ((i = COM_CheckParm ("-brighten"))) {
|
||||
brightness = atof (com_argv[i + 1]);
|
||||
brightness = bound (1, brightness, 5);
|
||||
} else {
|
||||
brightness = 1.0;
|
||||
brightness = brighten->value;
|
||||
}
|
||||
brightness = bound (1, brightness, 5);
|
||||
Cvar_SetROM (brighten, va("%f", brightness));
|
||||
|
||||
// Build gamma table
|
||||
if (brightness == 1.0) { // screw the math
|
||||
|
|
Loading…
Reference in a new issue