# _abs
inline function _abs(x)Returns an integer magnitude for distance and side-of-line calculations.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
src/p_maputl.mlSupplies fixed-point geometry tests, blockmap linking, opening calculations, and ordered path traversal.
doomdef.ml → src/doomdef.mlm_argv.ml → src/m_argv.mlm_bbox.ml → src/m_bbox.mlp_local.ml → src/p_local.mlr_main.ml → src/r_main.mlr_state.ml → src/r_state.mlinline function _abs(x)Returns an integer magnitude for distance and side-of-line calculations.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
inline function _EnsureIntercepts()Lazily allocates the reusable baseline intercept records required before path traversal begins.
inline function _PMU_DiagUseEnabled()Caches whether path/use diagnostic output was requested on the command line.
inline function _PMU_DiagUseLog(msg)Emits a map-use diagnostic only when the cached diagnostic option is active.
| Parameter | Type | Default | Description |
|---|---|---|---|
msg | dynamic | — | Msg value supplied to `_PMU_DiagUseLog`. |
inline function _PMU_HasSignBit(v)Tests bit 31 of a value after unsigned 32-bit normalization.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _PMU_IsSeq(v)Accepts arrays and byte buffers as the indexable sequence forms used by compatibility helpers.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _PMU_U32(v)Normalizes an integer to unsigned 32-bit form for sign-bit tests that emulate Doom C arithmetic.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
_pmuDiagUseTracks whether pmu diag use is active in the p maputl subsystem.
_pmuDiagUseCountTracks the mutable pmu diag use count value used by the p maputl subsystem.
_pmuDiagUseInitTracks whether pmu diag use init is active in the p maputl subsystem.
function _PT_AddLineIntercept(ld)Tests one line against the active trace and appends its in-range fractional crossing to the intercept buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
ld | dynamic | — | Ld value supplied to `_PT_AddLineIntercept`. |
function _PT_AddThingIntercept(thing)Approximates a thing as a trace-facing diagonal and appends an in-range crossing intercept.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function _PT_EnsureInterceptCapacity(need)Lazily allocates and geometrically grows the reusable intercept array required by path traversal.
| Parameter | Type | Default | Description |
|---|---|---|---|
need | dynamic | — | Need value supplied to `_PT_EnsureInterceptCapacity`. |
earlyoutTracks whether earlyout is active in the p maputl subsystem.
inline function P_AproxDistance(dx, dy)Computes Doom's inexpensive fixed-point distance approximation from horizontal and vertical deltas.
| Parameter | Type | Default | Description |
|---|---|---|---|
dx | dynamic | — | Horizontal coordinate or vector component represented by dx. |
dy | dynamic | — | Vertical coordinate or vector component represented by dy. |
function P_BlockLinesIterator(x, y, func)Visits each valid line in one blockmap cell once per traversal and stops immediately when the callback rejects it.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
func | dynamic | — | Func value supplied to `P_BlockLinesIterator`. |
function P_BlockThingsIterator(x, y, func)Walks the mobj chain for one blockmap cell and stops when the callback returns false.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
func | dynamic | — | Func value supplied to `P_BlockThingsIterator`. |
inline function P_BoxOnLineSide(tmbox, ld)Classifies an axis-aligned bounding box against a line, returning -1 when the box straddles both sides.
| Parameter | Type | Default | Description |
|---|---|---|---|
tmbox | dynamic | — | Temporary movement bounding box to read or update. |
ld | dynamic | — | Ld value supplied to `P_BoxOnLineSide`. |
inline function P_InterceptVector(v2, v1)Computes the fixed-point fraction where one divline intersects another, returning zero for parallel traces.
| Parameter | Type | Default | Description |
|---|---|---|---|
v2 | dynamic | — | V2 value supplied to `P_InterceptVector`. |
v1 | dynamic | — | V1 value supplied to `P_InterceptVector`. |
function P_LineOpening(linedef)Computes the vertical opening, top, bottom, and low-floor values across a two-sided line into shared trace globals.
| Parameter | Type | Default | Description |
|---|---|---|---|
linedef | dynamic | — | Linedef value supplied to `P_LineOpening`. |
inline function P_MakeDivline(li, dl)Copies a linedef's first vertex and direction into the lightweight divline form used by trace calculations.
| Parameter | Type | Default | Description |
|---|---|---|---|
li | dynamic | — | Li value supplied to `P_MakeDivline`. |
dl | dynamic | — | Dl value supplied to `P_MakeDivline`. |
function P_PathTraverse(x1, y1, x2, y2, flags, trav)Steps a trace through blockmap cells, collects requested line and thing crossings, sorts them by fraction, and invokes the traverser in order.
| Parameter | Type | Default | Description |
|---|---|---|---|
x1 | dynamic | — | Horizontal coordinate of the first endpoint. |
y1 | dynamic | — | Vertical coordinate of the first endpoint. |
x2 | dynamic | — | Horizontal coordinate of the second endpoint. |
y2 | dynamic | — | Vertical coordinate of the second endpoint. |
flags | dynamic | — | Bit flags that control the operation. |
trav | dynamic | — | Trav value supplied to `P_PathTraverse`. |
inline function P_PointOnDivlineSide(x, y, line)Classifies a fixed-point point against an infinite divline using overflow-safe sign tests and scaled cross products.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
line | dynamic | — | Map line or text line affected by the operation. |
inline function P_PointOnLineSide(x, y, line)Classifies a fixed-point point against a partition line while preserving Doom's vertical, horizontal, and sign-bit shortcuts.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
line | dynamic | — | Map line or text line affected by the operation. |
function P_SetThingPosition(thing)Finds a thing's subsector and links it into sector and blockmap lists unless its flags suppress either index.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function P_TraverseIntercepts(func, maxfrac)Computes intercepts values for the map utility.
| Parameter | Type | Default | Description |
|---|---|---|---|
func | dynamic | — | Func value supplied to `P_TraverseIntercepts`. |
maxfrac | dynamic | — | Maxfrac value supplied to `P_TraverseIntercepts`. |
function P_UnsetThingPosition(thing)Unlinks a mobj from sector and blockmap chains before movement, honoring no-sector and no-blockmap flags.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
function PIT_AddLineIntercepts(ld)Adapts blockmap line iteration to the current path-traversal intercept collector.
| Parameter | Type | Default | Description |
|---|---|---|---|
ld | dynamic | — | Ld value supplied to `PIT_AddLineIntercepts`. |
function PIT_AddThingIntercepts(thing)Adapts blockmap thing iteration to the current path-traversal intercept collector.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
const PT_ADDLINES = 1Defines pt addlines for the p maputl subsystem.
const PT_ADDTHINGS = 2Defines pt addthings for the p maputl subsystem.
const PT_EARLYOUT = 4Defines pt earlyout for the p maputl subsystem.
ptflagsTracks the mutable ptflags value used by the p maputl subsystem.