engine: clean up common.h header from unused function prototypes, or move them to appropriate header or C file

This commit is contained in:
Alibek Omarov
2024-01-28 09:59:51 +03:00
parent 7200f0da7e
commit 2b6a550405
17 changed files with 83 additions and 126 deletions

View File

@@ -651,6 +651,8 @@ int pfnDropToFloor( edict_t* e );
edict_t *SV_EdictNum( int n );
void SV_SetModel( edict_t *ent, const char *name );
int pfnDecalIndex( const char *m );
void SV_CreateDecal( sizebuf_t *msg, const float *origin, int decalIndex, int entityIndex, int modelIndex, int flags, float scale );
qboolean SV_RestoreCustomDecal( struct decallist_s *entry, edict_t *pEdict, qboolean adjacent );
//
// sv_log.c

View File

@@ -4796,7 +4796,7 @@ static enginefuncs_t gEngfuncs =
Delta_UnsetFieldByIndex,
pfnSetGroupMask,
pfnCreateInstancedBaseline,
pfnCVarDirectSet,
(void*)Cvar_DirectSet,
pfnForceUnmodified,
pfnGetPlayerStats,
Cmd_AddServerCommand,

View File

@@ -284,6 +284,21 @@ static resourcetype_t SV_DetermineResourceType( const char *filename )
return t_generic;
}
static const char *SV_GetResourceTypeName( resourcetype_t restype )
{
switch( restype )
{
case t_decal: return "decal";
case t_eventscript: return "eventscript";
case t_generic: return "generic";
case t_model: return "model";
case t_skin: return "skin";
case t_sound: return "sound";
case t_world: return "world";
default: return "unknown";
}
}
static void SV_ReadResourceList( const char *filename )
{
string token;
@@ -306,7 +321,7 @@ static void SV_ReadResourceList( const char *filename )
COM_FixSlashes( token );
restype = SV_DetermineResourceType( token );
Con_DPrintf( " %s (%s)\n", token, COM_GetResourceTypeName( restype ));
Con_DPrintf( " %s (%s)\n", token, SV_GetResourceTypeName( restype ));
switch( restype )
{
// TODO do we need to handle other resource types specifically too?