p_map.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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:
  30. * Map functions
  31. *
  32. *-----------------------------------------------------------------------------*/
  33. #ifndef __P_MAP__
  34. #define __P_MAP__
  35. #include "r_defs.h"
  36. #include "d_player.h"
  37. #define USERANGE (64*FRACUNIT)
  38. #define MELEERANGE (64*FRACUNIT)
  39. #define MISSILERANGE (32*64*FRACUNIT)
  40. // MAXRADIUS is for precalculated sector block boxes the spider demon
  41. // is larger, but we do not have any moving sectors nearby
  42. #define MAXRADIUS (32*FRACUNIT)
  43. // killough 3/15/98: add fourth argument to P_TryMove
  44. boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean dropoff);
  45. // killough 8/9/98: extra argument for telefragging
  46. boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y,boolean boss);
  47. void P_SlideMove(mobj_t *mo);
  48. boolean P_CheckSight(mobj_t *t1, mobj_t *t2);
  49. void P_UseLines(player_t *player);
  50. // killough 8/2/98: add 'mask' argument to prevent friends autoaiming at others
  51. fixed_t P_AimLineAttack(mobj_t *t1,angle_t angle,fixed_t distance, uint_64_t mask);
  52. void P_LineAttack(mobj_t *t1, angle_t angle, fixed_t distance,
  53. fixed_t slope, int damage );
  54. void P_RadiusAttack(mobj_t *spot, mobj_t *source, int damage);
  55. boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y);
  56. //jff 3/19/98 P_CheckSector(): new routine to replace P_ChangeSector()
  57. boolean P_ChangeSector(sector_t* sector,boolean crunch);
  58. boolean P_CheckSector(sector_t *sector, boolean crunch);
  59. void P_DelSeclist(msecnode_t*); // phares 3/16/98
  60. void P_CreateSecNodeList(mobj_t*,fixed_t,fixed_t); // phares 3/14/98
  61. boolean Check_Sides(mobj_t *, int, int); // phares
  62. int P_GetMoveFactor(const mobj_t *mo, int *friction); // killough 8/28/98
  63. int P_GetFriction(const mobj_t *mo, int *factor); // killough 8/28/98
  64. void P_ApplyTorque(mobj_t *mo); // killough 9/12/98
  65. /* cphipps 2004/08/30 */
  66. void P_MapStart(void);
  67. void P_MapEnd(void);
  68. // If "floatok" true, move would be ok if within "tmfloorz - tmceilingz".
  69. extern boolean floatok;
  70. extern boolean felldown; // killough 11/98: indicates object pushed off ledge
  71. extern fixed_t tmfloorz;
  72. extern fixed_t tmceilingz;
  73. extern line_t *ceilingline;
  74. extern line_t *floorline; // killough 8/23/98
  75. extern mobj_t *linetarget; // who got hit (or NULL)
  76. extern msecnode_t *sector_list; // phares 3/16/98
  77. extern fixed_t tmbbox[4]; // phares 3/20/98
  78. extern line_t *blockline; // killough 8/11/98
  79. #endif // __P_MAP__