diff --git a/libs/video/targets/vid_sunx.c b/libs/video/targets/vid_sunx.c index 6bf9d5267..7202fa257 100644 --- a/libs/video/targets/vid_sunx.c +++ b/libs/video/targets/vid_sunx.c @@ -361,44 +361,6 @@ D_EndDirectRect (int x, int y, int width, int height) // direct drawing of the "accessing disk" icon isn't supported under Nextstep } - -/* -================= -VID_Gamma_f - -Keybinding command -================= -*/ - -byte vid_gamma[256]; - -void -VID_Gamma_f (void) -{ - - float g, f, inf; - int i; - - if (Cmd_Argc () == 2) { - g = Q_atof (Cmd_Argv (1)); - - for (i = 0; i < 255; i++) { - f = pow ((i + 1) / 256.0, g); - inf = f * 255 + 0.5; - if (inf < 0) - inf = 0; - if (inf > 255) - inf = 255; - vid_gamma[i] = inf; - } - - VID_SetPalette (current_palette); - - vid.recalc_refdef = 1; // force a surface cache flush - } - -} - // ======================================================================== // Tragic death handler // ======================================================================== @@ -632,7 +594,6 @@ VID_Init (unsigned char *palette) int num_visuals; int template_mask; - Cmd_AddCommand ("gamma", VID_Gamma_f, "No Description"); for (i = 0; i < 256; i++) vid_gamma[i] = i; diff --git a/libs/video/targets/vid_sunxil.c b/libs/video/targets/vid_sunxil.c index a85439517..66d70f990 100644 --- a/libs/video/targets/vid_sunxil.c +++ b/libs/video/targets/vid_sunxil.c @@ -192,44 +192,6 @@ D_EndDirectRect (int x, int y, int width, int height) // direct drawing of the "accessing disk" icon isnt supported under Nextstep } - -/* -================= -VID_Gamma_f - -Keybinding command -================= -*/ - -byte vid_gamma[256]; - -void -VID_Gamma_f (void) -{ - - float g, f, inf; - int i; - - if (Cmd_Argc () == 2) { - g = Q_atof (Cmd_Argv (1)); - - for (i = 0; i < 255; i++) { - f = pow ((i + 1) / 256.0, g); - inf = f * 255 + 0.5; - if (inf < 0) - inf = 0; - if (inf > 255) - inf = 255; - vid_gamma[i] = inf; - } - - VID_SetPalette (current_palette); - - vid.recalc_refdef = 1; // force a surface cache flush - } - -} - qboolean CheckPixelMultiply (void) { @@ -415,8 +377,6 @@ VID_Init (unsigned char *palette) int desired_width = 320, desired_height = 200; - Cmd_AddCommand ("gamma", VID_Gamma_f, "No Description"); - pixel_multiply = Cvar_Get ("pixel_multiply", "2", CVAR_ARCHIVE, NULL, "None"); diff --git a/libs/video/targets/vid_svgalib.c b/libs/video/targets/vid_svgalib.c index 15c1a0d27..58dd97d5d 100644 --- a/libs/video/targets/vid_svgalib.c +++ b/libs/video/targets/vid_svgalib.c @@ -194,36 +194,6 @@ D_EndDirectRect (int x, int y, int width, int height) } -#if 0 -static void -VID_Gamma_f (void) -{ - float gamma, f, inf; - unsigned char palette[768]; - int i; - - if (Cmd_Argc () == 2) { - gamma = atof (Cmd_Argv (1)); - - for (i = 0; i < 768; i++) { - f = pow ((vid_basepal[i] + 1) / 256.0, gamma); - inf = f * 255 + 0.5; - if (inf < 0) - inf = 0; - if (inf > 255) - inf = 255; - palette[i] = inf; - } - - VID_SetPalette (palette); - - /* Force a surface cache flush */ - vid.recalc_refdef = 1; - } -} -#endif - - static void VID_DescribeMode_f (void) { @@ -490,10 +460,6 @@ VID_Init (unsigned char *palette) if (svgalib_inited) return; -#if 0 - Cmd_AddCommand ("gamma", VID_Gamma_f, "Brightness level"); -#endif - if (UseDisplay) { err = vga_init (); if (err)