DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
cl_screen.c File Reference
#include "quakedef.h"
#include "cl_video.h"
#include "image.h"
#include "jpeg.h"
#include "image_png.h"
#include "cl_collision.h"
#include "libcurl.h"
#include "csprogs.h"
#include "r_stats.h"
#include "snd_main.h"
+ Include dependency graph for cl_screen.c:

Go to the source code of this file.

Data Structures

struct  envmapinfo_s
 
struct  loadingscreenstack_t
 

Functions

void CL_Screen_Init (void)
 
void CL_Screen_NewMap (void)
 
void CL_Screen_Shutdown (void)
 
void CL_UpdateScreen (void)
 
void R_ClearScreen (qbool fogcolor)
 
static void R_Envmap_f (cmd_state_t *cmd)
 
qbool R_Stereo_Active (void)
 
qbool R_Stereo_ColorMasking (void)
 
void SCR_BeginLoadingPlaque (qbool startup)
 
void SCR_CenterPrint (const char *str)
 
static void SCR_Centerprint_f (cmd_state_t *cmd)
 
static void SCR_CheckDrawCenterString (void)
 
static void SCR_ChooseLoadingPic (qbool startup)
 
void SCR_ClearLoadingScreen (qbool redraw)
 
static void SCR_ClearLoadingScreenTexture (void)
 
void SCR_DeferLoadingPlaque (qbool startup)
 
static void SCR_DrawBrand (void)
 
static void SCR_DrawCenterString (void)
 
void SCR_DrawConsole (void)
 
static int SCR_DrawCurlDownload (int offset)
 
static void SCR_DrawInfobar (void)
 
static int SCR_DrawInfobarString (int offset)
 
static void SCR_DrawLoadingScreen (void)
 
static void SCR_DrawLoadingStack (void)
 
static float SCR_DrawLoadingStack_r (loadingscreenstack_t *s, float y, float size)
 
static void SCR_DrawNet (void)
 
static void SCR_DrawNetGraph (void)
 
static void SCR_DrawNetGraph_DrawGraph (int graphx, int graphy, int graphwidth, int graphheight, float graphscale, int graphlimit, const char *label, float textsize, int packetcounter, netgraphitem_t *netgraph)
 
static void SCR_DrawPause (void)
 
static int SCR_DrawQWDownload (int offset)
 
static void SCR_DrawScreen (void)
 
static void SCR_DrawTouchscreenOverlay (void)
 
static void SCR_DrawTurtle (void)
 
void SCR_EndLoadingPlaque (void)
 
static void SCR_InfoBar_f (cmd_state_t *cmd)
 
static int SCR_InfobarHeight (void)
 
void SCR_PopLoadingScreen (qbool redraw)
 
void SCR_PushLoadingScreen (const char *msg, float len_in_parent)
 
qbool SCR_ScreenShot (char *filename, unsigned char *buffer1, unsigned char *buffer2, int x, int y, int width, int height, qbool flipx, qbool flipy, qbool flipdiagonal, qbool jpeg, qbool png, qbool gammacorrect, qbool keep_alpha)
 
static void SCR_ScreenShot_f (cmd_state_t *cmd)
 
static void SCR_SetLoadingScreenTexture (void)
 
static void SCR_SetUpToDrawConsole (void)
 
static void SCR_SizeDown_f (cmd_state_t *cmd)
 
static void SCR_SizeUp_f (cmd_state_t *cmd)
 
static void SCR_UpdateVars (void)
 
void SHOWLMP_decodehide (void)
 
void SHOWLMP_decodeshow (void)
 
void SHOWLMP_drawall (void)
 

Variables

char cl_connect_status [MAX_QPATH]
 User-friendly connection status for the menu and/or loading screen, colours and
not supported.
 
cvar_t cl_demo_mousegrab = {CF_CLIENT, "cl_demo_mousegrab", "0", "Allows reading the mouse input while playing demos. Useful for camera mods developed in csqc. (0: never, 1: always)"}
 
cvar_t cl_minfps
 
cvar_t cl_minfps_fade
 
cvar_t cl_minfps_force
 
cvar_t cl_minfps_qualityhysteresis
 
cvar_t cl_minfps_qualitymax
 
cvar_t cl_minfps_qualitymin
 
cvar_t cl_minfps_qualitymultiply
 
cvar_t cl_minfps_qualitystepmax
 
int cl_punchangle_applied
 
int con_vislines
 
struct envmapinfo_s envmapinfo [12]
 
int jpeg_supported = false
 
static int loadingscreenpic_number = 0
 
static loadingscreenstack_tloadingscreenstack = NULL
 
rtexture_tloadingscreentexture = NULL
 
static float loadingscreentexture_texcoord2f [8]
 
static float loadingscreentexture_vertex3f [12]
 
cvar_t net_graph = {CF_CLIENT | CF_ARCHIVE, "net_graph", "0", "shows a graph of packet sizes and other information, 0 = off, 1 = show client netgraph, 2 = show client and server netgraphs (when hosting a server)"}
 
cvar_t r_fog_clear
 
cvar_t r_letterbox = {CF_CLIENT, "r_letterbox", "0", "reduces vertical height of view to simulate a letterboxed movie effect (can be used by mods for cutscenes)"}
 
rtexturepool_tr_main_texturepool
 
cvar_t r_stereo_angle = {CF_CLIENT, "r_stereo_angle", "0", "separation angle of eyes (makes the views look different directions, as an example, 90 gives a 90 degree separation where the views are 45 degrees left and 45 degrees right)"}
 
cvar_t r_stereo_horizontal = {CF_CLIENT, "r_stereo_horizontal", "0", "aspect skewed side by side view for special decoder/display hardware"}
 
cvar_t r_stereo_redblue = {CF_CLIENT, "r_stereo_redblue", "0", "red/blue anaglyph stereo glasses (note: most of these glasses are actually red/cyan, try that one too)"}
 
cvar_t r_stereo_redcyan = {CF_CLIENT, "r_stereo_redcyan", "0", "red/cyan anaglyph stereo glasses, the kind given away at drive-in movies like Creature From The Black Lagoon In 3D"}
 
cvar_t r_stereo_redgreen = {CF_CLIENT, "r_stereo_redgreen", "0", "red/green anaglyph stereo glasses (for those who don't mind yellow)"}
 
cvar_t r_stereo_separation = {CF_CLIENT, "r_stereo_separation", "4", "separation distance of eyes in the world (negative values are only useful for cross-eyed viewing)"}
 
int r_stereo_side
 
cvar_t r_stereo_sidebyside = {CF_CLIENT, "r_stereo_sidebyside", "0", "side by side views for those who can't afford glasses but can afford eye strain (note: use a negative r_stereo_separation if you want cross-eyed viewing)"}
 
cvar_t r_stereo_vertical = {CF_CLIENT, "r_stereo_vertical", "0", "aspect skewed top and bottom view for special decoder/display hardware"}
 
cvar_t sbar_info_pos
 
int scr_center_lines
 
char scr_centerstring [MAX_INPUTLINE]
 
cvar_t scr_centertime = {CF_CLIENT, "scr_centertime","2", "how long centerprint messages show"}
 
float scr_centertime_off
 
float scr_centertime_start
 
unsigned int scr_con_current
 
static unsigned int scr_con_margin_bottom
 
cvar_t scr_conalpha = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha", "0.9", "opacity of console background gfx/conback (when console isn't forced fullscreen)"}
 
cvar_t scr_conalpha2factor = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"}
 
cvar_t scr_conalpha3factor = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha3factor", "0", "opacity of console background gfx/conback3 relative to scr_conalpha; when 0, gfx/conback3 is not drawn"}
 
cvar_t scr_conalphafactor = {CF_CLIENT | CF_ARCHIVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"}
 
cvar_t scr_conbrightness = {CF_CLIENT | CF_ARCHIVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"}
 
cvar_t scr_conforcewhiledisconnected = {CF_CLIENT, "scr_conforcewhiledisconnected", "1", "1 forces fullscreen console while disconnected, 2 also forces it when the listen server has started but the client is still loading"}
 
cvar_t scr_conheight = {CF_CLIENT | CF_ARCHIVE, "scr_conheight", "0.5", "fraction of screen height occupied by console (reduced as necessary for visibility of loading progress and infobar)"}
 
cvar_t scr_conscroll2_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_x", "0", "scroll speed of gfx/conback2 in x direction"}
 
cvar_t scr_conscroll2_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_y", "0", "scroll speed of gfx/conback2 in y direction"}
 
cvar_t scr_conscroll3_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll3_x", "0", "scroll speed of gfx/conback3 in x direction"}
 
cvar_t scr_conscroll3_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll3_y", "0", "scroll speed of gfx/conback3 in y direction"}
 
cvar_t scr_conscroll_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll_x", "0", "scroll speed of gfx/conback in x direction"}
 
cvar_t scr_conscroll_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll_y", "0", "scroll speed of gfx/conback in y direction"}
 
int scr_erase_center
 
int scr_erase_lines
 
cvar_t scr_fov = {CF_CLIENT | CF_ARCHIVE, "fov","90", "field of vision, 1-170 degrees, default 90, some players use 110-130"}
 
cvar_t scr_infobar_height = {CF_CLIENT, "scr_infobar_height", "8", "the height of the infobar items"}
 
char scr_infobarstring [MAX_INPUTLINE]
 
float scr_infobartime_off
 
qbool scr_initialized
 
qbool scr_loading = false
 
cvar_t scr_loadingscreen_background = {CF_CLIENT, "scr_loadingscreen_background","0", "show the last visible background during loading screen (costs one screenful of video memory)"}
 
cvar_t scr_loadingscreen_barcolor = {CF_CLIENT, "scr_loadingscreen_barcolor", "0 0 1", "rgb color of loadingscreen progress bar"}
 
cvar_t scr_loadingscreen_barheight = {CF_CLIENT, "scr_loadingscreen_barheight", "8", "the height of the loadingscreen progress bar"}
 
cvar_t scr_loadingscreen_count = {CF_CLIENT, "scr_loadingscreen_count","1", "number of loading screen files to use randomly (named loading.tga, loading2.tga, loading3.tga, ...)"}
 
cvar_t scr_loadingscreen_firstforstartup = {CF_CLIENT, "scr_loadingscreen_firstforstartup","0", "remove loading.tga from random scr_loadingscreen_count selection and only display it on client startup, 0 = normal, 1 = firstforstartup"}
 
cvar_t scr_loadingscreen_maxfps = {CF_CLIENT, "scr_loadingscreen_maxfps", "20", "maximum FPS for loading screen so it will not update very often (this reduces loading time with lots of models)"}
 
cvar_t scr_loadingscreen_picture = {CF_CLIENT, "scr_loadingscreen_picture", "gfx/loading", "picture shown during loading"}
 
cvar_t scr_loadingscreen_scale = {CF_CLIENT, "scr_loadingscreen_scale","1", "scale factor of the background"}
 
cvar_t scr_loadingscreen_scale_base = {CF_CLIENT, "scr_loadingscreen_scale_base","0", "0 = console pixels, 1 = video pixels"}
 
cvar_t scr_loadingscreen_scale_limit = {CF_CLIENT, "scr_loadingscreen_scale_limit","0", "0 = no limit, 1 = until first edge hits screen edge, 2 = until last edge hits screen edge, 3 = until width hits screen width, 4 = until height hits screen height"}
 
int scr_numtouchscreenareas
 
cvar_t scr_printspeed = {CF_CLIENT, "scr_printspeed","0", "speed of intermission printing (episode end texts), a value of 0 disables the slow printing"}
 
cvar_t scr_refresh = {CF_CLIENT, "scr_refresh", "1", "allows you to completely shut off rendering for benchmarking purposes"}
 
cvar_t scr_sbarscale = {CF_CLIENT | CF_READONLY, "scr_sbarscale", "1", "current vid_height/vid_conheight, for compatibility with csprogs that read this cvar (found in Fitzquake-derived engines and FTEQW; despite the name it's not specific to the status bar)"}
 
cvar_t scr_screenshot_alpha = {CF_CLIENT, "scr_screenshot_alpha","0", "try to write an alpha channel to screenshots (debugging feature)"}
 
cvar_t scr_screenshot_gammaboost = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_gammaboost","1", "gamma correction on saved screenshots and videos, 1.0 saves unmodified images"}
 
cvar_t scr_screenshot_jpeg = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg","1", "save jpeg instead of targa or PNG"}
 
cvar_t scr_screenshot_jpeg_quality = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg_quality","0.9", "image quality of saved jpeg"}
 
cvar_t scr_screenshot_name_in_mapdir = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_name_in_mapdir", "0", "if set to 1, screenshots are placed in a subdirectory named like the map they are from"}
 
cvar_t scr_screenshot_png = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_png","0", "save png instead of targa"}
 
cvar_t scr_screenshot_timestamp = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_timestamp", "1", "use a timestamp based number of the type YYYYMMDDHHMMSSsss instead of sequential numbering"}
 
cvar_t scr_showbrand = {CF_CLIENT, "showbrand","0", "shows gfx/brand.tga in a corner of the screen (different values select different positions, including centered)"}
 
cvar_t scr_showpause = {CF_CLIENT | CF_ARCHIVE, "showpause","1", "show pause icon when game is paused"}
 
cvar_t scr_showram = {CF_CLIENT | CF_ARCHIVE, "showram","1", "show ram icon if low on surface cache memory (not used)"}
 
cvar_t scr_showturtle = {CF_CLIENT | CF_ARCHIVE, "showturtle","0", "show turtle icon when framerate is too low"}
 
cvar_t scr_stipple = {CF_CLIENT, "scr_stipple", "0", "interlacing-like stippling of the display"}
 
scr_touchscreenarea_t scr_touchscreenareas [128]
 
cvar_t scr_viewsize = {CF_CLIENT | CF_ARCHIVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"}
 
cvar_t timedemo_screenshotframelist = {CF_CLIENT, "timedemo_screenshotframelist", "", "when performing a timedemo, take screenshots of each frame in this space-separated list - example: 1 201 401"}
 
cvar_t v_isometric
 
cvar_t v_isometric_verticalfov
 
cvar_t vid_conheight = {CF_CLIENT | CF_ARCHIVE, "vid_conheight", "480", "virtual height of 2D graphics system"}
 
cvar_t vid_conwidth = {CF_CLIENT | CF_ARCHIVE, "vid_conwidth", "640", "virtual width of 2D graphics system (note: changes may be overwritten, see vid_conwidthauto)"}
 
cvar_t vid_conwidthauto = {CF_CLIENT | CF_ARCHIVE, "vid_conwidthauto", "1", "automatically update vid_conwidth to match aspect ratio"}
 
cvar_t vid_pixelheight = {CF_CLIENT | CF_ARCHIVE, "vid_pixelheight", "1", "adjusts vertical field of vision to account for non-square pixels (1280x1024 on a CRT monitor for example)"}
 
cvar_t vid_touchscreen_outlinealpha = {CF_CLIENT, "vid_touchscreen_outlinealpha", "0", "opacity of touchscreen area outlines"}
 
cvar_t vid_touchscreen_overlayalpha = {CF_CLIENT, "vid_touchscreen_overlayalpha", "0.25", "opacity of touchscreen area icons"}
 

Function Documentation

◆ CL_Screen_Init()

void CL_Screen_Init ( void )

Definition at line 804 of file cl_screen.c.

805{
806 int i;
822#ifdef CONFIG_MENU
823 Cvar_RegisterVariable (&scr_menuforcewhiledisconnected);
824#endif
854#ifdef CONFIG_VIDEO_CAPTURE
855 Cvar_RegisterVariable (&cl_capturevideo);
856 Cvar_RegisterVariable (&cl_capturevideo_demo_stop);
857 Cvar_RegisterVariable (&cl_capturevideo_printfps);
858 Cvar_RegisterVariable (&cl_capturevideo_width);
859 Cvar_RegisterVariable (&cl_capturevideo_height);
860 Cvar_RegisterVariable (&cl_capturevideo_realtime);
861 Cvar_RegisterVariable (&cl_capturevideo_fps);
862 Cvar_RegisterVariable (&cl_capturevideo_nameformat);
863 Cvar_RegisterVariable (&cl_capturevideo_number);
864 Cvar_RegisterVariable (&cl_capturevideo_ogg);
865 Cvar_RegisterVariable (&cl_capturevideo_framestep);
866#endif
879 Cvar_RegisterVirtual(&net_graph, "shownetgraph");
885 for (i = 0;i < (int)(sizeof(r_speeds_graph_filter)/sizeof(r_speeds_graph_filter[0]));i++)
895
896 // if we want no console, turn it off here too
897 if (Sys_CheckParm ("-noconsole"))
899
900 Cmd_AddCommand(CF_CLIENT, "cprint", SCR_Centerprint_f, "print something at the screen center");
901 Cmd_AddCommand(CF_CLIENT, "sizeup",SCR_SizeUp_f, "increase view size (increases viewsize cvar)");
902 Cmd_AddCommand(CF_CLIENT, "sizedown",SCR_SizeDown_f, "decrease view size (decreases viewsize cvar)");
903 Cmd_AddCommand(CF_CLIENT, "screenshot",SCR_ScreenShot_f, "takes a screenshot of the next rendered frame");
904 Cmd_AddCommand(CF_CLIENT, "envmap", R_Envmap_f, "render a cubemap (skybox) of the current scene");
905 Cmd_AddCommand(CF_CLIENT, "infobar", SCR_InfoBar_f, "display a text in the infobar (usage: infobar expiretime string)");
906
907#ifdef CONFIG_VIDEO_CAPTURE
909#endif
910
911 scr_initialized = true;
912}
void SCR_CaptureVideo_Ogg_Init(void)
Definition cap_ogg.c:577
cvar_t r_stereo_redcyan
Definition cl_screen.c:85
static void R_Envmap_f(cmd_state_t *cmd)
Definition cl_screen.c:1291
cvar_t scr_conscroll2_y
Definition cl_screen.c:31
qbool scr_initialized
Definition cl_screen.c:102
cvar_t r_stereo_angle
Definition cl_screen.c:87
cvar_t scr_loadingscreen_barcolor
Definition cl_screen.c:50
cvar_t r_stereo_redgreen
Definition cl_screen.c:86
cvar_t scr_loadingscreen_scale
Definition cl_screen.c:44
cvar_t scr_loadingscreen_background
Definition cl_screen.c:43
cvar_t scr_screenshot_name_in_mapdir
Definition cl_screen.c:90
cvar_t scr_loadingscreen_picture
Definition cl_screen.c:47
cvar_t scr_screenshot_timestamp
Definition cl_screen.c:64
cvar_t r_stereo_separation
Definition cl_screen.c:80
cvar_t scr_conbrightness
Definition cl_screen.c:25
cvar_t r_stereo_redblue
Definition cl_screen.c:84
static void SCR_ScreenShot_f(cmd_state_t *cmd)
Definition cl_screen.c:919
cvar_t scr_conscroll2_x
Definition cl_screen.c:30
cvar_t scr_fov
Definition cl_screen.c:20
cvar_t scr_stipple
Definition cl_screen.c:88
cvar_t scr_refresh
Definition cl_screen.c:89
static void SCR_SizeDown_f(cmd_state_t *cmd)
Definition cl_screen.c:789
cvar_t scr_loadingscreen_scale_base
Definition cl_screen.c:45
cvar_t scr_centertime
Definition cl_screen.c:37
cvar_t scr_conscroll3_y
Definition cl_screen.c:33
cvar_t scr_loadingscreen_barheight
Definition cl_screen.c:51
cvar_t scr_conforcewhiledisconnected
Definition cl_screen.c:26
cvar_t scr_screenshot_alpha
Definition cl_screen.c:63
cvar_t scr_conalphafactor
Definition cl_screen.c:22
cvar_t scr_screenshot_jpeg
Definition cl_screen.c:59
cvar_t cl_demo_mousegrab
Definition cl_screen.c:92
cvar_t scr_conalpha
Definition cl_screen.c:21
cvar_t scr_showturtle
Definition cl_screen.c:39
cvar_t vid_touchscreen_outlinealpha
Definition cl_screen.c:94
cvar_t scr_viewsize
Definition cl_screen.c:19
cvar_t scr_loadingscreen_count
Definition cl_screen.c:48
cvar_t vid_conwidthauto
Definition cl_screen.c:55
cvar_t r_letterbox
Definition cl_screen.c:79
cvar_t scr_infobar_height
Definition cl_screen.c:53
cvar_t vid_pixelheight
Definition cl_screen.c:58
cvar_t scr_conheight
Definition cl_screen.c:27
cvar_t scr_conscroll_x
Definition cl_screen.c:28
cvar_t net_graph
Definition cl_screen.c:91
cvar_t scr_conscroll3_x
Definition cl_screen.c:32
cvar_t scr_conalpha2factor
Definition cl_screen.c:23
cvar_t scr_conscroll_y
Definition cl_screen.c:29
cvar_t scr_sbarscale
Definition cl_screen.c:54
cvar_t scr_showpause
Definition cl_screen.c:40
cvar_t scr_screenshot_gammaboost
Definition cl_screen.c:62
cvar_t r_stereo_vertical
Definition cl_screen.c:83
cvar_t scr_conalpha3factor
Definition cl_screen.c:24
cvar_t vid_conheight
Definition cl_screen.c:57
static void SCR_InfoBar_f(cmd_state_t *cmd)
Definition cl_screen.c:692
cvar_t scr_printspeed
Definition cl_screen.c:42
cvar_t r_stereo_sidebyside
Definition cl_screen.c:81
cvar_t vid_touchscreen_overlayalpha
Definition cl_screen.c:95
cvar_t scr_screenshot_jpeg_quality
Definition cl_screen.c:60
cvar_t scr_loadingscreen_maxfps
Definition cl_screen.c:52
cvar_t scr_loadingscreen_firstforstartup
Definition cl_screen.c:49
cvar_t vid_conwidth
Definition cl_screen.c:56
cvar_t scr_loadingscreen_scale_limit
Definition cl_screen.c:46
cvar_t timedemo_screenshotframelist
Definition cl_screen.c:93
cvar_t scr_showbrand
Definition cl_screen.c:41
static void SCR_SizeUp_f(cmd_state_t *cmd)
Definition cl_screen.c:776
cvar_t r_stereo_horizontal
Definition cl_screen.c:82
cvar_t scr_showram
Definition cl_screen.c:38
cvar_t scr_screenshot_png
Definition cl_screen.c:61
static void SCR_Centerprint_f(cmd_state_t *cmd)
Definition cl_screen.c:175
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
Definition cmd.c:1661
#define CF_CLIENT
cvar/command that only the client can change/execute
Definition cmd.h:48
void Cvar_SetQuick(cvar_t *var, const char *value)
Definition cvar.c:436
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
Definition cvar.c:599
void Cvar_RegisterVirtual(cvar_t *variable, const char *name)
Definition cvar.c:513
static int(ZEXPORT *qz_inflate)(z_stream *strm
int i
cvar_t r_speeds_graph_maxtimedelta
Definition r_stats.c:22
cvar_t r_speeds_graph_length
Definition r_stats.c:16
cvar_t r_speeds_graph_maxdefault
Definition r_stats.c:23
cvar_t r_speeds_graph
Definition r_stats.c:4
cvar_t r_speeds_graph_filter[8]
Definition r_stats.c:5
cvar_t r_speeds_graph_width
Definition r_stats.c:20
cvar_t r_speeds_graph_height
Definition r_stats.c:21
cvar_t r_speeds_graph_seconds
Definition r_stats.c:17
cvar_t r_speeds_graph_y
Definition r_stats.c:19
cvar_t r_speeds_graph_x
Definition r_stats.c:18
int Sys_CheckParm(const char *parm)
Definition sys_shared.c:327

References CF_CLIENT, cl_demo_mousegrab, Cmd_AddCommand(), Cvar_RegisterVariable(), Cvar_RegisterVirtual(), Cvar_SetQuick(), i, int(), net_graph, R_Envmap_f(), r_letterbox, r_speeds_graph, r_speeds_graph_filter, r_speeds_graph_height, r_speeds_graph_length, r_speeds_graph_maxdefault, r_speeds_graph_maxtimedelta, r_speeds_graph_seconds, r_speeds_graph_width, r_speeds_graph_x, r_speeds_graph_y, r_stereo_angle, r_stereo_horizontal, r_stereo_redblue, r_stereo_redcyan, r_stereo_redgreen, r_stereo_separation, r_stereo_sidebyside, r_stereo_vertical, SCR_CaptureVideo_Ogg_Init(), SCR_Centerprint_f(), scr_centertime, scr_conalpha, scr_conalpha2factor, scr_conalpha3factor, scr_conalphafactor, scr_conbrightness, scr_conforcewhiledisconnected, scr_conheight, scr_conscroll2_x, scr_conscroll2_y, scr_conscroll3_x, scr_conscroll3_y, scr_conscroll_x, scr_conscroll_y, scr_fov, SCR_InfoBar_f(), scr_infobar_height, scr_initialized, scr_loadingscreen_background, scr_loadingscreen_barcolor, scr_loadingscreen_barheight, scr_loadingscreen_count, scr_loadingscreen_firstforstartup, scr_loadingscreen_maxfps, scr_loadingscreen_picture, scr_loadingscreen_scale, scr_loadingscreen_scale_base, scr_loadingscreen_scale_limit, scr_printspeed, scr_refresh, scr_sbarscale, scr_screenshot_alpha, SCR_ScreenShot_f(), scr_screenshot_gammaboost, scr_screenshot_jpeg, scr_screenshot_jpeg_quality, scr_screenshot_name_in_mapdir, scr_screenshot_png, scr_screenshot_timestamp, scr_showbrand, scr_showpause, scr_showram, scr_showturtle, SCR_SizeDown_f(), SCR_SizeUp_f(), scr_stipple, scr_viewsize, Sys_CheckParm(), timedemo_screenshotframelist, vid_conheight, vid_conwidth, vid_conwidthauto, vid_pixelheight, vid_touchscreen_outlinealpha, and vid_touchscreen_overlayalpha.

Referenced by CL_Init().

◆ CL_Screen_NewMap()

void CL_Screen_NewMap ( void )

Definition at line 2346 of file cl_screen.c.

2347{
2348}

Referenced by CL_ClearState().

◆ CL_Screen_Shutdown()

void CL_Screen_Shutdown ( void )

Definition at line 797 of file cl_screen.c.

798{
799#ifdef CONFIG_VIDEO_CAPTURE
800 SCR_CaptureVideo_EndVideo();
801#endif
802}

Referenced by CL_Shutdown().

◆ CL_UpdateScreen()

void CL_UpdateScreen ( void )

Definition at line 2130 of file cl_screen.c.

2131{
2132 static double cl_updatescreen_quality = 1;
2133
2134 vec3_t vieworigin;
2135 static double drawscreenstart = 0.0;
2136 double drawscreendelta;
2137 r_viewport_t viewport;
2138
2139 // TODO: Move to a better place.
2141
2142 if(drawscreenstart)
2143 {
2144 drawscreendelta = Sys_DirtyTime() - drawscreenstart;
2145#ifdef CONFIG_VIDEO_CAPTURE
2146 if (cl_minfps.value > 0 && (cl_minfps_force.integer || !(cls.timedemo || (cls.capturevideo.active && !cls.capturevideo.realtime))) && drawscreendelta >= 0 && drawscreendelta < 60)
2147#else
2148 if (cl_minfps.value > 0 && (cl_minfps_force.integer || !cls.timedemo) && drawscreendelta >= 0 && drawscreendelta < 60)
2149#endif
2150 {
2151 // quality adjustment according to render time
2152 double actualframetime;
2153 double targetframetime;
2154 double adjust;
2155 double f;
2156 double h;
2157
2158 // fade lastdrawscreentime
2160
2161 // find actual and target frame times
2162 actualframetime = r_refdef.lastdrawscreentime;
2163 targetframetime = (1.0 / cl_minfps.value);
2164
2165 // we scale hysteresis by quality
2166 h = cl_updatescreen_quality * cl_minfps_qualityhysteresis.value;
2167
2168 // calculate adjustment assuming linearity
2169 f = cl_updatescreen_quality / actualframetime * cl_minfps_qualitymultiply.value;
2170 adjust = (targetframetime - actualframetime) * f;
2171
2172 // one sided hysteresis
2173 if(adjust > 0)
2174 adjust = max(0, adjust - h);
2175
2176 // adjust > 0 if:
2177 // (targetframetime - actualframetime) * f > h
2178 // ((1.0 / cl_minfps.value) - actualframetime) * (cl_updatescreen_quality / actualframetime * cl_minfps_qualitymultiply.value) > (cl_updatescreen_quality * cl_minfps_qualityhysteresis.value)
2179 // ((1.0 / cl_minfps.value) - actualframetime) * (cl_minfps_qualitymultiply.value / actualframetime) > cl_minfps_qualityhysteresis.value
2180 // (1.0 / cl_minfps.value) * (cl_minfps_qualitymultiply.value / actualframetime) - cl_minfps_qualitymultiply.value > cl_minfps_qualityhysteresis.value
2181 // (1.0 / cl_minfps.value) * (cl_minfps_qualitymultiply.value / actualframetime) > cl_minfps_qualityhysteresis.value + cl_minfps_qualitymultiply.value
2182 // (1.0 / cl_minfps.value) / actualframetime > (cl_minfps_qualityhysteresis.value + cl_minfps_qualitymultiply.value) / cl_minfps_qualitymultiply.value
2183 // (1.0 / cl_minfps.value) / actualframetime > 1.0 + cl_minfps_qualityhysteresis.value / cl_minfps_qualitymultiply.value
2184 // cl_minfps.value * actualframetime < 1.0 / (1.0 + cl_minfps_qualityhysteresis.value / cl_minfps_qualitymultiply.value)
2185 // actualframetime < 1.0 / cl_minfps.value / (1.0 + cl_minfps_qualityhysteresis.value / cl_minfps_qualitymultiply.value)
2186 // actualfps > cl_minfps.value * (1.0 + cl_minfps_qualityhysteresis.value / cl_minfps_qualitymultiply.value)
2187
2188 // adjust < 0 if:
2189 // (targetframetime - actualframetime) * f < 0
2190 // ((1.0 / cl_minfps.value) - actualframetime) * (cl_updatescreen_quality / actualframetime * cl_minfps_qualitymultiply.value) < 0
2191 // ((1.0 / cl_minfps.value) - actualframetime) < 0
2192 // -actualframetime) < -(1.0 / cl_minfps.value)
2193 // actualfps < cl_minfps.value
2194
2195 /*
2196 Con_Printf("adjust UP if fps > %f, adjust DOWN if fps < %f\n",
2197 cl_minfps.value * (1.0 + cl_minfps_qualityhysteresis.value / cl_minfps_qualitymultiply.value),
2198 cl_minfps.value);
2199 */
2200
2201 // don't adjust too much at once
2203
2204 // adjust!
2205 cl_updatescreen_quality += adjust;
2206 cl_updatescreen_quality = bound(max(0.01, cl_minfps_qualitymin.value), cl_updatescreen_quality, cl_minfps_qualitymax.value);
2207 }
2208 else
2209 {
2210 cl_updatescreen_quality = 1;
2212 }
2213 }
2214
2215 drawscreenstart = Sys_DirtyTime();
2216
2218
2220 return; // not initialized yet
2221
2223 {
2224 // play a bit with the palette (experimental)
2225 palette_rgb_pantscolormap[15][0] = (unsigned char) (128 + 127 * sin(cl.time / exp(1.0f) + 0.0f*M_PI/3.0f));
2226 palette_rgb_pantscolormap[15][1] = (unsigned char) (128 + 127 * sin(cl.time / exp(1.0f) + 2.0f*M_PI/3.0f));
2227 palette_rgb_pantscolormap[15][2] = (unsigned char) (128 + 127 * sin(cl.time / exp(1.0f) + 4.0f*M_PI/3.0f));
2228 palette_rgb_shirtcolormap[15][0] = (unsigned char) (128 + 127 * sin(cl.time / M_PI + 5.0f*M_PI/3.0f));
2229 palette_rgb_shirtcolormap[15][1] = (unsigned char) (128 + 127 * sin(cl.time / M_PI + 3.0f*M_PI/3.0f));
2230 palette_rgb_shirtcolormap[15][2] = (unsigned char) (128 + 127 * sin(cl.time / M_PI + 1.0f*M_PI/3.0f));
2233 }
2234
2235#ifdef CONFIG_VIDEO_CAPTURE
2236 if (vid_hidden && !cls.capturevideo.active
2237 && !cl_capturevideo.integer) // so we can start capturing while hidden
2238#else
2239 if (vid_hidden)
2240#endif
2241 {
2242 VID_Finish();
2243 return;
2244 }
2245
2246 if (scr_loading)
2247 {
2250 else if (scr_loadingscreen_maxfps.value > 0)
2251 {
2252 static double lastupdate;
2253 if (host.realtime - lastupdate < min(1.0f / scr_loadingscreen_maxfps.value, 0.1))
2254 return;
2255 lastupdate = host.realtime;
2256 }
2257 }
2258
2260
2263
2265 R_HDR_UpdateIrisAdaptation(vieworigin);
2266
2267 r_refdef.view.colormask[0] = 1;
2268 r_refdef.view.colormask[1] = 1;
2269 r_refdef.view.colormask[2] = 1;
2270
2272
2273#ifndef USE_GLES2
2275 qglDrawBuffer(GL_BACK);CHECKGLERROR
2276#endif
2277
2280 R_SetViewport(&viewport);
2281 GL_ScissorTest(false);
2282 GL_ColorMask(1,1,1,1);
2283 GL_DepthMask(true);
2284
2285 R_ClearScreen(false);
2286 r_refdef.view.clear = false;
2287 r_refdef.view.isoverlay = false;
2288
2289 // calculate r_refdef.view.quality
2290 r_refdef.view.quality = cl_updatescreen_quality;
2291
2293 {
2294 Con_Print("FIXME: scr_stipple not implemented\n");
2296 }
2297
2298#ifndef USE_GLES2
2299 if (R_Stereo_Active())
2300 {
2301 r_stereo_side = 0;
2302
2304 {
2305 r_refdef.view.colormask[0] = 1;
2306 r_refdef.view.colormask[1] = 0;
2307 r_refdef.view.colormask[2] = 0;
2308 }
2309
2310 if (vid.mode.stereobuffer)
2311 qglDrawBuffer(GL_BACK_RIGHT);
2312
2314
2315 r_stereo_side = 1;
2316 r_refdef.view.clear = true;
2317
2319 {
2320 r_refdef.view.colormask[0] = 0;
2323 }
2324
2325 if (vid.mode.stereobuffer)
2326 qglDrawBuffer(GL_BACK_LEFT);
2327
2329 r_stereo_side = 0;
2330 }
2331 else
2332#endif
2333 {
2334 r_stereo_side = 0;
2336 }
2337
2338#ifdef CONFIG_VIDEO_CAPTURE
2339 SCR_CaptureVideo();
2340#endif
2341
2342 qglFlush(); // ensure that the commands are submitted to the GPU before we do other things
2343 VID_Finish();
2344}
client_state_t cl
Definition cl_main.c:117
client_static_t cls
Definition cl_main.c:116
static void SCR_DrawScreen(void)
Definition cl_screen.c:1576
cvar_t cl_minfps_qualitystepmax
Definition cl_main.c:106
int r_stereo_side
Definition cl_screen.c:1553
cvar_t cl_minfps_qualitymin
Definition cl_main.c:103
int cl_punchangle_applied
Definition view.c:149
static void SCR_UpdateVars(void)
Definition cl_screen.c:2082
void R_ClearScreen(qbool fogcolor)
Definition cl_screen.c:1534
cvar_t cl_minfps
Definition cl_main.c:100
qbool R_Stereo_Active(void)
Definition cl_screen.c:2077
void SCR_EndLoadingPlaque(void)
Definition cl_screen.c:1865
cvar_t cl_minfps_qualitymax
Definition cl_main.c:102
static void SCR_SetUpToDrawConsole(void)
Definition cl_screen.c:711
qbool scr_loading
Definition cl_screen.c:104
cvar_t cl_minfps_force
Definition cl_main.c:107
cvar_t cl_minfps_fade
Definition cl_main.c:101
static loadingscreenstack_t * loadingscreenstack
Definition cl_screen.c:1566
cvar_t cl_minfps_qualityhysteresis
Definition cl_main.c:105
cvar_t cl_minfps_qualitymultiply
Definition cl_main.c:104
@ ca_connected
Definition client.h:532
#define SIGNONS
Definition client.h:525
gamemode_t gamemode
Definition com_game.c:26
#define IS_NEXUIZ_DERIVED(g)
Definition com_game.h:71
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
Definition console.c:1504
qbool con_initialized
Definition console.c:97
void Cvar_SetValueQuick(cvar_t *var, float value)
Definition cvar.c:473
void GL_ColorMask(int r, int g, int b, int a)
void GL_DepthMask(int state)
void R_Mesh_SetRenderTargets(int fbo)
void R_SetViewport(const r_viewport_t *v)
Definition gl_backend.c:897
void R_Viewport_InitOrtho(r_viewport_t *v, const matrix4x4_t *cameramatrix, int x, int y, int width, int height, float x1, float y1, float x2, float y2, float nearclip, float farclip, const float *nearplane)
Definition gl_backend.c:587
void GL_ScissorTest(int state)
void R_BufferData_NewFrame(void)
begin a new frame (recycle old buffers)
Definition gl_rmain.c:3678
void R_HDR_UpdateIrisAdaptation(const vec3_t point)
Definition gl_rmain.c:4144
void R_FrameData_NewFrame(void)
prepare for a new frame, recycles old buffers if a resize occurred previously
Definition gl_rmain.c:3521
r_refdef_t r_refdef
Definition gl_rmain.c:57
#define CHECKGLERROR
Definition glquake.h:1059
#define GL_BACK_LEFT
Definition glquake.h:130
#define GL_BACK
Definition glquake.h:133
#define GL_BACK_RIGHT
Definition glquake.h:131
host_static_t host
Definition host.c:41
#define max(A, B)
Definition mathlib.h:38
#define min(A, B)
Definition mathlib.h:37
#define bound(min, num, max)
Definition mathlib.h:34
#define M_PI
Definition mathlib.h:28
const matrix4x4_t identitymatrix
Definition matrixlib.c:9
void Matrix4x4_OriginFromMatrix(const matrix4x4_t *in, float *out)
Definition matrixlib.c:1792
float sin(float f)
unsigned char palette_rgb_pantscolormap[16][3]
Definition palette.c:8
unsigned char palette_rgb_pantsscoreboard[16][3]
Definition palette.c:10
unsigned char palette_rgb_shirtcolormap[16][3]
Definition palette.c:9
unsigned char palette_rgb_shirtscoreboard[16][3]
Definition palette.c:11
#define NULL
Definition qtypes.h:12
vec_t vec3_t[3]
Definition qtypes.h:71
void Sbar_ShowFPS_Update(void)
Definition sbar.c:1082
float f
double time
Definition client.h:868
qbool connect_trying
Definition client.h:609
qbool timedemo
Definition client.h:589
cactive_t state
Definition client.h:568
float value
Definition cvar.h:74
int integer
Definition cvar.h:73
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
Definition host.h:46
double lastdrawscreentime
Definition render.h:462
r_refdef_view_t view
Definition render.h:406
qbool clear
whether to call R_ClearScreen before rendering stuff
Definition render.h:305
float quality
render quality (0 to 1) - affects r_drawparticles_drawdistance and others
Definition render.h:321
qbool isoverlay
if true, don't clear or do any post process effects (bloom, etc)
Definition render.h:307
int colormask[4]
which color components to allow (for anaglyph glasses)
Definition render.h:299
matrix4x4_t matrix
Definition render.h:266
qbool stereobuffer
Definition vid.h:64
int width
Definition vid.h:60
int height
Definition vid.h:61
viddef_mode_t mode
currently active video mode
Definition vid.h:73
double Sys_DirtyTime(void)
Definition sys_shared.c:417
void VID_Finish(void)
Definition vid_null.c:32
viddef_t vid
global video state
Definition vid_shared.c:64
qbool vid_hidden
Definition vid_shared.c:74

References bound, ca_connected, CHECKGLERROR, cl, cl_minfps, cl_minfps_fade, cl_minfps_force, cl_minfps_qualityhysteresis, cl_minfps_qualitymax, cl_minfps_qualitymin, cl_minfps_qualitymultiply, cl_minfps_qualitystepmax, cl_punchangle_applied, r_refdef_view_t::clear, cls, r_refdef_view_t::colormask, con_initialized, Con_Print(), client_static_t::connect_trying, Cvar_SetValueQuick(), f, gamemode, GL_BACK, GL_BACK_LEFT, GL_BACK_RIGHT, GL_ColorMask(), GL_DepthMask(), GL_ScissorTest(), viddef_mode_t::height, host, identitymatrix, cvar_t::integer, IS_NEXUIZ_DERIVED, r_refdef_view_t::isoverlay, r_refdef_t::lastdrawscreentime, loadingscreenstack, M_PI, r_refdef_view_t::matrix, Matrix4x4_OriginFromMatrix(), max, min, viddef_t::mode, NULL, palette_rgb_pantscolormap, palette_rgb_pantsscoreboard, palette_rgb_shirtcolormap, palette_rgb_shirtscoreboard, r_refdef_view_t::quality, R_BufferData_NewFrame(), R_ClearScreen(), R_FrameData_NewFrame(), R_HDR_UpdateIrisAdaptation(), R_Mesh_SetRenderTargets(), r_refdef, R_SetViewport(), R_Stereo_Active(), r_stereo_redblue, r_stereo_redcyan, r_stereo_redgreen, r_stereo_side, R_Viewport_InitOrtho(), host_static_t::realtime, Sbar_ShowFPS_Update(), SCR_DrawScreen(), SCR_EndLoadingPlaque(), scr_initialized, scr_loading, scr_loadingscreen_maxfps, scr_refresh, SCR_SetUpToDrawConsole(), scr_stipple, SCR_UpdateVars(), client_static_t::signon, SIGNONS, sin(), client_static_t::state, viddef_mode_t::stereobuffer, Sys_DirtyTime(), client_state_t::time, client_static_t::timedemo, cvar_t::value, vid, vid_conheight, vid_conwidth, VID_Finish(), vid_hidden, r_refdef_t::view, and viddef_mode_t::width.

Referenced by CL_Frame(), CL_TimeRefresh_f(), Key_Console(), SCR_BeginLoadingPlaque(), SCR_PopLoadingScreen(), and SCR_PushLoadingScreen().

◆ R_ClearScreen()

void R_ClearScreen ( qbool fogcolor)

Definition at line 1534 of file cl_screen.c.

1535{
1536 float clearcolor[4];
1538 // clear to transparency (so png screenshots can contain alpha channel, useful for building model pictures)
1539 Vector4Set(clearcolor, 0.0f, 0.0f, 0.0f, 0.0f);
1540 else
1541 // clear to opaque black (if we're being composited it might otherwise render as transparent)
1542 Vector4Set(clearcolor, 0.0f, 0.0f, 0.0f, 1.0f);
1543 if (fogcolor && r_fog_clear.integer)
1544 {
1545 R_UpdateFog();
1546 VectorCopy(r_refdef.fogcolor, clearcolor);
1547 }
1548 // clear depth is 1.0
1549 // clear the screen
1551}
cvar_t r_fog_clear
Definition gl_rmain.c:138
void GL_Clear(int mask, const float *colorvalue, float depthvalue, int stencilvalue)
void R_UpdateFog(void)
Definition gl_rmain.c:5396
#define GL_COLOR_BUFFER_BIT
Definition glquake.h:171
#define GL_STENCIL_BUFFER_BIT
Definition glquake.h:170
#define GL_DEPTH_BUFFER_BIT
Definition glquake.h:169
#define Vector4Set(vec, r, g, b, a)
Definition mathlib.h:86
#define VectorCopy(in, out)
Definition mathlib.h:101
float fogcolor[3]
Definition render.h:424
qbool stencil
Definition vid.h:74

References r_refdef_t::fogcolor, GL_Clear(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT, cvar_t::integer, r_fog_clear, r_refdef, R_UpdateFog(), scr_screenshot_alpha, viddef_t::stencil, Vector4Set, VectorCopy, and vid.

Referenced by CL_UpdateScreen(), R_RenderView(), and R_Water_ProcessPlanes().

◆ R_Envmap_f()

static void R_Envmap_f ( cmd_state_t * cmd)
static

Definition at line 1291 of file cl_screen.c.

1292{
1293 int j, size;
1294 char filename[MAX_QPATH], basename[MAX_QPATH];
1295 unsigned char *buffer1;
1296 unsigned char *buffer2;
1297 r_rendertarget_t *rt;
1298
1299 if (Cmd_Argc(cmd) != 3)
1300 {
1301 Con_Print("envmap <basename> <size>: save out 6 cubic environment map images, usable with loadsky, note that size must one of 128, 256, 512, or 1024 and can't be bigger than your current resolution\n");
1302 return;
1303 }
1304
1305 if(cls.state != ca_connected) {
1306 Con_Printf("envmap: No map loaded\n");
1307 return;
1308 }
1309
1310 dp_strlcpy (basename, Cmd_Argv(cmd, 1), sizeof (basename));
1311 size = atoi(Cmd_Argv(cmd, 2));
1312 if (size != 128 && size != 256 && size != 512 && size != 1024)
1313 {
1314 Con_Print("envmap: size must be one of 128, 256, 512, or 1024\n");
1315 return;
1316 }
1317 if (size > vid.mode.width || size > vid.mode.height)
1318 {
1319 Con_Print("envmap: your resolution is not big enough to render that size\n");
1320 return;
1321 }
1322
1323 r_refdef.envmap = true;
1324
1326
1327 r_refdef.view.x = 0;
1328 r_refdef.view.y = 0;
1329 r_refdef.view.z = 0;
1332 r_refdef.view.depth = 1;
1334 r_refdef.view.isoverlay = false;
1335 r_refdef.view.ismain = true;
1336
1337 r_refdef.view.frustum_x = 1; // tan(45 * M_PI / 180.0);
1338 r_refdef.view.frustum_y = 1; // tan(45 * M_PI / 180.0);
1339 r_refdef.view.ortho_x = 90; // abused as angle by VM_CL_R_SetView
1340 r_refdef.view.ortho_y = 90; // abused as angle by VM_CL_R_SetView
1341
1342 buffer1 = (unsigned char *)Mem_Alloc(tempmempool, size * size * 4);
1343 buffer2 = (unsigned char *)Mem_Alloc(tempmempool, size * size * 3);
1344
1345 // TODO: use TEXTYPE_COLORBUFFER16F and output to .exr files as well?
1348 for (j = 0;j < 12;j++)
1349 {
1350 dpsnprintf(filename, sizeof(filename), "env/%s%s.tga", basename, envmapinfo[j].name);
1352 r_refdef.view.quality = 1;
1353 r_refdef.view.clear = true;
1354 R_Mesh_Start();
1355 R_RenderView(rt->fbo, rt->depthtexture, rt->colortexture[0], 0, 0, size, size);
1356 R_Mesh_Finish();
1357 SCR_ScreenShot(filename, buffer1, buffer2, 0, vid.mode.height - (r_refdef.view.y + r_refdef.view.height), size, size, envmapinfo[j].flipx, envmapinfo[j].flipy, envmapinfo[j].flipdiagonaly, false, false, false, false);
1358 }
1359
1360 Mem_Free (buffer1);
1361 Mem_Free (buffer2);
1362
1363 r_refdef.envmap = false;
1364}
void CL_UpdateEntityShading(void)
Definition cl_main.c:2777
struct envmapinfo_s envmapinfo[12]
qbool SCR_ScreenShot(char *filename, unsigned char *buffer1, unsigned char *buffer2, int x, int y, int width, int height, qbool flipx, qbool flipy, qbool flipdiagonal, qbool jpeg, qbool png, qbool gammacorrect, qbool keep_alpha)
Definition cl_screen.c:1443
static int Cmd_Argc(cmd_state_t *cmd)
Definition cmd.h:249
static const char * Cmd_Argv(cmd_state_t *cmd, int arg)
Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are alwa...
Definition cmd.h:254
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
Definition common.c:997
#define dp_strlcpy(dst, src, dsize)
Definition common.h:303
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
Definition console.c:1514
vector size
void R_Mesh_Start(void)
void R_Mesh_Finish(void)
void R_RenderView(int fbo, rtexture_t *depthtexture, rtexture_t *colortexture, int x, int y, int width, int height)
Definition gl_rmain.c:5637
r_rendertarget_t * R_RenderTarget_Get(int texturewidth, int textureheight, textype_t depthtextype, qbool depthisrenderbuffer, textype_t colortextype0, textype_t colortextype1, textype_t colortextype2, textype_t colortextype3)
Definition gl_rmain.c:4564
void R_UpdateVariables(void)
Definition gl_rmain.c:5483
const GLchar * name
Definition glquake.h:601
void Matrix4x4_CreateFromQuakeEntity(matrix4x4_t *out, double x, double y, double z, double pitch, double yaw, double roll, double scale)
Definition matrixlib.c:715
void cmd(string command,...)
#define MAX_QPATH
max length of a quake game pathname
Definition qdefs.h:169
@ TEXTYPE_COLORBUFFER
Definition r_textures.h:84
@ TEXTYPE_UNUSED
Definition r_textures.h:46
@ TEXTYPE_DEPTHBUFFER24STENCIL8
Definition r_textures.h:94
float angles[3]
Definition cl_screen.c:1270
qbool flipdiagonaly
Definition cl_screen.c:1272
qbool envmap
Definition render.h:455
float frustum_y
Definition render.h:277
float frustum_x
Definition render.h:277
vec3_t origin
Definition render.h:267
int useperspective
if turned off it renders an ortho view
Definition render.h:280
float ortho_x
Definition render.h:287
qbool ismain
if true, this is the MAIN view (which is, after CSQC, copied into the scene for use e....
Definition render.h:309
float ortho_y
Definition render.h:287
rtexture_t * depthtexture
Definition render.h:835
rtexture_t * colortexture[4]
Definition render.h:834
mempool_t * tempmempool
Definition zone.c:794
#define Mem_Free(mem)
Definition zone.h:96
#define Mem_Alloc(pool, size)
Definition zone.h:92

References envmapinfo_s::angles, ca_connected, CL_UpdateEntityShading(), r_refdef_view_t::clear, cls, cmd(), Cmd_Argc(), Cmd_Argv(), r_rendertarget_t::colortexture, Con_Print(), Con_Printf(), r_refdef_view_t::depth, r_rendertarget_t::depthtexture, dp_strlcpy, dpsnprintf(), r_refdef_t::envmap, envmapinfo, r_rendertarget_t::fbo, envmapinfo_s::flipdiagonaly, envmapinfo_s::flipx, envmapinfo_s::flipy, r_refdef_view_t::frustum_x, r_refdef_view_t::frustum_y, r_refdef_view_t::height, viddef_mode_t::height, r_refdef_view_t::ismain, r_refdef_view_t::isoverlay, r_refdef_view_t::matrix, Matrix4x4_CreateFromQuakeEntity(), MAX_QPATH, Mem_Alloc, Mem_Free, viddef_t::mode, name, r_refdef_view_t::origin, r_refdef_view_t::ortho_x, r_refdef_view_t::ortho_y, r_refdef_view_t::quality, R_Mesh_Finish(), R_Mesh_Start(), r_refdef, R_RenderTarget_Get(), R_RenderView(), R_UpdateVariables(), SCR_ScreenShot(), size, client_static_t::state, tempmempool, TEXTYPE_COLORBUFFER, TEXTYPE_DEPTHBUFFER24STENCIL8, TEXTYPE_UNUSED, r_refdef_view_t::useperspective, vid, r_refdef_t::view, r_refdef_view_t::width, viddef_mode_t::width, r_refdef_view_t::x, r_refdef_view_t::y, and r_refdef_view_t::z.

Referenced by CL_Screen_Init().

◆ R_Stereo_Active()

◆ R_Stereo_ColorMasking()

qbool R_Stereo_ColorMasking ( void )

◆ SCR_BeginLoadingPlaque()

void SCR_BeginLoadingPlaque ( qbool startup)

Definition at line 1838 of file cl_screen.c.

1839{
1840 loadingscreenstack_t dummy_status;
1841
1842 // we need to push a dummy status so CL_UpdateScreen knows we have things to load...
1843 if (!loadingscreenstack)
1844 {
1845 dummy_status.msg[0] = '\0';
1846 dummy_status.absolute_loading_amount_min = 0;
1847 loadingscreenstack = &dummy_status;
1848 }
1849
1850 SCR_DeferLoadingPlaque(startup);
1854
1855 if (loadingscreenstack == &dummy_status)
1857}
void CL_UpdateScreen(void)
Definition cl_screen.c:2130
static void SCR_SetLoadingScreenTexture(void)
Definition cl_screen.c:1794
void SCR_DeferLoadingPlaque(qbool startup)
Definition cl_screen.c:1859
float absolute_loading_amount_min
Definition cl_screen.c:1561
char msg[MAX_QPATH]
Definition cl_screen.c:1560

References loadingscreenstack_t::absolute_loading_amount_min, CL_UpdateScreen(), cvar_t::integer, loadingscreenstack, loadingscreenstack_t::msg, NULL, SCR_DeferLoadingPlaque(), scr_loadingscreen_background, and SCR_SetLoadingScreenTexture().

Referenced by CL_EstablishConnection(), CL_ParseServerInfo(), Host_Init(), R_Modules_Restart_f(), and SV_SpawnServer().

◆ SCR_CenterPrint()

void SCR_CenterPrint ( const char * str)

Definition at line 144 of file cl_screen.c.

145{
148
149 // Print the message to the console and update the scr buffer
150 // but only if it's different to the previous message
151 if (strcmp(str, scr_centerstring) == 0)
152 return;
155 if (str[0] == '\0') // happens when stepping out of a centreprint trigger on alk1.2 start.bsp
156 return;
157 Con_CenterPrint(str);
158
159// count the number of lines for centering
160 while (*str)
161 {
162 if (*str == '\n')
164 str++;
165 }
166}
float scr_centertime_start
Definition cl_screen.c:128
int scr_center_lines
Definition cl_screen.c:130
char scr_centerstring[MAX_INPUTLINE]
Definition cl_screen.c:127
float scr_centertime_off
Definition cl_screen.c:129
void Con_CenterPrint(const char *str)
Prints a center-aligned message to the console.
Definition console.c:1655

References cl, Con_CenterPrint(), dp_strlcpy, scr_center_lines, scr_centerstring, scr_centertime, scr_centertime_off, scr_centertime_start, client_state_t::time, and cvar_t::value.

Referenced by CL_ParseServerMessage(), CL_VM_Parse_CenterPrint(), SCR_Centerprint_f(), and VM_centerprint().

◆ SCR_Centerprint_f()

static void SCR_Centerprint_f ( cmd_state_t * cmd)
static

Definition at line 175 of file cl_screen.c.

176{
177 char msg[MAX_INPUTLINE];
178 unsigned int i, c, p;
179
180 c = Cmd_Argc(cmd);
181 if(c >= 2)
182 {
183 // Merge all the cprint arguments into one string
184 dp_strlcpy(msg, Cmd_Argv(cmd,1), sizeof(msg));
185 for(i = 2; i < c; ++i)
186 {
187 dp_strlcat(msg, " ", sizeof(msg));
188 dp_strlcat(msg, Cmd_Argv(cmd, i), sizeof(msg));
189 }
190
191 c = (unsigned int)strlen(msg);
192 for(p = 0, i = 0; i < c; ++i)
193 {
194 if(msg[i] == '\\')
195 {
196 if(msg[i+1] == 'n')
197 msg[p++] = '\n';
198 else if(msg[i+1] == '\\')
199 msg[p++] = '\\';
200 else {
201 msg[p++] = '\\';
202 msg[p++] = msg[i+1];
203 }
204 ++i;
205 } else {
206 msg[p++] = msg[i];
207 }
208 }
209 msg[p] = '\0';
210 SCR_CenterPrint(msg);
211 }
212}
void SCR_CenterPrint(const char *str)
Definition cl_screen.c:144
#define dp_strlcat(dst, src, dsize)
Definition common.h:304
float strlen(string s)
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
Definition qdefs.h:94

References cmd(), Cmd_Argc(), Cmd_Argv(), dp_strlcat, dp_strlcpy, i, int(), MAX_INPUTLINE, SCR_CenterPrint(), and strlen().

Referenced by CL_Screen_Init().

◆ SCR_CheckDrawCenterString()

static void SCR_CheckDrawCenterString ( void )
static

Definition at line 271 of file cl_screen.c.

272{
275
276 if (cl.time > cl.oldtime)
278
279 // don't draw if this is a normal stats-screen intermission,
280 // only if it is not an intermission, or a finale intermission
281 if (cl.intermission == 1)
282 return;
284 return;
285 if (key_dest != key_game)
286 return;
287
289}
int scr_erase_lines
Definition cl_screen.c:131
static void SCR_DrawCenterString(void)
Definition cl_screen.c:214
keydest_t key_dest
Definition keys.c:37
@ key_game
Definition keys.h:372
double oldtime
Definition client.h:868
int intermission
Definition client.h:856

References cl, client_state_t::intermission, key_dest, key_game, client_state_t::oldtime, scr_center_lines, scr_centertime_off, SCR_DrawCenterString(), scr_erase_lines, and client_state_t::time.

Referenced by SCR_DrawScreen().

◆ SCR_ChooseLoadingPic()

static void SCR_ChooseLoadingPic ( qbool startup)
static

◆ SCR_ClearLoadingScreen()

void SCR_ClearLoadingScreen ( qbool redraw)

Definition at line 1918 of file cl_screen.c.

1919{
1920 while(loadingscreenstack)
1922}
void SCR_PopLoadingScreen(qbool redraw)
Definition cl_screen.c:1899
struct loadingscreenstack_s * prev
Definition cl_screen.c:1559

References loadingscreenstack, loadingscreenstack_t::prev, and SCR_PopLoadingScreen().

Referenced by CL_DisconnectEx().

◆ SCR_ClearLoadingScreenTexture()

static void SCR_ClearLoadingScreenTexture ( void )
static

Definition at line 1786 of file cl_screen.c.

1787{
1791}
rtexture_t * loadingscreentexture
Definition cl_screen.c:1567
void R_FreeTexture(rtexture_t *rt)

References loadingscreentexture, NULL, and R_FreeTexture().

Referenced by SCR_EndLoadingPlaque(), and SCR_SetLoadingScreenTexture().

◆ SCR_DeferLoadingPlaque()

void SCR_DeferLoadingPlaque ( qbool startup)

Definition at line 1859 of file cl_screen.c.

1860{
1861 SCR_ChooseLoadingPic(startup);
1862 scr_loading = true;
1863}
static void SCR_ChooseLoadingPic(qbool startup)
Definition cl_screen.c:1819

References SCR_ChooseLoadingPic(), and scr_loading.

Referenced by SCR_BeginLoadingPlaque(), and VID_Restart_f().

◆ SCR_DrawBrand()

static void SCR_DrawBrand ( void )
static

Definition at line 485 of file cl_screen.c.

486{
487 cachepic_t *pic;
488 float x, y;
489
490 if (!scr_showbrand.value)
491 return;
492
493 pic = Draw_CachePic ("gfx/brand");
494
495 switch ((int)scr_showbrand.value)
496 {
497 case 1: // bottom left
498 x = 0;
500 break;
501 case 2: // bottom centre
502 x = (vid_conwidth.integer - Draw_GetPicWidth(pic)) / 2;
504 break;
505 case 3: // bottom right
508 break;
509 case 4: // centre right
512 break;
513 case 5: // top right
515 y = 0;
516 break;
517 case 6: // top centre
518 x = (vid_conwidth.integer - Draw_GetPicWidth(pic)) / 2;
519 y = 0;
520 break;
521 case 7: // top left
522 x = 0;
523 y = 0;
524 break;
525 case 8: // centre left
526 x = 0;
528 break;
529 default:
530 return;
531 }
532
533 DrawQ_Pic (x, y, pic, 0, 0, 1, 1, 1, 1, 0);
534}
cachepic_t * Draw_CachePic(const char *path)
Definition gl_draw.c:185
void DrawQ_Pic(float x, float y, cachepic_t *pic, float width, float height, float red, float green, float blue, float alpha, int flags)
Definition gl_draw.c:797
int Draw_GetPicWidth(cachepic_t *pic)
Definition gl_draw.c:197
int Draw_GetPicHeight(cachepic_t *pic)
Definition gl_draw.c:204
GLint GLenum GLint GLint y
Definition glquake.h:651
GLint GLenum GLint x
Definition glquake.h:651

References Draw_CachePic(), Draw_GetPicHeight(), Draw_GetPicWidth(), DrawQ_Pic(), cvar_t::integer, scr_showbrand, cvar_t::value, vid_conheight, vid_conwidth, x, and y.

Referenced by SCR_DrawScreen().

◆ SCR_DrawCenterString()

static void SCR_DrawCenterString ( void )
static

Definition at line 214 of file cl_screen.c.

215{
216 char *start;
217 int x, y;
218 int remaining;
219 int color;
220
221 if(cl.intermission == 2) // in finale,
222 if(sb_showscores) // make TAB hide the finale message (sb_showscores overrides finale in sbar.c)
223 return;
224
226 return;
227
228// the finale prints the characters one at a time, except if printspeed is an absurdly high value
229 if (cl.intermission && scr_printspeed.value > 0 && scr_printspeed.value < 1000000)
230 remaining = (int)(scr_printspeed.value * (cl.time - scr_centertime_start));
231 else
232 remaining = 9999;
233
235 start = scr_centerstring;
236
237 if (remaining < 1)
238 return;
239
240 if (scr_center_lines <= 4)
241 y = (int)(vid_conheight.integer*0.35);
242 else
243 y = 48;
244
245 color = -1;
246 do
247 {
248 // scan the number of characters on the line, not counting color codes
249 char *newline = strchr(start, '\n');
250 int l = newline ? (newline - start) : (int)strlen(start);
251 float width = DrawQ_TextWidth(start, l, 8, 8, false, FONT_CENTERPRINT);
252
253 x = (int) (vid_conwidth.integer - width)/2;
254 if (l > 0)
255 {
256 if (remaining < l)
257 l = remaining;
258 DrawQ_String(x, y, start, l, 8, 8, 1, 1, 1, 1, 0, &color, false, FONT_CENTERPRINT);
259 remaining -= l;
260 if (remaining <= 0)
261 return;
262 }
263 y += 8;
264
265 if (!newline)
266 break;
267 start = newline + 1; // skip the \n
268 } while (1);
269}
int scr_erase_center
Definition cl_screen.c:132
qbool sb_showscores
Definition sbar.c:56
vector color
float DrawQ_String(float x, float y, const char *text, size_t maxlen, float scalex, float scaley, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor, qbool ignorecolorcodes, const dp_font_t *fnt)
Definition gl_draw.c:1320
float DrawQ_TextWidth(const char *text, size_t maxlen, float w, float h, qbool ignorecolorcodes, const dp_font_t *fnt)
Definition gl_draw.c:1330
#define FONT_CENTERPRINT
Definition draw.h:133
GLenum GLsizei width
Definition glquake.h:622

References cl, color, DrawQ_String(), DrawQ_TextWidth(), FONT_CENTERPRINT, int(), cvar_t::integer, client_state_t::intermission, sb_showscores, scr_center_lines, scr_centerstring, scr_centertime, scr_centertime_start, scr_erase_center, scr_printspeed, strlen(), client_state_t::time, cvar_t::value, vid_conheight, vid_conwidth, width, x, and y.

Referenced by SCR_CheckDrawCenterString().

◆ SCR_DrawConsole()

void SCR_DrawConsole ( void )

Definition at line 750 of file cl_screen.c.

751{
752 // infobar and loading progress are not drawn simultaneously
757 {
758 // full screen
760 }
761 else if (scr_con_current)
763 else
764 con_vislines = 0;
765}
unsigned int scr_con_current
Definition cl_screen.c:106
static unsigned int scr_con_margin_bottom
Definition cl_screen.c:107
static int SCR_InfobarHeight(void)
Definition cl_screen.c:661
int con_vislines
Definition console.c:95
void Con_DrawConsole(int lines, qbool forcedfullscreen)
Definition console.c:2138
int key_consoleactive
Definition keys.c:38
#define KEY_CONSOLEACTIVE_FORCED
Definition keys.h:382

References Con_DrawConsole(), con_vislines, cvar_t::integer, key_consoleactive, KEY_CONSOLEACTIVE_FORCED, min, scr_con_current, scr_con_margin_bottom, SCR_InfobarHeight(), scr_loading, scr_loadingscreen_barheight, and vid_conheight.

Referenced by SCR_DrawScreen().

◆ SCR_DrawCurlDownload()

static int SCR_DrawCurlDownload ( int offset)
static

Definition at line 597 of file cl_screen.c.

598{
599 // sync with SCR_InfobarHeight
600 int len;
601 int nDownloads;
602 int i;
603 float x, y;
605 Curl_downloadinfo_t *downinfo;
606 char temp[256];
607 char addinfobuf[128];
608 const char *addinfo;
609
610 downinfo = Curl_GetDownloadInfo(&nDownloads, &addinfo, addinfobuf, sizeof(addinfobuf));
611 if(!downinfo)
612 return 0;
613
614 y = vid_conheight.integer - size * nDownloads - offset;
615
616 if(addinfo)
617 {
618 len = (int)strlen(addinfo);
619 x = (vid_conwidth.integer - DrawQ_TextWidth(addinfo, len, size, size, true, FONT_INFOBAR)) / 2;
620 DrawQ_Fill(0, y - size, vid_conwidth.integer, size, 1, 1, 1, cls.signon == SIGNONS ? 0.8 : 1, 0);
621 DrawQ_String(x, y - size, addinfo, len, size, size, 0, 0, 0, 1, 0, NULL, true, FONT_INFOBAR);
622 }
623
624 for(i = 0; i != nDownloads; ++i)
625 {
626 if(downinfo[i].queued)
627 dpsnprintf(temp, sizeof(temp), "Still in queue: %s", downinfo[i].filename);
628 else if(downinfo[i].progress <= 0)
629 dpsnprintf(temp, sizeof(temp), "Downloading %s ... ???.?%% @ %.1f KiB/s", downinfo[i].filename, downinfo[i].speed / 1024.0);
630 else
631 dpsnprintf(temp, sizeof(temp), "Downloading %s ... %5.1f%% @ %.1f KiB/s", downinfo[i].filename, 100.0 * downinfo[i].progress, downinfo[i].speed / 1024.0);
632 len = (int)strlen(temp);
633 x = (vid_conwidth.integer - DrawQ_TextWidth(temp, len, size, size, true, FONT_INFOBAR)) / 2;
634 DrawQ_Fill(0, y + i * size, vid_conwidth.integer, size, 0, 0, 0, cls.signon == SIGNONS ? 0.5 : 1, 0);
635 DrawQ_String(x, y + i * size, temp, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
636 }
637
638 Z_Free(downinfo);
639
640 return size * (nDownloads + (addinfo ? 1 : 0));
641}
void DrawQ_Fill(float x, float y, float width, float height, float red, float green, float blue, float alpha, int flags)
Definition gl_draw.c:847
#define FONT_INFOBAR
Definition draw.h:134
GLuint GLuint GLintptr offset
Definition glquake.h:632
Curl_downloadinfo_t * Curl_GetDownloadInfo(int *nDownloads, const char **additional_info, char *addinfo, size_t addinfolength)
Definition libcurl.c:1612
#define Z_Free(data)
Definition zone.h:164

References cls, Curl_GetDownloadInfo(), dpsnprintf(), DrawQ_Fill(), DrawQ_String(), DrawQ_TextWidth(), FONT_INFOBAR, i, int(), cvar_t::integer, NULL, offset, scr_infobar_height, client_static_t::signon, SIGNONS, size, strlen(), cvar_t::value, vid_conheight, vid_conwidth, x, y, and Z_Free.

Referenced by SCR_DrawInfobar().

◆ SCR_DrawInfobar()

static void SCR_DrawInfobar ( void )
static

Definition at line 648 of file cl_screen.c.

649{
650 unsigned int offset = 0;
653 if(scr_infobartime_off > 0)
655 if(!offset && scr_loading)
658 Con_DPrintf("broken console margin calculation: %d != %d\n", offset, scr_con_margin_bottom);
659}
float scr_infobartime_off
Definition cl_screen.c:134
static int SCR_DrawQWDownload(int offset)
Definition cl_screen.c:541
static int SCR_DrawInfobarString(int offset)
Definition cl_screen.c:578
static int SCR_DrawCurlDownload(int offset)
Definition cl_screen.c:597
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
Definition console.c:1544

References Con_DPrintf(), cvar_t::integer, offset, scr_con_margin_bottom, SCR_DrawCurlDownload(), SCR_DrawInfobarString(), SCR_DrawQWDownload(), scr_infobartime_off, scr_loading, and scr_loadingscreen_barheight.

Referenced by SCR_DrawScreen().

◆ SCR_DrawInfobarString()

static int SCR_DrawInfobarString ( int offset)
static

Definition at line 578 of file cl_screen.c.

579{
580 int len;
581 float x, y;
583
587 DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, cls.signon == SIGNONS ? 0.5 : 1, 0);
588 DrawQ_String(x, y, scr_infobarstring, len, size, size, 1, 1, 1, 1, 0, NULL, false, FONT_INFOBAR);
589 return size;
590}
char scr_infobarstring[MAX_INPUTLINE]
Definition cl_screen.c:133

References cls, DrawQ_Fill(), DrawQ_String(), DrawQ_TextWidth(), FONT_INFOBAR, int(), cvar_t::integer, NULL, offset, scr_infobar_height, scr_infobarstring, client_static_t::signon, SIGNONS, size, strlen(), cvar_t::value, vid_conheight, vid_conwidth, x, and y.

Referenced by SCR_DrawInfobar().

◆ SCR_DrawLoadingScreen()

static void SCR_DrawLoadingScreen ( void )
static

Definition at line 1992 of file cl_screen.c.

1993{
1994 cachepic_t *loadingscreenpic;
1995 float loadingscreenpic_vertex3f[12];
1996 float loadingscreenpic_texcoord2f[8];
1997 float x, y, w, h, sw, sh, f;
1998 char vabuf[1024];
1999
2001 GL_DepthRange(0, 1);
2002 GL_PolygonOffset(0, 0);
2003 GL_DepthTest(false);
2004 GL_Color(1,1,1,1);
2005
2007 {
2009 R_SetupShader_Generic(loadingscreentexture, false, true, true);
2011 }
2012
2014 w = Draw_GetPicWidth(loadingscreenpic);
2015 h = Draw_GetPicHeight(loadingscreenpic);
2016
2017 // apply scale
2020
2021 // apply scale base
2023 {
2026 }
2027
2028 // apply scale limit
2030 sh = h / vid_conheight.integer;
2031 f = 1;
2033 {
2034 case 1:
2035 f = max(sw, sh);
2036 break;
2037 case 2:
2038 f = min(sw, sh);
2039 break;
2040 case 3:
2041 f = sw;
2042 break;
2043 case 4:
2044 f = sh;
2045 break;
2046 }
2047 if(f > 1)
2048 {
2049 w /= f;
2050 h /= f;
2051 }
2052
2053 x = (vid_conwidth.integer - w)/2;
2054 y = (vid_conheight.integer - h)/2;
2055 loadingscreenpic_vertex3f[2] = loadingscreenpic_vertex3f[5] = loadingscreenpic_vertex3f[8] = loadingscreenpic_vertex3f[11] = 0;
2056 loadingscreenpic_vertex3f[0] = loadingscreenpic_vertex3f[9] = x;
2057 loadingscreenpic_vertex3f[1] = loadingscreenpic_vertex3f[4] = y;
2058 loadingscreenpic_vertex3f[3] = loadingscreenpic_vertex3f[6] = x + w;
2059 loadingscreenpic_vertex3f[7] = loadingscreenpic_vertex3f[10] = y + h;
2060 loadingscreenpic_texcoord2f[0] = 0;loadingscreenpic_texcoord2f[1] = 0;
2061 loadingscreenpic_texcoord2f[2] = 1;loadingscreenpic_texcoord2f[3] = 0;
2062 loadingscreenpic_texcoord2f[4] = 1;loadingscreenpic_texcoord2f[5] = 1;
2063 loadingscreenpic_texcoord2f[6] = 0;loadingscreenpic_texcoord2f[7] = 1;
2064
2065 R_Mesh_PrepareVertices_Generic_Arrays(4, loadingscreenpic_vertex3f, NULL, loadingscreenpic_texcoord2f);
2066 R_SetupShader_Generic(Draw_GetPicTexture(loadingscreenpic), true, true, false);
2068
2070}
static void SCR_DrawLoadingStack(void)
Definition cl_screen.c:1958
static float loadingscreentexture_texcoord2f[8]
Definition cl_screen.c:1569
static float loadingscreentexture_vertex3f[12]
Definition cl_screen.c:1568
char * va(char *buf, size_t buflen, const char *format,...)
Definition common.c:972
@ CACHEPICFLAG_NOTPERSISTENT
Definition draw.h:36
cachepic_t * Draw_CachePic_Flags(const char *path, unsigned int cachepicflags)
Definition gl_draw.c:86
rtexture_t * Draw_GetPicTexture(cachepic_t *pic)
Definition gl_draw.c:224
unsigned short polygonelement3s[(POLYGONELEMENTS_MAXPOINTS-2) *3]
Definition gl_backend.c:241
int polygonelement3i[(POLYGONELEMENTS_MAXPOINTS-2) *3]
Definition gl_backend.c:240
void R_Mesh_Draw(int firstvertex, int numvertices, int firsttriangle, int numtriangles, const int *element3i, const r_meshbuffer_t *element3i_indexbuffer, int element3i_bufferoffset, const unsigned short *element3s, const r_meshbuffer_t *element3s_indexbuffer, int element3s_bufferoffset)
void GL_DepthTest(int state)
void GL_DepthRange(float nearfrac, float farfrac)
void GL_PolygonOffset(float planeoffset, float depthoffset)
void GL_Color(float cr, float cg, float cb, float ca)
void GL_BlendFunc(int blendfunc1, int blendfunc2)
void R_Mesh_PrepareVertices_Generic_Arrays(int numvertices, const float *vertex3f, const float *color4f, const float *texcoord2f)
void R_SetupShader_Generic(rtexture_t *t, qbool usegamma, qbool notrippy, qbool suppresstexalpha)
Definition gl_rmain.c:1461
GLubyte GLubyte GLubyte GLubyte w
Definition glquake.h:782
#define GL_SRC_ALPHA
Definition glquake.h:79
#define GL_ONE_MINUS_SRC_ALPHA
Definition glquake.h:80
precision highp float
Definition shader_glsl.h:53
vec4 sw
const char * string
Definition cvar.h:71

References CACHEPICFLAG_NOTPERSISTENT, Draw_CachePic_Flags(), Draw_GetPicHeight(), Draw_GetPicTexture(), Draw_GetPicWidth(), f, float, GL_BlendFunc(), GL_Color(), GL_DepthRange(), GL_DepthTest(), GL_ONE_MINUS_SRC_ALPHA, GL_PolygonOffset(), GL_SRC_ALPHA, viddef_mode_t::height, cvar_t::integer, loadingscreenpic_number, loadingscreentexture, loadingscreentexture_texcoord2f, loadingscreentexture_vertex3f, max, min, viddef_t::mode, NULL, polygonelement3i, polygonelement3s, R_Mesh_Draw(), R_Mesh_PrepareVertices_Generic_Arrays(), R_SetupShader_Generic(), SCR_DrawLoadingStack(), scr_loadingscreen_picture, scr_loadingscreen_scale, scr_loadingscreen_scale_base, scr_loadingscreen_scale_limit, cvar_t::string, sw, va(), cvar_t::value, vid, vid_conheight, vid_conwidth, w, viddef_mode_t::width, x, and y.

Referenced by SCR_DrawScreen().

◆ SCR_DrawLoadingStack()

static void SCR_DrawLoadingStack ( void )
static

Definition at line 1958 of file cl_screen.c.

1959{
1960 float verts[12];
1961 float colors[16];
1962
1965 {
1966 // height = 32; // sorry, using the actual one is ugly
1968 GL_DepthRange(0, 1);
1969 GL_PolygonOffset(0, 0);
1970 GL_DepthTest(false);
1971 //R_Mesh_ResetTextureState();
1972 verts[2] = verts[5] = verts[8] = verts[11] = 0;
1973 verts[0] = verts[9] = 0;
1976 verts[7] = verts[10] = vid_conheight.integer;
1977
1978#if _MSC_VER >= 1400
1979#define sscanf sscanf_s
1980#endif
1981 colors[0] = 0; colors[1] = 0; colors[2] = 0; colors[3] = 1;
1982 colors[4] = 0; colors[5] = 0; colors[6] = 0; colors[7] = 1;
1983 sscanf(scr_loadingscreen_barcolor.string, "%f %f %f", &colors[8], &colors[9], &colors[10]); colors[11] = 1;
1984 sscanf(scr_loadingscreen_barcolor.string, "%f %f %f", &colors[12], &colors[13], &colors[14]); colors[15] = 1;
1985
1989 }
1990}
static float SCR_DrawLoadingStack_r(loadingscreenstack_t *s, float y, float size)
Definition cl_screen.c:1924
void R_SetupShader_Generic_NoTexture(qbool usegamma, qbool notrippy)
Definition gl_rmain.c:1488
#define GL_ONE
Definition glquake.h:74

References loadingscreenstack_t::absolute_loading_amount_min, GL_BlendFunc(), GL_DepthRange(), GL_DepthTest(), GL_ONE, GL_PolygonOffset(), GL_SRC_ALPHA, cvar_t::integer, loadingscreenstack, NULL, polygonelement3i, polygonelement3s, R_Mesh_Draw(), R_Mesh_PrepareVertices_Generic_Arrays(), R_SetupShader_Generic_NoTexture(), SCR_DrawLoadingStack_r(), scr_loadingscreen_barcolor, scr_loadingscreen_barheight, cvar_t::string, cvar_t::value, vid_conheight, and vid_conwidth.

Referenced by SCR_DrawLoadingScreen().

◆ SCR_DrawLoadingStack_r()

static float SCR_DrawLoadingStack_r ( loadingscreenstack_t * s,
float y,
float size )
static

Definition at line 1924 of file cl_screen.c.

1925{
1926 float x;
1927 size_t len;
1928 float total;
1929
1930 total = 0;
1931#if 0
1932 if(s)
1933 {
1934 total += SCR_DrawLoadingStack_r(s->prev, y, 8);
1935 y -= total;
1936 if(!s->prev || strcmp(s->msg, s->prev->msg))
1937 {
1938 len = strlen(s->msg);
1939 x = (vid_conwidth.integer - DrawQ_TextWidth(s->msg, len, size, size, true, FONT_INFOBAR)) / 2;
1940 y -= size;
1941 DrawQ_String(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
1942 total += size;
1943 }
1944 }
1945#else
1946 if(s)
1947 {
1948 len = strlen(s->msg);
1949 x = (vid_conwidth.integer - DrawQ_TextWidth(s->msg, len, size, size, true, FONT_INFOBAR)) / 2;
1950 y -= size;
1951 DrawQ_String(x, y, s->msg, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
1952 total += size;
1953 }
1954#endif
1955 return total;
1956}

References DrawQ_String(), DrawQ_TextWidth(), FONT_INFOBAR, cvar_t::integer, loadingscreenstack_t::msg, NULL, loadingscreenstack_t::prev, SCR_DrawLoadingStack_r(), size, strlen(), vid_conwidth, x, and y.

Referenced by SCR_DrawLoadingStack(), and SCR_DrawLoadingStack_r().

◆ SCR_DrawNet()

static void SCR_DrawNet ( void )
static

Definition at line 446 of file cl_screen.c.

447{
448 if (cls.state != ca_connected)
449 return;
451 return;
452 if (cls.demoplayback)
453 return;
454
455 DrawQ_Pic (64, 0, Draw_CachePic ("gfx/net"), 0, 0, 1, 1, 1, 1, 0);
456}
float last_received_message
Definition client.h:885
qbool demoplayback
Definition client.h:587

References ca_connected, cl, cls, client_static_t::demoplayback, Draw_CachePic(), DrawQ_Pic(), host, client_state_t::last_received_message, host_static_t::realtime, and client_static_t::state.

Referenced by SCR_DrawScreen().

◆ SCR_DrawNetGraph()

static void SCR_DrawNetGraph ( void )
static

Definition at line 364 of file cl_screen.c.

365{
366 int i, separator1, separator2, graphwidth, graphheight, netgraph_x, netgraph_y, textsize, index, netgraphsperrow, graphlimit;
367 float graphscale;
368 netconn_t *c;
369 char vabuf[1024];
370
371 if (cls.state != ca_connected)
372 return;
373 if (!cls.netcon)
374 return;
375 if (!net_graph.integer)
376 return;
377
378 separator1 = 2;
379 separator2 = 4;
380 textsize = 8;
381 graphwidth = 120;
382 graphheight = 70;
383 graphscale = 1.0f / 1500.0f;
384 graphlimit = cl_rate.integer;
385
386 netgraphsperrow = (vid_conwidth.integer + separator2) / (graphwidth * 2 + separator1 + separator2);
387 netgraphsperrow = max(netgraphsperrow, 1);
388
389 index = 0;
390 netgraph_x = (vid_conwidth.integer + separator2) - (1 + (index % netgraphsperrow)) * (graphwidth * 2 + separator1 + separator2);
391 netgraph_y = (vid_conheight.integer - 48 - sbar_info_pos.integer + separator2) - (1 + (index / netgraphsperrow)) * (graphheight + textsize + separator2);
392 c = cls.netcon;
393 SCR_DrawNetGraph_DrawGraph(netgraph_x , netgraph_y, graphwidth, graphheight, graphscale, graphlimit, "incoming", textsize, c->incoming_packetcounter, c->incoming_netgraph);
394 SCR_DrawNetGraph_DrawGraph(netgraph_x + graphwidth + separator1, netgraph_y, graphwidth, graphheight, graphscale, graphlimit, "outgoing", textsize, c->outgoing_packetcounter, c->outgoing_netgraph);
395 index++;
396
397 if (sv.active && net_graph.integer >= 2)
398 {
399 for (i = 0;i < svs.maxclients;i++)
400 {
401 c = svs.clients[i].netconnection;
402 if (!c)
403 continue;
404 netgraph_x = (vid_conwidth.integer + separator2) - (1 + (index % netgraphsperrow)) * (graphwidth * 2 + separator1 + separator2);
405 netgraph_y = (vid_conheight.integer - 48 + separator2) - (1 + (index / netgraphsperrow)) * (graphheight + textsize + separator2);
406 SCR_DrawNetGraph_DrawGraph(netgraph_x , netgraph_y, graphwidth, graphheight, graphscale, graphlimit, va(vabuf, sizeof(vabuf), "%s", svs.clients[i].name), textsize, c->outgoing_packetcounter, c->outgoing_netgraph);
407 SCR_DrawNetGraph_DrawGraph(netgraph_x + graphwidth + separator1, netgraph_y, graphwidth, graphheight, graphscale, graphlimit, "" , textsize, c->incoming_packetcounter, c->incoming_netgraph);
408 index++;
409 }
410 }
411}
cvar_t cl_rate
Definition cl_cmd.c:33
cvar_t sbar_info_pos
Definition sbar.c:108
static void SCR_DrawNetGraph_DrawGraph(int graphx, int graphy, int graphwidth, int graphheight, float graphscale, int graphlimit, const char *label, float textsize, int packetcounter, netgraphitem_t *netgraph)
Definition cl_screen.c:291
GLuint index
Definition glquake.h:629
server_t sv
local server
Definition sv_main.c:223
server_static_t svs
persistant server info
Definition sv_main.c:224
netconn_t * netcon
Definition client.h:630
int incoming_packetcounter
Definition netconn.h:226
int outgoing_packetcounter
Definition netconn.h:228
netgraphitem_t incoming_netgraph[NETGRAPH_PACKETS]
Definition netconn.h:227
netgraphitem_t outgoing_netgraph[NETGRAPH_PACKETS]
Definition netconn.h:229
struct client_s * clients
client slots
Definition server.h:30
int maxclients
number of svs.clients slots (updated by maxplayers command)
Definition server.h:28
qbool active
false if only a net client
Definition server.h:66

References server_t::active, ca_connected, cl_rate, server_static_t::clients, cls, i, netconn_t::incoming_netgraph, netconn_t::incoming_packetcounter, index, cvar_t::integer, max, server_static_t::maxclients, net_graph, client_static_t::netcon, netconn_t::outgoing_netgraph, netconn_t::outgoing_packetcounter, sbar_info_pos, SCR_DrawNetGraph_DrawGraph(), client_static_t::state, sv, svs, va(), vid_conheight, and vid_conwidth.

Referenced by SCR_DrawScreen().

◆ SCR_DrawNetGraph_DrawGraph()

static void SCR_DrawNetGraph_DrawGraph ( int graphx,
int graphy,
int graphwidth,
int graphheight,
float graphscale,
int graphlimit,
const char * label,
float textsize,
int packetcounter,
netgraphitem_t * netgraph )
static

Definition at line 291 of file cl_screen.c.

292{
293 netgraphitem_t *graph;
294 int j, x, y;
295 int totalbytes = 0;
296 char bytesstring[128];
297 float g[NETGRAPH_PACKETS][7];
298 float *a;
299 float *b;
300 DrawQ_Fill(graphx, graphy, graphwidth, graphheight + textsize * 2, 0, 0, 0, 0.5, 0);
301 // draw the bar graph itself
302 memset(g, 0, sizeof(g));
303 for (j = 0;j < NETGRAPH_PACKETS;j++)
304 {
305 graph = netgraph + j;
306 g[j][0] = 1.0f - 0.25f * (host.realtime - graph->time);
307 g[j][1] = 1.0f;
308 g[j][2] = 1.0f;
309 g[j][3] = 1.0f;
310 g[j][4] = 1.0f;
311 g[j][5] = 1.0f;
312 g[j][6] = 1.0f;
314 g[j][1] = 0.00f;
315 else if (graph->unreliablebytes == NETGRAPH_CHOKEDPACKET)
316 g[j][2] = 0.90f;
317 else
318 {
319 if(netgraph[j].time >= netgraph[(j+NETGRAPH_PACKETS-1)%NETGRAPH_PACKETS].time)
320 if(graph->unreliablebytes + graph->reliablebytes + graph->ackbytes >= graphlimit * (netgraph[j].time - netgraph[(j+NETGRAPH_PACKETS-1)%NETGRAPH_PACKETS].time))
321 g[j][2] = 0.98f;
322 g[j][3] = 1.0f - graph->unreliablebytes * graphscale;
323 g[j][4] = g[j][3] - graph->reliablebytes * graphscale;
324 g[j][5] = g[j][4] - graph->ackbytes * graphscale;
325 // count bytes in the last second
326 if (host.realtime - graph->time < 1.0f)
327 totalbytes += graph->unreliablebytes + graph->reliablebytes + graph->ackbytes;
328 }
329 if(graph->cleartime >= 0)
330 g[j][6] = 0.5f + 0.5f * (2.0 / M_PI) * atan((M_PI / 2.0) * (graph->cleartime - graph->time));
331 g[j][1] = bound(0.0f, g[j][1], 1.0f);
332 g[j][2] = bound(0.0f, g[j][2], 1.0f);
333 g[j][3] = bound(0.0f, g[j][3], 1.0f);
334 g[j][4] = bound(0.0f, g[j][4], 1.0f);
335 g[j][5] = bound(0.0f, g[j][5], 1.0f);
336 g[j][6] = bound(0.0f, g[j][6], 1.0f);
337 }
338 // render the lines for the graph
339 for (j = 0;j < NETGRAPH_PACKETS;j++)
340 {
341 a = g[j];
342 b = g[(j+1)%NETGRAPH_PACKETS];
343 if (a[0] < 0.0f || b[0] > 1.0f || b[0] < a[0])
344 continue;
345 DrawQ_Line(1, graphx + graphwidth * a[0], graphy + graphheight * a[2], graphx + graphwidth * b[0], graphy + graphheight * b[2], 1.0f, 1.0f, 1.0f, 1.0f, 0);
346 DrawQ_Line(1, graphx + graphwidth * a[0], graphy + graphheight * a[1], graphx + graphwidth * b[0], graphy + graphheight * b[1], 1.0f, 0.0f, 0.0f, 1.0f, 0);
347 DrawQ_Line(1, graphx + graphwidth * a[0], graphy + graphheight * a[5], graphx + graphwidth * b[0], graphy + graphheight * b[5], 0.0f, 1.0f, 0.0f, 1.0f, 0);
348 DrawQ_Line(1, graphx + graphwidth * a[0], graphy + graphheight * a[4], graphx + graphwidth * b[0], graphy + graphheight * b[4], 1.0f, 1.0f, 1.0f, 1.0f, 0);
349 DrawQ_Line(1, graphx + graphwidth * a[0], graphy + graphheight * a[3], graphx + graphwidth * b[0], graphy + graphheight * b[3], 1.0f, 0.5f, 0.0f, 1.0f, 0);
350 DrawQ_Line(1, graphx + graphwidth * a[0], graphy + graphheight * a[6], graphx + graphwidth * b[0], graphy + graphheight * b[6], 0.0f, 0.0f, 1.0f, 1.0f, 0);
351 }
352 x = graphx;
353 y = graphy + graphheight;
354 dpsnprintf(bytesstring, sizeof(bytesstring), "%i", totalbytes);
355 DrawQ_String(x, y, label , 0, textsize, textsize, 1.0f, 1.0f, 1.0f, 1.0f, 0, NULL, false, FONT_DEFAULT);y += textsize;
356 DrawQ_String(x, y, bytesstring, 0, textsize, textsize, 1.0f, 1.0f, 1.0f, 1.0f, 0, NULL, false, FONT_DEFAULT);y += textsize;
357}
float time
#define FONT_DEFAULT
Definition draw.h:128
void DrawQ_Line(float width, float x1, float y1, float x2, float y2, float r, float g, float b, float alpha, int flags)
Definition gl_draw.c:1402
#define NETGRAPH_PACKETS
Definition netconn.h:222
#define NETGRAPH_CHOKEDPACKET
Definition netconn.h:225
#define NETGRAPH_LOSTPACKET
Definition netconn.h:224
dp_FragColor g
dp_FragColor b
ret a
double time
Definition netconn.h:134
double cleartime
Definition netconn.h:138
int unreliablebytes
Definition netconn.h:136
int reliablebytes
Definition netconn.h:135

References a, netgraphitem_t::ackbytes, b, bound, netgraphitem_t::cleartime, dpsnprintf(), DrawQ_Fill(), DrawQ_Line(), DrawQ_String(), FONT_DEFAULT, g, host, M_PI, NETGRAPH_CHOKEDPACKET, NETGRAPH_LOSTPACKET, NETGRAPH_PACKETS, NULL, host_static_t::realtime, netgraphitem_t::reliablebytes, netgraphitem_t::time, time, netgraphitem_t::unreliablebytes, x, and y.

Referenced by SCR_DrawNetGraph().

◆ SCR_DrawPause()

static void SCR_DrawPause ( void )
static

Definition at line 463 of file cl_screen.c.

464{
465 cachepic_t *pic;
466
467 if (cls.state != ca_connected)
468 return;
469
470 if (!scr_showpause.integer) // turn off for screenshots
471 return;
472
473 if (!cl.paused)
474 return;
475
476 pic = Draw_CachePic ("gfx/pause");
477 DrawQ_Pic ((vid_conwidth.integer - Draw_GetPicWidth(pic))/2, (vid_conheight.integer - Draw_GetPicHeight(pic))/2, pic, 0, 0, 1, 1, 1, 1, 0);
478}
qbool paused
Definition client.h:842

References ca_connected, cl, cls, Draw_CachePic(), Draw_GetPicHeight(), Draw_GetPicWidth(), DrawQ_Pic(), cvar_t::integer, client_state_t::paused, scr_showpause, client_static_t::state, vid_conheight, and vid_conwidth.

Referenced by SCR_DrawScreen().

◆ SCR_DrawQWDownload()

static int SCR_DrawQWDownload ( int offset)
static

Definition at line 541 of file cl_screen.c.

542{
543 // sync with SCR_InfobarHeight
544 int len;
545 float x, y;
547 char temp[256];
548
549 if (!cls.qw_downloadname[0])
550 {
554 return 0;
555 }
557 {
561 }
563 dpsnprintf(temp, sizeof(temp), "Downloading %s %3i%% (%i) at %i bytes/s", cls.qw_downloadname, cls.qw_downloadpercent, cls.qw_downloadmemorycursize, cls.qw_downloadspeedrate);
564 else
565 dpsnprintf(temp, sizeof(temp), "Downloading %s %3i%% (%i/%i) at %i bytes/s", cls.qw_downloadname, cls.qw_downloadpercent, cls.qw_downloadmemorycursize, cls.qw_downloadmemorymaxsize, cls.qw_downloadspeedrate);
566 len = (int)strlen(temp);
567 x = (vid_conwidth.integer - DrawQ_TextWidth(temp, len, size, size, true, FONT_INFOBAR)) / 2;
569 DrawQ_Fill(0, y, vid_conwidth.integer, size, 0, 0, 0, cls.signon == SIGNONS ? 0.5 : 1, 0);
570 DrawQ_String(x, y, temp, len, size, size, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
571 return size;
572}
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
Definition common.h:145
int qw_downloadpercent
Definition client.h:653
int qw_downloadspeedcount
Definition client.h:657
int qw_downloadspeedrate
Definition client.h:658
int qw_downloadmemorymaxsize
Definition client.h:651
int qw_downloadmemorycursize
Definition client.h:650
double qw_downloadspeedtime
Definition client.h:656
protocolversion_t protocol
Definition client.h:617
char qw_downloadname[MAX_QPATH]
Definition client.h:648

References cls, dpsnprintf(), DrawQ_Fill(), DrawQ_String(), DrawQ_TextWidth(), FONT_INFOBAR, host, int(), cvar_t::integer, NULL, offset, client_static_t::protocol, PROTOCOL_QUAKEWORLD, client_static_t::qw_downloadmemorycursize, client_static_t::qw_downloadmemorymaxsize, client_static_t::qw_downloadname, client_static_t::qw_downloadpercent, client_static_t::qw_downloadspeedcount, client_static_t::qw_downloadspeedrate, client_static_t::qw_downloadspeedtime, host_static_t::realtime, scr_infobar_height, client_static_t::signon, SIGNONS, size, strlen(), cvar_t::value, vid_conheight, vid_conwidth, x, and y.

Referenced by SCR_DrawInfobar().

◆ SCR_DrawScreen()

static void SCR_DrawScreen ( void )
static

Definition at line 1576 of file cl_screen.c.

1577{
1578 Draw_Frame();
1579 DrawQ_Start();
1580 R_Mesh_Start();
1582
1583 // Quake uses clockwise winding, so these are swapped
1586
1587 if (!scr_loading && cls.signon == SIGNONS)
1588 {
1589 float size;
1590
1591 size = scr_viewsize.value * (1.0 / 100.0);
1592 size = min(size, 1);
1593
1595 {
1596 r_refdef.view.width = (int)(vid.mode.width * size / 2.5);
1597 r_refdef.view.height = (int)(vid.mode.height * size / 2.5 * (1 - bound(0, r_letterbox.value, 100) / 100));
1598 r_refdef.view.depth = 1;
1599 r_refdef.view.x = (int)((vid.mode.width - r_refdef.view.width * 2.5) * 0.5);
1601 r_refdef.view.z = 0;
1602 if (r_stereo_side)
1603 r_refdef.view.x += (int)(r_refdef.view.width * 1.5);
1604 }
1606 {
1607 r_refdef.view.width = (int)(vid.mode.width * size / 2);
1608 r_refdef.view.height = (int)(vid.mode.height * size * (1 - bound(0, r_letterbox.value, 100) / 100));
1609 r_refdef.view.depth = 1;
1610 r_refdef.view.x = (int)((vid.mode.width - r_refdef.view.width * 2.0)/2);
1612 r_refdef.view.z = 0;
1613 if (r_stereo_side)
1615 }
1616 else if (r_stereo_vertical.integer)
1617 {
1619 r_refdef.view.height = (int)(vid.mode.height * size * (1 - bound(0, r_letterbox.value, 100) / 100) / 2);
1620 r_refdef.view.depth = 1;
1622 r_refdef.view.y = (int)((vid.mode.height - r_refdef.view.height * 2.0)/2);
1623 r_refdef.view.z = 0;
1624 if (r_stereo_side)
1626 }
1627 else
1628 {
1630 r_refdef.view.height = (int)(vid.mode.height * size * (1 - bound(0, r_letterbox.value, 100) / 100));
1631 r_refdef.view.depth = 1;
1634 r_refdef.view.z = 0;
1635 }
1636
1637 // LadyHavoc: viewzoom (zoom in for sniper rifles, etc)
1638 // LadyHavoc: this is designed to produce widescreen fov values
1639 // when the screen is wider than 4/3 width/height aspect, to do
1640 // this it simply assumes the requested fov is the vertical fov
1641 // for a 4x3 display, if the ratio is not 4x3 this makes the fov
1642 // higher/lower according to the ratio
1644 r_refdef.view.frustum_y = tan(scr_fov.value * M_PI / 360.0) * (3.0 / 4.0) * cl.viewzoom;
1646
1649 r_refdef.view.ortho_x = atan(r_refdef.view.frustum_x) * (360.0 / M_PI); // abused as angle by VM_CL_R_SetView
1650 r_refdef.view.ortho_y = atan(r_refdef.view.frustum_y) * (360.0 / M_PI); // abused as angle by VM_CL_R_SetView
1651
1652 r_refdef.view.ismain = true;
1653
1654 // if CSQC is loaded, it is required to provide the CSQC_UpdateView function,
1655 // and won't render a view if it does not call that.
1656 if (CLVM_prog->loaded && !(CLVM_prog->flag & PRVM_CSQC_SIMPLE))
1658 else
1659 {
1660 // Prepare the scene mesh for rendering - this is lightning beams and other effects rendered as normal surfaces
1662
1665 }
1666 }
1667
1668 // Don't apply debugging stuff like r_showsurfaces to the UI
1669 r_refdef.view.showdebug = false;
1670
1672 {
1675 r_refdef.view.depth = 1;
1676 r_refdef.view.x = 0;
1677 r_refdef.view.y = 0;
1678 r_refdef.view.z = 0;
1680 }
1681
1683 {
1684 const char *t;
1685 int framenum;
1687 while (*t)
1688 {
1689 while (*t == ' ')
1690 t++;
1691 if (!*t)
1692 break;
1693 framenum = atof(t);
1694 if (framenum == cls.td_frames)
1695 break;
1696 while (*t && *t != ' ')
1697 t++;
1698 }
1699 if (*t)
1700 {
1701 // we need to take a screenshot of this frame...
1702 char filename[MAX_QPATH];
1703 unsigned char *buffer1;
1704 unsigned char *buffer2;
1705 dpsnprintf(filename, sizeof(filename), "timedemoscreenshots/%s%06d.tga", cls.demoname, cls.td_frames);
1706 buffer1 = (unsigned char *)Mem_Alloc(tempmempool, vid.mode.width * vid.mode.height * 4);
1707 buffer2 = (unsigned char *)Mem_Alloc(tempmempool, vid.mode.width * vid.mode.height * 3);
1708 SCR_ScreenShot(filename, buffer1, buffer2, 0, 0, vid.mode.width, vid.mode.height, false, false, false, false, false, true, false);
1709 Mem_Free(buffer1);
1710 Mem_Free(buffer2);
1711 }
1712 }
1713
1714 // draw 2D stuff
1715
1718 Con_DrawNotify (); // only draw notify in game
1719
1721 host.paused = true;
1722 else
1723 host.paused = false;
1724
1725 if (!scr_loading && cls.signon == SIGNONS)
1726 {
1727 SCR_DrawNet ();
1728 SCR_DrawTurtle ();
1729 SCR_DrawPause ();
1730 if (!r_letterbox.value)
1731 {
1732 Sbar_Draw();
1733 if (CLVM_prog->loaded && CLVM_prog->flag & PRVM_CSQC_SIMPLE)
1734 CL_VM_DrawHud(r_stereo_side ? 0.0 : max(0.0, cl.time - cl.oldtime));
1735 }
1738 }
1740#ifdef CONFIG_MENU
1741 if(!scr_loading)
1742 MR_Draw();
1743#endif
1744 CL_DrawVideo();
1746
1747 if (scr_loading)
1748 {
1749 // connect_status replaces any dummy_status
1750 if ((!loadingscreenstack || loadingscreenstack->msg[0] == '\0') && cl_connect_status[0] != '\0')
1751 {
1752 loadingscreenstack_t connect_status, *og_ptr = loadingscreenstack;
1753
1754 connect_status.absolute_loading_amount_min = 0;
1755 dp_strlcpy(connect_status.msg, cl_connect_status, sizeof(cl_connect_status));
1756 loadingscreenstack = &connect_status;
1758 loadingscreenstack = og_ptr;
1759 }
1760 else
1762 }
1763
1766
1767 if (!scr_loading)
1768 {
1769 SCR_DrawBrand();
1771 }
1773 R_TimeReport("2d");
1774
1777
1778 if(!scr_loading)
1779 Sbar_ShowFPS();
1780
1781 R_Mesh_Finish();
1782 DrawQ_Finish();
1784}
void CL_MeshEntities_Scene_FinalizeRenderEntity(void)
Definition cl_main.c:2605
static void SCR_DrawBrand(void)
Definition cl_screen.c:485
static void SCR_DrawInfobar(void)
Definition cl_screen.c:648
static void SCR_DrawTurtle(void)
Definition cl_screen.c:418
static void SCR_DrawNetGraph(void)
Definition cl_screen.c:364
void SCR_DrawConsole(void)
Definition cl_screen.c:750
static void SCR_CheckDrawCenterString(void)
Definition cl_screen.c:271
static void SCR_DrawLoadingScreen(void)
Definition cl_screen.c:1992
void SHOWLMP_drawall(void)
Definition cl_screen.c:1425
static void SCR_DrawNet(void)
Definition cl_screen.c:446
static void SCR_DrawTouchscreenOverlay(void)
Definition cl_screen.c:1507
char cl_connect_status[MAX_QPATH]
User-friendly connection status for the menu and/or loading screen, colours and not supported.
Definition cl_screen.c:1573
static void SCR_DrawPause(void)
Definition cl_screen.c:463
void CL_DrawVideo(void)
Definition cl_video.c:460
void Con_DrawNotify(void)
Definition console.c:1945
void CL_VM_DrawHud(double frametime)
Definition csprogs.c:541
qbool CL_VM_UpdateView(double frametime)
Definition csprogs.c:484
void Draw_Frame(void)
Definition gl_draw.c:237
void DrawQ_Start(void)
Definition gl_draw.c:789
void DrawQ_Finish(void)
Definition gl_draw.c:1456
void R_RenderTarget_FreeUnused(qbool force)
Definition gl_rmain.c:4523
#define GL_FRONT
Definition glquake.h:132
@ key_message
Definition keys.h:372
void(* MR_Draw)(void)
Definition menu.c:5479
#define CLVM_prog
Definition progsvm.h:767
#define PRVM_CSQC_SIMPLE
Definition progsvm.h:239
void R_Shadow_EditLights_DrawSelectedLightProperties(void)
Definition r_shadow.c:5713
int r_timereport_active
Definition r_stats.c:189
void R_TimeReport(const char *desc)
Definition r_stats.c:193
void R_TimeReport_BeginFrame(void)
Definition r_stats.c:228
void R_TimeReport_EndFrame(void)
Definition r_stats.c:255
void Sbar_ShowFPS(void)
Definition sbar.c:1099
void Sbar_Draw(void)
called every frame by screen
Definition sbar.c:1372
int islocalgame
Definition client.h:746
vec_t viewzoom
Definition client.h:794
char demoname[MAX_QPATH]
Definition client.h:580
qbool paused
global paused state, pauses both client and server
Definition host.h:50
float frustumscale_y
Definition render.h:403
float frustumscale_x
Definition render.h:403
qbool showdebug
Definition render.h:314
int cullface_back
Definition render.h:318
int cullface_front
Definition render.h:317

References loadingscreenstack_t::absolute_loading_amount_min, bound, cl, cl_connect_status, CL_DrawVideo(), CL_MeshEntities_Scene_FinalizeRenderEntity(), CL_UpdateEntityShading(), CL_VM_DrawHud(), CL_VM_UpdateView(), cls, CLVM_prog, Con_DrawNotify(), r_refdef_view_t::cullface_back, r_refdef_view_t::cullface_front, client_static_t::demoname, r_refdef_view_t::depth, dp_strlcpy, dpsnprintf(), Draw_Frame(), DrawQ_Finish(), DrawQ_Start(), float, r_refdef_view_t::frustum_x, r_refdef_view_t::frustum_y, r_refdef_t::frustumscale_x, r_refdef_t::frustumscale_y, GL_BACK, GL_FRONT, r_refdef_view_t::height, viddef_mode_t::height, host, int(), cvar_t::integer, client_state_t::islocalgame, r_refdef_view_t::ismain, key_consoleactive, KEY_CONSOLEACTIVE_FORCED, key_dest, key_game, key_message, loadingscreenstack, M_PI, max, MAX_QPATH, Mem_Alloc, Mem_Free, min, viddef_t::mode, MR_Draw, loadingscreenstack_t::msg, NULL, client_state_t::oldtime, r_refdef_view_t::ortho_x, r_refdef_view_t::ortho_y, host_static_t::paused, PRVM_CSQC_SIMPLE, r_letterbox, R_Mesh_Finish(), R_Mesh_Start(), r_refdef, R_RenderTarget_FreeUnused(), R_RenderView(), R_Shadow_EditLights_DrawSelectedLightProperties(), r_stereo_horizontal, r_stereo_side, r_stereo_sidebyside, r_stereo_vertical, R_TimeReport(), r_timereport_active, R_TimeReport_BeginFrame(), R_TimeReport_EndFrame(), R_UpdateVariables(), Sbar_Draw(), Sbar_ShowFPS(), SCR_CheckDrawCenterString(), scr_con_current, SCR_DrawBrand(), SCR_DrawConsole(), SCR_DrawInfobar(), SCR_DrawLoadingScreen(), SCR_DrawNet(), SCR_DrawNetGraph(), SCR_DrawPause(), SCR_DrawTouchscreenOverlay(), SCR_DrawTurtle(), scr_fov, scr_loading, SCR_ScreenShot(), scr_viewsize, r_refdef_view_t::showdebug, SHOWLMP_drawall(), client_static_t::signon, SIGNONS, size, cvar_t::string, client_static_t::td_frames, tempmempool, client_state_t::time, client_static_t::timedemo, timedemo_screenshotframelist, r_refdef_view_t::useperspective, cvar_t::value, vid, vid_pixelheight, r_refdef_t::view, client_state_t::viewzoom, r_refdef_view_t::width, viddef_mode_t::width, r_refdef_view_t::x, r_refdef_view_t::y, and r_refdef_view_t::z.

Referenced by CL_UpdateScreen().

◆ SCR_DrawTouchscreenOverlay()

static void SCR_DrawTouchscreenOverlay ( void )
static

Definition at line 1507 of file cl_screen.c.

1508{
1509 int i;
1511 cachepic_t *pic;
1512 for (i = 0, a = scr_touchscreenareas;i < scr_numtouchscreenareas;i++, a++)
1513 {
1514 if (vid_touchscreen_outlinealpha.value > 0 && a->rect[0] >= 0 && a->rect[1] >= 0 && a->rect[2] >= 4 && a->rect[3] >= 4)
1515 {
1516 DrawQ_Fill(a->rect[0] + 2, a->rect[1] , a->rect[2] - 4, 1 , 1, 1, 1, vid_touchscreen_outlinealpha.value * (0.5f + 0.5f * a->active), 0);
1517 DrawQ_Fill(a->rect[0] + 1, a->rect[1] + 1, a->rect[2] - 2, 1 , 1, 1, 1, vid_touchscreen_outlinealpha.value * (0.5f + 0.5f * a->active), 0);
1518 DrawQ_Fill(a->rect[0] , a->rect[1] + 2, 2 , a->rect[3] - 2, 1, 1, 1, vid_touchscreen_outlinealpha.value * (0.5f + 0.5f * a->active), 0);
1519 DrawQ_Fill(a->rect[0] + a->rect[2] - 2, a->rect[1] + 2, 2 , a->rect[3] - 2, 1, 1, 1, vid_touchscreen_outlinealpha.value * (0.5f + 0.5f * a->active), 0);
1520 DrawQ_Fill(a->rect[0] + 1, a->rect[1] + a->rect[3] - 2, a->rect[2] - 2, 1 , 1, 1, 1, vid_touchscreen_outlinealpha.value * (0.5f + 0.5f * a->active), 0);
1521 DrawQ_Fill(a->rect[0] + 2, a->rect[1] + a->rect[3] - 1, a->rect[2] - 4, 1 , 1, 1, 1, vid_touchscreen_outlinealpha.value * (0.5f + 0.5f * a->active), 0);
1522 }
1524 if (Draw_IsPicLoaded(pic))
1525 DrawQ_Pic(a->rect[0], a->rect[1], pic, a->rect[2], a->rect[3], 1, 1, 1, vid_touchscreen_overlayalpha.value * (0.5f + 0.5f * a->active), 0);
1526 if (a->text && a->text[0])
1527 {
1528 int textwidth = DrawQ_TextWidth(a->text, 0, a->textheight, a->textheight, false, FONT_CHAT);
1529 DrawQ_String(a->rect[0] + (a->rect[2] - textwidth) * 0.5f, a->rect[1] + (a->rect[3] - a->textheight) * 0.5f, a->text, 0, a->textheight, a->textheight, 1.0f, 1.0f, 1.0f, vid_touchscreen_overlayalpha.value, 0, NULL, false, FONT_CHAT);
1530 }
1531 }
1532}
int scr_numtouchscreenareas
Definition cl_screen.c:1504
scr_touchscreenarea_t scr_touchscreenareas[128]
Definition cl_screen.c:1505
@ CACHEPICFLAG_FAILONMISSING
Definition draw.h:44
#define FONT_CHAT
Definition draw.h:132
qbool Draw_IsPicLoaded(cachepic_t *pic)
Definition gl_draw.c:211

References a, CACHEPICFLAG_FAILONMISSING, Draw_CachePic_Flags(), Draw_IsPicLoaded(), DrawQ_Fill(), DrawQ_Pic(), DrawQ_String(), DrawQ_TextWidth(), FONT_CHAT, i, NULL, scr_numtouchscreenareas, scr_touchscreenareas, cvar_t::value, vid_touchscreen_outlinealpha, and vid_touchscreen_overlayalpha.

Referenced by SCR_DrawScreen().

◆ SCR_DrawTurtle()

static void SCR_DrawTurtle ( void )
static

Definition at line 418 of file cl_screen.c.

419{
420 static int count;
421
422 if (cls.state != ca_connected)
423 return;
424
426 return;
427
428 if (cl.realframetime < 0.1)
429 {
430 count = 0;
431 return;
432 }
433
434 count++;
435 if (count < 3)
436 return;
437
438 DrawQ_Pic (0, 0, Draw_CachePic ("gfx/turtle"), 0, 0, 1, 1, 1, 1, 0);
439}
GLenum GLenum GLsizei count
Definition glquake.h:656
double realframetime
Definition client.h:871

References ca_connected, cl, cls, count, Draw_CachePic(), DrawQ_Pic(), cvar_t::integer, client_state_t::realframetime, scr_showturtle, and client_static_t::state.

Referenced by SCR_DrawScreen().

◆ SCR_EndLoadingPlaque()

void SCR_EndLoadingPlaque ( void )

Definition at line 1865 of file cl_screen.c.

1866{
1867 scr_loading = false;
1869}
static void SCR_ClearLoadingScreenTexture(void)
Definition cl_screen.c:1786

References SCR_ClearLoadingScreenTexture(), and scr_loading.

Referenced by CL_UpdateScreen().

◆ SCR_InfoBar_f()

static void SCR_InfoBar_f ( cmd_state_t * cmd)
static

Definition at line 692 of file cl_screen.c.

693{
694 if(Cmd_Argc(cmd) == 3)
695 {
696 scr_infobartime_off = atof(Cmd_Argv(cmd, 1));
698 }
699 else
700 {
701 Con_Printf("usage:\ninfobar expiretime \"string\"\n");
702 }
703}

References cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), dp_strlcpy, scr_infobarstring, and scr_infobartime_off.

Referenced by CL_Screen_Init().

◆ SCR_InfobarHeight()

static int SCR_InfobarHeight ( void )
static

Definition at line 661 of file cl_screen.c.

662{
663 int offset = 0;
664 Curl_downloadinfo_t *downinfo;
665 const char *addinfo;
666 int nDownloads;
667 char addinfobuf[128];
668
669 if (cl.time > cl.oldtime)
671 if(scr_infobartime_off > 0)
672 offset += 1;
673 if(cls.qw_downloadname[0])
674 offset += 1;
675
676 downinfo = Curl_GetDownloadInfo(&nDownloads, &addinfo, addinfobuf, sizeof(addinfobuf));
677 if(downinfo)
678 {
679 offset += (nDownloads + (addinfo ? 1 : 0));
680 Z_Free(downinfo);
681 }
683
684 return offset;
685}

References cl, cls, Curl_GetDownloadInfo(), offset, client_state_t::oldtime, client_static_t::qw_downloadname, scr_infobar_height, scr_infobartime_off, client_state_t::time, cvar_t::value, and Z_Free.

Referenced by SCR_DrawConsole().

◆ SCR_PopLoadingScreen()

void SCR_PopLoadingScreen ( qbool redraw)

Definition at line 1899 of file cl_screen.c.

1900{
1902
1903 if(!s)
1904 {
1905 Con_DPrintf("Popping a loading screen item from an empty stack!\n");
1906 return;
1907 }
1908
1910 if(s->prev)
1911 s->prev->relative_completion = (s->absolute_loading_amount_min + s->absolute_loading_amount_len - s->prev->absolute_loading_amount_min) / s->prev->absolute_loading_amount_len;
1912 Z_Free(s);
1913
1914 if (scr_loading && redraw)
1916}
float absolute_loading_amount_len
Definition cl_screen.c:1562

References loadingscreenstack_t::absolute_loading_amount_len, loadingscreenstack_t::absolute_loading_amount_min, CL_UpdateScreen(), Con_DPrintf(), loadingscreenstack, loadingscreenstack_t::prev, scr_loading, and Z_Free.

Referenced by CL_BeginDownloads(), Mod_LoadModel(), Mod_Reload(), mod_start(), S_LoadSound(), and SCR_ClearLoadingScreen().

◆ SCR_PushLoadingScreen()

void SCR_PushLoadingScreen ( const char * msg,
float len_in_parent )

Definition at line 1873 of file cl_screen.c.

1874{
1878
1879 dp_strlcpy(s->msg, msg, sizeof(s->msg));
1880 s->relative_completion = 0;
1881
1882 if(s->prev)
1883 {
1884 s->absolute_loading_amount_min = s->prev->absolute_loading_amount_min + s->prev->absolute_loading_amount_len * s->prev->relative_completion;
1885 s->absolute_loading_amount_len = s->prev->absolute_loading_amount_len * len_in_parent;
1886 if(s->absolute_loading_amount_len > s->prev->absolute_loading_amount_min + s->prev->absolute_loading_amount_len - s->absolute_loading_amount_min)
1887 s->absolute_loading_amount_len = s->prev->absolute_loading_amount_min + s->prev->absolute_loading_amount_len - s->absolute_loading_amount_min;
1888 }
1889 else
1890 {
1893 }
1894
1895 if (scr_loading)
1897}
#define Z_Malloc(size)
Definition zone.h:161

References loadingscreenstack_t::absolute_loading_amount_len, loadingscreenstack_t::absolute_loading_amount_min, CL_UpdateScreen(), dp_strlcpy, loadingscreenstack, loadingscreenstack_t::msg, loadingscreenstack_t::prev, loadingscreenstack_t::relative_completion, scr_loading, and Z_Malloc.

Referenced by CL_BeginDownloads(), Mod_LoadModel(), Mod_Reload(), mod_start(), and S_LoadSound().

◆ SCR_ScreenShot()

qbool SCR_ScreenShot ( char * filename,
unsigned char * buffer1,
unsigned char * buffer2,
int x,
int y,
int width,
int height,
qbool flipx,
qbool flipy,
qbool flipdiagonal,
qbool jpeg,
qbool png,
qbool gammacorrect,
qbool keep_alpha )

Definition at line 1443 of file cl_screen.c.

1444{
1445 int indices[4] = {0,1,2,3}; // BGRA
1446 qbool ret;
1447
1448 GL_ReadPixelsBGRA(x, y, width, height, buffer1);
1449
1450 if(gammacorrect && (scr_screenshot_gammaboost.value != 1))
1451 {
1452 int i;
1453 double igamma = 1.0 / scr_screenshot_gammaboost.value;
1454 unsigned short vidramp[256 * 3];
1455 // identity gamma table
1456 BuildGammaTable16(1.0f, 1.0f, 1.0f, 0.0f, 1.0f, vidramp, 256);
1457 BuildGammaTable16(1.0f, 1.0f, 1.0f, 0.0f, 1.0f, vidramp + 256, 256);
1458 BuildGammaTable16(1.0f, 1.0f, 1.0f, 0.0f, 1.0f, vidramp + 256*2, 256);
1460 {
1461 for (i = 0;i < 256 * 3;i++)
1462 vidramp[i] = (unsigned short) (0.5 + pow(vidramp[i] * (1.0 / 65535.0), igamma) * 65535.0);
1463 }
1464 for (i = 0;i < width*height*4;i += 4)
1465 {
1466 buffer1[i] = (unsigned char) (vidramp[buffer1[i] + 512] * 255.0 / 65535.0 + 0.5); // B
1467 buffer1[i+1] = (unsigned char) (vidramp[buffer1[i+1] + 256] * 255.0 / 65535.0 + 0.5); // G
1468 buffer1[i+2] = (unsigned char) (vidramp[buffer1[i+2]] * 255.0 / 65535.0 + 0.5); // R
1469 // A
1470 }
1471 }
1472
1473 if(keep_alpha && !jpeg)
1474 {
1475 if(!png)
1476 flipy = !flipy; // TGA: not preflipped
1477 Image_CopyMux (buffer2, buffer1, width, height, flipx, flipy, flipdiagonal, 4, 4, indices);
1478 if (png)
1479 ret = PNG_SaveImage_preflipped (filename, width, height, true, buffer2);
1480 else
1481 ret = Image_WriteTGABGRA(filename, width, height, buffer2);
1482 }
1483 else
1484 {
1485 if(jpeg)
1486 {
1487 indices[0] = 2;
1488 indices[2] = 0; // RGB
1489 }
1490 Image_CopyMux (buffer2, buffer1, width, height, flipx, flipy, flipdiagonal, 3, 4, indices);
1491 if (jpeg)
1492 ret = JPEG_SaveImage_preflipped (filename, width, height, buffer2);
1493 else if (png)
1494 ret = PNG_SaveImage_preflipped (filename, width, height, false, buffer2);
1495 else
1496 ret = Image_WriteTGABGR_preflipped (filename, width, height, buffer2);
1497 }
1498
1499 return ret;
1500}
void GL_ReadPixelsBGRA(int x, int y, int width, int height, unsigned char *outpixels)
GLenum GLsizei GLsizei height
Definition glquake.h:622
GLsizei GLenum const GLvoid * indices
Definition glquake.h:674
qbool Image_WriteTGABGR_preflipped(const char *filename, int width, int height, const unsigned char *data)
Definition image.c:1412
void Image_CopyMux(unsigned char *outpixels, const unsigned char *inpixels, int inputwidth, int inputheight, qbool inputflipx, qbool inputflipy, qbool inputflipdiagonal, int numoutputcomponents, int numinputcomponents, int *outputinputcomponentindices)
Definition image.c:24
qbool Image_WriteTGABGRA(const char *filename, int width, int height, const unsigned char *data)
Definition image.c:1436
qbool PNG_SaveImage_preflipped(const char *filename, int width, int height, qbool has_alpha, unsigned char *data)
Definition image_png.c:477
qbool JPEG_SaveImage_preflipped(const char *filename, int width, int height, unsigned char *data)
Definition jpeg.c:818
float pow(float a, float b)
void BuildGammaTable16(float prescale, float gamma, float scale, float base, float contrastboost, unsigned short *out, int rampsize)
Definition palette.c:240
bool qbool
Definition qtypes.h:9
return ret

References BuildGammaTable16(), GL_ReadPixelsBGRA(), height, i, Image_CopyMux(), Image_WriteTGABGR_preflipped(), Image_WriteTGABGRA(), indices, JPEG_SaveImage_preflipped(), PNG_SaveImage_preflipped(), pow(), ret, scr_screenshot_gammaboost, cvar_t::value, width, x, and y.

Referenced by R_Envmap_f(), SCR_DrawScreen(), and SCR_ScreenShot_f().

◆ SCR_ScreenShot_f()

void SCR_ScreenShot_f ( cmd_state_t * cmd)
static

Definition at line 919 of file cl_screen.c.

920{
921 static int shotnumber;
922 static char old_prefix_name[MAX_QPATH];
923 char prefix_name[MAX_QPATH];
924 char filename[MAX_QPATH];
925 unsigned char *buffer1;
926 unsigned char *buffer2;
927 qbool jpeg = (scr_screenshot_jpeg.integer != 0);
928 qbool png = (scr_screenshot_png.integer != 0) && !jpeg;
929 char vabuf[1024];
930
931 if (Cmd_Argc(cmd) == 2)
932 {
933 const char *ext;
934 dp_strlcpy(filename, Cmd_Argv(cmd, 1), sizeof(filename));
935 ext = FS_FileExtension(filename);
936 if (!strcasecmp(ext, "jpg"))
937 {
938 jpeg = true;
939 png = false;
940 }
941 else if (!strcasecmp(ext, "tga"))
942 {
943 jpeg = false;
944 png = false;
945 }
946 else if (!strcasecmp(ext, "png"))
947 {
948 jpeg = false;
949 png = true;
950 }
951 else
952 {
953 Con_Printf("screenshot: supplied filename must end in .jpg or .tga or .png\n");
954 return;
955 }
956 }
958 {
959 int shotnumber100;
960
961 // TODO maybe make capturevideo and screenshot use similar name patterns?
962 Sys_TimeString(vabuf, sizeof(vabuf), "%Y%m%d%H%M%S");
964 dpsnprintf(prefix_name, sizeof(prefix_name), "%s/%s%s", cl.worldbasename, scr_screenshot_name.string, vabuf);
965 else
966 dpsnprintf(prefix_name, sizeof(prefix_name), "%s%s", scr_screenshot_name.string, vabuf);
967
968 // find a file name to save it to
969 for (shotnumber100 = 0;shotnumber100 < 100;shotnumber100++)
970 if (!FS_SysFileExists(va(vabuf, sizeof(vabuf), "%s/screenshots/%s-%02d.tga", fs_gamedir, prefix_name, shotnumber100))
971 && !FS_SysFileExists(va(vabuf, sizeof(vabuf), "%s/screenshots/%s-%02d.jpg", fs_gamedir, prefix_name, shotnumber100))
972 && !FS_SysFileExists(va(vabuf, sizeof(vabuf), "%s/screenshots/%s-%02d.png", fs_gamedir, prefix_name, shotnumber100)))
973 break;
974 if (shotnumber100 >= 100)
975 {
976 Con_Print("Couldn't create the image file - already 100 shots taken this second!\n");
977 return;
978 }
979
980 dpsnprintf(filename, sizeof(filename), "screenshots/%s-%02d.%s", prefix_name, shotnumber100, jpeg ? "jpg" : png ? "png" : "tga");
981 }
982 else
983 {
984 // TODO maybe make capturevideo and screenshot use similar name patterns?
985 Sys_TimeString(vabuf, sizeof(vabuf), scr_screenshot_name.string);
987 dpsnprintf(prefix_name, sizeof(prefix_name), "%s/%s", cl.worldbasename, vabuf);
988 else
989 dpsnprintf(prefix_name, sizeof(prefix_name), "%s", vabuf);
990
991 // if prefix changed, gamedir or map changed, reset the shotnumber so
992 // we scan again
993 // FIXME: should probably do this whenever FS_Rescan or something like that occurs?
994 if (strcmp(old_prefix_name, prefix_name))
995 {
996 dpsnprintf(old_prefix_name, sizeof(old_prefix_name), "%s", prefix_name );
997 shotnumber = 0;
998 }
999
1000 // find a file name to save it to
1001 for (;shotnumber < 1000000;shotnumber++)
1002 if (!FS_SysFileExists(va(vabuf, sizeof(vabuf), "%s/screenshots/%s%06d.tga", fs_gamedir, prefix_name, shotnumber))
1003 && !FS_SysFileExists(va(vabuf, sizeof(vabuf), "%s/screenshots/%s%06d.jpg", fs_gamedir, prefix_name, shotnumber))
1004 && !FS_SysFileExists(va(vabuf, sizeof(vabuf), "%s/screenshots/%s%06d.png", fs_gamedir, prefix_name, shotnumber)))
1005 break;
1006 if (shotnumber >= 1000000)
1007 {
1008 Con_Print("Couldn't create the image file - you already have 1000000 screenshots!\n");
1009 return;
1010 }
1011
1012 dpsnprintf(filename, sizeof(filename), "screenshots/%s%06d.%s", prefix_name, shotnumber, jpeg ? "jpg" : png ? "png" : "tga");
1013
1014 shotnumber++;
1015 }
1016
1017 buffer1 = (unsigned char *)Mem_Alloc(tempmempool, vid.mode.width * vid.mode.height * 4);
1018 buffer2 = (unsigned char *)Mem_Alloc(tempmempool, vid.mode.width * vid.mode.height * (scr_screenshot_alpha.integer ? 4 : 3));
1019
1020 if (SCR_ScreenShot (filename, buffer1, buffer2, 0, 0, vid.mode.width, vid.mode.height, false, false, false, jpeg, png, true, scr_screenshot_alpha.integer != 0))
1021 Con_Printf("Wrote %s\n", filename);
1022 else
1023 {
1024 Con_Printf(CON_ERROR "Unable to write %s\n", filename);
1025 if(jpeg || png)
1026 {
1027 if(SCR_ScreenShot (filename, buffer1, buffer2, 0, 0, vid.mode.width, vid.mode.height, false, false, false, false, false, true, scr_screenshot_alpha.integer != 0))
1028 {
1029 dp_strlcpy(filename + strlen(filename) - 3, "tga", 4);
1030 Con_Printf("Wrote %s\n", filename);
1031 }
1032 }
1033 }
1034
1035 Mem_Free (buffer1);
1036 Mem_Free (buffer2);
1037}
struct cvar_s scr_screenshot_name
Definition fs.c:455
#define CON_ERROR
Definition console.h:102
const char * FS_FileExtension(const char *in)
Definition fs.c:1403
char fs_gamedir[MAX_OSPATH]
Definition fs.c:443
qbool FS_SysFileExists(const char *path)
Look for a file in the filesystem only.
Definition fs.c:3744
char worldbasename[MAX_QPATH]
Definition client.h:898
size_t Sys_TimeString(char buf[], size_t bufsize, const char *timeformat)
Definition sys_shared.c:45

References cl, cmd(), Cmd_Argc(), Cmd_Argv(), CON_ERROR, Con_Print(), Con_Printf(), dp_strlcpy, dpsnprintf(), FS_FileExtension(), fs_gamedir, FS_SysFileExists(), viddef_mode_t::height, cvar_t::integer, MAX_QPATH, Mem_Alloc, Mem_Free, viddef_t::mode, SCR_ScreenShot(), scr_screenshot_alpha, scr_screenshot_jpeg, scr_screenshot_name, scr_screenshot_name_in_mapdir, scr_screenshot_png, scr_screenshot_timestamp, strlen(), Sys_TimeString(), tempmempool, va(), vid, viddef_mode_t::width, and client_state_t::worldbasename.

Referenced by CL_Screen_Init().

◆ SCR_SetLoadingScreenTexture()

static void SCR_SetLoadingScreenTexture ( void )
static

Definition at line 1794 of file cl_screen.c.

1795{
1796 int w, h;
1797 float loadingscreentexture_w;
1798 float loadingscreentexture_h;
1799
1801
1802 w = vid.mode.width; h = vid.mode.height;
1803 loadingscreentexture_w = loadingscreentexture_h = 1;
1804
1807
1813 loadingscreentexture_texcoord2f[0] = 0;loadingscreentexture_texcoord2f[1] = loadingscreentexture_h;
1814 loadingscreentexture_texcoord2f[2] = loadingscreentexture_w;loadingscreentexture_texcoord2f[3] = loadingscreentexture_h;
1815 loadingscreentexture_texcoord2f[4] = loadingscreentexture_w;loadingscreentexture_texcoord2f[5] = 0;
1817}
rtexturepool_t * r_main_texturepool
Definition gl_rmain.c:43
void R_Mesh_CopyToTexture(rtexture_t *tex, int tx, int ty, int sx, int sy, int width, int height)
rtexture_t * R_LoadTexture2D(rtexturepool_t *rtexturepool, const char *identifier, int width, int height, const unsigned char *data, textype_t textype, int flags, int miplevel, const unsigned int *palette)
#define TEXF_FORCENEAREST
Definition r_textures.h:17
#define TEXF_CLAMP
Definition r_textures.h:15
#define TEXF_RENDERTARGET
Definition r_textures.h:37

References viddef_mode_t::height, cvar_t::integer, loadingscreentexture, loadingscreentexture_texcoord2f, loadingscreentexture_vertex3f, viddef_t::mode, NULL, R_LoadTexture2D(), r_main_texturepool, R_Mesh_CopyToTexture(), SCR_ClearLoadingScreenTexture(), TEXF_CLAMP, TEXF_FORCENEAREST, TEXF_RENDERTARGET, TEXTYPE_COLORBUFFER, vid, vid_conheight, vid_conwidth, w, and viddef_mode_t::width.

Referenced by SCR_BeginLoadingPlaque().

◆ SCR_SetUpToDrawConsole()

static void SCR_SetUpToDrawConsole ( void )
static

Definition at line 711 of file cl_screen.c.

712{
713#ifdef CONFIG_MENU
714 static int framecounter = 0;
715#endif
716
718
719#ifdef CONFIG_MENU
720 if (scr_menuforcewhiledisconnected.integer && key_dest == key_game && cls.state == ca_disconnected)
721 {
722 if (framecounter >= 2)
723 MR_ToggleMenu(1);
724 else
725 framecounter++;
726 }
727 else
728 framecounter = 0;
729#endif
730
735 else
736 key_consoleactive &= ~KEY_CONSOLEACTIVE_FORCED;
737
738 // decide on the height of the console
741 else
742 scr_con_current = 0; // none visible
743}
@ ca_disconnected
Definition client.h:531
void Con_CheckResize(void)
If the line width has changed, reformat the buffer.
Definition console.c:763
#define KEY_CONSOLEACTIVE_USER
Definition keys.h:380
void(* MR_ToggleMenu)(int mode)
Definition menu.c:5480

References server_t::active, ca_disconnected, cls, Con_CheckResize(), cvar_t::integer, key_consoleactive, KEY_CONSOLEACTIVE_FORCED, KEY_CONSOLEACTIVE_USER, key_dest, key_game, MR_ToggleMenu, scr_con_current, scr_conforcewhiledisconnected, scr_conheight, client_static_t::signon, SIGNONS, client_static_t::state, sv, cvar_t::value, and vid_conheight.

Referenced by CL_UpdateScreen().

◆ SCR_SizeDown_f()

static void SCR_SizeDown_f ( cmd_state_t * cmd)
static

Definition at line 789 of file cl_screen.c.

References Cvar_SetValueQuick(), scr_viewsize, and cvar_t::value.

Referenced by CL_Screen_Init().

◆ SCR_SizeUp_f()

static void SCR_SizeUp_f ( cmd_state_t * cmd)
static

Definition at line 776 of file cl_screen.c.

References Cvar_SetValueQuick(), scr_viewsize, and cvar_t::value.

Referenced by CL_Screen_Init().

◆ SCR_UpdateVars()

static void SCR_UpdateVars ( void )
static

Definition at line 2082 of file cl_screen.c.

2083{
2084 float conwidth = bound(160, vid_conwidth.value, 32768);
2085 float conheight = bound(90, vid_conheight.value, 24576);
2086 float conscale = vid.mode.height / vid_conheight.value;
2088 conwidth = floor(conheight * vid.mode.width / (vid.mode.height * vid_pixelheight.value));
2089 if (vid_conwidth.value != conwidth)
2090 Cvar_SetValueQuick(&vid_conwidth, conwidth);
2091 if (vid_conheight.value != conheight)
2092 Cvar_SetValueQuick(&vid_conheight, conheight);
2093 if (scr_sbarscale.value != conscale)
2095
2096 // bound viewsize
2097 if (scr_viewsize.value < 30)
2099 if (scr_viewsize.value > 120)
2101
2102 // bound field of view
2103 if (scr_fov.value < 1)
2105 if (scr_fov.value > 170)
2107
2108 // intermission is always full screen
2109 if (cl.intermission)
2110 sb_lines = 0;
2111 else
2112 {
2113 if (scr_viewsize.value >= 120)
2114 sb_lines = 0; // no status bar at all
2115 else if (scr_viewsize.value >= 110)
2116 sb_lines = 24; // no inventory
2117 else
2118 sb_lines = 24 + 16 + 8;
2119 }
2120}
float floor(float f)
int sb_lines
scan lines to draw
Definition sbar.c:58

References bound, cl, Cvar_SetValueQuick(), floor(), viddef_mode_t::height, cvar_t::integer, client_state_t::intermission, viddef_t::mode, sb_lines, scr_fov, scr_sbarscale, scr_viewsize, cvar_t::value, vid, vid_conheight, vid_conwidth, vid_conwidthauto, vid_pixelheight, and viddef_mode_t::width.

Referenced by CL_UpdateScreen().

◆ SHOWLMP_decodehide()

void SHOWLMP_decodehide ( void )

Definition at line 1368 of file cl_screen.c.

1369{
1370 int i;
1371 char *lmplabel;
1373 for (i = 0;i < cl.num_showlmps;i++)
1374 if (cl.showlmps[i].isactive && strcmp(cl.showlmps[i].label, lmplabel) == 0)
1375 {
1376 cl.showlmps[i].isactive = false;
1377 return;
1378 }
1379}
char * MSG_ReadString(sizebuf_t *sb, char *string, size_t maxstring)
Definition com_msg.c:341
sizebuf_t cl_message
Definition netconn.c:71
char cl_readstring[MAX_INPUTLINE]
Definition netconn.c:75
showlmp_t * showlmps
Definition client.h:1001
qbool isactive
Definition client.h:731
char label[32]
Definition client.h:734

References cl, cl_message, cl_readstring, i, showlmp_t::isactive, showlmp_t::label, MSG_ReadString(), client_state_t::num_showlmps, and client_state_t::showlmps.

Referenced by CL_ParseServerMessage().

◆ SHOWLMP_decodeshow()

void SHOWLMP_decodeshow ( void )

Definition at line 1381 of file cl_screen.c.

1382{
1383 int k;
1384 char lmplabel[256], picname[256];
1385 float x, y;
1386 dp_strlcpy (lmplabel,MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (lmplabel));
1387 dp_strlcpy (picname, MSG_ReadString(&cl_message, cl_readstring, sizeof(cl_readstring)), sizeof (picname));
1388 if (gamemode == GAME_NEHAHRA) // LadyHavoc: nasty old legacy junk
1389 {
1392 }
1393 else
1394 {
1397 }
1399 {
1400 showlmp_t *oldshowlmps = cl.showlmps;
1401 cl.max_showlmps += 16;
1403 if (oldshowlmps)
1404 {
1405 if (cl.num_showlmps)
1406 memcpy(cl.showlmps, oldshowlmps, cl.num_showlmps * sizeof(showlmp_t));
1407 Mem_Free(oldshowlmps);
1408 }
1409 }
1410 for (k = 0;k < cl.max_showlmps;k++)
1411 if (cl.showlmps[k].isactive && !strcmp(cl.showlmps[k].label, lmplabel))
1412 break;
1413 if (k == cl.max_showlmps)
1414 for (k = 0;k < cl.max_showlmps;k++)
1415 if (!cl.showlmps[k].isactive)
1416 break;
1417 cl.showlmps[k].isactive = true;
1418 dp_strlcpy (cl.showlmps[k].label, lmplabel, sizeof (cl.showlmps[k].label));
1419 dp_strlcpy (cl.showlmps[k].pic, picname, sizeof (cl.showlmps[k].pic));
1420 cl.showlmps[k].x = x;
1421 cl.showlmps[k].y = y;
1422 cl.num_showlmps = max(cl.num_showlmps, k + 1);
1423}
@ GAME_NEHAHRA
Definition com_game.h:32
#define MSG_ReadShort
Definition common.h:191
#define MSG_ReadByte(sb)
Definition common.h:188
int max_showlmps
Definition client.h:989
mempool_t * levelmempool
Definition client.h:571
float x
Definition client.h:732
float y
Definition client.h:733
char pic[128]
Definition client.h:735

References cl, cl_message, cl_readstring, cls, dp_strlcpy, GAME_NEHAHRA, gamemode, showlmp_t::isactive, showlmp_t::label, client_static_t::levelmempool, max, client_state_t::max_showlmps, Mem_Alloc, Mem_Free, MSG_ReadByte, MSG_ReadShort, MSG_ReadString(), client_state_t::num_showlmps, showlmp_t::pic, client_state_t::showlmps, showlmp_t::x, x, showlmp_t::y, and y.

Referenced by CL_ParseServerMessage().

◆ SHOWLMP_drawall()

Variable Documentation

◆ cl_connect_status

◆ cl_demo_mousegrab

cvar_t cl_demo_mousegrab = {CF_CLIENT, "cl_demo_mousegrab", "0", "Allows reading the mouse input while playing demos. Useful for camera mods developed in csqc. (0: never, 1: always)"}

Definition at line 92 of file cl_screen.c.

92{CF_CLIENT, "cl_demo_mousegrab", "0", "Allows reading the mouse input while playing demos. Useful for camera mods developed in csqc. (0: never, 1: always)"};

Referenced by CL_Screen_Init(), and Sys_SDL_HandleEvents().

◆ cl_minfps

cvar_t cl_minfps
extern

Definition at line 100 of file cl_main.c.

100{CF_CLIENT | CF_ARCHIVE, "cl_minfps", "40", "minimum fps target - while the rendering performance is below this, it will drift toward lower quality"};
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
Definition cmd.h:53

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_fade

cvar_t cl_minfps_fade
extern

Definition at line 101 of file cl_main.c.

101{CF_CLIENT | CF_ARCHIVE, "cl_minfps_fade", "1", "how fast the quality adapts to varying framerate"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_force

cvar_t cl_minfps_force
extern

Definition at line 107 of file cl_main.c.

107{CF_CLIENT, "cl_minfps_force", "0", "also apply quality reductions in timedemo/capturevideo"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_qualityhysteresis

cvar_t cl_minfps_qualityhysteresis
extern

Definition at line 105 of file cl_main.c.

105{CF_CLIENT | CF_ARCHIVE, "cl_minfps_qualityhysteresis", "0.05", "reduce all quality increments by this to reduce flickering"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_qualitymax

cvar_t cl_minfps_qualitymax
extern

Definition at line 102 of file cl_main.c.

102{CF_CLIENT | CF_ARCHIVE, "cl_minfps_qualitymax", "1", "highest allowed drawdistance multiplier"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_qualitymin

cvar_t cl_minfps_qualitymin
extern

Definition at line 103 of file cl_main.c.

103{CF_CLIENT | CF_ARCHIVE, "cl_minfps_qualitymin", "0.25", "lowest allowed drawdistance multiplier"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_qualitymultiply

cvar_t cl_minfps_qualitymultiply
extern

Definition at line 104 of file cl_main.c.

104{CF_CLIENT | CF_ARCHIVE, "cl_minfps_qualitymultiply", "0.2", "multiplier for quality changes in quality change per second render time (1 assumes linearity of quality and render time)"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_minfps_qualitystepmax

cvar_t cl_minfps_qualitystepmax
extern

Definition at line 106 of file cl_main.c.

106{CF_CLIENT | CF_ARCHIVE, "cl_minfps_qualitystepmax", "0.1", "maximum quality change in a single frame"};

Referenced by CL_Init(), and CL_UpdateScreen().

◆ cl_punchangle_applied

int cl_punchangle_applied
extern

Definition at line 149 of file view.c.

Referenced by CL_UpdateScreen(), and V_CalcRefdefUsing().

◆ con_vislines

int con_vislines
extern

Definition at line 95 of file console.c.

Referenced by SCR_DrawConsole().

◆ envmapinfo

struct envmapinfo_s envmapinfo[12]
Initial value:
=
{
{{ 0, 0, 0}, "rt", false, false, false},
{{ 0, 270, 0}, "ft", false, false, false},
{{ 0, 180, 0}, "lf", false, false, false},
{{ 0, 90, 0}, "bk", false, false, false},
{{-90, 180, 0}, "up", true, true, false},
{{ 90, 180, 0}, "dn", true, true, false},
{{ 0, 0, 0}, "px", true, true, true},
{{ 0, 90, 0}, "py", false, true, false},
{{ 0, 180, 0}, "nx", false, false, true},
{{ 0, 270, 0}, "ny", true, false, false},
{{-90, 180, 0}, "pz", false, false, true},
{{ 90, 180, 0}, "nz", false, false, true}
}

Referenced by R_Envmap_f().

◆ jpeg_supported

int jpeg_supported = false

Definition at line 100 of file cl_screen.c.

◆ loadingscreenpic_number

int loadingscreenpic_number = 0
static

Definition at line 1570 of file cl_screen.c.

Referenced by SCR_ChooseLoadingPic(), and SCR_DrawLoadingScreen().

◆ loadingscreenstack

◆ loadingscreentexture

◆ loadingscreentexture_texcoord2f

float loadingscreentexture_texcoord2f[8]
static

Definition at line 1569 of file cl_screen.c.

Referenced by SCR_DrawLoadingScreen(), and SCR_SetLoadingScreenTexture().

◆ loadingscreentexture_vertex3f

float loadingscreentexture_vertex3f[12]
static

Definition at line 1568 of file cl_screen.c.

Referenced by SCR_DrawLoadingScreen(), and SCR_SetLoadingScreenTexture().

◆ net_graph

cvar_t net_graph = {CF_CLIENT | CF_ARCHIVE, "net_graph", "0", "shows a graph of packet sizes and other information, 0 = off, 1 = show client netgraph, 2 = show client and server netgraphs (when hosting a server)"}

Definition at line 91 of file cl_screen.c.

91{CF_CLIENT | CF_ARCHIVE, "net_graph", "0", "shows a graph of packet sizes and other information, 0 = off, 1 = show client netgraph, 2 = show client and server netgraphs (when hosting a server)"};

Referenced by CL_Screen_Init(), and SCR_DrawNetGraph().

◆ r_fog_clear

cvar_t r_fog_clear
extern

Definition at line 138 of file gl_rmain.c.

138{CF_CLIENT, "r_fog_clear", "1", "clears renderbuffer with fog color before render starts"};

Referenced by GL_Main_Init(), and R_ClearScreen().

◆ r_letterbox

cvar_t r_letterbox = {CF_CLIENT, "r_letterbox", "0", "reduces vertical height of view to simulate a letterboxed movie effect (can be used by mods for cutscenes)"}

Definition at line 79 of file cl_screen.c.

79{CF_CLIENT, "r_letterbox", "0", "reduces vertical height of view to simulate a letterboxed movie effect (can be used by mods for cutscenes)"};

Referenced by CL_Screen_Init(), Sbar_Draw(), and SCR_DrawScreen().

◆ r_main_texturepool

◆ r_stereo_angle

cvar_t r_stereo_angle = {CF_CLIENT, "r_stereo_angle", "0", "separation angle of eyes (makes the views look different directions, as an example, 90 gives a 90 degree separation where the views are 45 degrees left and 45 degrees right)"}

Definition at line 87 of file cl_screen.c.

87{CF_CLIENT, "r_stereo_angle", "0", "separation angle of eyes (makes the views look different directions, as an example, 90 gives a 90 degree separation where the views are 45 degrees left and 45 degrees right)"};

Referenced by CL_Screen_Init(), and R_RenderView().

◆ r_stereo_horizontal

cvar_t r_stereo_horizontal = {CF_CLIENT, "r_stereo_horizontal", "0", "aspect skewed side by side view for special decoder/display hardware"}

Definition at line 82 of file cl_screen.c.

82{CF_CLIENT, "r_stereo_horizontal", "0", "aspect skewed side by side view for special decoder/display hardware"};

Referenced by CL_Screen_Init(), R_Stereo_Active(), and SCR_DrawScreen().

◆ r_stereo_redblue

cvar_t r_stereo_redblue = {CF_CLIENT, "r_stereo_redblue", "0", "red/blue anaglyph stereo glasses (note: most of these glasses are actually red/cyan, try that one too)"}

Definition at line 84 of file cl_screen.c.

84{CF_CLIENT, "r_stereo_redblue", "0", "red/blue anaglyph stereo glasses (note: most of these glasses are actually red/cyan, try that one too)"};

Referenced by CL_Screen_Init(), CL_UpdateScreen(), and R_Stereo_ColorMasking().

◆ r_stereo_redcyan

cvar_t r_stereo_redcyan = {CF_CLIENT, "r_stereo_redcyan", "0", "red/cyan anaglyph stereo glasses, the kind given away at drive-in movies like Creature From The Black Lagoon In 3D"}

Definition at line 85 of file cl_screen.c.

85{CF_CLIENT, "r_stereo_redcyan", "0", "red/cyan anaglyph stereo glasses, the kind given away at drive-in movies like Creature From The Black Lagoon In 3D"};

Referenced by CL_Screen_Init(), CL_UpdateScreen(), and R_Stereo_ColorMasking().

◆ r_stereo_redgreen

cvar_t r_stereo_redgreen = {CF_CLIENT, "r_stereo_redgreen", "0", "red/green anaglyph stereo glasses (for those who don't mind yellow)"}

Definition at line 86 of file cl_screen.c.

86{CF_CLIENT, "r_stereo_redgreen", "0", "red/green anaglyph stereo glasses (for those who don't mind yellow)"};

Referenced by CL_Screen_Init(), CL_UpdateScreen(), and R_Stereo_ColorMasking().

◆ r_stereo_separation

cvar_t r_stereo_separation = {CF_CLIENT, "r_stereo_separation", "4", "separation distance of eyes in the world (negative values are only useful for cross-eyed viewing)"}

Definition at line 80 of file cl_screen.c.

80{CF_CLIENT, "r_stereo_separation", "4", "separation distance of eyes in the world (negative values are only useful for cross-eyed viewing)"};

Referenced by CL_Screen_Init(), and R_RenderView().

◆ r_stereo_side

int r_stereo_side

Definition at line 1553 of file cl_screen.c.

Referenced by CL_UpdateScreen(), R_RenderView(), and SCR_DrawScreen().

◆ r_stereo_sidebyside

cvar_t r_stereo_sidebyside = {CF_CLIENT, "r_stereo_sidebyside", "0", "side by side views for those who can't afford glasses but can afford eye strain (note: use a negative r_stereo_separation if you want cross-eyed viewing)"}

Definition at line 81 of file cl_screen.c.

81{CF_CLIENT, "r_stereo_sidebyside", "0", "side by side views for those who can't afford glasses but can afford eye strain (note: use a negative r_stereo_separation if you want cross-eyed viewing)"};

Referenced by CL_Screen_Init(), R_Stereo_Active(), and SCR_DrawScreen().

◆ r_stereo_vertical

cvar_t r_stereo_vertical = {CF_CLIENT, "r_stereo_vertical", "0", "aspect skewed top and bottom view for special decoder/display hardware"}

Definition at line 83 of file cl_screen.c.

83{CF_CLIENT, "r_stereo_vertical", "0", "aspect skewed top and bottom view for special decoder/display hardware"};

Referenced by CL_Screen_Init(), R_Stereo_Active(), and SCR_DrawScreen().

◆ sbar_info_pos

cvar_t sbar_info_pos
extern

Definition at line 108 of file sbar.c.

108{CF_CLIENT | CF_ARCHIVE, "sbar_info_pos", "0", "pixel position of the info strings (such as showfps), from the bottom"};

Referenced by Sbar_Init(), Sbar_ShowFPS(), and SCR_DrawNetGraph().

◆ scr_center_lines

int scr_center_lines

Definition at line 130 of file cl_screen.c.

Referenced by SCR_CenterPrint(), SCR_CheckDrawCenterString(), and SCR_DrawCenterString().

◆ scr_centerstring

char scr_centerstring[MAX_INPUTLINE]

Definition at line 127 of file cl_screen.c.

Referenced by SCR_CenterPrint(), and SCR_DrawCenterString().

◆ scr_centertime

cvar_t scr_centertime = {CF_CLIENT, "scr_centertime","2", "how long centerprint messages show"}

Definition at line 37 of file cl_screen.c.

37{CF_CLIENT, "scr_centertime","2", "how long centerprint messages show"};

Referenced by CL_Screen_Init(), SCR_CenterPrint(), and SCR_DrawCenterString().

◆ scr_centertime_off

float scr_centertime_off

Definition at line 129 of file cl_screen.c.

Referenced by SCR_CenterPrint(), SCR_CheckDrawCenterString(), and SV_SpawnServer().

◆ scr_centertime_start

float scr_centertime_start

Definition at line 128 of file cl_screen.c.

Referenced by SCR_CenterPrint(), and SCR_DrawCenterString().

◆ scr_con_current

unsigned int scr_con_current

◆ scr_con_margin_bottom

unsigned int scr_con_margin_bottom
static

Definition at line 107 of file cl_screen.c.

Referenced by SCR_DrawConsole(), and SCR_DrawInfobar().

◆ scr_conalpha

cvar_t scr_conalpha = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha", "0.9", "opacity of console background gfx/conback (when console isn't forced fullscreen)"}

Definition at line 21 of file cl_screen.c.

21{CF_CLIENT | CF_ARCHIVE, "scr_conalpha", "0.9", "opacity of console background gfx/conback (when console isn't forced fullscreen)"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conalpha2factor

cvar_t scr_conalpha2factor = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"}

Definition at line 23 of file cl_screen.c.

23{CF_CLIENT | CF_ARCHIVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conalpha3factor

cvar_t scr_conalpha3factor = {CF_CLIENT | CF_ARCHIVE, "scr_conalpha3factor", "0", "opacity of console background gfx/conback3 relative to scr_conalpha; when 0, gfx/conback3 is not drawn"}

Definition at line 24 of file cl_screen.c.

24{CF_CLIENT | CF_ARCHIVE, "scr_conalpha3factor", "0", "opacity of console background gfx/conback3 relative to scr_conalpha; when 0, gfx/conback3 is not drawn"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conalphafactor

cvar_t scr_conalphafactor = {CF_CLIENT | CF_ARCHIVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"}

Definition at line 22 of file cl_screen.c.

22{CF_CLIENT | CF_ARCHIVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conbrightness

cvar_t scr_conbrightness = {CF_CLIENT | CF_ARCHIVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"}

Definition at line 25 of file cl_screen.c.

25{CF_CLIENT | CF_ARCHIVE, "scr_conbrightness", "1", "brightness of console background (0 = black, 1 = image)"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conforcewhiledisconnected

cvar_t scr_conforcewhiledisconnected = {CF_CLIENT, "scr_conforcewhiledisconnected", "1", "1 forces fullscreen console while disconnected, 2 also forces it when the listen server has started but the client is still loading"}

Definition at line 26 of file cl_screen.c.

26{CF_CLIENT, "scr_conforcewhiledisconnected", "1", "1 forces fullscreen console while disconnected, 2 also forces it when the listen server has started but the client is still loading"};

Referenced by CL_Screen_Init(), and SCR_SetUpToDrawConsole().

◆ scr_conheight

cvar_t scr_conheight = {CF_CLIENT | CF_ARCHIVE, "scr_conheight", "0.5", "fraction of screen height occupied by console (reduced as necessary for visibility of loading progress and infobar)"}

Definition at line 27 of file cl_screen.c.

27{CF_CLIENT | CF_ARCHIVE, "scr_conheight", "0.5", "fraction of screen height occupied by console (reduced as necessary for visibility of loading progress and infobar)"};

Referenced by CL_Screen_Init(), and SCR_SetUpToDrawConsole().

◆ scr_conscroll2_x

cvar_t scr_conscroll2_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_x", "0", "scroll speed of gfx/conback2 in x direction"}

Definition at line 30 of file cl_screen.c.

30{CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_x", "0", "scroll speed of gfx/conback2 in x direction"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conscroll2_y

cvar_t scr_conscroll2_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_y", "0", "scroll speed of gfx/conback2 in y direction"}

Definition at line 31 of file cl_screen.c.

31{CF_CLIENT | CF_ARCHIVE, "scr_conscroll2_y", "0", "scroll speed of gfx/conback2 in y direction"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conscroll3_x

cvar_t scr_conscroll3_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll3_x", "0", "scroll speed of gfx/conback3 in x direction"}

Definition at line 32 of file cl_screen.c.

32{CF_CLIENT | CF_ARCHIVE, "scr_conscroll3_x", "0", "scroll speed of gfx/conback3 in x direction"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conscroll3_y

cvar_t scr_conscroll3_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll3_y", "0", "scroll speed of gfx/conback3 in y direction"}

Definition at line 33 of file cl_screen.c.

33{CF_CLIENT | CF_ARCHIVE, "scr_conscroll3_y", "0", "scroll speed of gfx/conback3 in y direction"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conscroll_x

cvar_t scr_conscroll_x = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll_x", "0", "scroll speed of gfx/conback in x direction"}

Definition at line 28 of file cl_screen.c.

28{CF_CLIENT | CF_ARCHIVE, "scr_conscroll_x", "0", "scroll speed of gfx/conback in x direction"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_conscroll_y

cvar_t scr_conscroll_y = {CF_CLIENT | CF_ARCHIVE, "scr_conscroll_y", "0", "scroll speed of gfx/conback in y direction"}

Definition at line 29 of file cl_screen.c.

29{CF_CLIENT | CF_ARCHIVE, "scr_conscroll_y", "0", "scroll speed of gfx/conback in y direction"};

Referenced by CL_Screen_Init(), and Con_DrawConsole().

◆ scr_erase_center

int scr_erase_center

Definition at line 132 of file cl_screen.c.

Referenced by SCR_DrawCenterString().

◆ scr_erase_lines

int scr_erase_lines

Definition at line 131 of file cl_screen.c.

Referenced by SCR_CheckDrawCenterString().

◆ scr_fov

cvar_t scr_fov = {CF_CLIENT | CF_ARCHIVE, "fov","90", "field of vision, 1-170 degrees, default 90, some players use 110-130"}

Definition at line 20 of file cl_screen.c.

20{CF_CLIENT | CF_ARCHIVE, "fov","90", "field of vision, 1-170 degrees, default 90, some players use 110-130"};

Referenced by CL_Screen_Init(), M_Menu_Options_AdjustSliders(), M_Options_Draw(), SCR_DrawScreen(), and SCR_UpdateVars().

◆ scr_infobar_height

cvar_t scr_infobar_height = {CF_CLIENT, "scr_infobar_height", "8", "the height of the infobar items"}

Definition at line 53 of file cl_screen.c.

53{CF_CLIENT, "scr_infobar_height", "8", "the height of the infobar items"};

Referenced by CL_Screen_Init(), SCR_DrawCurlDownload(), SCR_DrawInfobarString(), SCR_DrawQWDownload(), and SCR_InfobarHeight().

◆ scr_infobarstring

char scr_infobarstring[MAX_INPUTLINE]

Definition at line 133 of file cl_screen.c.

Referenced by SCR_DrawInfobarString(), and SCR_InfoBar_f().

◆ scr_infobartime_off

float scr_infobartime_off

Definition at line 134 of file cl_screen.c.

Referenced by SCR_DrawInfobar(), SCR_InfoBar_f(), and SCR_InfobarHeight().

◆ scr_initialized

qbool scr_initialized

Definition at line 102 of file cl_screen.c.

Referenced by CL_Screen_Init(), and CL_UpdateScreen().

◆ scr_loading

◆ scr_loadingscreen_background

cvar_t scr_loadingscreen_background = {CF_CLIENT, "scr_loadingscreen_background","0", "show the last visible background during loading screen (costs one screenful of video memory)"}

Definition at line 43 of file cl_screen.c.

43{CF_CLIENT, "scr_loadingscreen_background","0", "show the last visible background during loading screen (costs one screenful of video memory)"};

Referenced by CL_Screen_Init(), and SCR_BeginLoadingPlaque().

◆ scr_loadingscreen_barcolor

cvar_t scr_loadingscreen_barcolor = {CF_CLIENT, "scr_loadingscreen_barcolor", "0 0 1", "rgb color of loadingscreen progress bar"}

Definition at line 50 of file cl_screen.c.

50{CF_CLIENT, "scr_loadingscreen_barcolor", "0 0 1", "rgb color of loadingscreen progress bar"};

Referenced by CL_Screen_Init(), and SCR_DrawLoadingStack().

◆ scr_loadingscreen_barheight

cvar_t scr_loadingscreen_barheight = {CF_CLIENT, "scr_loadingscreen_barheight", "8", "the height of the loadingscreen progress bar"}

Definition at line 51 of file cl_screen.c.

51{CF_CLIENT, "scr_loadingscreen_barheight", "8", "the height of the loadingscreen progress bar"};

Referenced by CL_Screen_Init(), SCR_DrawConsole(), SCR_DrawInfobar(), and SCR_DrawLoadingStack().

◆ scr_loadingscreen_count

cvar_t scr_loadingscreen_count = {CF_CLIENT, "scr_loadingscreen_count","1", "number of loading screen files to use randomly (named loading.tga, loading2.tga, loading3.tga, ...)"}

Definition at line 48 of file cl_screen.c.

48{CF_CLIENT, "scr_loadingscreen_count","1", "number of loading screen files to use randomly (named loading.tga, loading2.tga, loading3.tga, ...)"};

Referenced by CL_Screen_Init(), and SCR_ChooseLoadingPic().

◆ scr_loadingscreen_firstforstartup

cvar_t scr_loadingscreen_firstforstartup = {CF_CLIENT, "scr_loadingscreen_firstforstartup","0", "remove loading.tga from random scr_loadingscreen_count selection and only display it on client startup, 0 = normal, 1 = firstforstartup"}

Definition at line 49 of file cl_screen.c.

49{CF_CLIENT, "scr_loadingscreen_firstforstartup","0", "remove loading.tga from random scr_loadingscreen_count selection and only display it on client startup, 0 = normal, 1 = firstforstartup"};

Referenced by CL_Screen_Init(), and SCR_ChooseLoadingPic().

◆ scr_loadingscreen_maxfps

cvar_t scr_loadingscreen_maxfps = {CF_CLIENT, "scr_loadingscreen_maxfps", "20", "maximum FPS for loading screen so it will not update very often (this reduces loading time with lots of models)"}

Definition at line 52 of file cl_screen.c.

52{CF_CLIENT, "scr_loadingscreen_maxfps", "20", "maximum FPS for loading screen so it will not update very often (this reduces loading time with lots of models)"};

Referenced by CL_Screen_Init(), and CL_UpdateScreen().

◆ scr_loadingscreen_picture

cvar_t scr_loadingscreen_picture = {CF_CLIENT, "scr_loadingscreen_picture", "gfx/loading", "picture shown during loading"}

Definition at line 47 of file cl_screen.c.

47{CF_CLIENT, "scr_loadingscreen_picture", "gfx/loading", "picture shown during loading"};

Referenced by CL_Screen_Init(), and SCR_DrawLoadingScreen().

◆ scr_loadingscreen_scale

cvar_t scr_loadingscreen_scale = {CF_CLIENT, "scr_loadingscreen_scale","1", "scale factor of the background"}

Definition at line 44 of file cl_screen.c.

44{CF_CLIENT, "scr_loadingscreen_scale","1", "scale factor of the background"};

Referenced by CL_Screen_Init(), and SCR_DrawLoadingScreen().

◆ scr_loadingscreen_scale_base

cvar_t scr_loadingscreen_scale_base = {CF_CLIENT, "scr_loadingscreen_scale_base","0", "0 = console pixels, 1 = video pixels"}

Definition at line 45 of file cl_screen.c.

45{CF_CLIENT, "scr_loadingscreen_scale_base","0", "0 = console pixels, 1 = video pixels"};

Referenced by CL_Screen_Init(), and SCR_DrawLoadingScreen().

◆ scr_loadingscreen_scale_limit

cvar_t scr_loadingscreen_scale_limit = {CF_CLIENT, "scr_loadingscreen_scale_limit","0", "0 = no limit, 1 = until first edge hits screen edge, 2 = until last edge hits screen edge, 3 = until width hits screen width, 4 = until height hits screen height"}

Definition at line 46 of file cl_screen.c.

46{CF_CLIENT, "scr_loadingscreen_scale_limit","0", "0 = no limit, 1 = until first edge hits screen edge, 2 = until last edge hits screen edge, 3 = until width hits screen width, 4 = until height hits screen height"};

Referenced by CL_Screen_Init(), and SCR_DrawLoadingScreen().

◆ scr_numtouchscreenareas

int scr_numtouchscreenareas

◆ scr_printspeed

cvar_t scr_printspeed = {CF_CLIENT, "scr_printspeed","0", "speed of intermission printing (episode end texts), a value of 0 disables the slow printing"}

Definition at line 42 of file cl_screen.c.

42{CF_CLIENT, "scr_printspeed","0", "speed of intermission printing (episode end texts), a value of 0 disables the slow printing"};

Referenced by CL_Screen_Init(), and SCR_DrawCenterString().

◆ scr_refresh

cvar_t scr_refresh = {CF_CLIENT, "scr_refresh", "1", "allows you to completely shut off rendering for benchmarking purposes"}

Definition at line 89 of file cl_screen.c.

89{CF_CLIENT, "scr_refresh", "1", "allows you to completely shut off rendering for benchmarking purposes"};

Referenced by CL_Screen_Init(), and CL_UpdateScreen().

◆ scr_sbarscale

cvar_t scr_sbarscale = {CF_CLIENT | CF_READONLY, "scr_sbarscale", "1", "current vid_height/vid_conheight, for compatibility with csprogs that read this cvar (found in Fitzquake-derived engines and FTEQW; despite the name it's not specific to the status bar)"}

Definition at line 54 of file cl_screen.c.

54{CF_CLIENT | CF_READONLY, "scr_sbarscale", "1", "current vid_height/vid_conheight, for compatibility with csprogs that read this cvar (found in Fitzquake-derived engines and FTEQW; despite the name it's not specific to the status bar)"};
#define CF_READONLY
cvar cannot be changed from the console or the command buffer, and is considered CF_PERSISTENT
Definition cmd.h:54

Referenced by CL_Screen_Init(), and SCR_UpdateVars().

◆ scr_screenshot_alpha

cvar_t scr_screenshot_alpha = {CF_CLIENT, "scr_screenshot_alpha","0", "try to write an alpha channel to screenshots (debugging feature)"}

Definition at line 63 of file cl_screen.c.

63{CF_CLIENT, "scr_screenshot_alpha","0", "try to write an alpha channel to screenshots (debugging feature)"};

Referenced by CL_Screen_Init(), R_ClearScreen(), and SCR_ScreenShot_f().

◆ scr_screenshot_gammaboost

cvar_t scr_screenshot_gammaboost = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_gammaboost","1", "gamma correction on saved screenshots and videos, 1.0 saves unmodified images"}

Definition at line 62 of file cl_screen.c.

62{CF_CLIENT | CF_ARCHIVE, "scr_screenshot_gammaboost","1", "gamma correction on saved screenshots and videos, 1.0 saves unmodified images"};

Referenced by CL_Screen_Init(), and SCR_ScreenShot().

◆ scr_screenshot_jpeg

cvar_t scr_screenshot_jpeg = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg","1", "save jpeg instead of targa or PNG"}

Definition at line 59 of file cl_screen.c.

59{CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg","1", "save jpeg instead of targa or PNG"};

Referenced by CL_Screen_Init(), r_textures_start(), and SCR_ScreenShot_f().

◆ scr_screenshot_jpeg_quality

cvar_t scr_screenshot_jpeg_quality = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg_quality","0.9", "image quality of saved jpeg"}

Definition at line 60 of file cl_screen.c.

60{CF_CLIENT | CF_ARCHIVE, "scr_screenshot_jpeg_quality","0.9", "image quality of saved jpeg"};

Referenced by CL_Screen_Init(), and JPEG_SaveImage_preflipped().

◆ scr_screenshot_name_in_mapdir

cvar_t scr_screenshot_name_in_mapdir = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_name_in_mapdir", "0", "if set to 1, screenshots are placed in a subdirectory named like the map they are from"}

Definition at line 90 of file cl_screen.c.

90{CF_CLIENT | CF_ARCHIVE, "scr_screenshot_name_in_mapdir", "0", "if set to 1, screenshots are placed in a subdirectory named like the map they are from"};

Referenced by CL_Screen_Init(), and SCR_ScreenShot_f().

◆ scr_screenshot_png

cvar_t scr_screenshot_png = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_png","0", "save png instead of targa"}

Definition at line 61 of file cl_screen.c.

61{CF_CLIENT | CF_ARCHIVE, "scr_screenshot_png","0", "save png instead of targa"};

Referenced by CL_Screen_Init(), r_textures_start(), and SCR_ScreenShot_f().

◆ scr_screenshot_timestamp

cvar_t scr_screenshot_timestamp = {CF_CLIENT | CF_ARCHIVE, "scr_screenshot_timestamp", "1", "use a timestamp based number of the type YYYYMMDDHHMMSSsss instead of sequential numbering"}

Definition at line 64 of file cl_screen.c.

64{CF_CLIENT | CF_ARCHIVE, "scr_screenshot_timestamp", "1", "use a timestamp based number of the type YYYYMMDDHHMMSSsss instead of sequential numbering"};

Referenced by CL_Screen_Init(), and SCR_ScreenShot_f().

◆ scr_showbrand

cvar_t scr_showbrand = {CF_CLIENT, "showbrand","0", "shows gfx/brand.tga in a corner of the screen (different values select different positions, including centered)"}

Definition at line 41 of file cl_screen.c.

41{CF_CLIENT, "showbrand","0", "shows gfx/brand.tga in a corner of the screen (different values select different positions, including centered)"};

Referenced by CL_Screen_Init(), and SCR_DrawBrand().

◆ scr_showpause

cvar_t scr_showpause = {CF_CLIENT | CF_ARCHIVE, "showpause","1", "show pause icon when game is paused"}

Definition at line 40 of file cl_screen.c.

40{CF_CLIENT | CF_ARCHIVE, "showpause","1", "show pause icon when game is paused"};

Referenced by CL_Screen_Init(), and SCR_DrawPause().

◆ scr_showram

cvar_t scr_showram = {CF_CLIENT | CF_ARCHIVE, "showram","1", "show ram icon if low on surface cache memory (not used)"}

Definition at line 38 of file cl_screen.c.

38{CF_CLIENT | CF_ARCHIVE, "showram","1", "show ram icon if low on surface cache memory (not used)"};

Referenced by CL_Screen_Init().

◆ scr_showturtle

cvar_t scr_showturtle = {CF_CLIENT | CF_ARCHIVE, "showturtle","0", "show turtle icon when framerate is too low"}

Definition at line 39 of file cl_screen.c.

39{CF_CLIENT | CF_ARCHIVE, "showturtle","0", "show turtle icon when framerate is too low"};

Referenced by CL_Screen_Init(), and SCR_DrawTurtle().

◆ scr_stipple

cvar_t scr_stipple = {CF_CLIENT, "scr_stipple", "0", "interlacing-like stippling of the display"}

Definition at line 88 of file cl_screen.c.

88{CF_CLIENT, "scr_stipple", "0", "interlacing-like stippling of the display"};

Referenced by CL_DrawVideo(), CL_Screen_Init(), and CL_UpdateScreen().

◆ scr_touchscreenareas

scr_touchscreenarea_t scr_touchscreenareas[128]

◆ scr_viewsize

cvar_t scr_viewsize = {CF_CLIENT | CF_ARCHIVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"}

Definition at line 19 of file cl_screen.c.

19{CF_CLIENT | CF_ARCHIVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"};

Referenced by CL_Screen_Init(), SCR_DrawScreen(), SCR_SizeDown_f(), SCR_SizeUp_f(), SCR_UpdateVars(), and V_CalcRefdefUsing().

◆ timedemo_screenshotframelist

cvar_t timedemo_screenshotframelist = {CF_CLIENT, "timedemo_screenshotframelist", "", "when performing a timedemo, take screenshots of each frame in this space-separated list - example: 1 201 401"}

Definition at line 93 of file cl_screen.c.

93{CF_CLIENT, "timedemo_screenshotframelist", "", "when performing a timedemo, take screenshots of each frame in this space-separated list - example: 1 201 401"};

Referenced by CL_Screen_Init(), and SCR_DrawScreen().

◆ v_isometric

cvar_t v_isometric
extern

Definition at line 97 of file view.c.

97{CF_CLIENT, "v_isometric", "0", "changes view to isometric (non-perspective)"};

◆ v_isometric_verticalfov

cvar_t v_isometric_verticalfov
extern

Definition at line 98 of file view.c.

98{CF_CLIENT, "v_isometric_verticalfov", "512", "vertical field of view in game units (horizontal is computed using aspect ratio based on this)"};

Referenced by V_Init(), and V_MakeViewIsometric().

◆ vid_conheight

◆ vid_conwidth

cvar_t vid_conwidth = {CF_CLIENT | CF_ARCHIVE, "vid_conwidth", "640", "virtual width of 2D graphics system (note: changes may be overwritten, see vid_conwidthauto)"}

◆ vid_conwidthauto

cvar_t vid_conwidthauto = {CF_CLIENT | CF_ARCHIVE, "vid_conwidthauto", "1", "automatically update vid_conwidth to match aspect ratio"}

Definition at line 55 of file cl_screen.c.

55{CF_CLIENT | CF_ARCHIVE, "vid_conwidthauto", "1", "automatically update vid_conwidth to match aspect ratio"};

Referenced by CL_Screen_Init(), and SCR_UpdateVars().

◆ vid_pixelheight

cvar_t vid_pixelheight = {CF_CLIENT | CF_ARCHIVE, "vid_pixelheight", "1", "adjusts vertical field of vision to account for non-square pixels (1280x1024 on a CRT monitor for example)"}

Definition at line 58 of file cl_screen.c.

58{CF_CLIENT | CF_ARCHIVE, "vid_pixelheight", "1", "adjusts vertical field of vision to account for non-square pixels (1280x1024 on a CRT monitor for example)"};

Referenced by CL_Screen_Init(), M_Menu_Video_f(), M_Video_Key(), MR_Init(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_CaptureVideo_Ogg_BeginVideo(), SCR_DrawScreen(), SCR_UpdateVars(), and V_MakeViewIsometric().

◆ vid_touchscreen_outlinealpha

cvar_t vid_touchscreen_outlinealpha = {CF_CLIENT, "vid_touchscreen_outlinealpha", "0", "opacity of touchscreen area outlines"}

Definition at line 94 of file cl_screen.c.

94{CF_CLIENT, "vid_touchscreen_outlinealpha", "0", "opacity of touchscreen area outlines"};

Referenced by CL_Screen_Init(), and SCR_DrawTouchscreenOverlay().

◆ vid_touchscreen_overlayalpha

cvar_t vid_touchscreen_overlayalpha = {CF_CLIENT, "vid_touchscreen_overlayalpha", "0.25", "opacity of touchscreen area icons"}

Definition at line 95 of file cl_screen.c.

95{CF_CLIENT, "vid_touchscreen_overlayalpha", "0.25", "opacity of touchscreen area icons"};

Referenced by CL_Screen_Init(), and SCR_DrawTouchscreenOverlay().