bothdefs.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. // defs common to client and server
  16. #define GLQUAKE_VERSION 1.00
  17. #define VERSION 2.40
  18. #define LINUX_VERSION 0.98
  19. #if (defined(_M_IX86) || defined(__i386__)) && !defined(id386)
  20. #define id386 1
  21. #else
  22. #define id386 0
  23. #endif
  24. #ifdef SERVERONLY // no asm in dedicated server
  25. #undef id386
  26. #endif
  27. #if id386
  28. #define UNALIGNED_OK 1 // set to 0 if unaligned accesses are not supported
  29. #else
  30. #define UNALIGNED_OK 0
  31. #endif
  32. // !!! if this is changed, it must be changed in d_ifacea.h too !!!
  33. #define CACHE_SIZE 32 // used to align key data structures
  34. #define UNUSED(x) (x = x) // for pesky compiler / lint warnings
  35. #define MINIMUM_MEMORY 0x550000
  36. // up / down
  37. #define PITCH 0
  38. // left / right
  39. #define YAW 1
  40. // fall over
  41. #define ROLL 2
  42. #define MAX_SCOREBOARD 16 // max numbers of players
  43. #define SOUND_CHANNELS 8
  44. #define MAX_QPATH 64 // max length of a quake game pathname
  45. #define MAX_OSPATH 128 // max length of a filesystem pathname
  46. #define ON_EPSILON 0.1 // point on plane side epsilon
  47. #define MAX_MSGLEN 1450 // max length of a reliable message
  48. #define MAX_DATAGRAM 1450 // max length of unreliable message
  49. //
  50. // per-level limits
  51. //
  52. #define MAX_EDICTS 768 // FIXME: ouch! ouch! ouch!
  53. #define MAX_LIGHTSTYLES 64
  54. #define MAX_MODELS 256 // these are sent over the net as bytes
  55. #define MAX_SOUNDS 256 // so they cannot be blindly increased
  56. #define SAVEGAME_COMMENT_LENGTH 39
  57. #define MAX_STYLESTRING 64
  58. //
  59. // stats are integers communicated to the client by the server
  60. //
  61. #define MAX_CL_STATS 32
  62. #define STAT_HEALTH 0
  63. //define STAT_FRAGS 1
  64. #define STAT_WEAPON 2
  65. #define STAT_AMMO 3
  66. #define STAT_ARMOR 4
  67. //define STAT_WEAPONFRAME 5
  68. #define STAT_SHELLS 6
  69. #define STAT_NAILS 7
  70. #define STAT_ROCKETS 8
  71. #define STAT_CELLS 9
  72. #define STAT_ACTIVEWEAPON 10
  73. #define STAT_TOTALSECRETS 11
  74. #define STAT_TOTALMONSTERS 12
  75. #define STAT_SECRETS 13 // bumped on client side by svc_foundsecret
  76. #define STAT_MONSTERS 14 // bumped by svc_killedmonster
  77. #define STAT_ITEMS 15
  78. //define STAT_VIEWHEIGHT 16
  79. //
  80. // item flags
  81. //
  82. #define IT_SHOTGUN 1
  83. #define IT_SUPER_SHOTGUN 2
  84. #define IT_NAILGUN 4
  85. #define IT_SUPER_NAILGUN 8
  86. #define IT_GRENADE_LAUNCHER 16
  87. #define IT_ROCKET_LAUNCHER 32
  88. #define IT_LIGHTNING 64
  89. #define IT_SUPER_LIGHTNING 128
  90. #define IT_SHELLS 256
  91. #define IT_NAILS 512
  92. #define IT_ROCKETS 1024
  93. #define IT_CELLS 2048
  94. #define IT_AXE 4096
  95. #define IT_ARMOR1 8192
  96. #define IT_ARMOR2 16384
  97. #define IT_ARMOR3 32768
  98. #define IT_SUPERHEALTH 65536
  99. #define IT_KEY1 131072
  100. #define IT_KEY2 262144
  101. #define IT_INVISIBILITY 524288
  102. #define IT_INVULNERABILITY 1048576
  103. #define IT_SUIT 2097152
  104. #define IT_QUAD 4194304
  105. #define IT_SIGIL1 (1<<28)
  106. #define IT_SIGIL2 (1<<29)
  107. #define IT_SIGIL3 (1<<30)
  108. #define IT_SIGIL4 (1<<31)
  109. //
  110. // print flags
  111. //
  112. #define PRINT_LOW 0 // pickup messages
  113. #define PRINT_MEDIUM 1 // death messages
  114. #define PRINT_HIGH 2 // critical messages
  115. #define PRINT_CHAT 3 // chat messages