vid_hardware gamma should be more consistant now.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@295 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-10-03 11:05:31 +00:00
parent c7c0246eb4
commit 70ab01cb49

View file

@ -627,6 +627,7 @@ V_UpdatePalette
*/
void GLV_UpdatePalette (void)
{
qboolean ogw;
int i, j;
qboolean new;
// qbyte *basepal, *newpal;
@ -636,9 +637,19 @@ void GLV_UpdatePalette (void)
qboolean force;
V_CalcPowerupCshift ();
// drop the damage value
cl.cshifts[CSHIFT_DAMAGE].percent -= host_frametime*150;
if (cl.cshifts[CSHIFT_DAMAGE].percent <= 0)
cl.cshifts[CSHIFT_DAMAGE].percent = 0;
// drop the bonus value
cl.cshifts[CSHIFT_BONUS].percent -= host_frametime*100;
if (cl.cshifts[CSHIFT_BONUS].percent <= 0)
cl.cshifts[CSHIFT_BONUS].percent = 0;
new = false;
for (i=0 ; i<NUM_CSHIFTS ; i++)
{
if (cl.cshifts[i].percent != cl.prev_cshifts[i].percent)
@ -654,16 +665,6 @@ void GLV_UpdatePalette (void)
}
}
// drop the damage value
cl.cshifts[CSHIFT_DAMAGE].percent -= host_frametime*150;
if (cl.cshifts[CSHIFT_DAMAGE].percent <= 0)
cl.cshifts[CSHIFT_DAMAGE].percent = 0;
// drop the bonus value
cl.cshifts[CSHIFT_BONUS].percent -= host_frametime*100;
if (cl.cshifts[CSHIFT_BONUS].percent <= 0)
cl.cshifts[CSHIFT_BONUS].percent = 0;
force = V_CheckGamma ();
if (!new && !force)
return;
@ -695,10 +696,11 @@ void GLV_UpdatePalette (void)
ramps[2][i] = gammatable[ib]<<8;
}
VID_ShiftPalette (NULL);
if (gammaworks)
ogw = gammaworks;
VID_ShiftPalette (NULL);
if (ogw != gammaworks)
{
BuildGammaTable(1,1);
Con_DPrintf("Gamma working state %i\n", gammaworks);
}
}
#endif