Master for refresh, status bar, console, chat, notify, etc. More...
#include "client.h"
#include "cl_screen.h"
#include "cl_console.h"
#include "cl_sequence.h"
#include "battlescape/cl_localentity.h"
#include "battlescape/cl_actor.h"
#include "battlescape/cl_view.h"
#include "battlescape/cl_hud.h"
#include "renderer/r_main.h"
#include "renderer/r_draw.h"
#include "ui/ui_main.h"
#include "ui/ui_draw.h"
#include "ui/ui_nodes.h"
#include "ui/ui_windows.h"
#include "ui/ui_dragndrop.h"
#include "ui/ui_render.h"
#include "../ports/system.h"
Go to the source code of this file.
Functions | |
static void | SCR_DrawString (int x, int y, const char *string, qboolean bitmapFont) |
static void | SCR_DrawLoadingBar (int x, int y, int w, int h, int percent) |
void | SCR_DrawPrecacheScreen (qboolean string) |
Precache and loading screen at startup. | |
static const image_t * | SCR_SetLoadingBackground (const char *mapString) |
Updates needed cvar for loading screens. | |
static void | SCR_DrawDownloading (void) |
Draws the current downloading status. | |
static void | SCR_DrawLoading (void) |
Draws the current loading pic of the map from base/pics/maps/loading. | |
static void | SCR_TouchPics (void) |
Allows rendering code to cache all needed sbar graphics. | |
static void | SCR_DrawCursor (void) |
Draws the 3D-cursor in battlemode and the icons/info next to it. | |
void | SCR_RunConsole (void) |
Scroll it up or down. | |
static void | SCR_DrawConsole (void) |
void | SCR_BeginLoadingPlaque (void) |
void | SCR_EndLoadingPlaque (void) |
static void | SCR_TimeRefresh_f (void) |
void | SCR_UpdateScreen (void) |
This is called every frame, and can also be called explicitly to flush text to the screen. | |
void | SCR_Init (void) |
Variables | |
static float | scr_con_current |
static float | scr_conlines |
static qboolean | screenInitialized = qfalse |
static int | screenDrawLoading = 0 |
static cvar_t * | scr_conspeed |
static cvar_t * | scr_consize |
static cvar_t * | scr_rspeed |
static cvar_t * | scr_cursor |
static cvar_t * | scr_showcursor |
static char | cursorImage [MAX_QPATH] |
static const vec4_t | cursorBG = { 0.0f, 0.0f, 0.0f, 0.7f } |
Master for refresh, status bar, console, chat, notify, etc.
Full screen console. Put up loading plaque. Blanked background with loading plaque. Blanked background with menu. Full screen image for quit and victory. End of unit intermissions.
Definition in file cl_screen.c.
void SCR_BeginLoadingPlaque | ( | void | ) |
Definition at line 348 of file cl_screen.c.
Referenced by CL_CanMultiplayerStart(), and SV_Map().
static void SCR_DrawConsole | ( | void | ) | [static] |
Definition at line 313 of file cl_screen.c.
References ca_connected, ca_connecting, ca_sequence, cls, Con_CheckResize(), Con_DrawConsole(), Con_DrawNotify(), key_game, key_message, client_static_s::keyDest, scr_con_current, client_static_s::state, viddef, viddef_t::viewHeight, and viddef_t::viewWidth.
Referenced by SCR_UpdateScreen().
static void SCR_DrawCursor | ( | void | ) | [static] |
Draws the 3D-cursor in battlemode and the icons/info next to it.
Definition at line 247 of file cl_screen.c.
References cl, CL_BattlescapeRunning(), cls, cursorImage, image_s::height, HUD_UpdateCursor(), cvar_s::integer, it_pic, cvar_s::modified, mousePosX, mousePosY, mouseSpace, MS_WORLD, qfalse, R_DrawImage(), R_FindImage(), SCR_TouchPics(), client_static_s::team, UI_DNDIsDragging(), UI_DrawCursor(), and image_s::width.
Referenced by SCR_UpdateScreen().
static void SCR_DrawDownloading | ( | void | ) | [static] |
Draws the current downloading status.
Definition at line 164 of file cl_screen.c.
References _, ALIGN_UC, cls, client_static_s::downloadName, client_static_s::downloadPercent, qfalse, SCR_DrawLoadingBar(), UI_DrawString(), va(), viddef, viddef_t::virtualHeight, and viddef_t::virtualWidth.
Referenced by SCR_DrawLoading().
static void SCR_DrawLoading | ( | void | ) | [static] |
Draws the current loading pic of the map from base/pics/maps/loading.
Definition at line 180 of file cl_screen.c.
References _, ALIGN_UC, CL_GetConfigString(), cls, CS_MAPTITLE, CS_TILES, client_static_s::downloadName, image_s::height, client_static_s::loadingMessages, client_static_s::loadingPercent, qfalse, R_Color(), R_DrawImage(), SCR_DrawDownloading(), SCR_DrawLoadingBar(), SCR_SetLoadingBackground(), screenDrawLoading, UI_DrawString(), va(), viddef, viddef_t::virtualHeight, viddef_t::virtualWidth, and image_s::width.
Referenced by SCR_EndLoadingPlaque(), and SCR_UpdateScreen().
static void SCR_DrawLoadingBar | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
int | percent | |||
) | [static] |
Definition at line 89 of file cl_screen.c.
References R_DrawFill().
Referenced by SCR_DrawDownloading(), SCR_DrawLoading(), and SCR_DrawPrecacheScreen().
void SCR_DrawPrecacheScreen | ( | qboolean | string | ) |
Precache and loading screen at startup.
[in] | string | Draw the loading string - if the scripts are not parsed, this is not possible, so use qfalse for very early calls |
Definition at line 106 of file cl_screen.c.
References ALIGN_UC, cls, image_s::height, it_pic, client_static_s::loadingPercent, qfalse, R_BeginFrame(), R_DrawImage(), R_EndFrame(), R_FindImage(), SCR_DrawLoadingBar(), UI_DrawString(), viddef, viddef_t::virtualHeight, viddef_t::virtualWidth, and image_s::width.
Referenced by CL_PrecacheCharacterModels(), and CL_ViewPrecacheModels().
static void SCR_DrawString | ( | int | x, | |
int | y, | |||
const char * | string, | |||
qboolean | bitmapFont | |||
) | [static] |
Definition at line 71 of file cl_screen.c.
References ALIGN_UL, con_fontWidth, qfalse, R_DrawChar(), UI_DrawString(), viddef, and viddef_t::virtualWidth.
Referenced by SCR_UpdateScreen().
void SCR_EndLoadingPlaque | ( | void | ) |
Definition at line 359 of file cl_screen.c.
Referenced by CL_Drop(), CL_StartGame(), Qcommon_Init(), and SCR_UpdateScreen().
void SCR_Init | ( | void | ) |
Definition at line 470 of file cl_screen.c.
References Cmd_AddCommand(), CVAR_ARCHIVE, Cvar_Get(), qtrue, SCR_TimeRefresh_f(), SCR_TouchPics(), and screenInitialized.
Referenced by CL_Init().
void SCR_RunConsole | ( | void | ) |
Scroll it up or down.
Definition at line 288 of file cl_screen.c.
References cls, client_static_s::frametime, key_console, client_static_s::keyDest, scr_con_current, scr_conlines, and cvar_s::value.
Referenced by CL_Frame().
static const image_t* SCR_SetLoadingBackground | ( | const char * | mapString | ) | [static] |
Updates needed cvar for loading screens.
[in] | mapString | The mapstring of the map that is currently loaded |
mapString
is NULL the sv_mapname
cvar is used Definition at line 132 of file cl_screen.c.
References Com_ServerState(), Cvar_GetString(), Cvar_Set(), it_pic, image_s::name, R_FindImage(), r_noTexture, and va().
Referenced by SCR_DrawLoading().
static void SCR_TimeRefresh_f | ( | void | ) | [static] |
Definition at line 368 of file cl_screen.c.
References ca_active, cls, Cmd_Argc(), Com_Printf(), i, R_BeginFrame(), R_EndFrame(), R_RenderFrame(), r_threadstate, refdef, renderer_threadstate_s::state, client_static_s::state, Sys_Milliseconds(), THREAD_BSP, and rendererData_t::viewAngles.
Referenced by SCR_Init().
static void SCR_TouchPics | ( | void | ) | [static] |
Allows rendering code to cache all needed sbar graphics.
Definition at line 224 of file cl_screen.c.
References Com_Printf(), Com_sprintf(), cursorImage, Cvar_SetValue(), cvar_s::integer, it_pic, and R_FindImage().
Referenced by SCR_DrawCursor(), and SCR_Init().
void SCR_UpdateScreen | ( | void | ) |
This is called every frame, and can also be called explicitly to flush text to the screen.
Definition at line 410 of file cl_screen.c.
References rendererData_t::aliasCount, rendererData_t::brushCount, ca_disconnected, ca_sequence, cl_fps, CL_Milliseconds(), CL_OnBattlescape(), CL_SequenceRender(), CL_ViewRender(), cls, Com_Printf(), con_fontWidth, client_static_s::disableScreen, client_static_s::framerate, cvar_s::integer, qtrue, R_BeginFrame(), R_DrawChars(), R_EndFrame(), rendererData_t::ready, refdef, SCR_DrawConsole(), SCR_DrawCursor(), SCR_DrawLoading(), SCR_DrawString(), SCR_EndLoadingPlaque(), screenDrawLoading, screenInitialized, client_static_s::state, UI_Draw(), UI_GetActiveRenderRect(), va(), viddef, viddef_t::viewHeight, viddef_t::viewWidth, viddef_t::width, viddef_t::x, and viddef_t::y.
Referenced by CL_Frame(), CL_SendCommand(), CL_ViewLoadMedia(), Key_Console(), and SCR_BeginLoadingPlaque().
Definition at line 243 of file cl_screen.c.
char cursorImage[MAX_QPATH] [static] |
Definition at line 67 of file cl_screen.c.
Referenced by SCR_DrawCursor(), and SCR_TouchPics().
float scr_con_current [static] |
Definition at line 54 of file cl_screen.c.
Referenced by SCR_DrawConsole(), and SCR_RunConsole().
float scr_conlines [static] |
Definition at line 55 of file cl_screen.c.
Referenced by SCR_RunConsole().
cvar_t* scr_consize [static] |
Definition at line 62 of file cl_screen.c.
cvar_t* scr_conspeed [static] |
Definition at line 61 of file cl_screen.c.
cvar_t* scr_cursor [static] |
Definition at line 64 of file cl_screen.c.
cvar_t* scr_rspeed [static] |
Definition at line 63 of file cl_screen.c.
cvar_t* scr_showcursor [static] |
Definition at line 65 of file cl_screen.c.
int screenDrawLoading = 0 [static] |
Definition at line 59 of file cl_screen.c.
Referenced by SCR_BeginLoadingPlaque(), SCR_DrawLoading(), SCR_EndLoadingPlaque(), and SCR_UpdateScreen().
qboolean screenInitialized = qfalse [static] |
Definition at line 57 of file cl_screen.c.
Referenced by SCR_Init(), and SCR_UpdateScreen().