Browse Source

ref_soft: clean unused variables

pull/2/head
mittorn 6 years ago
parent
commit
103077b686
  1. 2
      r_context.c
  2. 1
      r_local.h
  3. 13
      r_main.c
  4. 4
      r_surf.c

2
r_context.c

@ -186,7 +186,7 @@ static int GL_RefGetParm( int parm, int arg ) @@ -186,7 +186,7 @@ static int GL_RefGetParm( int parm, int arg )
case PARM_MAX_IMAGE_UNITS:
return 0; //GL_MaxTextureUnits();
case PARM_REBUILD_GAMMA:
return 0; //glConfig.softwareGammaUpdate;
return 0;
case PARM_SURF_SAMPLESIZE:
if( arg >= 0 && arg < WORLDMODEL->numsurfaces )
return gEngfuncs.Mod_SampleSizeForFace( &WORLDMODEL->surfaces[arg] );

1
r_local.h

@ -293,7 +293,6 @@ typedef struct @@ -293,7 +293,6 @@ typedef struct
vec3_t modelorg; // relative to viewpoint
qboolean fCustomSkybox;
char mapname[MAX_STRING];
int sample_size;
uint sample_bits;
qboolean map_unload;

13
r_main.c

@ -1670,26 +1670,23 @@ R_BeginFrame @@ -1670,26 +1670,23 @@ R_BeginFrame
*/
void GAME_EXPORT R_BeginFrame( qboolean clearScene )
{
#if 0 // unused
if( R_DoResetGamma( ))
{
gEngfuncs.BuildGammaTable( 1.8f, 0.0f );
// glConfig.softwareGammaUpdate = true;
// GL_RebuildLightmaps();
// glConfig.softwareGammaUpdate = false;
D_FlushCaches( );
// next frame will be restored gamma
SetBits( vid_brightness->flags, FCVAR_CHANGED );
SetBits( vid_gamma->flags, FCVAR_CHANGED );
}
else if( FBitSet( vid_gamma->flags, FCVAR_CHANGED ) || FBitSet( vid_brightness->flags, FCVAR_CHANGED ))
else
#endif
if( FBitSet( vid_gamma->flags, FCVAR_CHANGED ) || FBitSet( vid_brightness->flags, FCVAR_CHANGED ))
{
gEngfuncs.BuildGammaTable( vid_gamma->value, vid_brightness->value );
//glConfig.softwareGammaUpdate = true;
// GL_RebuildLightmaps();
D_FlushCaches( );
//glConfig.softwareGammaUpdate = false;
// next frame will be restored gamma
ClearBits( vid_brightness->flags, FCVAR_CHANGED );
ClearBits( vid_gamma->flags, FCVAR_CHANGED );

4
r_surf.c

@ -1006,8 +1006,6 @@ D_FlushCaches @@ -1006,8 +1006,6 @@ D_FlushCaches
void D_FlushCaches( void )
{
surfcache_t *c;
model_t *world = WORLDMODEL;
qboolean newmap = !world || !Q_strcmp( tr.mapname, WORLDMODEL->name );
// if newmap, surfaces already freed
if( !tr.map_unload )
@ -1018,8 +1016,6 @@ void D_FlushCaches( void ) @@ -1018,8 +1016,6 @@ void D_FlushCaches( void )
*c->owner = NULL;
}
}
else
Q_strncpy( tr.mapname, WORLDMODEL->name, MAX_STRING );
sc_rover = sc_base;
sc_base->next = NULL;

Loading…
Cancel
Save