mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-11 07:37:52 +00:00
ref: remove COM_HashKey API call
This commit is contained in:
parent
70d45f23de
commit
76dae35955
@ -271,7 +271,6 @@ static ref_api_t gEngfuncs =
|
|||||||
CL_UpdateRemapInfo,
|
CL_UpdateRemapInfo,
|
||||||
|
|
||||||
CL_ExtraUpdate,
|
CL_ExtraUpdate,
|
||||||
COM_HashKey,
|
|
||||||
Host_Error,
|
Host_Error,
|
||||||
COM_SetRandomSeed,
|
COM_SetRandomSeed,
|
||||||
COM_RandomFloat,
|
COM_RandomFloat,
|
||||||
|
@ -335,7 +335,6 @@ typedef struct ref_api_s
|
|||||||
|
|
||||||
// utils
|
// utils
|
||||||
void (*CL_ExtraUpdate)( void );
|
void (*CL_ExtraUpdate)( void );
|
||||||
uint (*COM_HashKey)( const char *strings, uint hashSize );
|
|
||||||
void (*Host_Error)( const char *fmt, ... );
|
void (*Host_Error)( const char *fmt, ... );
|
||||||
void (*COM_SetRandomSeed)( int lSeed );
|
void (*COM_SetRandomSeed)( int lSeed );
|
||||||
float (*COM_RandomFloat)( float rmin, float rmax );
|
float (*COM_RandomFloat)( float rmin, float rmax );
|
||||||
|
@ -14,7 +14,7 @@ GNU General Public License for more details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gl_local.h"
|
#include "gl_local.h"
|
||||||
|
#include "crclib.h"
|
||||||
|
|
||||||
#define TEXTURES_HASH_SIZE (MAX_TEXTURES >> 2)
|
#define TEXTURES_HASH_SIZE (MAX_TEXTURES >> 2)
|
||||||
|
|
||||||
@ -1310,7 +1310,7 @@ static gl_texture_t *GL_TextureForName( const char *name )
|
|||||||
uint hash;
|
uint hash;
|
||||||
|
|
||||||
// find the texture in array
|
// 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 )
|
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;
|
tex->flags = flags;
|
||||||
|
|
||||||
// add to hash table
|
// 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];
|
tex->nextHash = gl_texturesHashTable[tex->hashValue];
|
||||||
gl_texturesHashTable[tex->hashValue] = tex;
|
gl_texturesHashTable[tex->hashValue] = tex;
|
||||||
|
|
||||||
@ -2207,7 +2207,7 @@ void R_InitImages( void )
|
|||||||
|
|
||||||
// create unused 0-entry
|
// create unused 0-entry
|
||||||
Q_strncpy( gl_textures->name, "*unused*", sizeof( gl_textures->name ));
|
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_textures->nextHash = gl_texturesHashTable[gl_textures->hashValue];
|
||||||
gl_texturesHashTable[gl_textures->hashValue] = gl_textures;
|
gl_texturesHashTable[gl_textures->hashValue] = gl_textures;
|
||||||
gl_numTextures = 1;
|
gl_numTextures = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user