ref: remove COM_HashKey API call

This commit is contained in:
Alibek Omarov 2019-06-06 04:34:28 +03:00
parent 70d45f23de
commit 76dae35955
3 changed files with 4 additions and 6 deletions

View File

@ -271,7 +271,6 @@ static ref_api_t gEngfuncs =
CL_UpdateRemapInfo,
CL_ExtraUpdate,
COM_HashKey,
Host_Error,
COM_SetRandomSeed,
COM_RandomFloat,

View File

@ -335,7 +335,6 @@ typedef struct ref_api_s
// utils
void (*CL_ExtraUpdate)( void );
uint (*COM_HashKey)( const char *strings, uint hashSize );
void (*Host_Error)( const char *fmt, ... );
void (*COM_SetRandomSeed)( int lSeed );
float (*COM_RandomFloat)( float rmin, float rmax );

View File

@ -14,7 +14,7 @@ GNU General Public License for more details.
*/
#include "gl_local.h"
#include "crclib.h"
#define TEXTURES_HASH_SIZE (MAX_TEXTURES >> 2)
@ -1310,7 +1310,7 @@ static gl_texture_t *GL_TextureForName( const char *name )
uint hash;
// find the texture in array
hash = gEngfuncs.COM_HashKey( name, TEXTURES_HASH_SIZE );
hash = COM_HashKey( name, TEXTURES_HASH_SIZE );
for( tex = gl_texturesHashTable[hash]; tex != NULL; tex = tex->nextHash )
{
@ -1352,7 +1352,7 @@ static gl_texture_t *GL_AllocTexture( const char *name, texFlags_t flags )
tex->flags = flags;
// add to hash table
tex->hashValue = gEngfuncs.COM_HashKey( name, TEXTURES_HASH_SIZE );
tex->hashValue = COM_HashKey( name, TEXTURES_HASH_SIZE );
tex->nextHash = gl_texturesHashTable[tex->hashValue];
gl_texturesHashTable[tex->hashValue] = tex;
@ -2207,7 +2207,7 @@ void R_InitImages( void )
// create unused 0-entry
Q_strncpy( gl_textures->name, "*unused*", sizeof( gl_textures->name ));
gl_textures->hashValue = gEngfuncs.COM_HashKey( gl_textures->name, TEXTURES_HASH_SIZE );
gl_textures->hashValue = COM_HashKey( gl_textures->name, TEXTURES_HASH_SIZE );
gl_textures->nextHash = gl_texturesHashTable[gl_textures->hashValue];
gl_texturesHashTable[gl_textures->hashValue] = gl_textures;
gl_numTextures = 1;