# _BuildMenus
function _BuildMenus()Constructs every static menu definition and wires its items to draw and activation callbacks.
src/m_menu.mlImplements Doom menus plus shared interactive/CLI multiplayer session startup.
d_event.ml → src/d_event.mld_main.ml → src/d_main.mldoomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mldstrings.ml → src/dstrings.mlg_game.ml → src/g_game.mlhu_stuff.ml → src/hu_stuff.mli_system.ml → src/i_system.mli_video.ml → src/i_video.mlm_argv.ml → src/m_argv.mlm_swap.ml → src/m_swap.mlmp_platform.ml → src/mp_platform.mlmp_state.ml → src/mp_state.mlr_local.ml → src/r_local.mlr_renderer.ml → src/r_renderer.mls_sound.ml → src/s_sound.mlsounds.ml → src/sounds.mlstd/fs.ml as fs → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/fs.ml external dependencyv_video.ml → src/v_video.mlw_wad.ml → src/w_wad.mlz_zone.ml → src/z_zone.mlfunction _BuildMenus()Constructs every static menu definition and wires its items to draw and activation callbacks.
inline function _bytesOf(x)Normalizes patch/text inputs to a byte sequence for legacy menu helpers.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
function _cstrClear(buf)Clears cstr Clear state before the next menu update.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_cstrClear`. |
function _cstrCopy(dst, src)Copies one bounded zero-terminated edit buffer without leaking stale suffix bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
dst | dynamic | — | Dst value supplied to `_cstrCopy`. |
src | dynamic | — | Src value supplied to `_cstrCopy`. |
inline function _cstrEqString(buf, s)Compares a zero-terminated menu buffer with an immutable string value.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_cstrEqString`. |
s | dynamic | — | S value supplied to `_cstrEqString`. |
function _cstrFromString(buf, s)Copies a MiniLang string into a bounded zero-terminated menu edit buffer.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_cstrFromString`. |
s | dynamic | — | S value supplied to `_cstrFromString`. |
function _cstrLen(buf)Counts bytes up to the first terminator in a fixed-size editable C string.
| Parameter | Type | Default | Description |
|---|---|---|---|
buf | dynamic | — | Buf value supplied to `_cstrLen`. |
function _fmt1(fmt, arg)Formats one integer as a single printable decimal character for save/menu labels.
| Parameter | Type | Default | Description |
|---|---|---|---|
fmt | dynamic | — | Fmt value supplied to `_fmt1`. |
arg | dynamic | — | Arg value supplied to `_fmt1`. |
_joywaitTracks the mutable joywait value used by the m menu subsystem.
_lastxTracks the mutable lastx value used by the m menu subsystem.
_lastyTracks the mutable lasty value used by the m menu subsystem.
inline function _Menu(numitems, prevMenu, menuitems, routine, x, y, lastOn)Constructs one menu_t and records its initial cursor position.
| Parameter | Type | Default | Description |
|---|---|---|---|
numitems | dynamic | — | Numitems value supplied to `_Menu`. |
prevMenu | dynamic | — | Prev menu value supplied to `_Menu`. |
menuitems | dynamic | — | Menuitems value supplied to `_Menu`. |
routine | dynamic | — | Routine value supplied to `_Menu`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
lastOn | dynamic | — | Last on value supplied to `_Menu`. |
inline function _MI(status, name, routine, alphaKey)Constructs one menuitem_t while keeping table declarations concise.
| Parameter | Type | Default | Description |
|---|---|---|---|
status | dynamic | — | Status value supplied to `_MI`. |
name | dynamic | — | Resource or object name to resolve. |
routine | dynamic | — | Routine value supplied to `_MI`. |
alphaKey | dynamic | — | Alpha key value supplied to `_MI`. |
inline function _min(a, b)Returns the lower of two menu-layout coordinates.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _MMENU_ArgValue(flag)Returns the argument following a named CLI flag, or an empty string when absent/incomplete.
| Parameter | Type | Default | Description |
|---|---|---|---|
flag | dynamic | — | Flag value supplied to `_MMENU_ArgValue`. |
inline function _MMENU_BuildMainMenu()Creates the main menu item array including multiplayer entry.
inline function _MMENU_BuildMPHostMenu()Creates host setup menu item array.
inline function _MMENU_BuildMPJoinMenu()Creates join setup menu item array.
inline function _MMENU_BuildMPNameMenu()Creates player-name editor menu item array.
inline function _MMENU_BuildMultiplayerMenu()Creates the multiplayer root menu item array.
function _MMENU_ClampCursor()Keeps the selected row inside the current menu and advances past disabled entries.
function _MMENU_ClampInt(v, lo, hi)Clamps integer values for multiplayer setup fields.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
lo | dynamic | — | Inclusive lower bound. |
hi | dynamic | — | Inclusive upper bound. |
function _MMENU_DrawPatchScale2(x, y, scrn, patch)Draws a Doom patch scaled to 2x into the destination screen.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
scrn | dynamic | — | Scrn value supplied to `_MMENU_DrawPatchScale2`. |
patch | dynamic | — | Patch value supplied to `_MMENU_DrawPatchScale2`. |
function _MMENU_FontLumpName(code)Builds the STCFN lump name for one HUD/menu font character.
| Parameter | Type | Default | Description |
|---|---|---|---|
code | dynamic | — | Code value supplied to `_MMENU_FontLumpName`. |
function _MMENU_HandleMPJoinHostEditKey(ch)Handles key input while multiplayer join-host editor is active.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `_MMENU_HandleMPJoinHostEditKey`. |
function _MMENU_HandleMPNameEditKey(ch)Handles key input while multiplayer player-name editor is active.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `_MMENU_HandleMPNameEditKey`. |
inline function _MMENU_IDiv(a, b)Truncates menu layout quotients toward zero and safely maps a zero divisor to zero.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
inline function _MMENU_ItemCount(menu)Reads a non-negative item count from a possibly uninitialized menu definition.
| Parameter | Type | Default | Description |
|---|---|---|---|
menu | dynamic | — | Menu value supplied to `_MMENU_ItemCount`. |
_mmenu_mp_log_pathStores the mutable mmenu mp log path text used by the m menu subsystem.
function _MMENU_MPCLIInt(flag, fallback, lo, hi)Parses one bounded numeric multiplayer option and returns [valid,value].
| Parameter | Type | Default | Description |
|---|---|---|---|
flag | dynamic | — | Flag value supplied to `_MMENU_MPCLIInt`. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
lo | dynamic | — | Inclusive lower bound. |
hi | dynamic | — | Inclusive upper bound. |
function _MMENU_MPCLIReportFailure(role, reason)Emits a machine-readable startup failure while retaining the human-readable platform reason.
| Parameter | Type | Default | Description |
|---|---|---|---|
role | dynamic | — | Role value supplied to `_MMENU_MPCLIReportFailure`. |
reason | dynamic | — | Reason value supplied to `_MMENU_MPCLIReportFailure`. |
function _MMENU_MPFailureCode(reason)Maps platform error text to compact failure categories used by CLI orchestration.
| Parameter | Type | Default | Description |
|---|---|---|---|
reason | dynamic | — | Reason value supplied to `_MMENU_MPFailureCode`. |
function _MMENU_MPIsNumericIPv4(host)Validates the numerical dotted-quad form supported by the WinSock transport parser.
| Parameter | Type | Default | Description |
|---|---|---|---|
host | dynamic | — | Host value supplied to `_MMENU_MPIsNumericIPv4`. |
inline function _MMENU_MPLimitText(v)Formats deathmatch limits, including unlimited mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
inline function _MMENU_MPModeName(mode)Returns localized text for multiplayer mode value.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode value supplied to `_MMENU_MPModeName`. |
inline function _MMENU_MPSkillName(skill)Returns UI text for host-selected skill level.
| Parameter | Type | Default | Description |
|---|---|---|---|
skill | dynamic | — | Skill value supplied to `_MMENU_MPSkillName`. |
function _MMENU_MPStartHostConfigured(interactive)Starts a host from normalized shared settings and reports either menu or CLI diagnostics.
| Parameter | Type | Default | Description |
|---|---|---|---|
interactive | dynamic | — | Interactive value supplied to `_MMENU_MPStartHostConfigured`. |
function _MMENU_MPStartJoinConfigured(interactive)Joins the configured endpoint and boots the server-confirmed map/slot on success.
| Parameter | Type | Default | Description |
|---|---|---|---|
interactive | dynamic | — | Interactive value supplied to `_MMENU_MPStartJoinConfigured`. |
function _MMENU_MPStatus(line)Emits one stable automation status line to stdout and an optional per-process log file.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
function _MMENU_ParseMapToken(mapToken)Parses MAPxx or ExMy map token and returns [episode,map].
| Parameter | Type | Default | Description |
|---|---|---|---|
mapToken | dynamic | — | Map token value supplied to `_MMENU_ParseMapToken`. |
function _MMENU_ParseUnsignedTail(s0, startIdx)Parses a positive integer from a string tail, returning -1 on failure.
| Parameter | Type | Default | Description |
|---|---|---|---|
s0 | dynamic | — | S0 value supplied to `_MMENU_ParseUnsignedTail`. |
startIdx | dynamic | — | Start idx value supplied to `_MMENU_ParseUnsignedTail`. |
inline function _MMENU_RequestStatusBarRefresh()Forces one full status bar redraw after menu overlays are closed.
function _MMENU_RevealLogicalMenuText(x, y, string)Keeps startup/title-screen high-res patch overlays from covering generated menu text.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
string | dynamic | — | String value supplied to `_MMENU_RevealLogicalMenuText`. |
function _MMENU_StartMultiplayerGame(mode, skill, mapToken, localSlot)Starts local game session immediately using current MP session settings.
| Parameter | Type | Default | Description |
|---|---|---|---|
mode | dynamic | — | Mode value supplied to `_MMENU_StartMultiplayerGame`. |
skill | dynamic | — | Skill value supplied to `_MMENU_StartMultiplayerGame`. |
mapToken | dynamic | — | Map token value supplied to `_MMENU_StartMultiplayerGame`. |
localSlot | dynamic | — | Local slot value supplied to `_MMENU_StartMultiplayerGame`. |
function _MMENU_StringWidthMenuSized(string)Returns text width in pixels for 2x multiplayer menu font rendering.
| Parameter | Type | Default | Description |
|---|---|---|---|
string | dynamic | — | String value supplied to `_MMENU_StringWidthMenuSized`. |
function _MMENU_SyncMPBuffers()Synchronizes editable menu buffers with multiplayer settings.
function _MMENU_ToInt(v, fallback)Converts values to integers with fallback handling.
| Parameter | Type | Default | Description |
|---|---|---|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
function _MMENU_ToUpperAsciiString(s0)Converts a string to uppercase for ASCII letters.
| Parameter | Type | Default | Description |
|---|---|---|---|
s0 | dynamic | — | S0 value supplied to `_MMENU_ToUpperAsciiString`. |
function _MMENU_WriteMenuSizedOrText(x, y, string)Draws custom menu labels and falls back to the normal menu font if needed.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
string | dynamic | — | String value supplied to `_MMENU_WriteMenuSizedOrText`. |
function _MMENU_WriteTextMenuSized(x, y, string)Draws highlighted menu text for multiplayer entries with menu-like visual weight.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
string | dynamic | — | String value supplied to `_MMENU_WriteTextMenuSized`. |
_mousewaitTracks the mutable mousewait value used by the m menu subsystem.
_mousex_accTracks the mutable mousex acc value used by the m menu subsystem.
_mousey_accTracks the mutable mousey acc value used by the m menu subsystem.
inline function _patchHeight(patch)Reads a cached patch height without assuming the resource decoded successfully.
| Parameter | Type | Default | Description |
|---|---|---|---|
patch | dynamic | — | Patch value supplied to `_patchHeight`. |
inline function _patchWidth(patch)Reads a cached patch width without assuming the resource decoded successfully.
| Parameter | Type | Default | Description |
|---|---|---|---|
patch | dynamic | — | Patch value supplied to `_patchWidth`. |
inline function _toupperByte(c)Converts toupper Byte text to the required case for menu lookups.
| Parameter | Type | Default | Description |
|---|---|---|---|
c | dynamic | — | C value supplied to `_toupperByte`. |
const brightness = 5Defines brightness for the m menu subsystem.
const CH_N = 110Defines ch n for the m menu subsystem.
const CH_SPACE = 32Defines ch space for the m menu subsystem.
const CH_Y = 121Defines ch y for the m menu subsystem.
currentMenuTracks the mutable current menu value used by the m menu subsystem.
const detail = 2Defines detail for the m menu subsystem.
detailLevelTracks the mutable detail level value used by the m menu subsystem.
detailNamesStores the detail names collection used by the m menu subsystem.
const endgame = 0Defines endgame for the m menu subsystem.
endstringStores the mutable endstring text used by the m menu subsystem.
const ep1 = 0Defines ep1 for the m menu subsystem.
const ep2 = 1Defines ep2 for the m menu subsystem.
const ep3 = 2Defines ep3 for the m menu subsystem.
const ep4 = 3Defines ep4 for the m menu subsystem.
const ep_end = 4Defines ep end for the m menu subsystem.
epiTracks the mutable epi value used by the m menu subsystem.
EpiDefTracks the mutable epi def value used by the m menu subsystem.
EpisodeMenuTracks the mutable episode menu value used by the m menu subsystem.
gammamsgStores the gammamsg collection used by the m menu subsystem.
const hurtme = 2Defines hurtme for the m menu subsystem.
inhelpscreensTracks whether inhelpscreens is active in the m menu subsystem.
itemOnTracks the mutable item on value used by the m menu subsystem.
const killthings = 0Defines killthings for the m menu subsystem.
const LINEHEIGHT = 16Defines lineheight for the m menu subsystem.
const load_end = 6Defines load end for the m menu subsystem.
LoadDefTracks the mutable load def value used by the m menu subsystem.
LoadMenuTracks the mutable load menu value used by the m menu subsystem.
function M_ChangeBrightness(choice)Adjusts gamma-based brightness level from options menu.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ChangeBrightness`. |
function M_ChangeDetail(choice)Selects the supported high-detail renderer mode and posts its localized HUD message.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ChangeDetail`. |
function M_ChangeMessages(choice)Toggles gameplay messages, posts the localized result, and protects it from immediate replacement.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ChangeMessages`. |
function M_ChangeSensitivity(choice)Adjusts mouse sensitivity by one step within the persisted 0..9 range.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ChangeSensitivity`. |
function M_ChooseSkill(choice)Requests nightmare confirmation or queues a new game at the chosen difficulty.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ChooseSkill`. |
function M_ClearMenus()Closes menu and multiplayer text editors, requesting a status-bar refresh when needed.
function M_DoSave(slot)Saves do Save state for the menu system.
| Parameter | Type | Default | Description |
|---|---|---|---|
slot | dynamic | — | Slot value supplied to `M_DoSave`. |
function M_DrawEmptyCell(menu, item)Draws the left/right save-slot border for an unselected cell.
| Parameter | Type | Default | Description |
|---|---|---|---|
menu | dynamic | — | Menu value supplied to `M_DrawEmptyCell`. |
item | dynamic | — | Item value supplied to `M_DrawEmptyCell`. |
function M_DrawEpisode()Draws the episode-selection title above the available IWAD episodes.
function M_Drawer()Draws the active menu page, modal message, and animated selection skull.
function M_DrawLoad()Renders the load-game heading, slot borders, and cached descriptions for every save row.
function M_DrawMainMenu()Draws the title patch and custom multiplayer row for the root menu.
function M_DrawMPHostMenu()Draws host setup values for multiplayer dedicated server start.
function M_DrawMPJoinMenu()Draws join setup values and live host/name text editors.
function M_DrawMPNameMenu()Draws player name editor with caret during text entry.
function M_DrawMultiplayerMenu()Draws the multiplayer root menu.
function M_DrawNewGame()Draws the skill-selection menu title and vanilla skill rows.
function M_DrawOptions()Draws the options page plus sensitivity and screen-size thermometers.
function M_DrawReadThis1()Draws the first help page selected for commercial versus episodic game data.
function M_DrawReadThis2()Draws the credit or second help page appropriate to the active game edition.
function M_DrawSave()Saves draw Save state for the menu system.
function M_DrawSaveLoadBorder(x, y)Tiles the left, center, and right patches forming one 24-character save-slot frame.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
function M_DrawSelCell(menu, item)Draws the selected save-slot border variant at a menu row.
| Parameter | Type | Default | Description |
|---|---|---|---|
menu | dynamic | — | Menu value supplied to `M_DrawSelCell`. |
item | dynamic | — | Item value supplied to `M_DrawSelCell`. |
function M_DrawSound()Draws the sound-options patch and both volume thermometers.
function M_DrawThermo(x, y, thermWidth, thermDot)Draws a patch-based horizontal slider with a checked marker position.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
thermWidth | dynamic | — | Width of therm width in pixels or map units. |
thermDot | dynamic | — | Therm dot value supplied to `M_DrawThermo`. |
function M_EndGame(choice)Controls end Game transitions in the menu system.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_EndGame`. |
function M_EndGameResponse(ch)Controls end Game Response transitions in the menu system.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `M_EndGameResponse`. |
function M_Episode(choice)Validates shareware episode access and opens the skill selector for the chosen episode.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_Episode`. |
function M_FinishReadThis(choice)Returns from the last help page to the main menu.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_FinishReadThis`. |
function M_Init()Constructs menu definitions and edit buffers, restores defaults, and seeds cursor/animation state.
function M_LoadGame(choice)Rejects loads during netgames or opens the refreshed load-slot menu in offline play.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_LoadGame`. |
function M_LoadSelect(choice)Queues the selected slot's per-WAD save file for loading and closes the menu.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_LoadSelect`. |
function M_MPHostFragLimit(choice)Adjusts deathmatch frag limit (0 means unlimited).
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostFragLimit`. |
function M_MPHostMap(choice)Cycles host-selected map through detected WAD map list.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostMap`. |
function M_MPHostMenuOpen(choice)Opens host setup menu and refreshes map/options state.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostMenuOpen`. |
function M_MPHostMode(choice)Toggles host game mode between cooperative and deathmatch.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostMode`. |
function M_MPHostPlayers(choice)Adjusts host maximum players within protocol bounds.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostPlayers`. |
function M_MPHostPort(choice)Adjusts dedicated server listen port.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostPort`. |
function M_MPHostSkill(choice)Adjusts host-selected skill level.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostSkill`. |
function M_MPHostStart(choice)Starts the menu-configured host and keeps startup errors inside the menu flow.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostStart`. |
function M_MPHostTimeLimit(choice)Adjusts deathmatch time limit in minutes (0 means unlimited).
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPHostTimeLimit`. |
function M_MPJoinEditHost(choice)Enters text edit mode for join target host string.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPJoinEditHost`. |
function M_MPJoinMenuOpen(choice)Opens join setup menu and refreshes editable host values.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPJoinMenuOpen`. |
function M_MPJoinPort(choice)Adjusts join target UDP port.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPJoinPort`. |
function M_MPJoinStart(choice)Starts the menu-configured join handshake and surfaces rejection details interactively.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPJoinStart`. |
function M_MPNameDone(choice)Applies name changes and closes player-name editor menu.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPNameDone`. |
function M_MPNameEdit(choice)Enters text edit mode for multiplayer player name.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPNameEdit`. |
function M_MPNameMenuOpen(choice)Opens player-name editor menu.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MPNameMenuOpen`. |
function M_MPStartFromCommandLine()Applies documented host/join CLI options and invokes the same production startup used by menus. Returns: 0 when no MP role was requested, 1 after success, -1 after a requested startup failed.
function M_Multiplayer(choice)Opens the multiplayer root menu.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_Multiplayer`. |
function M_MusicVol(choice)Adjusts the music mixer volume and applies it immediately.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_MusicVol`. |
function M_NewGame(choice)Rejects active netgames or routes new-game selection to episode/skill menus for this IWAD.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_NewGame`. |
function M_Options(choice)Opens the options submenu at its remembered selection.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_Options`. |
function M_QuickLoad()Validates quick-load availability and opens the confirmation prompt for its remembered slot.
function M_QuickLoadResponse(ch)Executes the remembered quick-load slot only after an affirmative confirmation key.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `M_QuickLoadResponse`. |
function M_QuickSave()Saves quick Save state for the menu system.
function M_QuickSaveResponse(ch)Saves quick Save Response state for the menu system.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `M_QuickSaveResponse`. |
function M_QuitDOOM(choice)Selects a localized randomized quit message and opens its confirmation prompt.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_QuitDOOM`. |
function M_QuitResponse(ch)Accepts the quit confirmation, plays the edition-specific exit cue, and terminates the process.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `M_QuitResponse`. |
function M_ReadSaveStrings()Scans each per-WAD save slot, copies its fixed title, and enables only readable load-menu rows.
function M_ReadThis(choice)Opens the first help/read-this menu page.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ReadThis`. |
function M_ReadThis2(choice)Advances from the first help page to the second page.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_ReadThis2`. |
function M_Responder(ev)Routes modal/editor/navigation keys and invokes the selected menu item's callback.
| Parameter | Type | Default | Description |
|---|---|---|---|
ev | dynamic | — | Input event to process. |
function M_SaveGame(choice)Rejects invalid save contexts or opens the refreshed save-slot menu for a live level.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_SaveGame`. |
function M_SaveSelect(choice)Opens text editing for the selected save row while preserving its prior description for cancel.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_SaveSelect`. |
function M_SetupNextMenu(menudef)Switches menu definition, restores its remembered cursor, and exits active text editors.
| Parameter | Type | Default | Description |
|---|---|---|---|
menudef | dynamic | — | Menudef value supplied to `M_SetupNextMenu`. |
function M_SfxVol(choice)Adjusts the effects mixer volume and applies it immediately.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_SfxVol`. |
function M_SizeDisplay(choice)Changes screen-block size within renderer bounds and schedules a view resize.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_SizeDisplay`. |
function M_Sound(choice)Opens the sound submenu at its previously selected row.
| Parameter | Type | Default | Description |
|---|---|---|---|
choice | dynamic | — | Choice value supplied to `M_Sound`. |
function M_StartControlPanel()Opens the main menu at its remembered row and clamps the cursor to enabled items.
function M_StartMessage(string, routine, input)Replaces the current menu with a modal prompt while remembering whether a menu was already open.
| Parameter | Type | Default | Description |
|---|---|---|---|
string | dynamic | — | String value supplied to `M_StartMessage`. |
routine | dynamic | — | Routine value supplied to `M_StartMessage`. |
input | dynamic | — | Input value supplied to `M_StartMessage`. |
function M_StopMessage()Dismisses the modal prompt and restores the menu-active state captured when it opened.
function M_StringHeight(string)Measures multiline menu text height using the active HU font metrics.
| Parameter | Type | Default | Description |
|---|---|---|---|
string | dynamic | — | String value supplied to `M_StringHeight`. |
function M_StringWidth(string)Measures proportional menu text width using loaded HU font patches.
| Parameter | Type | Default | Description |
|---|---|---|---|
string | dynamic | — | String value supplied to `M_StringWidth`. |
function M_Ticker()Pumps multiplayer handshakes and flips the selection skull every eight menu tics.
function M_VerifyNightmare(ch)Confirms or cancels nightmare difficulty before starting a new game.
| Parameter | Type | Default | Description |
|---|---|---|---|
ch | dynamic | — | Ch value supplied to `M_VerifyNightmare`. |
function M_WriteText(x, y, string)Draws patch-font glyphs with newline handling, unsupported-character spacing, and screen clipping.
| Parameter | Type | Default | Description |
|---|---|---|---|
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
string | dynamic | — | String value supplied to `M_WriteText`. |
const main_end = 7Defines main end for the m menu subsystem.
const main_loadgame = 3Defines main loadgame for the m menu subsystem.
const main_multiplayer = 1Defines main multiplayer for the m menu subsystem.
const main_newgame = 0Defines main newgame for the m menu subsystem.
const main_options = 2Defines main options for the m menu subsystem.
const main_quitdoom = 6Defines main quitdoom for the m menu subsystem.
const main_readthis = 5Defines main readthis for the m menu subsystem.
const main_savegame = 4Defines main savegame for the m menu subsystem.
MainDefTracks the mutable main def value used by the m menu subsystem.
MainMenuTracks the mutable main menu value used by the m menu subsystem.
menu_t struct
menuactiveTracks whether menuactive is active in the m menu subsystem.
menuitem_t struct
messageLastMenuActiveTracks whether message last menu active is active in the m menu subsystem.
messageNeedsInputTracks whether message needs input is active in the m menu subsystem.
messageRoutineTracks the mutable message routine value used by the m menu subsystem.
const messages = 1Defines messages for the m menu subsystem.
messageStringStores the mutable message string text used by the m menu subsystem.
messageToPrintTracks the mutable message to print value used by the m menu subsystem.
messxTracks the mutable messx value used by the m menu subsystem.
messyTracks the mutable messy value used by the m menu subsystem.
const mousesens = 7Defines mousesens for the m menu subsystem.
mouseSensitivityTracks the mutable mouse sensitivity value used by the m menu subsystem.
const mp_host_end = 8Defines mp host end for the m menu subsystem.
const mp_host_fraglimit = 4Defines mp host fraglimit for the m menu subsystem.
const mp_host_map = 1Defines mp host map for the m menu subsystem.
const mp_host_mode_item = 0Defines mp host mode item for the m menu subsystem.
const mp_host_players = 3Defines mp host players for the m menu subsystem.
const mp_host_port_item = 6Defines mp host port item for the m menu subsystem.
const mp_host_skill_item = 2Defines mp host skill item for the m menu subsystem.
const mp_host_start = 7Defines mp host start for the m menu subsystem.
const mp_host_timelimit = 5Defines mp host timelimit for the m menu subsystem.
const mp_join_end = 3Defines mp join end for the m menu subsystem.
const mp_join_host_item = 0Defines mp join host item for the m menu subsystem.
const mp_join_port_item = 1Defines mp join port item for the m menu subsystem.
const mp_join_start = 2Defines mp join start for the m menu subsystem.
const mp_main_end = 3Defines mp main end for the m menu subsystem.
const mp_main_host = 0Defines mp main host for the m menu subsystem.
const mp_main_join = 1Defines mp main join for the m menu subsystem.
const mp_main_name = 2Defines mp main name for the m menu subsystem.
const mp_name_done = 1Defines mp name done for the m menu subsystem.
const mp_name_edit = 0Defines mp name edit for the m menu subsystem.
const mp_name_end = 2Defines mp name end for the m menu subsystem.
MPHostDefTracks the mutable mphost def value used by the m menu subsystem.
MPHostMenuTracks the mutable mphost menu value used by the m menu subsystem.
MPJoinDefTracks the mutable mpjoin def value used by the m menu subsystem.
mpJoinHostBufTracks the mutable mp join host buf value used by the m menu subsystem.
mpJoinHostCharIndexTracks the mutable mp join host char index value used by the m menu subsystem.
mpJoinHostEnterTracks the mutable mp join host enter value used by the m menu subsystem.
mpJoinHostOldTracks the mutable mp join host old value used by the m menu subsystem.
MPJoinMenuTracks the mutable mpjoin menu value used by the m menu subsystem.
mpNameBufTracks the mutable mp name buf value used by the m menu subsystem.
mpNameCharIndexTracks the mutable mp name char index value used by the m menu subsystem.
MPNameDefTracks the mutable mpname def value used by the m menu subsystem.
mpNameEnterTracks the mutable mp name enter value used by the m menu subsystem.
MPNameMenuTracks the mutable mpname menu value used by the m menu subsystem.
mpNameOldTracks the mutable mp name old value used by the m menu subsystem.
msgNamesStores the msg names collection used by the m menu subsystem.
MultiplayerDefTracks the mutable multiplayer def value used by the m menu subsystem.
MultiplayerMenuTracks the mutable multiplayer menu value used by the m menu subsystem.
const music_vol = 2Defines music vol for the m menu subsystem.
NewDefTracks the mutable new def value used by the m menu subsystem.
const newg_end = 5Defines newg end for the m menu subsystem.
NewGameMenuTracks the mutable new game menu value used by the m menu subsystem.
const nightmare = 4Defines nightmare for the m menu subsystem.
const opt_end = 10Defines opt end for the m menu subsystem.
const option_empty1 = 4Defines option empty1 for the m menu subsystem.
const option_empty1b = 6Defines option empty1b for the m menu subsystem.
const option_empty2 = 8Defines option empty2 for the m menu subsystem.
OptionsDefTracks the mutable options def value used by the m menu subsystem.
OptionsMenuTracks the mutable options menu value used by the m menu subsystem.
quickSaveSlotTracks the mutable quick save slot value used by the m menu subsystem.
quitsoundsTracks the mutable quitsounds value used by the m menu subsystem.
quitsounds2Tracks the mutable quitsounds2 value used by the m menu subsystem.
const read1_end = 1Defines read1 end for the m menu subsystem.
const read2_end = 1Defines read2 end for the m menu subsystem.
ReadDef1Tracks the mutable read def1 value used by the m menu subsystem.
ReadDef2Tracks the mutable read def2 value used by the m menu subsystem.
ReadMenu1Tracks the mutable read menu1 value used by the m menu subsystem.
ReadMenu2Tracks the mutable read menu2 value used by the m menu subsystem.
saveCharIndexTracks the mutable save char index value used by the m menu subsystem.
SaveDefTracks the mutable save def value used by the m menu subsystem.
savegamestringsTracks the mutable savegamestrings value used by the m menu subsystem.
SaveMenuTracks the mutable save menu value used by the m menu subsystem.
saveOldStringTracks the mutable save old string value used by the m menu subsystem.
saveSlotTracks the mutable save slot value used by the m menu subsystem.
saveStringEnterTracks the mutable save string enter value used by the m menu subsystem.
const SAVESTRINGSIZE = 24Defines savestringsize for the m menu subsystem.
screenblocksTracks the mutable screenblocks value used by the m menu subsystem.
screenSizeTracks the mutable screen size value used by the m menu subsystem.
const scrnsize = 3Defines scrnsize for the m menu subsystem.
const sfx_vol = 0Defines sfx vol for the m menu subsystem.
showMessagesTracks the mutable show messages value used by the m menu subsystem.
skullAnimCounterTracks the mutable skull anim counter value used by the m menu subsystem.
skullNameStores the skull name collection used by the m menu subsystem.
const SKULLXOFF = -32Defines skullxoff for the m menu subsystem.
const sound_end = 4Defines sound end for the m menu subsystem.
SoundDefTracks the mutable sound def value used by the m menu subsystem.
SoundMenuTracks the mutable sound menu value used by the m menu subsystem.
const soundvol = 9Defines soundvol for the m menu subsystem.
tempstringStores the mutable tempstring text used by the m menu subsystem.
const toorough = 1Defines toorough for the m menu subsystem.
const violence = 3Defines violence for the m menu subsystem.
whichSkullTracks the mutable which skull value used by the m menu subsystem.