# _alphSwitchList
_alphSwitchListStores the alph switch list collection used by the p switch subsystem.
src/p_switch.mlResolves switch texture pairs, manages timed buttons, and dispatches player-use line specials.
doomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mlg_game.ml → src/g_game.mli_system.ml → src/i_system.mlm_argv.ml → src/m_argv.mlp_ceilng.ml → src/p_ceilng.mlp_doors.ml → src/p_doors.mlp_floor.ml → src/p_floor.mlp_lights.ml → src/p_lights.mlp_local.ml → src/p_local.mlp_plats.ml → src/p_plats.mlp_spec.ml → src/p_spec.mlr_state.ml → src/r_state.mls_sound.ml → src/s_sound.mlsounds.ml → src/sounds.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependency_alphSwitchListStores the alph switch list collection used by the p switch subsystem.
function _InitButtonList()Lazily creates the fixed set of reusable timed-button records with inactive timers.
function _PSW_DiagUseEnabled()Caches whether switch-use diagnostic logging was enabled on the command line.
inline function _PSW_DiagUseLog(msg)Emits a switch-use diagnostic only when the cached diagnostic option is active.
| Parameter | Type | Default | Description |
|---|---|---|---|
msg | dynamic | — | Msg value supplied to `_PSW_DiagUseLog`. |
inline function _PSW_Idiv(a, b)Returns a signed quotient truncated toward zero, using zero when the divisor is zero.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _PSW_IsSeq(v)Tests whether an arbitrary value is an indexable array or byte sequence.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _PSW_Side0(line)Resolves a line's front sidedef while rejecting absent or out-of-range side indices.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
inline function _PSW_StartSound(origin, sound)Emits a switch sound from a valid positional origin when audio support is available.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | Origin value supplied to `_PSW_StartSound`. |
sound | dynamic | — | Sound value supplied to `_PSW_StartSound`. |
_pswDiagUseTracks whether psw diag use is active in the p switch subsystem.
_pswDiagUseCountTracks the mutable psw diag use count value used by the p switch subsystem.
_pswDiagUseInitTracks whether psw diag use init is active in the p switch subsystem.
buttonlistStores the buttonlist collection used by the p switch subsystem.
numswitchesTracks the mutable numswitches value used by the p switch subsystem.
function P_ChangeSwitchTexture(line, useAgain)Finds the activated sidedef texture's paired switch image, plays its sound, and optionally schedules restoration.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
useAgain | dynamic | — | Use again value supplied to `P_ChangeSwitchTexture`. |
function P_InitSwitchList()Resolves texture pairs allowed by the current game edition and terminates the list with a sentinel.
function P_StartButton(line, w, texture, time)Reserves a timer for a reusable switch texture, avoiding duplicate records for the same linedef.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
w | dynamic | — | W value supplied to `P_StartButton`. |
texture | dynamic | — | Texture value supplied to `P_StartButton`. |
time | dynamic | — | Time value used by the operation. |
function P_UpdateButtons()Counts down reusable switches, restores their original sidedef texture at expiry, and frees their timer records.
function P_UseSpecialLine(thing, line, side)Enforces side and monster-use restrictions, dispatches a linedef's manual special, and changes its switch texture on success.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
line | dynamic | — | Map line or text line affected by the operation. |
side | dynamic | — | Map side affected by the operation. |
switchlistStores the switchlist collection used by the p switch subsystem.