diff --git a/include/glquake.h b/include/glquake.h index b54f22c..531eb4b 100644 --- a/include/glquake.h +++ b/include/glquake.h @@ -222,6 +222,7 @@ extern cvar_t *gl_playermip; extern cvar_t *r_skyname; extern cvar_t *gl_skymultipass; +extern cvar_t *gl_sky_clip; extern float r_world_matrix[16]; @@ -279,6 +280,7 @@ void EmitSkyPolys (msurface_t *fa); void R_DrawSkyChain (msurface_t *s); void R_LoadSkys (char *); void R_DrawSky (void); +void R_DrawSkyChain (msurface_t *sky_chain); // // gl_draw.c diff --git a/source/gl_rmain.c b/source/gl_rmain.c index 04aff60..ae36633 100644 --- a/source/gl_rmain.c +++ b/source/gl_rmain.c @@ -47,6 +47,7 @@ #include "skin.h" #include "cl_main.h" #include "cl_cam.h" +#include "va.h" #include "view.h" @@ -123,6 +124,8 @@ 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]; @@ -145,12 +148,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