MiniDoom

src/p_map.ml

Resolves mobj/line collision, movement and sliding, use traces, hitscan attacks, and sector crushing.

Package
(global)
Reachable
Yes

Imports

Declarations

_LineIndex

function _LineIndex(ld)

Resolves a line reference to its stable map-line index for validcount de-duplication.

ParameterTypeDefaultDescription
lddynamic—Ld value supplied to `_LineIndex`.

View source

_MapAbs

inline function _MapAbs(x)

Returns an integer magnitude for fixed-point distance and intercept comparisons.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.

View source

_PM_DiagMovePrint

inline function _PM_DiagMovePrint(msg)

Emits a try-move trace only when the cached diagnostic flag permits it.

ParameterTypeDefaultDescription
msgdynamic—Msg value supplied to `_PM_DiagMovePrint`.

View source

_PM_TryMoveDiagEnabled

inline function _PM_TryMoveDiagEnabled()

Caches whether command-line try-move diagnostics are enabled for this process.

View source

_PM_UseDiagEnabled

inline function _PM_UseDiagEnabled()

Caches whether command-line use-line traversal diagnostics are enabled.

View source

_PM_UseDiagLog

inline function _PM_UseDiagLog(msg)

Emits a use-line trace only under the explicit diagnostic flag.

ParameterTypeDefaultDescription
msgdynamic—Msg value supplied to `_PM_UseDiagLog`.

View source

_PMAP_IDiv

inline function _PMAP_IDiv(a, b)

Truncates fixed-point geometry quotients toward zero and maps invalid divisors to zero.

ParameterTypeDefaultDescription
adynamic—First input operand.
bdynamic—Second input operand.

View source

_PMAP_S32

inline function _PMAP_S32(v)

Reinterprets an arithmetic result with signed 32-bit wrap semantics used by blockmap math.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

_pmDiagFailCount

_pmDiagFailCount

Tracks the mutable pm diag fail count value used by the p map subsystem.

View source

_pmDiagLineCandCur

_pmDiagLineCandCur

Tracks the mutable pm diag line cand cur value used by the p map subsystem.

View source

_pmDiagLineCandLast

_pmDiagLineCandLast

Tracks the mutable pm diag line cand last value used by the p map subsystem.

View source

_pmDiagLineChecksCur

_pmDiagLineChecksCur

Tracks the mutable pm diag line checks cur value used by the p map subsystem.

View source

_pmDiagLineChecksLast

_pmDiagLineChecksLast

Tracks the mutable pm diag line checks last value used by the p map subsystem.

View source

_pmDiagMove

_pmDiagMove

Tracks whether pm diag move is active in the p map subsystem.

View source

_pmDiagMoveInit

_pmDiagMoveInit

Tracks whether pm diag move init is active in the p map subsystem.

View source

_pmDiagPlayerFail

_pmDiagPlayerFail

Tracks the mutable pm diag player fail value used by the p map subsystem.

View source

_pmDiagPlayerTry

_pmDiagPlayerTry

Tracks the mutable pm diag player try value used by the p map subsystem.

View source

_pmDiagTryCount

_pmDiagTryCount

Tracks the mutable pm diag try count value used by the p map subsystem.

View source

_pmDiagUse

_pmDiagUse

Tracks whether pm diag use is active in the p map subsystem.

View source

_pmDiagUseCount

_pmDiagUseCount

Tracks the mutable pm diag use count value used by the p map subsystem.

View source

_pmDiagUseInit

_pmDiagUseInit

Tracks whether pm diag use init is active in the p map subsystem.

View source

_SetTMBox

inline function _SetTMBox(x, y, radius)

Fills the shared candidate bounding box from a center and collision radius.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
radiusdynamic—Radius value supplied to `_SetTMBox`.

View source

aimslope

aimslope

Tracks the mutable aimslope value used by the p map subsystem.

View source

attackrange

attackrange

Tracks the mutable attackrange value used by the p map subsystem.

View source

bestslidefrac

bestslidefrac

Tracks the mutable bestslidefrac value used by the p map subsystem.

View source

bestslideline

bestslideline

Holds the optional bestslideline resource used by the p map subsystem.

View source

bombdamage

bombdamage

Tracks the mutable bombdamage value used by the p map subsystem.

View source

bombsource

bombsource

Holds the optional bombsource resource used by the p map subsystem.

View source

bombspot

bombspot

Holds the optional bombspot resource used by the p map subsystem.

View source

bottomslope

bottomslope

Tracks the mutable bottomslope value used by the p map subsystem.

View source

crushchange

crushchange

Tracks whether crushchange is active in the p map subsystem.

View source

la_damage

la_damage

Tracks the mutable la damage value used by the p map subsystem.

View source

MAXSPECIALCROSS

const MAXSPECIALCROSS = 8

Defines the maximum maxspecialcross accepted by the p map subsystem.

View source

nofit

nofit

Tracks whether nofit is active in the p map subsystem.

View source

numspechit

numspechit

Tracks the mutable numspechit value used by the p map subsystem.

View source

P_AimLineAttack

function P_AimLineAttack(t1, angle, distance)

Computes line attack values for the map collision.

ParameterTypeDefaultDescription
t1dynamic—T1 value supplied to `P_AimLineAttack`.
angledynamic—Doom binary-angle measurement.
distancedynamic—Distance value supplied to `P_AimLineAttack`.

View source

P_ChangeSector

function P_ChangeSector(sector, crunch)

Visits all blockmap things touching a moving sector and reports whether any were crushed.

ParameterTypeDefaultDescription
sectordynamic—Map sector affected by the operation.
crunchdynamic—Crunch value supplied to `P_ChangeSector`.

View source

P_CheckPosition

function P_CheckPosition(thing, x, y)

Probes a candidate origin, populating shared opening globals without committing the mobj position.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.

View source

P_HitSlideLine

function P_HitSlideLine(ld)

Projects the pending slide vector along the wall axis or clears it on horizontal/vertical walls.

ParameterTypeDefaultDescription
lddynamic—Ld value supplied to `P_HitSlideLine`.

View source

P_LineAttack

function P_LineAttack(t1, angle, distance, slope, damage)

Configures a hitscan ray and traverses intercepts to apply damage at the supplied slope.

ParameterTypeDefaultDescription
t1dynamic—T1 value supplied to `P_LineAttack`.
angledynamic—Doom binary-angle measurement.
distancedynamic—Distance value supplied to `P_LineAttack`.
slopedynamic—Slope value supplied to `P_LineAttack`.
damagedynamic—Damage value supplied to `P_LineAttack`.

View source

P_RadiusAttack

function P_RadiusAttack(spot, source, damage)

Walks blast-radius blockmap cells and damages visible shootable occupants around an explosion.

ParameterTypeDefaultDescription
spotdynamic—Spot value supplied to `P_RadiusAttack`.
sourcedynamic—Source value or buffer.
damagedynamic—Damage value supplied to `P_RadiusAttack`.

View source

P_SlideMove

function P_SlideMove(mo)

Traces leading corners, clips momentum at the nearest wall, and retries up to three slide bumps.

ParameterTypeDefaultDescription
modynamic—Map object affected by the operation.

View source

P_TeleportMove

function P_TeleportMove(thing, x, y)

Telefrags destination occupants and relocates the mobj without ordinary wall/step restrictions.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.

View source

P_ThingHeightClip

function P_ThingHeightClip(thing)

Recomputes floor/ceiling bounds after sector motion and clamps a grounded mobj to its new floor.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.

View source

P_TryMove

function P_TryMove(thing, x, y)

Validates step/dropoff/ceiling constraints and commits a legal XY move with sector relinking.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.

View source

P_UseLines

function P_UseLines(player)

Casts the player's short use ray and activates the first eligible crossed line.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.

View source

PIT_ChangeSector

function PIT_ChangeSector(thing)

Reclips one resident mobj after sector motion and applies crush damage when it no longer fits.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.

View source

PIT_CheckLine

function PIT_CheckLine(ld)

Rejects blocking crossed lines and narrows candidate floor, ceiling, and dropoff openings.

ParameterTypeDefaultDescription
lddynamic—Ld value supplied to `PIT_CheckLine`.

View source

PIT_CheckThing

function PIT_CheckThing(thing)

Resolves mobj overlap as blocking, missile impact, skull charge, or player pickup contact.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.

View source

PIT_RadiusAttack

function PIT_RadiusAttack(thing)

Applies distance-falloff splash damage to one shootable thing with line-of-sight to the blast.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.

View source

PIT_StompThing

function PIT_StompThing(thing)

Telefrags shootable occupants overlapping the teleport destination, excluding the mover itself.

ParameterTypeDefaultDescription
thingdynamic—World object affected by the operation.

View source

PTR_AimTraverse

function PTR_AimTraverse(inter)

Narrows the vertical aiming window through lines and locks onto the first shootable intercept.

ParameterTypeDefaultDescription
interdynamic—Inter value supplied to `PTR_AimTraverse`.

View source

PTR_ShootTraverse

function PTR_ShootTraverse(inter)

Activates shoot specials and spawns wall puffs or target blood at the first hitscan impact.

ParameterTypeDefaultDescription
interdynamic—Inter value supplied to `PTR_ShootTraverse`.

View source

PTR_SlideTraverse

function PTR_SlideTraverse(inter)

Records the nearest blocking line intercept for the current slide trace.

ParameterTypeDefaultDescription
interdynamic—Inter value supplied to `PTR_SlideTraverse`.

View source

PTR_UseTraverse

function PTR_UseTraverse(inter)

Activates the first usable special line on a use trace or stops at a closed non-special line.

ParameterTypeDefaultDescription
interdynamic—Inter value supplied to `PTR_UseTraverse`.

View source

secondslidefrac

secondslidefrac

Tracks the mutable secondslidefrac value used by the p map subsystem.

View source

secondslideline

secondslideline

Holds the optional secondslideline resource used by the p map subsystem.

View source

shootthing

shootthing

Holds the optional shootthing resource used by the p map subsystem.

View source

shootz

shootz

Tracks the mutable shootz value used by the p map subsystem.

View source

slidemo

slidemo

Holds the optional slidemo resource used by the p map subsystem.

View source

spechit

spechit

Stores the spechit collection used by the p map subsystem.

View source

tmbbox

tmbbox

Stores the tmbbox collection used by the p map subsystem.

View source

tmdropoffz

tmdropoffz

Tracks the mutable tmdropoffz value used by the p map subsystem.

View source

tmflags

tmflags

Tracks the mutable tmflags value used by the p map subsystem.

View source

tmthing

tmthing

Holds the optional tmthing resource used by the p map subsystem.

View source

tmx

tmx

Tracks the mutable tmx value used by the p map subsystem.

View source

tmxmove

tmxmove

Tracks the mutable tmxmove value used by the p map subsystem.

View source

tmy

tmy

Tracks the mutable tmy value used by the p map subsystem.

View source

tmymove

tmymove

Tracks the mutable tmymove value used by the p map subsystem.

View source

topslope

topslope

Tracks the mutable topslope value used by the p map subsystem.

View source

usething

usething

Holds the optional usething resource used by the p map subsystem.

View source