Browse Source

engine: make Mod_SampleSizeForFace accept const surface

pull/2/head
Alibek Omarov 10 months ago
parent
commit
40c9a2fb82
  1. 2
      engine/common/mod_bmodel.c
  2. 2
      engine/common/mod_local.h
  3. 2
      engine/ref_api.h

2
engine/common/mod_bmodel.c

@ -980,7 +980,7 @@ Mod_SampleSizeForFace
return the current lightmap resolution per face return the current lightmap resolution per face
================== ==================
*/ */
int Mod_SampleSizeForFace( msurface_t *surf ) int Mod_SampleSizeForFace( const msurface_t *surf )
{ {
if( !surf || !surf->texinfo ) if( !surf || !surf->texinfo )
return LM_SAMPLE_SIZE; return LM_SAMPLE_SIZE;

2
engine/common/mod_local.h

@ -155,7 +155,7 @@ int Mod_CheckLump( const char *filename, const int lump, int *lumpsize );
int Mod_ReadLump( const char *filename, const int lump, void **lumpdata, int *lumpsize ); int Mod_ReadLump( const char *filename, const int lump, void **lumpdata, int *lumpsize );
int Mod_SaveLump( const char *filename, const int lump, void *lumpdata, int lumpsize ); int Mod_SaveLump( const char *filename, const int lump, void *lumpdata, int lumpsize );
mleaf_t *Mod_PointInLeaf( const vec3_t p, mnode_t *node ); mleaf_t *Mod_PointInLeaf( const vec3_t p, mnode_t *node );
int Mod_SampleSizeForFace( msurface_t *surf ); int Mod_SampleSizeForFace( const msurface_t *surf );
byte *Mod_GetPVSForPoint( const vec3_t p ); byte *Mod_GetPVSForPoint( const vec3_t p );
void Mod_UnloadBrushModel( model_t *mod ); void Mod_UnloadBrushModel( model_t *mod );
void Mod_PrintWorldStats_f( void ); void Mod_PrintWorldStats_f( void );

2
engine/ref_api.h

@ -307,7 +307,7 @@ typedef struct ref_api_s
qboolean (*CL_AddVisibleEntity)( cl_entity_t *ent, int entityType ); qboolean (*CL_AddVisibleEntity)( cl_entity_t *ent, int entityType );
// brushes // brushes
int (*Mod_SampleSizeForFace)( struct msurface_s *surf ); int (*Mod_SampleSizeForFace)( const struct msurface_s *surf );
qboolean (*Mod_BoxVisible)( const vec3_t mins, const vec3_t maxs, const byte *visbits ); qboolean (*Mod_BoxVisible)( const vec3_t mins, const vec3_t maxs, const byte *visbits );
struct world_static_s *(*GetWorld)( void ); // returns &world struct world_static_s *(*GetWorld)( void ); // returns &world
mleaf_t *(*Mod_PointInLeaf)( const vec3_t p, mnode_t *node ); mleaf_t *(*Mod_PointInLeaf)( const vec3_t p, mnode_t *node );

Loading…
Cancel
Save