# RH_MAGIC2
const RH_MAGIC2 = 72Defines rh magic2 for the r upscaled subsystem.
src/r_upscaled.mlLoads optional MiniDoom upscaled graphics packages and shared render-scale settings.
m_argv.ml → src/m_argv.mlr_renderer.ml → src/r_renderer.mlstd/fs.ml as fs → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/fs.ml external dependencystd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencyconst RH_MAGIC2 = 72Defines rh magic2 for the r upscaled subsystem.
const RH_MAGIC3 = 68Defines rh magic3 for the r upscaled subsystem.
function RU_ArgValue(flag)Reads the value after a command-line flag.
| Parameter | Type | Default | Description |
|---|---|---|---|
flag | dynamic | — | Flag value supplied to `RU_ArgValue`. |
inline function RU_ClampScale(v)Keeps renderer scale inside the supported range.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
ru_enabledTracks whether ru enabled is active in the r upscaled subsystem.
ru_entriesStores the ru entries collection used by the r upscaled subsystem.
ru_entry_t struct
function RU_FindEntry(kind, name)Finds an entry by kind and Doom name.
| Parameter | Type | Default | Description |
|---|---|---|---|
kind | dynamic | — | Kind value supplied to `RU_FindEntry`. |
name | dynamic | — | Resource or object name to resolve. |
function RU_FindPackagePath(iwadPath)Resolves explicit or automatic upscaled package path.
| Parameter | Type | Default | Description |
|---|---|---|---|
iwadPath | dynamic | — | Iwad path value supplied to `RU_FindPackagePath`. |
inline function RU_GetFlat(name)Returns an upscaled flat image entry or void.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
inline function RU_GetPatch(name)Returns an upscaled patch image entry or void.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
inline function RU_GetSprite(name)Returns an upscaled sprite image entry or void.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
inline function RU_GetTexture(name)Returns an upscaled wall texture image entry or void.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
function RU_Init(iwadPath)Initializes optional upscaled graphics support.
| Parameter | Type | Default | Description |
|---|---|---|---|
iwadPath | dynamic | — | Iwad path value supplied to `RU_Init`. |
inline function RU_IsEnabled()Returns true when a package is active.
ru_loadedTracks whether ru loaded is active in the r upscaled subsystem.
function RU_LoadPackage(path)Loads an upscaled package from disk.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
const RU_MAGIC0 = 77Defines ru magic0 for the r upscaled subsystem.
const RU_MAGIC1 = 68Defines ru magic1 for the r upscaled subsystem.
const RU_MAGIC2 = 85Defines ru magic2 for the r upscaled subsystem.
const RU_MAGIC3 = 80Defines ru magic3 for the r upscaled subsystem.
function RU_Name8(name)Normalizes names to Doom's 8-character lump namespace.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
function RU_ParsePackage(data)Parses MiniDoom upscaled package bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Binary or structured data to process. |
function RU_ParseScaleFromArgs()Initializes the requested physical render scale.
ru_pathStores the mutable ru path text used by the r upscaled subsystem.
inline function RU_ReadS32(b, off)Reads a little-endian s32 from package bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
b | dynamic | — | Second input operand. |
off | dynamic | — | Zero-based byte or element offset. |
inline function RU_ReadU32(b, off)Reads a little-endian u32 from package bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
b | dynamic | — | Second input operand. |
off | dynamic | — | Zero-based byte or element offset. |
inline function RU_RendererAllowsHD()Returns true when the active renderer may consume HDWAD assets.
inline function RU_RenderScale()Returns the physical render scale requested for this run.
ru_scaleTracks the mutable ru scale value used by the r upscaled subsystem.
function RU_ToIntOr(v, fallback)Converts a MiniLang value to int with fallback.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
function RU_ToUpperAscii(s)Converts a string to uppercase ASCII for WAD-style names.
| Parameter | Type | Default | Description |
|---|---|---|---|
s | dynamic | — | S value supplied to `RU_ToUpperAscii`. |
const RU_TYPE_FLAT = 2Defines ru type flat for the r upscaled subsystem.
const RU_TYPE_PATCH = 1Defines ru type patch for the r upscaled subsystem.
const RU_TYPE_SPRITE = 4Defines ru type sprite for the r upscaled subsystem.
const RU_TYPE_TEXTURE = 3Defines ru type texture for the r upscaled subsystem.
const RU_VERSION = 6Defines ru version for the r upscaled subsystem.