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);
110 (
int)(
viddef.virtualWidth / 2), 30,
111 0,
viddef.virtualWidth, 50,
"Download this free game at http://ufoai.sf.net");
126 const char* dlmsg =
va(
_(
"Downloading [%s]"),
cls.downloadName);
128 (
int)(
viddef.virtualWidth / 2),
129 (
int)(
viddef.virtualHeight / 2 - 60),
130 (
int)(
viddef.virtualWidth / 2),
131 viddef.virtualWidth, 50, dlmsg, 1);
142 if (
cls.downloadName[0]) {
202 pic =
"pics/cursors/wait";
279 cls.disableScreen = 0;
291 for (
int i = 0;
i < 128;
i++) {
292 refdef.viewAngles[1] =
i / 128.0 * 360.0;
298 for (
int i = 0;
i < 128;
i++) {
299 refdef.viewAngles[1] =
i / 128.0 * 360.0;
309 const float time = (stop - start) / 1000.0f;
310 Com_Printf(
"%f seconds (%f fps)\n", time, 128 / time);
322 if (
cls.waitingForStart)
327 if (
cls.disableScreen) {
329 cls.disableScreen = 0;
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...
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
void Con_DrawConsole(float frac)
Draws the console with the solid background.
void Con_CheckResize(void)
If the line width has changed, reformat the buffer.
void Con_DrawString(const char *txt, int x, int y, unsigned int width)
void HUD_UpdateCursor(void)
Updates the cursor texts when in battlescape.
int CL_Milliseconds(void)
renderer_threadstate_t r_threadstate
void SCR_DrawLoading(int percent)
Draws the current loading pic of the map from base/pics/maps/loading.
void SCR_DrawLoadingScreen(bool string, int percent)
Precache and loading screen at startup.
static void SCR_TimeRefresh_f(void)
static bool screenInitialized
static void SCR_DrawLoadingBar(int x, int y, int w, int h, int percent)
void SCR_EndLoadingPlaque(void)
static void SCR_DrawDownloading(void)
Draws the current downloading status.
void SCR_UpdateScreen(void)
This is called every frame, and can also be called explicitly to flush text to the screen.
void SCR_ChangeCursor(int cursor)
static char cursorImage[MAX_QPATH]
static cvar_t * scr_conspeed
static cvar_t * scr_showcursor
static cvar_t * scr_rspeed
void SCR_RunConsole(void)
Scroll it up or down.
static cvar_t * scr_consize
void SCR_BeginLoadingPlaque(void)
static float scr_con_current
static void SCR_TouchPics(void)
Allows rendering code to cache all needed sbar graphics.
static void SCR_DrawString(int x, int y, const char *string)
static void SCR_DrawCursor(void)
Draws the 3D-cursor in battlemode and the icons/info next to it.
static float scr_conlines
static cvar_t * scr_cursor
static void SCR_DrawConsole(void)
Header for certain screen operations.
Primary header for client.
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
void Com_Printf(const char *const fmt,...)
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
void R_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
void R_DrawImage(float x, float y, const image_t *image)
Draws an image or parts of it.
image_t * R_FindImage(const char *pname, imagetype_t type)
Finds or loads the given image.
local graphics definitions
bool Q_strnull(const char *string)
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
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...
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
int Sys_Milliseconds(void)
bool UI_DNDIsDragging(void)
Return true if we are dragging something.
void UI_Draw(void)
Draws the window stack.
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)