Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
23 #define CON_TIMES_MASK (CON_TIMES - 1)
25 #define CON_TOTALLINES 1024 // total lines in console scrollback
26 #define CON_TOTALLINES_MASK (CON_TOTALLINES - 1)
28 #define CON_LINEWIDTH 100 // fixed width, do not need more
184 Com_Printf(
"You must be in a level to chat.\n");
223 FS_File_g(
"condumps",
".txt", FS_SEARCH_STRIPEXT, ctx);
239 char name[MAX_OSPATH];
242 Com_Printf(
"Usage: %s <filename>\n",
Cmd_Argv(0));
267 Com_Printf(
"Dumped console text to %s.\n", name);
292 Com_Printf(
"You must be in a level to chat.\n");
327 Com_Printf(
"Usage: %s <address> <password>\n",
Cmd_Argv(0));
333 Com_Printf(
"Bad address: %s\n", s);
438 memset(&
con, 0,
sizeof(
con));
504 memset(p, 0,
sizeof(
con.
text[0]));
576 for (p = (
char *)txt; *p > 32; p++)
614 char msg[MAXPRINTMSG];
616 va_start(argptr, fmt);
634 if (strcmp(
con_font->string,
"conchars")) {
668 color_index_t
c = *p;
685 color.u8[3] = alpha * 255;
695 #define CON_PRESTEP (CHAR_HEIGHT * 3 + CHAR_HEIGHT / 4)
807 rows = y / CHAR_HEIGHT + 1;
823 widths[0] = widths[1] = 0;
824 for (i = 0; i < rows; i++) {
852 y = x - strlen(text) - 18;
854 if (strlen(text) > i) {
856 strncpy(buffer, text, i);
858 strcat(buffer,
"...");
860 strcpy(buffer, text);
862 strcat(buffer,
": ");
864 buffer[i++] =
'\x80';
867 for (j = 0; j < y; j++) {
869 buffer[i++] =
'\x83';
871 buffer[i++] =
'\x81';
874 buffer[i++] =
'\x82';
877 Q_snprintf(buffer + i,
sizeof(buffer) - i,
" %02d%% (%d kB)",
907 Q_snprintf(buffer,
sizeof(buffer),
"Loading %s...", text);
937 x = IF_Draw(&
con.
prompt.inputLine, 2 * CHAR_WIDTH, y,
941 #define APP_VERSION APPLICATION " " VERSION_STRING
942 #define VER_WIDTH ((int)(sizeof(APP_VERSION) + 1) * CHAR_WIDTH)
956 x =
Com_Time_m(buffer,
sizeof(buffer)) * CHAR_WIDTH;
957 if (widths[row] + x + CHAR_WIDTH <=
con.
vidWidth) {
1074 if (cmd[0] ==
'\\' || cmd[0] ==
'/') {
1117 IF_CharEvent(&
con.
prompt.inputLine,
' ');
1149 if (key == K_ENTER || key == K_KP_ENTER) {
1155 (key == K_INS &&
Key_IsDown(K_SHIFT)) || key == K_MOUSE3) {
1175 if (key == K_UPARROW || (key ==
'p' &&
Key_IsDown(K_CTRL))) {
1180 if (key == K_DOWNARROW || (key ==
'n' &&
Key_IsDown(K_CTRL))) {
1185 if (key == K_PGUP || key == K_MWHEELUP) {
1195 if (key == K_PGDN || key == K_MWHEELDOWN) {
1218 if (IF_KeyEvent(&
con.
prompt.inputLine, key)) {
1231 if (IF_CharEvent(&
con.
prompt.inputLine, key)) {
1248 if (key == K_ENTER || key == K_KP_ENTER) {
1258 if (key == K_ESCAPE) {
1274 if (key == K_UPARROW || (key ==
'p' &&
Key_IsDown(K_CTRL))) {
1279 if (key == K_DOWNARROW || (key ==
'n' &&
Key_IsDown(K_CTRL))) {
float SCR_FadeAlpha(unsigned startTime, unsigned visTime, unsigned fadeTime)
void Con_Print(const char *txt)
qhandle_t R_RegisterImage(const char *name, imagetype_t type, imageflags_t flags, qerror_t *err_p)
void Prompt_CompleteCommand(commandPrompt_t *prompt, qboolean backslash)
static cvar_t * con_history
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
qhandle_t FS_EasyOpenFile(char *buf, size_t size, unsigned mode, const char *dir, const char *name, const char *ext)
void Prompt_CompleteHistory(commandPrompt_t *prompt, qboolean forward)
const uint32_t colorTable[8]
void(* R_SetColor)(uint32_t color)
static void Con_MessageMode2_f(void)
void Char_Console(int key)
void(* R_SetAlpha)(float clpha)
void Prompt_HistoryDown(commandPrompt_t *prompt)
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
struct client_static_s::@3 demo
static cvar_t * con_background
static void Con_DrawSolidConsole(void)
static void Con_RemoteMode_f(void)
void Key_SetDest(keydest_t dest)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
const char * Q_ErrorString(qerror_t error)
void(* R_ClearColor)(void)
void Prompt_ClearState(commandPrompt_t *prompt)
void SCR_UpdateScreen(void)
ssize_t FS_FPrintf(qhandle_t f, const char *format,...)
void Key_Console(int key)
void Con_ToggleConsole_f(void)
static cvar_t * con_height
static void CL_RemoteMode_c(genctx_t *ctx, int argnum)
size_t Com_Time_m(char *buffer, size_t size)
void Con_Printf(const char *fmt,...)
float R_ClampScale(cvar_t *var)
char text[CON_TOTALLINES][CON_LINEWIDTH]
char * Prompt_Action(commandPrompt_t *prompt)
static void con_scale_changed(cvar_t *self)
static void Con_Dump_c(genctx_t *ctx, int argnum)
#define CON_TOTALLINES_MASK
static cvar_t * con_scale
size_t Q_vsnprintf(char *dest, size_t size, const char *fmt, va_list argptr)
void SCR_EndLoadingPlaque(void)
static void start_message_mode(chatMode_t mode)
static int Con_DrawLine(int v, int line, float alpha)
void VID_PumpEvents(void)
static const cmdreg_t c_console[]
commandPrompt_t chatPrompt
void Con_RunConsole(void)
static void Con_CarriageRet(void)
static cvar_t * con_clock
void CL_LoadState(load_state_t state)
static void Con_CheckTop(void)
static cvar_t * con_speed
void Con_ClearNotify_f(void)
void Con_Close(qboolean force)
char * VID_GetClipboardData(void)
static void Con_Paste(void)
void Con_Popup(qboolean force)
static cvar_t * con_notifylines
void Com_Error(error_type_t type, const char *fmt,...)
static void Con_ToggleChat2_f(void)
void Prompt_HistoryUp(commandPrompt_t *prompt)
static void Con_Clear_f(void)
float Cvar_ClampValue(cvar_t *var, float min, float max)
void Cbuf_AddText(cmdbuf_t *buf, const char *text)
char * va(const char *format,...)
void FS_File_g(const char *path, const char *ext, unsigned flags, genctx_t *ctx)
void Con_RegisterMedia(void)
void Cmd_Register(const cmdreg_t *reg)
void Con_CheckResize(void)
static cvar_t * con_scroll
void Com_Address_g(genctx_t *ctx)
int(* R_DrawString)(int x, int y, int flags, size_t maxChars, const char *string, qhandle_t font)
void Prompt_LoadHistory(commandPrompt_t *prompt, const char *filename)
static void Con_InteractiveMode(void)
void Prompt_SaveHistory(commandPrompt_t *prompt, const char *filename, int lines)
qboolean NET_StringToAdr(const char *s, netadr_t *a, int default_port)
void Con_SkipNotify(qboolean skip)
static void Con_Say(char *msg)
static cvar_t * con_alpha
void IF_Replace(inputField_t *field, const char *text)
static void toggle_console(consoleMode_t mode, chatMode_t chat)
void Prompt_Clear(commandPrompt_t *prompt)
void Char_Message(int key)
static void Con_DrawNotify(void)
void CL_SendRcon(const netadr_t *adr, const char *pass, const char *cmd)
static void Con_Linefeed(void)
struct client_static_s::@2 download
void IF_Clear(inputField_t *field)
void(* R_DrawStretchPic)(int x, int y, int w, int h, qhandle_t pic)
void(* R_SetScale)(float scale)
static void con_param_changed(cvar_t *self)
void Con_SetColor(color_index_t color)
void(* R_DrawChar)(int x, int y, int flags, int ch, qhandle_t font)
void CL_ClientCommand(const char *string)
static void Con_Dump_f(void)
void FS_FCloseFile(qhandle_t f)
void Con_ClearTyping(void)
static void Con_MessageMode_f(void)
static cvar_t * con_notifytime
struct console_s console_t
static void Con_Action(void)
void IF_Init(inputField_t *field, size_t visibleChars, size_t maxChars)
static void Con_ToggleChat_f(void)
void Con_DrawConsole(void)
void Key_Message(int key)
unsigned times[CON_TIMES]
int SCR_DrawStringEx(int x, int y, int flags, size_t maxlen, const char *s, qhandle_t font)