Quake-2

Quake 2 GPL Source Release
Log | Files | Refs

console.h (1705B)


      1 /*
      2 Copyright (C) 1997-2001 Id Software, Inc.
      3 
      4 This program is free software; you can redistribute it and/or
      5 modify it under the terms of the GNU General Public License
      6 as published by the Free Software Foundation; either version 2
      7 of the License, or (at your option) any later version.
      8 
      9 This program is distributed in the hope that it will be useful,
     10 but WITHOUT ANY WARRANTY; without even the implied warranty of
     11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     12 
     13 See the GNU General Public License for more details.
     14 
     15 You should have received a copy of the GNU General Public License
     16 along with this program; if not, write to the Free Software
     17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
     18 
     19 */
     20 
     21 //
     22 // console
     23 //
     24 
     25 #define	NUM_CON_TIMES 4
     26 
     27 #define		CON_TEXTSIZE	32768
     28 typedef struct
     29 {
     30 	qboolean	initialized;
     31 
     32 	char	text[CON_TEXTSIZE];
     33 	int		current;		// line where next message will be printed
     34 	int		x;				// offset in current line for next print
     35 	int		display;		// bottom of console displays this line
     36 
     37 	int		ormask;			// high bit mask for colored characters
     38 
     39 	int 	linewidth;		// characters across screen
     40 	int		totallines;		// total lines in console scrollback
     41 
     42 	float	cursorspeed;
     43 
     44 	int		vislines;
     45 
     46 	float	times[NUM_CON_TIMES];	// cls.realtime time the line was generated
     47 								// for transparent notify lines
     48 } console_t;
     49 
     50 extern	console_t	con;
     51 
     52 void Con_DrawCharacter (int cx, int line, int num);
     53 
     54 void Con_CheckResize (void);
     55 void Con_Init (void);
     56 void Con_DrawConsole (float frac);
     57 void Con_Print (char *txt);
     58 void Con_CenteredPrint (char *text);
     59 void Con_Clear_f (void);
     60 void Con_DrawNotify (void);
     61 void Con_ClearNotify (void);
     62 void Con_ToggleConsole_f (void);