UFO: Alien Invasion
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. More...
 
static float CL_PrecacheCharacterModels (float alreadyLoadedPercent)
 Precache all menu models for faster access. More...
 
void CL_ViewPrecacheModels (void)
 Precaches all models at game startup - for faster access. More...
 
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) More...
 
static void CL_ViewCalcFieldOfViewY (const float width, const float height)
 
void CL_ViewUpdateRenderData (void)
 Updates the refdef. More...
 
void CL_ViewRender (void)
 
void CL_ViewCenterAtGridPosition (const pos3_t pos)
 Centers the camera on a given grid field. More...
 
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()

static 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, cvar_t::integer, m, MAX_QPATH, teamDef_t::models, NAME_LAST, NAME_NEUTRAL, linkedList_t::next, teamDef_t::numModels, csi_t::numTeamDefs, R_FindModel(), SCR_DrawLoadingScreen(), and csi_t::teamDef.

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 clientBattleScape_t::cam, cl, cl_camzoommin, cl_isometric, rendererData_t::fieldOfViewX, FOV, cvar_t::integer, refdef, cvar_t::value, and camera_t::zoom.

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

◆ CL_ViewCalcFieldOfViewY()

static void CL_ViewCalcFieldOfViewY ( const float  width,
const float  height 
)
inlinestatic

◆ CL_ViewCenterAtGridPosition()

void CL_ViewCenterAtGridPosition ( const pos3_t  pos)

◆ 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()

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().