Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename functions r_dlightframecount parameter to lightframecount #1094

Merged
merged 1 commit into from Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/client/refresh/files/surf.c
Expand Up @@ -80,7 +80,7 @@ if surface is affected by this light
=============
*/
void
R_MarkLights(dlight_t *light, int bit, mnode_t *node, int r_dlightframecount,
R_MarkLights(dlight_t *light, int bit, mnode_t *node, int lightframecount,
marksurfacelights_t mark_surface_lights)
{
cplane_t *splitplane;
Expand All @@ -97,23 +97,23 @@ R_MarkLights(dlight_t *light, int bit, mnode_t *node, int r_dlightframecount,

if (dist > intensity - DLIGHT_CUTOFF) // (dist > light->intensity)
{
R_MarkLights (light, bit, node->children[0], r_dlightframecount,
R_MarkLights (light, bit, node->children[0], lightframecount,
mark_surface_lights);
return;
}

if (dist < -intensity + DLIGHT_CUTOFF) // (dist < -light->intensity)
{
R_MarkLights(light, bit, node->children[1], r_dlightframecount,
R_MarkLights(light, bit, node->children[1], lightframecount,
mark_surface_lights);
return;
}

mark_surface_lights(light, bit, node, r_dlightframecount);
mark_surface_lights(light, bit, node, lightframecount);

R_MarkLights(light, bit, node->children[0], r_dlightframecount,
R_MarkLights(light, bit, node->children[0], lightframecount,
mark_surface_lights);
R_MarkLights(light, bit, node->children[1], r_dlightframecount,
R_MarkLights(light, bit, node->children[1], lightframecount,
mark_surface_lights);
}

Expand Down
6 changes: 3 additions & 3 deletions src/client/refresh/gl1/gl1_light.c
Expand Up @@ -119,7 +119,7 @@ R_RenderDlights(void)
}

void
R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node, int r_dlightframecount)
R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node, int lightframecount)
{
msurface_t *surf;
int i;
Expand Down Expand Up @@ -148,10 +148,10 @@ R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node, int r_dlightframeco
continue;
}

if (surf->dlightframe != r_dlightframecount)
if (surf->dlightframe != lightframecount)
{
surf->dlightbits = 0;
surf->dlightframe = r_dlightframecount;
surf->dlightframe = lightframecount;
}

surf->dlightbits |= bit;
Expand Down
2 changes: 1 addition & 1 deletion src/client/refresh/gl1/header/local.h
Expand Up @@ -279,7 +279,7 @@ void R_AddSkySurface(msurface_t *fa);
void R_ClearSkyBox(void);
void R_DrawSkyBox(void);
void R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node,
int r_dlightframecount);
int lightframecount);

void COM_StripExtension(char *in, char *out);

Expand Down
4 changes: 2 additions & 2 deletions src/client/refresh/ref_shared.h
Expand Up @@ -213,8 +213,8 @@ extern mleaf_t *Mod_PointInLeaf(const vec3_t p, mnode_t *node);
#define DLIGHT_CUTOFF 64

typedef void (*marksurfacelights_t)(dlight_t *light, int bit, mnode_t *node,
int r_dlightframecount);
extern void R_MarkLights (dlight_t *light, int bit, mnode_t *node, int r_dlightframecount,
int lightframecount);
extern void R_MarkLights(dlight_t *light, int bit, mnode_t *node, int lightframecount,
marksurfacelights_t mark_surface_lights);
extern struct image_s *R_TextureAnimation(const entity_t *currententity,
const mtexinfo_t *tex);
Expand Down
6 changes: 3 additions & 3 deletions src/client/refresh/soft/sw_light.c
Expand Up @@ -30,7 +30,7 @@ DYNAMIC LIGHTS
*/

static void
R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node, int r_dlightframecount)
R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node, int lightframecount)
{
msurface_t *surf;
int i;
Expand All @@ -39,10 +39,10 @@ R_MarkSurfaceLights(dlight_t *light, int bit, mnode_t *node, int r_dlightframeco
surf = r_worldmodel->surfaces + node->firstsurface;
for (i = 0; i < node->numsurfaces; i++, surf++)
{
if (surf->dlightframe != r_dlightframecount)
if (surf->dlightframe != lightframecount)
{
surf->dlightbits = 0;
surf->dlightframe = r_dlightframecount;
surf->dlightframe = lightframecount;
}
surf->dlightbits |= bit;
}
Expand Down