diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 2c4d6350..3e1437f9 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -45,12 +45,6 @@ REF_HOST_CHECK( realtime ); REF_HOST_CHECK( frametime ); REF_HOST_CHECK( features ); -void R_GetTextureParms( int *w, int *h, int texnum ) -{ - if( w ) *w = REF_GET_PARM( PARM_TEX_WIDTH, texnum ); - if( h ) *h = REF_GET_PARM( PARM_TEX_HEIGHT, texnum ); -} - static qboolean CheckSkybox( const char *name, char out[SKYBOX_MAX_SIDES][MAX_STRING] ) { static const char *skybox_ext[3] = { "dds", "tga", "bmp" }; diff --git a/engine/client/ref_common.h b/engine/client/ref_common.h index 4701e671..ffd6ac80 100644 --- a/engine/client/ref_common.h +++ b/engine/client/ref_common.h @@ -36,12 +36,17 @@ extern struct ref_state_s ref; extern ref_globals_t refState; // handy API wrappers -void R_GetTextureParms( int *w, int *h, int texnum ); #define REF_GET_PARM( parm, arg ) ref.dllFuncs.RefGetParm( (parm), (arg) ) #define GL_LoadTextureInternal( name, pic, flags ) ref.dllFuncs.GL_LoadTextureFromBuffer( (name), (pic), (flags), false ) #define GL_UpdateTextureInternal( name, pic, flags ) ref.dllFuncs.GL_LoadTextureFromBuffer( (name), (pic), (flags), true ) #define R_GetBuiltinTexture( name ) ref.dllFuncs.GL_LoadTexture( (name), 0, 0, 0 ) +static inline void R_GetTextureParms( int *w, int *h, int texnum ) +{ + if( w ) *w = REF_GET_PARM( PARM_TEX_WIDTH, texnum ); + if( h ) *h = REF_GET_PARM( PARM_TEX_HEIGHT, texnum ); +} + void GL_RenderFrame( const struct ref_viewpass_s *rvp ); void R_SetupSky( const char *name );