[renderer] Clean up R_MarkLeaves

Really? More to clean up before (vulkan) bsp rendering is thread-safe?
However, R_MarkLeaves was pretty close: just oldviewleaf and
visframecount, but that's still too much. Also, the reliance on
r_refdef.worldmodel irked me.
This commit is contained in:
Bill Currie 2023-06-28 23:44:38 +09:00
parent ecb9a15946
commit 585f1161db
15 changed files with 67 additions and 64 deletions

View file

@ -45,7 +45,6 @@ typedef enum {
struct entity_s;
void R_PushDlights (const vec3_t entorigin);
void R_MaxDlightsCheck (int max_dlights);
void R_Particles_Init_Cvars (void);
void R_InitBubble (void);

View file

@ -50,8 +50,19 @@ void R_RunParticles (float dT);
struct scene_s;
void R_NewScene (struct scene_s *scene);
typedef struct visstate_s {
const struct mleaf_s *viewleaf;
int *node_visframes;
int *leaf_visframes;
int *face_visframes;
int visframecount;
struct mod_brush_s *brush;
} visstate_t;
extern visstate_t r_visstate;//FIXME
// LordHavoc: relative bmodel lighting
void R_PushDlights (const vec3_t entorigin);
void R_PushDlights (const vec3_t entorigin, const visstate_t *visstate);
void R_DrawWaterSurfaces (void);
void *D_SurfaceCacheAddress (void) __attribute__((pure));
@ -77,11 +88,7 @@ struct animation_s;
struct transform_s;
void R_DrawAliasModel (struct entity_s *e);
void R_MarkLeaves (struct mleaf_s *viewleaf, int *node_visframes,
int *leaf_visframes, int *face_visframes);
extern int *r_node_visframes;
extern int *r_leaf_visframes;
extern int *r_face_visframes;
void R_MarkLeaves (visstate_t *state, const struct mleaf_s *viewleaf);
void GL_SetPalette (void *data, const byte *palette);
void GLSL_SetPalette (void *data, const byte *palette);

View file

@ -120,8 +120,6 @@ extern plane_t screenedge[4];
extern vec4f_t r_entorigin;
extern int r_visframecount;
//=============================================================================
extern int vstartscan;