Odamex
Setting the Standard in Multiplayer Doom
common/doomstat.h
Go to the documentation of this file.
00001 // Emacs style mode select   -*- C++ -*-
00002 //-----------------------------------------------------------------------------
00003 //
00004 // $Id: doomstat.h 1650 2010-07-12 03:22:33Z russellrice $
00005 //
00006 // Copyright (C) 1993-1996 by id Software, Inc.
00007 // Copyright (C) 2006-2010 by The Odamex Team.
00008 //
00009 // This program is free software; you can redistribute it and/or
00010 // modify it under the terms of the GNU General Public License
00011 // as published by the Free Software Foundation; either version 2
00012 // of the License, or (at your option) any later version.
00013 //
00014 // This program is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // DESCRIPTION:
00020 //   All the global variables that store the internal state.
00021 //   Theoretically speaking, the internal state of the engine
00022 //    should be found by looking at the variables collected
00023 //    here, and every relevant module will have to include
00024 //    this header file.
00025 //   In practice, things are a bit messy.
00026 //
00027 //-----------------------------------------------------------------------------
00028 
00029 
00030 #ifndef __D_STATE__
00031 #define __D_STATE__
00032 
00033 #include <vector>
00034 
00035 #include "doomdata.h"
00036 #include "d_net.h"
00037 #include "g_level.h"
00038 
00039 // We also need the definition of a cvar
00040 #include "c_cvars.h"
00041 
00042 // ------------------------
00043 // Command line parameters.
00044 //
00045 extern  BOOL                    devparm;                // DEBUG: launched with -devparm
00046 
00047 
00048 // -----------------------------------------------------
00049 // Game Mode - identify IWAD as shareware, retail etc.
00050 //
00051 extern GameMode_t               gamemode;
00052 extern GameMission_t    gamemission;
00053 
00054 // Set if homebrew PWAD stuff has been added.
00055 extern  BOOL                    modifiedgame;
00056 
00057 
00058 // -------------------------------------------
00059 // Language.
00060 extern  Language_t              language;
00061 
00062 
00063 // -------------------------------------------
00064 // Selected skill type, map etc.
00065 //
00066 
00067 extern  char                    startmap[8];            // [RH] Actual map name now
00068 
00069 extern  BOOL                    autostart;
00070 
00071 // Selected by user.
00072 EXTERN_CVAR (sv_skill)
00073 
00074 // Nightmare mode flag, single player.
00075 extern  BOOL                    respawnmonsters;
00076 
00077 // Netgame? Only true if >1 player.
00078 extern  BOOL                    netgame;
00079 
00080 // Bot game? Like netgame, but doesn't involve network communication.
00081 extern  BOOL                    multiplayer;
00082 
00083 extern BOOL            network_game;
00084 
00085 // Game mode
00086 EXTERN_CVAR (sv_gametype)
00087 
00088 #define GM_COOP         0.0f
00089 #define GM_DM           1.0f
00090 #define GM_TEAMDM       2.0f
00091 #define GM_CTF          3.0f
00092 
00093 
00094 // -------------------------
00095 // Internal parameters for sound rendering.
00096 // These have been taken from the DOS version,
00097 //      but are not (yet) supported with Linux
00098 //      (e.g. no sound volume adjustment with menu.
00099 
00100 // These are not used, but should be (menu).
00101 // From m_menu.c:
00102 //      Sound FX volume has default, 0 - 15
00103 //      Music volume has default, 0 - 15
00104 // These are multiplied by 8.
00105 
00106 
00107 // -------------------------
00108 // Status flags for refresh.
00109 //
00110 
00111 // Depending on view size - no status bar?
00112 // Note that there is no way to disable the
00113 //      status bar explicitely.
00114 extern  BOOL                    statusbaractive;
00115 
00116 extern  BOOL                    automapactive;  // In AutoMap mode?
00117 extern  BOOL                    menuactive;     // Menu overlayed?
00118 extern  BOOL                    paused;                 // Game Pause?
00119 
00120 
00121 extern  BOOL                    viewactive;
00122 
00123 extern  BOOL                    nodrawers;
00124 extern  BOOL                    noblit;
00125 
00126 extern  int                     viewwindowx;
00127 extern  int                     viewwindowy;
00128 extern  "C" int                 viewheight;
00129 extern  "C" int                 viewwidth;
00130 
00131 extern  "C" int                 realviewwidth;          // [RH] Physical width of view window
00132 extern  "C" int                 realviewheight;         // [RH] Physical height of view window
00133 extern  "C" int                 detailxshift;           // [RH] X shift for horizontal detail level
00134 extern  "C" int                 detailyshift;           // [RH] Y shift for vertical detail level
00135 
00136 
00137 
00138 
00139 
00140 // This one is related to the 3-screen display mode.
00141 // ANG90 = left side, ANG270 = right
00142 extern  int                             viewangleoffset;
00143 
00144 extern level_locals_t level;
00145 
00146 
00147 // --------------------------------------
00148 // DEMO playback/recording related stuff.
00149 // No demo, there is a human player in charge?
00150 // Disable save/end game?
00151 extern  BOOL                    usergame;
00152 
00153 extern  BOOL                    demoplayback;
00154 extern  BOOL                    demorecording;
00155 extern  int                             demover;
00156 extern  BOOL                    democlassic;
00157 extern  BOOL                    autorecord;
00158 extern  std::string             demorecordfile;
00159 
00160 // Quit after playing a demo from cmdline.
00161 extern  BOOL                    singledemo;
00162 
00163 
00164 
00165 
00166 extern  gamestate_t     gamestate;
00167 
00168 
00169 
00170 
00171 
00172 
00173 //-----------------------------
00174 // Internal parameters, fixed.
00175 // These are set by the engine, and not changed
00176 //      according to user inputs. Partly load from
00177 //      WAD, partly set at startup time.
00178 
00179 extern  int                     gametic;
00180 
00181 // Player spawn spots for deathmatch.
00182 extern  int                             MaxDeathmatchStarts;
00183 extern  mapthing2_t             *deathmatchstarts;
00184 extern  mapthing2_t*    deathmatch_p;
00185 
00186 // Player spawn spots.
00187 #define MAXPLAYERSTARTS         64
00188 extern std::vector<mapthing2_t> playerstarts;
00189 
00190 // ----------------------------------------------
00191 //      [Toke - CTF - starts]
00192 
00193                 // Blue team starts
00194 extern  mapthing2_t             *blueteamstarts;
00195 extern  size_t                  MaxBlueTeamStarts;
00196 extern  mapthing2_t*    blueteam_p;
00197 
00198                 // Red team starts
00199 extern  mapthing2_t             *redteamstarts;
00200 extern  size_t                  MaxRedTeamStarts;
00201 extern  mapthing2_t*    redteam_p;
00202 
00203 // ----------------------------------------------
00204 
00205 // Intermission stats.
00206 // Parameters for world map / intermission.
00207 extern  struct wbstartstruct_s wminfo;
00208 
00209 
00210 // LUT of ammunition limits for each kind.
00211 // This doubles with BackPack powerup item.
00212 extern  int                     maxammo[NUMAMMO];
00213 
00214 //-----------------------------------------
00215 // Internal parameters, used for engine.
00216 //
00217 
00218 // if true, load all graphics at level load
00219 extern  BOOL                    precache;
00220 
00221 // wipegamestate can be set to -1
00222 //      to force a wipe on the next draw
00223 extern gamestate_t wipegamestate;
00224 
00225 // denis - is this from hexen?
00226 extern BOOL setsizeneeded;
00227 extern BOOL setmodeneeded;
00228 
00229 EXTERN_CVAR (mouse_sensitivity) // removeme // ?
00230 
00231 // Needed to store the number of the dummy sky flat.
00232 // Used for rendering,
00233 //      as well as tracking projectiles etc.
00234 extern int                              skyflatnum;
00235 
00236 // Netgame stuff (buffers and pointers, i.e. indices).
00237 extern  int                     maketic;
00238 extern  int                     ticdup;
00239 
00240 
00241 // ---- [RH] ----
00242 EXTERN_CVAR (developer) // removeme
00243 
00244 // [RH] Miscellaneous info for DeHackEd support
00245 struct DehInfo
00246 {
00247         int StartHealth;
00248         int StartBullets;
00249         int MaxHealth;
00250         int MaxArmor;
00251         int GreenAC;
00252         int BlueAC;
00253         int MaxSoulsphere;
00254         int SoulsphereHealth;
00255         int MegasphereHealth;
00256         int GodHealth;
00257         int FAArmor;
00258         int FAAC;
00259         int KFAArmor;
00260         int KFAAC;
00261         int BFGCells;
00262         int Infight;
00263 };
00264 extern struct DehInfo deh;
00265 
00266 #endif
00267 
00268 
00269 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends