|
|
@ -39,7 +39,10 @@ GNU General Public License for more details. |
|
|
|
// Removed previously unused calls
|
|
|
|
// Removed previously unused calls
|
|
|
|
// Simplified remapping calls
|
|
|
|
// Simplified remapping calls
|
|
|
|
// GetRefAPI is now expected to return REF_API_VERSION
|
|
|
|
// GetRefAPI is now expected to return REF_API_VERSION
|
|
|
|
#define REF_API_VERSION 5 |
|
|
|
// 6. Removed timing from ref_globals_t.
|
|
|
|
|
|
|
|
// Renderers are supposed to migrate to ref_client_t/ref_host_t using PARM_GET_CLIENT_PTR and PARM_GET_HOST_PTR
|
|
|
|
|
|
|
|
// Removed functions to get internal engine structions. Use PARM_GET_*_PTR instead.
|
|
|
|
|
|
|
|
#define REF_API_VERSION 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TF_SKY (TF_SKYSIDE|TF_NOMIPMAP) |
|
|
|
#define TF_SKY (TF_SKYSIDE|TF_NOMIPMAP) |
|
|
@ -95,11 +98,6 @@ typedef struct ref_globals_s |
|
|
|
{ |
|
|
|
{ |
|
|
|
qboolean developer; |
|
|
|
qboolean developer; |
|
|
|
|
|
|
|
|
|
|
|
float time; // cl.time
|
|
|
|
|
|
|
|
float oldtime; // cl.oldtime
|
|
|
|
|
|
|
|
double realtime; // host.realtime
|
|
|
|
|
|
|
|
double frametime; // host.frametime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// viewport width and height
|
|
|
|
// viewport width and height
|
|
|
|
int width; |
|
|
|
int width; |
|
|
|
int height; |
|
|
|
int height; |
|
|
@ -272,23 +270,18 @@ typedef enum |
|
|
|
PARM_DEV_OVERVIEW = -1, |
|
|
|
PARM_DEV_OVERVIEW = -1, |
|
|
|
PARM_THIRDPERSON = -2, |
|
|
|
PARM_THIRDPERSON = -2, |
|
|
|
PARM_QUAKE_COMPATIBLE = -3, |
|
|
|
PARM_QUAKE_COMPATIBLE = -3, |
|
|
|
PARM_PLAYER_INDEX = -4, // cl.playernum + 1
|
|
|
|
PARM_GET_CLIENT_PTR = -4, // ref_client_t
|
|
|
|
PARM_VIEWENT_INDEX = -5, // cl.viewentity
|
|
|
|
PARM_GET_HOST_PTR = -5, // ref_host_t
|
|
|
|
PARM_CONNSTATE = -6, // cls.state
|
|
|
|
PARM_CONNSTATE = -6, // cls.state
|
|
|
|
PARM_PLAYING_DEMO = -7, // cls.demoplayback
|
|
|
|
PARM_PLAYING_DEMO = -7, // cls.demoplayback
|
|
|
|
PARM_WATER_LEVEL = -8, // cl.local.water_level
|
|
|
|
PARM_WATER_LEVEL = -8, // cl.local.water_level
|
|
|
|
PARM_MAX_CLIENTS = -9, // cl.maxclients
|
|
|
|
PARM_GET_WORLD_PTR = -9, // world
|
|
|
|
PARM_LOCAL_HEALTH = -10, // cl.local.health
|
|
|
|
PARM_LOCAL_HEALTH = -10, // cl.local.health
|
|
|
|
PARM_LOCAL_GAME = -11, |
|
|
|
PARM_LOCAL_GAME = -11, |
|
|
|
PARM_NUMENTITIES = -12, // local game only
|
|
|
|
PARM_NUMENTITIES = -12, // local game only
|
|
|
|
PARM_NUMMODELS = -13, // cl.nummodels
|
|
|
|
PARM_GET_MOVEVARS_PTR = -13, // clgame.movevars
|
|
|
|
PARM_WORLD_VERSION = -14, |
|
|
|
PARM_GET_PALETTE_PTR = -14, // clgame.palette
|
|
|
|
PARM_GET_CLIENT_PTR = -15, // ref_client_t
|
|
|
|
PARM_GET_VIEWENT_PTR = -15, // clgame.viewent
|
|
|
|
PARM_GET_HOST_PTR = -16, // ref_host_t
|
|
|
|
|
|
|
|
PARM_GET_WORLD_PTR = -17, // world
|
|
|
|
|
|
|
|
PARM_GET_MOVEVARS_PTR = -18, // clgame.movevars
|
|
|
|
|
|
|
|
PARM_GET_PALETTE_PTR = -19, // clgame.palette
|
|
|
|
|
|
|
|
PARM_GET_VIEWENT_PTR = -20, // clgame.viewent
|
|
|
|
|
|
|
|
} ref_parm_e; |
|
|
|
} ref_parm_e; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct ref_api_s |
|
|
|
typedef struct ref_api_s |
|
|
@ -331,7 +324,6 @@ typedef struct ref_api_s |
|
|
|
void (*CL_DrawCenterPrint)( void ); |
|
|
|
void (*CL_DrawCenterPrint)( void ); |
|
|
|
|
|
|
|
|
|
|
|
// entity management
|
|
|
|
// entity management
|
|
|
|
struct cl_entity_s *(*GetViewModel)( void ); |
|
|
|
|
|
|
|
struct cl_entity_s *(*R_BeamGetEntity)( int index ); |
|
|
|
struct cl_entity_s *(*R_BeamGetEntity)( int index ); |
|
|
|
struct cl_entity_s *(*CL_GetWaterEntity)( const vec3_t p ); |
|
|
|
struct cl_entity_s *(*CL_GetWaterEntity)( const vec3_t p ); |
|
|
|
qboolean (*CL_AddVisibleEntity)( cl_entity_t *ent, int entityType ); |
|
|
|
qboolean (*CL_AddVisibleEntity)( cl_entity_t *ent, int entityType ); |
|
|
@ -339,7 +331,6 @@ typedef struct ref_api_s |
|
|
|
// brushes
|
|
|
|
// brushes
|
|
|
|
int (*Mod_SampleSizeForFace)( const struct msurface_s *surf ); |
|
|
|
int (*Mod_SampleSizeForFace)( const struct msurface_s *surf ); |
|
|
|
qboolean (*Mod_BoxVisible)( const vec3_t mins, const vec3_t maxs, const byte *visbits ); |
|
|
|
qboolean (*Mod_BoxVisible)( const vec3_t mins, const vec3_t maxs, const byte *visbits ); |
|
|
|
struct world_static_s *(*GetWorld)( void ); // returns &world
|
|
|
|
|
|
|
|
mleaf_t *(*Mod_PointInLeaf)( const vec3_t p, mnode_t *node ); |
|
|
|
mleaf_t *(*Mod_PointInLeaf)( const vec3_t p, mnode_t *node ); |
|
|
|
void (*Mod_CreatePolygonsForHull)( int hullnum ); |
|
|
|
void (*Mod_CreatePolygonsForHull)( int hullnum ); |
|
|
|
|
|
|
|
|
|
|
@ -359,7 +350,6 @@ typedef struct ref_api_s |
|
|
|
// model management
|
|
|
|
// model management
|
|
|
|
model_t *(*Mod_ForName)( const char *name, qboolean crash, qboolean trackCRC ); |
|
|
|
model_t *(*Mod_ForName)( const char *name, qboolean crash, qboolean trackCRC ); |
|
|
|
void *(*Mod_Extradata)( int type, model_t *model ); |
|
|
|
void *(*Mod_Extradata)( int type, model_t *model ); |
|
|
|
struct model_s **(*pfnGetModels)( void ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// remap
|
|
|
|
// remap
|
|
|
|
qboolean (*CL_EntitySetRemapColors)( cl_entity_t *e, model_t *mod, int top, int bottom ); |
|
|
|
qboolean (*CL_EntitySetRemapColors)( cl_entity_t *e, model_t *mod, int top, int bottom ); |
|
|
@ -372,8 +362,6 @@ typedef struct ref_api_s |
|
|
|
float (*COM_RandomFloat)( float rmin, float rmax ); |
|
|
|
float (*COM_RandomFloat)( float rmin, float rmax ); |
|
|
|
int (*COM_RandomLong)( int rmin, int rmax ); |
|
|
|
int (*COM_RandomLong)( int rmin, int rmax ); |
|
|
|
struct screenfade_s *(*GetScreenFade)( void ); |
|
|
|
struct screenfade_s *(*GetScreenFade)( void ); |
|
|
|
void (*GetPredictedOrigin)( vec3_t v ); |
|
|
|
|
|
|
|
color24 *(*CL_GetPaletteColor)( void ); // clgame.palette[color]
|
|
|
|
|
|
|
|
void (*CL_GetScreenInfo)( int *width, int *height ); // clgame.scrInfo, ptrs may be NULL
|
|
|
|
void (*CL_GetScreenInfo)( int *width, int *height ); // clgame.scrInfo, ptrs may be NULL
|
|
|
|
void (*SetLocalLightLevel)( int level ); // cl.local.light_level
|
|
|
|
void (*SetLocalLightLevel)( int level ); // cl.local.light_level
|
|
|
|
int (*Sys_CheckParm)( const char *flag ); |
|
|
|
int (*Sys_CheckParm)( const char *flag ); |
|
|
@ -434,7 +422,6 @@ typedef struct ref_api_s |
|
|
|
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe ); |
|
|
|
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe ); |
|
|
|
struct pmtrace_s *(*EV_VisTraceLine )( float *start, float *end, int flags ); |
|
|
|
struct pmtrace_s *(*EV_VisTraceLine )( float *start, float *end, int flags ); |
|
|
|
struct pmtrace_s (*CL_TraceLine)( vec3_t start, vec3_t end, int flags ); |
|
|
|
struct pmtrace_s (*CL_TraceLine)( vec3_t start, vec3_t end, int flags ); |
|
|
|
struct movevars_s *(*pfnGetMoveVars)( void ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// imagelib
|
|
|
|
// imagelib
|
|
|
|
void (*Image_AddCmdFlags)( uint flags ); // used to check if hardware dxt is supported
|
|
|
|
void (*Image_AddCmdFlags)( uint flags ); // used to check if hardware dxt is supported
|
|
|
|