Debian Codegraph @

prboom2/src/d_items.h

raw
1 /* Emacs style mode select -*- C -*-
2 *-----------------------------------------------------------------------------
3 *
4 *
5 * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2000 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 * Copyright 2005, 2006 by
12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 * 02111-1307, USA.
28 *
29 * DESCRIPTION:
30 * Items: key cards, artifacts, weapon, ammunition.
31 *
32 *-----------------------------------------------------------------------------*/
33
34
35 #ifndef __D_ITEMS__
36 #define __D_ITEMS__
37
38 #include "doomdef.h"
39
40 //
41 // Internal weapon flags
42 //
43 #define WIF_ENABLEAPS 0x00000001 // [XA] enable "ammo per shot" field for native Doom weapon codepointers
44
45 // haleyjd 09/11/07: weapon flags
46 //
47 #define WPF_NOFLAG 0x00000000 // no flag
48 #define WPF_NOTHRUST 0x00000001 // doesn't thrust Mobj's
49 #define WPF_SILENT 0x00000002 // weapon is silent
50 #define WPF_NOAUTOFIRE 0x00000004 // weapon won't autofire in A_WeaponReady
51 #define WPF_FLEEMELEE 0x00000008 // monsters consider it a melee weapon
52 #define WPF_AUTOSWITCHFROM 0x00000010 // can be switched away from when ammo is picked up
53 #define WPF_NOAUTOSWITCHTO 0x00000020 // cannot be switched to when ammo is picked up
54
55 /* Weapon info: sprite frames, ammunition use. */
56 typedef struct
57 {
58 ammotype_t ammo;
59 int upstate;
60 int downstate;
61 int readystate;
62 int atkstate;
63 int holdatkstate;
64 int flashstate;
65 int ammopershot;
66 int intflags;
67 int flags;
68 } weaponinfo_t;
69
70 extern weaponinfo_t doom_weaponinfo[NUMWEAPONS+2];
71
72 // heretic
73
74 extern weaponinfo_t wpnlev1info[NUMWEAPONS];
75 extern weaponinfo_t wpnlev2info[NUMWEAPONS];
76
77 // hexen
78
79 extern weaponinfo_t hexen_weaponinfo[HEXEN_NUMWEAPONS][NUMCLASSES];
80
81 // dynamically selected in global.c
82
83 extern weaponinfo_t* weaponinfo;
84
85 #endif