FTEQW
Documentation of the FTE engine source tree.
view.c File Reference

Functions

float V_CalcRoll (vec3_t angles, vec3_t velocity)
 
float V_CalcBob (playerview_t *pv, qboolean queryold)
 
void V_StartPitchDrift (playerview_t *pv)
 
void V_StopPitchDrift (playerview_t *pv)
 
void V_CenterView_f (void)
 
void V_DriftPitch (playerview_t *pv)
 
void BuildGammaTable (float gamma, float cscale, float cboost, float brightness)
 
void W32_BlowChunk (vec3_t pos, float radius)
 
void V_ParseDamage (playerview_t *pv)
 
void V_cshift_f (void)
 
void V_BonusFlash_f (void)
 
void V_DarkFlash_f (void)
 
void V_WhiteFlash_f (void)
 
void V_SetContentsColor (int contents)
 
void V_CalcPowerupCshift (playerview_t *pv)
 
void V_CalcBlend (float *hw_blend)
 
void V_UpdatePalette (qboolean force)
 
void V_ClearCShifts (void)
 
float angledelta (float a)
 
void V_CalcGunPositionAngle (playerview_t *pv, float bob)
 
void V_BoundOffsets (int pnum)
 
void V_AddIdle (playerview_t *pv)
 
void V_CalcViewRoll (playerview_t *pv)
 
void V_CalcIntermissionRefdef (playerview_t *pv)
 
float CalcFov (float fov_x, float width, float height)
 
void V_ApplyAFov (playerview_t *pv)
 
void V_ApplyRefdef (void)
 
int V_EditExternalModels (int newviewentity, entity_t *viewentities, int maxviewenties)
 
void V_DepthSortEntities (float *vieworg)
 
void V_ClearRefdef (playerview_t *pv)
 
void V_CalcRefdef (playerview_t *pv)
 
void DropPunchAngle (playerview_t *pv)
 
entity_tCL_EntityNum (int num)
 
void Draw_ExpandedString (struct font_s *font, float x, float y, conchar_t *str)
 
msurface_tMod_GetSurfaceNearPoint (model_t *model, vec3_t point)
 
char * Shader_GetShaderBody (shader_t *s, char *fname, size_t fnamesize)
 
void R_DrawNameTags (void)
 
void R2D_PolyBlend (void)
 
void V_RenderPlayerViews (playerview_t *pv)
 
void V_RenderView (qboolean no2d)
 
void V_Init (void)
 

Variables

cvar_t r_projection = CVARD("r_projection", "0", "0: regular perspective.\n1: stereographic (aka: pannini).\n2: fisheye.\n3: panoramic.\n4: lambert azimuthal equal-area.\n5: Equirectangular")
 
cvar_t ffov = CVARFD("ffov", "", 0, "Allows you to set a specific field of view for when a custom projection is specified. If empty, will use regular fov cvar, which might get messy.")
 
cvar_t cl_rollspeed = CVARD("cl_rollspeed", "200", "Controls the speed required to reach cl_rollangle's tilt.")
 
cvar_t crosshair = CVARF("crosshair", "1", CVAR_ARCHIVE)
 
cvar_t crosshaircolor = CVARF("crosshaircolor", "255 255 255", CVAR_ARCHIVE)
 
cvar_t crosshairsize = CVARF("crosshairsize", "8", CVAR_ARCHIVE)
 
cvar_t cl_crossx = CVARF("cl_crossx", "0", CVAR_ARCHIVE)
 
cvar_t cl_crossy = CVARF("cl_crossy", "0", CVAR_ARCHIVE)
 
cvar_t crosshaircorrect = CVARFD("crosshaircorrect", "0", CVAR_SEMICHEAT, "Moves the crosshair around to represent the impact point of a weapon positioned below the actual view position.")
 
cvar_t crosshairimage = CVARD("crosshairimage", "", "Enables the use of an external/custom crosshair image")
 
cvar_t crosshairalpha = CVAR("crosshairalpha", "1")
 
cvar_t v_skyroom = CVARFCD("skyroom", "", CVAR_SEMICHEAT, V_Skyroom_Changed, "Specifies the center position of the skyroom's view. Skyrooms are drawn instead of skyboxes (typically with their own skybox around them). Entities in skyrooms will be drawn only when r_ignoreentpvs is 0. Can also be set with the _skyroom worldspawn key. This is overriden by csqc's VF_SKYROOM_CAMERA.")
 
cvar_t gl_cshiftenabled = CVARFD("gl_polyblend", "1", CVAR_ARCHIVE, "Controls whether temporary whole-screen colour changes should be honoured or not. Change gl_cshiftpercent if you want to adjust the intensity.\nThis does not affect v_cshift commands sent from the server.")
 
cvar_t gl_cshiftborder = CVARD("gl_polyblend_edgesize", "128", "This constrains colour shifts to the edge of the screen, with the value specifying the size of those borders.")
 
cvar_t v_contentblend = CVARFD("v_contentblend", "1", CVAR_ARCHIVE, "Controls the strength of underwater colour tints (gl_polyblend must be enabled).")
 
cvar_t v_gunkick_q2 = CVARD("v_gunkick_q2", "1", "Controls the strength of view angle changes when firing weapons (in Quake2).")
 
cvar_t v_viewheight = CVARF("v_viewheight", "0", CVAR_ARCHIVE)
 
cvar_t chase_active = CVAR("chase_active", "0")
 
cvar_t chase_back = CVAR("chase_back", "48")
 
cvar_t chase_up = CVAR("chase_up", "24")
 
cvar_t cl_chasecam
 
cvar_t v_gamma = CVARAFCD("gamma", "1.0", "v_gamma", CVAR_ARCHIVE|CVAR_RENDERERCALLBACK, V_Gamma_Callback, "Controls how bright the screen is. Setting this to anything but 1 without hardware gamma requires glsl support and can noticably harm your framerate.")
 
cvar_t v_gammainverted = CVARFCD("v_gammainverted", "0", CVAR_ARCHIVE, V_Gamma_Callback, "Boolean that controls whether the gamma should be inverted (like quake) or not.")
 
cvar_t v_contrast = CVARAFCD("contrast", "1.0", "v_contrast", CVAR_ARCHIVE, V_Gamma_Callback, "Scales colour values linearly to make your screen easier to see. Setting this to anything but 1 without hardware gamma will reduce your framerates a little.")
 
cvar_t v_contrastboost = CVARFCD("v_contrastboost", "1.0", CVAR_ARCHIVE, V_Gamma_Callback, "Amplifies contrast in dark areas")
 
cvar_t v_brightness = CVARAFCD("brightness", "0.0", "v_brightness", CVAR_ARCHIVE, V_Gamma_Callback, "Brightness is how much 'white' to add to each and every pixel on the screen.")
 
qbyte gammatable [256]
 
qboolean gammaworks
 
float hw_blend [4]
 
qboolean r_secondaryview
 
vec3_t nametagorg [MAX_CLIENTS]
 
qboolean nametagseen [MAX_CLIENTS]
 
cvar_t r_showshaders
 
cvar_t r_showfields
 

Function Documentation

◆ angledelta()

float angledelta ( float  a)

◆ BuildGammaTable()

void BuildGammaTable ( float  gamma,
float  cscale,
float  cboost,
float  brightness 
)

◆ CalcFov()

float CalcFov ( float  fov_x,
float  width,
float  height 
)

◆ CL_EntityNum()

entity_t * CL_EntityNum ( int  num)

◆ Draw_ExpandedString()

void Draw_ExpandedString ( struct font_s *  font,
float  x,
float  y,
conchar_t str 
)

◆ DropPunchAngle()

void DropPunchAngle ( playerview_t pv)

◆ Mod_GetSurfaceNearPoint()

msurface_t * Mod_GetSurfaceNearPoint ( model_t model,
vec3_t  point 
)

◆ R2D_PolyBlend()

void R2D_PolyBlend ( void  )

◆ R_DrawNameTags()

void R_DrawNameTags ( void  )

◆ Shader_GetShaderBody()

char * Shader_GetShaderBody ( shader_t s,
char *  fname,
size_t  fnamesize 
)

◆ V_AddIdle()

void V_AddIdle ( playerview_t pv)

◆ V_ApplyAFov()

void V_ApplyAFov ( playerview_t pv)

◆ V_ApplyRefdef()

void V_ApplyRefdef ( void  )

◆ V_BonusFlash_f()

void V_BonusFlash_f ( void  )

◆ V_BoundOffsets()

void V_BoundOffsets ( int  pnum)

◆ V_CalcBlend()

void V_CalcBlend ( float *  hw_blend)

◆ V_CalcBob()

float V_CalcBob ( playerview_t pv,
qboolean  queryold 
)

◆ V_CalcGunPositionAngle()

void V_CalcGunPositionAngle ( playerview_t pv,
float  bob 
)

◆ V_CalcIntermissionRefdef()

void V_CalcIntermissionRefdef ( playerview_t pv)

◆ V_CalcPowerupCshift()

void V_CalcPowerupCshift ( playerview_t pv)

◆ V_CalcRefdef()

void V_CalcRefdef ( playerview_t pv)

◆ V_CalcRoll()

float V_CalcRoll ( vec3_t  angles,
vec3_t  velocity 
)

◆ V_CalcViewRoll()

void V_CalcViewRoll ( playerview_t pv)

◆ V_CenterView_f()

void V_CenterView_f ( void  )

◆ V_ClearCShifts()

void V_ClearCShifts ( void  )

◆ V_ClearRefdef()

void V_ClearRefdef ( playerview_t pv)

◆ V_cshift_f()

void V_cshift_f ( void  )

◆ V_DarkFlash_f()

void V_DarkFlash_f ( void  )

◆ V_DepthSortEntities()

void V_DepthSortEntities ( float *  vieworg)

◆ V_DriftPitch()

void V_DriftPitch ( playerview_t pv)

◆ V_EditExternalModels()

int V_EditExternalModels ( int  newviewentity,
entity_t viewentities,
int  maxviewenties 
)

◆ V_Init()

void V_Init ( void  )

◆ V_ParseDamage()

void V_ParseDamage ( playerview_t pv)

◆ V_RenderPlayerViews()

void V_RenderPlayerViews ( playerview_t pv)

◆ V_RenderView()

void V_RenderView ( qboolean  no2d)

◆ V_SetContentsColor()

void V_SetContentsColor ( int  contents)

◆ V_StartPitchDrift()

void V_StartPitchDrift ( playerview_t pv)

◆ V_StopPitchDrift()

void V_StopPitchDrift ( playerview_t pv)

◆ V_UpdatePalette()

void V_UpdatePalette ( qboolean  force)

◆ V_WhiteFlash_f()

void V_WhiteFlash_f ( void  )

◆ W32_BlowChunk()

void W32_BlowChunk ( vec3_t  pos,
float  radius 
)

Variable Documentation

◆ chase_active

cvar_t chase_active = CVAR("chase_active", "0")

◆ chase_back

cvar_t chase_back = CVAR("chase_back", "48")

◆ chase_up

cvar_t chase_up = CVAR("chase_up", "24")

◆ cl_chasecam

cvar_t cl_chasecam
extern

◆ cl_crossx

cvar_t cl_crossx = CVARF("cl_crossx", "0", CVAR_ARCHIVE)

◆ cl_crossy

cvar_t cl_crossy = CVARF("cl_crossy", "0", CVAR_ARCHIVE)

◆ cl_rollspeed

cvar_t cl_rollspeed = CVARD("cl_rollspeed", "200", "Controls the speed required to reach cl_rollangle's tilt.")

◆ crosshair

cvar_t crosshair = CVARF("crosshair", "1", CVAR_ARCHIVE)

◆ crosshairalpha

cvar_t crosshairalpha = CVAR("crosshairalpha", "1")

◆ crosshaircolor

cvar_t crosshaircolor = CVARF("crosshaircolor", "255 255 255", CVAR_ARCHIVE)

◆ crosshaircorrect

cvar_t crosshaircorrect = CVARFD("crosshaircorrect", "0", CVAR_SEMICHEAT, "Moves the crosshair around to represent the impact point of a weapon positioned below the actual view position.")

◆ crosshairimage

cvar_t crosshairimage = CVARD("crosshairimage", "", "Enables the use of an external/custom crosshair image")

◆ crosshairsize

cvar_t crosshairsize = CVARF("crosshairsize", "8", CVAR_ARCHIVE)

◆ enabled

cvar_t enabled

◆ ffov

cvar_t ffov = CVARFD("ffov", "", 0, "Allows you to set a specific field of view for when a custom projection is specified. If empty, will use regular fov cvar, which might get messy.")

◆ gammatable

qbyte gammatable[256]

◆ gammaworks

qboolean gammaworks

◆ gl_cshiftborder

cvar_t gl_cshiftborder = CVARD("gl_polyblend_edgesize", "128", "This constrains colour shifts to the edge of the screen, with the value specifying the size of those borders.")

◆ gl_cshiftenabled

cvar_t gl_cshiftenabled = CVARFD("gl_polyblend", "1", CVAR_ARCHIVE, "Controls whether temporary whole-screen colour changes should be honoured or not. Change gl_cshiftpercent if you want to adjust the intensity.\nThis does not affect v_cshift commands sent from the server.")

◆ hw_blend

float hw_blend[4]

◆ nametagorg

vec3_t nametagorg[MAX_CLIENTS]
extern

◆ nametagseen

qboolean nametagseen[MAX_CLIENTS]
extern

◆ r_projection

cvar_t r_projection = CVARD("r_projection", "0", "0: regular perspective.\n1: stereographic (aka: pannini).\n2: fisheye.\n3: panoramic.\n4: lambert azimuthal equal-area.\n5: Equirectangular")

◆ r_secondaryview

qboolean r_secondaryview

◆ r_showfields

cvar_t r_showfields

◆ r_showshaders

cvar_t r_showshaders
extern

◆ scalex

cvar_t scalex

◆ scaley

cvar_t scaley

◆ v_brightness

cvar_t v_brightness = CVARAFCD("brightness", "0.0", "v_brightness", CVAR_ARCHIVE, V_Gamma_Callback, "Brightness is how much 'white' to add to each and every pixel on the screen.")

◆ v_contentblend

cvar_t v_contentblend = CVARFD("v_contentblend", "1", CVAR_ARCHIVE, "Controls the strength of underwater colour tints (gl_polyblend must be enabled).")

◆ v_contrast

cvar_t v_contrast = CVARAFCD("contrast", "1.0", "v_contrast", CVAR_ARCHIVE, V_Gamma_Callback, "Scales colour values linearly to make your screen easier to see. Setting this to anything but 1 without hardware gamma will reduce your framerates a little.")

◆ v_contrastboost

cvar_t v_contrastboost = CVARFCD("v_contrastboost", "1.0", CVAR_ARCHIVE, V_Gamma_Callback, "Amplifies contrast in dark areas")

◆ v_gamma

cvar_t v_gamma = CVARAFCD("gamma", "1.0", "v_gamma", CVAR_ARCHIVE|CVAR_RENDERERCALLBACK, V_Gamma_Callback, "Controls how bright the screen is. Setting this to anything but 1 without hardware gamma requires glsl support and can noticably harm your framerate.")

◆ v_gammainverted

cvar_t v_gammainverted = CVARFCD("v_gammainverted", "0", CVAR_ARCHIVE, V_Gamma_Callback, "Boolean that controls whether the gamma should be inverted (like quake) or not.")

◆ v_gunkick_q2

cvar_t v_gunkick_q2 = CVARD("v_gunkick_q2", "1", "Controls the strength of view angle changes when firing weapons (in Quake2).")

◆ v_skyroom

cvar_t v_skyroom = CVARFCD("skyroom", "", CVAR_SEMICHEAT, V_Skyroom_Changed, "Specifies the center position of the skyroom's view. Skyrooms are drawn instead of skyboxes (typically with their own skybox around them). Entities in skyrooms will be drawn only when r_ignoreentpvs is 0. Can also be set with the _skyroom worldspawn key. This is overriden by csqc's VF_SKYROOM_CAMERA.")

◆ v_viewheight

cvar_t v_viewheight = CVARF("v_viewheight", "0", CVAR_ARCHIVE)

◆ x

◆ y

◆ yaw

cvar_t yaw