doomdef.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. /*
  2. ===========================================================================
  3. Doom 3 BFG Edition GPL Source Code
  4. Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
  5. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
  6. Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
  16. In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
  17. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
  18. ===========================================================================
  19. */
  20. #ifndef __DOOMDEF__
  21. #define __DOOMDEF__
  22. #include <stdio.h>
  23. #include <string.h>
  24. #include "../../neo/sys/sys_public.h"
  25. //
  26. // Global parameters/defines.
  27. //
  28. // DOOM version
  29. enum { VERSION = 111 };
  30. // Game mode handling - identify IWAD version
  31. // to handle IWAD dependend animations etc.
  32. typedef enum
  33. {
  34. shareware, // DOOM 1 shareware, E1, M9
  35. registered, // DOOM 1 registered, E3, M27
  36. commercial, // DOOM 2 retail, E1 M34
  37. // DOOM 2 german edition not handled
  38. retail, // DOOM 1 retail, E4, M36
  39. indetermined // Well, no IWAD found.
  40. } GameMode_t;
  41. // Mission packs - might be useful for TC stuff?
  42. typedef enum
  43. {
  44. doom, // DOOM 1
  45. doom2, // DOOM 2
  46. pack_tnt, // TNT mission pack
  47. pack_plut, // Plutonia pack
  48. pack_master, // Master levels
  49. pack_nerve, // Nerve levels
  50. none
  51. } GameMission_t;
  52. // Identify language to use, software localization.
  53. typedef enum
  54. {
  55. english,
  56. german,
  57. unknown
  58. } Language_t;
  59. // If rangecheck is undefined,
  60. // most parameter validation debugging code will not be compiled
  61. #ifdef _DEBUG
  62. #define RANGECHECK
  63. #endif
  64. // Do or do not use external soundserver.
  65. // The sndserver binary to be run separately
  66. // has been introduced by Dave Taylor.
  67. // The integrated sound support is experimental,
  68. // and unfinished. Default is synchronous.
  69. // Experimental asynchronous timer based is
  70. // handled by SNDINTR.
  71. #define SNDSERV 1
  72. //#define SNDINTR 1
  73. // This one switches between MIT SHM (no proper mouse)
  74. // and XFree86 DGA (mickey sampling). The original
  75. // linuxdoom used SHM, which is default.
  76. //#define X11_DGA 1
  77. //
  78. // For resize of screen, at start of game.
  79. // It will not work dynamically, see visplanes.
  80. //
  81. //#define BASE_WIDTH 320
  82. // It is educational but futile to change this
  83. // scaling e.g. to 2. Drawing of status bar,
  84. // menues etc. is tied to the scale implied
  85. // by the graphics.
  86. #define SCREEN_MUL 1
  87. #define INV_ASPECT_RATIO 0.625 // 0.75, ideally
  88. // Defines suck. C sucks.
  89. // C++ might sucks for OOP, but it sure is a better C.
  90. // So there.
  91. //#define SCREENWIDTH 320//320
  92. //SCREEN_MUL*BASE_WIDTH //320
  93. //#define SCREENHEIGHT 200//200
  94. //(int)(SCREEN_MUL*BASE_WIDTH*INV_ASPECT_RATIO) //200
  95. // The maximum number of players, multiplayer/networking.
  96. #define MAXPLAYERS 4
  97. // State updates, number of tics / second.
  98. #define TICRATE 35
  99. // The current state of the game: whether we are
  100. // playing, gazing at the intermission screen,
  101. // the game final animation, or a demo.
  102. typedef enum
  103. {
  104. GS_LEVEL,
  105. GS_INTERMISSION,
  106. GS_FINALE,
  107. GS_DEMOSCREEN
  108. } gamestate_t;
  109. //
  110. // Difficulty/skill settings/filters.
  111. //
  112. // Skill flags.
  113. #define MTF_EASY 1
  114. #define MTF_NORMAL 2
  115. #define MTF_HARD 4
  116. // Deaf monsters/do not react to sound.
  117. #define MTF_AMBUSH 8
  118. typedef enum
  119. {
  120. sk_baby,
  121. sk_easy,
  122. sk_medium,
  123. sk_hard,
  124. sk_nightmare
  125. } skill_t;
  126. //
  127. // Key cards.
  128. //
  129. typedef enum
  130. {
  131. it_bluecard,
  132. it_yellowcard,
  133. it_redcard,
  134. it_blueskull,
  135. it_yellowskull,
  136. it_redskull,
  137. NUMCARDS
  138. } card_t;
  139. // The defined weapons,
  140. // including a marker indicating
  141. // user has not changed weapon.
  142. typedef enum
  143. {
  144. wp_fist,
  145. wp_pistol,
  146. wp_shotgun,
  147. wp_chaingun,
  148. wp_missile,
  149. wp_plasma,
  150. wp_bfg,
  151. wp_chainsaw,
  152. wp_supershotgun,
  153. NUMWEAPONS,
  154. // No pending weapon change.
  155. wp_nochange
  156. } weapontype_t;
  157. // Ammunition types defined.
  158. typedef enum
  159. {
  160. am_clip, // Pistol / chaingun ammo.
  161. am_shell, // Shotgun / double barreled shotgun.
  162. am_cell, // Plasma rifle, BFG.
  163. am_misl, // Missile launcher.
  164. NUMAMMO,
  165. am_noammo // Unlimited for chainsaw / fist.
  166. } ammotype_t;
  167. // Power up artifacts.
  168. typedef enum
  169. {
  170. pw_invulnerability,
  171. pw_strength,
  172. pw_invisibility,
  173. pw_ironfeet,
  174. pw_allmap,
  175. pw_infrared,
  176. NUMPOWERS
  177. } powertype_t;
  178. //
  179. // Power up durations,
  180. // how many seconds till expiration,
  181. // assuming TICRATE is 35 ticks/second.
  182. //
  183. typedef enum
  184. {
  185. INVULNTICS = (30*TICRATE),
  186. INVISTICS = (60*TICRATE),
  187. INFRATICS = (120*TICRATE),
  188. IRONTICS = (60*TICRATE)
  189. } powerduration_t;
  190. //
  191. // DOOM keyboard definition.
  192. // This is the stuff configured by Setup.Exe.
  193. // Most key data are simple ascii (uppercased).
  194. //
  195. #define KEY_RIGHTARROW K_RIGHTARROW
  196. #define KEY_LEFTARROW K_LEFTARROW
  197. #define KEY_UPARROW K_UPARROW
  198. #define KEY_DOWNARROW K_DOWNARROW
  199. #define KEY_ESCAPE K_ESCAPE
  200. #define KEY_ENTER K_ENTER
  201. #define KEY_TAB K_TAB
  202. #define KEY_F1 K_F1
  203. #define KEY_F2 K_F2
  204. #define KEY_F3 K_F3
  205. #define KEY_F4 K_F4
  206. #define KEY_F5 K_F5
  207. #define KEY_F6 K_F6
  208. #define KEY_F7 K_F7
  209. #define KEY_F8 K_F8
  210. #define KEY_F9 K_F9
  211. #define KEY_F10 K_F10
  212. #define KEY_F11 K_F11
  213. #define KEY_F12 K_F12
  214. #define KEY_BACKSPACE K_BACKSPACE
  215. #define KEY_PAUSE 0xff
  216. #define KEY_EQUALS K_EQUALS
  217. #define KEY_MINUS K_MINUS
  218. #define KEY_RSHIFT K_RSHIFT
  219. #define KEY_RCTRL K_RCTRL
  220. #define KEY_RALT K_RALT
  221. #define KEY_LALT K_LALT
  222. // DOOM basic types (qboolean),
  223. // and max/min values.
  224. //#include "doomtype.h"
  225. // Fixed point.
  226. //#include "m_fixed.h"
  227. // Endianess handling.
  228. //#include "m_swap.h"
  229. // Binary Angles, sine/cosine/atan lookups.
  230. //#include "tables.h"
  231. // Event type.
  232. //#include "d_event.h"
  233. // Game function, skills.
  234. //#include "g_game.h"
  235. // All external data is defined here.
  236. //#include "doomdata.h"
  237. // All important printed strings.
  238. // Language selection (message strings).
  239. //#include "dstrings.h"
  240. // Player is a special actor.
  241. //struct player_s;
  242. //#include "d_items.h"
  243. //#include "d_player.h"
  244. //#include "p_mobj.h"
  245. //#include "d_net.h"
  246. // PLAY
  247. //#include "p_tick.h"
  248. // Header, generated by sound utility.
  249. // The utility was written by Dave Taylor.
  250. //#include "sounds.h"
  251. #endif // __DOOMDEF__