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