doomstat.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. /* Emacs style mode select -*- C++ -*-
  2. *-----------------------------------------------------------------------------
  3. *
  4. *
  5. * PrBoom: a Doom port merged with LxDoom and LSDLDoom
  6. * based on BOOM, a modified and improved DOOM engine
  7. * Copyright (C) 1999 by
  8. * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
  9. * Copyright (C) 1999-2006 by
  10. * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
  11. * Copyright 2005, 2006 by
  12. * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License
  16. * as published by the Free Software Foundation; either version 2
  17. * of the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  27. * 02111-1307, USA.
  28. *
  29. * DESCRIPTION:
  30. * All the global variables that store the internal state.
  31. * Theoretically speaking, the internal state of the engine
  32. * should be found by looking at the variables collected
  33. * here, and every relevant module will have to include
  34. * this header file.
  35. * In practice, things are a bit messy.
  36. *
  37. *-----------------------------------------------------------------------------*/
  38. #ifndef __D_STATE__
  39. #define __D_STATE__
  40. // We need the playr data structure as well.
  41. #include "d_player.h"
  42. // ------------------------
  43. // Command line parameters.
  44. //
  45. extern boolean nomonsters; // checkparm of -nomonsters
  46. extern boolean respawnparm; // checkparm of -respawn
  47. extern boolean fastparm; // checkparm of -fast
  48. extern boolean devparm; // DEBUG: launched with -devparm
  49. // -----------------------------------------------------
  50. // Game Mode - identify IWAD as shareware, retail etc.
  51. //
  52. extern GameMode_t gamemode;
  53. extern GameMission_t gamemission;
  54. // Set if homebrew PWAD stuff has been added.
  55. extern boolean modifiedgame;
  56. // CPhipps - new compatibility handling
  57. extern complevel_t compatibility_level, default_compatibility_level;
  58. // CPhipps - old compatibility testing flags aliased to new handling
  59. #define compatibility (compatibility_level<=boom_compatibility_compatibility)
  60. #define demo_compatibility (compatibility_level < boom_compatibility_compatibility)
  61. #define mbf_features (compatibility_level>=mbf_compatibility)
  62. // v1.1-like pitched sounds
  63. extern int pitched_sounds; // killough
  64. extern int default_translucency; // config file says // phares
  65. extern boolean general_translucency; // true if translucency is ok // phares
  66. extern int demo_insurance, default_demo_insurance; // killough 4/5/98
  67. // -------------------------------------------
  68. // killough 10/98: compatibility vector
  69. enum {
  70. comp_telefrag,
  71. comp_dropoff,
  72. comp_vile,
  73. comp_pain,
  74. comp_skull,
  75. comp_blazing,
  76. comp_doorlight,
  77. comp_model,
  78. comp_god,
  79. comp_falloff,
  80. comp_floors,
  81. comp_skymap,
  82. comp_pursuit,
  83. comp_doorstuck,
  84. comp_staylift,
  85. comp_zombie,
  86. comp_stairs,
  87. comp_infcheat,
  88. comp_zerotags,
  89. comp_moveblock,
  90. comp_respawn, /* cph - this is the inverse of comp_respawnfix from eternity */
  91. comp_sound,
  92. comp_666,
  93. comp_soul,
  94. comp_maskedanim,
  95. COMP_NUM, /* cph - should be last in sequence */
  96. COMP_TOTAL=32 // Some extra room for additional variables
  97. };
  98. extern int comp[COMP_TOTAL], default_comp[COMP_TOTAL];
  99. // -------------------------------------------
  100. // Language.
  101. extern Language_t language;
  102. // -------------------------------------------
  103. // Selected skill type, map etc.
  104. //
  105. // Defaults for menu, methinks.
  106. extern skill_t startskill;
  107. extern int startepisode;
  108. extern int startmap;
  109. extern boolean autostart;
  110. // Selected by user.
  111. extern skill_t gameskill;
  112. extern int gameepisode;
  113. extern int gamemap;
  114. // Nightmare mode flag, single player.
  115. extern boolean respawnmonsters;
  116. // Netgame? Only true if >1 player.
  117. extern boolean netgame;
  118. // Flag: true only if started as net deathmatch.
  119. // An enum might handle altdeath/cooperative better.
  120. extern boolean deathmatch;
  121. // ------------------------------------------
  122. // Internal parameters for sound rendering.
  123. // These have been taken from the DOS version,
  124. // but are not (yet) supported with Linux
  125. // (e.g. no sound volume adjustment with menu.
  126. // These are not used, but should be (menu).
  127. // From m_menu.c:
  128. // Sound FX volume has default, 0 - 15
  129. // Music volume has default, 0 - 15
  130. // These are multiplied by 8.
  131. extern int snd_SfxVolume; // maximum volume for sound
  132. extern int snd_MusicVolume; // maximum volume for music
  133. // CPhipps - screen parameters
  134. extern int desired_screenwidth, desired_screenheight;
  135. // -------------------------
  136. // Status flags for refresh.
  137. //
  138. enum automapmode_e {
  139. am_none = 0,
  140. am_active = 1, // currently shown
  141. am_overlay= 2, // covers the screen, i.e. not overlay mode
  142. am_rotate = 4, // rotates to the player facing direction
  143. am_follow = 8, // keep the player centred
  144. am_grid =16, // show grid
  145. };
  146. extern enum automapmode_e automapmode; // Mode that the automap is in
  147. extern boolean menuactive; // Menu overlayed?
  148. extern boolean paused; // Game Pause?
  149. extern boolean nodrawers;
  150. extern boolean noblit;
  151. // This one is related to the 3-screen display mode.
  152. // ANG90 = left side, ANG270 = right
  153. extern int viewangleoffset;
  154. // Player taking events, and displaying.
  155. extern int consoleplayer;
  156. extern int displayplayer;
  157. // -------------------------------------
  158. // Scores, rating.
  159. // Statistics on a given map, for intermission.
  160. //
  161. extern int totalkills, totallive;
  162. extern int totalitems;
  163. extern int totalsecret;
  164. // Timer, for scores.
  165. extern int basetic; /* killough 9/29/98: levelstarttic, adjusted */
  166. extern int leveltime; // tics in game play for par
  167. // --------------------------------------
  168. // DEMO playback/recording related stuff.
  169. extern boolean usergame;
  170. extern boolean demoplayback;
  171. extern boolean demorecording;
  172. extern int demover;
  173. // Quit after playing a demo from cmdline.
  174. extern boolean singledemo;
  175. // Print timing information after quitting. killough
  176. extern boolean timingdemo;
  177. // Run tick clock at fastest speed possible while playing demo. killough
  178. extern boolean fastdemo;
  179. extern gamestate_t gamestate;
  180. //-----------------------------
  181. // Internal parameters, fixed.
  182. // These are set by the engine, and not changed
  183. // according to user inputs. Partly load from
  184. // WAD, partly set at startup time.
  185. extern int gametic;
  186. // Bookkeeping on players - state.
  187. extern player_t players[MAXPLAYERS];
  188. // Alive? Disconnected?
  189. extern boolean playeringame[MAXPLAYERS];
  190. extern boolean realplayeringame[MAXPLAYERS];
  191. extern mapthing_t *deathmatchstarts; // killough
  192. extern size_t num_deathmatchstarts; // killough
  193. extern mapthing_t *deathmatch_p;
  194. // Player spawn spots.
  195. extern mapthing_t playerstarts[];
  196. // Intermission stats.
  197. // Parameters for world map / intermission.
  198. extern wbstartstruct_t wminfo;
  199. //-----------------------------------------
  200. // Internal parameters, used for engine.
  201. //
  202. // File handling stuff.
  203. extern FILE *debugfile;
  204. // if true, load all graphics at level load
  205. extern boolean precache;
  206. // wipegamestate can be set to -1
  207. // to force a wipe on the next draw
  208. extern gamestate_t wipegamestate;
  209. extern int mouseSensitivity_horiz; // killough
  210. extern int mouseSensitivity_vert;
  211. // debug flag to cancel adaptiveness
  212. extern boolean singletics;
  213. extern int bodyqueslot;
  214. // Needed to store the number of the dummy sky flat.
  215. // Used for rendering, as well as tracking projectiles etc.
  216. extern int skyflatnum;
  217. extern int maketic;
  218. // Networking and tick handling related.
  219. #ifdef IPHONE
  220. #define BACKUPTICS 32 // JDC: changed from 12 to 16 to allow and masking instead of mod
  221. #define BACKUPTICMASK (BACKUPTICS-1) // JDC
  222. #else
  223. #define BACKUPTICS 12
  224. #endif
  225. extern ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS]; // JDC: added MAXPLAYERS
  226. extern int ticdup;
  227. //-----------------------------------------------------------------------------
  228. extern int allow_pushers; // MT_PUSH Things // phares 3/10/98
  229. extern int default_allow_pushers;
  230. extern int variable_friction; // ice & mud // phares 3/10/98
  231. extern int default_variable_friction;
  232. extern int monsters_remember; // killough 3/1/98
  233. extern int default_monsters_remember;
  234. extern int weapon_recoil; // weapon recoil // phares
  235. extern int default_weapon_recoil;
  236. extern int player_bobbing; // whether player bobs or not // phares 2/25/98
  237. extern int default_player_bobbing; // killough 3/1/98: make local to each game
  238. #ifdef DOGS
  239. extern int dogs, default_dogs; // killough 7/19/98: Marine's best friend :)
  240. extern int dog_jumping, default_dog_jumping; // killough 10/98
  241. #endif
  242. /* killough 8/8/98: distance friendly monsters tend to stay from player */
  243. extern int distfriend, default_distfriend;
  244. /* killough 9/8/98: whether monsters are allowed to strafe or retreat */
  245. extern int monster_backing, default_monster_backing;
  246. /* killough 9/9/98: whether monsters intelligently avoid hazards */
  247. extern int monster_avoid_hazards, default_monster_avoid_hazards;
  248. /* killough 10/98: whether monsters are affected by friction */
  249. extern int monster_friction, default_monster_friction;
  250. /* killough 9/9/98: whether monsters help friends */
  251. extern int help_friends, default_help_friends;
  252. extern int flashing_hom; // killough 10/98
  253. extern int doom_weapon_toggles; // killough 10/98
  254. /* killough 7/19/98: whether monsters should fight against each other */
  255. extern int monster_infighting, default_monster_infighting;
  256. extern int monkeys, default_monkeys;
  257. extern int HelperThing; // type of thing to use for helper
  258. #endif