Player rendering positioning. More...
#include "../client.h"
#include "../cl_screen.h"
#include "../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"
Go to the source code of this file.
Functions | |
void | CL_ViewLoadMedia (void) |
Call before entering a new level, or after vid_restart. | |
static void | CL_PrecacheCharacterModels (void) |
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_t * | cl_map_debug |
static cvar_t * | cl_precache |
Player rendering positioning.
Definition in file cl_view.c.
static void CL_PrecacheCharacterModels | ( | void | ) | [static] |
Precache all menu models for faster access.
Definition at line 131 of file cl_view.c.
References cls, Com_Printf(), Com_sprintf(), csi, linkedList_s::data, i, client_static_s::loadingPercent, MAX_QPATH, teamDef_s::models, NAME_LAST, NAME_NEUTRAL, linkedList_s::next, teamDef_s::numModels, csi_s::numTeamDefs, qtrue, R_RegisterModelShort(), SCR_DrawPrecacheScreen(), td, and csi_s::teamDef.
Referenced by CL_ViewPrecacheModels().
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 223 of file cl_view.c.
References cl, cl_camzoommin, cl_isometric, rendererData_t::fieldOfViewX, FOV, cvar_s::integer, refdef, and cvar_s::value.
Referenced by CL_CameraMove(), CL_CameraZoomIn(), CL_CameraZoomOut(), CL_ClearState(), CL_StartGame(), and SEQ_SetCamera().
static void CL_ViewCalcFieldOfViewY | ( | const float | width, | |
const float | height | |||
) | [inline, static] |
Definition at line 236 of file cl_view.c.
References rendererData_t::fieldOfViewX, rendererData_t::fieldOfViewY, and refdef.
Referenced by CL_ViewUpdateRenderData().
void CL_ViewCenterAtGridPosition | ( | const pos3_t | pos | ) |
Centers the camera on a given grid field.
Definition at line 312 of file cl_view.c.
References cl, Cvar_SetValue(), PosToVec, and VectorCopy.
Referenced by CL_CenterView(), CL_NextAlien_f(), CL_NextAlienVisibleFromActor_f(), and CL_StartGame().
void CL_ViewInit | ( | void | ) |
Definition at line 321 of file cl_view.c.
References CVAR_ARCHIVE, and Cvar_Get().
Referenced by CL_Init().
void CL_ViewLoadMedia | ( | void | ) |
Call before entering a new level, or after vid_restart.
Definition at line 47 of file cl_view.c.
References _, cl, CL_GetConfigString(), CL_GetConfigStringInteger(), CL_ParticleRegisterArt(), CL_SpawnParseEntitystring(), CL_ViewUpdateRenderData(), cls, CM_InlineModel(), Com_Error(), Com_sprintf(), CS_LIGHTMAP, CS_MAPTITLE, CS_MODELS, CS_NAME, CS_POSITIONS, CS_TILES, csi, ERR_DROP, rendererData_t::fogColor, i, IN_SendKeyEvents(), LE_GetNextInUse(), LM_Register(), client_static_s::loadingMessages, client_static_s::loadingPercent, MAX_MODELS, le_s::model1, le_s::model2, le_s::modelnum1, le_s::modelnum2, name, csi_s::numODs, qtrue, R_ModBeginLoading(), R_RegisterModelShort(), rendererData_t::ready, refdef, SCR_UpdateScreen(), VectorSet, rendererData_t::weather, and WEATHER_NONE.
Referenced by CL_RequestNextDownload().
void CL_ViewPrecacheModels | ( | void | ) |
Precaches all models at game startup - for faster access.
Definition at line 181 of file cl_view.c.
References CL_PrecacheCharacterModels(), cls, Com_DPrintf(), csi, DEBUG_CLIENT, i, cvar_s::integer, INVSH_GetItemByIDX(), objDef_s::isDummy, client_static_s::loadingPercent, objDef_s::model, client_static_s::modelPool, csi_s::numODs, qfalse, qtrue, R_RegisterModelShort(), R_SwitchModelMemPoolTag(), SCR_DrawPrecacheScreen(), and objDef_s::type.
Referenced by CL_InitAfter(), and VID_Restart_f().
void CL_ViewRender | ( | void | ) |
Definition at line 259 of file cl_view.c.
References rendererData_t::aliasCount, rendererData_t::brushCount, ca_active, cl, CL_AddPathing(), CL_AddTargeting(), CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), CL_ViewUpdateRenderData(), cls, cvar_s::integer, LE_AddToScene(), LM_AddToScene(), MAPDEBUG_CELLS, MAPDEBUG_PATHING, MAPDEBUG_WALLS, rendererData_t::mapTiles, rendererData_t::numEntities, R_RenderFrame(), r_threadstate, RDF_NOWORLDMODEL, rendererData_t::ready, refdef, rendererData_t::rendererFlags, renderer_threadstate_s::state, client_static_s::state, THREAD_BSP, viddef, viddef_t::viewHeight, and viddef_t::viewWidth.
Referenced by SCR_UpdateScreen().
void CL_ViewUpdateRenderData | ( | void | ) |
Updates the refdef.
Definition at line 244 of file cl_view.c.
References cl, CL_ViewCalcFieldOfViewY(), cl_worldlevel, cvar_s::integer, refdef, rendererData_t::time, VectorCopy, viddef, rendererData_t::viewAngles, viddef_t::viewHeight, rendererData_t::viewOrigin, viddef_t::viewWidth, and rendererData_t::worldlevel.
Referenced by CL_SequenceRender(), CL_ViewLoadMedia(), and CL_ViewRender().
Definition at line 41 of file cl_view.c.
Referenced by CL_InitLocal(), HUD_MapDebugCursor(), and HUD_UpdateCursor().
cvar_t* cl_precache [static] |