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