mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-30 08:40:39 +00:00
Change fires to a more visually-appealing red-orange color. Looks *killer*
Add -brighten arg to GL targets, to replace -gamma but still look nice. "-brighten 2.5" brightens the palette by 2.5 times, to give a similar effect to the brightness cvar, but without the dithering brightness gives. This is a palette hack, which means it _can't_ be a cvar.
This commit is contained in:
parent
718544d190
commit
5bb2a9002c
9 changed files with 54 additions and 10 deletions
|
@ -127,6 +127,43 @@ void glrmain_init()
|
|||
{
|
||||
};
|
||||
|
||||
/*
|
||||
GL_CheckBrightness
|
||||
|
||||
This is something like the brightness cvar, except it hacks the palette
|
||||
directly instead of brightening the screen afterward.
|
||||
*/
|
||||
void
|
||||
GL_CheckBrightness (unsigned char *pal)
|
||||
{
|
||||
int i, inf;
|
||||
float brightness;
|
||||
|
||||
if ((i = COM_CheckParm ("-brighten"))) {
|
||||
brightness = atof (com_argv[i + 1]);
|
||||
brightness = bound (1, brightness, 5);
|
||||
} else {
|
||||
brightness = 1.0;
|
||||
}
|
||||
|
||||
// Build gamma table
|
||||
if (brightness == 1.0) { // screw the math
|
||||
for (i = 0; i < 256; i++) {
|
||||
gammatable[i] = i;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 256; i++) { // brighten up the palette
|
||||
inf = (i * brightness);
|
||||
inf = bound (0, inf, 255);
|
||||
gammatable[i] = inf;
|
||||
}
|
||||
}
|
||||
|
||||
// correct the palette
|
||||
for (i = 0; i < 768; i++) {
|
||||
pal[i] = gammatable[pal[i]];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue