Browse Source

engine: common: added COM_GetResourceTypeName function

pull/2/head
SNMetamorph 2 years ago committed by Alibek Omarov
parent
commit
714b4f45e4
  1. 15
      engine/common/common.c
  2. 1
      engine/common/common.h

15
engine/common/common.c

@ -1053,6 +1053,21 @@ qboolean COM_IsSafeFileToDownload( const char *filename ) @@ -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;

1
engine/common/common.h

@ -638,6 +638,7 @@ void COM_HexConvert( const char *pszInput, int nInputLength, byte *pOutput ); @@ -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 );

Loading…
Cancel
Save