1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
6 // Copyright (C) 1993-1996 by id Software, Inc.
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
18 // Implements special effects:
19 // Texture animation, height or lighting changes
20 // according to adjacent sectors, respective
21 // utility functions, etc.
23 //-----------------------------------------------------------------------------
31 // End-level timer (-TIMER option)
33 extern boolean levelTimer;
34 extern int levelTimeCount;
37 // Define values for map objects
38 #define MO_TELEPORTMAN 14
42 void P_InitPicAnims (void);
45 void P_SpawnSpecials (void);
48 void P_UpdateSpecials (void);
68 void P_PlayerInSpecialSector (player_t* player);
87 fixed_t P_FindLowestFloorSurrounding(sector_t* sec);
88 fixed_t P_FindHighestFloorSurrounding(sector_t* sec);
91 P_FindNextHighestFloor
95 fixed_t P_FindLowestCeilingSurrounding(sector_t* sec);
96 fixed_t P_FindHighestCeilingSurrounding(sector_t* sec);
99 P_FindSectorFromLineTag
104 P_FindMinSurroundingLight
117 int EV_DoDonut(line_t* line);
177 #define STROBEBRIGHT 5
181 void P_SpawnFireFlicker (sector_t* sector);
182 void T_LightFlash (void* flash, void*);
183 void P_SpawnLightFlash (sector_t* sector);
184 void T_StrobeFlash (void* flash, void*);
192 void EV_StartLightStrobing(line_t* line);
193 void EV_TurnTagLightsOff(line_t* line);
200 void T_Glow(void *g, void*);
201 void P_SpawnGlowingLight(sector_t* sector);
240 // max # of wall switches in a level
241 #define MAXSWITCHES 50
243 // 4 players, 4 buttons each at once, max.
244 #define MAXBUTTONS 16
246 // 1 second, in ticks.
247 #define BUTTONTIME 35
249 extern button_t buttonlist[MAXBUTTONS];
252 P_ChangeSwitchTexture
256 void P_InitSwitchList(void);
278 raiseToNearestAndChange,
305 #define PLATSPEED FRACUNIT
309 extern plat_t* activeplats[MAXPLATS];
311 void T_PlatRaise(void *plat, void*);
319 void P_AddActivePlat(plat_t* plat);
320 void P_RemoveActivePlat(plat_t* plat);
321 void EV_StopPlat(line_t* line);
322 void P_ActivateInStasis(int tag);
351 // 1 = up, 0 = waiting at top, -1 = down
354 // tics to wait at the top
356 // (keep in case a door going down is reset)
357 // when it reaches 0, start going down
364 #define VDOORSPEED FRACUNIT*2
365 #define VDOORWAIT 150
383 void T_VerticalDoor (void *door, void*);
384 void P_SpawnDoorCloseIn30 (sector_t* sec);
387 P_SpawnDoorRaiseIn5Mins
412 fixed_t bottomheight;
417 // 1 = up, 0 = waiting, -1 = down
430 #define CEILSPEED FRACUNIT
432 #define MAXCEILINGS 30
434 extern ceiling_t* activeceilings[MAXCEILINGS];
441 void T_MoveCeiling (void*, void*);
442 void P_AddActiveCeiling(ceiling_t* c);
443 void P_RemoveActiveCeiling(ceiling_t* c);
444 int EV_CeilingCrushStop(line_t* line);
445 void P_ActivateInStasisCeiling(line_t* line);
453 // lower floor to highest surrounding floor
456 // lower floor to lowest surrounding floor
459 // lower floor to highest surrounding floor VERY FAST
462 // raise floor to lowest surrounding CEILING
465 // raise floor to next highest surrounding floor
468 // raise floor to shortest height texture around it
471 // lower floor to lowest surrounding floor
472 // and change floorpic
476 raiseFloor24AndChange,
479 // raise to next highest floor, turbo-speed
491 build8, // slowly build by 8
492 turbo16 // quickly build by 16
507 fixed_t floordestheight;
514 #define FLOORSPEED FRACUNIT
543 void T_MoveFloor(void *floor, void*);
555 //-----------------------------------------------------------------------------
559 //-----------------------------------------------------------------------------