engine: ref_api: change RefGetParm return type to intptr_t, bump RefAPI version

This commit is contained in:
Alibek Omarov
2026-04-25 14:20:24 +05:00
committed by a1batross
parent 87615784b9
commit 2ccef63754
5 changed files with 7 additions and 6 deletions

View File

@@ -614,7 +614,7 @@ void GAME_EXPORT Mod_LoadCacheFile( const char *filename, cache_user_t *cu )
#if XASH_BIG_ENDIAN
if( size >= sizeof( int ) && LittleLong( IDSEQGRPHEADER ) == *(uint *)cu->data )
{
studiohdr_t *phdr = (studiohdr_t *)(intptr_t)REF_GET_PARM( PARM_GET_STUDIO_HDR, 0 );
studiohdr_t *phdr = (studiohdr_t *)REF_GET_PARM( PARM_GET_STUDIO_HDR, 0 );
if( !phdr )
return;

View File

@@ -72,7 +72,8 @@ GNU General Public License for more details.
// Moved RenderAPI and TriAPI filling to renderer via R_FillRenderAPI and R_FillTriAPI
// Moved detail textures parsing and cinematic texture management to engine
// Moved creation of default textures to the engine
#define REF_API_VERSION 15
// 16. RefGetParm return type changed from int to intptr_t.
#define REF_API_VERSION 16
#define TF_SKY (TF_SKYSIDE|TF_NOMIPMAP|TF_ALLOW_NEAREST)
#define TF_FONT (TF_NOMIPMAP|TF_CLAMP|TF_ALLOW_NEAREST)
@@ -599,7 +600,7 @@ typedef struct ref_interface_s
void (*CL_DrawBeams)( int fTrans , BEAM *beams );
// Xash3D Render Interface
int (*RefGetParm)( int parm, int arg ); // generic
intptr_t (*RefGetParm)( int parm, int arg ); // generic
// detail texture scale
void (*R_GetDetailScaleForTexture)( int texture, float *xScale, float *yScale );