5 ===============================================================================
9 ===============================================================================
13 // Animating textures and planes
25 // source animation definition
29 boolean istexture; // if false, it's a flat
37 extern anim_t anims[MAXANIMS], *lastanim;
38 extern int *TerrainTypes;
41 // Animating line specials
43 #define MAXLINEANIMS 64
44 extern short numlinespecials;
45 extern line_t *linespeciallist[MAXLINEANIMS];
47 // Define values for map objects
48 #define MO_TELEPORTMAN 14
51 void P_InitPicAnims(void);
52 void P_InitTerrainTypes(void);
53 void P_InitLava(void);
56 void P_SpawnSpecials(void);
57 void P_InitAmbientSound(void);
58 void P_AddAmbientSfx(int sequence);
61 void P_UpdateSpecials(void);
62 void P_AmbientSound(void);
65 boolean P_UseSpecialLine ( mobj_t *thing, line_t *line);
66 void P_ShootSpecialLine ( mobj_t *thing, line_t *line);
67 void P_CrossSpecialLine (int linenum, int side, mobj_t *thing);
69 void P_PlayerInSpecialSector (player_t *player);
71 int twoSided(int sector,int line);
72 sector_t *getSector(int currentSector,int line,int side);
73 side_t *getSide(int currentSector,int line, int side);
74 fixed_t P_FindLowestFloorSurrounding(sector_t *sec);
75 fixed_t P_FindHighestFloorSurrounding(sector_t *sec);
76 fixed_t P_FindNextHighestFloor(sector_t *sec,int currentheight);
77 fixed_t P_FindLowestCeilingSurrounding(sector_t *sec);
78 fixed_t P_FindHighestCeilingSurrounding(sector_t *sec);
79 int P_FindSectorFromLineTag(line_t *line,int start);
80 int P_FindMinSurroundingLight(sector_t *sector,int max);
81 sector_t *getNextSector(line_t *line,sector_t *sec);
86 int EV_DoDonut(line_t *line);
89 ===============================================================================
93 ===============================================================================
127 #define STROBEBRIGHT 5
131 void T_LightFlash (lightflash_t *flash);
132 void P_SpawnLightFlash (sector_t *sector);
133 void T_StrobeFlash (strobe_t *flash);
134 void P_SpawnStrobeFlash (sector_t *sector, int fastOrSlow, int inSync);
135 void EV_StartLightStrobing(line_t *line);
136 void EV_TurnTagLightsOff(line_t *line);
137 void EV_LightTurnOn(line_t *line, int bright);
138 void T_Glow(glow_t *g);
139 void P_SpawnGlowingLight(sector_t *sector);
142 ===============================================================================
146 ===============================================================================
171 #define MAXSWITCHES 50 // max # of wall switches in a level
172 #define MAXBUTTONS 16 // 4 players, 4 buttons each at once, max.
173 #define BUTTONTIME 35 // 1 second
175 extern button_t buttonlist[MAXBUTTONS];
177 void P_ChangeSwitchTexture(line_t *line,int useAgain);
178 void P_InitSwitchList(void);
181 ===============================================================================
185 ===============================================================================
200 raiseToNearestAndChange
220 #define PLATSPEED FRACUNIT
223 extern plat_t *activeplats[MAXPLATS];
225 void T_PlatRaise(plat_t *plat);
226 int EV_DoPlat(line_t *line,plattype_e type,int amount);
227 void P_AddActivePlat(plat_t *plat);
228 void P_RemoveActivePlat(plat_t *plat);
229 void EV_StopPlat(line_t *line);
230 void P_ActivateInStasis(int tag);
233 ===============================================================================
237 ===============================================================================
255 int direction; // 1 = up, 0 = waiting at top, -1 = down
256 int topwait; // tics to wait at the top
257 // (keep in case a door going down is reset)
258 int topcountdown; // when it reaches 0, start going down
261 #define VDOORSPEED FRACUNIT*2
262 #define VDOORWAIT 150
264 void EV_VerticalDoor (line_t *line, mobj_t *thing);
265 int EV_DoDoor (line_t *line, vldoor_e type, fixed_t speed);
266 void T_VerticalDoor (vldoor_t *door);
267 void P_SpawnDoorCloseIn30 (sector_t *sec);
268 void P_SpawnDoorRaiseIn5Mins (sector_t *sec, int secnum);
271 ===============================================================================
275 ===============================================================================
291 fixed_t bottomheight, topheight;
294 int direction; // 1 = up, 0 = waiting, -1 = down
299 #define CEILSPEED FRACUNIT
301 #define MAXCEILINGS 30
303 extern ceiling_t *activeceilings[MAXCEILINGS];
305 int EV_DoCeiling (line_t *line, ceiling_e type);
306 void T_MoveCeiling (ceiling_t *ceiling);
307 void P_AddActiveCeiling(ceiling_t *c);
308 void P_RemoveActiveCeiling(ceiling_t *c);
309 int EV_CeilingCrushStop(line_t *line);
310 void P_ActivateInStasisCeiling(line_t *line);
313 ===============================================================================
317 ===============================================================================
321 lowerFloor, // lower floor to highest surrounding floor
322 lowerFloorToLowest, // lower floor to lowest surrounding floor
323 turboLower, // lower floor to highest surrounding floor VERY FAST
324 raiseFloor, // raise floor to lowest surrounding CEILING
325 raiseFloorToNearest, // raise floor to next highest surrounding floor
326 raiseToTexture, // raise floor to shortest height texture around it
327 lowerAndChange, // lower floor to lowest surrounding floor and change
330 raiseFloor24AndChange,
333 raiseBuildStep // One step of a staircase
345 fixed_t floordestheight;
349 #define FLOORSPEED FRACUNIT
358 result_e T_MovePlane(sector_t *sector,fixed_t speed,
359 fixed_t dest,boolean crush,int floorOrCeiling,int direction);
361 int EV_BuildStairs(line_t *line, fixed_t stepDelta);
362 int EV_DoFloor(line_t *line,floor_e floortype);
363 void T_MoveFloor(floormove_t *floor);
366 ===============================================================================
370 ===============================================================================
373 boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, angle_t angle);
374 boolean EV_Teleport(line_t *line, int side, mobj_t *thing);