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