2004-08-23 00:15:46 +00:00
/*
Copyright ( C ) 1996 - 1997 Id Software , Inc .
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE .
See the GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
//
// console
//
2006-01-01 09:01:15 +00:00
# define MAXCONCOLOURS 16
2004-08-23 00:15:46 +00:00
typedef struct {
2006-01-01 09:01:15 +00:00
float fr , fg , fb ;
2004-08-23 00:15:46 +00:00
} consolecolours_t ;
2006-01-01 09:01:15 +00:00
2004-08-23 00:15:46 +00:00
extern consolecolours_t consolecolours [ MAXCONCOLOURS ] ;
2006-01-01 09:01:15 +00:00
# define MAXQ3COLOURS 10
extern conchar_t q3codemasks [ MAXQ3COLOURS ] ;
2015-07-14 14:47:00 +00:00
# define CON_LONGCHAR_MASK (CON_LONGCHAR|CON_RICHFORECOLOUR)
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define CON_NONCLEARBG 0x00800000 //disabled if CON_RICHFORECOLOUR
# define CON_HALFALPHA 0x00400000 //disabled if CON_RICHFORECOLOUR
2014-05-20 02:23:37 +00:00
# define CON_LINKSPECIAL 0x00200000 //disabled if CON_RICHFORECOLOUR
2015-07-14 14:47:00 +00:00
# define CON_LONGCHAR 0x00100000 //flags (other than hidden) are found in the following conchar. disabled if CON_RICHFORECOLOUR
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define CON_HIDDEN 0x00080000
# define CON_BLINKTEXT 0x00040000
# define CON_2NDCHARSETTEXT 0x00020000
2013-11-21 23:02:28 +00:00
# define CON_RICHFORECOLOUR 0x00010000 //if set, the upper 3 nibbles are r4g4b4. background is clear, halfalpha is ignored.
2013-03-12 22:44:00 +00:00
//#define CON_HIGHCHARSMASK 0x00000080 // Quake's alternative mask
2006-01-01 09:01:15 +00:00
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define CON_FLAGSMASK 0xFFFF0000
2009-06-21 17:45:33 +00:00
# define CON_CHARMASK 0x0000FFFF
2006-01-01 09:01:15 +00:00
# define CON_FGMASK 0x0F000000
# define CON_BGMASK 0xF0000000
2014-05-20 02:23:37 +00:00
# define CON_FGSHIFT 24 //second highest nibble
# define CON_BGSHIFT 28 //high nibble
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define CON_RICHFOREMASK 0xFFF00000
2014-05-20 02:23:37 +00:00
# define CON_RICHBSHIFT 20 //
------------------------------------------------------------------------
r4169 | acceptthis | 2013-01-17 08:55:12 +0000 (Thu, 17 Jan 2013) | 31 lines
removed MAX_VISEDICTS limit.
PEXT2_REPLACEMENTDELTAS tweaked, now has 4 million entity limit. still not enabled by default.
TE_BEAM now maps to a separate TEQW_BEAM to avoid conflicts with QW.
added android multitouch emulation for windows/rawinput (in_simulatemultitouch).
split topcolor/bottomcolor from scoreboard, for dp's colormap|1024 feature.
now using utf-8 for windows consoles.
qcc warnings/errors now give clickable console links for quick+easy editing.
disabled menutint when the currently active item changes contrast or gamma (for OneManClan).
Added support for drawfont/drawfontscale.
tweaked the qcvm a little to reduce the number of pointers.
.doll file loading. still experimental and will likely crash. requires csqc active, even if its a dummy progs. this will be fixed in time. Still other things that need cleaning up.
windows: gl_font "?" shows the standard windows font-selection dialog, and can be used to select windows fonts. not all work. and you probably don't want to use windings.
fixed splitscreen support when playing mvds. added mini-scoreboards to splitscreen.
editor/debugger now shows asm if there's no linenumber info. also, pressing f1 for help shows the shortcuts.
Added support for .framegroups files for psk(psa) and iqm formats.
True support for ezquake's colour codes. Mutually exclusive with background colours.
path command output slightly more readable.
added support for digest_hex (MD4, SHA1, CRC16).
skingroups now colourmap correctly.
Fix terrain colour hints, and litdata from the wrong bsp.
fix ftp dual-homed issue. support epsv command, and enable ipv6 (eprt still not supported).
remove d3d11 compilation from the makefile. the required headers are not provided by mingw, and are not available to the build bot, so don't bother.
fix v *= v.x and similar opcodes.
fteqcc: fixed support for áéÃóú type chars in names. utf-8 files now properly supported (even with the utf-8 bom/identifier). utf-16 also supported.
fteqcc: fixed '#if 1 == 3 && 4' parsing.
fteqcc: -Werror acts on the warning, rather than as a separate error. Line numbers are thus more readable.
fteqcc: copyright message now includes compile date instead.
fteqccgui: the treeview control is now coloured depending on whether there were warnings/errors in the last compile.
fteqccgui: the output window is now focused and scrolls down as compilation progresses.
pr_dumpplatform command dumps out some pragmas to convert more serious warnings to errors. This is to avoid the infamous 'fteqcc sucks cos my code sucks' issue.
rewrote prespawn/modelist/soundlist code. server tracks progress now.
------------------------------------------------------------------------
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4167 fc73d0e0-1445-4013-8a0c-d673dee63da5
2013-03-12 22:29:40 +00:00
# define CON_RICHGSHIFT 24
2014-05-20 02:23:37 +00:00
# define CON_RICHRSHIFT 28 //high nibble
2006-01-01 09:01:15 +00:00
# define CON_WHITEMASK 0x0F000000 // must be constant. things assume this
2006-01-21 03:10:16 +00:00
# define CON_DEFAULTCHAR (CON_WHITEMASK | 32)
2014-05-20 02:23:37 +00:00
# define CON_LINKSTART (CON_LINKSPECIAL | CON_HIDDEN | '[')
# define CON_LINKEND (CON_LINKSPECIAL | CON_HIDDEN | ']')
2012-10-13 00:56:31 +00:00
2006-01-01 09:01:15 +00:00
// RGBI standard colors
# define COLOR_BLACK 0
# define COLOR_DARKBLUE 1
# define COLOR_DARKGREEN 2
# define COLOR_DARKCYAN 3
# define COLOR_DARKRED 4
# define COLOR_DARKMAGENTA 5
# define COLOR_BROWN 6
# define COLOR_GREY 7
# define COLOR_DARKGREY 8
# define COLOR_BLUE 9
# define COLOR_GREEN 10
# define COLOR_CYAN 11
# define COLOR_RED 12
# define COLOR_MAGENTA 13
# define COLOR_YELLOW 14
# define COLOR_WHITE 15
2004-12-25 01:34:51 +00:00
# define S_COLOR_BLACK "^0"
2004-08-23 00:15:46 +00:00
# define S_COLOR_RED "^1"
# define S_COLOR_GREEN "^2"
# define S_COLOR_YELLOW "^3"
# define S_COLOR_BLUE "^4"
2006-01-09 01:49:06 +00:00
# define S_COLOR_CYAN "^5"
# define S_COLOR_MAGENTA "^6"
2004-12-25 01:34:51 +00:00
# define S_COLOR_WHITE "^7"
2004-08-23 00:15:46 +00:00
2013-06-23 02:17:02 +00:00
# define CON_DEFAULT "^&--"
2007-09-23 15:28:06 +00:00
# define CON_WARNING "^&E0"
# define CON_ERROR "^&C0"
# define CON_NOTICE "^&-1"
2006-02-22 01:24:22 +00:00
2006-04-06 08:42:24 +00:00
# define isextendedcode(x) ((x >= '0' && x <= '9') || (x >= 'A' && x <= 'F') || x == '-')
2007-12-30 19:00:48 +00:00
# define ishexcode(x) ((x >= '0' && x <= '9') || (x >= 'A' && x <= 'F') || (x >= 'a' && x <= 'f'))
2006-01-11 07:23:31 +00:00
2016-07-12 00:40:13 +00:00
# define CONL_CENTERED (1u<<0)
# define CONL_NONOTIFY (1u<<1)
# define CONL_BREAKPOINT (1u<<2) //red
# define CONL_EXECUTION (1u<<3) //yellow
2009-07-05 18:45:53 +00:00
typedef struct conline_s {
struct conline_s * older ;
struct conline_s * newer ;
2010-03-14 14:35:56 +00:00
unsigned short length ;
2013-09-22 06:28:14 +00:00
unsigned short maxlength ;
2016-01-18 05:22:07 +00:00
unsigned char numlines ; //updated so we scroll properly
unsigned char flags ;
2013-09-22 06:28:14 +00:00
unsigned short id ;
2011-06-16 02:03:57 +00:00
float time ;
2009-07-05 18:45:53 +00:00
} conline_t ;
2015-04-14 23:12:17 +00:00
//majority of these are mututally exclusive. the bits allow multiple.
# define CB_NONE 0
# define CB_SCROLL 1
# define CB_COPY 2
# define CB_CLOSE 3
# define CB_MOVE 4
2016-07-12 00:40:13 +00:00
# define CB_ACTIONBAR 5
# define CB_SELECT 6
2015-04-14 23:12:17 +00:00
# define CB_SIZELEFT (1u<<29)
# define CB_SIZERIGHT (1u<<30)
# define CB_SIZEBOTTOM (1u<<31)
2013-08-21 07:14:39 +00:00
# define CONF_HIDDEN 1 /*do not show in the console list (unless active)*/
# define CONF_NOTIFY 2 /*text printed to console also appears as notify lines*/
# define CONF_NOTIFY_BOTTOM 4 /*align the bottom*/
2015-04-14 23:12:17 +00:00
# define CONF_NOTIFY_RIGHT 8
2016-07-12 00:40:13 +00:00
//#define CONF_NOTIMES 16
2015-04-14 23:12:17 +00:00
# define CONF_KEYFOCUSED 32
# define CONF_ISWINDOW 64
2016-07-12 00:40:13 +00:00
# define CONF_NOWRAP 128
# define CONF_KEEPSELECTION 256
2005-01-13 16:50:37 +00:00
typedef struct console_s
2004-08-23 00:15:46 +00:00
{
2013-08-21 07:14:39 +00:00
int id ;
2013-09-22 06:28:14 +00:00
int nextlineid ; //the current line being written to. so we can rewrite links etc.
2015-04-14 23:12:17 +00:00
char name [ 128 ] ;
char title [ 128 ] ;
2016-07-12 00:40:13 +00:00
char prompt [ 128 ] ;
2015-08-22 02:59:01 +00:00
char backimage [ MAX_QPATH ] ;
shader_t * backshader ;
2015-04-14 23:12:17 +00:00
float wnd_x ;
float wnd_y ;
float wnd_w ;
float wnd_h ;
2009-07-05 18:45:53 +00:00
int linecount ;
2011-06-16 02:03:57 +00:00
unsigned int flags ;
2015-04-14 23:12:17 +00:00
float notif_x ;
float notif_y ;
float notif_w ;
2011-06-16 02:03:57 +00:00
int notif_l ;
2015-04-14 23:12:17 +00:00
float notif_fade ; // will be transparent for this long when fading
2011-06-16 02:03:57 +00:00
float notif_t ;
2016-07-12 00:40:13 +00:00
int maxlines ;
2009-07-05 18:45:53 +00:00
conline_t * oldest ;
conline_t * current ; // line where next message will be printed
2004-08-23 00:15:46 +00:00
int x ; // offset in current line for next print
2012-03-19 06:30:41 +00:00
int cr ;
2009-07-05 18:45:53 +00:00
conline_t * display ; // bottom of console displays this line
2016-07-12 00:40:13 +00:00
int displayoffset ; // horizontal offset
2009-07-05 18:45:53 +00:00
int vislines ; // pixel lines
int linesprinted ; // for notify times
2005-12-20 23:33:20 +00:00
qboolean unseentext ;
2013-11-21 23:02:28 +00:00
unsigned parseflags ;
conchar_t defaultcharbits ;
2005-03-10 03:55:18 +00:00
int commandcompletion ; //allows tab completion of quake console commands
2013-08-21 07:14:39 +00:00
2016-07-12 00:40:13 +00:00
int ( * linebuffered ) ( struct console_s * con , char * line ) ; //if present, called on enter, causes the standard console input to appear. return 2 to not save the line in history.
qboolean ( * redirect ) ( struct console_s * con , unsigned int unicode , int key ) ; //if present, called every character.
qboolean ( * mouseover ) ( struct console_s * con , char * * out_tiptext , shader_t * * out_shader ) ;
qboolean ( * close ) ( struct console_s * con , qboolean force ) ;
void * userdata ; //user context
conline_t * userline ; //editor cursor line
unsigned int useroffset ; //editor cursor offset
conline_t * highlightline ; //used for highlights (this line gets flagged)
2014-03-30 08:55:06 +00:00
conline_t * completionline ; //temp text at the bottom of the console
2013-08-21 07:14:39 +00:00
conline_t * footerline ; //temp text at the bottom of the console
conline_t * selstartline , * selendline ;
unsigned int selstartoffset , selendoffset ;
2015-04-14 23:12:17 +00:00
int mousedown [ 2 ] ; //x,y position that the current buttons were clicked.
unsigned int buttonsdown ;
2013-08-21 07:14:39 +00:00
int mousecursor [ 2 ] ; //x,y
2005-01-13 16:50:37 +00:00
struct console_s * next ;
2004-08-23 00:15:46 +00:00
} console_t ;
extern console_t con_main ;
2015-04-14 23:12:17 +00:00
extern console_t * con_curwindow ; // refers to a windowed console
extern console_t * con_current ; // point to either con_main or con_chat
2013-06-26 03:38:27 +00:00
extern console_t * con_mouseover ;
2011-06-16 02:03:57 +00:00
extern console_t * con_chat ;
2004-08-23 00:15:46 +00:00
2012-11-27 03:23:19 +00:00
//shared between console and keys.
//really the console input should be in console.c instead of keys.c I suppose.
2013-04-13 08:15:18 +00:00
# define MAXCMDLINE 8192
2012-11-27 03:23:19 +00:00
# define CON_EDIT_LINES_MASK ((1<<6)-1)
2013-04-13 08:15:18 +00:00
extern unsigned char * key_lines [ CON_EDIT_LINES_MASK + 1 ] ;
2012-11-27 03:23:19 +00:00
extern int edit_line ;
extern int key_linepos ;
extern int history_line ;
2005-04-16 16:21:27 +00:00
extern int scr_chatmode ;
2004-08-23 00:15:46 +00:00
//extern int con_totallines;
extern qboolean con_initialized ;
extern qbyte * con_chars ;
void Con_DrawCharacter ( int cx , int line , int num ) ;
void Con_CheckResize ( void ) ;
2009-11-04 21:16:50 +00:00
void Con_ForceActiveNow ( void ) ;
2004-08-23 00:15:46 +00:00
void Con_Init ( void ) ;
2011-04-30 17:21:10 +00:00
void Con_Shutdown ( void ) ;
2014-10-05 20:04:11 +00:00
void Con_History_Save ( void ) ;
2012-11-27 03:23:19 +00:00
void Con_History_Load ( void ) ;
2013-08-21 07:14:39 +00:00
struct font_s ;
2016-07-12 00:40:13 +00:00
void Con_DrawOneConsole ( console_t * con , qboolean focused , struct font_s * font , float fx , float fy , float fsx , float fsy , float lineagelimit ) ;
2004-08-23 00:15:46 +00:00
void Con_DrawConsole ( int lines , qboolean noback ) ;
2015-04-14 23:12:17 +00:00
char * Con_CopyConsole ( console_t * con , qboolean nomarkup , qboolean onlyiflink ) ;
2016-01-18 05:22:07 +00:00
void Con_Print ( const char * txt ) ;
void Con_CenterPrint ( const char * txt ) ;
void Con_PrintFlags ( const char * text , unsigned int setflags , unsigned int clearflags ) ;
2009-11-04 21:16:50 +00:00
void VARGS Con_Printf ( const char * fmt , . . . ) LIKEPRINTF ( 1 ) ;
2004-08-23 00:15:46 +00:00
void VARGS Con_TPrintf ( translation_t text , . . . ) ;
2017-03-04 19:36:06 +00:00
void VARGS Con_DPrintf ( const char * fmt , . . . ) LIKEPRINTF ( 1 ) ; //developer>=1, for stuff that's probably actually slightly useful
void VARGS Con_DLPrintf ( int level , const char * fmt , . . . ) LIKEPRINTF ( 2 ) ; //developer>=2, for spammy stuff
2016-01-18 05:22:07 +00:00
void VARGS Con_SafePrintf ( const char * fmt , . . . ) LIKEPRINTF ( 1 ) ;
void Con_Footerf ( console_t * con , qboolean append , const char * fmt , . . . ) LIKEPRINTF ( 3 ) ;
2004-08-23 00:15:46 +00:00
void Con_Clear_f ( void ) ;
void Con_DrawNotify ( void ) ;
void Con_ClearNotify ( void ) ;
2013-08-21 07:14:39 +00:00
void Con_ToggleConsole_f ( void ) ; //note: allows csqc to intercept the toggleconsole
void Con_ToggleConsole_Force ( void ) ;
2004-08-23 00:15:46 +00:00
2015-04-14 23:12:17 +00:00
int Con_ExecuteLine ( console_t * con , char * line ) ; //takes normal console commands
2016-07-12 00:40:13 +00:00
int Con_Navigate ( console_t * con , char * line ) ; //special webbrowser hacks
2005-03-10 03:55:18 +00:00
2005-01-13 16:50:37 +00:00
void Con_CycleConsole ( void ) ;
2010-03-16 19:44:17 +00:00
int Con_IsActive ( console_t * con ) ;
2005-01-13 16:50:37 +00:00
void Con_Destroy ( console_t * con ) ;
2014-04-24 01:53:01 +00:00
void Con_ClearCon ( console_t * con ) ;
2006-02-11 14:51:36 +00:00
void Con_SetActive ( console_t * con ) ;
qboolean Con_NameForNum ( int num , char * buffer , int buffersize ) ;
2014-03-30 08:55:06 +00:00
console_t * Con_FindConsole ( const char * name ) ;
console_t * Con_Create ( const char * name , unsigned int flags ) ;
2016-01-18 05:22:07 +00:00
void Con_PrintCon ( console_t * con , const char * txt , unsigned int parseflags ) ;
2016-07-12 00:40:13 +00:00
qboolean Con_InsertConChars ( console_t * con , conline_t * line , int offset , conchar_t * c , int len ) ;
conline_t * Con_ResizeLineBuffer ( console_t * con , conline_t * old , unsigned int length ) ;
void Con_FlushBackgrounds ( void ) ;
2005-01-13 16:50:37 +00:00
2004-08-23 00:15:46 +00:00
void Con_NotifyBox ( char * text ) ; // during startup for sound / cd warnings
2004-10-07 13:00:48 +00:00
# ifdef CRAZYDEBUGGING
Android: fat presses, vibrator, onscreen keyboard, keep-screen-on, console scaling, touch-based console scrolling, additional bindables.
Some memory leaks fixed.
latency with the nq protocol over loopback is much reduced.
Terrain: now mostly a property of a (q1 for now) bsp map, file format changed, glsl now built in, terrain editor builtin improved/changed, holes supported.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4067 fc73d0e0-1445-4013-8a0c-d673dee63da5
2012-07-14 16:25:18 +00:00
# define TRACE(x) Sys_Printf x
2004-10-07 13:00:48 +00:00
# else
# define TRACE(x)
# endif
2013-11-21 23:02:28 +00:00