UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_view.cpp File Reference

Player rendering positioning. More...

#include "../client.h"
#include "../cl_screen.h"
#include "../cgame/cl_game.h"
#include "cl_particle.h"
#include "cl_localentity.h"
#include "cl_actor.h"
#include "cl_hud.h"
#include "cl_spawn.h"
#include "cl_view.h"
#include "../renderer/r_main.h"
#include "../renderer/r_entity.h"
Include dependency graph for cl_view.cpp:

Go to the source code of this file.

Functions

void CL_ViewLoadMedia (void)
 Call before entering a new level, or after vid_restart.
static float CL_PrecacheCharacterModels (float alreadyLoadedPercent)
 Precache all menu models for faster access.
void CL_ViewPrecacheModels (void)
 Precaches all models at game startup - for faster access.
void CL_ViewCalcFieldOfViewX (void)
 Calculates refdef's FOV_X. Should generally be called after any changes are made to the zoom level (via cl.cam.zoom).
static void CL_ViewCalcFieldOfViewY (const float width, const float height)
void CL_ViewUpdateRenderData (void)
 Updates the refdef.
void CL_ViewRender (void)
void CL_ViewCenterAtGridPosition (const pos3_t pos)
 Centers the camera on a given grid field.
void CL_ViewInit (void)

Variables

cvar_tcl_map_debug
static cvar_tcl_precache
static cvar_tcl_map_displayavailablecells

Detailed Description

Player rendering positioning.

Definition in file cl_view.cpp.

Function Documentation

◆ CL_PrecacheCharacterModels()

float CL_PrecacheCharacterModels ( float alreadyLoadedPercent)
static

Precache all menu models for faster access.

See also
CL_ViewPrecacheModels
Todo
Does not precache armoured models

Definition at line 117 of file cl_view.cpp.

References cl_precache, Com_Printf(), Com_sprintf(), csi, i, m, MAX_QPATH, teamDef_t::models, NAME_LAST, NAME_NEUTRAL, linkedList_t::next, teamDef_t::numModels, R_FindModel(), and SCR_DrawLoadingScreen().

Referenced by CL_ViewPrecacheModels().

◆ CL_ViewCalcFieldOfViewX()

void CL_ViewCalcFieldOfViewX ( void )

Calculates refdef's FOV_X. Should generally be called after any changes are made to the zoom level (via cl.cam.zoom).

Definition at line 189 of file cl_view.cpp.

References cl, cl_camzoommin, cl_isometric, FOV, and refdef.

Referenced by CL_CameraMove(), CL_CameraZoomIn(), CL_CameraZoomOut(), CL_ClearState(), CL_StartGame(), and SEQ_SetCamera().

◆ CL_ViewCalcFieldOfViewY()

void CL_ViewCalcFieldOfViewY ( const float width,
const float height )
inlinestatic
See also
CL_ViewCalcFieldOfViewX

Definition at line 202 of file cl_view.cpp.

References M_PI, and refdef.

Referenced by CL_ViewUpdateRenderData().

◆ CL_ViewCenterAtGridPosition()

void CL_ViewCenterAtGridPosition ( const pos3_t pos)

Centers the camera on a given grid field.

See also
CL_CameraMove
LE_CenterView
CL_CameraRoute

Definition at line 289 of file cl_view.cpp.

References cl, Cvar_SetValue(), PosToVec, and VectorCopy.

Referenced by CL_CenterView(), CL_NextAlien_f(), CL_NextAlienVisibleFromActor_f(), CL_PrevAlien_f(), and CL_StartGame().

◆ CL_ViewInit()

void CL_ViewInit ( void )

Definition at line 298 of file cl_view.cpp.

References cl_map_displayavailablecells, cl_map_draw_rescue_zone, cl_precache, CVAR_ARCHIVE, and Cvar_Get().

Referenced by CL_Init().

◆ CL_ViewLoadMedia()

◆ CL_ViewPrecacheModels()

void CL_ViewPrecacheModels ( void )

◆ CL_ViewRender()

◆ CL_ViewUpdateRenderData()

void CL_ViewUpdateRenderData ( void )

Updates the refdef.

Definition at line 210 of file cl_view.cpp.

References cl, CL_ViewCalcFieldOfViewY(), cl_worldlevel, refdef, VectorCopy, and viddef.

Referenced by CL_ViewLoadMedia(), CL_ViewRender(), and SEQ_Render3D().

Variable Documentation

◆ cl_map_debug

cvar_t* cl_map_debug

Definition at line 41 of file cl_view.cpp.

Referenced by CL_InitLocal(), CL_ViewRender(), HUD_MapDebugCursor(), and HUD_UpdateCursor().

◆ cl_map_displayavailablecells

cvar_t* cl_map_displayavailablecells
static

Definition at line 43 of file cl_view.cpp.

Referenced by CL_ViewInit(), and CL_ViewRender().

◆ cl_precache

cvar_t* cl_precache
static

Definition at line 42 of file cl_view.cpp.

Referenced by CL_PrecacheCharacterModels(), and CL_ViewInit().