1 // 2 // Copyright(C) 1993-1996 Id Software, Inc. 3 // Copyright(C) 2005-2014 Simon Howard 4 // 5 // This program is free software; you can redistribute it and/or 6 // modify it under the terms of the GNU General Public License 7 // as published by the Free Software Foundation; either version 2 8 // of the License, or (at your option) any later version. 9 // 10 // This program 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 // 15 // DESCRIPTION: 16 // Internally used data structures for virtually everything, 17 // lots of other stuff. 18 // 19 20 #ifndef __DOOMDEF__ 21 #define __DOOMDEF__ 22 23 #include <stdio.h> 24 #include <string.h> 25 26 #include "doomtype.h" 27 #include "i_timer.h" 28 #include "d_mode.h" 29 30 // 31 // Global parameters/defines. 32 // 33 // DOOM version 34 // 35 // haleyjd 09/28/10: Replaced with Strife version 36 #define STRIFE_VERSION 101 37 38 // Version code for cph's longtics hack ("v1.91") 39 #define DOOM_191_VERSION 111 40 41 42 // Maximum players for Strife: 43 #define MAXPLAYERS 8 44 45 // If rangecheck is undefined, 46 // most parameter validation debugging code will not be compiled 47 #define RANGECHECK 48 49 // The current state of the game: whether we are 50 // playing, gazing at the intermission screen, 51 // the game final animation, or a demo. 52 typedef enum 53 { 54 GS_LEVEL, 55 GS_UNKNOWN, 56 GS_FINALE, 57 GS_DEMOSCREEN, 58 } gamestate_t; 59 60 typedef enum 61 { 62 ga_nothing, 63 ga_loadlevel, 64 ga_newgame, 65 ga_loadgame, 66 ga_savegame, 67 ga_playdemo, 68 ga_completed, 69 ga_victory, 70 ga_worlddone, 71 ga_screenshot 72 } gameaction_t; 73 74 // 75 // Difficulty/skill settings/filters. 76 // 77 78 // Skill flags. 79 #define MTF_EASY 1 80 #define MTF_NORMAL 2 81 #define MTF_HARD 4 82 // villsa [STRIFE] standing monsters 83 #define MTF_STAND 8 84 // villsa [STRIFE] don't spawn in single player 85 #define MTF_NOTSINGLE 16 86 // Deaf monsters/do not react to sound. 87 #define MTF_AMBUSH 32 88 // villsa [STRIFE] friendly to players 89 #define MTF_FRIEND 64 90 // villsa [STRIFE] TODO - identify 91 #define MTF_UNKNOWN1 128 92 // villsa [STRIFE] thing is translucent - STRIFE-TODO: But how much? 93 #define MTF_TRANSLUCENT 256 94 // villsa [STRIFE] thing is more - or less? - translucent - STRIFE-TODO 95 #define MTF_MVIS 512 96 // villsa [STRIFE] TODO - identify 97 #define MTF_UNKNOWN2 1024 98 99 100 101 // 102 // Key cards. 103 // 104 // villsa [STRIFE] 105 typedef enum 106 { 107 key_BaseKey, // 0 108 key_GovsKey, // 1 109 key_Passcard, // 2 110 key_IDCard, // 3 111 key_PrisonKey, // 4 112 key_SeveredHand, // 5 113 key_Power1Key, // 6 114 key_Power2Key, // 7 115 key_Power3Key, // 8 116 key_GoldKey, // 9 117 key_IDBadge, // 10 118 key_SilverKey, // 11 119 key_OracleKey, // 12 120 key_MilitaryID, // 13 121 key_OrderKey, // 14 122 key_WarehouseKey, // 15 123 key_BrassKey, // 16 124 key_RedCrystalKey, // 17 125 key_BlueCrystalKey, // 18 126 key_ChapelKey, // 19 127 key_CatacombKey, // 20 128 key_SecurityKey, // 21 129 key_CoreKey, // 22 130 key_MaulerKey, // 23 131 key_FactoryKey, // 24 132 key_MineKey, // 25 133 key_NewKey5, // 26 134 135 NUMCARDS // 27 136 } card_t; 137 138 139 140 // The defined weapons, 141 // including a marker indicating 142 // user has not changed weapon. 143 // villsa [STRIFE] 144 typedef enum 145 { 146 wp_fist, 147 wp_elecbow, 148 wp_rifle, 149 wp_missile, 150 wp_hegrenade, 151 wp_flame, 152 wp_mauler, 153 wp_sigil, 154 wp_poisonbow, 155 wp_wpgrenade, 156 wp_torpedo, 157 158 NUMWEAPONS, 159 160 // No pending weapon change. 161 wp_nochange 162 163 } weapontype_t; 164 165 166 // Ammunition types defined. 167 typedef enum 168 { 169 am_bullets, 170 am_elecbolts, 171 am_poisonbolts, 172 am_cell, 173 am_missiles, 174 am_hegrenades, 175 am_wpgrenades, 176 177 NUMAMMO, 178 179 am_noammo // unlimited ammo 180 181 } ammotype_t; 182 183 184 // Power up artifacts. 185 // villsa [STRIFE] 186 typedef enum 187 { 188 pw_strength, 189 pw_invisibility, 190 pw_ironfeet, 191 pw_allmap, 192 pw_communicator, 193 pw_targeter, 194 NUMPOWERS 195 196 } powertype_t; 197 198 // villsa [STRIFE] 199 // quest numbers 200 typedef enum 201 { // Hex Watcom Name player_t offset 202 tk_quest1, // 0x00000001 questflags & 1 0x4D 203 tk_quest2, // 0x00000002 questflags & 2 204 tk_quest3, // 0x00000004 questflags & 4 205 tk_quest4, // 0x00000008 questflags & 8 206 tk_quest5, // 0x00000010 questflags & 10h 207 tk_quest6, // 0x00000020 questflags & 20h 208 tk_quest7, // 0x00000040 questflags & 40h 209 tk_quest8, // 0x00000080 questflags & 80h 210 tk_quest9, // 0x00000100 BYTE1(questflags) & 1 0x4E 211 tk_quest10, // 0x00000200 BYTE1(questflags) & 2 212 tk_quest11, // 0x00000400 BYTE1(questflags) & 4 213 tk_quest12, // 0x00000800 BYTE1(questflags) & 8 214 tk_quest13, // 0x00001000 BYTE1(questflags) & 10h 215 tk_quest14, // 0x00002000 BYTE1(questflags) & 20h 216 tk_quest15, // 0x00004000 BYTE1(questflags) & 40h 217 tk_quest16, // 0x00008000 BYTE1(questflags) & 80h 218 tk_quest17, // 0x00010000 BYTE2(questflags) & 1 0x4F 219 tk_quest18, // 0x00020000 BYTE2(questflags) & 2 220 tk_quest19, // 0x00040000 BYTE2(questflags) & 4 221 tk_quest20, // 0x00080000 BYTE2(questflags) & 8 222 tk_quest21, // 0x00100000 BYTE2(questflags) & 10h 223 tk_quest22, // 0x00200000 BYTE2(questflags) & 20h 224 tk_quest23, // 0x00400000 BYTE2(questflags) & 40h 225 tk_quest24, // 0x00800000 BYTE2(questflags) & 80h 226 tk_quest25, // 0x01000000 BYTE3(questflags) & 1 0x50 227 tk_quest26, // 0x02000000 BYTE3(questflags) & 2 228 tk_quest27, // 0x04000000 BYTE3(questflags) & 4 229 tk_quest28, // 0x08000000 BYTE3(questflags) & 8 230 tk_quest29, // 0x10000000 BYTE3(questflags) & 10h 231 tk_quest30, // 0x20000000 BYTE3(questflags) & 20h 232 tk_quest31, // 0x40000000 BYTE3(questflags) & 40h 233 tk_quest32, // most likely unused 234 tk_numquests 235 } questtype_t; 236 237 // haleyjd 09/12/10: [STRIFE] 238 // flag values for each quest. 239 enum 240 { // Name Flag from bitnum Purpose, if known 241 QF_QUEST1 = (1 << tk_quest1), // Obtained Beldin's ring 242 QF_QUEST2 = (1 << tk_quest2), // Stole the Chalice 243 QF_QUEST3 = (1 << tk_quest3), // Permission to visit Irale (visited Macil) 244 QF_QUEST4 = (1 << tk_quest4), // Accepted Gov. Mourel's "messy" chore 245 QF_QUEST5 = (1 << tk_quest5), // Accepted Gov. Mourel's "bloody" chore 246 QF_QUEST6 = (1 << tk_quest6), // Destroyed the Power Coupling 247 QF_QUEST7 = (1 << tk_quest7), // Killed Blue Acolytes ("Scanning Team") 248 QF_QUEST8 = (1 << tk_quest8), // Unused; formerly, picked up Broken Coupling 249 QF_QUEST9 = (1 << tk_quest9), // Obtained Derwin's ear 250 QF_QUEST10 = (1 << tk_quest10), // Obtained Prison Pass 251 QF_QUEST11 = (1 << tk_quest11), // Obtained Prison Key 252 QF_QUEST12 = (1 << tk_quest12), // Obtained Judge Wolenick's hand 253 QF_QUEST13 = (1 << tk_quest13), // Freed the Prisoners 254 QF_QUEST14 = (1 << tk_quest14), // Destroyed the Power Crystal 255 QF_QUEST15 = (1 << tk_quest15), // Obtained Guard Uniform 256 QF_QUEST16 = (1 << tk_quest16), // Destroyed the Gate Mechanism 257 QF_QUEST17 = (1 << tk_quest17), // Heard Macil's story about the Sigil (MAP10) 258 QF_QUEST18 = (1 << tk_quest18), // Obtained Oracle Pass 259 QF_QUEST19 = (1 << tk_quest19), 260 QF_QUEST20 = (1 << tk_quest20), 261 QF_QUEST21 = (1 << tk_quest21), // Killed Bishop 262 QF_QUEST22 = (1 << tk_quest22), // Killed Oracle with QUEST21 set 263 QF_QUEST23 = (1 << tk_quest23), // Killed Oracle (always given) 264 QF_QUEST24 = (1 << tk_quest24), // Killed Macil 265 QF_QUEST25 = (1 << tk_quest25), // Destroyed the Converter 266 QF_QUEST26 = (1 << tk_quest26), // Killed Loremaster 267 QF_QUEST27 = (1 << tk_quest27), // Destroyed the Computer (checked for good ending) 268 QF_QUEST28 = (1 << tk_quest28), // Obtained Catacomb Key (checked by line type 228) 269 QF_QUEST29 = (1 << tk_quest29), // Destroyed the Mines Transmitter 270 QF_QUEST30 = (1 << tk_quest30), 271 QF_QUEST31 = (1 << tk_quest31), 272 QF_QUEST32 = (1 << tk_quest32), // Unused; BUG: Broken Coupling accidentally sets it. 273 274 QF_ALLQUESTS = (QF_QUEST31 + (QF_QUEST31 - 1)) // does not include bit 32! 275 }; 276 277 // 278 // Power up durations, 279 // how many seconds till expiration, 280 // assuming TICRATE is 35 ticks/second. 281 // 282 typedef enum 283 { 284 INVISTICS = (55*TICRATE), // villsa [STRIFE] changed from 60 to 55 285 IRONTICS = (80*TICRATE), // villsa [STRIFE] changed from 60 to 80 286 PMUPTICS = (80*TICRATE), // villsa [STRIFE] 287 TARGTICS = (160*TICRATE),// villsa [STRIFE] 288 289 } powerduration_t; 290 291 #endif // __DOOMDEF__ 292