win_console.c File Reference

console functions for windows ports More...

#include "../../common/common.h"
#include "win_local.h"
Include dependency graph for win_console.c:

Go to the source code of this file.

Data Structures

struct  sysConsole_t

Defines

#define CONSOLE_WINDOW_STYLE   (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_CLIPCHILDREN|WS_GROUP)
#define CONSOLE_WINDOW_CLASS_NAME   GAME_TITLE" Console"
#define CONSOLE_WINDOW_NAME   CONSOLE_WINDOW_CLASS_NAME
#define MAX_OUTPUT   32768
#define MAX_PRINTMSG   8192

Functions

int SV_CountPlayers (void)
 Returns the number of spawned players.
static void Sys_ConsoleLoop (qboolean error)
 Dispatch window messages.
const char * Sys_ConsoleInput (void)
 Handles input for the console window.
void Sys_ConsoleOutput (const char *text)
void Sys_Backtrace (void)
 On platforms supporting it, print a backtrace.
void Sys_Error (const char *error,...)
void Sys_ShowConsole (qboolean show)
static LONG WINAPI Sys_ConsoleProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static LONG WINAPI Sys_ConsoleEditProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
void Sys_ConsoleShutdown (void)
 Shutdown the console.
void Sys_ConsoleInit (void)
 Initialize the console input (tty mode if possible).

Variables

static sysConsole_t sys_console

Detailed Description

console functions for windows ports

Definition in file win_console.c.


Define Documentation

#define CONSOLE_WINDOW_CLASS_NAME   GAME_TITLE" Console"

Definition at line 30 of file win_console.c.

Referenced by Sys_ConsoleInit(), and Sys_ConsoleShutdown().

#define CONSOLE_WINDOW_NAME   CONSOLE_WINDOW_CLASS_NAME

Definition at line 35 of file win_console.c.

Referenced by Sys_ConsoleInit().

#define CONSOLE_WINDOW_STYLE   (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_CLIPCHILDREN|WS_GROUP)

Definition at line 29 of file win_console.c.

Referenced by Sys_ConsoleInit().

#define MAX_OUTPUT   32768

Definition at line 38 of file win_console.c.

Referenced by Sys_ConsoleOutput().

#define MAX_PRINTMSG   8192

Definition at line 39 of file win_console.c.

Referenced by Sys_ConsoleOutput().


Function Documentation

int SV_CountPlayers ( void   ) 

Returns the number of spawned players.

See also:
SV_ShutdownWhenEmpty

Definition at line 851 of file sv_main.c.

Referenced by Sys_ConsoleProc().

void Sys_Backtrace ( void   ) 

On platforms supporting it, print a backtrace.

Definition at line 161 of file win_console.c.

Referenced by Com_Error(), and Sys_Error().

static LONG WINAPI Sys_ConsoleEditProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
) [static]
void Sys_ConsoleInit ( void   ) 
const char* Sys_ConsoleInput ( void   ) 

Handles input for the console window.

Returns:
NULL if there is no input in the input box

Definition at line 92 of file win_console.c.

References sysConsole_t::cmdBuffer, MAXCMDLINE, Q_strncpyz(), qfalse, and Sys_ConsoleLoop().

Referenced by SV_Frame().

static void Sys_ConsoleLoop ( qboolean  error  )  [static]

Dispatch window messages.

Definition at line 71 of file win_console.c.

References Sys_Quit().

Referenced by Sys_ConsoleInput(), and Sys_Error().

void Sys_ConsoleOutput ( const char *  text  ) 
Note:
if the user is editing a line when something gets printed to the early console then it won't look good so we provide CON_Hide and CON_Show to be called before and after a stdout or stderr output

Definition at line 115 of file win_console.c.

References sysConsole_t::hWndOutput, len, MAX_OUTPUT, MAX_PRINTMSG, and sysConsole_t::outLen.

Referenced by Com_vPrintf(), and Sys_Error().

static LONG WINAPI Sys_ConsoleProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
) [static]
void Sys_ConsoleShutdown ( void   ) 
void Sys_Error ( const char *  error,
  ... 
)
void Sys_ShowConsole ( qboolean  show  ) 

Variable Documentation

Definition at line 64 of file win_console.c.


Generated by  doxygen 1.6.2