Skip to content

Commit

Permalink
ref: soft: fix -Wmissing-prototypes
Browse files Browse the repository at this point in the history
asdasd
  • Loading branch information
a1batross committed Jan 27, 2024
1 parent 387211d commit 92ab320
Show file tree
Hide file tree
Showing 21 changed files with 149 additions and 151 deletions.
4 changes: 2 additions & 2 deletions ref/soft/r_aclip.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ R_Alias_clip_z
pfv0 is the unclipped vertex, pfv1 is the z-clipped vertex
================
*/
void R_Alias_clip_z (finalvert_t *pfv0, finalvert_t *pfv1, finalvert_t *out)
static void R_Alias_clip_z (finalvert_t *pfv0, finalvert_t *pfv1, finalvert_t *out)
{
float scale;

Expand Down Expand Up @@ -183,7 +183,7 @@ void R_Alias_clip_bottom (finalvert_t *pfv0, finalvert_t *pfv1,
#endif


int R_AliasClip (finalvert_t *in, finalvert_t *out, int flag, int count,
static int R_AliasClip (finalvert_t *in, finalvert_t *out, int flag, int count,
void(*clip)(finalvert_t *pfv0, finalvert_t *pfv1, finalvert_t *out) )
{
int i,j,k;
Expand Down
16 changes: 8 additions & 8 deletions ref/soft/r_beams.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,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;
Expand Down Expand Up @@ -462,7 +462,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;
Expand Down Expand Up @@ -520,7 +520,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;
Expand Down Expand Up @@ -577,7 +577,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, saved_fraction;
Expand Down Expand Up @@ -737,7 +737,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;
Expand Down Expand Up @@ -894,7 +894,7 @@ R_BeamRecomputeEndpoints
Recomputes beam endpoints..
==============
*/
qboolean R_BeamRecomputeEndpoints( BEAM *pbeam )
static qboolean R_BeamRecomputeEndpoints( BEAM *pbeam )
{
if( FBitSet( pbeam->flags, FBEAM_STARTENTITY ))
{
Expand Down Expand Up @@ -947,7 +947,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;
Expand Down Expand Up @@ -1193,7 +1193,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;
Expand Down
8 changes: 4 additions & 4 deletions ref/soft/r_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static qboolean makeclippededge;
R_ConcatRotations
================
*/
void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
static void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
{
out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] +
in1[0][2] * in2[2][0];
Expand Down Expand Up @@ -81,7 +81,7 @@ void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
R_EntityRotate
================
*/
void R_EntityRotate (vec3_t vec)
static void R_EntityRotate (vec3_t vec)
{
vec3_t tvec;

Expand Down Expand Up @@ -348,7 +348,7 @@ void R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
R_RecursiveClipBPoly
================
*/
void R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
static void R_RecursiveClipBPoly (bedge_t *pedges, mnode_t *pnode, msurface_t *psurf)
{
bedge_t *psideedges[2], *pnextedge, *ptedge;
int i, side, lastside;
Expand Down Expand Up @@ -781,7 +781,7 @@ int r_leafkeys[MAX_MAP_LEAFS];
R_RecursiveWorldNode
================
*/
void R_RecursiveWorldNode (mnode_t *node, int clipflags)
static void R_RecursiveWorldNode (mnode_t *node, int clipflags)
{
int i, c, side, *pindex;
vec3_t acceptpt, rejectpt;
Expand Down
41 changes: 21 additions & 20 deletions ref/soft/r_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void GAME_EXPORT CL_FillRGBABlend( float _x, float _y, float _w, float _h
}
void Mod_UnloadTextures( model_t *mod );

qboolean GAME_EXPORT Mod_ProcessRenderData( model_t *mod, qboolean create, const byte *buf )
static qboolean GAME_EXPORT Mod_ProcessRenderData( model_t *mod, qboolean create, const byte *buf )
{
qboolean loaded = true;

Expand Down Expand Up @@ -224,7 +224,7 @@ static const char * GAME_EXPORT GL_TextureName( unsigned int texnum )
return R_GetTexture( texnum )->name;
}

const byte * GAME_EXPORT GL_TextureData( unsigned int texnum )
static const byte * GAME_EXPORT GL_TextureData( unsigned int texnum )
{
rgbdata_t *pic = R_GetTexture( texnum )->original;

Expand All @@ -233,7 +233,7 @@ const byte * GAME_EXPORT GL_TextureData( unsigned int texnum )
return NULL;
}

void Mod_BrushUnloadTextures( model_t *mod )
static void Mod_BrushUnloadTextures( model_t *mod )
{
int i;

Expand Down Expand Up @@ -276,7 +276,7 @@ void Mod_UnloadTextures( model_t *mod )
}
}

void GAME_EXPORT R_ProcessEntData( qboolean allocate, cl_entity_t *entities, unsigned int max_entities )
static void GAME_EXPORT R_ProcessEntData( qboolean allocate, cl_entity_t *entities, unsigned int max_entities )
{
tr.entities = entities;
tr.max_entities = max_entities;
Expand All @@ -289,17 +289,17 @@ static void GAME_EXPORT R_Flush( unsigned int flags )

// stubs

void GAME_EXPORT GL_SetTexCoordArrayMode( uint mode )
static void GAME_EXPORT GL_SetTexCoordArrayMode( uint mode )
{

}

void GAME_EXPORT GL_BackendStartFrame( void )
static void GAME_EXPORT GL_BackendStartFrame( void )
{

}

void GAME_EXPORT GL_BackendEndFrame( void )
static void GAME_EXPORT GL_BackendEndFrame( void )
{

}
Expand All @@ -312,12 +312,12 @@ void GAME_EXPORT GL_SetRenderMode(int mode)
/// maybe, setup block drawing function pointers here
}

void GAME_EXPORT R_ShowTextures( void )
static void GAME_EXPORT R_ShowTextures( void )
{
// textures undone too
}

void GAME_EXPORT R_ShowTree( void )
static void GAME_EXPORT R_ShowTree( void )
{
// do we really need this here???
}
Expand All @@ -338,47 +338,47 @@ void R_InitSkyClouds(mip_t *mt, texture_t *tx, qboolean custom_palette)

}

void GAME_EXPORT GL_SubdivideSurface( model_t *mod, msurface_t *fa )
static void GAME_EXPORT GL_SubdivideSurface( model_t *mod, msurface_t *fa )
{

}

void GAME_EXPORT DrawSingleDecal(decal_t *pDecal, msurface_t *fa)
static void GAME_EXPORT DrawSingleDecal(decal_t *pDecal, msurface_t *fa)
{

}

void GAME_EXPORT GL_SelectTexture(int texture)
static void GAME_EXPORT GL_SelectTexture(int texture)
{

}

void GAME_EXPORT GL_LoadTexMatrixExt(const float *glmatrix)
static void GAME_EXPORT GL_LoadTexMatrixExt(const float *glmatrix)
{

}

void GAME_EXPORT GL_LoadIdentityTexMatrix( void )
static void GAME_EXPORT GL_LoadIdentityTexMatrix( void )
{

}

void GAME_EXPORT GL_CleanUpTextureUnits(int last)
static void GAME_EXPORT GL_CleanUpTextureUnits(int last)
{

}

void GAME_EXPORT GL_TexGen(unsigned int coord, unsigned int mode)
static void GAME_EXPORT GL_TexGen(unsigned int coord, unsigned int mode)
{

}

void GAME_EXPORT GL_TextureTarget(uint target)
static void GAME_EXPORT GL_TextureTarget(uint target)
{

}

void GAME_EXPORT GL_BuildLightmaps( void )
static void GAME_EXPORT GL_BuildLightmaps( void )
{
CL_RunLightStyles();
}
Expand All @@ -398,7 +398,7 @@ byte *GAME_EXPORT Mod_GetCurrentVis( void )
return NULL;
}

const char *R_GetConfigName( void )
static const char *R_GetConfigName( void )
{
return "ref_soft"; // software specific cvars will go to ref_soft.cfg
}
Expand Down Expand Up @@ -558,7 +558,8 @@ ref_interface_t gReffuncs =
VGUI_GenerateTexture,
};

int EXPORT GAME_EXPORT GetRefAPI( int version, ref_interface_t *funcs, ref_api_t *engfuncs, ref_globals_t *globals )
int 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 )
return 0;
Expand Down
18 changes: 9 additions & 9 deletions ref/soft/r_decals.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -216,7 +216,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 );

Expand All @@ -231,7 +231,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 )
{
Expand All @@ -255,7 +255,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;

Expand Down Expand Up @@ -356,7 +356,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;
Expand All @@ -376,7 +376,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];
Expand Down Expand Up @@ -511,7 +511,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;
Expand Down Expand Up @@ -618,7 +618,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;
Expand Down
2 changes: 1 addition & 1 deletion ref/soft/r_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int GAME_EXPORT R_GetSpriteTexture( const model_t *m_pSpriteModel, int frame )
Draw_StretchPicImplementation
=============
*/
void R_DrawStretchPicImplementation( int x, int y, int w, int h, int s1, int t1, int s2, int t2, image_t *pic )
static void R_DrawStretchPicImplementation( int x, int y, int w, int h, int s1, int t1, int s2, int t2, image_t *pic )
{
pixel_t *source, *dest;
unsigned int v, u, sv;
Expand Down
Loading

0 comments on commit 92ab320

Please sign in to comment.