XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
p_local.h File Reference
#include "r_local.h"
#include "p_spec.h"
Include dependency graph for p_local.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  divline_t
 
struct  intercept_t
 

Macros

#define FLOATSPEED   (FRACUNIT*4)
 
#define MAXHEALTH   100
 
#define VIEWHEIGHT   (41*FRACUNIT)
 
#define MAPBLOCKUNITS   128
 
#define MAPBLOCKSIZE   (MAPBLOCKUNITS*FRACUNIT)
 
#define MAPBLOCKSHIFT   (FRACBITS+7)
 
#define MAPBMASK   (MAPBLOCKSIZE-1)
 
#define MAPBTOFRAC   (MAPBLOCKSHIFT-FRACBITS)
 
#define PLAYERRADIUS   16*FRACUNIT
 
#define MAXRADIUS   32*FRACUNIT
 
#define GRAVITY   FRACUNIT
 
#define MAXMOVE   (30*FRACUNIT)
 
#define USERANGE   (64*FRACUNIT)
 
#define MELEERANGE   (64*FRACUNIT)
 
#define MISSILERANGE   (32*64*FRACUNIT)
 
#define BASETHRESHOLD   100
 
#define ONFLOORZ   INT_MIN
 
#define ONCEILINGZ   INT_MAX
 
#define ITEMQUESIZE   128
 
#define MAXINTERCEPTS_ORIGINAL   128
 
#define MAXINTERCEPTS   (MAXINTERCEPTS_ORIGINAL + 61)
 
#define PT_ADDLINES   1
 
#define PT_ADDTHINGS   2
 
#define PT_EARLYOUT   4
 
#define MAXSPECIALCROSS   20
 
#define MAXSPECIALCROSS_ORIGINAL   8
 

Typedefs

typedef boolean(* traverser_t) (intercept_t *in)
 

Functions

void P_InitThinkers (void)
 
void P_AddThinker (thinker_t *thinker)
 
void P_RemoveThinker (thinker_t *thinker)
 
void P_SetupPsprites (player_t *curplayer)
 
void P_MovePsprites (player_t *curplayer)
 
void P_DropWeapon (player_t *player)
 
void P_PlayerThink (player_t *player)
 
void P_RespawnSpecials (void)
 
mobj_t * P_SpawnMobj (fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
 
void P_RemoveMobj (mobj_t *th)
 
mobj_t * P_SubstNullMobj (mobj_t *th)
 
boolean P_SetMobjState (mobj_t *mobj, statenum_t state)
 
void P_MobjThinker (mobj_t *mobj)
 
void P_SpawnPuff (fixed_t x, fixed_t y, fixed_t z)
 
void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, int damage)
 
mobj_t * P_SpawnMissile (mobj_t *source, mobj_t *dest, mobjtype_t type)
 
void P_SpawnPlayerMissile (mobj_t *source, mobjtype_t type)
 
void P_NoiseAlert (mobj_t *target, mobj_t *emmiter)
 
fixed_t P_AproxDistance (fixed_t dx, fixed_t dy)
 
int P_PointOnLineSide (fixed_t x, fixed_t y, line_t *line)
 
int P_PointOnDivlineSide (fixed_t x, fixed_t y, divline_t *line)
 
void P_MakeDivline (line_t *li, divline_t *dl)
 
fixed_t P_InterceptVector (divline_t *v2, divline_t *v1)
 
int P_BoxOnLineSide (fixed_t *tmbox, line_t *ld)
 
void P_LineOpening (line_t *linedef)
 
boolean P_BlockLinesIterator (int x, int y, boolean(*func)(line_t *))
 
boolean P_BlockThingsIterator (int x, int y, boolean(*func)(mobj_t *))
 
boolean P_PathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags, boolean(*trav)(intercept_t *))
 
void P_UnsetThingPosition (mobj_t *thing)
 
void P_SetThingPosition (mobj_t *thing)
 
boolean P_CheckPosition (mobj_t *thing, fixed_t x, fixed_t y)
 
boolean P_TryMove (mobj_t *thing, fixed_t x, fixed_t y)
 
boolean P_TeleportMove (mobj_t *thing, fixed_t x, fixed_t y)
 
void P_SlideMove (mobj_t *mo)
 
boolean P_CheckSight (mobj_t *t1, mobj_t *t2)
 
void P_UseLines (player_t *player)
 
boolean P_ChangeSector (sector_t *sector, boolean crunch)
 
fixed_t P_AimLineAttack (mobj_t *t1, angle_t angle, fixed_t distance)
 
void P_LineAttack (mobj_t *t1, angle_t angle, fixed_t distance, fixed_t slope, int damage)
 
void P_RadiusAttack (mobj_t *spot, mobj_t *source, int damage)
 
void P_TouchSpecialThing (mobj_t *special, mobj_t *toucher)
 
void P_DamageMobj (mobj_t *target, mobj_t *inflictor, mobj_t *source, int damage)
 

Variables

thinker_t thinkercap
 
mapthing_t itemrespawnque [ITEMQUESIZE]
 
int itemrespawntime [ITEMQUESIZE]
 
int iquehead
 
int iquetail
 
intercept_t intercepts [MAXINTERCEPTS]
 
intercept_t * intercept_p
 
fixed_t opentop
 
fixed_t openbottom
 
fixed_t openrange
 
fixed_t lowfloor
 
divline_t trace
 
boolean floatok
 
fixed_t tmfloorz
 
fixed_t tmceilingz
 
line_t * ceilingline
 
line_t * spechit [MAXSPECIALCROSS]
 
int numspechit
 
mobj_t * linetarget
 
byte * rejectmatrix
 
short * blockmaplump
 
short * blockmap
 
int bmapwidth
 
int bmapheight
 
fixed_t bmaporgx
 
fixed_t bmaporgy
 
mobj_t ** blocklinks
 
int maxammo [NUMAMMO]
 
int clipammo [NUMAMMO]
 

Macro Definition Documentation

◆ BASETHRESHOLD

#define BASETHRESHOLD   100

◆ FLOATSPEED

#define FLOATSPEED   (FRACUNIT*4)

◆ GRAVITY

#define GRAVITY   FRACUNIT

◆ ITEMQUESIZE

#define ITEMQUESIZE   128

◆ MAPBLOCKSHIFT

#define MAPBLOCKSHIFT   (FRACBITS+7)

◆ MAPBLOCKSIZE

#define MAPBLOCKSIZE   (MAPBLOCKUNITS*FRACUNIT)

◆ MAPBLOCKUNITS

#define MAPBLOCKUNITS   128

◆ MAPBMASK

#define MAPBMASK   (MAPBLOCKSIZE-1)

◆ MAPBTOFRAC

#define MAPBTOFRAC   (MAPBLOCKSHIFT-FRACBITS)

◆ MAXHEALTH

#define MAXHEALTH   100

◆ MAXINTERCEPTS

#define MAXINTERCEPTS   (MAXINTERCEPTS_ORIGINAL + 61)

◆ MAXINTERCEPTS_ORIGINAL

#define MAXINTERCEPTS_ORIGINAL   128

◆ MAXMOVE

#define MAXMOVE   (30*FRACUNIT)

◆ MAXRADIUS

#define MAXRADIUS   32*FRACUNIT

◆ MAXSPECIALCROSS

#define MAXSPECIALCROSS   20

◆ MAXSPECIALCROSS_ORIGINAL

#define MAXSPECIALCROSS_ORIGINAL   8

◆ MELEERANGE

#define MELEERANGE   (64*FRACUNIT)

◆ MISSILERANGE

#define MISSILERANGE   (32*64*FRACUNIT)

◆ ONCEILINGZ

#define ONCEILINGZ   INT_MAX

◆ ONFLOORZ

#define ONFLOORZ   INT_MIN

◆ PLAYERRADIUS

#define PLAYERRADIUS   16*FRACUNIT

◆ PT_ADDLINES

#define PT_ADDLINES   1

◆ PT_ADDTHINGS

#define PT_ADDTHINGS   2

◆ PT_EARLYOUT

#define PT_EARLYOUT   4

◆ USERANGE

#define USERANGE   (64*FRACUNIT)

◆ VIEWHEIGHT

#define VIEWHEIGHT   (41*FRACUNIT)

Typedef Documentation

◆ traverser_t

typedef boolean(* traverser_t) (intercept_t *in)

Function Documentation

◆ P_AddThinker()

void P_AddThinker ( thinker_t *  thinker)

◆ P_AimLineAttack()

fixed_t P_AimLineAttack ( mobj_t *  t1,
angle_t  angle,
fixed_t  distance 
)

◆ P_AproxDistance()

fixed_t P_AproxDistance ( fixed_t  dx,
fixed_t  dy 
)

◆ P_BlockLinesIterator()

boolean P_BlockLinesIterator ( int  x,
int  y,
boolean(*)(line_t *)  func 
)

◆ P_BlockThingsIterator()

boolean P_BlockThingsIterator ( int  x,
int  y,
boolean(*)(mobj_t *)  func 
)

◆ P_BoxOnLineSide()

int P_BoxOnLineSide ( fixed_t *  tmbox,
line_t *  ld 
)

◆ P_ChangeSector()

boolean P_ChangeSector ( sector_t *  sector,
boolean  crunch 
)

◆ P_CheckPosition()

boolean P_CheckPosition ( mobj_t *  thing,
fixed_t  x,
fixed_t  y 
)

◆ P_CheckSight()

boolean P_CheckSight ( mobj_t *  t1,
mobj_t *  t2 
)

◆ P_DamageMobj()

void P_DamageMobj ( mobj_t *  target,
mobj_t *  inflictor,
mobj_t *  source,
int  damage 
)

◆ P_DropWeapon()

void P_DropWeapon ( player_t *  player)

◆ P_InitThinkers()

void P_InitThinkers ( void  )

◆ P_InterceptVector()

fixed_t P_InterceptVector ( divline_t *  v2,
divline_t *  v1 
)

◆ P_LineAttack()

void P_LineAttack ( mobj_t *  t1,
angle_t  angle,
fixed_t  distance,
fixed_t  slope,
int  damage 
)

◆ P_LineOpening()

void P_LineOpening ( line_t *  linedef)

◆ P_MakeDivline()

void P_MakeDivline ( line_t *  li,
divline_t *  dl 
)

◆ P_MobjThinker()

void P_MobjThinker ( mobj_t *  mobj)

◆ P_MovePsprites()

void P_MovePsprites ( player_t *  curplayer)

◆ P_NoiseAlert()

void P_NoiseAlert ( mobj_t *  target,
mobj_t *  emmiter 
)

◆ P_PathTraverse()

boolean P_PathTraverse ( fixed_t  x1,
fixed_t  y1,
fixed_t  x2,
fixed_t  y2,
int  flags,
boolean(*)(intercept_t *)  trav 
)

◆ P_PlayerThink()

void P_PlayerThink ( player_t *  player)

◆ P_PointOnDivlineSide()

int P_PointOnDivlineSide ( fixed_t  x,
fixed_t  y,
divline_t *  line 
)

◆ P_PointOnLineSide()

int P_PointOnLineSide ( fixed_t  x,
fixed_t  y,
line_t *  line 
)

◆ P_RadiusAttack()

void P_RadiusAttack ( mobj_t *  spot,
mobj_t *  source,
int  damage 
)

◆ P_RemoveMobj()

void P_RemoveMobj ( mobj_t *  th)

◆ P_RemoveThinker()

void P_RemoveThinker ( thinker_t *  thinker)

◆ P_RespawnSpecials()

void P_RespawnSpecials ( void  )

◆ P_SetMobjState()

boolean P_SetMobjState ( mobj_t *  mobj,
statenum_t  state 
)

◆ P_SetThingPosition()

void P_SetThingPosition ( mobj_t *  thing)

◆ P_SetupPsprites()

void P_SetupPsprites ( player_t *  curplayer)

◆ P_SlideMove()

void P_SlideMove ( mobj_t *  mo)

◆ P_SpawnBlood()

void P_SpawnBlood ( fixed_t  x,
fixed_t  y,
fixed_t  z,
int  damage 
)

◆ P_SpawnMissile()

mobj_t * P_SpawnMissile ( mobj_t *  source,
mobj_t *  dest,
mobjtype_t  type 
)

◆ P_SpawnMobj()

mobj_t * P_SpawnMobj ( fixed_t  x,
fixed_t  y,
fixed_t  z,
mobjtype_t  type 
)

◆ P_SpawnPlayerMissile()

void P_SpawnPlayerMissile ( mobj_t *  source,
mobjtype_t  type 
)

◆ P_SpawnPuff()

void P_SpawnPuff ( fixed_t  x,
fixed_t  y,
fixed_t  z 
)

◆ P_SubstNullMobj()

mobj_t * P_SubstNullMobj ( mobj_t *  th)

◆ P_TeleportMove()

boolean P_TeleportMove ( mobj_t *  thing,
fixed_t  x,
fixed_t  y 
)

◆ P_TouchSpecialThing()

void P_TouchSpecialThing ( mobj_t *  special,
mobj_t *  toucher 
)

◆ P_TryMove()

boolean P_TryMove ( mobj_t *  thing,
fixed_t  x,
fixed_t  y 
)

◆ P_UnsetThingPosition()

void P_UnsetThingPosition ( mobj_t *  thing)

◆ P_UseLines()

void P_UseLines ( player_t *  player)

Variable Documentation

◆ blocklinks

mobj_t** blocklinks
extern

◆ blockmap

short* blockmap
extern

◆ blockmaplump

short* blockmaplump
extern

◆ bmapheight

int bmapheight
extern

◆ bmaporgx

fixed_t bmaporgx
extern

◆ bmaporgy

fixed_t bmaporgy
extern

◆ bmapwidth

int bmapwidth
extern

◆ ceilingline

line_t* ceilingline
extern

◆ clipammo

int clipammo[NUMAMMO]
extern

◆ floatok

boolean floatok
extern

◆ intercept_p

intercept_t* intercept_p
extern

◆ intercepts

intercept_t intercepts[MAXINTERCEPTS]
extern

◆ iquehead

int iquehead
extern

◆ iquetail

int iquetail
extern

◆ itemrespawnque

mapthing_t itemrespawnque[ITEMQUESIZE]
extern

◆ itemrespawntime

int itemrespawntime[ITEMQUESIZE]
extern

◆ linetarget

mobj_t* linetarget
extern

◆ lowfloor

fixed_t lowfloor
extern

◆ maxammo

int maxammo[NUMAMMO]
extern

◆ numspechit

int numspechit
extern

◆ openbottom

fixed_t openbottom
extern

◆ openrange

fixed_t openrange
extern

◆ opentop

fixed_t opentop
extern

◆ rejectmatrix

byte* rejectmatrix
extern

◆ spechit

line_t* spechit[MAXSPECIALCROSS]
extern

◆ thinkercap

thinker_t thinkercap
extern

◆ tmceilingz

fixed_t tmceilingz
extern

◆ tmfloorz

fixed_t tmfloorz
extern

◆ trace

divline_t trace
extern