From f7a95da94ac9067ed33e4e344faecad96adda406 Mon Sep 17 00:00:00 2001 From: tankefugl Date: Tue, 5 Jul 2005 22:28:54 +0000 Subject: [PATCH] Mantis 1070: o Added cl_gammaramp as a client variable git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@238 67975925-1194-0748-b3d5-c16f83f1a3a1 --- dev/performance-3.0.5/config.cfg | 1 + dev/performance-3.0.5/source/cl_dll/hud.cpp | 1 + dev/performance-3.0.5/source/mod/AvHClientVariables.h | 3 +++ dev/performance-3.0.5/source/mod/AvHHud.cpp | 3 ++- dev/performance-3.0.5/user.scr | 7 +++++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dev/performance-3.0.5/config.cfg b/dev/performance-3.0.5/config.cfg index 6c05eb5..9cb2430 100644 --- a/dev/performance-3.0.5/config.cfg +++ b/dev/performance-3.0.5/config.cfg @@ -89,6 +89,7 @@ cl_dlmax "128" cl_download_ingame "1" cl_dynamiclights "1" cl_forcedefaultfov "0" +cl_gammaramp "1" cl_highdetail "1" cl_himodels "0" cl_idealpitchscale "0.8" diff --git a/dev/performance-3.0.5/source/cl_dll/hud.cpp b/dev/performance-3.0.5/source/cl_dll/hud.cpp index 0d7bb3b..e38c2e5 100644 --- a/dev/performance-3.0.5/source/cl_dll/hud.cpp +++ b/dev/performance-3.0.5/source/cl_dll/hud.cpp @@ -358,6 +358,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; diff --git a/dev/performance-3.0.5/source/mod/AvHClientVariables.h b/dev/performance-3.0.5/source/mod/AvHClientVariables.h index a2ae501..96a4492 100644 --- a/dev/performance-3.0.5/source/mod/AvHClientVariables.h +++ b/dev/performance-3.0.5/source/mod/AvHClientVariables.h @@ -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" diff --git a/dev/performance-3.0.5/source/mod/AvHHud.cpp b/dev/performance-3.0.5/source/mod/AvHHud.cpp index 7a548d3..197e60f 100644 --- a/dev/performance-3.0.5/source/mod/AvHHud.cpp +++ b/dev/performance-3.0.5/source/mod/AvHHud.cpp @@ -1899,7 +1899,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); diff --git a/dev/performance-3.0.5/user.scr b/dev/performance-3.0.5/user.scr index e080863..e481f26 100644 --- a/dev/performance-3.0.5/user.scr +++ b/dev/performance-3.0.5/user.scr @@ -91,6 +91,13 @@ DESCRIPTION INFO_OPTIONS { "1" } } + "cl_gammaramp" + { + "Enable gamma ramp" + { BOOL } + { "1" } + } + "hud_fastswitch" { "Weapon fast-switch"