This repository has been archived on 2022-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
Xash3DArchive/common/ref_params.h

79 lines
2.4 KiB
C
Raw Normal View History

2009-01-11 22:00:00 +01:00
//=======================================================================
// Copyright XashXT Group 2009 <20>
// ref_params.h - client rendering state
//=======================================================================
#ifndef REF_PARAMS_H
#define REF_PARAMS_H
2010-08-15 22:00:00 +02:00
// renderer flags
#define RDF_NOWORLDMODEL (1<<0) // used for player configuration screen
#define RDF_PORTALINVIEW (1<<1) // draw portal pass
#define RDF_SKYPORTALINVIEW (1<<2) // draw skyportal instead of regular sky
#define RDF_NOFOVADJUSTMENT (1<<3) // do not adjust fov for widescreen
#define RDF_THIRDPERSON (1<<4) // enable chase cam instead firstperson
2009-09-17 22:00:00 +02:00
typedef struct skyportal_s
2009-07-12 22:00:00 +02:00
{
float fov;
float scale;
vec3_t vieworg;
vec3_t viewanglesOffset;
} skyportal_t;
2009-01-11 22:00:00 +01:00
typedef struct ref_params_s
{
// output
vec3_t vieworg;
vec3_t viewangles;
vec3_t forward;
vec3_t right;
vec3_t up;
float frametime; // client frametime
float time; // client time
2009-09-18 22:00:00 +02:00
int intermission;
int paused;
int spectator;
2010-08-07 22:00:00 +02:00
int onground; // true if client is onground
2009-01-11 22:00:00 +01:00
int waterlevel;
2009-09-18 22:00:00 +02:00
vec3_t simvel; // client velocity (came from server)
vec3_t simorg; // client origin (without viewheight)
2009-07-12 22:00:00 +02:00
2009-01-11 22:00:00 +01:00
vec3_t viewheight;
2009-09-13 22:00:00 +02:00
float idealpitch;
2009-09-18 22:00:00 +02:00
vec3_t cl_viewangles; // predicted angles
2009-01-11 22:00:00 +01:00
int health;
vec3_t crosshairangle; // pfnCrosshairAngle values from server
2009-09-18 22:00:00 +02:00
float viewsize;
2009-09-13 22:00:00 +02:00
vec3_t punchangle; // receivied from server
2009-09-18 22:00:00 +02:00
int maxclients;
int viewentity; // entity that set with svc_setview else localclient
int num_entities; // entities actual count (was int playernum;)
2009-01-11 22:00:00 +01:00
int max_entities;
2009-09-18 22:00:00 +02:00
int demoplayback;
2010-08-20 22:00:00 +02:00
float lerpfrac; // interpolate value ( increase from 0.0 to 1.0 ) was int hardware;
2009-09-18 22:00:00 +02:00
int smoothing; // client movement predicting is running
2010-08-15 22:00:00 +02:00
struct usercmd_s *cmd; // last issued usercmd
struct movevars_s *movevars; // sv.movevars
2009-09-18 22:00:00 +02:00
int viewport[4]; // x, y, width, height
int nextView; // the renderer calls ClientDLL_CalcRefdef() and Renderview
// so long in cycles until this value is 0 (multiple views)
int flags; // renderer setup flags (was int onlyClientDraw;)
// Xash Renderer Specifics
skyportal_t skyportal; // sky protal setup is done in HUD_UpdateEntityVars
float blend[4]; // rgba 0-1 full screen blend
float fov_x;
float fov_y; // fov_y = V_CalcFov( fov_x, viewport[2], viewport[3] );
2009-01-11 22:00:00 +01:00
} ref_params_t;
#endif//REF_PARAMS_H