p_spec.h 21 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  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. #ifndef __P_SPEC__
  33. #define __P_SPEC__
  34. #include "r_defs.h"
  35. #include "d_player.h"
  36. // Define values for map objects
  37. #define MO_TELEPORTMAN 14
  38. // p_floor
  39. #define ELEVATORSPEED (FRACUNIT*4)
  40. #define FLOORSPEED FRACUNIT
  41. // p_ceilng
  42. #define CEILSPEED FRACUNIT
  43. #define CEILWAIT 150
  44. // p_doors
  45. #define VDOORSPEED (FRACUNIT*2)
  46. #define VDOORWAIT 150
  47. // p_plats
  48. #define PLATWAIT 3
  49. #define PLATSPEED FRACUNIT
  50. // p_switch
  51. // 4 players, 4 buttons each at once, max.
  52. // killough 2/14/98: redefine in terms of MAXPLAYERS
  53. #define MAXBUTTONS (MAXPLAYERS*4)
  54. #define MAXSWITCHES 50
  55. // 1 second, in ticks.
  56. #define BUTTONTIME TICRATE
  57. // p_lights
  58. #define GLOWSPEED 8
  59. #define STROBEBRIGHT 5
  60. #define FASTDARK 15
  61. #define SLOWDARK 35
  62. //jff 3/14/98 add bits and shifts for generalized sector types
  63. #define DAMAGE_MASK 0x60
  64. #define DAMAGE_SHIFT 5
  65. #define SECRET_MASK 0x80
  66. #define SECRET_SHIFT 7
  67. #define FRICTION_MASK 0x100
  68. #define FRICTION_SHIFT 8
  69. #define PUSH_MASK 0x200
  70. #define PUSH_SHIFT 9
  71. //jff 02/04/98 Define masks, shifts, for fields in
  72. // generalized linedef types
  73. #define GenEnd 0x8000
  74. #define GenFloorBase 0x6000
  75. #define GenCeilingBase 0x4000
  76. #define GenDoorBase 0x3c00
  77. #define GenLockedBase 0x3800
  78. #define GenLiftBase 0x3400
  79. #define GenStairsBase 0x3000
  80. #define GenCrusherBase 0x2F80
  81. #define TriggerType 0x0007
  82. #define TriggerTypeShift 0
  83. // define masks and shifts for the floor type fields
  84. #define FloorCrush 0x1000
  85. #define FloorChange 0x0c00
  86. #define FloorTarget 0x0380
  87. #define FloorDirection 0x0040
  88. #define FloorModel 0x0020
  89. #define FloorSpeed 0x0018
  90. #define FloorCrushShift 12
  91. #define FloorChangeShift 10
  92. #define FloorTargetShift 7
  93. #define FloorDirectionShift 6
  94. #define FloorModelShift 5
  95. #define FloorSpeedShift 3
  96. // define masks and shifts for the ceiling type fields
  97. #define CeilingCrush 0x1000
  98. #define CeilingChange 0x0c00
  99. #define CeilingTarget 0x0380
  100. #define CeilingDirection 0x0040
  101. #define CeilingModel 0x0020
  102. #define CeilingSpeed 0x0018
  103. #define CeilingCrushShift 12
  104. #define CeilingChangeShift 10
  105. #define CeilingTargetShift 7
  106. #define CeilingDirectionShift 6
  107. #define CeilingModelShift 5
  108. #define CeilingSpeedShift 3
  109. // define masks and shifts for the lift type fields
  110. #define LiftTarget 0x0300
  111. #define LiftDelay 0x00c0
  112. #define LiftMonster 0x0020
  113. #define LiftSpeed 0x0018
  114. #define LiftTargetShift 8
  115. #define LiftDelayShift 6
  116. #define LiftMonsterShift 5
  117. #define LiftSpeedShift 3
  118. // define masks and shifts for the stairs type fields
  119. #define StairIgnore 0x0200
  120. #define StairDirection 0x0100
  121. #define StairStep 0x00c0
  122. #define StairMonster 0x0020
  123. #define StairSpeed 0x0018
  124. #define StairIgnoreShift 9
  125. #define StairDirectionShift 8
  126. #define StairStepShift 6
  127. #define StairMonsterShift 5
  128. #define StairSpeedShift 3
  129. // define masks and shifts for the crusher type fields
  130. #define CrusherSilent 0x0040
  131. #define CrusherMonster 0x0020
  132. #define CrusherSpeed 0x0018
  133. #define CrusherSilentShift 6
  134. #define CrusherMonsterShift 5
  135. #define CrusherSpeedShift 3
  136. // define masks and shifts for the door type fields
  137. #define DoorDelay 0x0300
  138. #define DoorMonster 0x0080
  139. #define DoorKind 0x0060
  140. #define DoorSpeed 0x0018
  141. #define DoorDelayShift 8
  142. #define DoorMonsterShift 7
  143. #define DoorKindShift 5
  144. #define DoorSpeedShift 3
  145. // define masks and shifts for the locked door type fields
  146. #define LockedNKeys 0x0200
  147. #define LockedKey 0x01c0
  148. #define LockedKind 0x0020
  149. #define LockedSpeed 0x0018
  150. #define LockedNKeysShift 9
  151. #define LockedKeyShift 6
  152. #define LockedKindShift 5
  153. #define LockedSpeedShift 3
  154. // define names for the TriggerType field of the general linedefs
  155. typedef enum
  156. {
  157. WalkOnce,
  158. WalkMany,
  159. SwitchOnce,
  160. SwitchMany,
  161. GunOnce,
  162. GunMany,
  163. PushOnce,
  164. PushMany,
  165. } triggertype_e;
  166. // define names for the Speed field of the general linedefs
  167. typedef enum
  168. {
  169. SpeedSlow,
  170. SpeedNormal,
  171. SpeedFast,
  172. SpeedTurbo,
  173. } motionspeed_e;
  174. // define names for the Target field of the general floor
  175. typedef enum
  176. {
  177. FtoHnF,
  178. FtoLnF,
  179. FtoNnF,
  180. FtoLnC,
  181. FtoC,
  182. FbyST,
  183. Fby24,
  184. Fby32,
  185. } floortarget_e;
  186. // define names for the Changer Type field of the general floor
  187. typedef enum
  188. {
  189. FNoChg,
  190. FChgZero,
  191. FChgTxt,
  192. FChgTyp,
  193. } floorchange_e;
  194. // define names for the Change Model field of the general floor
  195. typedef enum
  196. {
  197. FTriggerModel,
  198. FNumericModel,
  199. } floormodel_t;
  200. // define names for the Target field of the general ceiling
  201. typedef enum
  202. {
  203. CtoHnC,
  204. CtoLnC,
  205. CtoNnC,
  206. CtoHnF,
  207. CtoF,
  208. CbyST,
  209. Cby24,
  210. Cby32,
  211. } ceilingtarget_e;
  212. // define names for the Changer Type field of the general ceiling
  213. typedef enum
  214. {
  215. CNoChg,
  216. CChgZero,
  217. CChgTxt,
  218. CChgTyp,
  219. } ceilingchange_e;
  220. // define names for the Change Model field of the general ceiling
  221. typedef enum
  222. {
  223. CTriggerModel,
  224. CNumericModel,
  225. } ceilingmodel_t;
  226. // define names for the Target field of the general lift
  227. typedef enum
  228. {
  229. F2LnF,
  230. F2NnF,
  231. F2LnC,
  232. LnF2HnF,
  233. } lifttarget_e;
  234. // define names for the door Kind field of the general ceiling
  235. typedef enum
  236. {
  237. OdCDoor,
  238. ODoor,
  239. CdODoor,
  240. CDoor,
  241. } doorkind_e;
  242. // define names for the locked door Kind field of the general ceiling
  243. typedef enum
  244. {
  245. AnyKey,
  246. RCard,
  247. BCard,
  248. YCard,
  249. RSkull,
  250. BSkull,
  251. YSkull,
  252. AllKeys,
  253. } keykind_e;
  254. //////////////////////////////////////////////////////////////////
  255. //
  256. // enums for classes of linedef triggers
  257. //
  258. //////////////////////////////////////////////////////////////////
  259. //jff 2/23/98 identify the special classes that can share sectors
  260. typedef enum
  261. {
  262. floor_special,
  263. ceiling_special,
  264. lighting_special,
  265. } special_e;
  266. //jff 3/15/98 pure texture/type change for better generalized support
  267. typedef enum
  268. {
  269. trigChangeOnly,
  270. numChangeOnly,
  271. } change_e;
  272. // p_plats
  273. typedef enum
  274. {
  275. up,
  276. down,
  277. waiting,
  278. in_stasis
  279. } plat_e;
  280. typedef enum
  281. {
  282. perpetualRaise,
  283. downWaitUpStay,
  284. raiseAndChange,
  285. raiseToNearestAndChange,
  286. blazeDWUS,
  287. genLift, //jff added to support generalized Plat types
  288. genPerpetual,
  289. toggleUpDn, //jff 3/14/98 added to support instant toggle type
  290. } plattype_e;
  291. // p_doors
  292. typedef enum
  293. {
  294. normal,
  295. close30ThenOpen,
  296. dclose,
  297. dopen,
  298. raiseIn5Mins,
  299. blazeRaise,
  300. blazeOpen,
  301. blazeClose,
  302. //jff 02/05/98 add generalize door types
  303. genRaise,
  304. genBlazeRaise,
  305. genOpen,
  306. genBlazeOpen,
  307. genClose,
  308. genBlazeClose,
  309. genCdO,
  310. genBlazeCdO,
  311. } vldoor_e;
  312. // p_ceilng
  313. typedef enum
  314. {
  315. lowerToFloor,
  316. raiseToHighest,
  317. lowerToLowest,
  318. lowerToMaxFloor,
  319. lowerAndCrush,
  320. crushAndRaise,
  321. fastCrushAndRaise,
  322. silentCrushAndRaise,
  323. //jff 02/04/98 add types for generalized ceiling mover
  324. genCeiling,
  325. genCeilingChg,
  326. genCeilingChg0,
  327. genCeilingChgT,
  328. //jff 02/05/98 add types for generalized ceiling mover
  329. genCrusher,
  330. genSilentCrusher,
  331. } ceiling_e;
  332. // p_floor
  333. typedef enum
  334. {
  335. // lower floor to highest surrounding floor
  336. lowerFloor,
  337. // lower floor to lowest surrounding floor
  338. lowerFloorToLowest,
  339. // lower floor to highest surrounding floor VERY FAST
  340. turboLower,
  341. // raise floor to lowest surrounding CEILING
  342. raiseFloor,
  343. // raise floor to next highest surrounding floor
  344. raiseFloorToNearest,
  345. //jff 02/03/98 lower floor to next lowest neighbor
  346. lowerFloorToNearest,
  347. //jff 02/03/98 lower floor 24 absolute
  348. lowerFloor24,
  349. //jff 02/03/98 lower floor 32 absolute
  350. lowerFloor32Turbo,
  351. // raise floor to shortest height texture around it
  352. raiseToTexture,
  353. // lower floor to lowest surrounding floor
  354. // and change floorpic
  355. lowerAndChange,
  356. raiseFloor24,
  357. //jff 02/03/98 raise floor 32 absolute
  358. raiseFloor32Turbo,
  359. raiseFloor24AndChange,
  360. raiseFloorCrush,
  361. // raise to next highest floor, turbo-speed
  362. raiseFloorTurbo,
  363. donutRaise,
  364. raiseFloor512,
  365. //jff 02/04/98 add types for generalized floor mover
  366. genFloor,
  367. genFloorChg,
  368. genFloorChg0,
  369. genFloorChgT,
  370. //new types for stair builders
  371. buildStair,
  372. genBuildStair,
  373. } floor_e;
  374. typedef enum
  375. {
  376. build8, // slowly build by 8
  377. turbo16 // quickly build by 16
  378. } stair_e;
  379. typedef enum
  380. {
  381. elevateUp,
  382. elevateDown,
  383. elevateCurrent,
  384. } elevator_e;
  385. //////////////////////////////////////////////////////////////////
  386. //
  387. // general enums
  388. //
  389. //////////////////////////////////////////////////////////////////
  390. // texture type enum
  391. typedef enum
  392. {
  393. top,
  394. middle,
  395. bottom
  396. } bwhere_e;
  397. // crush check returns
  398. typedef enum
  399. {
  400. ok,
  401. crushed,
  402. pastdest
  403. } result_e;
  404. //////////////////////////////////////////////////////////////////
  405. //
  406. // linedef and sector special data types
  407. //
  408. //////////////////////////////////////////////////////////////////
  409. // p_switch
  410. // switch animation structure type
  411. #if defined(__MWERKS__)
  412. #pragma options align=packed
  413. #endif
  414. typedef struct
  415. {
  416. char name1[9];
  417. char name2[9];
  418. short episode;
  419. } PACKEDATTR switchlist_t; //jff 3/23/98 pack to read from memory
  420. #if defined(__MWERKS__)
  421. #pragma options align=reset
  422. #endif
  423. typedef struct
  424. {
  425. const line_t* line;
  426. bwhere_e where;
  427. int btexture;
  428. int btimer;
  429. degenmobj_t* soundorg;
  430. } button_t;
  431. // p_lights
  432. typedef struct
  433. {
  434. thinker_t thinker;
  435. sector_t* sector;
  436. int count;
  437. int maxlight;
  438. int minlight;
  439. } fireflicker_t;
  440. typedef struct
  441. {
  442. thinker_t thinker;
  443. sector_t* sector;
  444. int count;
  445. int maxlight;
  446. int minlight;
  447. int maxtime;
  448. int mintime;
  449. } lightflash_t;
  450. typedef struct
  451. {
  452. thinker_t thinker;
  453. sector_t* sector;
  454. int count;
  455. int minlight;
  456. int maxlight;
  457. int darktime;
  458. int brighttime;
  459. } strobe_t;
  460. typedef struct
  461. {
  462. thinker_t thinker;
  463. sector_t* sector;
  464. int minlight;
  465. int maxlight;
  466. int direction;
  467. } glow_t;
  468. // p_plats
  469. typedef struct
  470. {
  471. thinker_t thinker;
  472. sector_t* sector;
  473. fixed_t speed;
  474. fixed_t low;
  475. fixed_t high;
  476. int wait;
  477. int count;
  478. plat_e status;
  479. plat_e oldstatus;
  480. boolean crush;
  481. int tag;
  482. plattype_e type;
  483. struct platlist *list; // killough
  484. } plat_t;
  485. // New limit-free plat structure -- killough
  486. typedef struct platlist {
  487. plat_t *plat;
  488. struct platlist *next,**prev;
  489. } platlist_t;
  490. // p_ceilng
  491. typedef struct
  492. {
  493. thinker_t thinker;
  494. vldoor_e type;
  495. sector_t* sector;
  496. fixed_t topheight;
  497. fixed_t speed;
  498. // 1 = up, 0 = waiting at top, -1 = down
  499. int direction;
  500. // tics to wait at the top
  501. int topwait;
  502. // (keep in case a door going down is reset)
  503. // when it reaches 0, start going down
  504. int topcountdown;
  505. //jff 1/31/98 keep track of line door is triggered by
  506. const line_t *line;
  507. /* killough 10/98: sector tag for gradual lighting effects */
  508. int lighttag;
  509. } vldoor_t;
  510. // p_doors
  511. typedef struct
  512. {
  513. thinker_t thinker;
  514. ceiling_e type;
  515. sector_t* sector;
  516. fixed_t bottomheight;
  517. fixed_t topheight;
  518. fixed_t speed;
  519. fixed_t oldspeed;
  520. boolean crush;
  521. //jff 02/04/98 add these to support ceiling changers
  522. int newspecial;
  523. int oldspecial; //jff 3/14/98 add to fix bug in change transfers
  524. short texture;
  525. // 1 = up, 0 = waiting, -1 = down
  526. int direction;
  527. // ID
  528. int tag;
  529. int olddirection;
  530. struct ceilinglist *list; // jff 2/22/98 copied from killough's plats
  531. } ceiling_t;
  532. typedef struct ceilinglist {
  533. ceiling_t *ceiling;
  534. struct ceilinglist *next,**prev;
  535. } ceilinglist_t;
  536. // p_floor
  537. typedef struct
  538. {
  539. thinker_t thinker;
  540. floor_e type;
  541. boolean crush;
  542. sector_t* sector;
  543. int direction;
  544. int newspecial;
  545. int oldspecial; //jff 3/14/98 add to fix bug in change transfers
  546. short texture;
  547. fixed_t floordestheight;
  548. fixed_t speed;
  549. } floormove_t;
  550. typedef struct
  551. {
  552. thinker_t thinker;
  553. elevator_e type;
  554. sector_t* sector;
  555. int direction;
  556. fixed_t floordestheight;
  557. fixed_t ceilingdestheight;
  558. fixed_t speed;
  559. } elevator_t;
  560. // p_spec
  561. // killough 3/7/98: Add generalized scroll effects
  562. typedef struct {
  563. thinker_t thinker; // Thinker structure for scrolling
  564. int affectee; // Number of affected sidedef, sector, tag, or whatever
  565. } scroll_t;
  566. // phares 3/12/98: added new model of friction for ice/sludge effects
  567. typedef struct {
  568. //thinker_t thinker; // Thinker structure for friction
  569. int friction; // friction value (E800 = normal)
  570. //int movefactor; // inertia factor when adding to momentum
  571. int affectee; // Number of affected sector
  572. } friction_t;
  573. // phares 3/20/98: added new model of Pushers for push/pull effects
  574. typedef struct {
  575. thinker_t thinker; // Thinker structure for Pusher
  576. enum
  577. {
  578. p_push,
  579. p_pull,
  580. p_wind,
  581. p_current,
  582. } type;
  583. mobj_t* source; // Point source if point pusher
  584. int x_mag; // X Strength
  585. int y_mag; // Y Strength
  586. int magnitude; // Vector strength for point pusher
  587. int radius; // Effective radius for point pusher
  588. int x; // X of point source if point pusher
  589. int y; // Y of point source if point pusher
  590. int affectee; // Number of affected sector
  591. } pusher_t;
  592. //
  593. // Animating textures and planes
  594. // There is another anim_t used in wi_stuff, unrelated.
  595. //
  596. typedef struct
  597. {
  598. boolean istexture;
  599. short picnum;
  600. short basepic;
  601. short numpics;
  602. short speed;
  603. } anim_t;
  604. //
  605. // source animation definition
  606. //
  607. //
  608. typedef struct
  609. {
  610. signed char istexture; //jff 3/23/98 make char for comparison // cph - make signed
  611. char endname[9]; // if false, it is a flat
  612. char startname[9];
  613. int speed;
  614. } PACKEDATTR animdef_t; //jff 3/23/98 pack to read from memory
  615. #define MAXANIMS 32
  616. ////////////////////////////////////////////////////////////////
  617. //
  618. // Linedef and sector special utility function prototypes
  619. //
  620. ////////////////////////////////////////////////////////////////
  621. int twoSided
  622. ( int sector,
  623. int line );
  624. side_t* getSide
  625. ( int currentSector,
  626. int line,
  627. int side );
  628. fixed_t P_FindLowestFloorSurrounding
  629. ( sector_t* sec );
  630. fixed_t P_FindHighestFloorSurrounding
  631. ( sector_t* sec );
  632. fixed_t P_FindNextHighestFloor
  633. ( sector_t* sec,
  634. int currentheight );
  635. fixed_t P_FindNextLowestFloor
  636. ( sector_t* sec,
  637. int currentheight );
  638. fixed_t P_FindLowestCeilingSurrounding
  639. ( sector_t* sec ); // jff 2/04/98
  640. fixed_t P_FindHighestCeilingSurrounding
  641. ( sector_t* sec ); // jff 2/04/98
  642. fixed_t P_FindNextLowestCeiling
  643. ( sector_t *sec,
  644. int currentheight ); // jff 2/04/98
  645. fixed_t P_FindNextHighestCeiling
  646. ( sector_t *sec,
  647. int currentheight ); // jff 2/04/98
  648. fixed_t P_FindShortestTextureAround
  649. ( int secnum ); // jff 2/04/98
  650. fixed_t P_FindShortestUpperAround
  651. ( int secnum ); // jff 2/04/98
  652. sector_t* P_FindModelFloorSector
  653. ( fixed_t floordestheight,
  654. int secnum ); //jff 02/04/98
  655. sector_t* P_FindModelCeilingSector
  656. ( fixed_t ceildestheight,
  657. int secnum ); //jff 02/04/98
  658. int P_FindSectorFromLineTag
  659. ( const line_t *line,
  660. int start ); // killough 4/17/98
  661. int P_FindLineFromLineTag
  662. ( const line_t *line,
  663. int start ); // killough 4/17/98
  664. int P_FindMinSurroundingLight
  665. ( sector_t* sector,
  666. int max );
  667. sector_t* getNextSector
  668. ( const line_t* line,
  669. sector_t* sec );
  670. int P_CheckTag
  671. (const line_t *line); // jff 2/27/98
  672. boolean P_CanUnlockGenDoor
  673. ( const line_t* line,
  674. player_t* player);
  675. boolean P_SectorActive
  676. ( special_e t,
  677. const sector_t* s );
  678. boolean P_IsSecret
  679. ( const sector_t *sec );
  680. boolean P_WasSecret
  681. ( const sector_t *sec );
  682. void P_ChangeSwitchTexture
  683. ( const line_t* line,
  684. int useAgain );
  685. ////////////////////////////////////////////////////////////////
  686. //
  687. // Linedef and sector special action function prototypes
  688. //
  689. ////////////////////////////////////////////////////////////////
  690. // p_lights
  691. void T_LightFlash
  692. ( lightflash_t* flash );
  693. void T_StrobeFlash
  694. ( strobe_t* flash );
  695. // jff 8/8/98 add missing thinker for flicker
  696. void T_FireFlicker
  697. ( fireflicker_t* flick );
  698. void T_Glow
  699. ( glow_t* g );
  700. // p_plats
  701. void T_PlatRaise
  702. ( plat_t* plat );
  703. // p_doors
  704. void T_VerticalDoor
  705. ( vldoor_t* door );
  706. // p_ceilng
  707. void T_MoveCeiling
  708. ( ceiling_t* ceiling );
  709. // p_floor
  710. result_e T_MovePlane
  711. ( sector_t* sector,
  712. fixed_t speed,
  713. fixed_t dest,
  714. boolean crush,
  715. int floorOrCeiling,
  716. int direction );
  717. void T_MoveFloor
  718. ( floormove_t* floor );
  719. void T_MoveElevator
  720. ( elevator_t* elevator );
  721. // p_spec
  722. void T_Scroll
  723. ( scroll_t * ); // killough 3/7/98: scroll effect thinker
  724. ////////////////////////////////////////////////////////////////
  725. //
  726. // Linedef and sector special handler prototypes
  727. //
  728. ////////////////////////////////////////////////////////////////
  729. // p_telept
  730. int EV_Teleport
  731. ( const line_t* line,
  732. int side,
  733. mobj_t* thing );
  734. // killough 2/14/98: Add silent teleporter
  735. int EV_SilentTeleport
  736. ( const line_t* line,
  737. int side,
  738. mobj_t* thing );
  739. // killough 1/31/98: Add silent line teleporter
  740. int EV_SilentLineTeleport
  741. ( const line_t* line,
  742. int side,
  743. mobj_t* thing,
  744. boolean reverse);
  745. // p_floor
  746. int
  747. EV_DoElevator
  748. ( const line_t* line,
  749. elevator_e type );
  750. int EV_BuildStairs
  751. ( const line_t* line,
  752. stair_e type );
  753. int EV_DoFloor
  754. ( const line_t* line,
  755. floor_e floortype );
  756. // p_ceilng
  757. int EV_DoCeiling
  758. ( const line_t* line,
  759. ceiling_e type );
  760. int EV_CeilingCrushStop
  761. ( const line_t* line );
  762. // p_doors
  763. int EV_VerticalDoor
  764. ( const line_t* line,
  765. mobj_t* thing );
  766. int EV_DoDoor
  767. ( const line_t* line,
  768. vldoor_e type );
  769. int EV_DoLockedDoor
  770. ( const line_t* line,
  771. vldoor_e type,
  772. mobj_t* thing );
  773. // p_lights
  774. int EV_StartLightStrobing
  775. ( const line_t* line );
  776. int EV_TurnTagLightsOff
  777. ( const line_t* line );
  778. int EV_LightTurnOn
  779. ( const line_t* line,
  780. int bright );
  781. int EV_LightTurnOnPartway(const line_t* line, fixed_t level); // killough 10/10/98
  782. // p_floor
  783. int EV_DoChange
  784. ( const line_t* line,
  785. change_e changetype );
  786. int EV_DoDonut
  787. ( const line_t* line );
  788. // p_plats
  789. int EV_DoPlat
  790. ( const line_t* line,
  791. plattype_e type,
  792. int amount );
  793. int EV_StopPlat
  794. ( const line_t* line );
  795. // p_genlin
  796. int EV_DoGenFloor
  797. ( const line_t* line );
  798. int EV_DoGenCeiling
  799. ( const line_t* line );
  800. int EV_DoGenLift
  801. ( const line_t* line );
  802. int EV_DoGenStairs
  803. ( const line_t* line );
  804. int EV_DoGenCrusher
  805. ( const line_t* line );
  806. int EV_DoGenDoor
  807. ( const line_t* line );
  808. int EV_DoGenLockedDoor
  809. ( const line_t* line );
  810. ////////////////////////////////////////////////////////////////
  811. //
  812. // Linedef and sector special thinker spawning
  813. //
  814. ////////////////////////////////////////////////////////////////
  815. // at game start
  816. void P_InitPicAnims
  817. ( void );
  818. void P_InitSwitchList
  819. ( void );
  820. // at map load
  821. void P_SpawnSpecials
  822. ( void );
  823. // every tic
  824. void P_UpdateSpecials
  825. ( void );
  826. // when needed
  827. boolean P_UseSpecialLine
  828. ( mobj_t* thing,
  829. const line_t* line,
  830. int side );
  831. void P_ShootSpecialLine
  832. ( mobj_t* thing,
  833. const line_t* line );
  834. void P_CrossSpecialLine(const line_t *line, int side, mobj_t *thing);
  835. void P_PlayerInSpecialSector
  836. ( player_t* player );
  837. // p_lights
  838. void P_SpawnFireFlicker
  839. ( sector_t* sector );
  840. void P_SpawnLightFlash
  841. ( sector_t* sector );
  842. void P_SpawnStrobeFlash
  843. ( sector_t* sector,
  844. int fastOrSlow,
  845. int inSync );
  846. void P_SpawnGlowingLight
  847. ( sector_t* sector );
  848. // p_plats
  849. void P_AddActivePlat
  850. ( plat_t* plat );
  851. void P_RemoveActivePlat
  852. ( plat_t* plat );
  853. void P_RemoveAllActivePlats
  854. ( void ); // killough
  855. void P_ActivateInStasis
  856. ( int tag );
  857. // p_doors
  858. void P_SpawnDoorCloseIn30
  859. ( sector_t* sec );
  860. void P_SpawnDoorRaiseIn5Mins
  861. ( sector_t* sec,
  862. int secnum );
  863. // p_ceilng
  864. void P_RemoveActiveCeiling
  865. ( ceiling_t* ceiling ); //jff 2/22/98
  866. void P_RemoveAllActiveCeilings
  867. ( void ); //jff 2/22/98
  868. void P_AddActiveCeiling
  869. ( ceiling_t* c );
  870. int P_ActivateInStasisCeiling
  871. ( const line_t* line );
  872. #endif