# _RS_Abs
inline function _RS_Abs(v)Returns the non-negative integer magnitude of a numeric wall-renderer input.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
src/r_segs.mlProjects BSP wall segments into columns, maintains clip openings, and defers masked middle textures.
doomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mli_system.ml → src/i_system.mlr_local.ml → src/r_local.mlr_sky.ml → src/r_sky.mlstd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencyinline function _RS_Abs(v)Returns the non-negative integer magnitude of a numeric wall-renderer input.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _RS_AllocIntList(n, fill)Allocates an integer list of a requested length initialized to one sentinel value.
| Parameter | Type | Default | Description |
|---|---|---|---|
n | dynamic | — | Number of values to process. |
fill | dynamic | — | Fill value supplied to `_RS_AllocIntList`. |
function _RS_AllocMaskedCols(start, stop)Reserves an inclusive masked-column range in openings, initializes MAXSHORT sentinels, and returns an x-biased reference.
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | Start value supplied to `_RS_AllocMaskedCols`. |
stop | dynamic | — | Stop value supplied to `_RS_AllocMaskedCols`. |
inline function _RS_AngNorm(a)Normalizes a numeric value to Doom's unsigned 32-bit binary-angle domain.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
inline function _RS_AngSub(a, b)Subtracts two binary angles with unsigned 32-bit wraparound.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _RS_Clamp(v, lo, hi)Constrains a wall-rendering scalar to the supplied inclusive bounds.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
lo | dynamic | — | Inclusive lower bound. |
hi | dynamic | — | Inclusive upper bound. |
inline function _RS_ClampIndex(i, n)Clamps an index to the first or last entry of a non-empty lookup table.
| Parameter | Type | Default | Description |
|---|---|---|---|
i | dynamic | — | Zero-based iteration index. |
n | dynamic | — | Number of values to process. |
function _RS_CopyClipToOpenings(src, start, stop, fallback)Copies an inclusive screen-column clip range into the openings arena and returns an x-biased reference.
| Parameter | Type | Default | Description |
|---|---|---|---|
src | dynamic | — | Src value supplied to `_RS_CopyClipToOpenings`. |
start | dynamic | — | Start value supplied to `_RS_CopyClipToOpenings`. |
stop | dynamic | — | Stop value supplied to `_RS_CopyClipToOpenings`. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
function _RS_DrawMaskedTextureColumn(x, texnum, texturecolumn, texturemid, yscale, topclip, bottomclip)Decodes patch posts for one masked wall column, clips each post, draws with depth state, and restores shared column inputs.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
texnum | dynamic | — | Index identifying tex. |
texturecolumn | dynamic | — | Texturecolumn value supplied to `_RS_DrawMaskedTextureColumn`. |
texturemid | dynamic | — | Texturemid value supplied to `_RS_DrawMaskedTextureColumn`. |
yscale | dynamic | — | Yscale value supplied to `_RS_DrawMaskedTextureColumn`. |
topclip | dynamic | — | Topclip value supplied to `_RS_DrawMaskedTextureColumn`. |
bottomclip | dynamic | — | Bottomclip value supplied to `_RS_DrawMaskedTextureColumn`. |
function _RS_DrawTexturedRange(fb, x, y1, y2, texnum, texCol, cmap)Scales one opaque texture column across a bounded vertical framebuffer range using a lighting colormap.
| Parameter | Type | Default | Description |
|---|---|---|---|
fb | dynamic | — | Fb value supplied to `_RS_DrawTexturedRange`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y1 | dynamic | — | Vertical coordinate of the first endpoint. |
y2 | dynamic | — | Vertical coordinate of the second endpoint. |
texnum | dynamic | — | Index identifying tex. |
texCol | dynamic | — | Tex col value supplied to `_RS_DrawTexturedRange`. |
cmap | dynamic | — | Cmap value supplied to `_RS_DrawTexturedRange`. |
function _RS_EnsureOpeningsCapacity(needed)Grows the shared openings arena geometrically so a requested exclusive end offset is addressable.
| Parameter | Type | Default | Description |
|---|---|---|---|
needed | dynamic | — | Needed value supplied to `_RS_EnsureOpeningsCapacity`. |
inline function _RS_GetClipValue(clipref, x, fallback)Reads a screen-column clip from either a direct sequence or a biased offset into the openings arena.
| Parameter | Type | Default | Description |
|---|---|---|---|
clipref | dynamic | — | Clipref value supplied to `_RS_GetClipValue`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
inline function _RS_IDiv(a, b)Returns a signed quotient truncated toward zero, or zero for invalid operands and a zero divisor in `_RS_IDiv`
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _RS_IsSeq(v)Recognizes the array and list containers used for column clips and renderer tables.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _RS_ReadMaskedCol(maskref, x)Reads a deferred masked texture column through direct or openings-backed storage, defaulting to MAXSHORT.
| Parameter | Type | Default | Description |
|---|---|---|---|
maskref | dynamic | — | Maskref value supplied to `_RS_ReadMaskedCol`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
inline function _RS_ResolveTexture(texId)Applies animation translation to a positive texture id and rejects invalid or out-of-table results.
| Parameter | Type | Default | Description |
|---|---|---|---|
texId | dynamic | — | Tex id value supplied to `_RS_ResolveTexture`. |
function _RS_SelectWallLights(line, sec)Selects the scale-light row for a sector, including horizontal/vertical wall bias and fixed-colormap override.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
sec | dynamic | — | Sec value supplied to `_RS_SelectWallLights`. |
inline function _RS_SetClipValue(clipref, x, value)Writes a screen-column clip through either a direct sequence or a biased openings-arena reference.
| Parameter | Type | Default | Description |
|---|---|---|---|
clipref | dynamic | — | Clipref value supplied to `_RS_SetClipValue`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
value | dynamic | — | Value consumed by the operation. |
inline function _RS_ToInt(v, fallback)Coerces numeric values to truncation-toward-zero integers and returns fallback on failure in `_RS_ToInt`
| 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 _RS_WrapIndex(i, n)Wraps a possibly negative index into a non-empty cyclic lookup table.
| Parameter | Type | Default | Description |
|---|---|---|---|
i | dynamic | — | Zero-based iteration index. |
n | dynamic | — | Number of values to process. |
inline function _RS_WriteMaskedCol(maskref, x, value)Writes a deferred masked texture column through direct or openings-backed storage.
| Parameter | Type | Default | Description |
|---|---|---|---|
maskref | dynamic | — | Maskref value supplied to `_RS_WriteMaskedCol`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
value | dynamic | — | Value consumed by the operation. |
bottomfracTracks the mutable bottomfrac value used by the r segs subsystem.
bottomstepTracks the mutable bottomstep value used by the r segs subsystem.
bottomtextureTracks the mutable bottomtexture value used by the r segs subsystem.
const HEIGHTBITS = 12Defines heightbits for the r segs subsystem.
const HEIGHTUNIT = 1 << HEIGHTBITSDefines heightunit for the r segs subsystem.
maskedtextureTracks whether maskedtexture is active in the r segs subsystem.
maskedtexturecolHolds the optional maskedtexturecol resource used by the r segs subsystem.
midtextureTracks the mutable midtexture value used by the r segs subsystem.
pixhighTracks the mutable pixhigh value used by the r segs subsystem.
pixhighstepTracks the mutable pixhighstep value used by the r segs subsystem.
pixlowTracks the mutable pixlow value used by the r segs subsystem.
pixlowstepTracks the mutable pixlowstep value used by the r segs subsystem.
function R_ClearSolidClipScales()Retains the classic renderer hook; solid clip scales need no separate reset in this implementation.
function R_RenderMaskedSegRange(ds, x1, x2)Renders an inclusive deferred middle-texture range with pegging, scale lighting, and saved sprite clip arrays.
| Parameter | Type | Default | Description |
|---|---|---|---|
ds | dynamic | — | Ds value supplied to `R_RenderMaskedSegRange`. |
x1 | dynamic | — | Horizontal coordinate of the first endpoint. |
x2 | dynamic | — | Horizontal coordinate of the second endpoint. |
function R_RenderSegLoop()Projects a prepared wall range column by column, draws its wall tiers, updates plane spans, clips, and records masked columns.
function R_StoreWallRange(start, stop)Builds a drawseg for a visible wall range, derives textures/pegging/silhouettes, renders opaque tiers, and saves sprite clips.
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | Start value supplied to `R_StoreWallRange`. |
stop | dynamic | — | Stop value supplied to `R_StoreWallRange`. |
const RS_INV_SCALE_NUM = 4294967295Defines the rs inv scale num count used by the r segs subsystem.
rw_bottomtexturemidTracks the mutable rw bottomtexturemid value used by the r segs subsystem.
rw_centerangleTracks the mutable rw centerangle value used by the r segs subsystem.
rw_midtexturemidTracks the mutable rw midtexturemid value used by the r segs subsystem.
rw_offsetTracks the mutable rw offset value used by the r segs subsystem.
rw_scaleTracks the mutable rw scale value used by the r segs subsystem.
rw_scalestepTracks the mutable rw scalestep value used by the r segs subsystem.
rw_solidwallTracks whether rw solidwall is active in the r segs subsystem.
rw_toptexturemidTracks the mutable rw toptexturemid value used by the r segs subsystem.
topfracTracks the mutable topfrac value used by the r segs subsystem.
topstepTracks the mutable topstep value used by the r segs subsystem.
toptextureTracks the mutable toptexture value used by the r segs subsystem.
walllightsHolds the optional walllights resource used by the r segs subsystem.
worldbottomTracks the mutable worldbottom value used by the r segs subsystem.
worldhighTracks the mutable worldhigh value used by the r segs subsystem.
worldlowTracks the mutable worldlow value used by the r segs subsystem.
worldtopTracks the mutable worldtop value used by the r segs subsystem.