-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdoomdef.h
182 lines (149 loc) · 4.37 KB
/
doomdef.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/* Emacs style mode select -*- C++ -*-
*-----------------------------------------------------------------------------
*
*
* PrBoom: a Doom port merged with LxDoom and LSDLDoom
* based on BOOM, a modified and improved DOOM engine
* Copyright (C) 1999 by
* id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
* Copyright (C) 1999-2000 by
* Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
* Copyright 2005, 2006 by
* Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
* Copyright 2023, 2024 by
* Frenkel Smeijers
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* DESCRIPTION:
* Internally used data structures for virtually everything,
* key definitions, lots of other stuff.
*
*-----------------------------------------------------------------------------*/
#ifndef __DOOMDEF__
#define __DOOMDEF__
/* use config.h if autoconf made one -- josh */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdint.h>
// This must come first, since it redefines malloc(), free(), etc. -- killough:
#include "z_zone.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include "m_swap.h"
#define UNUSED(x) (x = x) // for pesky compiler / lint warnings
#if !defined VIEWWINDOWWIDTH
#define VIEWWINDOWWIDTH 60
#endif
#if !defined VIEWWINDOWHEIGHT
#define VIEWWINDOWHEIGHT 128
#endif
// SCREENWIDTH and SCREENHEIGHT define the visible size
#define SCREENWIDTH 240u
#define SCREENHEIGHT (VIEWWINDOWHEIGHT+ST_HEIGHT)
#define SCREENWIDTH_VGA 320
#define SCREENHEIGHT_VGA 200
// The maximum number of players, multiplayer/networking.
#define MAXPLAYERS 1
// State updates, number of tics / second.
#define TICRATE 35
//
// Difficulty/skill settings/filters.
//
typedef enum {
sk_none=-1, //jff 3/24/98 create unpicked skill setting
sk_baby=0,
sk_easy,
sk_medium,
sk_hard
} skill_t;
//
// Key cards.
//
typedef enum {
it_bluecard,
it_yellowcard,
it_redcard,
NUMCARDS
} card_t;
// The defined weapons, including a marker
// indicating user has not changed weapon.
typedef enum {
wp_fist,
wp_pistol,
wp_shotgun,
wp_chaingun,
wp_missile,
wp_plasma,
wp_bfg,
wp_chainsaw,
wp_supershotgun,
NUMWEAPONS,
wp_nochange // No pending weapon change.
} weapontype_t;
// Ammunition types defined.
typedef enum {
am_clip, // Pistol / chaingun ammo.
am_shell, // Shotgun / double barreled shotgun.
am_cell, // Plasma rifle, BFG.
am_misl, // Missile launcher.
NUMAMMO,
am_noammo // Unlimited for chainsaw / fist.
} ammotype_t;
// Power up artifacts.
typedef enum {
pw_invulnerability,
pw_strength,
pw_invisibility,
pw_ironfeet,
pw_allmap,
pw_infrared,
NUMPOWERS
} powertype_t;
// Power up durations (how many seconds till expiration).
typedef enum {
INVULNTICS = (30*TICRATE),
INVISTICS = (60*TICRATE),
INFRATICS = (120*TICRATE),
IRONTICS = (60*TICRATE)
} powerduration_t;
//GBA Keys
#define KEYD_A 1
#define KEYD_B 2
#define KEYD_L 3
#define KEYD_R 4
#define KEYD_UP 5
#define KEYD_DOWN 6
#define KEYD_LEFT 7
#define KEYD_RIGHT 8
#define KEYD_START 9
#define KEYD_SELECT 10
#define KEYD_MINUS 11
#define KEYD_PLUS 12
#define KEYD_BRACKET_LEFT 13
#define KEYD_BRACKET_RIGHT 14
#define NUMKEYS 16
//
// Player friction is variable, based on controlling
// linedefs. More friction can create mud, sludge,
// magnetized floors, etc. Less friction can create ice.
#define ORIG_FRICTION 0xE800 // original value
#define ORIG_FRICTION_FACTOR 2048L // original value
#endif // __DOOMDEF__