MiniDoom

src/p_ceilng.ml

Runs moving and crushing ceiling thinkers, including active-slot tracking and tagged stasis control.

Package
(global)
Reachable
Yes

Imports

Declarations

_CeilingMakeThinker

inline function _CeilingMakeThinker(fn)

Creates a ceiling-mover thinker with list links, callback, direction, speed, and sector state initialized for activation.

ParameterTypeDefaultDescription
fndynamic—Fn value supplied to `_CeilingMakeThinker`.

View source

_CeilingSetSlot

inline function _CeilingSetSlot(idx, v)

Rebuilds the active-ceiling sequence with one validated slot replaced, preserving list compatibility.

ParameterTypeDefaultDescription
idxdynamic—Zero-based element or table index.
vdynamic—Value consumed by the operation.

View source

_InitActiveCeilings

function _InitActiveCeilings()

Lazily creates the fixed-size active-ceiling slot table expected by tag and stasis operations.

View source

activeceilings

activeceilings

Stores the activeceilings collection used by the p ceilng subsystem.

View source

EV_CeilingCrushStop

function EV_CeilingCrushStop(line)

Puts every active ceiling with the trigger tag into stasis and reports whether any mover was stopped.

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

View source

EV_DoCeiling

function EV_DoCeiling(line, type)

Starts the requested ceiling action in every sector matching a trigger line's tag and reports whether any mover was created.

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

View source

P_ActivateInStasisCeiling

function P_ActivateInStasisCeiling(line)

Resumes every stopped ceiling matching a trigger tag by restoring its saved direction.

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

View source

P_AddActiveCeiling

function P_AddActiveCeiling(c)

Places a ceiling mover in the first free active slot so tagged stop and resume events can find it.

ParameterTypeDefaultDescription
cdynamic—C value supplied to `P_AddActiveCeiling`.

View source

P_RemoveActiveCeiling

function P_RemoveActiveCeiling(c)

Clears the slot holding a completed ceiling mover so it no longer participates in tagged control.

ParameterTypeDefaultDescription
cdynamic—C value supplied to `P_RemoveActiveCeiling`.

View source

T_MoveCeiling

function T_MoveCeiling(ceiling)

Moves a ceiling toward its current bound, reverses cyclic crushers at endpoints, and removes one-shot movers on completion.

ParameterTypeDefaultDescription
ceilingdynamic—Ceiling value supplied to `T_MoveCeiling`.

View source