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
===================
*/
byte *
Mod_DecompressVis(byte *in, int row)
const byte *
Mod_DecompressVis(const byte *in, int row)
{
YQ2_ALIGNAS_TYPE(int) static byte decompressed[MAX_MAP_LEAFS / 8];
int c;

View file

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

View file

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

View file

@ -219,7 +219,7 @@ typedef struct model_s
void Mod_Init(void);
void Mod_ClearAll(void);
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);

View file

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

View file

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

View file

@ -381,7 +381,7 @@ extern void GL3_BeginRegistration(char *model);
extern struct model_s * GL3_RegisterModel(char *name);
extern void GL3_EndRegistration(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);
// 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 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_ */

View file

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

View file

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

View file

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