doomstat.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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 __D_STATE__
  21. #define __D_STATE__
  22. // We need globally shared data structures,
  23. // for defining the global state variables.
  24. #include "doomdata.h"
  25. #include "d_net.h"
  26. // We need the playr data structure as well.
  27. #include "d_player.h"
  28. #ifdef __GNUG__
  29. #pragma interface
  30. #endif
  31. // ------------------------
  32. // Command line parameters.
  33. //
  34. extern qboolean nomonsters; // checkparm of -nomonsters
  35. extern qboolean respawnparm; // checkparm of -respawn
  36. extern qboolean fastparm; // checkparm of -fast
  37. extern qboolean devparm; // DEBUG: launched with -devparm
  38. // -----------------------------------------------------
  39. // Game Mode - identify IWAD as shareware, retail etc.
  40. //
  41. extern GameMode_t gamemode;
  42. extern int gamemission;
  43. // Set if homebrew PWAD stuff has been added.
  44. extern qboolean modifiedgame;
  45. // -------------------------------------------
  46. // Language.
  47. extern Language_t language;
  48. // -------------------------------------------
  49. // Selected skill type, map etc.
  50. //
  51. // Defaults for menu, methinks.
  52. extern skill_t startskill;
  53. extern int startepisode;
  54. extern int startmap;
  55. extern qboolean autostart;
  56. // Selected by user.
  57. extern skill_t gameskill;
  58. extern int gameepisode;
  59. extern int gamemap;
  60. // Nightmare mode flag, single player.
  61. extern qboolean respawnmonsters;
  62. // Netgame? Only true if >1 player.
  63. extern qboolean netgame;
  64. // Flag: true only if started as net deathmatch.
  65. // An enum might handle altdeath/cooperative better.
  66. extern qboolean deathmatch;
  67. // -------------------------
  68. // Internal parameters for sound rendering.
  69. // These have been taken from the DOS version,
  70. // but are not (yet) supported with Linux
  71. // (e.g. no sound volume adjustment with menu.
  72. // Current music/sfx card - index useless
  73. // w/o a reference LUT in a sound module.
  74. // Ideally, this would use indices found
  75. // in: /usr/include/linux/soundcard.h
  76. extern int snd_MusicDevice;
  77. extern int snd_SfxDevice;
  78. // Config file? Same disclaimer as above.
  79. extern int snd_DesiredMusicDevice;
  80. extern int snd_DesiredSfxDevice;
  81. // -------------------------
  82. // Status flags for refresh.
  83. //
  84. // Depending on view size - no status bar?
  85. // Note that there is no way to disable the
  86. // status bar explicitely.
  87. extern qboolean statusbaractive;
  88. extern qboolean automapactive; // In AutoMap mode?
  89. extern qboolean menuactive; // Menu overlayed?
  90. extern qboolean paused; // Game Pause?
  91. extern qboolean viewactive;
  92. extern qboolean nodrawers;
  93. extern qboolean noblit;
  94. extern int viewwindowx;
  95. extern int viewwindowy;
  96. extern int viewheight;
  97. extern int viewwidth;
  98. extern int scaledviewwidth;
  99. // This one is related to the 3-screen display mode.
  100. // ANG90 = left side, ANG270 = right
  101. extern int viewangleoffset;
  102. // Player taking events, and displaying.
  103. extern int consoleplayer;
  104. extern int displayplayer;
  105. // -------------------------------------
  106. // Scores, rating.
  107. // Statistics on a given map, for intermission.
  108. //
  109. extern int totalkills;
  110. extern int totalitems;
  111. extern int totalsecret;
  112. // Timer, for scores.
  113. extern int levelstarttic; // gametic at level start
  114. extern int leveltime; // tics in game play for par
  115. // --------------------------------------
  116. // DEMO playback/recording related stuff.
  117. // No demo, there is a human player in charge?
  118. // Disable save/end game?
  119. extern qboolean usergame;
  120. //?
  121. extern qboolean demoplayback;
  122. // Quit after playing a demo from cmdline.
  123. extern qboolean singledemo;
  124. //?
  125. extern gamestate_t gamestate;
  126. //-----------------------------
  127. // Internal parameters, fixed.
  128. // These are set by the engine, and not changed
  129. // according to user inputs. Partly load from
  130. // WAD, partly set at startup time.
  131. extern int gametic;
  132. // Bookkeeping on players - state.
  133. extern player_t players[MAXPLAYERS];
  134. // Alive? Disconnected?
  135. extern qboolean playeringame[MAXPLAYERS];
  136. // Player spawn spots for deathmatch.
  137. #define MAX_DM_STARTS 10
  138. extern mapthing_t deathmatchstarts[MAX_DM_STARTS];
  139. extern mapthing_t* deathmatch_p;
  140. // Player spawn spots.
  141. extern mapthing_t playerstarts[MAXPLAYERS];
  142. // Intermission stats.
  143. // Parameters for world map / intermission.
  144. extern wbstartstruct_t wminfo;
  145. // LUT of ammunition limits for each kind.
  146. // This doubles with BackPack powerup item.
  147. const extern int maxammo[NUMAMMO];
  148. //-----------------------------------------
  149. // Internal parameters, used for engine.
  150. //
  151. // File handling stuff.
  152. extern char basedefault[1024];
  153. extern FILE* debugfile;
  154. // if true, load all graphics at level load
  155. extern qboolean precache;
  156. // wipegamestate can be set to -1
  157. // to force a wipe on the next draw
  158. extern gamestate_t wipegamestate;
  159. extern int mouseSensitivity;
  160. //?
  161. // debug flag to cancel adaptiveness
  162. extern qboolean singletics;
  163. extern int bodyqueslot;
  164. // Needed to store the number of the dummy sky flat.
  165. // Used for rendering,
  166. // as well as tracking projectiles etc.
  167. extern int skyflatnum;
  168. // Netgame stuff (buffers and pointers, i.e. indices).
  169. // This is ???
  170. extern doomcom_t doomcom;
  171. // This points inside doomcom.
  172. extern doomdata_t* netbuffer;
  173. extern ticcmd_t localcmds[BACKUPTICS];
  174. extern int rndindex;
  175. extern int maketic;
  176. extern int nettics[MAXNETNODES];
  177. extern ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
  178. extern int ticdup;
  179. #endif