UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_view.h File Reference

Go to the source code of this file.

Macros

#define MAPDEBUG_TEXT   (1<<1) /* Creates arrows pointing at floors and ceilings at mouse cursor */
 cvar debug_map options: debug_map is a bit mask, like the developer cvar. There is no ALL bit. 1 (1<<0) = Turn on pathfinding floor tiles. Red can not be entered, green can be reached with current TUs, yellow can be reached but actor does not have needed TUs, and black should never be able to be reached because there is not floor to support an actor there (not tuned for flyers yet) 2 (1<<1) = Turn on cursor debug text display. The information at the top is the ceiling value where the cursor is and the (x, y, z) coordinates for the cursor at the current level. The z value will always match the level - 1. The bottom information is the floor value at teh cursor at the current level and the location of the actual displayed cursor. The distinction is made because our GUI currently always places the cursor on the ground beneath the mouse pointer, even if the ground is a few levels beneath the current level. Eventually, we will need to be able to disable that for actors that can fly and remain in the air between turns, if any. 4 (1<<2) = Turn on obstruction arrows for the floor and the ceiling. These arrows point to the ceiling surface and the floor surface for teh current cell. 8 (1<<3) = Turn on obstruction arrows. These currently look broken from what I've seen in screenshots. These arrows are supposed to point to the brushes that limit movement in a given direction. The arrows either touch the floor/ceiling of the current cell in the tested direction if it is possible to move in that direction, or touch the obstruction (surface) that prevents movement in a given direction. I want to redo these anyhow, as they are meant for map editors to be able to see what surfaces are actually preventing movement at the routing level. Feedback is encouraged. More...
 
#define MAPDEBUG_PATHING   (1<<0) /* Turns on pathing tracing. */
 
#define MAPDEBUG_CELLS   (1<<2) /* Creates arrows pointing at floors and ceilings at mouse cursor */
 
#define MAPDEBUG_WALLS   (1<<3) /* Creates arrows pointing at obstructions in the 8 primary directions */
 

Functions

void CL_ViewRender (void)
 
void CL_ViewUpdateRenderData (void)
 Updates the refdef. More...
 
void CL_ViewCenterAtGridPosition (const pos3_t pos)
 Centers the camera on a given grid field. 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...
 
void CL_ViewLoadMedia (void)
 Call before entering a new level, or after vid_restart. More...
 
void CL_ViewInit (void)
 
void CL_ViewPrecacheModels (void)
 Precaches all models at game startup - for faster access. More...
 

Variables

cvar_tcl_isometric
 
cvar_tcl_map_debug
 

Macro Definition Documentation

#define MAPDEBUG_CELLS   (1<<2) /* Creates arrows pointing at floors and ceilings at mouse cursor */

Definition at line 65 of file cl_view.h.

Referenced by CL_ViewRender().

#define MAPDEBUG_PATHING   (1<<0) /* Turns on pathing tracing. */

Definition at line 64 of file cl_view.h.

Referenced by CL_ViewRender().

#define MAPDEBUG_TEXT   (1<<1) /* Creates arrows pointing at floors and ceilings at mouse cursor */

cvar debug_map options: debug_map is a bit mask, like the developer cvar. There is no ALL bit. 1 (1<<0) = Turn on pathfinding floor tiles. Red can not be entered, green can be reached with current TUs, yellow can be reached but actor does not have needed TUs, and black should never be able to be reached because there is not floor to support an actor there (not tuned for flyers yet) 2 (1<<1) = Turn on cursor debug text display. The information at the top is the ceiling value where the cursor is and the (x, y, z) coordinates for the cursor at the current level. The z value will always match the level - 1. The bottom information is the floor value at teh cursor at the current level and the location of the actual displayed cursor. The distinction is made because our GUI currently always places the cursor on the ground beneath the mouse pointer, even if the ground is a few levels beneath the current level. Eventually, we will need to be able to disable that for actors that can fly and remain in the air between turns, if any. 4 (1<<2) = Turn on obstruction arrows for the floor and the ceiling. These arrows point to the ceiling surface and the floor surface for teh current cell. 8 (1<<3) = Turn on obstruction arrows. These currently look broken from what I've seen in screenshots. These arrows are supposed to point to the brushes that limit movement in a given direction. The arrows either touch the floor/ceiling of the current cell in the tested direction if it is possible to move in that direction, or touch the obstruction (surface) that prevents movement in a given direction. I want to redo these anyhow, as they are meant for map editors to be able to see what surfaces are actually preventing movement at the routing level. Feedback is encouraged.

Definition at line 63 of file cl_view.h.

Referenced by HUD_MapDebugCursor(), and HUD_UpdateCursor().

#define MAPDEBUG_WALLS   (1<<3) /* Creates arrows pointing at obstructions in the 8 primary directions */

Definition at line 66 of file cl_view.h.

Referenced by CL_ViewRender().

Function Documentation

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_s::cam, cl, cl_camzoommin, cl_isometric, rendererData_t::fieldOfViewX, FOV, cvar_s::integer, refdef, cvar_s::value, and camera_s::zoom.

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

void CL_ViewCenterAtGridPosition ( const pos3_t  pos)
void CL_ViewInit ( void  )

Definition at line 298 of file cl_view.cpp.

References cl_map_draw_rescue_zone, CVAR_ARCHIVE, and Cvar_Get().

Referenced by CL_Init().

void CL_ViewPrecacheModels ( void  )

Variable Documentation

cvar_t* cl_isometric
cvar_t* cl_map_debug

Definition at line 41 of file cl_view.cpp.

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