home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser-CD 2000 January / LCD_01_2000.iso / games / doom / pmdoom / include / doomstat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-17  |  7.8 KB  |  302 lines

  1. /*  Emacs style mode select   -*- C++ -*-  */
  2. /* ----------------------------------------------------------------------------- */
  3. /*  */
  4. /*  $Id:$ */
  5. /*  */
  6. /*  Copyright (C) 1993-1996 by id Software, Inc. */
  7. /*  */
  8. /*  This source is available for distribution and/or modification */
  9. /*  only under the terms of the DOOM Source Code License as */
  10. /*  published by id Software. All rights reserved. */
  11. /*  */
  12. /*  The source is distributed in the hope that it will be useful, */
  13. /*  but WITHOUT ANY WARRANTY; without even the implied warranty of */
  14. /*  FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License */
  15. /*  for more details. */
  16. /*  */
  17. /*  DESCRIPTION: */
  18. /*    All the global variables that store the internal state. */
  19. /*    Theoretically speaking, the internal state of the engine */
  20. /*     should be found by looking at the variables collected */
  21. /*     here, and every relevant module will have to include */
  22. /*     this header file. */
  23. /*    In practice, things are a bit messy. */
  24. /*  */
  25. /* ----------------------------------------------------------------------------- */
  26.  
  27.  
  28. #ifndef __D_STATE__
  29. #define __D_STATE__
  30.  
  31. /*  We need globally shared data structures, */
  32. /*   for defining the global state variables. */
  33. #include "doomdata.h"
  34. #include "d_net.h"
  35.  
  36. /*  We need the playr data structure as well. */
  37. #include "d_player.h"
  38.  
  39.  
  40. #ifdef __GNUG__
  41. #pragma interface
  42. #endif
  43.  
  44.  
  45.  
  46. /*  ------------------------ */
  47. /*  Command line parameters. */
  48. /*  */
  49. extern  boolean    nomonsters;    /*  checkparm of -nomonsters */
  50. extern  boolean    respawnparm;    /*  checkparm of -respawn */
  51. extern  boolean    fastparm;    /*  checkparm of -fast */
  52.  
  53. extern  boolean    devparm;    /*  DEBUG: launched with -devparm */
  54.  
  55. /* Video options */
  56.  
  57. /*extern boolean dblbuffer;*/    /* double buffered screen ? */
  58. /*extern boolean video8,video15,video16,video24;*/    /* force bpp */
  59. /*extern boolean pixelinv;*/    /* byte swapped true colour pixels ? */
  60. /*extern boolean zoomscreen;*/    /* Zoom to fill screen */
  61.  
  62. /*  ----------------------------------------------------- */
  63. /*  Game Mode - identify IWAD as shareware, retail etc. */
  64. /*  */
  65. extern GameMode_t    gamemode;
  66. extern GameMission_t    gamemission;
  67.  
  68. /*  Set if homebrew PWAD stuff has been added. */
  69. extern  boolean    modifiedgame;
  70.  
  71.  
  72. /*  ------------------------------------------- */
  73. /*  Language. */
  74. extern  Language_t   language;
  75.  
  76.  
  77. /*  ------------------------------------------- */
  78. /*  Selected skill type, map etc. */
  79. /*  */
  80.  
  81. /*  Defaults for menu, methinks. */
  82. extern  skill_t        startskill;
  83. extern  int             startepisode;
  84. extern    int        startmap;
  85.  
  86. extern  boolean        autostart;
  87.  
  88. /*  Selected by user.  */
  89. extern  skill_t         gameskill;
  90. extern  int        gameepisode;
  91. extern  int        gamemap;
  92.  
  93. /*  Nightmare mode flag, single player. */
  94. extern  boolean         respawnmonsters;
  95.  
  96. /*  Netgame? Only true if >1 player. */
  97. extern  boolean    netgame;
  98.  
  99. /*  Flag: true only if started as net deathmatch. */
  100. /*  An enum might handle altdeath/cooperative better. */
  101. extern  boolean    deathmatch;    
  102.     
  103. /*  ------------------------- */
  104. /*  Internal parameters for sound rendering. */
  105. /*  These have been taken from the DOS version, */
  106. /*   but are not (yet) supported with Linux */
  107. /*   (e.g. no sound volume adjustment with menu. */
  108.  
  109. /*  These are not used, but should be (menu). */
  110. /*  From m_menu.c: */
  111. /*   Sound FX volume has default, 0 - 15 */
  112. /*   Music volume has default, 0 - 15 */
  113. /*  These are multiplied by 8. */
  114. extern int snd_SfxVolume;      /*  maximum volume for sound */
  115. extern int snd_MusicVolume;    /*  maximum volume for music */
  116.  
  117. /*  Current music/sfx card - index useless */
  118. /*   w/o a reference LUT in a sound module. */
  119. /*  Ideally, this would use indices found */
  120. /*   in: /usr/include/linux/soundcard.h */
  121. extern int snd_MusicDevice;
  122. extern int snd_SfxDevice;
  123. /*  Config file? Same disclaimer as above. */
  124. extern int snd_DesiredMusicDevice;
  125. extern int snd_DesiredSfxDevice;
  126.  
  127.  
  128. /*  ------------------------- */
  129. /*  Status flags for refresh. */
  130. /*  */
  131.  
  132. /*  Depending on view size - no status bar? */
  133. /*  Note that there is no way to disable the */
  134. /*   status bar explicitely. */
  135. extern  boolean statusbaractive;
  136.  
  137. extern  boolean automapactive;    /*  In AutoMap mode? */
  138. extern  boolean    menuactive;    /*  Menu overlayed? */
  139. extern  boolean    paused;        /*  Game Pause? */
  140.  
  141.  
  142. extern  boolean        viewactive;
  143.  
  144. extern  boolean        nodrawers;
  145. extern  boolean        noblit;
  146.  
  147. extern    int        viewwindowx;
  148. extern    int        viewwindowy;
  149. extern    int        viewheight;
  150. extern    int        viewwidth;
  151. extern    int        scaledviewwidth;
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158. /*  This one is related to the 3-screen display mode. */
  159. /*  ANG90 = left side, ANG270 = right */
  160. extern  int    viewangleoffset;
  161.  
  162. /*  Player taking events, and displaying. */
  163. extern  int    consoleplayer;    
  164. extern  int    displayplayer;
  165.  
  166.  
  167. /*  ------------------------------------- */
  168. /*  Scores, rating. */
  169. /*  Statistics on a given map, for intermission. */
  170. /*  */
  171. extern  int    totalkills;
  172. extern    int    totalitems;
  173. extern    int    totalsecret;
  174.  
  175. /*  Timer, for scores. */
  176. extern  int    levelstarttic;    /*  gametic at level start */
  177. extern  int    leveltime;    /*  tics in game play for par */
  178.  
  179.  
  180.  
  181. /*  -------------------------------------- */
  182. /*  DEMO playback/recording related stuff. */
  183. /*  No demo, there is a human player in charge? */
  184. /*  Disable save/end game? */
  185. extern  boolean    usergame;
  186.  
  187. /* ? */
  188. extern  boolean    demoplayback;
  189. extern  boolean    demorecording;
  190.  
  191. /*  Quit after playing a demo from cmdline. */
  192. extern  boolean        singledemo;    
  193.  
  194.  
  195.  
  196.  
  197. /* ? */
  198. extern  gamestate_t     gamestate;
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. /* ----------------------------- */
  206. /*  Internal parameters, fixed. */
  207. /*  These are set by the engine, and not changed */
  208. /*   according to user inputs. Partly load from */
  209. /*   WAD, partly set at startup time. */
  210.  
  211.  
  212.  
  213. extern    int        gametic;
  214.  
  215.  
  216. /*  Bookkeeping on players - state. */
  217. extern    player_t    players[MAXPLAYERS];
  218.  
  219. /*  Alive? Disconnected? */
  220. extern  boolean        playeringame[MAXPLAYERS];
  221.  
  222.  
  223. /*  Player spawn spots for deathmatch. */
  224. #define MAX_DM_STARTS   10
  225. extern  mapthing_t      deathmatchstarts[MAX_DM_STARTS];
  226. extern  mapthing_t*    deathmatch_p;
  227.  
  228. /*  Player spawn spots. */
  229. extern  mapthing_t      playerstarts[MAXPLAYERS];
  230.  
  231. /*  Intermission stats. */
  232. /*  Parameters for world map / intermission. */
  233. extern  wbstartstruct_t        wminfo;    
  234.  
  235.  
  236. /*  LUT of ammunition limits for each kind. */
  237. /*  This doubles with BackPack powerup item. */
  238. extern  int        maxammo[NUMAMMO];
  239.  
  240.  
  241.  
  242.  
  243.  
  244. /* ----------------------------------------- */
  245. /*  Internal parameters, used for engine. */
  246. /*  */
  247.  
  248. /*  File handling stuff. */
  249. extern    char        basedefault[1024];
  250. extern  FILE*        debugfile;
  251.  
  252. /*  if true, load all graphics at level load */
  253. extern  boolean         precache;
  254.  
  255.  
  256. /*  wipegamestate can be set to -1 */
  257. /*   to force a wipe on the next draw */
  258. extern  gamestate_t     wipegamestate;
  259.  
  260. extern  int             mouseSensitivity;
  261. /* ? */
  262. /*  debug flag to cancel adaptiveness */
  263. extern  boolean         singletics;    
  264.  
  265. extern  int             bodyqueslot;
  266.  
  267.  
  268.  
  269. /*  Needed to store the number of the dummy sky flat. */
  270. /*  Used for rendering, */
  271. /*   as well as tracking projectiles etc. */
  272. extern int        skyflatnum;
  273.  
  274.  
  275.  
  276. /*  Netgame stuff (buffers and pointers, i.e. indices). */
  277.  
  278. /*  This is ??? */
  279. extern  doomcom_t*    doomcom;
  280.  
  281. /*  This points inside doomcom. */
  282. extern  doomdata_t*    netbuffer;    
  283.  
  284.  
  285. extern  ticcmd_t    localcmds[BACKUPTICS];
  286. extern    int        rndindex;
  287.  
  288. extern    int        maketic;
  289. extern  int             nettics[MAXNETNODES];
  290.  
  291. extern  ticcmd_t        netcmds[MAXPLAYERS][BACKUPTICS];
  292. extern    int        ticdup;
  293.  
  294.  
  295.  
  296. #endif
  297. /* ----------------------------------------------------------------------------- */
  298. /*  */
  299. /*  $Log:$ */
  300. /*  */
  301. /* ----------------------------------------------------------------------------- */
  302.