quakedef.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. // quakedef.h -- primary header for client
  16. #define QUAKE_GAME // as opposed to utilities
  17. //define PARANOID // speed sapping error checking
  18. #ifdef _WIN32
  19. #pragma warning( disable : 4244 4127 4201 4214 4514 4305 4115 4018)
  20. #endif
  21. #include <math.h>
  22. #include <string.h>
  23. #include <stdarg.h>
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include <setjmp.h>
  27. #include <time.h>
  28. #include "bothdefs.h"
  29. #include "common.h"
  30. #include "bspfile.h"
  31. #include "vid.h"
  32. #include "sys.h"
  33. #include "zone.h"
  34. #include "mathlib.h"
  35. #include "wad.h"
  36. #include "draw.h"
  37. #include "cvar.h"
  38. #include "screen.h"
  39. #include "net.h"
  40. #include "protocol.h"
  41. #include "cmd.h"
  42. #include "sbar.h"
  43. #include "sound.h"
  44. #include "render.h"
  45. #include "client.h"
  46. #ifdef GLQUAKE
  47. #include "gl_model.h"
  48. #else
  49. #include "model.h"
  50. #include "d_iface.h"
  51. #endif
  52. #include "input.h"
  53. #include "keys.h"
  54. #include "console.h"
  55. #include "view.h"
  56. #include "menu.h"
  57. #include "crc.h"
  58. #include "cdaudio.h"
  59. #include "pmove.h"
  60. #ifdef GLQUAKE
  61. #include "glquake.h"
  62. #endif
  63. #ifndef max
  64. #define max(a,b) ((a) > (b) ? (a) : (b))
  65. #define min(a,b) ((a) < (b) ? (a) : (b))
  66. #endif
  67. //=============================================================================
  68. // the host system specifies the base of the directory tree, the
  69. // command line parms passed to the program, and the amount of memory
  70. // available for the program to use
  71. typedef struct
  72. {
  73. char *basedir;
  74. char *cachedir; // for development over ISDN lines
  75. int argc;
  76. char **argv;
  77. void *membase;
  78. int memsize;
  79. } quakeparms_t;
  80. //=============================================================================
  81. #define MAX_NUM_ARGVS 50
  82. extern qboolean noclip_anglehack;
  83. //
  84. // host
  85. //
  86. extern quakeparms_t host_parms;
  87. extern cvar_t sys_ticrate;
  88. extern cvar_t sys_nostdout;
  89. extern cvar_t developer;
  90. extern cvar_t password;
  91. extern qboolean host_initialized; // true if into command execution
  92. extern double host_frametime;
  93. extern byte *host_basepal;
  94. extern byte *host_colormap;
  95. extern int host_framecount; // incremented every frame, never reset
  96. extern double realtime; // not bounded in any way, changed at
  97. // start of every frame, never reset
  98. void Host_ServerFrame (void);
  99. void Host_InitCommands (void);
  100. void Host_Init (quakeparms_t *parms);
  101. void Host_Shutdown(void);
  102. void Host_Error (char *error, ...);
  103. void Host_EndGame (char *message, ...);
  104. qboolean Host_SimulationTime(float time);
  105. void Host_Frame (float time);
  106. void Host_Quit_f (void);
  107. void Host_ClientCommands (char *fmt, ...);
  108. void Host_ShutdownServer (qboolean crash);
  109. extern qboolean msg_suppress_1; // suppresses resolution and cache size console output
  110. // an fullscreen DIB focus gain/loss