summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/doomdef.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/doomdef.h')
-rw-r--r--apps/plugins/doom/doomdef.h306
1 files changed, 306 insertions, 0 deletions
diff --git a/apps/plugins/doom/doomdef.h b/apps/plugins/doom/doomdef.h
new file mode 100644
index 0000000000..f76b09263a
--- /dev/null
+++ b/apps/plugins/doom/doomdef.h
@@ -0,0 +1,306 @@
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 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 * 02111-1307, USA.
26 *
27 * DESCRIPTION:
28 * Internally used data structures for virtually everything,
29 * key definitions, lots of other stuff.
30 *
31 *-----------------------------------------------------------------------------*/
32
33#ifndef __DOOMDEF__
34#define __DOOMDEF__
35
36// killough 4/25/98: Make gcc extensions mean nothing on other compilers
37#ifndef __GNUC__
38#define __attribute__(x)
39#endif
40
41//
42// Global parameters/defines.
43//
44// DOOM version
45enum { DVERSION = 110 };
46
47// Game mode handling - identify IWAD version
48// to handle IWAD dependend animations etc.
49typedef enum {
50 shareware, // DOOM 1 shareware, E1, M9
51 registered, // DOOM 1 registered, E3, M27
52 commercial, // DOOM 2 retail, E1 M34 (DOOM 2 german edition not handled)
53 retail, // DOOM 1 retail, E4, M36
54 indetermined // Well, no IWAD found.
55} GameMode_t;
56
57// Mission packs - might be useful for TC stuff?
58typedef enum {
59 doom, // DOOM 1
60 doom2, // DOOM 2
61 pack_tnt, // TNT mission pack
62 pack_plut, // Plutonia pack
63 none
64} GameMission_t;
65
66// Identify language to use, software localization.
67typedef enum {
68 english,
69 french,
70 german,
71 unknown
72} Language_t;
73
74//
75// For resize of screen, at start of game.
76//
77
78#define BASE_WIDTH 320
79
80// It is educational but futile to change this
81// scaling e.g. to 2. Drawing of status bar,
82// menues etc. is tied to the scale implied
83// by the graphics.
84
85#define INV_ASPECT_RATIO 0.625 // 0.75, ideally
86
87// killough 2/8/98: MAX versions for maximum screen sizes
88// allows us to avoid the overhead of dynamic allocation
89// when multiple screen sizes are supported
90
91// proff 08/17/98: Changed for high-res
92#define MAX_SCREENWIDTH 1600
93#define MAX_SCREENHEIGHT 1200
94
95#define SCREENWIDTH 320
96#define SCREENHEIGHT 200
97
98// The maximum number of players, multiplayer/networking.
99#define MAXPLAYERS 4
100
101// phares 5/14/98:
102// DOOM Editor Numbers (aka doomednum in mobj_t)
103
104#define DEN_PLAYER5 4001
105#define DEN_PLAYER6 4002
106#define DEN_PLAYER7 4003
107#define DEN_PLAYER8 4004
108
109// State updates, number of tics / second.
110#define TICRATE 35
111
112// The current state of the game: whether we are playing, gazing
113// at the intermission screen, the game final animation, or a demo.
114
115typedef enum {
116 GS_LEVEL,
117 GS_INTERMISSION,
118 GS_FINALE,
119 GS_DEMOSCREEN
120} gamestate_t;
121
122//
123// Difficulty/skill settings/filters.
124//
125
126// Skill flags.
127#define MTF_EASY 1
128#define MTF_NORMAL 2
129#define MTF_HARD 4
130// Deaf monsters/do not react to sound.
131#define MTF_AMBUSH 8
132
133/* killough 11/98 */
134#define MTF_NOTSINGLE 16
135#define MTF_NOTDM 32
136#define MTF_NOTCOOP 64
137#define MTF_FRIEND 128
138#define MTF_RESERVED 256
139
140typedef enum {
141 sk_none=-1, //jff 3/24/98 create unpicked skill setting
142 sk_baby=0,
143 sk_easy,
144 sk_medium,
145 sk_hard,
146 sk_nightmare
147} skill_t;
148
149//
150// Key cards.
151//
152
153typedef enum {
154 it_bluecard,
155 it_yellowcard,
156 it_redcard,
157 it_blueskull,
158 it_yellowskull,
159 it_redskull,
160 NUMCARDS
161} card_t;
162
163// The defined weapons, including a marker
164// indicating user has not changed weapon.
165typedef enum {
166 wp_fist,
167 wp_pistol,
168 wp_shotgun,
169 wp_chaingun,
170 wp_missile,
171 wp_plasma,
172 wp_bfg,
173 wp_chainsaw,
174 wp_supershotgun,
175
176 NUMWEAPONS,
177 wp_nochange // No pending weapon change.
178} weapontype_t;
179
180// Ammunition types defined.
181typedef enum {
182 am_clip, // Pistol / chaingun ammo.
183 am_shell, // Shotgun / double barreled shotgun.
184 am_cell, // Plasma rifle, BFG.
185 am_misl, // Missile launcher.
186 NUMAMMO,
187 am_noammo // Unlimited for chainsaw / fist.
188} ammotype_t;
189
190// Power up artifacts.
191typedef enum {
192 pw_invulnerability,
193 pw_strength,
194 pw_invisibility,
195 pw_ironfeet,
196 pw_allmap,
197 pw_infrared,
198 NUMPOWERS
199} powertype_t;
200
201// Power up durations (how many seconds till expiration).
202typedef enum {
203 INVULNTICS = (30*TICRATE),
204 INVISTICS = (60*TICRATE),
205 INFRATICS = (120*TICRATE),
206 IRONTICS = (60*TICRATE)
207} powerduration_t;
208
209//
210// DOOM keyboard definition.
211// This is the stuff configured by Setup.Exe.
212// Most key data are simple ascii (uppercased).
213//
214#define KEY_RIGHTARROW 0xae
215#define KEY_LEFTARROW 0xac
216#define KEY_UPARROW 0xad
217#define KEY_DOWNARROW 0xaf
218#define KEY_ESCAPE 0x1B
219#define KEY_ENTER 0x0D
220#define KEY_TAB 0x09
221#define KEY_F1 (0x80+0x3b)
222#define KEY_F2 (0x80+0x3c)
223#define KEY_F3 (0x80+0x3d)
224#define KEY_F4 (0x80+0x3e)
225#define KEY_F5 (0x80+0x3f)
226#define KEY_F6 (0x80+0x40)
227#define KEY_F7 (0x80+0x41)
228#define KEY_F8 (0x80+0x42)
229#define KEY_F9 (0x80+0x43)
230#define KEY_F10 (0x80+0x44)
231#define KEY_F11 (0x80+0x57)
232#define KEY_F12 (0x80+0x58)
233#define KEY_BACKSPACE 0x7F
234#define KEY_PAUSE 0xff
235#define KEY_EQUALS 0x3d
236#define KEY_MINUS 0x2d
237#define KEY_RSHIFT (0x80+0x36)
238#define KEY_RCTRL (0x80+0x1d)
239#define KEY_RALT (0x80+0x38)
240#define KEY_LALT KEY_RALT
241#define KEY_CAPSLOCK 0xba // phares
242
243// phares 3/2/98:
244#define KEY_INSERT 0xd2
245#define KEY_HOME 0xc7
246#define KEY_PAGEUP 0xc9
247#define KEY_PAGEDOWN 0xd1
248#define KEY_DEL 0xc8
249#define KEY_END 0xcf
250#define KEY_SCROLLLOCK 0xc6
251#define KEY_SPACEBAR 0x20
252// phares 3/2/98
253
254#define KEY_NUMLOCK 0xC5 // killough 3/6/98
255
256// cph - Add the numeric keypad keys, as suggested by krose 4/22/99:
257// The way numbers are assigned to keys is a mess, but it's too late to
258// change that easily. At least these additions are don neatly.
259// Codes 0x100-0x200 are reserved for number pad
260
261#define KEY_KEYPAD0 (0x100 + '0')
262#define KEY_KEYPAD1 (0x100 + '1')
263#define KEY_KEYPAD2 (0x100 + '2')
264#define KEY_KEYPAD3 (0x100 + '3')
265#define KEY_KEYPAD4 (0x100 + '4')
266#define KEY_KEYPAD5 (0x100 + '5')
267#define KEY_KEYPAD6 (0x100 + '6')
268#define KEY_KEYPAD7 (0x100 + '7')
269#define KEY_KEYPAD8 (0x100 + '8')
270#define KEY_KEYPAD9 (0x100 + '9')
271#define KEY_KEYPADENTER (0x100 + KEY_ENTER)
272#define KEY_KEYPADDIVIDE (0x100 + '/')
273#define KEY_KEYPADMULTIPLY (0x100 + '*')
274#define KEY_KEYPADMINUS (0x100 + '-')
275#define KEY_KEYPADPLUS (0x100 + '+')
276#define KEY_KEYPADPERIOD (0x100 + '.')
277
278// phares 4/19/98:
279// Defines Setup Screen groups that config variables appear in.
280// Used when resetting the defaults for every item in a Setup group.
281
282typedef enum {
283 ss_none,
284 ss_keys,
285 ss_weap,
286 ss_stat,
287 ss_auto,
288 ss_enem,
289 ss_mess,
290 ss_chat,
291 ss_gen, /* killough 10/98 */
292 ss_comp, /* killough 10/98 */
293 ss_max
294} ss_types;
295
296// phares 3/20/98:
297//
298// Player friction is variable, based on controlling
299// linedefs. More friction can create mud, sludge,
300// magnetized floors, etc. Less friction can create ice.
301
302#define MORE_FRICTION_MOMENTUM 15000 // mud factor based on momentum
303#define ORIG_FRICTION 0xE800 // original value
304#define ORIG_FRICTION_FACTOR 2048 // original value
305
306#endif // __DOOMDEF__