Console header file. More...
Go to the source code of this file.
Defines | |
#define | CONSOLE_COLORED_TEXT_MASK 128 |
#define | CONSOLE_PROMPT_CHAR ']' |
Functions | |
void | Con_DrawCharacter (int cx, int line, int num) |
void | Con_Scroll (int scroll) |
Scrolls the console. | |
void | Con_CheckResize (void) |
If the line width has changed, reformat the buffer. | |
void | Con_Init (void) |
void | Con_DrawConsole (float frac) |
Draws the console with the solid background. | |
void | Con_Print (const char *txt) |
Handles cursor positioning, line wrapping, etc All console printing must go through this in order to be logged to disk If no console is visible, the text will appear at the top of the game window. | |
void | Con_DrawNotify (void) |
Draws the last few lines of output transparently over the game top. | |
void | Con_ClearNotify (void) |
Clear the notify times to ensure that every message will disappear from screen. | |
void | Con_ToggleConsole_f (void) |
void | Con_Close (void) |
Hide the gameconsole if active. | |
void | Con_SaveConsoleHistory (void) |
Stores the console history. | |
void | Con_LoadConsoleHistory (void) |
Load the console history. | |
Variables | |
const int | con_fontHeight |
const int | con_fontWidth |
const int | con_fontShift |
Console header file.
Definition in file cl_console.h.
#define CONSOLE_COLORED_TEXT_MASK 128 |
Definition at line 46 of file cl_console.h.
Referenced by Con_DrawConsole(), Con_DrawInput(), Con_DrawNotify(), Con_Print(), Key_Console(), and Key_Init().
#define CONSOLE_PROMPT_CHAR ']' |
Definition at line 47 of file cl_console.h.
Referenced by Key_Console(), and Key_Init().
void Con_CheckResize | ( | void | ) |
If the line width has changed, reformat the buffer.
Definition at line 162 of file cl_console.c.
References Con_ClearNotify(), con_fontShift, CON_TEXTSIZE, console_t::currentLine, console_t::displayLine, i, console_t::lineWidth, console_t::text, console_t::totalLines, viddef, and viddef_t::width.
Referenced by SCR_DrawConsole().
void Con_ClearNotify | ( | void | ) |
Clear the notify times to ensure that every message will disappear from screen.
Definition at line 131 of file cl_console.c.
References i, NUM_CON_TIMES, and console_t::times.
Referenced by Con_CheckResize(), Con_ToggleChat_f(), Con_ToggleConsole_f(), and SCR_EndLoadingPlaque().
void Con_Close | ( | void | ) |
Hide the gameconsole if active.
Definition at line 376 of file cl_console.c.
References cls, key_console, key_game, Key_SetDest(), and client_static_s::keyDest.
void Con_DrawCharacter | ( | int | cx, | |
int | line, | |||
int | num | |||
) |
void Con_DrawConsole | ( | float | frac | ) |
Draws the console with the solid background.
[in] | frac |
Definition at line 484 of file cl_console.c.
References Com_sprintf(), Con_DrawInput(), con_fontHeight, con_fontShift, con_fontWidth, CONSOLE_CHAR_ALIGN, CONSOLE_COLORED_TEXT_MASK, console_t::currentLine, console_t::displayLine, viddef_t::height, i, cvar_s::integer, it_pic, len, console_t::lineWidth, R_DrawChar(), R_DrawStretchImage(), R_FindImage(), console_t::text, console_t::totalLines, UFO_VERSION, viddef, viddef_t::virtualHeight, viddef_t::virtualWidth, console_t::visLines, and viddef_t::width.
Referenced by SCR_DrawConsole().
void Con_DrawNotify | ( | void | ) |
Draws the last few lines of output transparently over the game top.
Definition at line 425 of file cl_console.c.
References CL_Milliseconds(), cls, Con_DisplayString(), con_fontHeight, con_fontShift, CONSOLE_COLORED_TEXT_MASK, console_t::currentLine, developer, i, cvar_s::integer, key_message, client_static_s::keyDest, console_t::lineWidth, MSG_SAY, MSG_SAY_TEAM, msgBuffer, msgBufferLen, msgMode, NUM_CON_TIMES, qfalse, qtrue, R_DrawChar(), viddef_t::rx, viddef_t::ry, console_t::text, console_t::times, console_t::totalLines, viddef, and viddef_t::width.
Referenced by SCR_DrawConsole().
void Con_Init | ( | void | ) |
Definition at line 264 of file cl_console.c.
References _, Cmd_AddCommand(), Com_Printf(), Con_Clear_f(), con_fontWidth, Con_LoadConsoleHistory(), Con_MessageModeSay_f(), Con_MessageModeSayTeam_f(), Con_ToggleChat_f(), Con_ToggleConsole_f(), CVAR_ARCHIVE, Cvar_Get(), console_t::initialized, console_t::lineWidth, qtrue, console_t::text, console_t::totalLines, and VID_NORM_WIDTH.
Referenced by CL_Init().
void Con_LoadConsoleHistory | ( | void | ) |
Load the console history.
Definition at line 204 of file cl_console.c.
References CONSOLE_HISTORY_FILENAME, editLine, qFILE_s::f, f, FILE_READ, FS_CloseFile(), FS_OpenFile(), historyLine, cvar_s::integer, keyLines, MAXCMDLINE, MAXKEYLINES, and Q_strncpyz().
Referenced by Con_Init().
void Con_Print | ( | const char * | txt | ) |
Handles cursor positioning, line wrapping, etc All console printing must go through this in order to be logged to disk If no console is visible, the text will appear at the top of the game window.
Definition at line 306 of file cl_console.c.
void Con_SaveConsoleHistory | ( | void | ) |
Stores the console history.
Definition at line 235 of file cl_console.c.
References Com_Printf(), CONSOLE_HISTORY_FILENAME, qFILE_s::f, f, FILE_WRITE, FS_CloseFile(), FS_OpenFile(), FS_Write(), historyLine, i, cvar_s::integer, keyLines, and MAXCMDLINE.
Referenced by CL_Shutdown().
void Con_Scroll | ( | int | scroll | ) |
Scrolls the console.
[in] | scroll | Lines to scroll |
Definition at line 119 of file cl_console.c.
References console_t::currentLine, and console_t::displayLine.
Referenced by Key_Console().
void Con_ToggleConsole_f | ( | void | ) |
Definition at line 82 of file cl_console.c.
References cls, Con_ClearNotify(), Key_ClearTyping(), key_console, key_game, Key_SetDest(), and client_static_s::keyDest.
Referenced by Con_Init(), IN_Frame(), and Key_Event().
const int con_fontHeight |
Definition at line 63 of file cl_console.c.
Referenced by Con_DrawConsole(), Con_DrawInput(), Con_DrawNotify(), and R_DrawChar().
const int con_fontShift |
Definition at line 65 of file cl_console.c.
Referenced by Con_CheckResize(), Con_DrawConsole(), Con_DrawInput(), and Con_DrawNotify().
const int con_fontWidth |
Definition at line 64 of file cl_console.c.
Referenced by Con_DisplayString(), Con_DrawConsole(), Con_Init(), R_DrawChar(), SCR_DrawString(), and SCR_UpdateScreen().