removal of tdfx_brighten in preparation for gl_brighten

This commit is contained in:
Chris Ison 2001-10-21 21:29:54 +00:00
parent e69ade675e
commit 2467671c72

View file

@ -84,7 +84,6 @@ void (* qf_fxMesaMakeCurrent) (fxMesaContext ctx);
typedef void (GLAPIENTRY * QF_3DfxSetDitherModeEXT) (GrDitherMode_t mode);
cvar_t *vid_system_gamma;
cvar_t *tdfx_brighten;
static fxMesaContext fc = NULL;
@ -234,29 +233,6 @@ findres (int *width, int *height)
return GR_RESOLUTION_640x480;
}
void
TDFX_BrightenPalette (unsigned char *palette)
{
byte *pal;
int i;
float red, green, blue, maxnum, somenum;
pal = palette;
for (i = 0; i < 255; i++)
{
red = (float) pal[0];
green = (float) pal[1];
blue = (float) pal[2];
maxnum = max (red, max (green, blue));
somenum = (bound (0.0, (maxnum * tdfx_brighten->value), 255.0) /
maxnum);
pal[0] = (byte) ((somenum * red) + 0.5);
pal[1] = (byte) ((somenum * green) + 0.5);
pal[2] = (byte) ((somenum * blue) + 0.5);
pal += 3;
}
}
void
VID_Init (unsigned char *palette)
{
@ -328,9 +304,6 @@ VID_Init (unsigned char *palette)
GL_Init ();
if (tdfx_brighten->int_val)
TDFX_BrightenPalette(palette);
VID_InitGamma (palette);
VID_SetPalette (palette);
@ -349,8 +322,6 @@ VID_Init_Cvars (void)
{
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
"Use system gamma control if available");
tdfx_brighten = Cvar_Get ("tdfx_brighten", "0", CVAR_ROM, NULL,
"Brighten 3DFX palette");
}
void