ref: gl: fix -Wmissing-prototypes

This commit is contained in:
Alibek Omarov 2024-01-27 20:18:05 +03:00
parent bf959da7ff
commit 661e60720d
16 changed files with 115 additions and 112 deletions

View File

@ -18,7 +18,7 @@ def build(bld):
target = 'gl4es',
features = 'c',
includes = ['gl4es/src', 'gl4es/src/gl', 'gl4es/src/glx', 'gl4es/include'],
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'EXTERNAL_GETPROCADDRESS=GL4ES_GetProcAddress', 'NO_LOADER', 'STATICLIB'],
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'NO_LOADER', 'STATICLIB'],
cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'],
subsystem = bld.env.MSVC_SUBSYSTEM,
export_includes = '.')

View File

@ -495,7 +495,7 @@ static void GL2_InitIncrementalBuffer( int i, GLuint size )
}
qboolean GL2_InitProgs( void )
static qboolean GL2_InitProgs( void )
{
static const GLuint precache_progs[] = {
BIT( GL2_ATTR_POS ), // out = ucolor

View File

@ -225,7 +225,7 @@ Generate a list of trifans or strips
for the model, which holds for all frames
================
*/
void BuildTris( void )
static void BuildTris( void )
{
int len, bestlen, besttype = 0;
int bestverts[1024];
@ -305,7 +305,7 @@ void BuildTris( void )
GL_MakeAliasModelDisplayLists
================
*/
void GL_MakeAliasModelDisplayLists( model_t *m )
static void GL_MakeAliasModelDisplayLists( model_t *m )
{
trivertex_t *verts;
int i, j;
@ -340,7 +340,7 @@ ALIAS MODELS
Mod_LoadAliasFrame
=================
*/
void *Mod_LoadAliasFrame( void *pin, maliasframedesc_t *frame )
static void *Mod_LoadAliasFrame( void *pin, maliasframedesc_t *frame )
{
daliasframe_t *pdaliasframe;
trivertex_t *pinframe;
@ -372,7 +372,7 @@ void *Mod_LoadAliasFrame( void *pin, maliasframedesc_t *frame )
Mod_LoadAliasGroup
=================
*/
void *Mod_LoadAliasGroup( void *pin, maliasframedesc_t *frame )
static void *Mod_LoadAliasGroup( void *pin, maliasframedesc_t *frame )
{
daliasgroup_t *pingroup;
int i, numframes;
@ -413,7 +413,7 @@ void *Mod_LoadAliasGroup( void *pin, maliasframedesc_t *frame )
Mod_CreateSkinData
===============
*/
rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
static rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
{
static rgbdata_t skin;
char name[MAX_QPATH];
@ -475,7 +475,7 @@ rgbdata_t *Mod_CreateSkinData( model_t *mod, byte *data, int width, int height )
return gEngfuncs.FS_CopyImage( &skin );
}
void *Mod_LoadSingleSkin( model_t *loadmodel, daliasskintype_t *pskintype, int skinnum, int size )
static void *Mod_LoadSingleSkin( model_t *loadmodel, daliasskintype_t *pskintype, int skinnum, int size )
{
string name, lumaname;
string checkname;
@ -506,7 +506,7 @@ void *Mod_LoadSingleSkin( model_t *loadmodel, daliasskintype_t *pskintype, int s
return ((byte *)(pskintype + 1) + size);
}
void *Mod_LoadGroupSkin( model_t *loadmodel, daliasskintype_t *pskintype, int skinnum, int size )
static void *Mod_LoadGroupSkin( model_t *loadmodel, daliasskintype_t *pskintype, int skinnum, int size )
{
daliasskininterval_t *pinskinintervals;
daliasskingroup_t *pinskingroup;
@ -552,7 +552,7 @@ void *Mod_LoadGroupSkin( model_t *loadmodel, daliasskintype_t *pskintype, int sk
Mod_LoadAllSkins
===============
*/
void *Mod_LoadAllSkins( model_t *mod, int numskins, daliasskintype_t *pskintype )
static void *Mod_LoadAllSkins( model_t *mod, int numskins, daliasskintype_t *pskintype )
{
int i, size;
@ -582,7 +582,7 @@ void *Mod_LoadAllSkins( model_t *mod, int numskins, daliasskintype_t *pskintype
Mod_CalcAliasBounds
=================
*/
void Mod_CalcAliasBounds( model_t *mod )
static void Mod_CalcAliasBounds( model_t *mod )
{
int i, j, k;
float radius;
@ -763,7 +763,7 @@ R_AliasDynamicLight
similar to R_StudioDynamicLight
===============
*/
void R_AliasDynamicLight( cl_entity_t *ent, alight_t *plight )
static void R_AliasDynamicLight( cl_entity_t *ent, alight_t *plight )
{
movevars_t *mv = tr.movevars;
vec3_t lightDir, vecSrc, vecEnd;
@ -943,7 +943,7 @@ R_AliasSetupLighting
===============
*/
void R_AliasSetupLighting( alight_t *plight )
static void R_AliasSetupLighting( alight_t *plight )
{
if( !m_pAliasHeader || !plight )
return;
@ -964,7 +964,7 @@ R_AliasLighting
===============
*/
void R_AliasLighting( float *lv, const vec3_t normal )
static void R_AliasLighting( float *lv, const vec3_t normal )
{
float illum = g_alias.ambientlight;
float r, lightcos;
@ -1013,7 +1013,7 @@ static void R_AliasSetRemapColors( int newTop, int newBottom )
GL_DrawAliasFrame
=============
*/
void GL_DrawAliasFrame( aliashdr_t *paliashdr )
static void GL_DrawAliasFrame( aliashdr_t *paliashdr )
{
float lv_tmp;
trivertex_t *verts0;
@ -1075,7 +1075,7 @@ void GL_DrawAliasFrame( aliashdr_t *paliashdr )
GL_DrawAliasShadow
=============
*/
void GL_DrawAliasShadow( aliashdr_t *paliashdr )
static void GL_DrawAliasShadow( aliashdr_t *paliashdr )
{
trivertex_t *verts0;
trivertex_t *verts1;
@ -1153,7 +1153,7 @@ R_AliasLerpMovement
====================
*/
void R_AliasLerpMovement( cl_entity_t *e )
static void R_AliasLerpMovement( cl_entity_t *e )
{
float f = 1.0f;
@ -1196,7 +1196,7 @@ R_SetupAliasFrame
=================
*/
void R_SetupAliasFrame( cl_entity_t *e, aliashdr_t *paliashdr )
static void R_SetupAliasFrame( cl_entity_t *e, aliashdr_t *paliashdr )
{
int newpose, oldpose;
int newframe, oldframe;

View File

@ -49,7 +49,7 @@ R_Speeds_Printf
helper to print into r_speeds message
==============
*/
void R_Speeds_Printf( const char *msg, ... )
static void R_Speeds_Printf( const char *msg, ... )
{
va_list argptr;
char text[2048];

View File

@ -370,7 +370,7 @@ R_DrawTorus
Draw beamtours
================
*/
void R_DrawTorus( vec3_t source, vec3_t delta, float width, float scale, float freq, float speed, int segments )
static void R_DrawTorus( vec3_t source, vec3_t delta, float width, float scale, float freq, float speed, int segments )
{
int i, noiseIndex, noiseStep;
float div, length, fraction, factor, vLast, vStep;
@ -459,7 +459,7 @@ R_DrawDisk
Draw beamdisk
================
*/
void R_DrawDisk( vec3_t source, vec3_t delta, float width, float scale, float freq, float speed, int segments )
static void R_DrawDisk( vec3_t source, vec3_t delta, float width, float scale, float freq, float speed, int segments )
{
float div, length, fraction;
float w, vLast, vStep;
@ -517,7 +517,7 @@ R_DrawCylinder
Draw beam cylinder
================
*/
void R_DrawCylinder( vec3_t source, vec3_t delta, float width, float scale, float freq, float speed, int segments )
static void R_DrawCylinder( vec3_t source, vec3_t delta, float width, float scale, float freq, float speed, int segments )
{
float div, length, fraction;
float vLast, vStep;
@ -574,7 +574,7 @@ R_DrawBeamFollow
drawi followed beam
==============
*/
void R_DrawBeamFollow( BEAM *pbeam, float frametime )
static void R_DrawBeamFollow( BEAM *pbeam, float frametime )
{
particle_t *pnew, *particles;
float fraction, div, vLast, vStep;
@ -724,7 +724,7 @@ R_DrawRing
Draw beamring
================
*/
void R_DrawRing( vec3_t source, vec3_t delta, float width, float amplitude, float freq, float speed, int segments )
static void R_DrawRing( vec3_t source, vec3_t delta, float width, float amplitude, float freq, float speed, int segments )
{
int i, j, noiseIndex, noiseStep;
float div, length, fraction, factor, vLast, vStep;
@ -881,7 +881,7 @@ R_BeamRecomputeEndpoints
Recomputes beam endpoints..
==============
*/
qboolean R_BeamRecomputeEndpoints( BEAM *pbeam )
static qboolean R_BeamRecomputeEndpoints( BEAM *pbeam )
{
if( FBitSet( pbeam->flags, FBEAM_STARTENTITY ))
{
@ -934,7 +934,7 @@ R_BeamDraw
Update beam vars and draw it
==============
*/
void R_BeamDraw( BEAM *pbeam, float frametime )
static void R_BeamDraw( BEAM *pbeam, float frametime )
{
model_t *model;
vec3_t delta;
@ -1180,7 +1180,7 @@ R_BeamDrawCustomEntity
initialize beam from server entity
==============
*/
void R_BeamDrawCustomEntity( cl_entity_t *ent )
static void R_BeamDrawCustomEntity( cl_entity_t *ent )
{
BEAM beam;
float amp = ent->curstate.body / 100.0f;

View File

@ -95,7 +95,7 @@ static void GAME_EXPORT CL_FillRGBABlend( float _x, float _y, float _w, float _h
pglDisable( GL_BLEND );
}
void Mod_BrushUnloadTextures( model_t *mod )
static void Mod_BrushUnloadTextures( model_t *mod )
{
int i;
@ -110,7 +110,7 @@ void Mod_BrushUnloadTextures( model_t *mod )
}
}
void Mod_UnloadTextures( model_t *mod )
static void Mod_UnloadTextures( model_t *mod )
{
Assert( mod != NULL );
@ -134,7 +134,7 @@ void Mod_UnloadTextures( model_t *mod )
}
}
qboolean Mod_ProcessRenderData( model_t *mod, qboolean create, const byte *buf )
static qboolean Mod_ProcessRenderData( model_t *mod, qboolean create, const byte *buf )
{
qboolean loaded = true;
@ -309,7 +309,7 @@ static const char *GL_TextureName( unsigned int texnum )
return R_GetTexture( texnum )->name;
}
const byte *GL_TextureData( unsigned int texnum )
static const byte *GL_TextureData( unsigned int texnum )
{
rgbdata_t *pic = R_GetTexture( texnum )->original;
@ -318,7 +318,7 @@ const byte *GL_TextureData( unsigned int texnum )
return NULL;
}
void R_ProcessEntData( qboolean allocate, cl_entity_t *entities, unsigned int max_entities )
static void R_ProcessEntData( qboolean allocate, cl_entity_t *entities, unsigned int max_entities )
{
if( !allocate )
{
@ -344,7 +344,7 @@ static void GAME_EXPORT R_Flush( unsigned int flags )
// stub
}
qboolean R_SetDisplayTransform( ref_screen_rotation_t rotate, int offset_x, int offset_y, float scale_x, float scale_y )
static qboolean R_SetDisplayTransform( ref_screen_rotation_t rotate, int offset_x, int offset_y, float scale_x, float scale_y )
{
qboolean ret = true;
if( rotate > 0 )
@ -532,6 +532,7 @@ ref_interface_t gReffuncs =
VGUI_GenerateTexture,
};
int EXPORT GetRefAPI( int version, ref_interface_t *funcs, ref_api_t *engfuncs, ref_globals_t *globals );
int EXPORT GetRefAPI( int version, ref_interface_t *funcs, ref_api_t *engfuncs, ref_globals_t *globals )
{
if( version != REF_API_VERSION )

View File

@ -143,7 +143,7 @@ static void R_GetDecalDimensions( int texture, int *width, int *height )
//-----------------------------------------------------------------------------
// compute the decal basis based on surface normal
//-----------------------------------------------------------------------------
void R_DecalComputeBasis( msurface_t *surf, int flags, vec3_t textureSpaceBasis[3] )
static void R_DecalComputeBasis( msurface_t *surf, int flags, vec3_t textureSpaceBasis[3] )
{
vec3_t surfaceNormal;
@ -179,7 +179,7 @@ void R_DecalComputeBasis( msurface_t *surf, int flags, vec3_t textureSpaceBasis[
VectorNormalize2( surf->texinfo->vecs[1], textureSpaceBasis[1] );
}
void R_SetupDecalTextureSpaceBasis( decal_t *pDecal, msurface_t *surf, int texture, vec3_t textureSpaceBasis[3], float decalWorldScale[2] )
static void R_SetupDecalTextureSpaceBasis( decal_t *pDecal, msurface_t *surf, int texture, vec3_t textureSpaceBasis[3], float decalWorldScale[2] )
{
int width, height;
@ -199,7 +199,7 @@ void R_SetupDecalTextureSpaceBasis( decal_t *pDecal, msurface_t *surf, int textu
}
// Build the initial list of vertices from the surface verts into the global array, 'verts'.
void R_SetupDecalVertsForMSurface( decal_t *pDecal, msurface_t *surf, vec3_t textureSpaceBasis[3], float *verts )
static void R_SetupDecalVertsForMSurface( decal_t *pDecal, msurface_t *surf, vec3_t textureSpaceBasis[3], float *verts )
{
float *v;
int i;
@ -214,7 +214,7 @@ void R_SetupDecalVertsForMSurface( decal_t *pDecal, msurface_t *surf, vec3_t tex
}
// Figure out where the decal maps onto the surface.
void R_SetupDecalClip( decal_t *pDecal, msurface_t *surf, int texture, vec3_t textureSpaceBasis[3], float decalWorldScale[2] )
static void R_SetupDecalClip( decal_t *pDecal, msurface_t *surf, int texture, vec3_t textureSpaceBasis[3], float decalWorldScale[2] )
{
R_SetupDecalTextureSpaceBasis( pDecal, surf, texture, textureSpaceBasis, decalWorldScale );
@ -229,7 +229,7 @@ void R_SetupDecalClip( decal_t *pDecal, msurface_t *surf, int texture, vec3_t te
// Clip polygon to decal in texture space
// JAY: This code is lame, change it later. It does way too much work per frame
// It can be made to recursively call the clipping code and only copy the vertex list once
int R_ClipInside( float *vert, int edge )
static int R_ClipInside( float *vert, int edge )
{
switch( edge )
{
@ -253,7 +253,7 @@ int R_ClipInside( float *vert, int edge )
return 0;
}
void R_ClipIntersect( float *one, float *two, float *out, int edge )
static void R_ClipIntersect( float *one, float *two, float *out, int edge )
{
float t;
@ -354,7 +354,7 @@ static int SHClip( float *vert, int vertCount, float *out, int edge )
return outCount;
}
float *R_DoDecalSHClip( float *pInVerts, decal_t *pDecal, int nStartVerts, int *pVertCount )
static float *R_DoDecalSHClip( float *pInVerts, decal_t *pDecal, int nStartVerts, int *pVertCount )
{
float *pOutVerts = g_DecalClipVerts[0];
int outCount;
@ -374,7 +374,7 @@ float *R_DoDecalSHClip( float *pInVerts, decal_t *pDecal, int nStartVerts, int *
//-----------------------------------------------------------------------------
// Generate clipped vertex list for decal pdecal projected onto polygon psurf
//-----------------------------------------------------------------------------
float *R_DecalVertsClip( decal_t *pDecal, msurface_t *surf, int texture, int *pVertCount )
static float *R_DecalVertsClip( decal_t *pDecal, msurface_t *surf, int texture, int *pVertCount )
{
float decalWorldScale[2];
vec3_t textureSpaceBasis[3];
@ -492,7 +492,7 @@ R_DecalCreatePoly
creates mesh for decal on first rendering
====================
*/
glpoly_t *R_DecalCreatePoly( decalinfo_t *decalinfo, decal_t *pdecal, msurface_t *surf )
static glpoly_t *R_DecalCreatePoly( decalinfo_t *decalinfo, decal_t *pdecal, msurface_t *surf )
{
int lnumverts;
glpoly_t *poly;
@ -595,7 +595,7 @@ static void R_DecalCreate( decalinfo_t *decalinfo, msurface_t *surf, float x, fl
R_AddDecalToSurface( pdecal, surf, decalinfo );
}
void R_DecalSurface( msurface_t *surf, decalinfo_t *decalinfo )
static void R_DecalSurface( msurface_t *surf, decalinfo_t *decalinfo )
{
// get the texture associated with this surface
mtexinfo_t *tex = surf->texinfo;

View File

@ -883,7 +883,7 @@ GL_BoxFilter3x3
box filter 3x3
=================
*/
void GL_BoxFilter3x3( byte *out, const byte *in, int w, int h, int x, int y )
static void GL_BoxFilter3x3( byte *out, const byte *in, int w, int h, int x, int y )
{
int r = 0, g = 0, b = 0, a = 0;
int count = 0, acount = 0;
@ -930,7 +930,7 @@ GL_ApplyFilter
Apply box-filter to 1-bit alpha
=================
*/
byte *GL_ApplyFilter( const byte *source, int width, int height )
static byte *GL_ApplyFilter( const byte *source, int width, int height )
{
byte *in = (byte *)source;
byte *out = (byte *)source;
@ -1355,7 +1355,7 @@ static void GL_ProcessImage( gl_texture_t *tex, rgbdata_t *pic )
GL_CheckTexName
================
*/
qboolean GL_CheckTexName( const char *name )
static qboolean GL_CheckTexName( const char *name )
{
int len;

View File

@ -624,6 +624,7 @@ GL_GetProcAddress
defined just for nanogl/glwes, so it don't link to SDL2 directly, nor use dlsym
==============
*/
void GAME_EXPORT *GL_GetProcAddress( const char *name ); // keep defined for nanogl/wes
void GAME_EXPORT *GL_GetProcAddress( const char *name )
{
return gEngfuncs.GL_GetProcAddress( name );
@ -715,7 +716,7 @@ static void GL_SetDefaults( void )
R_RenderInfo_f
=================
*/
void R_RenderInfo_f( void )
static void R_RenderInfo_f( void )
{
gEngfuncs.Con_Printf( "\n" );
gEngfuncs.Con_Printf( "GL_VENDOR: %s\n", glConfig.vendor_string );
@ -773,7 +774,7 @@ void R_RenderInfo_f( void )
}
#ifdef XASH_GLES
void GL_InitExtensionsGLES( void )
static void GL_InitExtensionsGLES( void )
{
int extid;
@ -891,7 +892,7 @@ void GL_InitExtensionsGLES( void )
#endif
}
#else
void GL_InitExtensionsBigGL( void )
static void GL_InitExtensionsBigGL( void )
{
// intialize wrapper type
glConfig.context = gEngfuncs.Sys_CheckParm( "-glcore" )? CONTEXT_TYPE_GL_CORE : CONTEXT_TYPE_GL;
@ -1172,7 +1173,7 @@ void GL_ClearExtensions( void )
GL_InitCommands
=================
*/
void GL_InitCommands( void )
static void GL_InitCommands( void )
{
RETRIEVE_ENGINE_SHARED_CVAR_LIST();
@ -1255,7 +1256,7 @@ static void R_CheckVBO( void )
GL_RemoveCommands
=================
*/
void GL_RemoveCommands( void )
static void GL_RemoveCommands( void )
{
gEngfuncs.Cmd_RemoveCommand( "r_info" );
}
@ -1516,12 +1517,13 @@ void GL_SetupAttributes( int safegl )
void wes_init( const char *gles2 );
int nanoGL_Init( void );
#ifdef XASH_GL4ES
void GL4ES_GetMainFBSize( int *width, int *height )
static void GL4ES_GetMainFBSize( int *width, int *height )
{
*width = gpGlobals->width;
*height = gpGlobals->height;
}
void *GL4ES_GetProcAddress( const char *name )
static void *GL4ES_GetProcAddress( const char *name )
{
if( !Q_strcmp(name, "glShadeModel") )
// combined gles/gles2/gl implementation exports this, but it is invalid

View File

@ -336,7 +336,7 @@ R_LightVec
check bspmodels to get light from
=================
*/
colorVec R_LightVecInternal( const vec3_t start, const vec3_t end, vec3_t lspot, vec3_t lvec )
static colorVec R_LightVecInternal( const vec3_t start, const vec3_t end, vec3_t lspot, vec3_t lvec )
{
float last_fraction;
int i, maxEnts = 1;

View File

@ -807,7 +807,7 @@ void R_DrawFog( void )
R_DrawEntitiesOnList
=============
*/
void R_DrawEntitiesOnList( void )
static void R_DrawEntitiesOnList( void )
{
int i;

View File

@ -119,7 +119,7 @@ void Matrix4x4_ToArrayFloatGL( const matrix4x4 in, float out[16] )
out[15] = in[3][3];
}
void Matrix4x4_CreateTranslate( matrix4x4 out, float x, float y, float z )
static void Matrix4x4_CreateTranslate( matrix4x4 out, float x, float y, float z )
{
out[0][0] = 1.0f;
out[0][1] = 0.0f;
@ -139,7 +139,7 @@ void Matrix4x4_CreateTranslate( matrix4x4 out, float x, float y, float z )
out[3][3] = 1.0f;
}
void Matrix4x4_CreateRotate( matrix4x4 out, float angle, float x, float y, float z )
static void Matrix4x4_CreateRotate( matrix4x4 out, float angle, float x, float y, float z )
{
float len, c, s;

View File

@ -224,7 +224,7 @@ every render pass applies new fog layer, resulting in wrong fog color
recalculate fog color for current pass count
===============================
*/
void GL_SetupFogColorForSurfacesEx( int passes, float density, qboolean blend_lightmaps )
static void GL_SetupFogColorForSurfacesEx( int passes, float density, qboolean blend_lightmaps )
{
vec4_t fogColor;
float factor, div;
@ -388,7 +388,7 @@ R_TextureAnim
Returns the proper texture for a given time and base texture, do not process random tiling
===============
*/
texture_t *R_TextureAnim( texture_t *b )
static texture_t *R_TextureAnim( texture_t *b )
{
texture_t *base = b;
int count, reletive;
@ -439,7 +439,7 @@ R_TextureRandomTiling
Returns the proper texture for a given surface without animation
===============
*/
texture_t *R_TextureRandomTiling( msurface_t *s )
static texture_t *R_TextureRandomTiling( msurface_t *s )
{
texture_t *base = s->texinfo->texture;
int count, reletive;
@ -620,7 +620,7 @@ static void R_AddDynamicLights( msurface_t *surf )
R_SetCacheState
================
*/
void R_SetCacheState( msurface_t *surf )
static void R_SetCacheState( msurface_t *surf )
{
int maps;
@ -888,7 +888,7 @@ DrawGLPolyChain
Render lightmaps
================
*/
void DrawGLPolyChain( glpoly_t *p, float soffset, float toffset )
static void DrawGLPolyChain( glpoly_t *p, float soffset, float toffset )
{
qboolean dynamic = true;
@ -942,7 +942,7 @@ static qboolean R_HasLightmap( void )
R_BlendLightmaps
================
*/
void R_BlendLightmaps( void )
static void R_BlendLightmaps( void )
{
msurface_t *surf, *newsurf = NULL;
int i;
@ -1075,7 +1075,7 @@ void R_BlendLightmaps( void )
R_RenderFullbrights
================
*/
void R_RenderFullbrights( void )
static void R_RenderFullbrights( void )
{
mextrasurf_t *es, *p;
int i;
@ -1118,7 +1118,7 @@ void R_RenderFullbrights( void )
R_RenderDetails
================
*/
void R_RenderDetails( int passes )
static void R_RenderDetails( int passes )
{
gl_texture_t *glt;
mextrasurf_t *es, *p;
@ -1176,7 +1176,7 @@ void R_RenderDetails( int passes )
R_RenderBrushPoly
================
*/
void R_RenderBrushPoly( msurface_t *fa, int cull_type )
static void R_RenderBrushPoly( msurface_t *fa, int cull_type )
{
qboolean is_dynamic = false;
int maps;
@ -1309,7 +1309,7 @@ dynamic:
R_DrawTextureChains
================
*/
void R_DrawTextureChains( void )
static void R_DrawTextureChains( void )
{
int i;
msurface_t *s;
@ -1514,7 +1514,7 @@ static int R_SurfaceCompare( const void *a, const void *b )
return 0;
}
void R_SetRenderMode( cl_entity_t *e )
static void R_SetRenderMode( cl_entity_t *e )
{
switch( e->curstate.rendermode )
{
@ -2302,7 +2302,7 @@ static texture_t *R_SetupVBOTexture( texture_t *tex, int number )
}
void R_SetupVBOArrayStatic( vboarray_t *vbo, qboolean drawlightmap, qboolean drawtextures )
static void R_SetupVBOArrayStatic( vboarray_t *vbo, qboolean drawlightmap, qboolean drawtextures )
{
if( vboarray.astate != VBO_ARRAY_STATIC )
{
@ -2866,7 +2866,7 @@ static void R_DrawLightmappedVBO( vboarray_t *vbo, vbotexture_t *vbotex, texture
vbotex->curindex = 0;
}
void R_SetupVBOArrayDecal( qboolean drawlightmap )
static void R_SetupVBOArrayDecal( qboolean drawlightmap )
{
// prepare for decal draw
pglBindBufferARB( GL_ARRAY_BUFFER_ARB, vbos.decaldata->decalvbo );
@ -2889,7 +2889,7 @@ void R_SetupVBOArrayDecal( qboolean drawlightmap )
}
void R_SetupVBOArrayDecalDyn( qboolean drawlightmap, float *v )
static void R_SetupVBOArrayDecalDyn( qboolean drawlightmap, float *v )
{
pglBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
pglVertexPointer( 3, GL_FLOAT, VERTEXSIZE * 4, v );
@ -2986,7 +2986,7 @@ static void R_DrawStaticDecals( vboarray_t *vbo, qboolean drawlightmap, int ilig
pglEnable( GL_ALPHA_TEST );
}
void R_ClearVBOState( qboolean drawlightmap, qboolean drawtextures )
static void R_ClearVBOState( qboolean drawlightmap, qboolean drawtextures )
{
// restore states
R_DisableDetail();
@ -3313,7 +3313,7 @@ qboolean R_AddSurfToVBO( msurface_t *surf, qboolean buildlightmap )
R_RecursiveWorldNode
================
*/
void R_RecursiveWorldNode( mnode_t *node, uint clipflags )
static void R_RecursiveWorldNode( mnode_t *node, uint clipflags )
{
int i, clipped;
msurface_t *surf, **mark;
@ -3407,7 +3407,7 @@ R_CullNodeTopView
cull node by user rectangle (simple scissor)
================
*/
qboolean R_CullNodeTopView( mnode_t *node )
static qboolean R_CullNodeTopView( mnode_t *node )
{
vec2_t delta, size;
vec3_t center, half;
@ -3465,7 +3465,7 @@ static void R_DrawTopViewLeaf( mleaf_t *pleaf, uint clipflags )
R_DrawWorldTopView
================
*/
void R_DrawWorldTopView( mnode_t *node, uint clipflags )
static void R_DrawWorldTopView( mnode_t *node, uint clipflags )
{
int i, c, clipped;
msurface_t *surf;
@ -3535,7 +3535,7 @@ void R_DrawWorldTopView( mnode_t *node, uint clipflags )
R_DrawTriangleOutlines
=============
*/
void R_DrawTriangleOutlines( void )
static void R_DrawTriangleOutlines( void )
{
int i, j;
msurface_t *surf;
@ -3736,7 +3736,7 @@ void R_MarkLeaves( void )
GL_CreateSurfaceLightmap
========================
*/
void GL_CreateSurfaceLightmap( msurface_t *surf, model_t *loadmodel )
static void GL_CreateSurfaceLightmap( msurface_t *surf, model_t *loadmodel )
{
int smax, tmax;
int sample_size;

View File

@ -459,7 +459,7 @@ NOTE: we using prevblending[0] and [1] for holds interval
between frames where are we lerping
================
*/
float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe, mspriteframe_t **curframe )
static float R_GetSpriteFrameInterpolant( cl_entity_t *ent, mspriteframe_t **oldframe, mspriteframe_t **curframe )
{
msprite_t *psprite;
mspritegroup_t *pspritegroup;
@ -625,7 +625,7 @@ R_CullSpriteModel
Cull sprite model by bbox
================
*/
qboolean R_CullSpriteModel( cl_entity_t *e, vec3_t origin )
static qboolean R_CullSpriteModel( cl_entity_t *e, vec3_t origin )
{
vec3_t sprite_mins, sprite_maxs;
float scale = 1.0f;
@ -689,7 +689,7 @@ R_SpriteOccluded
Do occlusion test for glow-sprites
================
*/
qboolean R_SpriteOccluded( cl_entity_t *e, vec3_t origin, float *pscale )
static qboolean R_SpriteOccluded( cl_entity_t *e, vec3_t origin, float *pscale )
{
if( e->curstate.rendermode == kRenderGlow )
{

View File

@ -261,7 +261,7 @@ static qboolean R_StudioComputeBBox( vec3_t bbox[8] )
return true; // visible
}
void R_StudioComputeSkinMatrix( mstudioboneweight_t *boneweights, matrix3x4 result )
static void R_StudioComputeSkinMatrix( mstudioboneweight_t *boneweights, matrix3x4 result )
{
float flWeight0, flWeight1, flWeight2, flWeight3;
int i, numbones = 0;
@ -396,7 +396,7 @@ pfnGetPlayerState
===============
*/
entity_state_t *R_StudioGetPlayerState( int index )
static entity_state_t *R_StudioGetPlayerState( int index )
{
if( !RI.drawWorld )
return &RI.currententity->curstate;
@ -527,7 +527,7 @@ StudioPlayerBlend
====================
*/
void R_StudioPlayerBlend( mstudioseqdesc_t *pseqdesc, int *pBlend, float *pPitch )
static void R_StudioPlayerBlend( mstudioseqdesc_t *pseqdesc, int *pBlend, float *pPitch )
{
// calc up/down pointing
*pBlend = (*pPitch * 3.0f);
@ -588,7 +588,7 @@ StudioSetUpTransform
====================
*/
void R_StudioSetUpTransform( cl_entity_t *e )
static void R_StudioSetUpTransform( cl_entity_t *e )
{
vec3_t origin, angles;
@ -660,7 +660,7 @@ StudioEstimateInterpolant
====================
*/
float R_StudioEstimateInterpolant( cl_entity_t *e )
static float R_StudioEstimateInterpolant( cl_entity_t *e )
{
float dadt = 1.0f;
@ -679,7 +679,7 @@ StudioFxTransform
====================
*/
void R_StudioFxTransform( cl_entity_t *ent, matrix3x4 transform )
static void R_StudioFxTransform( cl_entity_t *ent, matrix3x4 transform )
{
switch( ent->curstate.renderfx )
{
@ -723,7 +723,7 @@ StudioCalcBoneAdj
====================
*/
void R_StudioCalcBoneAdj( float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen )
static void R_StudioCalcBoneAdj( float dadt, float *adj, const byte *pcontroller1, const byte *pcontroller2, byte mouthopen )
{
mstudiobonecontroller_t *pbonecontroller;
float value = 0.0f;
@ -788,7 +788,7 @@ StudioCalcRotations
====================
*/
void R_StudioCalcRotations( cl_entity_t *e, float pos[][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f )
static void R_StudioCalcRotations( cl_entity_t *e, float pos[][3], vec4_t *q, mstudioseqdesc_t *pseqdesc, mstudioanim_t *panim, float f )
{
int i, frame;
float adj[MAXSTUDIOCONTROLLERS];
@ -835,7 +835,7 @@ StudioMergeBones
====================
*/
void R_StudioMergeBones( cl_entity_t *e, model_t *m_pSubModel )
static void R_StudioMergeBones( cl_entity_t *e, model_t *m_pSubModel )
{
int i, j;
mstudiobone_t *pbones;
@ -895,7 +895,7 @@ StudioSetupBones
====================
*/
void R_StudioSetupBones( cl_entity_t *e )
static void R_StudioSetupBones( cl_entity_t *e )
{
float f;
mstudiobone_t *pbones;
@ -1075,7 +1075,7 @@ StudioBuildNormalTable
NOTE: m_pSubModel must be set
====================
*/
void R_StudioBuildNormalTable( void )
static void R_StudioBuildNormalTable( void )
{
cl_entity_t *e = RI.currententity;
mstudiomesh_t *pmesh;
@ -1126,7 +1126,7 @@ NOTE: m_pSubModel must be set
g_studio.verts must be computed
====================
*/
void R_StudioGenerateNormals( void )
static void R_StudioGenerateNormals( void )
{
int v0, v1, v2;
vec3_t e0, e1, norm;
@ -1221,7 +1221,7 @@ StudioSetupChrome
====================
*/
void R_StudioSetupChrome( float *pchrome, int bone, vec3_t normal )
static void R_StudioSetupChrome( float *pchrome, int bone, vec3_t normal )
{
float n;
@ -1322,7 +1322,7 @@ R_StudioDynamicLight
===============
*/
void R_StudioDynamicLight( cl_entity_t *ent, alight_t *plight )
static void R_StudioDynamicLight( cl_entity_t *ent, alight_t *plight )
{
movevars_t *mv = tr.movevars;
vec3_t lightDir, vecSrc, vecEnd;
@ -1513,7 +1513,7 @@ pfnStudioEntityLight
===============
*/
void R_StudioEntityLight( alight_t *lightinfo )
static void R_StudioEntityLight( alight_t *lightinfo )
{
int lnum, i, j, k;
float minstrength, dist2, f, r2;
@ -1595,7 +1595,7 @@ R_StudioSetupLighting
===============
*/
void R_StudioSetupLighting( alight_t *plight )
static void R_StudioSetupLighting( alight_t *plight )
{
float scale = 1.0f;
int i;
@ -1625,7 +1625,7 @@ R_StudioLighting
===============
*/
void R_StudioLighting( float *lv, int bone, int flags, vec3_t normal )
static void R_StudioLighting( float *lv, int bone, int flags, vec3_t normal )
{
float illum;
@ -1764,7 +1764,7 @@ R_LightStrength
====================
*/
void R_LightStrength( int bone, vec3_t localpos, vec4_t light[MAX_LOCALLIGHTS] )
static void R_LightStrength( int bone, vec3_t localpos, vec4_t light[MAX_LOCALLIGHTS] )
{
int i;
@ -1835,7 +1835,7 @@ mstudiotexture_t *R_StudioGetTexture( cl_entity_t *e )
return ptexture;
}
void R_StudioSetRenderamt( int iRenderamt )
static void R_StudioSetRenderamt( int iRenderamt )
{
if( !RI.currententity ) return;
@ -1850,7 +1850,7 @@ R_StudioSetCullState
sets true for enable backculling (for left-hand viewmodel)
===============
*/
void R_StudioSetCullState( int iCull )
static void R_StudioSetCullState( int iCull )
{
// This function intentionally does nothing
}
@ -1862,7 +1862,7 @@ R_StudioRenderShadow
just a prefab for render shadow
===============
*/
void R_StudioRenderShadow( int iSprite, float *p1, float *p2, float *p3, float *p4 )
static void R_StudioRenderShadow( int iSprite, float *p1, float *p2, float *p3, float *p4 )
{
if( !p1 || !p2 || !p3 || !p4 )
return;
@ -2814,7 +2814,7 @@ R_StudioGetForceFaceFlags
===============
*/
int R_StudioGetForceFaceFlags( void )
static int R_StudioGetForceFaceFlags( void )
{
return g_nForceFaceFlags;
}
@ -2825,7 +2825,7 @@ R_StudioSetForceFaceFlags
===============
*/
void R_StudioSetForceFaceFlags( int flags )
static void R_StudioSetForceFaceFlags( int flags )
{
g_nForceFaceFlags = flags;
}
@ -2836,7 +2836,7 @@ pfnStudioSetHeader
===============
*/
void R_StudioSetHeader( studiohdr_t *pheader )
static void R_StudioSetHeader( studiohdr_t *pheader )
{
m_pStudioHeader = pheader;
m_fDoRemap = false;
@ -2848,7 +2848,7 @@ R_StudioSetRenderModel
===============
*/
void R_StudioSetRenderModel( model_t *model )
static void R_StudioSetRenderModel( model_t *model )
{
RI.currentmodel = model;
}
@ -2904,7 +2904,7 @@ R_StudioSetChromeOrigin
===============
*/
void R_StudioSetChromeOrigin( void )
static void R_StudioSetChromeOrigin( void )
{
VectorCopy( RI.vieworg, g_studio.chrome_origin );
}
@ -2992,7 +2992,7 @@ GL_StudioSetRenderMode
set rendermode for studiomodel
===============
*/
void GL_StudioSetRenderMode( int rendermode )
static void GL_StudioSetRenderMode( int rendermode )
{
switch( rendermode )
{
@ -3059,7 +3059,7 @@ StudioRenderFinal
====================
*/
void R_StudioRenderFinal( void )
static void R_StudioRenderFinal( void )
{
int i, rendermode;
@ -3145,7 +3145,7 @@ StudioRenderModel
====================
*/
void R_StudioRenderModel( void )
static void R_StudioRenderModel( void )
{
R_StudioSetChromeOrigin();
R_StudioSetForceFaceFlags( 0 );
@ -3174,7 +3174,7 @@ StudioEstimateGait
====================
*/
void R_StudioEstimateGait( entity_state_t *pplayer )
static void R_StudioEstimateGait( entity_state_t *pplayer )
{
vec3_t est_velocity;
float dt;
@ -3230,7 +3230,7 @@ StudioProcessGait
====================
*/
void R_StudioProcessGait( entity_state_t *pplayer )
static void R_StudioProcessGait( entity_state_t *pplayer )
{
mstudioseqdesc_t *pseqdesc;
int iBlend;

View File

@ -362,7 +362,7 @@ R_UnloadSkybox
Unload previous skybox
==============
*/
void R_UnloadSkybox( void )
static void R_UnloadSkybox( void )
{
int i;