# _P_NumLines
inline function _P_NumLines()Returns the loaded linedef count for either supported sequence representation.
src/p_spec.mlDefines and updates sector/line specials, animated surfaces, buttons, movers, environmental damage, and tag searches.
d_player.ml → src/d_player.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mlg_game.ml → src/g_game.mli_system.ml → src/i_system.mlinfo.ml → src/info.mlm_argv.ml → src/m_argv.mlm_fixed.ml → src/m_fixed.mlm_random.ml → src/m_random.mlp_local.ml → src/p_local.mlp_telept.ml → src/p_telept.mlr_local.ml → src/r_local.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 dependencyw_wad.ml → src/w_wad.mlz_zone.ml → src/z_zone.mlinline function _P_NumLines()Returns the loaded linedef count for either supported sequence representation.
inline function _P_NumSectors()Returns the loaded sector count for either supported sequence representation.
_PS_animdefsStores the ps animdefs collection used by the p spec subsystem.
inline function _PS_IDiv(a, b)Returns a signed quotient truncated toward zero, or zero for invalid operands and a zero divisor in `_PS_IDiv`
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _PS_IsProjectileType(t)Identifies player and monster missile types allowed to trigger projectile-sensitive line specials.
| Parameter | Type | Default | Description |
|---|---|---|---|
t | dynamic | — | T value supplied to `_PS_IsProjectileType`. |
inline function _PS_IsSeq(v)Recognizes array and list containers used by level geometry and animation tables.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
function _PS_LineSideSector(line, side)Resolves a line's requested side to its front/back sector through direct references or sidedef indices.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
side | dynamic | — | Map side affected by the operation. |
function _PS_ParseInt(v)Parses an integer or numeric string with truncation toward zero, returning void when conversion fails.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
function _PS_ResetButtons()Reinitializes the fixed timed-button registry or clears existing entries when the helper is unavailable.
function _PS_SectorIndex(sec)Finds a sector by object identity in the loaded sector table, returning -1 when absent.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `_PS_SectorIndex`. |
function _PSpec_GetPower(player, pw)Reads a validated player power duration/value, treating legacy booleans as zero or one.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
pw | dynamic | — | Pw value supplied to `_PSpec_GetPower`. |
function _PSpec_PowerIndex(pw)Maps a supported player-power enum or integer to its powers-array slot.
| Parameter | Type | Default | Description |
|---|---|---|---|
pw | dynamic | — | Pw value supplied to `_PSpec_PowerIndex`. |
animsStores the anims collection used by the p spec subsystem.
button_t struct
const BUTTONTIME = 35Defines buttontime for the p spec subsystem.
bwhere_e enum
ceiling_e enum
ceiling_t struct
const CEILSPEED = 65536Defines ceilspeed for the p spec subsystem.
const CEILWAIT = 150Defines ceilwait for the p spec subsystem.
function EV_DoDonut(line)Starts the coupled donut action: lower the tagged pillar while raising its surrounding ring to the outer sector.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
const FASTDARK = 15Defines fastdark for the p spec subsystem.
fireflicker_t struct
floor_e enum
floormove_t struct
const FLOORSPEED = 65536Defines floorspeed for the p spec subsystem.
function getNextSector(line, sec)Given one sector on a two-sided line, returns the opposite adjacent sector.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
sec | dynamic | — | Sec value supplied to `getNextSector`. |
function getSector(currentSector, lineIndex, side)Returns the sector referenced by a resolved sidedef, or void when the side is missing.
| Parameter | Type | Default | Description |
|---|---|---|---|
currentSector | dynamic | — | Current sector value supplied to `getSector`. |
lineIndex | dynamic | — | Index identifying line. |
side | dynamic | — | Map side affected by the operation. |
function getSide(currentSector, lineIndex, side)Resolves a sector-local line and side number to the corresponding sidedef with index validation.
| Parameter | Type | Default | Description |
|---|---|---|---|
currentSector | dynamic | — | Current sector value supplied to `getSide`. |
lineIndex | dynamic | — | Index identifying line. |
side | dynamic | — | Map side affected by the operation. |
glow_t struct
const GLOWSPEED = 8Defines glowspeed for the p spec subsystem.
lastanimTracks the mutable lastanim value used by the p spec subsystem.
levelTimeCountTracks the mutable level time count value used by the p spec subsystem.
levelTimerTracks whether level timer is active in the p spec subsystem.
lightflash_t struct
linespeciallistStores the linespeciallist collection used by the p spec subsystem.
const MAXANIMS = 32Defines the maximum maxanims accepted by the p spec subsystem.
const MAXBUTTONS = 16Defines the maximum maxbuttons accepted by the p spec subsystem.
const MAXCEILINGS = 30Defines the maximum maxceilings accepted by the p spec subsystem.
const MAXLINEANIMS = 64Defines the maximum maxlineanims accepted by the p spec subsystem.
const MAXPLATS = 30Defines the maximum maxplats accepted by the p spec subsystem.
const MAXSWITCHES = 50Defines the maximum maxswitches accepted by the p spec subsystem.
const MO_TELEPORTMAN = 14Defines mo teleportman for the p spec subsystem.
numlinespecialsTracks the mutable numlinespecials value used by the p spec subsystem.
function P_CrossSpecialLine(linenum, side, thing)Dispatches one-shot and repeatable walkover specials after validating line index, side, actor, and projectile rules.
| Parameter | Type | Default | Description |
|---|---|---|---|
linenum | dynamic | — | Index identifying line. |
side | dynamic | — | Map side affected by the operation. |
thing | dynamic | — | World object affected by the operation. |
function P_FindHighestCeilingSurrounding(sec)Returns the maximum ceiling height among all valid sectors adjacent to the supplied sector.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `P_FindHighestCeilingSurrounding`. |
function P_FindHighestFloorSurrounding(sec)Returns the maximum floor height among all valid sectors adjacent to the supplied sector.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `P_FindHighestFloorSurrounding`. |
function P_FindLowestCeilingSurrounding(sec)Returns the minimum ceiling height among all valid sectors adjacent to the supplied sector.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `P_FindLowestCeilingSurrounding`. |
function P_FindLowestFloorSurrounding(sec)Returns the minimum floor height among all valid sectors adjacent to the supplied sector.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `P_FindLowestFloorSurrounding`. |
function P_FindMinSurroundingLight(sector, max)Finds the lowest adjacent sector light level without exceeding the caller-provided starting maximum.
| Parameter | Type | Default | Description |
|---|---|---|---|
sector | dynamic | — | Map sector affected by the operation. |
max | dynamic | — | Maximum permitted value. |
function P_FindNextHighestFloor(sec, currentheight)Returns the lowest adjacent floor strictly above currentheight, or currentheight when none exists.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `P_FindNextHighestFloor`. |
currentheight | dynamic | — | Height of current in pixels or map units. |
function P_FindSectorFromLineTag(line, start)Continues a linear search after start for the next sector whose tag matches the triggering line.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
start | dynamic | — | Start value supplied to `P_FindSectorFromLineTag`. |
function P_InitPicAnims()Resolves built-in flat/texture animation name ranges, validates contiguity, and records runtime frame cycles.
p_picanim_revisionTracks the mutable p picanim revision value used by the p spec subsystem.
function P_PlayerInSpecialSector(player)Applies floor-contact damage, secret discovery, and exit effects for the player's current sector special.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | Player state affected by the operation. |
function P_ShootSpecialLine(thing, line)Dispatches gun-triggered line types to floor, door, or switch actions while enforcing monster restrictions.
| Parameter | Type | Default | Description |
|---|---|---|---|
thing | dynamic | — | World object affected by the operation. |
line | dynamic | — | Map line or text line affected by the operation. |
function P_SpawnSpecials()Parses the level timer, spawns sector lighting/door effects, collects scrolling lines, and resets active movers/buttons.
function P_UpdateSpecials()Advances level timeout, surface animation translations, scrolling walls, and timed button restoration each tic.
plat_e enum
plat_t struct
const PLATSPEED = 65536Defines platspeed for the p spec subsystem.
plattype_e enum
const PLATWAIT = 3Defines platwait for the p spec subsystem.
ps_anim_t struct
ps_animdef_t struct
result_e enum
const SLOWDARK = 35Defines slowdark for the p spec subsystem.
stair_e enum
strobe_t struct
const STROBEBRIGHT = 5Defines strobebright for the p spec subsystem.
switchlist_t struct
function twoSided(sectorIndex, lineIndex)Tests whether a sector-owned line index references a valid ML_TWOSIDED linedef.
| Parameter | Type | Default | Description |
|---|---|---|---|
sectorIndex | dynamic | — | Index identifying sector. |
lineIndex | dynamic | — | Index identifying line. |
const VDOORSPEED = 131072Defines vdoorspeed for the p spec subsystem.
const VDOORWAIT = 150Defines vdoorwait for the p spec subsystem.
vldoor_e enum
vldoor_t struct