mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
removal of tdfx_brighten in preparation for gl_brighten
This commit is contained in:
parent
e69ade675e
commit
2467671c72
1 changed files with 0 additions and 29 deletions
|
@ -84,7 +84,6 @@ void (* qf_fxMesaMakeCurrent) (fxMesaContext ctx);
|
||||||
typedef void (GLAPIENTRY * QF_3DfxSetDitherModeEXT) (GrDitherMode_t mode);
|
typedef void (GLAPIENTRY * QF_3DfxSetDitherModeEXT) (GrDitherMode_t mode);
|
||||||
|
|
||||||
cvar_t *vid_system_gamma;
|
cvar_t *vid_system_gamma;
|
||||||
cvar_t *tdfx_brighten;
|
|
||||||
|
|
||||||
static fxMesaContext fc = NULL;
|
static fxMesaContext fc = NULL;
|
||||||
|
|
||||||
|
@ -234,29 +233,6 @@ findres (int *width, int *height)
|
||||||
return GR_RESOLUTION_640x480;
|
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
|
void
|
||||||
VID_Init (unsigned char *palette)
|
VID_Init (unsigned char *palette)
|
||||||
{
|
{
|
||||||
|
@ -328,9 +304,6 @@ VID_Init (unsigned char *palette)
|
||||||
|
|
||||||
GL_Init ();
|
GL_Init ();
|
||||||
|
|
||||||
if (tdfx_brighten->int_val)
|
|
||||||
TDFX_BrightenPalette(palette);
|
|
||||||
|
|
||||||
VID_InitGamma (palette);
|
VID_InitGamma (palette);
|
||||||
VID_SetPalette (palette);
|
VID_SetPalette (palette);
|
||||||
|
|
||||||
|
@ -349,8 +322,6 @@ VID_Init_Cvars (void)
|
||||||
{
|
{
|
||||||
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
|
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
|
||||||
"Use system gamma control if available");
|
"Use system gamma control if available");
|
||||||
tdfx_brighten = Cvar_Get ("tdfx_brighten", "0", CVAR_ROM, NULL,
|
|
||||||
"Brighten 3DFX palette");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue