add const to Mod_ClusterPVS

This commit is contained in:
Denis Pauk 2021-09-19 21:45:49 +03:00
parent f3f8c9a1f6
commit e3a83c6b32
11 changed files with 16 additions and 16 deletions

View file

@ -32,8 +32,8 @@
Mod_DecompressVis Mod_DecompressVis
=================== ===================
*/ */
byte * const byte *
Mod_DecompressVis(byte *in, int row) Mod_DecompressVis(const byte *in, int row)
{ {
YQ2_ALIGNAS_TYPE(int) static byte decompressed[MAX_MAP_LEAFS / 8]; YQ2_ALIGNAS_TYPE(int) static byte decompressed[MAX_MAP_LEAFS / 8];
int c; int c;

View file

@ -79,8 +79,8 @@ Mod_PointInLeaf(vec3_t p, model_t *model)
return NULL; /* never reached */ return NULL; /* never reached */
} }
byte * const byte *
Mod_ClusterPVS(int cluster, model_t *model) Mod_ClusterPVS(int cluster, const model_t *model)
{ {
if ((cluster == -1) || !model->vis) if ((cluster == -1) || !model->vis)
{ {

View file

@ -966,7 +966,7 @@ R_DrawWorld(void)
void void
R_MarkLeaves(void) R_MarkLeaves(void)
{ {
byte *vis; const byte *vis;
YQ2_ALIGNAS_TYPE(int) byte fatvis[MAX_MAP_LEAFS / 8]; YQ2_ALIGNAS_TYPE(int) byte fatvis[MAX_MAP_LEAFS / 8];
mnode_t *node; mnode_t *node;
int i, c; int i, c;

View file

@ -219,7 +219,7 @@ typedef struct model_s
void Mod_Init(void); void Mod_Init(void);
void Mod_ClearAll(void); void Mod_ClearAll(void);
mleaf_t *Mod_PointInLeaf(vec3_t p, model_t *model); mleaf_t *Mod_PointInLeaf(vec3_t p, model_t *model);
byte *Mod_ClusterPVS(int cluster, model_t *model); const byte *Mod_ClusterPVS(int cluster, const model_t *model);
void Mod_Modellist_f(void); void Mod_Modellist_f(void);

View file

@ -76,8 +76,8 @@ GL3_Mod_PointInLeaf(vec3_t p, gl3model_t *model)
return NULL; /* never reached */ return NULL; /* never reached */
} }
byte* const byte*
GL3_Mod_ClusterPVS(int cluster, gl3model_t *model) GL3_Mod_ClusterPVS(int cluster, const gl3model_t *model)
{ {
if ((cluster == -1) || !model->vis) if ((cluster == -1) || !model->vis)
{ {

View file

@ -851,7 +851,7 @@ GL3_DrawWorld(void)
void void
GL3_MarkLeaves(void) GL3_MarkLeaves(void)
{ {
byte *vis; const byte *vis;
YQ2_ALIGNAS_TYPE(int) byte fatvis[MAX_MAP_LEAFS / 8]; YQ2_ALIGNAS_TYPE(int) byte fatvis[MAX_MAP_LEAFS / 8];
mnode_t *node; mnode_t *node;
int i, c; int i, c;

View file

@ -381,7 +381,7 @@ extern void GL3_BeginRegistration(char *model);
extern struct model_s * GL3_RegisterModel(char *name); extern struct model_s * GL3_RegisterModel(char *name);
extern void GL3_EndRegistration(void); extern void GL3_EndRegistration(void);
extern void GL3_Mod_Modellist_f(void); extern void GL3_Mod_Modellist_f(void);
extern byte* GL3_Mod_ClusterPVS(int cluster, gl3model_t *model); extern const byte* GL3_Mod_ClusterPVS(int cluster, const gl3model_t *model);
extern mleaf_t* GL3_Mod_PointInLeaf(vec3_t p, gl3model_t *model); extern mleaf_t* GL3_Mod_PointInLeaf(vec3_t p, gl3model_t *model);
// gl3_draw.c // gl3_draw.c

View file

@ -74,5 +74,5 @@ extern void GetWalInfo(char *name, int *width, int *height);
extern void GetM8Info(char *name, int *width, int *height); extern void GetM8Info(char *name, int *width, int *height);
extern float Mod_RadiusFromBounds(const vec3_t mins, const vec3_t maxs); extern float Mod_RadiusFromBounds(const vec3_t mins, const vec3_t maxs);
extern byte* Mod_DecompressVis(byte *in, int row); extern const byte* Mod_DecompressVis(const byte *in, int row);
#endif /* SRC_CLIENT_REFRESH_REF_SHARED_H_ */ #endif /* SRC_CLIENT_REFRESH_REF_SHARED_H_ */

View file

@ -222,8 +222,8 @@ typedef struct model_s
void Mod_Init(void); void Mod_Init(void);
mleaf_t *Mod_PointInLeaf(vec3_t p, model_t *model); mleaf_t *Mod_PointInLeaf(vec3_t p, const model_t *model);
byte *Mod_ClusterPVS(int cluster, model_t *model); const byte *Mod_ClusterPVS(int cluster, const model_t *model);
void Mod_Modellist_f(void); void Mod_Modellist_f(void);
void Mod_FreeAll(void); void Mod_FreeAll(void);

View file

@ -742,7 +742,7 @@ cluster
static void static void
R_MarkLeaves (void) R_MarkLeaves (void)
{ {
byte *vis; const byte *vis;
mnode_t *node; mnode_t *node;
int i; int i;
mleaf_t *leaf; mleaf_t *leaf;

View file

@ -263,8 +263,8 @@ Mod_PointInLeaf (vec3_t p, const model_t *model)
Mod_ClusterPVS Mod_ClusterPVS
============== ==============
*/ */
byte * const byte *
Mod_ClusterPVS (int cluster, model_t *model) Mod_ClusterPVS (int cluster, const model_t *model)
{ {
if (cluster == -1 || !model->vis) if (cluster == -1 || !model->vis)
return mod_novis; return mod_novis;