console.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. Copyright (C) 1996-1997 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 CON_TEXTSIZE 16384
  19. typedef struct
  20. {
  21. char text[CON_TEXTSIZE];
  22. int current; // line where next message will be printed
  23. int x; // offset in current line for next print
  24. int display; // bottom of console displays this line
  25. } console_t;
  26. extern console_t con_main;
  27. extern console_t con_chat;
  28. extern console_t *con; // point to either con_main or con_chat
  29. extern int con_ormask;
  30. extern int con_totallines;
  31. extern qboolean con_initialized;
  32. extern byte *con_chars;
  33. extern int con_notifylines; // scan lines to clear for notify lines
  34. void Con_DrawCharacter (int cx, int line, int num);
  35. void Con_CheckResize (void);
  36. void Con_Init (void);
  37. void Con_DrawConsole (int lines);
  38. void Con_Print (char *txt);
  39. void Con_Printf (char *fmt, ...);
  40. void Con_DPrintf (char *fmt, ...);
  41. void Con_SafePrintf (char *fmt, ...);
  42. void Con_Clear_f (void);
  43. void Con_DrawNotify (void);
  44. void Con_ClearNotify (void);
  45. void Con_ToggleConsole_f (void);
  46. void Con_NotifyBox (char *text); // during startup for sound / cd warnings