MiniDoom

src/p_tick.ml

Owns the intrusive thinker list and advances all world thinkers once per unpaused game tic.

Package
(global)
Reachable
Yes

Imports

Declarations

_PTK_owner_nodes

_PTK_owner_nodes

Stores the ptk owner nodes collection used by the p tick subsystem.

View source

_PTK_owner_vals

_PTK_owner_vals

Stores the ptk owner vals collection used by the p tick subsystem.

View source

leveltime

leveltime

Tracks the mutable leveltime value used by the p tick subsystem.

View source

P_AddThinker

function P_AddThinker(thinker)

Adds thinker entries to the play simulation.

ParameterTypeDefaultDescription
thinkerdynamic—Thinker value supplied to `P_AddThinker`.

View source

P_AllocateThinker

function P_AllocateThinker(thinker)

Constructs an unlinked thinker node with an empty callback and owner slot.

ParameterTypeDefaultDescription
thinkerdynamic—Thinker value supplied to `P_AllocateThinker`.

View source

P_InitThinkers

function P_InitThinkers()

Resets the thinker sentinel into an empty circular doubly linked list and clears owner bookkeeping.

View source

P_RegisterThinkerOwner

function P_RegisterThinkerOwner(node, owner)

Associates a thinker node with its owning gameplay object in the fallback owner registry.

ParameterTypeDefaultDescription
nodedynamic—Node value supplied to `P_RegisterThinkerOwner`.
ownerdynamic—Owner value supplied to `P_RegisterThinkerOwner`.

View source

P_RemoveThinker

function P_RemoveThinker(thinker)

Removes remove Thinker data from the play simulation system.

ParameterTypeDefaultDescription
thinkerdynamic—Thinker value supplied to `P_RemoveThinker`.

View source

P_ResolveThinkerOwner

function P_ResolveThinkerOwner(node)

Returns a thinker's direct owner or resolves it from the fallback registry used by legacy nodes.

ParameterTypeDefaultDescription
nodedynamic—Node value supplied to `P_ResolveThinkerOwner`.

View source

P_RunFrozenPlayerMobjs

function P_RunFrozenPlayerMobjs()

Advances only active player mobjs while the developer freeze suspends every other world thinker.

View source

P_RunThinkers

function P_RunThinkers()

Walks the thinker list safely across removals and invokes each active callback with its resolved owner.

View source

P_Ticker

function P_Ticker()

Advances players, thinkers, and sector specials once per unpaused game tic, then increments level time.

View source

P_UnregisterThinkerOwner

function P_UnregisterThinkerOwner(node)

Removes a thinker-to-owner association when the node leaves the active thinker list.

ParameterTypeDefaultDescription
nodedynamic—Node value supplied to `P_UnregisterThinkerOwner`.

View source

thinkercap

thinkercap

Tracks the mutable thinkercap value used by the p tick subsystem.

View source