MiniDoom

src/p_floor.ml

Moves sector planes with collision handling and drives tagged floor-change thinkers.

Package
(global)
Reachable
Yes

Imports

Declarations

_FloorAddThinkerIfPossible

inline function _FloorAddThinkerIfPossible(th)

Registers a floor thinker only when the thinker API is available, preserving compatibility with reduced test harnesses.

ParameterTypeDefaultDescription
thdynamic—Th value supplied to `_FloorAddThinkerIfPossible`.

View source

_FloorMakeThinker

inline function _FloorMakeThinker(fn)

Creates a floor-mover thinker with canonical links, callback, direction, speed, and destination defaults.

ParameterTypeDefaultDescription
fndynamic—Fn value supplied to `_FloorMakeThinker`.

View source

_FloorSectorIndex

function _FloorSectorIndex(sec)

Resolves a sector object to its map-array index for neighbor and tag traversal.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `_FloorSectorIndex`.

View source

_FloorSoundOrg

inline function _FloorSoundOrg(sec)

Returns a sector sound origin when present, otherwise uses the sector itself as the positional sound source.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `_FloorSoundOrg`.

View source

_FloorStartSound

inline function _FloorStartSound(origin, snd)

Emits a positional floor-movement sound only when the sound subsystem is available.

ParameterTypeDefaultDescription
origindynamic—Origin value supplied to `_FloorStartSound`.
snddynamic—Snd value supplied to `_FloorStartSound`.

View source

_FloorTextureHeight

inline function _FloorTextureHeight(tex)

Looks up a floor texture's pixel height and converts it to fixed-point movement units, with a 64-unit fallback.

ParameterTypeDefaultDescription
texdynamic—Texture identifier or texture data to process.

View source

EV_BuildStairs

function EV_BuildStairs(line, type)

Chains adjacent sectors with the same floor texture into progressively offset stair movers.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.
typedynamic—Type value supplied to `EV_BuildStairs`.

View source

EV_DoFloor

function EV_DoFloor(line, floortype)

Configures and starts the selected floor movement for all sectors matching a trigger tag.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.
floortypedynamic—Floortype value supplied to `EV_DoFloor`.

View source

T_MoveFloor

function T_MoveFloor(floor)

Advances one floor thinker, applies endpoint texture/special changes, emits movement sounds, and removes it at the destination.

ParameterTypeDefaultDescription
floordynamic—Floor value supplied to `T_MoveFloor`.

View source

T_MovePlane

function T_MovePlane(sector, speed, dest, crush, floorOrCeiling, direction)

Steps a floor or ceiling toward a destination, rolls back blocked non-crushing moves, and reports progress, arrival, or crushing.

ParameterTypeDefaultDescription
sectordynamic—Map sector affected by the operation.
speeddynamic—Speed value supplied to `T_MovePlane`.
destdynamic—Dest value supplied to `T_MovePlane`.
crushdynamic—Crush value supplied to `T_MovePlane`.
floorOrCeilingdynamic—Floor or ceiling value supplied to `T_MovePlane`.
directiondynamic—Direction value supplied to `T_MovePlane`.

View source