mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
remove the last vestiges of VID_Gamma_f
This commit is contained in:
parent
48ae5d5a44
commit
991ee5090d
3 changed files with 0 additions and 113 deletions
|
@ -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
|
// 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
|
// Tragic death handler
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
@ -632,7 +594,6 @@ VID_Init (unsigned char *palette)
|
||||||
int num_visuals;
|
int num_visuals;
|
||||||
int template_mask;
|
int template_mask;
|
||||||
|
|
||||||
Cmd_AddCommand ("gamma", VID_Gamma_f, "No Description");
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
vid_gamma[i] = i;
|
vid_gamma[i] = i;
|
||||||
|
|
||||||
|
|
|
@ -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
|
// 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
|
qboolean
|
||||||
CheckPixelMultiply (void)
|
CheckPixelMultiply (void)
|
||||||
{
|
{
|
||||||
|
@ -415,8 +377,6 @@ VID_Init (unsigned char *palette)
|
||||||
|
|
||||||
int desired_width = 320, desired_height = 200;
|
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,
|
pixel_multiply = Cvar_Get ("pixel_multiply", "2", CVAR_ARCHIVE, NULL,
|
||||||
"None");
|
"None");
|
||||||
|
|
||||||
|
|
|
@ -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
|
static void
|
||||||
VID_DescribeMode_f (void)
|
VID_DescribeMode_f (void)
|
||||||
{
|
{
|
||||||
|
@ -490,10 +460,6 @@ VID_Init (unsigned char *palette)
|
||||||
if (svgalib_inited)
|
if (svgalib_inited)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if 0
|
|
||||||
Cmd_AddCommand ("gamma", VID_Gamma_f, "Brightness level");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (UseDisplay) {
|
if (UseDisplay) {
|
||||||
err = vga_init ();
|
err = vga_init ();
|
||||||
if (err)
|
if (err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue