cl_screen.c File Reference

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"
Include dependency graph for cl_screen.c:

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_tSCR_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_tscr_conspeed
static cvar_tscr_consize
static cvar_tscr_rspeed
static cvar_tscr_cursor
static cvar_tscr_showcursor
static char cursorImage [MAX_QPATH]
static const vec4_t cursorBG = { 0.0f, 0.0f, 0.0f, 0.7f }

Detailed Description

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.


Function Documentation

void SCR_BeginLoadingPlaque ( void   ) 
See also:
SCR_UpdateScreen
SCR_EndLoadingPlaque
SCR_DrawLoading

Definition at line 348 of file cl_screen.c.

Referenced by CL_CanMultiplayerStart(), and SV_Map().

static void SCR_DrawConsole ( void   )  [static]
static void SCR_DrawCursor ( void   )  [static]
static void SCR_DrawDownloading ( void   )  [static]
static void SCR_DrawLoading ( void   )  [static]
static void SCR_DrawLoadingBar ( int  x,
int  y,
int  w,
int  h,
int  percent 
) [static]
See also:
SCR_DrawLoading

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.

See also:
CL_InitAfter
Parameters:
[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]
See also:
Font_DrawString

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   ) 
See also:
SCR_BeginLoadingPlaque

Definition at line 359 of file cl_screen.c.

Referenced by CL_Drop(), CL_StartGame(), Qcommon_Init(), and SCR_UpdateScreen().

void SCR_Init ( void   ) 
See also:
CL_Init

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.

Parameters:
[in] mapString The mapstring of the map that is currently loaded
Note:
If mapString is NULL the sv_mapname cvar is used
Returns:
The loading/background pic path

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]
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   ) 

Variable Documentation

const vec4_t cursorBG = { 0.0f, 0.0f, 0.0f, 0.7f } [static]

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.

Definition at line 65 of file cl_screen.c.

int screenDrawLoading = 0 [static]
qboolean screenInitialized = qfalse [static]

Definition at line 57 of file cl_screen.c.

Referenced by SCR_Init(), and SCR_UpdateScreen().


Generated by  doxygen 1.6.2