Browse Source

ref: remove COM_HashKey API call

pull/2/head
Alibek Omarov 6 years ago
parent
commit
76dae35955
  1. 1
      engine/client/ref_common.c
  2. 1
      engine/ref_api.h
  3. 8
      ref_gl/gl_image.c

1
engine/client/ref_common.c

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

1
engine/ref_api.h

@ -335,7 +335,6 @@ typedef struct ref_api_s @@ -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 );

8
ref_gl/gl_image.c

@ -14,7 +14,7 @@ GNU General Public License for more details. @@ -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 ) @@ -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 ) @@ -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 ) @@ -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;

Loading…
Cancel
Save