engine: common: added COM_GetResourceTypeName function

This commit is contained in:
SNMetamorph 2023-03-18 23:47:44 +04:00 committed by Alibek Omarov
parent 68be8157ea
commit 714b4f45e4
2 changed files with 16 additions and 0 deletions

View File

@ -1053,6 +1053,21 @@ qboolean COM_IsSafeFileToDownload( const char *filename )
return true;
}
const char *COM_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";
}
}
char *_copystring( poolhandle_t mempool, const char *s, const char *filename, int fileline )
{
char *b;

View File

@ -638,6 +638,7 @@ void COM_HexConvert( const char *pszInput, int nInputLength, byte *pOutput );
int COM_SaveFile( const char *filename, const void *data, int len );
byte* COM_LoadFileForMe( const char *filename, int *pLength );
qboolean COM_IsSafeFileToDownload( const char *filename );
const char *COM_GetResourceTypeName( resourcetype_t restype );
cvar_t *pfnCVarGetPointer( const char *szVarName );
int pfnDrawConsoleString( int x, int y, char *string );
void pfnDrawSetTextColor( float r, float g, float b );