From 2467671c72f64a0c544da2622eaab6168e3715b3 Mon Sep 17 00:00:00 2001 From: Chris Ison Date: Sun, 21 Oct 2001 21:29:54 +0000 Subject: [PATCH] removal of tdfx_brighten in preparation for gl_brighten --- libs/video/targets/vid_3dfxsvga.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/libs/video/targets/vid_3dfxsvga.c b/libs/video/targets/vid_3dfxsvga.c index 78d1b593d..c51950074 100644 --- a/libs/video/targets/vid_3dfxsvga.c +++ b/libs/video/targets/vid_3dfxsvga.c @@ -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