# _RP_Abs
inline function _RP_Abs(v)Returns the non-negative integer magnitude of a possibly non-integer plane value.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
src/r_plane.mlAggregates visible floor, ceiling, and sky regions into visplanes and rasterizes their horizontal spans or sky columns.
doomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mli_system.ml → src/i_system.mlr_data.ml → src/r_data.mlr_hires.ml → src/r_hires.mlr_local.ml → src/r_local.mlr_main.ml → src/r_main.mlr_sky.ml → src/r_sky.mlr_upscaled.ml → src/r_upscaled.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencyw_wad.ml → src/w_wad.mlz_zone.ml → src/z_zone.mlinline function _RP_Abs(v)Returns the non-negative integer magnitude of a possibly non-integer plane value.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _RP_AngNorm(a)Normalizes a coerced angle to Doom's unsigned 32-bit binary-angle domain.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
_rp_default_colormapHolds the optional rp default colormap resource used by the r plane subsystem.
inline function _RP_DefaultColorMap()Caches the first 256-byte colormap for unlit sky columns, falling back to a zeroed map when assets are absent.
function _RP_DrawVisplanes()Rasterizes queued sky visplanes as vertical texture columns and ordinary flats as lit horizontal spans, updating profile counts.
function _RP_EnsurePlaneCapacity(needIndex)Geometrically grows reusable visplane storage up to a hard safety limit and initializes every new slot.
| Parameter | Type | Default | Description |
|---|---|---|---|
needIndex | dynamic | — | Index identifying need. |
inline function _RP_FineAt(tab, idx)Samples a fine-angle lookup table with wraparound and returns zero when the table is unavailable.
| Parameter | Type | Default | Description |
|---|---|---|---|
tab | dynamic | — | Tab value supplied to `_RP_FineAt`. |
idx | dynamic | — | Zero-based element or table index. |
inline function _RP_I(v, fallback)Coerces numeric values to truncation-toward-zero integers and returns a caller fallback on conversion failure.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
inline function _RP_IDiv(a, b)Returns a signed quotient truncated toward zero, or zero for invalid operands and a zero divisor in `_RP_IDiv`
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _RP_IsSeq(v)Recognizes both array and list containers accepted by plane tables and geometry records.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _RP_NewPlane(height, picnum, lightlevel)Constructs an unused visplane with target-width top/bottom arrays and sentinel horizontal bounds.
| Parameter | Type | Default | Description |
|---|---|---|---|
height | dynamic | — | Height of the target in pixels or map units. |
picnum | dynamic | — | Index identifying pic. |
lightlevel | dynamic | — | Lightlevel value supplied to `_RP_NewPlane`. |
_rp_prof_mapplane_callsTracks the mutable rp prof mapplane calls value used by the r plane subsystem.
_rp_prof_visplanes_flatTracks the mutable rp prof visplanes flat value used by the r plane subsystem.
_rp_prof_visplanes_skyTracks the mutable rp prof visplanes sky value used by the r plane subsystem.
_rp_prof_visplanes_totalTracks the mutable rp prof visplanes total value used by the r plane subsystem.
function _RP_RecomputeSlopeTables()Rebuilds row distance slopes and per-column perspective correction factors for the active view geometry.
function _RP_ResetPlane(pl, height, picnum, lightlevel, minx, maxx)Recycles a visplane for new height, texture, and light keys while clearing every covered-column marker.
| Parameter | Type | Default | Description |
|---|---|---|---|
pl | dynamic | — | Pl value supplied to `_RP_ResetPlane`. |
height | dynamic | — | Height of the target in pixels or map units. |
picnum | dynamic | — | Index identifying pic. |
lightlevel | dynamic | — | Lightlevel value supplied to `_RP_ResetPlane`. |
minx | dynamic | — | Minx value supplied to `_RP_ResetPlane`. |
maxx | dynamic | — | Maxx value supplied to `_RP_ResetPlane`. |
inline function _RP_TargetHeight()Returns active world render height.
inline function _RP_TargetWidth()Returns active world render width.
basexscaleTracks the mutable basexscale value used by the r plane subsystem.
baseyscaleTracks the mutable baseyscale value used by the r plane subsystem.
cacheddistanceStores the cacheddistance collection used by the r plane subsystem.
cachedheightStores the cachedheight collection used by the r plane subsystem.
cachedxstepStores the cachedxstep collection used by the r plane subsystem.
cachedystepStores the cachedystep collection used by the r plane subsystem.
ceilingclipStores the ceilingclip collection used by the r plane subsystem.
ceilingfunc_tHolds the optional ceilingfunc t resource used by the r plane subsystem.
ceilingplaneHolds the optional ceilingplane resource used by the r plane subsystem.
distscaleStores the distscale collection used by the r plane subsystem.
floorclipStores the floorclip collection used by the r plane subsystem.
floorfuncHolds the optional floorfunc resource used by the r plane subsystem.
floorplaneHolds the optional floorplane resource used by the r plane subsystem.
lastopeningHolds the optional lastopening resource used by the r plane subsystem.
const MAXOPENINGS = SCREENWIDTH * 64Defines the maximum maxopenings accepted by the r plane subsystem.
const MAXVISPLANES = 128Defines the maximum maxvisplanes accepted by the r plane subsystem.
openingsStores the openings collection used by the r plane subsystem.
planeheightTracks the mutable planeheight value used by the r plane subsystem.
planezlightHolds the optional planezlight resource used by the r plane subsystem.
function R_CheckPlane(pl, start, stop)Extends a visplane across unused columns or splits it into a duplicate when the requested range overlaps existing spans.
| Parameter | Type | Default | Description |
|---|---|---|---|
pl | dynamic | — | Pl value supplied to `R_CheckPlane`. |
start | dynamic | — | Start value supplied to `R_CheckPlane`. |
stop | dynamic | — | Stop value supplied to `R_CheckPlane`. |
function R_ClearPlanes()Resets per-column floor/ceiling clips and visplane allocation, invalidates row caches, and derives view-relative texture scales.
function R_DrawPlanes()Executes the queued visplane rasterization pass after wall clipping has finalized visible column bounds.
function R_FindPlane(height, picnum, lightlevel)Reuses a visplane with matching height, texture, and light keys or allocates a cleared entry for a new region.
| Parameter | Type | Default | Description |
|---|---|---|---|
height | dynamic | — | Height of the target in pixels or map units. |
picnum | dynamic | — | Index identifying pic. |
lightlevel | dynamic | — | Lightlevel value supplied to `R_FindPlane`. |
function R_InitPlanes()Sizes clipping, slope, span, opening, cache, and visplane workspaces for the active logical or HD render target.
function R_MakeSpans(x, t1, b1, t2, b2)Compares adjacent visplane column bounds, closes rows that ended, and records starting columns for newly opened rows.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
t1 | dynamic | — | T1 value supplied to `R_MakeSpans`. |
b1 | dynamic | — | B1 value supplied to `R_MakeSpans`. |
t2 | dynamic | — | T2 value supplied to `R_MakeSpans`. |
b2 | dynamic | — | B2 value supplied to `R_MakeSpans`. |
function R_MapPlane(y, x1, x2)Derives perspective distance, texture stepping, origin, and lighting for one horizontal plane span before rasterization.
| Parameter | Type | Default | Description |
|---|---|---|---|
y | dynamic | — | Vertical map- or screen-space coordinate. |
x1 | dynamic | — | Horizontal coordinate of the first endpoint. |
x2 | dynamic | — | Horizontal coordinate of the second endpoint. |
const RP_MAXVISPLANES_HARD = 4096Defines the maximum rp maxvisplanes hard accepted by the r plane subsystem.
const RP_SPAN_SENTINEL = 2147483647Defines rp span sentinel for the r plane subsystem.
spanstartStores the spanstart collection used by the r plane subsystem.
spanstopStores the spanstop collection used by the r plane subsystem.
visplanesStores the visplanes collection used by the r plane subsystem.
visplanes_lastTracks the mutable visplanes last value used by the r plane subsystem.
yslopeStores the yslope collection used by the r plane subsystem.