MiniDoom

src/p_doors.ml

Spawns and ticks keyed, tagged, timed, manual, and sliding sector-door state machines.

Package
(global)
Reachable
Yes

Imports

Declarations

_DoorsAddThinkerIfPossible

inline function _DoorsAddThinkerIfPossible(th)

Registers a door thinker only when both the node and thinker list API are available.

ParameterTypeDefaultDescription
thdynamic—Th value supplied to `_DoorsAddThinkerIfPossible`.

View source

_DoorsBackSector

inline function _DoorsBackSector(line)

Resolves a two-sided line's back sector through its second side, rejecting invalid indices.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.

View source

_DoorsHasCard

function _DoorsHasCard(player, card)

Tests a checked player's card slot without trusting malformed inventory containers.

ParameterTypeDefaultDescription
playerdynamic—Player state affected by the operation.
carddynamic—Card value supplied to `_DoorsHasCard`.

View source

_DoorsIsSeq

inline function _DoorsIsSeq(v)

Accepts array and byte-buffer containers used by sector, line, and card tables.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

_DoorsMakeThinker

inline function _DoorsMakeThinker(fn)

Creates a thinker node bound to a door callback, preserving the layout expected by P_Ticker.

ParameterTypeDefaultDescription
fndynamic—Fn value supplied to `_DoorsMakeThinker`.

View source

_DoorsSoundOrg

inline function _DoorsSoundOrg(sec)

Returns a sector's positional sound origin, falling back to the sector object itself.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `_DoorsSoundOrg`.

View source

_DoorsStartSound

inline function _DoorsStartSound(origin, snd)

Plays a door cue from a sector sound origin when the sound backend is present.

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

View source

EV_DoDoor

function EV_DoDoor(line, type)

Spawns vertical-door thinkers for every sector carrying the triggering line's tag.

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

View source

EV_DoLockedDoor

function EV_DoLockedDoor(line, type, thing)

Enforces the line's colored key requirement, posts feedback, then delegates valid activation.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.
typedynamic—Type value supplied to `EV_DoLockedDoor`.
thingdynamic—World object affected by the operation.

View source

EV_SlidingDoor

function EV_SlidingDoor(line, thing)

Validates and starts a manual sliding door when the line and activator permit it.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.
thingdynamic—World object affected by the operation.

View source

EV_VerticalDoor

function EV_VerticalDoor(line, thing)

Activates or reverses a manual two-sided door while preventing conflicting sector specials.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.
thingdynamic—World object affected by the operation.

View source

P_FindSlidingDoorType

function P_FindSlidingDoorType(line)

Computes sliding door type values for the play simulation.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.

View source

P_InitSlidingDoorFrames

function P_InitSlidingDoorFrames()

Resets the sliding-door frame table before map or renderer-specific frames are registered.

View source

P_SpawnDoorCloseIn30

function P_SpawnDoorCloseIn30(sec)

Attaches a countdown thinker that closes an initially open sector door after 30 seconds.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `P_SpawnDoorCloseIn30`.

View source

P_SpawnDoorRaiseIn5Mins

function P_SpawnDoorRaiseIn5Mins(sec, secnum)

Attaches a delayed thinker that opens the sector door once after five minutes.

ParameterTypeDefaultDescription
secdynamic—Sec value supplied to `P_SpawnDoorRaiseIn5Mins`.
secnumdynamic—Index identifying sec.

View source

T_SlidingDoor

function T_SlidingDoor(door)

Advances a sliding-door thinker through its configured frame/wait phases.

ParameterTypeDefaultDescription
doordynamic—Door value supplied to `T_SlidingDoor`.

View source

T_VerticalDoor

function T_VerticalDoor(door)

Moves one door ceiling through opening, waiting, closing, and crush-reversal phases.

ParameterTypeDefaultDescription
doordynamic—Door value supplied to `T_VerticalDoor`.

View source