# _D_AddDemoLmpFromArgs
inline function _D_AddDemoLmpFromArgs(flag)Adds demo lump from args entries to the Doom core.
| Parameter | Type | Default | Description |
|---|---|---|---|
flag | dynamic | — | Flag value supplied to `_D_AddDemoLmpFromArgs`. |
src/d_main.mlBootstraps WADs and engine subsystems, then drives title sequencing, frame dispatch, and profiling.
am_map.ml → src/am_map.mlconsole_ui.ml → src/console_ui.mld_event.ml → src/d_event.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mldstrings.ml → src/dstrings.mlf_finale.ml → src/f_finale.mlf_wipe.ml → src/f_wipe.mlg_game.ml → src/g_game.mlhdwad_builder.ml → src/hdwad_builder.mlhu_stuff.ml → src/hu_stuff.mli_gl.ml → src/i_gl.mli_sound.ml → src/i_sound.mli_system.ml → src/i_system.mli_video.ml → src/i_video.mlm_argv.ml → src/m_argv.mlm_menu.ml → src/m_menu.mlm_misc.ml → src/m_misc.mlmp_platform.ml → src/mp_platform.mlp_setup.ml → src/p_setup.mlr_gl.ml → src/r_gl.mlr_hires.ml → src/r_hires.mlr_local.ml → src/r_local.mlr_renderer.ml → src/r_renderer.mlr_upscaled.ml → src/r_upscaled.mls_sound.ml → src/s_sound.mlsounds.ml → src/sounds.mlst_stuff.ml → src/st_stuff.mlstd/fs.ml as fs → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/fs.ml external dependencystd/math.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/math.ml external dependencystd/time.ml → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/time.ml external dependencytables.ml → src/tables.mlv_video.ml → src/v_video.mlw_wad.ml → src/w_wad.mlwi_stuff.ml → src/wi_stuff.mlz_zone.ml → src/z_zone.mlinline function _D_AddDemoLmpFromArgs(flag)Adds demo lump from args entries to the Doom core.
| Parameter | Type | Default | Description |
|---|---|---|---|
flag | dynamic | — | Flag value supplied to `_D_AddDemoLmpFromArgs`. |
function _D_ArgValue(flag)Returns the string immediately following a command-line flag without consuming later options.
| Parameter | Type | Default | Description |
|---|---|---|---|
flag | dynamic | — | Flag value supplied to `_D_ArgValue`. |
function _D_AttachExistingAutoHDWAD()Adds an existing automatic HDWAD to the WAD list before the WAD system starts.
function _D_AutoHDWADShouldRun()Checks whether OpenGL should automatically use a generated HDWAD.
function _D_DigitAt(s, idx)Decodes one ASCII decimal digit at a checked string offset.
| Parameter | Type | Default | Description |
|---|---|---|---|
s | dynamic | — | S value supplied to `_D_DigitAt`. |
idx | dynamic | — | Zero-based element or table index. |
function _D_DrawMPDebugOverlay()Renders multiplayer debug telemetry text overlay when MP runtime is active.
inline function _D_FileReadable(path)Accepts only non-empty paths that currently resolve to regular files.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
function _D_GenerateHDWADCacheAfterInit()Initializes generate HDWADCache After Init state for the Doom core system.
function _D_GeomNameForMapName(mapName)Converts a map marker into its deterministic cached-geometry lump name.
| Parameter | Type | Default | Description |
|---|---|---|---|
mapName | dynamic | — | Map name value supplied to `_D_GeomNameForMapName`. |
_d_hdwad_progress_doneTracks the mutable d hdwad progress done value used by the d main subsystem.
_d_hdwad_progress_last_draw_msTracks the mutable d hdwad progress last draw ms value used by the d main subsystem.
_d_hdwad_progress_phase_baseTracks the mutable d hdwad progress phase base value used by the d main subsystem.
_d_hdwad_progress_phase_doneTracks the mutable d hdwad progress phase done value used by the d main subsystem.
_d_hdwad_progress_phase_expectedTracks the mutable d hdwad progress phase expected value used by the d main subsystem.
_d_hdwad_progress_phase_spanTracks the mutable d hdwad progress phase span value used by the d main subsystem.
_d_hdwad_progress_start_msTracks the mutable d hdwad progress start ms value used by the d main subsystem.
_d_hdwad_progress_totalTracks the mutable d hdwad progress total value used by the d main subsystem.
_d_hdwad_status_textStores the mutable d hdwad status text text used by the d main subsystem.
function _D_HDWADDrawLoadingScreen(text)Presents TITLEPIC with centered Doom-font HDWAD progress text.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to process. |
function _D_HDWADDrawText(text, y)Draws centered loading text with Doom STCFN font patches.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to process. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
function _D_HDWADDurationText(ms)Formats a millisecond duration for the HDWAD loading progress line.
| Parameter | Type | Default | Description |
|---|---|---|---|
ms | dynamic | — | Ms value supplied to `_D_HDWADDurationText`. |
function _D_HDWADFinishProgressPhase()Completes the current weighted HDWAD generation phase.
function _D_HDWADFontLump(code)Builds the STCFN lump name used for HDWAD loading text.
| Parameter | Type | Default | Description |
|---|---|---|---|
code | dynamic | — | Code value supplied to `_D_HDWADFontLump`. |
function _D_HDWADLooksComplete(path)Validates that an HDWAD contains metadata and generated geometry required for reuse.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
inline function _D_HDWADPatchWidth(patch)Reads a Doom patch width without depending on renderer init.
| Parameter | Type | Default | Description |
|---|---|---|---|
patch | dynamic | — | Patch value supplied to `_D_HDWADPatchWidth`. |
function _D_HDWADPathForWad(wad)Derives the automatic HD rendering-cache sidecar path for a gameplay WAD.
| Parameter | Type | Default | Description |
|---|---|---|---|
wad | dynamic | — | Wad value supplied to `_D_HDWADPathForWad`. |
function _D_HDWADProgressLine()Builds the second HDWAD loading line with percent and remaining time.
function _D_HDWADProgressReset()Clears HDWAD loading progress state.
function _D_HDWADScaleFromArgs()Parses and clamps the requested offline HDWAD upscale factor.
function _D_HDWADSetProgressPhase(text, basePct, spanPct, expectedUnits)Starts a weighted HDWAD generation phase.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to process. |
basePct | dynamic | — | Base pct value supplied to `_D_HDWADSetProgressPhase`. |
spanPct | dynamic | — | Span pct value supplied to `_D_HDWADSetProgressPhase`. |
expectedUnits | dynamic | — | Expected units value supplied to `_D_HDWADSetProgressPhase`. |
function _D_HDWADStatus(text)Shows the current HDWAD generation phase in the application title.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to process. |
inline function _D_HDWADTextByte(c)Normalizes one byte for the HDWAD loading font.
| Parameter | Type | Default | Description |
|---|---|---|---|
c | dynamic | — | C value supplied to `_D_HDWADTextByte`. |
function _D_HDWADTextWidth(text)Measures loading text using Doom STCFN font patches.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to process. |
inline function _D_IDiv(a, b)Returns a quotient truncated toward zero, mapping non-integers and division by zero to zero.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
function _D_InitEventQueue()Clears the fixed-size input event ring and resets both producer and consumer cursors.
function _D_IsMapMarkerName(name)Recognizes canonical MAPxx and ExMy lump markers with decimal digit validation.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Resource or object name to resolve. |
inline function _D_IsResponseTokenByte(c)Accepts the non-whitespace printable byte range used while tokenizing response files.
| Parameter | Type | Default | Description |
|---|---|---|---|
c | dynamic | — | C value supplied to `_D_IsResponseTokenByte`. |
function _D_IsWadPath(path)Recognizes case-insensitive .wad filenames before deriving an adjacent HDWAD cache path.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
function _D_MapNameFor(episode, map)Formats an episode/map pair using the active IWAD naming convention.
| Parameter | Type | Default | Description |
|---|---|---|---|
episode | dynamic | — | Episode value supplied to `_D_MapNameFor`. |
map | dynamic | — | Map value supplied to `_D_MapNameFor`. |
function _D_MapPairsFromLumps(lumps)Discovers playable episode/map pairs from loaded WAD marker lumps.
| Parameter | Type | Default | Description |
|---|---|---|---|
lumps | dynamic | — | Lumps value supplied to `_D_MapPairsFromLumps`. |
function _D_NameInList(names, name)Tests ASCII map/lump membership without allocating a secondary lookup table.
| Parameter | Type | Default | Description |
|---|---|---|---|
names | dynamic | — | Names value supplied to `_D_NameInList`. |
name | dynamic | — | Resource or object name to resolve. |
function _D_ParseResponseArgs(data)Parses parse Response Args input into Doom core runtime data.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Binary or structured data to process. |
function _D_ParseWadFilesFromArgs()Parses parse Wad Files From Args input into Doom core runtime data.
_d_prof_am_msTracks the mutable d prof am ms value used by the d main subsystem.
_d_prof_frame_histStores the d prof frame hist collection used by the d main subsystem.
_d_prof_frame_max_usTracks the mutable d prof frame max us value used by the d main subsystem.
_d_prof_frame_samplesTracks the mutable d prof frame samples value used by the d main subsystem.
_d_prof_framesTracks the mutable d prof frames value used by the d main subsystem.
_d_prof_gl_boundary_msTracks the mutable d prof gl boundary ms value used by the d main subsystem.
_d_prof_gl_cache_msTracks the mutable d prof gl cache ms value used by the d main subsystem.
_d_prof_gl_depth_msTracks the mutable d prof gl depth ms value used by the d main subsystem.
_d_prof_gl_dyn_msTracks the mutable d prof gl dyn ms value used by the d main subsystem.
_d_prof_gl_flat_batchesTracks the mutable d prof gl flat batches value used by the d main subsystem.
_d_prof_gl_flat_drawnTracks the mutable d prof gl flat drawn value used by the d main subsystem.
_d_prof_gl_flat_verticesTracks the mutable d prof gl flat vertices value used by the d main subsystem.
_d_prof_gl_flats_msTracks the mutable d prof gl flats ms value used by the d main subsystem.
_d_prof_gl_light_msTracks the mutable d prof gl light ms value used by the d main subsystem.
_d_prof_gl_masked_msTracks the mutable d prof gl masked ms value used by the d main subsystem.
_d_prof_gl_sky_msTracks the mutable d prof gl sky ms value used by the d main subsystem.
_d_prof_gl_sprites_msTracks the mutable d prof gl sprites ms value used by the d main subsystem.
_d_prof_gl_wall_batchesTracks the mutable d prof gl wall batches value used by the d main subsystem.
_d_prof_gl_wall_drawnTracks the mutable d prof gl wall drawn value used by the d main subsystem.
_d_prof_gl_wall_verticesTracks the mutable d prof gl wall vertices value used by the d main subsystem.
_d_prof_gl_walls_msTracks the mutable d prof gl walls ms value used by the d main subsystem.
_d_prof_gl_weapon_msTracks the mutable d prof gl weapon ms value used by the d main subsystem.
_d_prof_hu_msTracks the mutable d prof hu ms value used by the d main subsystem.
_d_prof_last_frame_usTracks the mutable d prof last frame us value used by the d main subsystem.
_d_prof_mobj_thinkersTracks the mutable d prof mobj thinkers value used by the d main subsystem.
_d_prof_other_msTracks the mutable d prof other ms value used by the d main subsystem.
_d_prof_player_msTracks the mutable d prof player ms value used by the d main subsystem.
_d_prof_r_msTracks the mutable d prof r ms value used by the d main subsystem.
_d_prof_special_msTracks the mutable d prof special ms value used by the d main subsystem.
_d_prof_st_msTracks the mutable d prof st ms value used by the d main subsystem.
_d_prof_t0Tracks the mutable d prof t0 value used by the d main subsystem.
_d_prof_thinker_msTracks the mutable d prof thinker ms value used by the d main subsystem.
_d_prof_thinkersTracks the mutable d prof thinkers value used by the d main subsystem.
_d_prof_tick_msTracks the mutable d prof tick ms value used by the d main subsystem.
_d_prof_ticsTracks the mutable d prof tics value used by the d main subsystem.
_d_prof_vid_msTracks the mutable d prof vid ms value used by the d main subsystem.
_d_profile_renderTracks whether d profile render is active in the d main subsystem.
function _D_ProfileAdd(slot, delta)Adds one measured duration to its renderer/gameplay profiling bucket when profiling is enabled.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | Slot value supplied to `_D_ProfileAdd`. |
delta | dynamic | — | Delta value supplied to `_D_ProfileAdd`. |
function _D_ProfileFlushMaybe()Flushes one-second profiling aggregates and resets their counters after the interval elapsed.
function _D_ProfileFrameSample(deltaUs)Adds one complete frame duration to a compact millisecond histogram.
| Parameter | Type | Default | Description |
|---|---|---|---|
deltaUs | dynamic | — | Delta us value supplied to `_D_ProfileFrameSample`. |
function _D_ProfileGameTick()Counts one executed game tic for runtime profiling.
function _D_ProfileGLAdd(slot, delta)Accumulates fine-grained OpenGL renderer timings for the profile log.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | Slot value supplied to `_D_ProfileGLAdd`. |
delta | dynamic | — | Delta value supplied to `_D_ProfileGLAdd`. |
function _D_ProfileGLBatches(kind, total, drawn, vertices)Accumulates OpenGL batch visibility counts for renderer profiling.
| Parameter | Type | Default | Description |
|---|---|---|---|
kind | dynamic | — | Kind value supplied to `_D_ProfileGLBatches`. |
total | dynamic | — | Total value supplied to `_D_ProfileGLBatches`. |
drawn | dynamic | — | Drawn value supplied to `_D_ProfileGLBatches`. |
vertices | dynamic | — | Vertices value supplied to `_D_ProfileGLBatches`. |
function _D_ProfileLog(line)Writes profiler output to stdout and to a log file for windows-subsystem builds.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
inline function _D_ProfileMs(us)Converts accumulated microseconds to whole milliseconds for compact profile output.
| Parameter | Type | Default | Description |
|---|---|---|---|
us | dynamic | — | Us value supplied to `_D_ProfileMs`. |
function _D_ProfilePercentileMs(percent)Reads a percentile from the current frame histogram.
| Parameter | Type | Default | Description |
|---|---|---|---|
percent | dynamic | — | Percent value supplied to `_D_ProfilePercentileMs`. |
function _D_ProfileThinker(isMobj)Counts thinker execution and separates mobj thinkers for gameplay profiling.
| Parameter | Type | Default | Description |
|---|---|---|---|
isMobj | dynamic | — | Whether is mobj holds. |
inline function _D_ProfileTimeUs()Reads a high-resolution monotonic timestamp without changing game timing.
function _D_ReadHDWADImageNames(path)Reads HDWAD image names from the high-resolution image directory.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
function _D_ReadHDWADLumpNames(path)Validates an HDWAD v6 directory and extracts its eight-byte lump-name table.
| Parameter | Type | Default | Description |
|---|---|---|---|
path | dynamic | — | Filesystem path to process. |
inline function _D_StatusBarVisible()Determines classic status-bar visibility without comparing a scaled HD view height to logical screen dimensions.
function _D_StrContains(haystack, needle)Performs a bytewise substring search used while classifying command-line paths.
| Parameter | Type | Default | Description |
|---|---|---|---|
haystack | dynamic | — | Haystack value supplied to `_D_StrContains`. |
needle | dynamic | — | Needle value supplied to `_D_StrContains`. |
inline function _D_TimeMs()Returns the monotonic runtime clock used by loading and profiling telemetry.
function _D_ToLowerAscii(s)Converts lower ASCII values for the Doom core.
| Parameter | Type | Default | Description |
|---|---|---|---|
s | dynamic | — | S value supplied to `_D_ToLowerAscii`. |
advancedemoTracks whether advancedemo is active in the d main subsystem.
function D_AddFile(file)Adds file entries to the Doom core.
| Parameter | Type | Default | Description |
|---|---|---|---|
file | dynamic | — | File value supplied to `D_AddFile`. |
function D_AdvanceDemo()Defers a title/demo sequence advance until the main loop reaches a safe game-action boundary.
function D_Display()Composes one frame, including wipes, view/HUD layers, palette updates, and profiling.
function D_DoAdvanceDemo()Rotates through title pages and built-in demos, selecting mission-specific page durations and music.
function D_DoomLoop()Runs the permanent event/tic/render loop with capped or interpolated presentation scheduling.
function D_DoomMain()Runs the main Doom core entry point.
d_force_wipeTracks whether d force wipe is active in the d main subsystem.
function D_ForceWipe()Forces the next display pass to run a full screen-wipe transition.
function D_HDWADProgressStep(units)Advances the visible HDWAD generation progress from builder callbacks.
| Parameter | Type | Default | Description |
|---|---|---|---|
units | dynamic | — | Units value supplied to `D_HDWADProgressStep`. |
function D_PageDrawer()Draws the current title/demo page or clears the framebuffer when its lump is unavailable.
function D_PageTicker()Counts down the current title/help page and queues the next demo-sequence entry on expiry.
function D_PostEvent(ev)Enqueues one input event in the bounded power-of-two responder ring.
| Parameter | Type | Default | Description |
|---|---|---|---|
ev | dynamic | — | Input event to process. |
function D_ProcessEvents()Dispatches queued input through menu then gameplay responders in deterministic order.
const D_PROFILE_LOG_PATH = "minidoom_profile.log"Defines the d profile log path text used by the d main subsystem.
function D_StartTitle()Resets game actions to the title demo screen and restarts the attract-mode sequence.
demosequenceTracks the mutable demosequence value used by the d main subsystem.
eventheadTracks the mutable eventhead value used by the d main subsystem.
eventsHolds the optional events resource used by the d main subsystem.
eventtailTracks the mutable eventtail value used by the d main subsystem.
function FindResponseFile()Computes response file values for the Doom core.
function IdentifyVersion()Selects the IWAD, game mode, language, and mission family before resource initialization.
const MAXWADFILES = 20Defines the maximum maxwadfiles accepted by the d main subsystem.
pagenameStores the mutable pagename text used by the d main subsystem.
pageticTracks the mutable pagetic value used by the d main subsystem.
wadfilesStores the wadfiles collection used by the d main subsystem.