doomdef.h (6280B)
1 #ifndef __DOOMDEF__ 2 #define __DOOMDEF__ 3 4 #include <stdio.h> 5 #include <string.h> 6 #include <limits.h> 7 8 #define RANGECHECK 9 #define KEY_RIGHTARROW 0xae 10 #define KEY_LEFTARROW 0xac 11 #define KEY_UPARROW 0xad 12 #define KEY_DOWNARROW 0xaf 13 #define KEY_ESCAPE 27 14 #define KEY_ENTER 13 15 #define KEY_TAB 9 16 #define KEY_F1 (0x80+0x3b) 17 #define KEY_F2 (0x80+0x3c) 18 #define KEY_F3 (0x80+0x3d) 19 #define KEY_F4 (0x80+0x3e) 20 #define KEY_F5 (0x80+0x3f) 21 #define KEY_F6 (0x80+0x40) 22 #define KEY_F7 (0x80+0x41) 23 #define KEY_F8 (0x80+0x42) 24 #define KEY_F9 (0x80+0x43) 25 #define KEY_F10 (0x80+0x44) 26 #define KEY_F11 (0x80+0x57) 27 #define KEY_F12 (0x80+0x58) 28 #define KEY_BACKSPACE 127 29 #define KEY_PAUSE 0xff 30 #define KEY_EQUALS 0x3d 31 #define KEY_MINUS 0x2d 32 #define KEY_RSHIFT (0x80+0x36) 33 #define KEY_RCTRL (0x80+0x1d) 34 #define KEY_RALT (0x80+0x38) 35 #define KEY_LALT KEY_RALT 36 #define SNDSERV 1 37 #define BASE_WIDTH 320 38 #define SCREEN_MUL 1 39 #define INV_ASPECT_RATIO 0.625 40 #define SCREENWIDTH 320 41 #define SCREENHEIGHT 200 42 #define MAXPLAYERS 4 43 #define TICRATE 35 44 #define MTF_EASY 1 45 #define MTF_NORMAL 2 46 #define MTF_HARD 4 47 #define MTF_AMBUSH 8 48 #define LENGTH(a) (sizeof(a)/sizeof(a[0])) 49 #define SKYFLATNAME "F_SKY1" 50 #define ANGLETOSKYSHIFT 22 51 52 typedef unsigned char byte; 53 typedef unsigned char uchar; 54 typedef unsigned short ushort; 55 typedef unsigned int uint; 56 typedef unsigned long ulong; 57 58 typedef enum {false, true} boolean; 59 60 enum { VERSION = 110 }; 61 62 typedef enum { 63 GS_LEVEL, 64 GS_INTERMISSION, 65 GS_FINALE, 66 GS_DEMOSCREEN 67 } gamestate_t; 68 69 typedef enum { 70 sk_baby, 71 sk_easy, 72 sk_medium, 73 sk_hard, 74 sk_nightmare 75 } skill_t; 76 77 typedef enum { 78 it_bluecard, 79 it_yellowcard, 80 it_redcard, 81 it_blueskull, 82 it_yellowskull, 83 it_redskull, 84 NUMCARDS 85 } card_t; 86 87 typedef enum { 88 wp_fist, 89 wp_pistol, 90 wp_shotgun, 91 wp_chaingun, 92 wp_missile, 93 wp_plasma, 94 wp_bfg, 95 wp_chainsaw, 96 wp_supershotgun, 97 NUMWEAPONS, 98 wp_nochange 99 } weapontype_t; 100 101 typedef enum { 102 am_clip, 103 am_shell, 104 am_cell, 105 am_misl, 106 NUMAMMO, 107 am_noammo 108 } ammotype_t; 109 110 typedef enum { 111 pw_invulnerability, 112 pw_strength, 113 pw_invisibility, 114 pw_ironfeet, 115 pw_allmap, 116 pw_infrared, 117 NUMPOWERS 118 } powertype_t; 119 120 typedef enum { 121 INVULNTICS = (30*TICRATE), 122 INVISTICS = (60*TICRATE), 123 INFRATICS = (120*TICRATE), 124 IRONTICS = (60*TICRATE) 125 } powerduration_t; 126 127 enum { 128 NEWLEVEL, 129 PRESSKEY, 130 PRESSYN, 131 D_DEVSTR, 132 D_CDROM, 133 LOADNET, 134 QLOADNET, 135 QSAVESPOT, 136 SAVEDEAD, 137 QSPROMPT, 138 QLPROMPT, 139 NEWGAME, 140 NIGHTMARE, 141 SWSTRING, 142 MSGOFF, 143 MSGON, 144 NETEND, 145 ENDGAME, 146 DOSY, 147 DETAILHI, 148 DETAILLO, 149 GAMMALVL0, 150 GAMMALVL1, 151 GAMMALVL2, 152 GAMMALVL3, 153 GAMMALVL4, 154 EMPTYSTRING, 155 GOTARMOR, 156 GOTMEGA, 157 GOTHTHBONUS, 158 GOTARMBONUS, 159 GOTSTIM, 160 GOTMEDINEED, 161 GOTMEDIKIT, 162 GOTSUPER, 163 GOTBLUECARD, 164 GOTYELWCARD, 165 GOTREDCARD, 166 GOTBLUESKUL, 167 GOTYELWSKUL, 168 GOTREDSKULL, 169 GOTINVUL, 170 GOTBERSERK, 171 GOTINVIS, 172 GOTSUIT, 173 GOTMAP, 174 GOTVISOR, 175 GOTMSPHERE, 176 GOTCLIP, 177 GOTCLIPBOX, 178 GOTROCKET, 179 GOTROCKBOX, 180 GOTCELL, 181 GOTCELLBOX, 182 GOTSHELLS, 183 GOTSHELLBOX, 184 GOTBACKPACK, 185 GOTBFG9000, 186 GOTCHAINGUN, 187 GOTCHAINSAW, 188 GOTLAUNCHER, 189 GOTPLASMA, 190 GOTSHOTGUN, 191 GOTSHOTGUN2, 192 PD_BLUEO, 193 PD_REDO, 194 PD_YELLOWO, 195 PD_BLUEK, 196 PD_REDK, 197 PD_YELLOWK, 198 GGSAVED, 199 HUSTR_MSGU, 200 HUSTR_E1M1, 201 HUSTR_E1M2, 202 HUSTR_E1M3, 203 HUSTR_E1M4, 204 HUSTR_E1M5, 205 HUSTR_E1M6, 206 HUSTR_E1M7, 207 HUSTR_E1M8, 208 HUSTR_E1M9, 209 HUSTR_E2M1, 210 HUSTR_E2M2, 211 HUSTR_E2M3, 212 HUSTR_E2M4, 213 HUSTR_E2M5, 214 HUSTR_E2M6, 215 HUSTR_E2M7, 216 HUSTR_E2M8, 217 HUSTR_E2M9, 218 HUSTR_E3M1, 219 HUSTR_E3M2, 220 HUSTR_E3M3, 221 HUSTR_E3M4, 222 HUSTR_E3M5, 223 HUSTR_E3M6, 224 HUSTR_E3M7, 225 HUSTR_E3M8, 226 HUSTR_E3M9, 227 HUSTR_E4M1, 228 HUSTR_E4M2, 229 HUSTR_E4M3, 230 HUSTR_E4M4, 231 HUSTR_E4M5, 232 HUSTR_E4M6, 233 HUSTR_E4M7, 234 HUSTR_E4M8, 235 HUSTR_E4M9, 236 HUSTR_1, 237 HUSTR_2, 238 HUSTR_3, 239 HUSTR_4, 240 HUSTR_5, 241 HUSTR_6, 242 HUSTR_7, 243 HUSTR_8, 244 HUSTR_9, 245 HUSTR_10, 246 HUSTR_11, 247 HUSTR_12, 248 HUSTR_13, 249 HUSTR_14, 250 HUSTR_15, 251 HUSTR_16, 252 HUSTR_17, 253 HUSTR_18, 254 HUSTR_19, 255 HUSTR_20, 256 HUSTR_21, 257 HUSTR_22, 258 HUSTR_23, 259 HUSTR_24, 260 HUSTR_25, 261 HUSTR_26, 262 HUSTR_27, 263 HUSTR_28, 264 HUSTR_29, 265 HUSTR_30, 266 HUSTR_31, 267 HUSTR_32, 268 PHUSTR_1, 269 PHUSTR_2, 270 PHUSTR_3, 271 PHUSTR_4, 272 PHUSTR_5, 273 PHUSTR_6, 274 PHUSTR_7, 275 PHUSTR_8, 276 PHUSTR_9, 277 PHUSTR_10, 278 PHUSTR_11, 279 PHUSTR_12, 280 PHUSTR_13, 281 PHUSTR_14, 282 PHUSTR_15, 283 PHUSTR_16, 284 PHUSTR_17, 285 PHUSTR_18, 286 PHUSTR_19, 287 PHUSTR_20, 288 PHUSTR_21, 289 PHUSTR_22, 290 PHUSTR_23, 291 PHUSTR_24, 292 PHUSTR_25, 293 PHUSTR_26, 294 PHUSTR_27, 295 PHUSTR_28, 296 PHUSTR_29, 297 PHUSTR_30, 298 PHUSTR_31, 299 PHUSTR_32, 300 THUSTR_1, 301 THUSTR_2, 302 THUSTR_3, 303 THUSTR_4, 304 THUSTR_5, 305 THUSTR_6, 306 THUSTR_7, 307 THUSTR_8, 308 THUSTR_9, 309 THUSTR_10, 310 THUSTR_11, 311 THUSTR_12, 312 THUSTR_13, 313 THUSTR_14, 314 THUSTR_15, 315 THUSTR_16, 316 THUSTR_17, 317 THUSTR_18, 318 THUSTR_19, 319 THUSTR_20, 320 THUSTR_21, 321 THUSTR_22, 322 THUSTR_23, 323 THUSTR_24, 324 THUSTR_25, 325 THUSTR_26, 326 THUSTR_27, 327 THUSTR_28, 328 THUSTR_29, 329 THUSTR_30, 330 THUSTR_31, 331 THUSTR_32, 332 HUSTR_CHATMACRO1, 333 HUSTR_CHATMACRO2, 334 HUSTR_CHATMACRO3, 335 HUSTR_CHATMACRO4, 336 HUSTR_CHATMACRO5, 337 HUSTR_CHATMACRO6, 338 HUSTR_CHATMACRO7, 339 HUSTR_CHATMACRO8, 340 HUSTR_CHATMACRO9, 341 HUSTR_CHATMACRO0, 342 HUSTR_TALKTOSELF1, 343 HUSTR_TALKTOSELF2, 344 HUSTR_TALKTOSELF3, 345 HUSTR_TALKTOSELF4, 346 HUSTR_TALKTOSELF5, 347 HUSTR_MESSAGESENT, 348 HUSTR_PLRGREEN, 349 HUSTR_PLRINDIGO, 350 HUSTR_PLRBROWN, 351 HUSTR_PLRRED, 352 HUSTR_KEYGREEN, 353 HUSTR_KEYINDIGO, 354 HUSTR_KEYBROWN, 355 HUSTR_KEYRED, 356 AMSTR_FOLLOWON, 357 AMSTR_FOLLOWOFF, 358 AMSTR_GRIDON, 359 AMSTR_GRIDOFF, 360 AMSTR_MARKEDSPOT, 361 AMSTR_MARKSCLEARED, 362 STSTR_MUS, 363 STSTR_NOMUS, 364 STSTR_DQDON, 365 STSTR_DQDOFF, 366 STSTR_KFAADDED, 367 STSTR_FAADDED, 368 STSTR_NCON, 369 STSTR_NCOFF, 370 STSTR_BEHOLD, 371 STSTR_BEHOLDX, 372 STSTR_CHOPPERS, 373 STSTR_CLEV, 374 E1TEXT, 375 E2TEXT, 376 E3TEXT, 377 E4TEXT, 378 C1TEXT, 379 C2TEXT, 380 C3TEXT, 381 C4TEXT, 382 C5TEXT, 383 C6TEXT, 384 P1TEXT, 385 P2TEXT, 386 P3TEXT, 387 P4TEXT, 388 P5TEXT, 389 P6TEXT, 390 T1TEXT, 391 T2TEXT, 392 T3TEXT, 393 T4TEXT, 394 T5TEXT, 395 T6TEXT, 396 CC_ZOMBIE, 397 CC_SHOTGUN, 398 CC_HEAVY, 399 CC_IMP, 400 CC_DEMON, 401 CC_LOST, 402 CC_CACO, 403 CC_HELL, 404 CC_BARON, 405 CC_ARACH, 406 CC_PAIN, 407 CC_REVEN, 408 CC_MANCU, 409 CC_ARCH, 410 CC_SPIDER, 411 CC_CYBER, 412 CC_HERO, 413 SAVEGAMENAME, 414 DEVMAPS, 415 DEVDATA, 416 QUITMSG0, 417 QUITMSG1, 418 QUITMSG2, 419 QUITMSG3, 420 QUITMSG4, 421 QUITMSG5, 422 QUITMSG6, 423 QUITMSG7, 424 QUITMSG8, 425 QUITMSG9, 426 QUITMSG10, 427 QUITMSG11, 428 QUITMSG12, 429 QUITMSG13, 430 QUITMSG14, 431 QUITMSG15, 432 QUITMSG16, 433 QUITMSG17, 434 QUITMSG18, 435 QUITMSG19, 436 QUITMSG20, 437 QUITMSG21 438 }; 439 440 extern char** lang; 441 442 char* str_cat(char* p, char* q); 443 444 #endif