|
|
|
@ -39,7 +39,10 @@ GNU General Public License for more details.
@@ -39,7 +39,10 @@ GNU General Public License for more details.
|
|
|
|
|
// Removed previously unused calls
|
|
|
|
|
// Simplified remapping calls
|
|
|
|
|
// 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) |
|
|
|
@ -95,11 +98,6 @@ typedef struct ref_globals_s
@@ -95,11 +98,6 @@ typedef struct ref_globals_s
|
|
|
|
|
{ |
|
|
|
|
qboolean developer; |
|
|
|
|
|
|
|
|
|
float time; // cl.time
|
|
|
|
|
float oldtime; // cl.oldtime
|
|
|
|
|
double realtime; // host.realtime
|
|
|
|
|
double frametime; // host.frametime
|
|
|
|
|
|
|
|
|
|
// viewport width and height
|
|
|
|
|
int width; |
|
|
|
|
int height; |
|
|
|
@ -272,23 +270,18 @@ typedef enum
@@ -272,23 +270,18 @@ typedef enum
|
|
|
|
|
PARM_DEV_OVERVIEW = -1, |
|
|
|
|
PARM_THIRDPERSON = -2, |
|
|
|
|
PARM_QUAKE_COMPATIBLE = -3, |
|
|
|
|
PARM_PLAYER_INDEX = -4, // cl.playernum + 1
|
|
|
|
|
PARM_VIEWENT_INDEX = -5, // cl.viewentity
|
|
|
|
|
PARM_GET_CLIENT_PTR = -4, // ref_client_t
|
|
|
|
|
PARM_GET_HOST_PTR = -5, // ref_host_t
|
|
|
|
|
PARM_CONNSTATE = -6, // cls.state
|
|
|
|
|
PARM_PLAYING_DEMO = -7, // cls.demoplayback
|
|
|
|
|
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_GAME = -11, |
|
|
|
|
PARM_NUMENTITIES = -12, // local game only
|
|
|
|
|
PARM_NUMMODELS = -13, // cl.nummodels
|
|
|
|
|
PARM_WORLD_VERSION = -14, |
|
|
|
|
PARM_GET_CLIENT_PTR = -15, // ref_client_t
|
|
|
|
|
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
|
|
|
|
|
PARM_GET_MOVEVARS_PTR = -13, // clgame.movevars
|
|
|
|
|
PARM_GET_PALETTE_PTR = -14, // clgame.palette
|
|
|
|
|
PARM_GET_VIEWENT_PTR = -15, // clgame.viewent
|
|
|
|
|
} ref_parm_e; |
|
|
|
|
|
|
|
|
|
typedef struct ref_api_s |
|
|
|
@ -331,7 +324,6 @@ typedef struct ref_api_s
@@ -331,7 +324,6 @@ typedef struct ref_api_s
|
|
|
|
|
void (*CL_DrawCenterPrint)( void ); |
|
|
|
|
|
|
|
|
|
// entity management
|
|
|
|
|
struct cl_entity_s *(*GetViewModel)( void ); |
|
|
|
|
struct cl_entity_s *(*R_BeamGetEntity)( int index ); |
|
|
|
|
struct cl_entity_s *(*CL_GetWaterEntity)( const vec3_t p ); |
|
|
|
|
qboolean (*CL_AddVisibleEntity)( cl_entity_t *ent, int entityType ); |
|
|
|
@ -339,7 +331,6 @@ typedef struct ref_api_s
@@ -339,7 +331,6 @@ typedef struct ref_api_s
|
|
|
|
|
// brushes
|
|
|
|
|
int (*Mod_SampleSizeForFace)( const struct msurface_s *surf ); |
|
|
|
|
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 ); |
|
|
|
|
void (*Mod_CreatePolygonsForHull)( int hullnum ); |
|
|
|
|
|
|
|
|
@ -359,7 +350,6 @@ typedef struct ref_api_s
@@ -359,7 +350,6 @@ typedef struct ref_api_s
|
|
|
|
|
// model management
|
|
|
|
|
model_t *(*Mod_ForName)( const char *name, qboolean crash, qboolean trackCRC ); |
|
|
|
|
void *(*Mod_Extradata)( int type, model_t *model ); |
|
|
|
|
struct model_s **(*pfnGetModels)( void ); |
|
|
|
|
|
|
|
|
|
// remap
|
|
|
|
|
qboolean (*CL_EntitySetRemapColors)( cl_entity_t *e, model_t *mod, int top, int bottom ); |
|
|
|
@ -372,8 +362,6 @@ typedef struct ref_api_s
@@ -372,8 +362,6 @@ typedef struct ref_api_s
|
|
|
|
|
float (*COM_RandomFloat)( float rmin, float rmax ); |
|
|
|
|
int (*COM_RandomLong)( int rmin, int rmax ); |
|
|
|
|
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 (*SetLocalLightLevel)( int level ); // cl.local.light_level
|
|
|
|
|
int (*Sys_CheckParm)( const char *flag ); |
|
|
|
@ -434,7 +422,6 @@ typedef struct ref_api_s
@@ -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 *(*EV_VisTraceLine )( float *start, float *end, int flags ); |
|
|
|
|
struct pmtrace_s (*CL_TraceLine)( vec3_t start, vec3_t end, int flags ); |
|
|
|
|
struct movevars_s *(*pfnGetMoveVars)( void ); |
|
|
|
|
|
|
|
|
|
// imagelib
|
|
|
|
|
void (*Image_AddCmdFlags)( uint flags ); // used to check if hardware dxt is supported
|
|
|
|
|