52 #include "../ports/system.h"
83 const vec4_t color = {0.3f, 0.3f, 0.3f, 0.7f};
88 const vec4_t colorBar = {0.8f, 0.8f, 0.8f, 0.7f};
89 R_DrawFill((
int)(x + (h * 0.2)), (
int)(y + (h * 0.2)), (
int)((w - (h * 0.4)) * percent * 0.01), (
int)(h * 0.6), colorBar);
184 if (scr_showcursor->
integer == 0)
202 pic =
"pics/cursors/wait";
291 for (
int i = 0;
i < 128;
i++) {
298 for (
int i = 0;
i < 128;
i++) {
309 const float time = (stop - start) / 1000.0
f;
310 Com_Printf(
"%f seconds (%f fps)\n", time, 128 / time);
381 scr_conspeed =
Cvar_Get(
"scr_conspeed",
"3", 0,
"Console open/close speed");
382 scr_consize =
Cvar_Get(
"scr_consize",
"1.0", 0,
"Console size");
384 scr_cursor =
Cvar_Get(
"cursor",
"1", 0,
"Which cursor should be shown - 0-9");
386 scr_cursor->
flags = 0;
387 scr_showcursor =
Cvar_Get(
"scr_showcursor",
"1", 0,
"Show/hide mouse cursor- 0-1");
bool Q_strnull(const char *string)
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
static char cursorImage[MAX_QPATH]
void Con_DrawString(const char *txt, int x, int y, unsigned int width)
void SCR_DrawLoading(int percent)
Draws the current loading pic of the map from base/pics/maps/loading.
renderer_threadstate_t r_threadstate
static cvar_t * scr_showcursor
void R_DrawImage(float x, float y, const image_t *image)
Draws an image or parts of it.
static cvar_t * scr_rspeed
bool CL_OnBattlescape(void)
Check whether we are in a tactical mission as server or as client. But this only means that we are ab...
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
static void SCR_DrawLoadingBar(int x, int y, int w, int h, int percent)
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
void SCR_DrawLoadingScreen(bool string, int percent)
Precache and loading screen at startup.
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
local graphics definitions
void SCR_UpdateScreen(void)
This is called every frame, and can also be called explicitly to flush text to the screen...
void Com_Printf(const char *const fmt,...)
static void SCR_DrawCursor(void)
Draws the 3D-cursor in battlemode and the icons/info next to it.
static void SCR_DrawDownloading(void)
Draws the current downloading status.
image_t * R_FindImage(const char *pname, imagetype_t type)
Finds or loads the given image.
void UI_Draw(void)
Draws the window stack.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
void SCR_EndLoadingPlaque(void)
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
static void SCR_TimeRefresh_f(void)
void HUD_UpdateCursor(void)
Updates the cursor texts when in battlescape.
static bool screenInitialized
Header for certain screen operations.
static float scr_con_current
static void SCR_DrawString(int x, int y, const char *string)
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
void SCR_ChangeCursor(int cursor)
static cvar_t * scr_conspeed
void SCR_BeginLoadingPlaque(void)
void Con_DrawConsole(float frac)
Draws the console with the solid background.
static void SCR_DrawConsole(void)
int UI_DrawString(const char *fontID, align_t align, int x, int y, int absX, int maxWidth, int lineHeight, const char *c, int boxHeight, int scrollPos, int *curLine, bool increaseLine, longlines_t method)
static void SCR_TouchPics(void)
Allows rendering code to cache all needed sbar graphics.
Primary header for client.
void SCR_RunConsole(void)
Scroll it up or down.
void R_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
bool UI_DNDIsDragging(void)
Return true if we are dragging something.
char downloadName[MAX_OSPATH]
static float scr_conlines
static cvar_t * scr_consize
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
void Con_CheckResize(void)
If the line width has changed, reformat the buffer.
static cvar_t * scr_cursor
int CL_Milliseconds(void)
int Sys_Milliseconds(void)