UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_console.h File Reference

Console header file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CONSOLE_PROMPT_CHAR   ']'

Functions

void Con_DrawString (const char *text, int x, int y, unsigned int width)
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_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

Detailed Description

Console header file.

Definition in file cl_console.h.

Macro Definition Documentation

◆ CONSOLE_PROMPT_CHAR

#define CONSOLE_PROMPT_CHAR   ']'

Definition at line 43 of file cl_console.h.

Referenced by Key_Console(), and Key_Init().

Function Documentation

◆ Con_CheckResize()

void Con_CheckResize ( void )

If the line width has changed, reformat the buffer.

Definition at line 184 of file cl_console.cpp.

References con, Con_Clear(), con_fontShift, CON_TEXTSIZE, i, and viddef.

Referenced by SCR_DrawConsole().

◆ Con_Close()

void Con_Close ( void )

Hide the gameconsole if active.

Definition at line 393 of file cl_console.cpp.

References cls, key_console, key_game, and Key_SetDest().

◆ Con_DrawConsole()

◆ Con_DrawString()

void Con_DrawString ( const char * txt,
int x,
int y,
unsigned int width )
Parameters
txtThe character buffer to draw
x,yThe coordinates on the screen
widthCharacters to draw

Definition at line 105 of file cl_console.cpp.

References ColorIndex, CON_COLOR_WHITE, Con_DrawText(), lengthof, Q_IsColorString, and Sys_Error().

Referenced by SCR_DrawString().

◆ Con_Init()

◆ Con_LoadConsoleHistory()

void Con_LoadConsoleHistory ( void )

Load the console history.

See also
Con_SaveConsoleHistory

Definition at line 223 of file cl_console.cpp.

References con_history, CONSOLE_HISTORY_FILENAME, editLine, f, FILE_READ, FS_OpenFile(), historyLine, keyLines, MAXCMDLINE, MAXKEYLINES, and Q_strncpyz().

Referenced by Con_Init().

◆ Con_Print()

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.

See also
Sys_ConsoleOutput

Definition at line 318 of file cl_console.cpp.

◆ Con_SaveConsoleHistory()

void Con_SaveConsoleHistory ( void )

Stores the console history.

See also
Con_LoadConsoleHistory

Definition at line 250 of file cl_console.cpp.

References Com_Printf(), con_history, CONSOLE_HISTORY_FILENAME, f, FILE_WRITE, FS_OpenFile(), FS_Write(), historyLine, i, keyLines, and MAXCMDLINE.

Referenced by CL_Shutdown().

◆ Con_Scroll()

void Con_Scroll ( int scroll)

Scrolls the console.

Parameters
[in]scrollLines to scroll

Definition at line 172 of file cl_console.cpp.

References con.

Referenced by Key_Console().

◆ Con_ToggleConsole_f()

void Con_ToggleConsole_f ( void )

Definition at line 138 of file cl_console.cpp.

References cls, Key_ClearTyping(), key_console, key_game, and Key_SetDest().

Referenced by Con_Init(), IN_Frame(), and Key_Event().

Variable Documentation

◆ con_fontHeight

const int con_fontHeight
extern

Definition at line 75 of file cl_console.cpp.

Referenced by Con_DrawConsole(), Con_DrawInput(), R_DrawChar(), and SCR_UpdateScreen().

◆ con_fontShift

const int con_fontShift
extern

Definition at line 77 of file cl_console.cpp.

Referenced by Con_CheckResize(), Con_DrawConsole(), and Con_DrawText().

◆ con_fontWidth

const int con_fontWidth
extern

Definition at line 76 of file cl_console.cpp.

Referenced by Con_DrawConsole(), Con_Init(), R_DrawChar(), and SCR_UpdateScreen().