console.h 1.7 KB

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