mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: change RenderAPI's RenderGetParm return type to intptr_t to insure compatibility with 64-bit
This commit is contained in:
parent
0645402946
commit
69b0954007
@ -161,7 +161,7 @@ struct ref_viewpass_s;
|
|||||||
typedef struct render_api_s
|
typedef struct render_api_s
|
||||||
{
|
{
|
||||||
// Get renderer info (doesn't changes engine state at all)
|
// Get renderer info (doesn't changes engine state at all)
|
||||||
int (*RenderGetParm)( int parm, int arg ); // generic
|
intptr_t (*RenderGetParm)( int parm, int arg ); // generic
|
||||||
void (*GetDetailScaleForTexture)( int texture, float *xScale, float *yScale );
|
void (*GetDetailScaleForTexture)( int texture, float *xScale, float *yScale );
|
||||||
void (*GetExtraParmsForTexture)( int texture, byte *red, byte *green, byte *blue, byte *alpha );
|
void (*GetExtraParmsForTexture)( int texture, byte *red, byte *green, byte *blue, byte *alpha );
|
||||||
lightstyle_t* (*GetLightStyle)( int number );
|
lightstyle_t* (*GetLightStyle)( int number );
|
||||||
|
@ -133,7 +133,7 @@ const char *CL_GenericHandle( int fileindex )
|
|||||||
return cl.files_precache[fileindex];
|
return cl.files_precache[fileindex];
|
||||||
}
|
}
|
||||||
|
|
||||||
int CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef )
|
intptr_t CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef )
|
||||||
{
|
{
|
||||||
switch( parm )
|
switch( parm )
|
||||||
{
|
{
|
||||||
@ -161,9 +161,9 @@ int CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef )
|
|||||||
case PARM_WATER_ALPHA:
|
case PARM_WATER_ALPHA:
|
||||||
return FBitSet( world.flags, FWORLD_WATERALPHA );
|
return FBitSet( world.flags, FWORLD_WATERALPHA );
|
||||||
case PARM_DELUXEDATA:
|
case PARM_DELUXEDATA:
|
||||||
return *(int *)&world.deluxedata;
|
return (intptr_t)world.deluxedata;
|
||||||
case PARM_SHADOWDATA:
|
case PARM_SHADOWDATA:
|
||||||
return *(int *)&world.shadowdata;
|
return (intptr_t)world.shadowdata;
|
||||||
default:
|
default:
|
||||||
// indicates call from client.dll
|
// indicates call from client.dll
|
||||||
if( checkRef )
|
if( checkRef )
|
||||||
@ -204,7 +204,7 @@ int CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pfnRenderGetParm( int parm, int arg )
|
static intptr_t pfnRenderGetParm( int parm, int arg )
|
||||||
{
|
{
|
||||||
return CL_RenderGetParm( parm, arg, true );
|
return CL_RenderGetParm( parm, arg, true );
|
||||||
}
|
}
|
||||||
|
@ -964,7 +964,7 @@ void CL_ClearAllRemaps( void );
|
|||||||
// cl_render.c
|
// cl_render.c
|
||||||
//
|
//
|
||||||
qboolean R_InitRenderAPI( void );
|
qboolean R_InitRenderAPI( void );
|
||||||
int CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef );
|
intptr_t CL_RenderGetParm( const int parm, const int arg, const qboolean checkRef );
|
||||||
lightstyle_t *CL_GetLightStyle( int number );
|
lightstyle_t *CL_GetLightStyle( int number );
|
||||||
int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis );
|
int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis );
|
||||||
const ref_overview_t *GL_GetOverviewParms( void );
|
const ref_overview_t *GL_GetOverviewParms( void );
|
||||||
|
@ -60,7 +60,7 @@ void GL_RenderFrame( const ref_viewpass_t *rvp )
|
|||||||
ref.dllFuncs.GL_RenderFrame( rvp );
|
ref.dllFuncs.GL_RenderFrame( rvp );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pfnEngineGetParm( int parm, int arg )
|
static intptr_t pfnEngineGetParm( int parm, int arg )
|
||||||
{
|
{
|
||||||
return CL_RenderGetParm( parm, arg, false ); // prevent recursion
|
return CL_RenderGetParm( parm, arg, false ); // prevent recursion
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ typedef enum
|
|||||||
|
|
||||||
typedef struct ref_api_s
|
typedef struct ref_api_s
|
||||||
{
|
{
|
||||||
int (*EngineGetParm)( int parm, int arg ); // generic
|
intptr_t (*EngineGetParm)( int parm, int arg ); // generic
|
||||||
|
|
||||||
// cvar handlers
|
// cvar handlers
|
||||||
cvar_t *(*Cvar_Get)( const char *szName, const char *szValue, int flags, const char *description );
|
cvar_t *(*Cvar_Get)( const char *szName, const char *szValue, int flags, const char *description );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user