1 // Emacs style mode select   -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id: d_items.h 1452 2019-08-03 07:03:27Z wesleyjohnson $
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 // Portions Copyright (C) 1998-2000 by DooM Legacy Team.
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program 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 //
20 // $Log: d_items.h,v $
21 // Revision 1.8  2004/07/27 08:19:34  exl
22 // New fmod, fs functions, bugfix or 2, patrol nodes
23 //
24 // Revision 1.7  2003/08/11 13:50:02  hurdler
25 // go final + translucent HUD + fix spawn in net game
26 //
27 // Revision 1.6  2003/07/21 11:33:57  hurdler
28 //
29 // Revision 1.5  2003/06/11 03:38:09  ssntails
30 // THING Z definable in levels by using upper 9 bits
31 //
32 // Revision 1.4  2002/07/24 19:03:09  ssntails
33 // Added support for things to retain spawned Z position.
34 //
35 // Revision 1.3  2001/01/25 22:15:41  bpereira
36 // added heretic support
37 //
38 // Revision 1.2  2000/02/27 00:42:10  hurdler
39 // Revision 1.1.1.1  2000/02/22 20:32:32  hurdler
40 // Initial import into CVS (v1.29 pr3)
41 //
42 //
43 // DESCRIPTION:
44 //      Items: key cards, artifacts, weapon, ammunition.
45 //
46 //-----------------------------------------------------------------------------
47 
48 #ifndef D_ITEMS_H
49 #define D_ITEMS_H
50 
51 #include "doomdef.h"
52   // TICRATE
53 #include "doomtype.h"
54 
55 #ifdef __GNUG__
56 #pragma interface
57 #endif
58 
59 
60 // ==================================
61 // Difficulty/skill settings/filters.
62 // ==================================
63 
64 // MTF_ are flags in mthing->options  (16 bit field)
65 typedef enum
66 {
67 // As defined by Doom and Boom specs.
68 // Skill flags.
69   MTF_EASY        = 0x0001,
70   MTF_NORMAL      = 0x0002,
71   MTF_HARD        = 0x0004,
72 
73 // Deaf monsters/do not react to sound.
74   MTF_AMBUSH      = 0x0008,
75 
76 // 24/5/04: Exl: werent defined before
77   MTF_MPSPAWN     = 0x0010,  // Spawn only in multiplayer
78   MTF_NODM        = 0x0020,  // Do not spawn in deathmatch mode
79   MTF_NOCOOP      = 0x0040,  // Do not spawn in coop mode
80 
81 // MBF
82   MTF_FRIEND      = 0x0080,  // Friend to player
83   MTF_RESERVED    = 0x0100,  // Reserved (identify bad editor)
84 
85 // DoomLegacy additions
86 //Hurdler: special option to tell the things has been spawned by an FS
87   MTF_FS_SPAWNED  = 0x1000,  // fragglescript spawned
88   MTF_EXTRA       = 0x8000   // extra mapthing
89 } mapthing_options_e;
90 
91 
92 // heretic stuff
93 #define AMMO_GWND_WIMPY 10
94 #define AMMO_GWND_HEFTY 50
95 #define AMMO_CBOW_WIMPY 5
96 #define AMMO_CBOW_HEFTY 20
97 #define AMMO_BLSR_WIMPY 10
98 #define AMMO_BLSR_HEFTY 25
99 #define AMMO_SKRD_WIMPY 20
100 #define AMMO_SKRD_HEFTY 100
101 #define AMMO_PHRD_WIMPY 1
102 #define AMMO_PHRD_HEFTY 10
103 #define AMMO_MACE_WIMPY 20
104 #define AMMO_MACE_HEFTY 100
105 
106 #define USE_GWND_AMMO_1 1
107 #define USE_GWND_AMMO_2 1
108 #define USE_CBOW_AMMO_1 1
109 #define USE_CBOW_AMMO_2 1
110 #define USE_BLSR_AMMO_1 1
111 #define USE_BLSR_AMMO_2 5
112 #define USE_SKRD_AMMO_1 1
113 #define USE_SKRD_AMMO_2 5
114 #define USE_PHRD_AMMO_1 1
115 #define USE_PHRD_AMMO_2 1
116 #define USE_MACE_AMMO_1 1
117 #define USE_MACE_AMMO_2 5
118 
119 //
120 // Key cards.
121 //
122 typedef enum
123 {
124     it_bluecard   =    1,
125     it_yellowcard =    2,
126     it_redcard    =    4,
127     it_blueskull  =    8,
128     it_yellowskull= 0x10,
129     it_redskull   = 0x20,
130     it_allkeys    = 0x3f,
131     NUMCARDS      = 6
132 
133 } card_t;
134 
135 typedef enum
136 {
137         arti_none,
138         arti_invulnerability,
139         arti_invisibility,
140         arti_health,
141         arti_superhealth,
142         arti_tomeofpower,
143         arti_torch,
144         arti_firebomb,
145         arti_egg,
146         arti_fly,
147         arti_teleport,
148         NUMARTIFACTS
149 } artitype_t;
150 
151 #define NUMINVENTORYSLOTS  14
152 #define MAXARTECONT        16
153 typedef struct
154 {
155     byte type;
156     byte count;
157 } inventory_t;
158 
159 // Power up artifacts.
160 typedef enum
161 {
162     pw_invulnerability,
163     pw_strength,
164     pw_invisibility,
165     pw_ironfeet,
166     pw_allmap,
167     pw_infrared,
168 
169     // heretic
170     pw_weaponlevel2,
171     pw_flight,
172 
173     NUMPOWERS
174 
175 } powertype_t;
176 
177 //
178 // Power up durations,
179 //  how many seconds till expiration,
180 //  assuming TICRATE is 35 ticks/second.
181 //
182 typedef enum
183 {
184     INVULNTICS  = (30*TICRATE),
185     INVISTICS   = (60*TICRATE),
186     INFRATICS   = (120*TICRATE),
187     IRONTICS    = (60*TICRATE)
188 
189 } powerduration_t;
190 
191 
192 // The defined weapons,
193 //  including a marker indicating
194 //  user has not changed weapon.
195 typedef enum
196 {
197     wp_fist,
198     wp_pistol,
199     wp_shotgun,
200     wp_chaingun,
201     wp_missile,
202     wp_plasma,
203     wp_bfg,
204     wp_chainsaw,
205     wp_supershotgun,
206 
207     // heretic stuff
208     wp_staff=wp_fist,
209     wp_goldwand,
210     wp_crossbow,
211     wp_blaster,
212     wp_skullrod,
213     wp_phoenixrod,
214     wp_mace,
215     wp_gauntlets,
216     wp_beak,
217 
218     NUMWEAPONS,
219 
220     // No pending weapon change.
221     wp_nochange
222 
223 } weapontype_t;
224 
225 
226 // Ammunition types defined.
227 typedef enum
228 {
229     am_clip,    // Pistol / chaingun ammo.
230     am_shell,   // Shotgun / double barreled shotgun.
231     am_cell,    // Plasma rifle, BFG.
232     am_misl,    // Missile launcher.
233 
234     // heretic stuff
235     am_goldwand = am_clip,
236     am_crossbow,
237     am_blaster,
238     am_skullrod,
239     am_phoenixrod,
240     am_mace,
241 
242     NUMAMMO,
243     am_noammo   // Unlimited for chainsaw / fist.
244 
245 } ammotype_t;
246 
247 
248 // Weapon info: sprite frames, ammunition use.
249 typedef struct
250 {
251     ammotype_t  ammo;
252     int         ammopershoot;
253     statenum_t  upstate;
254     statenum_t  downstate;
255     statenum_t  readystate;
256     statenum_t  atkstate;
257     statenum_t  holdatkstate;
258     statenum_t  flashstate;
259 
260 } weaponinfo_t;
261 
262 extern weaponinfo_t doomweaponinfo[NUMWEAPONS];
263 extern weaponinfo_t wpnlev1info[NUMWEAPONS];
264 extern weaponinfo_t wpnlev2info[NUMWEAPONS];
265 
266 #endif
267