Debian Codegraph @

prboom2/src/p_spec.h

raw
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 * Copyright 2005, 2006 by
12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 * 02111-1307, USA.
28 *
29 * DESCRIPTION: definitions, declarations and prototypes for specials
30 *
31 *-----------------------------------------------------------------------------*/
32
33 #ifndef __P_SPEC__
34 #define __P_SPEC__
35
36 #include "r_defs.h"
37 #include "d_player.h"
38
39 // Define values for map objects
40 #define MO_TELEPORTMAN 14
41
42 // p_floor
43
44 #define ELEVATORSPEED (FRACUNIT*4)
45 #define FLOORSPEED FRACUNIT
46
47 // p_ceilng
48
49 #define CEILSPEED FRACUNIT
50 #define CEILWAIT 150
51
52 // p_doors
53
54 #define VDOORSPEED (FRACUNIT*2)
55 #define VDOORWAIT 150
56
57 // p_plats
58
59 #define PLATWAIT 3
60 #define PLATSPEED FRACUNIT
61
62 // p_switch
63
64 // 4 players, 4 buttons each at once, max.
65 #define MAXBUTTONS 16
66
67 // 1 second, in ticks.
68 #define BUTTONTIME TICRATE
69
70 // p_lights
71
72 #define GLOWSPEED 8
73 #define STROBEBRIGHT 5
74 #define FASTDARK 15
75 #define SLOWDARK 35
76
77 //jff 3/14/98 add bits and shifts for generalized sector types
78
79 #define DAMAGE_MASK 0x60
80 #define DAMAGE_SHIFT 5
81 #define SECRET_MASK 0x80
82 #define SECRET_SHIFT 7
83 #define FRICTION_MASK 0x100
84 #define FRICTION_SHIFT 8
85 #define PUSH_MASK 0x200
86 #define PUSH_SHIFT 9
87
88 // reserved by boom spec - not implemented?
89 // bit 10: suppress all sounds within the sector
90 // bit 11: disable any sounds due to floor or ceiling motion by the sector
91
92 // mbf21
93 #define DEATH_MASK 0x1000 // bit 12
94 #define KILL_MONSTERS_MASK 0x2000 // bit 13
95
96 //jff 02/04/98 Define masks, shifts, for fields in
97 // generalized linedef types
98
99 #define GenEnd 0x8000
100 #define GenFloorBase 0x6000
101 #define GenCeilingBase 0x4000
102 #define GenDoorBase 0x3c00
103 #define GenLockedBase 0x3800
104 #define GenLiftBase 0x3400
105 #define GenStairsBase 0x3000
106 #define GenCrusherBase 0x2F80
107
108 #define TriggerType 0x0007
109 #define TriggerTypeShift 0
110
111 // define masks and shifts for the floor type fields
112
113 #define FloorCrush 0x1000
114 #define FloorChange 0x0c00
115 #define FloorTarget 0x0380
116 #define FloorDirection 0x0040
117 #define FloorModel 0x0020
118 #define FloorSpeed 0x0018
119
120 #define FloorCrushShift 12
121 #define FloorChangeShift 10
122 #define FloorTargetShift 7
123 #define FloorDirectionShift 6
124 #define FloorModelShift 5
125 #define FloorSpeedShift 3
126
127 // define masks and shifts for the ceiling type fields
128
129 #define CeilingCrush 0x1000
130 #define CeilingChange 0x0c00
131 #define CeilingTarget 0x0380
132 #define CeilingDirection 0x0040
133 #define CeilingModel 0x0020
134 #define CeilingSpeed 0x0018
135
136 #define CeilingCrushShift 12
137 #define CeilingChangeShift 10
138 #define CeilingTargetShift 7
139 #define CeilingDirectionShift 6
140 #define CeilingModelShift 5
141 #define CeilingSpeedShift 3
142
143 // define masks and shifts for the lift type fields
144
145 #define LiftTarget 0x0300
146 #define LiftDelay 0x00c0
147 #define LiftMonster 0x0020
148 #define LiftSpeed 0x0018
149
150 #define LiftTargetShift 8
151 #define LiftDelayShift 6
152 #define LiftMonsterShift 5
153 #define LiftSpeedShift 3
154
155 // define masks and shifts for the stairs type fields
156
157 #define StairIgnore 0x0200
158 #define StairDirection 0x0100
159 #define StairStep 0x00c0
160 #define StairMonster 0x0020
161 #define StairSpeed 0x0018
162
163 #define StairIgnoreShift 9
164 #define StairDirectionShift 8
165 #define StairStepShift 6
166 #define StairMonsterShift 5
167 #define StairSpeedShift 3
168
169 // define masks and shifts for the crusher type fields
170
171 #define CrusherSilent 0x0040
172 #define CrusherMonster 0x0020
173 #define CrusherSpeed 0x0018
174
175 #define CrusherSilentShift 6
176 #define CrusherMonsterShift 5
177 #define CrusherSpeedShift 3
178
179 // define masks and shifts for the door type fields
180
181 #define DoorDelay 0x0300
182 #define DoorMonster 0x0080
183 #define DoorKind 0x0060
184 #define DoorSpeed 0x0018
185
186 #define DoorDelayShift 8
187 #define DoorMonsterShift 7
188 #define DoorKindShift 5
189 #define DoorSpeedShift 3
190
191 // define masks and shifts for the locked door type fields
192
193 #define LockedNKeys 0x0200
194 #define LockedKey 0x01c0
195 #define LockedKind 0x0020
196 #define LockedSpeed 0x0018
197
198 #define LockedNKeysShift 9
199 #define LockedKeyShift 6
200 #define LockedKindShift 5
201 #define LockedSpeedShift 3
202
203 //
204 // Animating textures and planes
205 // There is another anim_t used in wi_stuff, unrelated.
206 //
207 typedef struct
208 {
209 dboolean istexture;
210 int picnum;
211 int basepic;
212 int numpics;
213 int speed;
214
215 } anim_t;
216
217 //e6y
218 typedef struct
219 {
220 int index;
221 anim_t *anim;
222 } TAnimItemParam;
223 extern TAnimItemParam *anim_flats;
224 extern TAnimItemParam *anim_textures;
225
226 // define names for the TriggerType field of the general linedefs
227
228 typedef enum
229 {
230 WalkOnce,
231 WalkMany,
232 SwitchOnce,
233 SwitchMany,
234 GunOnce,
235 GunMany,
236 PushOnce,
237 PushMany,
238 } triggertype_e;
239
240 // define names for the Speed field of the general linedefs
241
242 typedef enum
243 {
244 SpeedSlow,
245 SpeedNormal,
246 SpeedFast,
247 SpeedTurbo,
248 } motionspeed_e;
249
250 // define names for the Target field of the general floor
251
252 typedef enum
253 {
254 FtoHnF,
255 FtoLnF,
256 FtoNnF,
257 FtoLnC,
258 FtoC,
259 FbyST,
260 Fby24,
261 Fby32,
262 } floortarget_e;
263
264 // define names for the Changer Type field of the general floor
265
266 typedef enum
267 {
268 FNoChg,
269 FChgZero,
270 FChgTxt,
271 FChgTyp,
272 } floorchange_e;
273
274 // define names for the Change Model field of the general floor
275
276 typedef enum
277 {
278 FTriggerModel,
279 FNumericModel,
280 } floormodel_t;
281
282 // define names for the Target field of the general ceiling
283
284 typedef enum
285 {
286 CtoHnC,
287 CtoLnC,
288 CtoNnC,
289 CtoHnF,
290 CtoF,
291 CbyST,
292 Cby24,
293 Cby32,
294 } ceilingtarget_e;
295
296 // define names for the Changer Type field of the general ceiling
297
298 typedef enum
299 {
300 CNoChg,
301 CChgZero,
302 CChgTxt,
303 CChgTyp,
304 } ceilingchange_e;
305
306 // define names for the Change Model field of the general ceiling
307
308 typedef enum
309 {
310 CTriggerModel,
311 CNumericModel,
312 } ceilingmodel_t;
313
314 // define names for the Target field of the general lift
315
316 typedef enum
317 {
318 F2LnF,
319 F2NnF,
320 F2LnC,
321 LnF2HnF,
322 } lifttarget_e;
323
324 // define names for the door Kind field of the general ceiling
325
326 typedef enum
327 {
328 OdCDoor,
329 ODoor,
330 CdODoor,
331 CDoor,
332 } doorkind_e;
333
334 // define names for the locked door Kind field of the general ceiling
335
336 typedef enum
337 {
338 AnyKey,
339 RCard,
340 BCard,
341 YCard,
342 RSkull,
343 BSkull,
344 YSkull,
345 AllKeys,
346 } keykind_e;
347
348 //////////////////////////////////////////////////////////////////
349 //
350 // enums for classes of linedef triggers
351 //
352 //////////////////////////////////////////////////////////////////
353
354 //jff 2/23/98 identify the special classes that can share sectors
355
356 typedef enum
357 {
358 floor_special,
359 ceiling_special,
360 lighting_special,
361 } special_e;
362
363 //jff 3/15/98 pure texture/type change for better generalized support
364 typedef enum
365 {
366 trigChangeOnly,
367 numChangeOnly,
368 } change_e;
369
370 // p_plats
371
372 typedef enum
373 {
374 up,
375 down,
376 waiting,
377 in_stasis
378 } plat_e;
379
380 typedef enum
381 {
382 perpetualRaise,
383 downWaitUpStay,
384 raiseAndChange,
385 raiseToNearestAndChange,
386 blazeDWUS,
387 genLift, //jff added to support generalized Plat types
388 genPerpetual,
389 toggleUpDn, //jff 3/14/98 added to support instant toggle type
390
391 // hexen - can probably be merged
392 PLAT_PERPETUALRAISE,
393 PLAT_DOWNWAITUPSTAY,
394 PLAT_DOWNBYVALUEWAITUPSTAY,
395 PLAT_UPWAITDOWNSTAY,
396 PLAT_UPBYVALUEWAITDOWNSTAY,
397
398 // zdoom
399 platPerpetualRaise,
400 platDownWaitUpStay,
401 platDownWaitUpStayStone,
402 platDownByValue,
403 platUpByValue,
404 platUpWaitDownStay,
405 platUpNearestWaitDownStay,
406 platRaiseAndStay,
407 platRaiseAndStayLockout,
408 platUpByValueStay,
409 platToggle,
410 platDownToNearestFloor,
411 platDownToLowestCeiling,
412 } plattype_e;
413
414 // p_doors
415
416 typedef enum
417 {
418 normal,
419 close30ThenOpen,
420 closeDoor,
421 openDoor,
422 waitRaiseDoor,
423 waitCloseDoor,
424 blazeRaise,
425 blazeOpen,
426 blazeClose,
427
428 //jff 02/05/98 add generalize door types
429 genRaise,
430 genBlazeRaise,
431 genOpen,
432 genBlazeOpen,
433 genClose,
434 genBlazeClose,
435 genCdO,
436 genBlazeCdO,
437
438 // heretic
439 vld_normal,
440 vld_normal_turbo,
441 vld_close30ThenOpen,
442 vld_close,
443 vld_open,
444 vld_raiseIn5Mins,
445
446 // hexen - can probably be merged
447 DREV_NORMAL,
448 DREV_CLOSE30THENOPEN,
449 DREV_CLOSE,
450 DREV_OPEN,
451 DREV_RAISEIN5MINS,
452 } vldoor_e;
453
454 // p_ceilng
455
456 typedef enum
457 {
458 lowerToFloor,
459 raiseToHighest,
460 lowerToLowest,
461 lowerToMaxFloor,
462 lowerAndCrush,
463 crushAndRaise,
464 fastCrushAndRaise,
465 silentCrushAndRaise,
466
467 //jff 02/04/98 add types for generalized ceiling mover
468 genCeiling,
469 genCeilingChg,
470 genCeilingChg0,
471 genCeilingChgT,
472
473 //jff 02/05/98 add types for generalized ceiling mover
474 genCrusher,
475 genSilentCrusher,
476
477 // hexen - can probably be merged
478 CLEV_LOWERTOFLOOR,
479 CLEV_RAISETOHIGHEST,
480 CLEV_LOWERANDCRUSH,
481 CLEV_CRUSHANDRAISE,
482 CLEV_LOWERBYVALUE,
483 CLEV_RAISEBYVALUE,
484 CLEV_CRUSHRAISEANDSTAY,
485 CLEV_MOVETOVALUETIMES8,
486
487 // zdoom
488 ceilLowerByValue,
489 ceilRaiseByValue,
490 ceilMoveToValue,
491 ceilLowerToHighestFloor,
492 ceilLowerInstant,
493 ceilRaiseInstant,
494 ceilCrushAndRaise,
495 ceilLowerAndCrush,
496 ceil_placeholder,
497 ceilCrushRaiseAndStay,
498 ceilRaiseToNearest,
499 ceilLowerToLowest,
500 ceilLowerToFloor,
501 ceilRaiseToHighest,
502 ceilLowerToHighest,
503 ceilRaiseToLowest,
504 ceilLowerToNearest,
505 ceilRaiseToHighestFloor,
506 ceilRaiseToFloor,
507 ceilRaiseByTexture,
508 ceilLowerByTexture,
509 } ceiling_e;
510
511 typedef enum
512 {
513 crushDoom = 0,
514 crushHexen = 1,
515 crushSlowdown = 2,
516 } crushmode_e;
517
518 // p_floor
519
520 typedef enum
521 {
522 // lower floor to highest surrounding floor
523 lowerFloor,
524
525 // lower floor to lowest surrounding floor
526 lowerFloorToLowest,
527
528 // lower floor to highest surrounding floor VERY FAST
529 turboLower,
530
531 // raise floor to lowest surrounding CEILING
532 raiseFloor,
533
534 // raise floor to next highest surrounding floor
535 raiseFloorToNearest,
536
537 //jff 02/03/98 lower floor to next lowest neighbor
538 lowerFloorToNearest,
539
540 //jff 02/03/98 lower floor 24 absolute
541 lowerFloor24,
542
543 //jff 02/03/98 lower floor 32 absolute
544 lowerFloor32Turbo,
545
546 // raise floor to shortest height texture around it
547 raiseToTexture,
548
549 // lower floor to lowest surrounding floor
550 // and change floorpic
551 lowerAndChange,
552
553 raiseFloor24,
554
555 //jff 02/03/98 raise floor 32 absolute
556 raiseFloor32Turbo,
557
558 raiseFloor24AndChange,
559 raiseFloorCrush,
560
561 // raise to next highest floor, turbo-speed
562 raiseFloorTurbo,
563 donutRaise,
564 raiseFloor512,
565
566 //jff 02/04/98 add types for generalized floor mover
567 genFloor,
568 genFloorChg,
569 genFloorChg0,
570 genFloorChgT,
571
572 //new types for stair builders
573 buildStair,
574 genBuildStair,
575
576 // hexen
577 FLEV_LOWERFLOOR, // lower floor to highest surrounding floor
578 FLEV_LOWERFLOORTOLOWEST, // lower floor to lowest surrounding floor
579 FLEV_LOWERFLOORBYVALUE,
580 FLEV_RAISEFLOOR, // raise floor to lowest surrounding CEILING
581 FLEV_RAISEFLOORTONEAREST, // raise floor to next highest surrounding floor
582 FLEV_RAISEFLOORBYVALUE,
583 FLEV_RAISEFLOORCRUSH,
584 FLEV_RAISEBUILDSTEP, // One step of a staircase
585 FLEV_RAISEBYVALUETIMES8,
586 FLEV_LOWERBYVALUETIMES8,
587 FLEV_LOWERTIMES8INSTANT,
588 FLEV_RAISETIMES8INSTANT,
589 FLEV_MOVETOVALUETIMES8,
590
591 // zdoom
592 floorLowerByValue,
593 floorLowerToLowest,
594 floorLowerToHighest,
595 floorLowerToNearest,
596 floorRaiseByValue,
597 floorRaiseToHighest,
598 floorRaiseToNearest,
599 floorRaiseToLowest,
600 floorRaiseAndCrush,
601 floorRaiseAndCrushDoom,
602 floorLowerInstant,
603 floorRaiseInstant,
604 floorLowerToCeiling,
605 floorMoveToValue,
606 floorRaiseToLowestCeiling,
607 floorLowerToLowestCeiling,
608 floorRaiseByTexture,
609 floorLowerByTexture,
610 floorRaiseToCeiling,
611 floorRaiseAndChange,
612 floorLowerAndChange,
613
614 floorBuildStair,
615 floorWaitStair,
616 floorResetStair,
617 } floor_e;
618
619 typedef enum
620 {
621 build8, // slowly build by 8
622 turbo16, // quickly build by 16
623
624 // heretic
625 heretic_build8,
626 heretic_turbo16,
627
628 // zdoom
629 stairBuildDown,
630 stairBuildUp,
631 } stair_e;
632
633 #define STAIR_USE_SPECIALS 1
634 #define STAIR_SYNC 2
635 #define STAIR_CRUSH 4
636
637 typedef enum
638 {
639 elevateUp,
640 elevateDown,
641 elevateCurrent,
642
643 // zdoom
644 elevateLower,
645 elevateRaise,
646 } elevator_e;
647
648 //////////////////////////////////////////////////////////////////
649 //
650 // general enums
651 //
652 //////////////////////////////////////////////////////////////////
653
654 // texture type enum
655 typedef enum
656 {
657 top,
658 middle,
659 bottom
660
661 } bwhere_e;
662
663 // crush check returns
664 typedef enum
665 {
666 ok,
667 crushed,
668 pastdest
669 } result_e;
670
671 //////////////////////////////////////////////////////////////////
672 //
673 // linedef and sector special data types
674 //
675 //////////////////////////////////////////////////////////////////
676
677 // p_switch
678
679 // switch animation structure type
680
681 #if defined(__MWERKS__)
682 #pragma options align=packed
683 #endif
684
685 typedef struct
686 {
687 char name1[9];
688 char name2[9];
689 short episode;
690 } PACKEDATTR switchlist_t; //jff 3/23/98 pack to read from memory
691
692 #if defined(__MWERKS__)
693 #pragma options align=reset
694 #endif
695
696 typedef struct
697 {
698 line_t* line;
699 bwhere_e where;
700 int btexture;
701 int btimer;
702 degenmobj_t* soundorg;
703
704 } button_t;
705
706 // p_lights
707
708 typedef struct
709 {
710 thinker_t thinker;
711 sector_t* sector;
712 int count;
713 int maxlight;
714 int minlight;
715
716 } fireflicker_t;
717
718 typedef struct
719 {
720 thinker_t thinker;
721 sector_t* sector;
722 int count;
723 int maxlight;
724 int minlight;
725 int maxtime;
726 int mintime;
727
728 } lightflash_t;
729
730 typedef struct
731 {
732 thinker_t thinker;
733 sector_t* sector;
734 int count;
735 int minlight;
736 int maxlight;
737 int darktime;
738 int brighttime;
739
740 } strobe_t;
741
742 typedef struct
743 {
744 thinker_t thinker;
745 sector_t* sector;
746 int minlight;
747 int maxlight;
748 int direction;
749
750 } glow_t;
751
752 typedef struct
753 {
754 thinker_t thinker;
755 sector_t* sector;
756 short startlevel;
757 short endlevel;
758 short tics;
759 short maxtics;
760 dboolean oneshot;
761 } zdoom_glow_t;
762
763 typedef struct
764 {
765 thinker_t thinker;
766 sector_t* sector;
767 short upper;
768 short lower;
769 short count;
770 } zdoom_flicker_t;
771
772 // p_plats
773
774 typedef struct
775 {
776 thinker_t thinker;
777 sector_t* sector;
778 fixed_t speed;
779 fixed_t low;
780 fixed_t high;
781 int wait;
782 int count;
783 plat_e status;
784 plat_e oldstatus;
785 int crush;
786 int tag;
787 plattype_e type;
788
789 struct platlist *list; // killough
790 } plat_t;
791
792 // New limit-free plat structure -- killough
793
794 typedef struct platlist {
795 plat_t *plat;
796 struct platlist *next,**prev;
797 } platlist_t;
798
799 // p_ceilng
800
801 typedef struct
802 {
803 thinker_t thinker;
804 vldoor_e type;
805 sector_t* sector;
806 fixed_t topheight;
807 fixed_t speed;
808
809 // 1 = up, 0 = waiting at top, -1 = down
810 int direction;
811
812 // tics to wait at the top
813 int topwait;
814 // (keep in case a door going down is reset)
815 // when it reaches 0, start going down
816 int topcountdown;
817
818 //jff 1/31/98 keep track of line door is triggered by
819 line_t *line;
820
821 /* killough 10/98: sector tag for gradual lighting effects */
822 int lighttag;
823 } vldoor_t;
824
825 typedef struct {
826 short special;
827 unsigned int flags;
828 damage_t damage;
829 } newspecial_t;
830
831 // p_doors
832
833 typedef struct
834 {
835 thinker_t thinker;
836 ceiling_e type;
837 sector_t* sector;
838 fixed_t bottomheight;
839 fixed_t topheight;
840 fixed_t speed;
841 fixed_t oldspeed;
842 int crush;
843
844 //jff 02/04/98 add these to support ceiling changers
845 newspecial_t newspecial;
846 short texture;
847
848 // 1 = up, 0 = waiting, -1 = down
849 int direction;
850
851 // ID
852 int tag;
853 int olddirection;
854 struct ceilinglist *list; // jff 2/22/98 copied from killough's plats
855
856 // zdoom
857 fixed_t speed2;
858 crushmode_e crushmode;
859 byte silent;
860 } ceiling_t;
861
862 typedef struct ceilinglist {
863 ceiling_t *ceiling;
864 struct ceilinglist *next,**prev;
865 } ceilinglist_t;
866
867 // p_floor
868
869 typedef struct
870 {
871 thinker_t thinker;
872 floor_e type;
873 int crush;
874 sector_t* sector;
875 int direction;
876 newspecial_t newspecial;
877 short texture;
878 fixed_t floordestheight;
879 fixed_t speed;
880
881 // hexen
882 int delayCount;
883 int delayTotal;
884 fixed_t stairsDelayHeight;
885 fixed_t stairsDelayHeightDelta;
886 fixed_t resetHeight;
887 short resetDelay;
888 short resetDelayCount;
889 byte textureChange;
890
891 // zdoom
892 dboolean hexencrush;
893 } floormove_t;
894
895 typedef struct
896 {
897 thinker_t thinker;
898 elevator_e type;
899 sector_t* sector;
900 int direction;
901 fixed_t floordestheight;
902 fixed_t ceilingdestheight;
903 fixed_t speed;
904 } elevator_t;
905
906 // p_spec
907
908 // phares 3/12/98: added new model of friction for ice/sludge effects
909
910 typedef struct {
911 thinker_t thinker; // Thinker structure for friction
912 int friction; // friction value (E800 = normal)
913 int movefactor; // inertia factor when adding to momentum
914 int affectee; // Number of affected sector
915 } friction_t;
916
917 // phares 3/20/98: added new model of Pushers for push/pull effects
918
919 typedef struct {
920 thinker_t thinker; // Thinker structure for Pusher
921 enum
922 {
923 p_push,
924 p_pull,
925 p_wind,
926 p_current,
927 } type;
928 mobj_t* source; // Point source if point pusher
929 int x_mag; // X Strength
930 int y_mag; // Y Strength
931 int magnitude; // Vector strength for point pusher
932 int radius; // Effective radius for point pusher
933 int x; // X of point source if point pusher
934 int y; // Y of point source if point pusher
935 int affectee; // Number of affected sector
936 } pusher_t;
937
938 //////////////////////////////////////////////////////////////////
939 //
940 // external data declarations
941 //
942 //////////////////////////////////////////////////////////////////
943
944 // list of retriggerable buttons active
945 extern button_t buttonlist[MAXBUTTONS];
946
947 extern platlist_t *activeplats; // killough 2/14/98
948
949 extern ceilinglist_t *activeceilings; // jff 2/22/98
950
951 ////////////////////////////////////////////////////////////////
952 //
953 // Linedef and sector special utility function prototypes
954 //
955 ////////////////////////////////////////////////////////////////
956
957 int twoSided
958 ( int sector,
959 int line );
960
961 sector_t* getSector
962 ( int currentSector,
963 int line,
964 int side );
965
966 side_t* getSide
967 ( int currentSector,
968 int line,
969 int side );
970
971 fixed_t P_FindLowestFloorSurrounding
972 ( sector_t* sec );
973
974 fixed_t P_FindHighestFloorSurrounding
975 ( sector_t* sec );
976
977 fixed_t P_FindNextHighestFloor
978 ( sector_t* sec,
979 int currentheight );
980
981 fixed_t P_FindNextLowestFloor
982 ( sector_t* sec,
983 int currentheight );
984
985 fixed_t P_FindLowestCeilingSurrounding
986 ( sector_t* sec ); // jff 2/04/98
987
988 fixed_t P_FindHighestCeilingSurrounding
989 ( sector_t* sec ); // jff 2/04/98
990
991 fixed_t P_FindNextLowestCeiling
992 ( sector_t *sec,
993 int currentheight ); // jff 2/04/98
994
995 fixed_t P_FindNextHighestCeiling
996 ( sector_t *sec,
997 int currentheight ); // jff 2/04/98
998
999 fixed_t P_FindShortestTextureAround
1000 ( int secnum ); // jff 2/04/98
1001
1002 fixed_t P_FindShortestUpperAround
1003 ( int secnum ); // jff 2/04/98
1004
1005 sector_t* P_FindModelFloorSector
1006 ( fixed_t floordestheight,
1007 int secnum ); //jff 02/04/98
1008
1009 sector_t* P_FindModelCeilingSector
1010 ( fixed_t ceildestheight,
1011 int secnum ); //jff 02/04/98
1012
1013 int P_FindMinSurroundingLight
1014 ( sector_t* sector,
1015 int max );
1016
1017 sector_t* getNextSector
1018 ( line_t* line,
1019 sector_t* sec );
1020
1021 int P_CheckTag
1022 (line_t *line); // jff 2/27/98
1023
1024 dboolean P_CanUnlockGenDoor
1025 ( line_t* line,
1026 player_t* player);
1027
1028 dboolean PUREFUNC P_PlaneActive(const sector_t *sec);
1029 dboolean PUREFUNC P_CeilingActive(const sector_t *sec);
1030 dboolean PUREFUNC P_FloorActive(const sector_t *sec);
1031 dboolean PUREFUNC P_LightingActive(const sector_t *sec);
1032
1033 short P_FloorLightLevel(const sector_t *sec);
1034 short P_CeilingLightLevel(const sector_t *sec);
1035 dboolean P_FloorPlanesDiffer(const sector_t *sec, const sector_t *other);
1036 dboolean P_CeilingPlanesDiffer(const sector_t *sec, const sector_t *other);
1037
1038 dboolean PUREFUNC P_IsSecret
1039 ( const sector_t *sec );
1040
1041 dboolean PUREFUNC P_IsDeathExit
1042 ( const sector_t *sec );
1043
1044 dboolean PUREFUNC P_WasSecret
1045 ( const sector_t *sec );
1046
1047 dboolean PUREFUNC P_RevealedSecret
1048 ( const sector_t *sec );
1049
1050 void P_ChangeSwitchTexture
1051 ( line_t* line,
1052 int useAgain );
1053
1054 ////////////////////////////////////////////////////////////////
1055 //
1056 // Linedef and sector special action function prototypes
1057 //
1058 ////////////////////////////////////////////////////////////////
1059
1060 // p_lights
1061
1062 void T_LightFlash
1063 ( lightflash_t* flash );
1064
1065 void T_StrobeFlash
1066 ( strobe_t* flash );
1067
1068 // jff 8/8/98 add missing thinker for flicker
1069 void T_FireFlicker
1070 ( fireflicker_t* flick );
1071
1072 void T_Glow
1073 ( glow_t* g );
1074
1075 // p_plats
1076
1077 void T_PlatRaise
1078 ( plat_t* plat );
1079
1080 // p_doors
1081
1082 void T_VerticalDoor
1083 ( vldoor_t* door );
1084
1085 // p_ceilng
1086
1087 void T_MoveCeiling
1088 ( ceiling_t* ceiling );
1089
1090 // p_floor
1091
1092 result_e T_MoveFloorPlane
1093 ( sector_t* sector,
1094 fixed_t speed,
1095 fixed_t dest,
1096 int crush,
1097 int direction,
1098 dboolean hexencrush );
1099
1100 void T_MoveFloor
1101 ( floormove_t* floor );
1102
1103 void T_MoveElevator
1104 ( elevator_t* elevator );
1105
1106 // p_spec
1107
1108 void T_Friction
1109 ( friction_t * ); // phares 3/12/98: friction thinker
1110
1111 void T_Pusher
1112 ( pusher_t * ); // phares 3/20/98: Push thinker
1113
1114 ////////////////////////////////////////////////////////////////
1115 //
1116 // Linedef and sector special handler prototypes
1117 //
1118 ////////////////////////////////////////////////////////////////
1119
1120 // p_telept
1121
1122 // killough 1/31/98: Add silent line teleporter
1123 int EV_SilentLineTeleport
1124 ( line_t* line,
1125 int side,
1126 mobj_t* thing,
1127 int tag,
1128 dboolean reverse);
1129
1130 // p_floor
1131
1132 int
1133 EV_DoElevator
1134 ( line_t* line,
1135 elevator_e type );
1136
1137 int EV_BuildStairs
1138 ( line_t* line,
1139 stair_e type );
1140
1141 int EV_DoFloor
1142 ( line_t* line,
1143 floor_e floortype );
1144
1145 // p_ceilng
1146
1147 result_e T_MoveCeilingPlane
1148 ( sector_t* sector,
1149 fixed_t speed,
1150 fixed_t dest,
1151 int crush,
1152 int direction,
1153 dboolean hexencrush );
1154
1155 int EV_DoCeiling
1156 ( line_t* line,
1157 ceiling_e type );
1158
1159 int EV_CeilingCrushStop
1160 ( line_t* line );
1161
1162 // p_doors
1163
1164 int EV_VerticalDoor
1165 ( line_t* line,
1166 mobj_t* thing );
1167
1168 int EV_DoDoor
1169 ( line_t* line,
1170 vldoor_e type );
1171
1172 int EV_DoLockedDoor
1173 ( line_t* line,
1174 vldoor_e type,
1175 mobj_t* thing );
1176
1177 // p_lights
1178
1179 int EV_StartLightStrobing
1180 ( line_t* line );
1181
1182 int EV_TurnTagLightsOff
1183 ( line_t* line );
1184
1185 int EV_LightTurnOn
1186 ( line_t* line,
1187 int bright );
1188
1189 int EV_LightTurnOnPartway(line_t* line, fixed_t level); // killough 10/10/98
1190
1191 // p_floor
1192
1193 int EV_DoChange
1194 ( line_t* line,
1195 change_e changetype,
1196 int tag );
1197
1198 int EV_DoDonut
1199 ( line_t* line );
1200
1201 // p_plats
1202
1203 int EV_DoPlat
1204 ( line_t* line,
1205 plattype_e type,
1206 int amount );
1207
1208 int EV_StopPlat
1209 ( line_t* line );
1210
1211 // p_genlin
1212
1213 int EV_DoGenFloor
1214 ( line_t* line );
1215
1216 int EV_DoGenCeiling
1217 ( line_t* line );
1218
1219 int EV_DoGenLift
1220 ( line_t* line );
1221
1222 int EV_DoGenStairs
1223 ( line_t* line );
1224
1225 int EV_DoGenCrusher
1226 ( line_t* line );
1227
1228 int EV_DoGenDoor
1229 ( line_t* line );
1230
1231 int EV_DoGenLockedDoor
1232 ( line_t* line );
1233
1234 ////////////////////////////////////////////////////////////////
1235 //
1236 // Linedef and sector special thinker spawning
1237 //
1238 ////////////////////////////////////////////////////////////////
1239
1240 // at game start
1241 void P_InitPicAnims
1242 ( void );
1243
1244 void P_InitSwitchList
1245 ( void );
1246
1247 void P_StartButton
1248 ( line_t* line,
1249 bwhere_e w,
1250 int texture,
1251 int time );
1252
1253 // at map load
1254 void P_SpawnSpecials
1255 ( void );
1256
1257 // every tic
1258 void P_UpdateSpecials
1259 ( void );
1260
1261 // when needed
1262 dboolean P_UseSpecialLine
1263 ( mobj_t* thing,
1264 line_t* line,
1265 int side,
1266 dboolean noplayercheck);
1267
1268 void P_PlayerInSpecialSector
1269 ( player_t* player );
1270
1271 // p_lights
1272
1273 void P_SpawnFireFlicker
1274 ( sector_t* sector );
1275
1276 void P_SpawnLightFlash
1277 ( sector_t* sector );
1278
1279 void P_SpawnStrobeFlash
1280 ( sector_t* sector,
1281 int fastOrSlow,
1282 int inSync );
1283
1284 void P_SpawnGlowingLight
1285 ( sector_t* sector );
1286
1287 // p_plats
1288
1289 void P_AddActivePlat
1290 ( plat_t* plat );
1291
1292 void P_RemoveActivePlat
1293 ( plat_t* plat );
1294
1295 void P_RemoveAllActivePlats
1296 ( void ); // killough
1297
1298 void P_ActivateInStasis
1299 ( int tag );
1300
1301 // p_doors
1302
1303 void P_SpawnDoorCloseIn30
1304 ( sector_t* sec );
1305
1306 void P_SpawnDoorRaiseIn5Mins
1307 ( sector_t* sec,
1308 int secnum );
1309
1310 // p_ceilng
1311
1312 void P_RemoveActiveCeiling
1313 ( ceiling_t* ceiling ); //jff 2/22/98
1314
1315 void P_RemoveAllActiveCeilings
1316 ( void ); //jff 2/22/98
1317
1318 void P_AddActiveCeiling
1319 ( ceiling_t* c );
1320
1321 int P_ActivateInStasisCeiling
1322 ( int tag );
1323
1324 mobj_t* P_GetPushThing(int); // phares 3/23/98
1325
1326 // heretic
1327
1328 void P_InitTerrainTypes(void);
1329 void P_InitLava(void);
1330 void P_SpawnLineSpecials(void);
1331
1332 #define MAX_AMBIENT_SFX 8
1333
1334 extern int AmbSfxTics;
1335 extern int AmbSfxVolume;
1336 extern int AmbSfxPtrIndex;
1337 extern int *AmbSfxPtr;
1338 extern int *LevelAmbientSfx[MAX_AMBIENT_SFX];
1339 extern int *TerrainTypes;
1340
1341 void P_InitAmbientSound(void);
1342 void P_AmbientSound(void);
1343 void P_AddAmbientSfx(int sequence);
1344 dboolean P_Teleport(mobj_t * thing, fixed_t x, fixed_t y, angle_t angle, dboolean useFog);
1345 dboolean Heretic_P_UseSpecialLine(mobj_t * thing, line_t * line, int side, dboolean bossaction);
1346 void Heretic_EV_VerticalDoor(line_t * line, mobj_t * thing);
1347
1348 // hexen
1349
1350 // p_lights
1351
1352 typedef enum
1353 {
1354 LITE_RAISEBYVALUE,
1355 LITE_LOWERBYVALUE,
1356 LITE_CHANGETOVALUE,
1357 LITE_FADE,
1358 LITE_GLOW,
1359 LITE_FLICKER,
1360 LITE_STROBE
1361 } lighttype_t;
1362
1363 typedef struct
1364 {
1365 thinker_t thinker;
1366 sector_t *sector;
1367 lighttype_t type;
1368 int value1;
1369 int value2;
1370 int tics1;
1371 int tics2;
1372 int count;
1373 } light_t;
1374
1375 typedef struct
1376 {
1377 thinker_t thinker;
1378 sector_t *sector;
1379 int index;
1380 int base;
1381 } phase_t;
1382
1383 #define LIGHT_SEQUENCE_START 2
1384 #define LIGHT_SEQUENCE 3
1385 #define LIGHT_SEQUENCE_ALT 4
1386
1387 void T_Phase(phase_t * phase);
1388 void T_Light(light_t * light);
1389 void P_SpawnPhasedLight(sector_t * sector, int base, int index);
1390 void P_SpawnLightSequence(sector_t * sector, int indexStep);
1391 dboolean EV_SpawnLight(line_t * line, byte * arg, lighttype_t type);
1392
1393 // p_ceilng
1394
1395 int Hexen_EV_CeilingCrushStop(line_t * line, byte * args);
1396 int Hexen_EV_DoCeiling(line_t * line, byte * arg, ceiling_e type);
1397
1398 // p_telept
1399
1400 dboolean EV_HexenTeleport(int tid, mobj_t * thing, dboolean fog);
1401
1402 // p_doors
1403
1404 int Hexen_EV_DoDoor(line_t * line, byte * args, vldoor_e type);
1405 dboolean Hexen_EV_VerticalDoor(line_t * line, mobj_t * thing);
1406
1407 // p_floor
1408
1409 typedef struct
1410 {
1411 thinker_t thinker;
1412 sector_t *sector;
1413 int ceilingSpeed;
1414 int floorSpeed;
1415 int floordest;
1416 int ceilingdest;
1417 int direction;
1418 int crush;
1419
1420 // zdoom
1421 dboolean hexencrush;
1422 } pillar_t;
1423
1424 typedef enum
1425 {
1426 pillarBuild,
1427 pillarOpen,
1428 } pillar_e;
1429
1430 typedef struct
1431 {
1432 thinker_t thinker;
1433 sector_t *sector;
1434 fixed_t originalHeight;
1435 fixed_t accumulator;
1436 fixed_t accDelta;
1437 fixed_t targetScale;
1438 fixed_t scale;
1439 fixed_t scaleDelta;
1440 int ticker;
1441 int state;
1442 } planeWaggle_t;
1443
1444 typedef enum
1445 {
1446 STAIRS_NORMAL,
1447 STAIRS_SYNC,
1448 STAIRS_PHASED
1449 } stairs_e;
1450
1451 int Hexen_EV_DoFloor(line_t * line, byte * args, floor_e floortype);
1452 int EV_DoFloorAndCeiling(line_t * line, byte * args, dboolean raise);
1453 int Hexen_EV_BuildStairs(line_t * line, byte * args, int direction, stairs_e stairsType);
1454 void T_BuildPillar(pillar_t * pillar);
1455 int EV_BuildPillar(line_t * line, byte * args, int crush);
1456 int EV_OpenPillar(line_t * line, byte * args);
1457 int EV_FloorCrushStop(line_t * line, byte * args);
1458 void T_FloorWaggle(planeWaggle_t * waggle);
1459 void T_CeilingWaggle(planeWaggle_t * waggle);
1460 dboolean EV_StartFloorWaggle(int tag, int height, int speed, int offset, int timer);
1461
1462 // p_plats
1463
1464 int EV_DoHexenPlat(line_t * line, byte * args, plattype_e type, int amount);
1465 void Hexen_EV_StopPlat(line_t * line, byte * args);
1466
1467 // quake
1468
1469 typedef struct {
1470 thinker_t thinker;
1471 mobj_t *location;
1472 int duration;
1473 int intensity;
1474 int damage_radius;
1475 int tremor_radius;
1476 } quake_t;
1477
1478 void dsda_ResetQuakes(void);
1479 void dsda_UpdateQuakeIntensity(int player_num, int intensity);
1480 void dsda_UpdateQuake(quake_t* quake);
1481 void dsda_SpawnQuake(mobj_t* location, int intensity, int duration,
1482 int damage_radius, int tremor_radius);
1483
1484 //
1485
1486 dboolean P_ActivateLine(line_t * line, mobj_t * mo, int side, line_activation_t activationType);
1487 void P_PlayerOnSpecialFlat(player_t * player, int floorType);
1488 line_t *P_FindLine(int lineTag, int *searchPosition);
1489
1490 dboolean P_IsSpecialSector(sector_t *sector);
1491 void P_CopySectorSpecial(sector_t *dest, sector_t *source);
1492 void P_TransferSpecial(sector_t *sector, newspecial_t *newspecial);
1493 void P_CopyTransferSpecial(newspecial_t *newspecial, sector_t *sector);
1494 void P_ResetTransferSpecial(newspecial_t *newspecial);
1495 void P_ResetSectorSpecial(sector_t *sector);
1496 void P_ClearNonGeneralizedSectorSpecial(sector_t *sector);
1497
1498 typedef enum {
1499 zs_light_phased = 1,
1500 zs_light_sequence_start = 2,
1501 zs_light_sequence_special1 = 3,
1502 zs_light_sequence_special2 = 4,
1503
1504 zs_stairs_special1 = 26,
1505 zs_stairs_special2 = 27,
1506
1507 zs_wind_east_weak = 40,
1508 zs_wind_east_medium = 41,
1509 zs_wind_east_strong = 42,
1510 zs_wind_north_weak = 43,
1511 zs_wind_north_medium = 44,
1512 zs_wind_north_strong = 45,
1513 zs_wind_south_weak = 46,
1514 zs_wind_south_medium = 47,
1515 zs_wind_south_strong = 48,
1516 zs_wind_west_weak = 49,
1517 zs_wind_west_medium = 50,
1518 zs_wind_west_strong = 51,
1519
1520 zs_d_light_flicker = 65,
1521 zs_d_light_strobe_fast = 66,
1522 zs_d_light_strobe_slow = 67,
1523 zs_d_light_strobe_hurt = 68,
1524 zs_d_damage_hellslime = 69,
1525
1526 zs_d_damage_nukage = 71,
1527 zs_d_light_glow = 72,
1528
1529 zs_d_sector_door_close_in_30 = 74,
1530 zs_d_damage_end = 75,
1531 zs_d_light_strobe_slow_sync = 76,
1532 zs_d_light_strobe_fast_sync = 77,
1533 zs_d_sector_door_raise_in_5_mins = 78,
1534 zs_d_friction_low = 79,
1535 zs_d_damage_super_hellslime = 80,
1536 zs_d_light_fire_flicker = 81,
1537 zs_d_damage_lava_wimpy = 82,
1538 zs_d_damage_lava_hefty = 83,
1539 zs_d_scroll_east_lava_damage = 84,
1540 zs_h_damage_sludge = 85,
1541
1542 zs_sector_outside = 87,
1543
1544 zs_s_light_strobe_hurt = 104,
1545 zs_s_damage_hellslime = 105,
1546
1547 zs_damage_instant_death = 115,
1548 zs_s_damage_super_hellslime = 116,
1549
1550 zs_scroll_strife_current = 118,
1551
1552 zs_sector_hidden = 195,
1553 zs_sector_heal = 196,
1554 zs_light_outdoor_lightning = 197,
1555 zs_light_indoor_lightning1 = 198,
1556 zs_light_indoor_lightning2 = 199,
1557 zs_sky2 = 200,
1558
1559 // hexen-type scrollers
1560 zs_scroll_north_slow = 201,
1561 zs_scroll_north_medium = 202,
1562 zs_scroll_north_fast = 203,
1563 zs_scroll_east_slow = 204,
1564 zs_scroll_east_medium = 205,
1565 zs_scroll_east_fast = 206,
1566 zs_scroll_south_slow = 207,
1567 zs_scroll_south_medium = 208,
1568 zs_scroll_south_fast = 209,
1569 zs_scroll_west_slow = 210,
1570 zs_scroll_west_medium = 211,
1571 zs_scroll_west_fast = 212,
1572 zs_scroll_northwest_slow = 213,
1573 zs_scroll_northwest_medium = 214,
1574 zs_scroll_northwest_fast = 215,
1575 zs_scroll_northeast_slow = 216,
1576 zs_scroll_northeast_medium = 217,
1577 zs_scroll_northeast_fast = 218,
1578 zs_scroll_southeast_slow = 219,
1579 zs_scroll_southeast_medium = 220,
1580 zs_scroll_southeast_fast = 221,
1581 zs_scroll_southwest_slow = 222,
1582 zs_scroll_southwest_medium = 223,
1583 zs_scroll_southwest_fast = 224,
1584
1585 // heretic-type scrollers
1586 zs_carry_east5 = 225,
1587 zs_carry_east10 = 226,
1588 zs_carry_east25 = 227,
1589 zs_carry_east30 = 228,
1590 zs_carry_east35 = 229,
1591 zs_carry_north5 = 230,
1592 zs_carry_north10 = 231,
1593 zs_carry_north25 = 232,
1594 zs_carry_north30 = 233,
1595 zs_carry_north35 = 234,
1596 zs_carry_south5 = 235,
1597 zs_carry_south10 = 236,
1598 zs_carry_south25 = 237,
1599 zs_carry_south30 = 238,
1600 zs_carry_south35 = 239,
1601 zs_carry_west5 = 240,
1602 zs_carry_west10 = 241,
1603 zs_carry_west25 = 242,
1604 zs_carry_west30 = 243,
1605 zs_carry_west35 = 244
1606 } zdoom_sectorspecial_t;
1607
1608 #define ZDOOM_DAMAGE_MASK 0x0300
1609 #define ZDOOM_SECRET_MASK 0x0400
1610 #define ZDOOM_FRICTION_MASK 0x0800
1611 #define ZDOOM_PUSH_MASK 0x1000
1612
1613 typedef enum {
1614 zk_none = 0,
1615 zk_red_card = 1,
1616 zk_blue_card = 2,
1617 zk_yellow_card = 3,
1618 zk_red_skull = 4,
1619 zk_blue_skull = 5,
1620 zk_yellow_skull = 6,
1621 zk_any = 100,
1622 zk_all = 101,
1623 zk_red = 129,
1624 zk_blue = 130,
1625 zk_yellow = 131,
1626 zk_redx = 132, // not sure why these redundant ones exist
1627 zk_bluex = 133,
1628 zk_yellowx = 134,
1629 zk_each_color = 229,
1630 } zdoom_lock_t;
1631
1632 void P_AddMobjSecret(mobj_t *mobj);
1633 void P_PlayerCollectSecret(player_t *player);
1634 dboolean P_CheckKeys(mobj_t *mo, zdoom_lock_t lock, dboolean legacy);
1635 dboolean P_CheckSwitchRange(line_t *line, mobj_t *mo, int sideno);
1636 int EV_DoZDoomDoor(vldoor_e type, line_t *line, mobj_t *mo, int tag, fixed_t speed, int topwait,
1637 zdoom_lock_t lock, int lightTag, dboolean boomgen, int topcountdown);
1638 int EV_DoZDoomFloor(floor_e floortype, line_t *line, int tag, fixed_t speed, fixed_t height,
1639 int crush, int change, dboolean hexencrush, dboolean hereticlower);
1640 int EV_ZDoomFloorStop(int tag, line_t *line);
1641 int EV_ZDoomFloorCrushStop(int tag);
1642 int EV_DoZDoomDonut(int tag, line_t *line, fixed_t pillarspeed, fixed_t slimespeed);
1643 int EV_DoZDoomCeiling(ceiling_e type, line_t *line, int tag, fixed_t speed, fixed_t speed2,
1644 fixed_t height, int crush, byte silent, int change, crushmode_e crushmode);
1645 int EV_ZDoomCeilingStop(int tag, line_t *line);
1646 int EV_ZDoomCeilingCrushStop(int tag, dboolean remove);
1647 int EV_DoZDoomPlat(int tag, line_t *line, plattype_e type, fixed_t height,
1648 fixed_t speed, int delay, fixed_t lip, int change);
1649 void EV_StopZDoomPlat(int tag, dboolean remove);
1650 int EV_BuildZDoomStairs(int tag, stair_e type, line_t *line, fixed_t stairsize,
1651 fixed_t speed, int delay, int reset, int igntxt, int usespecials);
1652 dboolean EV_StartPlaneWaggle(int tag, line_t *line, int height,
1653 int speed, int offset, int timer, dboolean ceiling);
1654 int EV_DoZDoomPillar(pillar_e type, line_t *line, int tag, fixed_t speed,
1655 fixed_t height, fixed_t height2, int crush, dboolean hexencrush);
1656 int EV_DoZDoomElevator(line_t *line, elevator_e type, fixed_t speed, fixed_t height, int tag);
1657 void EV_LightChange(int tag, short change);
1658 void EV_LightSet(int tag, short level);
1659 void EV_LightSetMinNeighbor(int tag);
1660 void EV_LightSetMaxNeighbor(int tag);
1661 void EV_StartLightFading(int tag, short level, short tics);
1662 void EV_StartLightGlowing(int tag, short upper, short lower, short tics);
1663 void EV_StartLightFlickering(int tag, short upper, short lower);
1664 void EV_StartZDoomLightStrobing(int tag, int upper, int lower, int brighttime, int darktime);
1665 void EV_StartZDoomLightStrobingDoom(int tag, int brighttime, int darktime);
1666 void EV_StopLightEffect(int tag);
1667 void T_ZDoom_Glow(zdoom_glow_t *g);
1668 void T_ZDoom_Flicker(zdoom_flicker_t *g);
1669 int P_ConvertHexenCrush(int crush);
1670 void P_ResolveFrictionFactor(fixed_t friction_factor, sector_t *sec);
1671
1672 int EV_TeleportGroup(short group_tid, mobj_t *thing, short source_tid, short dest_tid,
1673 dboolean move_source, dboolean fog);
1674 int EV_TeleportInSector(int tag, short source_tid, short dest_tid,
1675 dboolean fog, short group_tid);
1676
1677 #define NO_CRUSH -1
1678 #define DOOM_CRUSH 10
1679
1680 #define TELF_DESTFOG 0x01
1681 #define TELF_SOURCEFOG 0x02
1682 #define TELF_KEEPORIENTATION 0x04
1683 #define TELF_KEEPVELOCITY 0x08
1684 #define TELF_KEEPHEIGHT 0x10
1685 #define TELF_ROTATEBOOM 0x20
1686 #define TELF_ROTATEBOOMINVERSE 0x40
1687 #define TELF_VANILLA (TELF_SOURCEFOG|TELF_DESTFOG)
1688 #define TELF_SILENT (TELF_KEEPORIENTATION|TELF_ROTATEBOOM|TELF_KEEPHEIGHT)
1689
1690 #endif