Mantis 0001070:

o Added new option to the Advanced menu: "Enable gamma ramp". The cvar for it is cl_gammaramp which defaults to 1. Setting it to 0 will disable the forced gamma ramp changes.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@206 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-06-22 12:27:50 +00:00
parent 6af2df79a2
commit 7652448e28
3 changed files with 6 additions and 1 deletions

View file

@ -208,6 +208,7 @@ void CHud :: Init( void )
CVAR_CREATE( "cl_showspeed", "0", 0);
CVAR_CREATE( kvLabelMaps, "0", FCVAR_ARCHIVE);
CVAR_CREATE( kvGammaRamp, "0", FCVAR_ARCHIVE);
m_pSpriteList = NULL;

View file

@ -38,6 +38,9 @@ extern cvar_t* cl_musicdir;
// puzl: 1064 The cl var that controls the display of labelled minimaps
#define kvLabelMaps "cl_labelmaps"
// :puzl
// tankefugl: 0001070 - enables forced gamma ramp loading
#define kvGammaRamp "cl_gammaramp"
// :tankefugl
#define kvCMHotKeys "cl_cmhotkeys"
#define kvForceDefaultFOV "cl_forcedefaultfov"
#define kvCenterEntityID "cl_centerentityid"

View file

@ -1817,7 +1817,8 @@ bool AvHHud::SetGamma(float inSlope)
theGammaToTry -= kGammaIncrement;
sGameGammaTable.ProcessSlope(theGammaToTry);
if(sGameGammaTable.InitializeToVideoState())
// tankefugl: fakes a successful gamma ramp change if cl_gammaramp is set to 0
if((CVAR_GET_FLOAT(kvGammaRamp) == 0) || sGameGammaTable.InitializeToVideoState())
{
// Tell UI components so they can change shading to look the same
this->GetManager().NotifyGammaChange(theGammaToTry);