-
Notifications
You must be signed in to change notification settings - Fork 5
/
info.h
566 lines (551 loc) · 11.6 KB
/
info.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
/* 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:
* Thing frame/state LUT,
* generated by multigen utilitiy.
* This one is the original DOOM version, preserved.
*
*-----------------------------------------------------------------------------*/
#ifndef __INFO__
#define __INFO__
/* Needed for action function pointer handling. */
#include "d_think.h"
#include "sounds.h"
/********************************************************************
* Sprite name enumeration - must match info.c *
********************************************************************/
typedef enum
{
SPR_TROO,
SPR_SHTG,
SPR_PUNG,
SPR_PISG,
SPR_PISF,
SPR_SHTF,
SPR_CHGG,
SPR_CHGF,
SPR_MISG,
SPR_MISF,
SPR_SAWG,
SPR_BLUD,
SPR_PUFF,
SPR_BAL1,
SPR_MISL,
SPR_TFOG,
SPR_PLAY,
SPR_POSS,
SPR_SPOS,
SPR_SARG,
SPR_BAL7,
SPR_BOSS,
SPR_ARM1,
SPR_ARM2,
SPR_BAR1,
SPR_BEXP,
SPR_BON1,
SPR_BON2,
SPR_BKEY,
SPR_RKEY,
SPR_YKEY,
SPR_STIM,
SPR_MEDI,
SPR_SOUL,
SPR_PINS,
SPR_SUIT,
SPR_PMAP,
SPR_PVIS,
SPR_CLIP,
SPR_AMMO,
SPR_ROCK,
SPR_BROK,
SPR_SHEL,
SPR_SBOX,
SPR_BPAK,
SPR_MGUN,
SPR_CSAW,
SPR_LAUN,
SPR_SHOT,
SPR_COLU,
SPR_POL5,
SPR_CAND,
SPR_CBRA,
SPR_ELEC,
SPR_TRED,
NUMSPRITES /* counter of how many there are */
} spritenum_t;
/********************************************************************
* States (frames) enumeration -- must match info.c *
********************************************************************/
typedef enum
{
S_NULL,
S_LIGHTDONE,
S_PUNCH,
S_PUNCHDOWN,
S_PUNCHUP,
S_PUNCH1,
S_PUNCH2,
S_PUNCH3,
S_PUNCH4,
S_PUNCH5,
S_PISTOL,
S_PISTOLDOWN,
S_PISTOLUP,
S_PISTOL1,
S_PISTOL2,
S_PISTOL3,
S_PISTOL4,
S_PISTOLFLASH,
S_SGUN,
S_SGUNDOWN,
S_SGUNUP,
S_SGUN1,
S_SGUN2,
S_SGUN3,
S_SGUN4,
S_SGUN5,
S_SGUN6,
S_SGUN7,
S_SGUN8,
S_SGUN9,
S_SGUNFLASH1,
S_SGUNFLASH2,
S_CHAIN,
S_CHAINDOWN,
S_CHAINUP,
S_CHAIN1,
S_CHAIN2,
S_CHAIN3,
S_CHAINFLASH1,
S_CHAINFLASH2,
S_MISSILE,
S_MISSILEDOWN,
S_MISSILEUP,
S_MISSILE1,
S_MISSILE2,
S_MISSILE3,
S_MISSILEFLASH1,
S_MISSILEFLASH2,
S_MISSILEFLASH3,
S_MISSILEFLASH4,
S_SAW,
S_SAWB,
S_SAWDOWN,
S_SAWUP,
S_SAW1,
S_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UN3,
S_BOSS_RUN4,
S_BOSS_RUN5,
S_BOSS_RUN6,
S_BOSS_RUN7,
S_BOSS_RUN8,
S_BOSS_ATK1,
S_BOSS_ATK2,
S_BOSS_ATK3,
S_BOSS_PAIN,
S_BOSS_PAIN2,
S_BOSS_DIE1,
S_BOSS_DIE2,
S_BOSS_DIE3,
S_BOSS_DIE4,
S_BOSS_DIE5,
S_BOSS_DIE6,
S_BOSS_DIE7,
S_ARM1,
S_ARM1A,
S_ARM2,
S_ARM2A,
S_BAR1,
S_BAR2,
S_BEXP,
S_BEXP2,
S_BEXP3,
S_BEXP4,
S_BEXP5,
S_BON1,
S_BON1A,
S_BON1B,
S_BON1C,
S_BON1D,
S_BON1E,
S_BON2,
S_BON2A,
S_BON2B,
S_BON2C,
S_BON2D,
S_BON2E,
S_BKEY,
S_BKEY2,
S_RKEY,
S_RKEY2,
S_YKEY,
S_YKEY2,
S_STIM,
S_MEDI,
S_SOUL,
S_SOUL2,
S_SOUL3,
S_SOUL4,
S_SOUL5,
S_SOUL6,
S_PINS,
S_PINS2,
S_PINS3,
S_PINS4,
S_SUIT,
S_PMAP,
S_PMAP2,
S_PMAP3,
S_PMAP4,
S_PMAP5,
S_PMAP6,
S_PVIS,
S_PVIS2,
S_CLIP,
S_AMMO,
S_ROCK,
S_BROK,
S_SHEL,
S_SBOX,
S_BPAK,
S_MGUN,
S_CSAW,
S_LAUN,
S_SHOT,
S_COLU,
S_GIBS,
S_CANDLESTIK,
S_CANDELABRA,
S_TECHPILLAR,
S_REDTORCH,
S_REDTORCH2,
S_REDTORCH3,
S_REDTORCH4,
NUMSTATES /* Counter of how many there are */
} statenum_t;
/********************************************************************
* Definition of the state (frames) structure *
********************************************************************/
typedef struct
{
spritenum_t sprite; /* sprite number to show */
uint16_t frame; /* which frame/subframe of the sprite is shown */
int16_t tics; /* number of gametics this frame should last */
actionf_t action; /* code pointer to function for action if any */
statenum_t nextstate; /* linked list pointer to next state or zero */
} state_t;
/* these are in info.c */
extern const state_t states[NUMSTATES];
extern const char* const sprnames[]; /* 1/17/98 killough - CPhipps - const */
/********************************************************************
* Thing enumeration -- must match info.c *
********************************************************************
* Note that many of these are generically named for the ornamentals
*/
typedef enum {
MT_PLAYER,
MT_POSSESSED,
MT_SHOTGUY,
MT_TROOP,
MT_SERGEANT,
MT_SHADOWS,
MT_BRUISER,
MT_BRUISERSHOT,
MT_BARREL,
MT_TROOPSHOT,
MT_ROCKET,
MT_PUFF,
MT_BLOOD,
MT_TFOG,
MT_TELEPORTMAN,
MT_MISC0,
MT_MISC1,
MT_MISC2,
MT_MISC3,
MT_MISC4,
MT_MISC5,
MT_MISC6,
MT_MISC10,
MT_MISC11,
MT_MISC12,
MT_INS,
MT_MISC14,
MT_MISC15,
MT_MISC16,
MT_CLIP,
MT_MISC17,
MT_MISC18,
MT_MISC19,
MT_MISC22,
MT_MISC23,
MT_MISC24,
MT_CHAINGUN,
MT_MISC26,
MT_MISC27,
MT_SHOTGUN,
MT_MISC31,
MT_MISC43,
MT_MISC48,
MT_MISC49,
MT_MISC50,
MT_MISC62,
MT_MISC68,
MT_MISC69,
MT_MISC71,
MT_NOTHING,
NUMMOBJTYPES // Counter of how many there are
} mobjtype_t;
/********************************************************************
* Definition of the Thing structure
********************************************************************/
/* Note that these are only indices to the state, sound, etc. arrays
* and not actual pointers. Most can be set to zero if the action or
* sound doesn't apply (like lamps generally don't attack or whistle).
*/
typedef struct
{
int16_t doomednum;
/* Thing number used in id's editor, and now
probably by every other editor too */
statenum_t spawnstate;
/* The state (frame) index when this Thing is
first created */
int16_t spawnhealth; /* The initial hit points for this Thing */
statenum_t seestate; /* The state when it sees you or wakes up */
sfxenum_t seesound; /* The sound it makes when waking */
int16_t reactiontime; /* How many tics it waits after it wakes up
before it will start to attack, in normal
skills (halved for nightmare) */
sfxenum_t attacksound; /* The sound it makes when it attacks */
statenum_t painstate; /* The state to indicate pain */
uint8_t painchance; /* A number that is checked against a random
number 0-255 to see if the Thing is supposed
to go to its painstate or not. Note this
has absolutely nothing to do with the chance
it will get hurt, just the chance of it
reacting visibly. */
sfxenum_t painsound; /* The sound it emits when it feels pain */
statenum_t meleestate; /* Melee==close attack */
statenum_t missilestate; /* What states to use when it's in the air, if
in fact it is ever used as a missile */
statenum_t deathstate; /* What state begins the death sequence */
statenum_t xdeathstate; /* What state begins the horrible death sequence
like when a rocket takes out a trooper */
sfxenum_t deathsound; /* The death sound. See also A_Scream() in
p_enemy.c for some tweaking that goes on
for certain monsters */
int32_t speed; /* How fast it moves. Too fast and it can miss
collision logic. */
int32_t radius; /* An often incorrect radius */
int32_t height; /* An often incorrect height, used only to see
if a monster can enter a sector */
int16_t mass; /* How much an impact will move it. Cacodemons
seem to retreat when shot because they have
very little mass and are moved by impact */
int16_t damage; /* If this is a missile, how much does it hurt? */
sfxenum_t activesound; /* What sound it makes wandering around, once
in a while. Chance is 3/256 it will. */
uint32_t flags; /* Bit masks for lots of things. See p_mobj.h */
} mobjinfo_t;
/* See p_mobj_h for addition more technical info */
extern const mobjinfo_t mobjinfo[NUMMOBJTYPES];
#endif