1 //---------------------------------------------------------------------------- 2 // EDGE Basic Definitions File 3 //---------------------------------------------------------------------------- 4 // 5 // Copyright (c) 1999-2009 The EDGE Team. 6 // 7 // This program is free software; you can redistribute it and/or 8 // modify it under the terms of the GNU General Public License 9 // as published by the Free Software Foundation; either version 2 10 // of the License, or (at your option) any later version. 11 // 12 // This program is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 //---------------------------------------------------------------------------- 18 // 19 // Based on the DOOM source code, released by Id Software under the 20 // following copyright: 21 // 22 // Copyright (C) 1993-1996 by id Software, Inc. 23 // 24 //---------------------------------------------------------------------------- 25 26 #ifndef __DEFINITIONS__ 27 #define __DEFINITIONS__ 28 29 30 // 31 // Global parameters/defines. 32 // 33 34 // The current state of the game: whether we are 35 // playing, gazing at the intermission screen, 36 // the game final animation, or a demo. 37 typedef enum 38 { 39 GS_NOTHING = 0, 40 GS_TITLESCREEN, 41 GS_LEVEL, 42 GS_INTERMISSION, 43 GS_FINALE, 44 } 45 gamestate_e; 46 47 // 48 // Difficulty/skill settings/filters. 49 // 50 51 // Skill flags. 52 #define MTF_EASY 1 53 #define MTF_NORMAL 2 54 #define MTF_HARD 4 55 56 // Deaf monsters/do not react to sound. 57 #define MTF_AMBUSH 8 58 59 // Multiplayer only. 60 #define MTF_NOT_SINGLE 16 61 62 // -AJA- 1999/09/22: Boom compatibility. 63 #define MTF_NOT_DM 32 64 #define MTF_NOT_COOP 64 65 66 // -AJA- 2000/07/31: Friend flag, from MBF 67 #define MTF_FRIEND 128 68 69 // -AJA- 2004/11/04: This bit should be zero (otherwise old WAD). 70 #define MTF_RESERVED 256 71 72 // -AJA- 2008/03/08: Extrafloor placement 73 #define MTF_EXFLOOR_MASK 0x3C00 74 #define MTF_EXFLOOR_SHIFT 10 75 76 typedef enum 77 { 78 sk_invalid = -1, 79 sk_baby = 0, 80 sk_easy = 1, 81 sk_medium = 2, 82 sk_hard = 3, 83 sk_nightmare = 4, 84 sk_numtypes = 5 85 } 86 skill_t; 87 88 // -KM- 1998/12/16 Added gameflags typedef here. 89 typedef enum 90 { 91 AA_OFF, 92 AA_ON, 93 AA_MLOOK 94 } 95 autoaim_t; 96 97 typedef struct gameflags_s 98 { 99 // checkparm of -nomonsters 100 bool nomonsters; 101 102 // checkparm of -fast 103 bool fastparm; 104 105 bool respawn; 106 bool res_respawn; 107 bool itemrespawn; 108 109 bool true3dgameplay; 110 int menu_grav; 111 bool more_blood; 112 113 bool jump; 114 bool crouch; 115 bool mlook; 116 autoaim_t autoaim; 117 118 bool cheats; 119 bool have_extra; 120 bool limit_zoom; 121 bool shadows; 122 bool halos; 123 124 bool edge_compat; 125 bool kicking; 126 bool weapon_switch; 127 bool pass_missile; 128 bool team_damage; 129 } 130 gameflags_t; 131 132 #define VISIBLE (1.0f) 133 #define VISSTEP (1.0f/256.0f) 134 #define INVISIBLE (0.0f) 135 136 // 137 // DOOM keyboard definition. 138 // This is the stuff configured by Setup.Exe. 139 // Most key data are simple ascii (uppercased). 140 // 141 #define KEYD_TAB 9 142 #define KEYD_ENTER 13 143 #define KEYD_ESCAPE 27 144 #define KEYD_SPACE 32 145 #define KEYD_BACKSPACE 127 146 147 #define KEYD_TILDE ('`') 148 #define KEYD_EQUALS ('=') 149 #define KEYD_MINUS ('-') 150 #define KEYD_RIGHTARROW (0x80+0x2e) 151 #define KEYD_LEFTARROW (0x80+0x2c) 152 #define KEYD_UPARROW (0x80+0x2d) 153 #define KEYD_DOWNARROW (0x80+0x2f) 154 155 #define KEYD_RCTRL (0x80+0x1d) 156 #define KEYD_RSHIFT (0x80+0x36) 157 #define KEYD_RALT (0x80+0x38) 158 #define KEYD_LALT KEYD_RALT 159 #define KEYD_HOME (0x80+0x47) 160 #define KEYD_PGUP (0x80+0x49) 161 #define KEYD_END (0x80+0x4f) 162 #define KEYD_PGDN (0x80+0x51) 163 #define KEYD_INSERT (0x80+0x52) 164 #define KEYD_DELETE (0x80+0x53) 165 166 #define KEYD_F1 (0x80+0x3b) 167 #define KEYD_F2 (0x80+0x3c) 168 #define KEYD_F3 (0x80+0x3d) 169 #define KEYD_F4 (0x80+0x3e) 170 #define KEYD_F5 (0x80+0x3f) 171 #define KEYD_F6 (0x80+0x40) 172 #define KEYD_F7 (0x80+0x41) 173 #define KEYD_F8 (0x80+0x42) 174 #define KEYD_F9 (0x80+0x43) 175 #define KEYD_F10 (0x80+0x44) 176 #define KEYD_F11 (0x80+0x57) 177 #define KEYD_F12 (0x80+0x58) 178 179 #define KEYD_KP0 (0x80+0x60) 180 #define KEYD_KP1 (0x80+0x61) 181 #define KEYD_KP2 (0x80+0x62) 182 #define KEYD_KP3 (0x80+0x63) 183 #define KEYD_KP4 (0x80+0x64) 184 #define KEYD_KP5 (0x80+0x65) 185 #define KEYD_KP6 (0x80+0x66) 186 #define KEYD_KP7 (0x80+0x67) 187 #define KEYD_KP8 (0x80+0x68) 188 #define KEYD_KP9 (0x80+0x69) 189 #define KEYD_KP_DOT (0x80+0x6a) 190 #define KEYD_KP_PLUS (0x80+0x6b) 191 #define KEYD_KP_MINUS (0x80+0x6c) 192 #define KEYD_KP_STAR (0x80+0x6d) 193 #define KEYD_KP_SLASH (0x80+0x6e) 194 #define KEYD_KP_EQUAL (0x80+0x6f) 195 #define KEYD_KP_ENTER (0x80+0x70) 196 197 #define KEYD_PRTSCR (0x80+0x54) 198 #define KEYD_NUMLOCK (0x80+0x45) 199 #define KEYD_SCRLOCK (0x80+0x46) 200 #define KEYD_CAPSLOCK (0x80+0x7e) 201 #define KEYD_PAUSE (0x80+0x7f) 202 203 // Values from here on aren't actually keyboard keys, but buttons 204 // on joystick or mice. 205 206 #define KEYD_MOUSE1 (0x100) 207 #define KEYD_MOUSE2 (0x101) 208 #define KEYD_MOUSE3 (0x102) 209 #define KEYD_MOUSE4 (0x103) 210 #define KEYD_MOUSE5 (0x104) 211 #define KEYD_MOUSE6 (0x105) 212 #define KEYD_WHEEL_UP (0x10e) 213 #define KEYD_WHEEL_DN (0x10f) 214 215 #define KEYD_JOY1 (0x110+1) 216 #define KEYD_JOY2 (0x110+2) 217 #define KEYD_JOY3 (0x110+3) 218 #define KEYD_JOY4 (0x110+4) 219 #define KEYD_JOY5 (0x110+5) 220 #define KEYD_JOY6 (0x110+6) 221 #define KEYD_JOY7 (0x110+7) 222 #define KEYD_JOY8 (0x110+8) 223 #define KEYD_JOY9 (0x110+9) 224 #define KEYD_JOY10 (0x110+10) 225 #define KEYD_JOY11 (0x110+11) 226 #define KEYD_JOY12 (0x110+12) 227 #define KEYD_JOY13 (0x110+13) 228 #define KEYD_JOY14 (0x110+14) 229 #define KEYD_JOY15 (0x110+15) 230 231 // -KM- 1998/09/27 Analogue binding, added a fly axis 232 #define AXIS_DISABLE 0 233 #define AXIS_TURN 1 234 #define AXIS_MLOOK 2 235 #define AXIS_FORWARD 3 236 #define AXIS_STRAFE 4 237 #define AXIS_FLY 5 // includes SWIM up/down 238 239 #endif // __DEFINITIONS__ 240 241 242 //--- editor settings --- 243 // vi:ts=4:sw=4:noexpandtab 244