summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/p_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/p_map.h')
-rw-r--r--apps/plugins/doom/p_map.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/apps/plugins/doom/p_map.h b/apps/plugins/doom/p_map.h
new file mode 100644
index 0000000000..6985cc15c1
--- /dev/null
+++ b/apps/plugins/doom/p_map.h
@@ -0,0 +1,90 @@
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 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 * 02111-1307, USA.
26 *
27 * DESCRIPTION:
28 * Map functions
29 *
30 *-----------------------------------------------------------------------------*/
31
32#ifndef __P_MAP__
33#define __P_MAP__
34
35#include "r_defs.h"
36#include "d_player.h"
37
38#define USERANGE (64*FRACUNIT)
39#define MELEERANGE (64*FRACUNIT)
40#define MISSILERANGE (32*64*FRACUNIT)
41
42// MAXRADIUS is for precalculated sector block boxes the spider demon
43// is larger, but we do not have any moving sectors nearby
44#define MAXRADIUS (32*FRACUNIT)
45
46// killough 3/15/98: add fourth argument to P_TryMove
47boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean dropoff);
48
49// killough 8/9/98: extra argument for telefragging
50boolean P_TeleportMove(mobj_t *thing, fixed_t x, fixed_t y,boolean boss);
51void P_SlideMove(mobj_t *mo);
52boolean P_CheckSight(mobj_t *t1, mobj_t *t2);
53void P_UseLines(player_t *player);
54
55// killough 8/2/98: add 'mask' argument to prevent friends autoaiming at others
56fixed_t P_AimLineAttack(mobj_t *t1,angle_t angle,fixed_t distance, uint_64_t mask);
57
58void P_LineAttack(mobj_t *t1, angle_t angle, fixed_t distance,
59 fixed_t slope, int damage );
60void P_RadiusAttack(mobj_t *spot, mobj_t *source, int damage);
61boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y);
62
63//jff 3/19/98 P_CheckSector(): new routine to replace P_ChangeSector()
64boolean P_ChangeSector(sector_t* sector,boolean crunch);
65boolean P_CheckSector(sector_t *sector, boolean crunch);
66void P_DelSeclist(msecnode_t*); // phares 3/16/98
67void P_CreateSecNodeList(mobj_t*,fixed_t,fixed_t); // phares 3/14/98
68boolean Check_Sides(mobj_t *, int, int); // phares
69
70int P_GetMoveFactor(const mobj_t *mo, int *friction); // killough 8/28/98
71int P_GetFriction(const mobj_t *mo, int *factor); // killough 8/28/98
72void P_ApplyTorque(mobj_t *mo); // killough 9/12/98
73
74/* cphipps 2004/08/30 */
75void P_MapStart(void);
76void P_MapEnd(void);
77
78// If "floatok" true, move would be ok if within "tmfloorz - tmceilingz".
79extern boolean floatok;
80extern boolean felldown; // killough 11/98: indicates object pushed off ledge
81extern fixed_t tmfloorz;
82extern fixed_t tmceilingz;
83extern line_t *ceilingline;
84extern line_t *floorline; // killough 8/23/98
85extern mobj_t *linetarget; // who got hit (or NULL)
86extern msecnode_t *sector_list; // phares 3/16/98
87extern fixed_t tmbbox[4]; // phares 3/20/98
88extern line_t *blockline; // killough 8/11/98
89
90#endif // __P_MAP__