Browse Source

ref: gl: remove useless R_CountDynamicLights function

master
Alibek Omarov 5 months ago
parent
commit
5696c9c96a
  1. 1
      ref/gl/gl_local.h
  2. 20
      ref/gl/gl_rlight.c
  3. 4
      ref/gl/gl_rsurf.c

1
ref/gl/gl_local.h

@ -383,7 +383,6 @@ void R_AnimateLight( void ); @@ -383,7 +383,6 @@ void R_AnimateLight( void );
void R_GetLightSpot( vec3_t lightspot );
void R_MarkLights( dlight_t *light, int bit, mnode_t *node );
colorVec R_LightVec( const vec3_t start, const vec3_t end, vec3_t lightspot, vec3_t lightvec );
int R_CountSurfaceDlights( msurface_t *surf );
colorVec R_LightPoint( const vec3_t p0 );
//

20
ref/gl/gl_rlight.c

@ -171,26 +171,6 @@ void R_PushDlights( void ) @@ -171,26 +171,6 @@ void R_PushDlights( void )
}
}
/*
=============
R_CountSurfaceDlights
=============
*/
int R_CountSurfaceDlights( msurface_t *surf )
{
int i, numDlights = 0;
for( i = 0; i < MAX_DLIGHTS; i++ )
{
if(!( surf->dlightbits & BIT( i )))
continue; // not lit by this light
numDlights++;
}
return numDlights;
}
/*
=======================================================================

4
ref/gl/gl_rsurf.c

@ -527,7 +527,7 @@ texture_t *R_TextureAnimation( msurface_t *s ) @@ -527,7 +527,7 @@ texture_t *R_TextureAnimation( msurface_t *s )
R_AddDynamicLights
===============
*/
void R_AddDynamicLights( msurface_t *surf )
static void R_AddDynamicLights( msurface_t *surf )
{
float dist, rad, minlight;
int lnum, s, t, sd, td, smax, tmax;
@ -541,7 +541,7 @@ void R_AddDynamicLights( msurface_t *surf ) @@ -541,7 +541,7 @@ void R_AddDynamicLights( msurface_t *surf )
uint *bl;
// no dlighted surfaces here
if( !R_CountSurfaceDlights( surf )) return;
if( !surf->dlightbits ) return;
sample_size = gEngfuncs.Mod_SampleSizeForFace( surf );
smax = (info->lightextents[0] / sample_size) + 1;

Loading…
Cancel
Save