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 #define DOOM_VERSION 109
35 
36 // Version code for cph's longtics hack ("v1.91")
37 #define DOOM_191_VERSION 111
38 
39 
40 // If rangecheck is undefined,
41 // most parameter validation debugging code will not be compiled
42 #define RANGECHECK
43 
44 // The maximum number of players, multiplayer/networking.
45 #define MAXPLAYERS 4
46 
47 // The current state of the game: whether we are
48 // playing, gazing at the intermission screen,
49 // the game final animation, or a demo.
50 typedef enum
51 {
52     GS_LEVEL,
53     GS_INTERMISSION,
54     GS_FINALE,
55     GS_DEMOSCREEN,
56 } gamestate_t;
57 
58 typedef enum
59 {
60     ga_nothing,
61     ga_loadlevel,
62     ga_newgame,
63     ga_loadgame,
64     ga_savegame,
65     ga_playdemo,
66     ga_completed,
67     ga_victory,
68     ga_worlddone,
69     ga_screenshot
70 } gameaction_t;
71 
72 //
73 // Difficulty/skill settings/filters.
74 //
75 
76 // Skill flags.
77 #define	MTF_EASY		1
78 #define	MTF_NORMAL		2
79 #define	MTF_HARD		4
80 
81 // Deaf monsters/do not react to sound.
82 #define	MTF_AMBUSH		8
83 
84 
85 //
86 // Key cards.
87 //
88 typedef enum
89 {
90     it_bluecard,
91     it_yellowcard,
92     it_redcard,
93     it_blueskull,
94     it_yellowskull,
95     it_redskull,
96 
97     NUMCARDS
98 
99 } card_t;
100 
101 
102 
103 // The defined weapons,
104 //  including a marker indicating
105 //  user has not changed weapon.
106 typedef enum
107 {
108     wp_fist,
109     wp_pistol,
110     wp_shotgun,
111     wp_chaingun,
112     wp_missile,
113     wp_plasma,
114     wp_bfg,
115     wp_chainsaw,
116     wp_supershotgun,
117 
118     NUMWEAPONS,
119 
120     // No pending weapon change.
121     wp_nochange
122 
123 } weapontype_t;
124 
125 
126 // Ammunition types defined.
127 typedef enum
128 {
129     am_clip,	// Pistol / chaingun ammo.
130     am_shell,	// Shotgun / double barreled shotgun.
131     am_cell,	// Plasma rifle, BFG.
132     am_misl,	// Missile launcher.
133     NUMAMMO,
134     am_noammo	// Unlimited for chainsaw / fist.
135 
136 } ammotype_t;
137 
138 
139 // Power up artifacts.
140 typedef enum
141 {
142     pw_invulnerability,
143     pw_strength,
144     pw_invisibility,
145     pw_ironfeet,
146     pw_allmap,
147     pw_infrared,
148     NUMPOWERS
149 
150 } powertype_t;
151 
152 
153 
154 //
155 // Power up durations,
156 //  how many seconds till expiration,
157 //  assuming TICRATE is 35 ticks/second.
158 //
159 typedef enum
160 {
161     INVULNTICS	= (30*TICRATE),
162     INVISTICS	= (60*TICRATE),
163     INFRATICS	= (120*TICRATE),
164     IRONTICS	= (60*TICRATE)
165 
166 } powerduration_t;
167 
168 #endif          // __DOOMDEF__
169