engine: common: remove unused IsBackgroundMap/Demo calls, remove unused gamma function

This commit is contained in:
Alibek Omarov 2023-04-03 04:31:12 +03:00
parent b0c71c598f
commit 4005ef831a
4 changed files with 0 additions and 39 deletions

View File

@ -150,16 +150,6 @@ qboolean CL_DisableVisibility( void )
return cls.envshot_disable_vis;
}
qboolean CL_IsBackgroundDemo( void )
{
return ( cls.demoplayback && cls.demonum != -1 );
}
qboolean CL_IsBackgroundMap( void )
{
return ( cl.background && !cls.demoplayback );
}
char *CL_Userinfo( void )
{
return cls.userinfo;

View File

@ -780,8 +780,6 @@ int SV_GetMaxClients( void );
qboolean CL_IsRecordDemo( void );
qboolean CL_IsTimeDemo( void );
qboolean CL_IsPlaybackDemo( void );
qboolean CL_IsBackgroundDemo( void );
qboolean CL_IsBackgroundMap( void );
qboolean SV_Initialized( void );
qboolean CL_LoadProgs( const char *name );
void CL_ProcessFile( qboolean successfully_received, const char *filename );
@ -860,7 +858,6 @@ void S_StopAllSounds( qboolean ambient );
// gamma routines
void BuildGammaTable( float gamma, float brightness );
byte LightToTexGamma( byte b );
byte TextureToGamma( byte b );
//
// identification.c

View File

@ -70,16 +70,6 @@ qboolean CL_DisableVisibility( void )
return false;
}
qboolean CL_IsBackgroundDemo( void )
{
return false;
}
qboolean CL_IsBackgroundMap( void )
{
return false;
}
void CL_Init( void )
{

View File

@ -20,7 +20,6 @@ GNU General Public License for more details.
//-----------------------------------------------------------------------------
// Gamma conversion support
//-----------------------------------------------------------------------------
static byte texgammatable[256]; // palette is sent through this to convert to screen gamma
static byte lightgammatable[256];
static int lineargammatable[1024];
static int screengammatable[1024];
@ -60,13 +59,6 @@ void BuildGammaTable( float lightgamma, float brightness )
lightgammatable[i] = bound( 0, inf, 255 );
}
for( i = 0; i < 256; i++ )
{
f = 255.0f * pow(( float )i / 255.0f, TEXGAMMA );
inf = (int)(f + 0.5f);
texgammatable[i] = bound( 0, inf, 255 );
}
for( i = 0; i < 1024; i++ )
{
// convert from screen gamma space to linear space
@ -84,11 +76,3 @@ byte LightToTexGamma( byte b )
else
return lightgammatable[b];
}
byte TextureToGamma( byte b )
{
if( FBitSet( host.features, ENGINE_LINEAR_GAMMA_SPACE ))
return b;
else
return texgammatable[b];
}