UFO: Alien Invasion
|
Master for refresh, status bar, console, chat, notify, etc. More...
#include "client.h"
#include "cl_screen.h"
#include "cl_console.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 "renderer/r_local.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) |
static void | SCR_DrawLoadingBar (int x, int y, int w, int h, int percent) |
void | SCR_DrawLoadingScreen (bool string, int percent) |
Precache and loading screen at startup. More... | |
static void | SCR_DrawDownloading (void) |
Draws the current downloading status. More... | |
void | SCR_DrawLoading (int percent) |
Draws the current loading pic of the map from base/pics/maps/loading. More... | |
static void | SCR_TouchPics (void) |
Allows rendering code to cache all needed sbar graphics. More... | |
static void | SCR_DrawCursor (void) |
Draws the 3D-cursor in battlemode and the icons/info next to it. More... | |
void | SCR_RunConsole (void) |
Scroll it up or down. More... | |
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. More... | |
void | SCR_ChangeCursor (int cursor) |
void | SCR_Init (void) |
void | SCR_Shutdown (void) |
Variables | |
static float | scr_con_current |
static float | scr_conlines |
static bool | screenInitialized = false |
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] |
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.cpp.
Definition at line 269 of file cl_screen.cpp.
References CL_Milliseconds(), cls, and client_static_s::disableScreen.
Referenced by CL_CanMultiplayerStart(), and SV_Map().
Definition at line 370 of file cl_screen.cpp.
References Cvar_SetValue().
Referenced by CL_ActorMouseTrace(), IN_SetMouseSpace(), and SCR_TouchPics().
Definition at line 247 of file cl_screen.cpp.
References Con_CheckResize(), Con_DrawConsole(), scr_con_current, viddef, viddef_t::viewHeight, and viddef_t::viewWidth.
Referenced by SCR_UpdateScreen().
Draws the 3D-cursor in battlemode and the icons/info next to it.
Definition at line 182 of file cl_screen.cpp.
References CL_BattlescapeRunning(), cls, cursorImage, image_s::height, HUD_UpdateCursor(), IN_GetMouseSpace, cvar_s::integer, client_static_s::isOurRound(), it_pic, cvar_s::modified, mousePosX, mousePosY, MS_WORLD, R_DrawImage(), R_FindImage(), SCR_TouchPics(), UI_DNDIsDragging(), UI_DrawCursor(), and image_s::width.
Referenced by SCR_UpdateScreen().
Draws the current downloading status.
Definition at line 124 of file cl_screen.cpp.
References _, ALIGN_UC, cls, client_static_s::downloadName, client_static_s::downloadPercent, SCR_DrawLoadingBar(), UI_DrawString(), va(), viddef, viddef_t::virtualHeight, and viddef_t::virtualWidth.
Referenced by SCR_DrawLoading().
Draws the current loading pic of the map from base/pics/maps/loading.
Definition at line 140 of file cl_screen.cpp.
References cls, client_static_s::downloadName, R_BeginFrame(), R_EndFrame(), SCR_DrawDownloading(), SCR_DrawLoadingBar(), UI_Draw(), viddef, viddef_t::virtualHeight, and viddef_t::virtualWidth.
Referenced by CL_SendCommand(), and CL_ViewLoadMedia().
Definition at line 81 of file cl_screen.cpp.
References R_DrawFill().
Referenced by SCR_DrawDownloading(), SCR_DrawLoading(), and SCR_DrawLoadingScreen().
Precache and loading screen at startup.
[in] | string | Draw the loading string - if the scripts are not parsed, this is not possible, so use false for very early calls |
percent | Progress value for the status bar |
Definition at line 100 of file cl_screen.cpp.
References ALIGN_UC, image_s::height, it_pic, 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_Init(), CL_ParseClientData(), CL_PrecacheCharacterModels(), CL_ViewPrecacheModels(), and R_ReloadImages().
Definition at line 70 of file cl_screen.cpp.
References Con_DrawString(), and Q_strnull().
Referenced by SCR_UpdateScreen().
Definition at line 277 of file cl_screen.cpp.
References cls, and client_static_s::disableScreen.
Referenced by CL_Drop(), CL_ViewLoadMedia(), and Qcommon_Init().
Definition at line 379 of file cl_screen.cpp.
References Cmd_AddCommand(), CVAR_ARCHIVE, Cvar_Get(), cvar_s::flags, SCR_TimeRefresh_f(), SCR_TouchPics(), and screenInitialized.
Referenced by CL_Init().
Scroll it up or down.
Definition at line 222 of file cl_screen.cpp.
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().
Definition at line 397 of file cl_screen.cpp.
References screenInitialized.
Referenced by CL_Shutdown().
Definition at line 282 of file cl_screen.cpp.
References ca_active, cls, Cmd_Argc(), Com_Printf(), f, i, R_BeginFrame(), R_EndFrame(), R_RenderFrame(), r_threadstate, refdef, client_static_s::state, renderer_threadstate_s::state, Sys_Milliseconds(), THREAD_BSP, and rendererData_t::viewAngles.
Referenced by SCR_Init().
Allows rendering code to cache all needed sbar graphics.
Definition at line 159 of file cl_screen.cpp.
References Com_Printf(), Com_sprintf(), cursorImage, cvar_s::integer, it_pic, R_FindImage(), and SCR_ChangeCursor().
Referenced by SCR_DrawCursor(), and SCR_Init().
This is called every frame, and can also be called explicitly to flush text to the screen.
Definition at line 320 of file cl_screen.cpp.
References rendererData_t::aliasCount, rendererData_t::batchCount, rendererData_t::brushCount, cl_fps, CL_Milliseconds(), CL_OnBattlescape(), CL_ViewRender(), cls, Com_Printf(), con_fontHeight, con_fontWidth, viddef_t::context, client_static_s::disableScreen, rendererData_t::FFPToShaderCount, client_static_s::framerate, cvar_s::integer, R_BeginFrame(), R_EndFrame(), r_programs, rendererData_t::ready, refdef, SCR_DrawConsole(), SCR_DrawCursor(), SCR_DrawString(), screenInitialized, rendererData_t::shaderToFFPCount, rendererData_t::shaderToShaderCount, UI_Draw(), va(), viddef, client_static_s::waitingForStart, and viddefContext_t::width.
Referenced by CL_Frame().
|
static |
Definition at line 65 of file cl_screen.cpp.
Referenced by SCR_DrawCursor(), and SCR_TouchPics().
|
static |
Definition at line 54 of file cl_screen.cpp.
Referenced by SCR_DrawConsole(), and SCR_RunConsole().
|
static |
Definition at line 55 of file cl_screen.cpp.
Referenced by SCR_RunConsole().
|
static |
Definition at line 60 of file cl_screen.cpp.
|
static |
Definition at line 59 of file cl_screen.cpp.
|
static |
Definition at line 62 of file cl_screen.cpp.
|
static |
Definition at line 61 of file cl_screen.cpp.
|
static |
Definition at line 63 of file cl_screen.cpp.
|
static |
Definition at line 57 of file cl_screen.cpp.
Referenced by SCR_Init(), SCR_Shutdown(), and SCR_UpdateScreen().