MiniDoom

src/m_menu.ml

Implements Doom menus plus shared interactive/CLI multiplayer session startup.

Package
(global)
Reachable
Yes

Imports

Declarations

_BuildMenus

function _BuildMenus()

Constructs every static menu definition and wires its items to draw and activation callbacks.

View source

_bytesOf

inline function _bytesOf(x)

Normalizes patch/text inputs to a byte sequence for legacy menu helpers.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.

View source

_cstrClear

function _cstrClear(buf)

Clears cstr Clear state before the next menu update.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `_cstrClear`.

View source

_cstrCopy

function _cstrCopy(dst, src)

Copies one bounded zero-terminated edit buffer without leaking stale suffix bytes.

ParameterTypeDefaultDescription
dstdynamic—Dst value supplied to `_cstrCopy`.
srcdynamic—Src value supplied to `_cstrCopy`.

View source

_cstrEqString

inline function _cstrEqString(buf, s)

Compares a zero-terminated menu buffer with an immutable string value.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `_cstrEqString`.
sdynamic—S value supplied to `_cstrEqString`.

View source

_cstrFromString

function _cstrFromString(buf, s)

Copies a MiniLang string into a bounded zero-terminated menu edit buffer.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `_cstrFromString`.
sdynamic—S value supplied to `_cstrFromString`.

View source

_cstrLen

function _cstrLen(buf)

Counts bytes up to the first terminator in a fixed-size editable C string.

ParameterTypeDefaultDescription
bufdynamic—Buf value supplied to `_cstrLen`.

View source

_fmt1

function _fmt1(fmt, arg)

Formats one integer as a single printable decimal character for save/menu labels.

ParameterTypeDefaultDescription
fmtdynamic—Fmt value supplied to `_fmt1`.
argdynamic—Arg value supplied to `_fmt1`.

View source

_joywait

_joywait

Tracks the mutable joywait value used by the m menu subsystem.

View source

_lastx

_lastx

Tracks the mutable lastx value used by the m menu subsystem.

View source

_lasty

_lasty

Tracks the mutable lasty value used by the m menu subsystem.

View source

_Menu

inline function _Menu(numitems, prevMenu, menuitems, routine, x, y, lastOn)

Constructs one menu_t and records its initial cursor position.

ParameterTypeDefaultDescription
numitemsdynamic—Numitems value supplied to `_Menu`.
prevMenudynamic—Prev menu value supplied to `_Menu`.
menuitemsdynamic—Menuitems value supplied to `_Menu`.
routinedynamic—Routine value supplied to `_Menu`.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
lastOndynamic—Last on value supplied to `_Menu`.

View source

_MI

inline function _MI(status, name, routine, alphaKey)

Constructs one menuitem_t while keeping table declarations concise.

ParameterTypeDefaultDescription
statusdynamic—Status value supplied to `_MI`.
namedynamic—Resource or object name to resolve.
routinedynamic—Routine value supplied to `_MI`.
alphaKeydynamic—Alpha key value supplied to `_MI`.

View source

_min

inline function _min(a, b)

Returns the lower of two menu-layout coordinates.

ParameterTypeDefaultDescription
adynamic—First input operand.
bdynamic—Second input operand.

View source

_MMENU_ArgValue

inline function _MMENU_ArgValue(flag)

Returns the argument following a named CLI flag, or an empty string when absent/incomplete.

ParameterTypeDefaultDescription
flagdynamic—Flag value supplied to `_MMENU_ArgValue`.

View source

_MMENU_BuildMainMenu

inline function _MMENU_BuildMainMenu()

Creates the main menu item array including multiplayer entry.

View source

_MMENU_BuildMPHostMenu

inline function _MMENU_BuildMPHostMenu()

Creates host setup menu item array.

View source

_MMENU_BuildMPJoinMenu

inline function _MMENU_BuildMPJoinMenu()

Creates join setup menu item array.

View source

_MMENU_BuildMPNameMenu

inline function _MMENU_BuildMPNameMenu()

Creates player-name editor menu item array.

View source

_MMENU_BuildMultiplayerMenu

inline function _MMENU_BuildMultiplayerMenu()

Creates the multiplayer root menu item array.

View source

_MMENU_ClampCursor

function _MMENU_ClampCursor()

Keeps the selected row inside the current menu and advances past disabled entries.

View source

_MMENU_ClampInt

function _MMENU_ClampInt(v, lo, hi)

Clamps integer values for multiplayer setup fields.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.
lodynamic—Inclusive lower bound.
hidynamic—Inclusive upper bound.

View source

_MMENU_DrawPatchScale2

function _MMENU_DrawPatchScale2(x, y, scrn, patch)

Draws a Doom patch scaled to 2x into the destination screen.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
scrndynamic—Scrn value supplied to `_MMENU_DrawPatchScale2`.
patchdynamic—Patch value supplied to `_MMENU_DrawPatchScale2`.

View source

_MMENU_FontLumpName

function _MMENU_FontLumpName(code)

Builds the STCFN lump name for one HUD/menu font character.

ParameterTypeDefaultDescription
codedynamic—Code value supplied to `_MMENU_FontLumpName`.

View source

_MMENU_HandleMPJoinHostEditKey

function _MMENU_HandleMPJoinHostEditKey(ch)

Handles key input while multiplayer join-host editor is active.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `_MMENU_HandleMPJoinHostEditKey`.

View source

_MMENU_HandleMPNameEditKey

function _MMENU_HandleMPNameEditKey(ch)

Handles key input while multiplayer player-name editor is active.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `_MMENU_HandleMPNameEditKey`.

View source

_MMENU_IDiv

inline function _MMENU_IDiv(a, b)

Truncates menu layout quotients toward zero and safely maps a zero divisor to zero.

ParameterTypeDefaultDescription
adynamic—First input operand.
bdynamic—Second input operand.

View source

_MMENU_ItemCount

inline function _MMENU_ItemCount(menu)

Reads a non-negative item count from a possibly uninitialized menu definition.

ParameterTypeDefaultDescription
menudynamic—Menu value supplied to `_MMENU_ItemCount`.

View source

_mmenu_mp_log_path

_mmenu_mp_log_path

Stores the mutable mmenu mp log path text used by the m menu subsystem.

View source

_MMENU_MPCLIInt

function _MMENU_MPCLIInt(flag, fallback, lo, hi)

Parses one bounded numeric multiplayer option and returns [valid,value].

ParameterTypeDefaultDescription
flagdynamic—Flag value supplied to `_MMENU_MPCLIInt`.
fallbackdynamic—Value returned when the requested conversion or lookup is unavailable.
lodynamic—Inclusive lower bound.
hidynamic—Inclusive upper bound.

View source

_MMENU_MPCLIReportFailure

function _MMENU_MPCLIReportFailure(role, reason)

Emits a machine-readable startup failure while retaining the human-readable platform reason.

ParameterTypeDefaultDescription
roledynamic—Role value supplied to `_MMENU_MPCLIReportFailure`.
reasondynamic—Reason value supplied to `_MMENU_MPCLIReportFailure`.

View source

_MMENU_MPFailureCode

function _MMENU_MPFailureCode(reason)

Maps platform error text to compact failure categories used by CLI orchestration.

ParameterTypeDefaultDescription
reasondynamic—Reason value supplied to `_MMENU_MPFailureCode`.

View source

_MMENU_MPIsNumericIPv4

function _MMENU_MPIsNumericIPv4(host)

Validates the numerical dotted-quad form supported by the WinSock transport parser.

ParameterTypeDefaultDescription
hostdynamic—Host value supplied to `_MMENU_MPIsNumericIPv4`.

View source

_MMENU_MPLimitText

inline function _MMENU_MPLimitText(v)

Formats deathmatch limits, including unlimited mode.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

_MMENU_MPModeName

inline function _MMENU_MPModeName(mode)

Returns localized text for multiplayer mode value.

ParameterTypeDefaultDescription
modedynamic—Mode value supplied to `_MMENU_MPModeName`.

View source

_MMENU_MPSkillName

inline function _MMENU_MPSkillName(skill)

Returns UI text for host-selected skill level.

ParameterTypeDefaultDescription
skilldynamic—Skill value supplied to `_MMENU_MPSkillName`.

View source

_MMENU_MPStartHostConfigured

function _MMENU_MPStartHostConfigured(interactive)

Starts a host from normalized shared settings and reports either menu or CLI diagnostics.

ParameterTypeDefaultDescription
interactivedynamic—Interactive value supplied to `_MMENU_MPStartHostConfigured`.

View source

_MMENU_MPStartJoinConfigured

function _MMENU_MPStartJoinConfigured(interactive)

Joins the configured endpoint and boots the server-confirmed map/slot on success.

ParameterTypeDefaultDescription
interactivedynamic—Interactive value supplied to `_MMENU_MPStartJoinConfigured`.

View source

_MMENU_MPStatus

function _MMENU_MPStatus(line)

Emits one stable automation status line to stdout and an optional per-process log file.

ParameterTypeDefaultDescription
linedynamic—Map line or text line affected by the operation.

View source

_MMENU_ParseMapToken

function _MMENU_ParseMapToken(mapToken)

Parses MAPxx or ExMy map token and returns [episode,map].

ParameterTypeDefaultDescription
mapTokendynamic—Map token value supplied to `_MMENU_ParseMapToken`.

View source

_MMENU_ParseUnsignedTail

function _MMENU_ParseUnsignedTail(s0, startIdx)

Parses a positive integer from a string tail, returning -1 on failure.

ParameterTypeDefaultDescription
s0dynamic—S0 value supplied to `_MMENU_ParseUnsignedTail`.
startIdxdynamic—Start idx value supplied to `_MMENU_ParseUnsignedTail`.

View source

_MMENU_RequestStatusBarRefresh

inline function _MMENU_RequestStatusBarRefresh()

Forces one full status bar redraw after menu overlays are closed.

View source

_MMENU_RevealLogicalMenuText

function _MMENU_RevealLogicalMenuText(x, y, string)

Keeps startup/title-screen high-res patch overlays from covering generated menu text.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
stringdynamic—String value supplied to `_MMENU_RevealLogicalMenuText`.

View source

_MMENU_StartMultiplayerGame

function _MMENU_StartMultiplayerGame(mode, skill, mapToken, localSlot)

Starts local game session immediately using current MP session settings.

ParameterTypeDefaultDescription
modedynamic—Mode value supplied to `_MMENU_StartMultiplayerGame`.
skilldynamic—Skill value supplied to `_MMENU_StartMultiplayerGame`.
mapTokendynamic—Map token value supplied to `_MMENU_StartMultiplayerGame`.
localSlotdynamic—Local slot value supplied to `_MMENU_StartMultiplayerGame`.

View source

_MMENU_StringWidthMenuSized

function _MMENU_StringWidthMenuSized(string)

Returns text width in pixels for 2x multiplayer menu font rendering.

ParameterTypeDefaultDescription
stringdynamic—String value supplied to `_MMENU_StringWidthMenuSized`.

View source

_MMENU_SyncMPBuffers

function _MMENU_SyncMPBuffers()

Synchronizes editable menu buffers with multiplayer settings.

View source

_MMENU_ToInt

function _MMENU_ToInt(v, fallback)

Converts values to integers with fallback handling.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.
fallbackdynamic—Value returned when the requested conversion or lookup is unavailable.

View source

_MMENU_ToUpperAsciiString

function _MMENU_ToUpperAsciiString(s0)

Converts a string to uppercase for ASCII letters.

ParameterTypeDefaultDescription
s0dynamic—S0 value supplied to `_MMENU_ToUpperAsciiString`.

View source

_MMENU_WriteMenuSizedOrText

function _MMENU_WriteMenuSizedOrText(x, y, string)

Draws custom menu labels and falls back to the normal menu font if needed.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
stringdynamic—String value supplied to `_MMENU_WriteMenuSizedOrText`.

View source

_MMENU_WriteTextMenuSized

function _MMENU_WriteTextMenuSized(x, y, string)

Draws highlighted menu text for multiplayer entries with menu-like visual weight.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
stringdynamic—String value supplied to `_MMENU_WriteTextMenuSized`.

View source

_mousewait

_mousewait

Tracks the mutable mousewait value used by the m menu subsystem.

View source

_mousex_acc

_mousex_acc

Tracks the mutable mousex acc value used by the m menu subsystem.

View source

_mousey_acc

_mousey_acc

Tracks the mutable mousey acc value used by the m menu subsystem.

View source

_patchHeight

inline function _patchHeight(patch)

Reads a cached patch height without assuming the resource decoded successfully.

ParameterTypeDefaultDescription
patchdynamic—Patch value supplied to `_patchHeight`.

View source

_patchWidth

inline function _patchWidth(patch)

Reads a cached patch width without assuming the resource decoded successfully.

ParameterTypeDefaultDescription
patchdynamic—Patch value supplied to `_patchWidth`.

View source

_toupperByte

inline function _toupperByte(c)

Converts toupper Byte text to the required case for menu lookups.

ParameterTypeDefaultDescription
cdynamic—C value supplied to `_toupperByte`.

View source

brightness

const brightness = 5

Defines brightness for the m menu subsystem.

View source

CH_N

const CH_N = 110

Defines ch n for the m menu subsystem.

View source

CH_SPACE

const CH_SPACE = 32

Defines ch space for the m menu subsystem.

View source

CH_Y

const CH_Y = 121

Defines ch y for the m menu subsystem.

View source

currentMenu

currentMenu

Tracks the mutable current menu value used by the m menu subsystem.

View source

detail

const detail = 2

Defines detail for the m menu subsystem.

View source

detailLevel

detailLevel

Tracks the mutable detail level value used by the m menu subsystem.

View source

detailNames

detailNames

Stores the detail names collection used by the m menu subsystem.

View source

endgame

const endgame = 0

Defines endgame for the m menu subsystem.

View source

endstring

endstring

Stores the mutable endstring text used by the m menu subsystem.

View source

ep1

const ep1 = 0

Defines ep1 for the m menu subsystem.

View source

ep2

const ep2 = 1

Defines ep2 for the m menu subsystem.

View source

ep3

const ep3 = 2

Defines ep3 for the m menu subsystem.

View source

ep4

const ep4 = 3

Defines ep4 for the m menu subsystem.

View source

ep_end

const ep_end = 4

Defines ep end for the m menu subsystem.

View source

epi

epi

Tracks the mutable epi value used by the m menu subsystem.

View source

EpiDef

EpiDef

Tracks the mutable epi def value used by the m menu subsystem.

View source

EpisodeMenu

EpisodeMenu

Tracks the mutable episode menu value used by the m menu subsystem.

View source

gammamsg

gammamsg

Stores the gammamsg collection used by the m menu subsystem.

View source

hurtme

const hurtme = 2

Defines hurtme for the m menu subsystem.

View source

inhelpscreens

inhelpscreens

Tracks whether inhelpscreens is active in the m menu subsystem.

View source

itemOn

itemOn

Tracks the mutable item on value used by the m menu subsystem.

View source

killthings

const killthings = 0

Defines killthings for the m menu subsystem.

View source

LINEHEIGHT

const LINEHEIGHT = 16

Defines lineheight for the m menu subsystem.

View source

load_end

const load_end = 6

Defines load end for the m menu subsystem.

View source

LoadDef

LoadDef

Tracks the mutable load def value used by the m menu subsystem.

View source

LoadMenu

LoadMenu

Tracks the mutable load menu value used by the m menu subsystem.

View source

M_ChangeBrightness

function M_ChangeBrightness(choice)

Adjusts gamma-based brightness level from options menu.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ChangeBrightness`.

View source

M_ChangeDetail

function M_ChangeDetail(choice)

Selects the supported high-detail renderer mode and posts its localized HUD message.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ChangeDetail`.

View source

M_ChangeMessages

function M_ChangeMessages(choice)

Toggles gameplay messages, posts the localized result, and protects it from immediate replacement.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ChangeMessages`.

View source

M_ChangeSensitivity

function M_ChangeSensitivity(choice)

Adjusts mouse sensitivity by one step within the persisted 0..9 range.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ChangeSensitivity`.

View source

M_ChooseSkill

function M_ChooseSkill(choice)

Requests nightmare confirmation or queues a new game at the chosen difficulty.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ChooseSkill`.

View source

M_ClearMenus

function M_ClearMenus()

Closes menu and multiplayer text editors, requesting a status-bar refresh when needed.

View source

M_DoSave

function M_DoSave(slot)

Saves do Save state for the menu system.

ParameterTypeDefaultDescription
slotdynamic—Slot value supplied to `M_DoSave`.

View source

M_DrawEmptyCell

function M_DrawEmptyCell(menu, item)

Draws the left/right save-slot border for an unselected cell.

ParameterTypeDefaultDescription
menudynamic—Menu value supplied to `M_DrawEmptyCell`.
itemdynamic—Item value supplied to `M_DrawEmptyCell`.

View source

M_DrawEpisode

function M_DrawEpisode()

Draws the episode-selection title above the available IWAD episodes.

View source

M_Drawer

function M_Drawer()

Draws the active menu page, modal message, and animated selection skull.

View source

M_DrawLoad

function M_DrawLoad()

Renders the load-game heading, slot borders, and cached descriptions for every save row.

View source

M_DrawMainMenu

function M_DrawMainMenu()

Draws the title patch and custom multiplayer row for the root menu.

View source

M_DrawMPHostMenu

function M_DrawMPHostMenu()

Draws host setup values for multiplayer dedicated server start.

View source

M_DrawMPJoinMenu

function M_DrawMPJoinMenu()

Draws join setup values and live host/name text editors.

View source

M_DrawMPNameMenu

function M_DrawMPNameMenu()

Draws player name editor with caret during text entry.

View source

M_DrawMultiplayerMenu

function M_DrawMultiplayerMenu()

Draws the multiplayer root menu.

View source

M_DrawNewGame

function M_DrawNewGame()

Draws the skill-selection menu title and vanilla skill rows.

View source

M_DrawOptions

function M_DrawOptions()

Draws the options page plus sensitivity and screen-size thermometers.

View source

M_DrawReadThis1

function M_DrawReadThis1()

Draws the first help page selected for commercial versus episodic game data.

View source

M_DrawReadThis2

function M_DrawReadThis2()

Draws the credit or second help page appropriate to the active game edition.

View source

M_DrawSave

function M_DrawSave()

Saves draw Save state for the menu system.

View source

M_DrawSaveLoadBorder

function M_DrawSaveLoadBorder(x, y)

Tiles the left, center, and right patches forming one 24-character save-slot frame.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.

View source

M_DrawSelCell

function M_DrawSelCell(menu, item)

Draws the selected save-slot border variant at a menu row.

ParameterTypeDefaultDescription
menudynamic—Menu value supplied to `M_DrawSelCell`.
itemdynamic—Item value supplied to `M_DrawSelCell`.

View source

M_DrawSound

function M_DrawSound()

Draws the sound-options patch and both volume thermometers.

View source

M_DrawThermo

function M_DrawThermo(x, y, thermWidth, thermDot)

Draws a patch-based horizontal slider with a checked marker position.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
thermWidthdynamic—Width of therm width in pixels or map units.
thermDotdynamic—Therm dot value supplied to `M_DrawThermo`.

View source

M_EndGame

function M_EndGame(choice)

Controls end Game transitions in the menu system.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_EndGame`.

View source

M_EndGameResponse

function M_EndGameResponse(ch)

Controls end Game Response transitions in the menu system.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `M_EndGameResponse`.

View source

M_Episode

function M_Episode(choice)

Validates shareware episode access and opens the skill selector for the chosen episode.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_Episode`.

View source

M_FinishReadThis

function M_FinishReadThis(choice)

Returns from the last help page to the main menu.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_FinishReadThis`.

View source

M_Init

function M_Init()

Constructs menu definitions and edit buffers, restores defaults, and seeds cursor/animation state.

View source

M_LoadGame

function M_LoadGame(choice)

Rejects loads during netgames or opens the refreshed load-slot menu in offline play.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_LoadGame`.

View source

M_LoadSelect

function M_LoadSelect(choice)

Queues the selected slot's per-WAD save file for loading and closes the menu.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_LoadSelect`.

View source

M_MPHostFragLimit

function M_MPHostFragLimit(choice)

Adjusts deathmatch frag limit (0 means unlimited).

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostFragLimit`.

View source

M_MPHostMap

function M_MPHostMap(choice)

Cycles host-selected map through detected WAD map list.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostMap`.

View source

M_MPHostMenuOpen

function M_MPHostMenuOpen(choice)

Opens host setup menu and refreshes map/options state.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostMenuOpen`.

View source

M_MPHostMode

function M_MPHostMode(choice)

Toggles host game mode between cooperative and deathmatch.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostMode`.

View source

M_MPHostPlayers

function M_MPHostPlayers(choice)

Adjusts host maximum players within protocol bounds.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostPlayers`.

View source

M_MPHostPort

function M_MPHostPort(choice)

Adjusts dedicated server listen port.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostPort`.

View source

M_MPHostSkill

function M_MPHostSkill(choice)

Adjusts host-selected skill level.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostSkill`.

View source

M_MPHostStart

function M_MPHostStart(choice)

Starts the menu-configured host and keeps startup errors inside the menu flow.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostStart`.

View source

M_MPHostTimeLimit

function M_MPHostTimeLimit(choice)

Adjusts deathmatch time limit in minutes (0 means unlimited).

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPHostTimeLimit`.

View source

M_MPJoinEditHost

function M_MPJoinEditHost(choice)

Enters text edit mode for join target host string.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPJoinEditHost`.

View source

M_MPJoinMenuOpen

function M_MPJoinMenuOpen(choice)

Opens join setup menu and refreshes editable host values.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPJoinMenuOpen`.

View source

M_MPJoinPort

function M_MPJoinPort(choice)

Adjusts join target UDP port.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPJoinPort`.

View source

M_MPJoinStart

function M_MPJoinStart(choice)

Starts the menu-configured join handshake and surfaces rejection details interactively.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPJoinStart`.

View source

M_MPNameDone

function M_MPNameDone(choice)

Applies name changes and closes player-name editor menu.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPNameDone`.

View source

M_MPNameEdit

function M_MPNameEdit(choice)

Enters text edit mode for multiplayer player name.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPNameEdit`.

View source

M_MPNameMenuOpen

function M_MPNameMenuOpen(choice)

Opens player-name editor menu.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MPNameMenuOpen`.

View source

M_MPStartFromCommandLine

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.

View source

M_Multiplayer

function M_Multiplayer(choice)

Opens the multiplayer root menu.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_Multiplayer`.

View source

M_MusicVol

function M_MusicVol(choice)

Adjusts the music mixer volume and applies it immediately.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_MusicVol`.

View source

M_NewGame

function M_NewGame(choice)

Rejects active netgames or routes new-game selection to episode/skill menus for this IWAD.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_NewGame`.

View source

M_Options

function M_Options(choice)

Opens the options submenu at its remembered selection.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_Options`.

View source

M_QuickLoad

function M_QuickLoad()

Validates quick-load availability and opens the confirmation prompt for its remembered slot.

View source

M_QuickLoadResponse

function M_QuickLoadResponse(ch)

Executes the remembered quick-load slot only after an affirmative confirmation key.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `M_QuickLoadResponse`.

View source

M_QuickSave

function M_QuickSave()

Saves quick Save state for the menu system.

View source

M_QuickSaveResponse

function M_QuickSaveResponse(ch)

Saves quick Save Response state for the menu system.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `M_QuickSaveResponse`.

View source

M_QuitDOOM

function M_QuitDOOM(choice)

Selects a localized randomized quit message and opens its confirmation prompt.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_QuitDOOM`.

View source

M_QuitResponse

function M_QuitResponse(ch)

Accepts the quit confirmation, plays the edition-specific exit cue, and terminates the process.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `M_QuitResponse`.

View source

M_ReadSaveStrings

function M_ReadSaveStrings()

Scans each per-WAD save slot, copies its fixed title, and enables only readable load-menu rows.

View source

M_ReadThis

function M_ReadThis(choice)

Opens the first help/read-this menu page.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ReadThis`.

View source

M_ReadThis2

function M_ReadThis2(choice)

Advances from the first help page to the second page.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_ReadThis2`.

View source

M_Responder

function M_Responder(ev)

Routes modal/editor/navigation keys and invokes the selected menu item's callback.

ParameterTypeDefaultDescription
evdynamic—Input event to process.

View source

M_SaveGame

function M_SaveGame(choice)

Rejects invalid save contexts or opens the refreshed save-slot menu for a live level.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_SaveGame`.

View source

M_SaveSelect

function M_SaveSelect(choice)

Opens text editing for the selected save row while preserving its prior description for cancel.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_SaveSelect`.

View source

M_SetupNextMenu

function M_SetupNextMenu(menudef)

Switches menu definition, restores its remembered cursor, and exits active text editors.

ParameterTypeDefaultDescription
menudefdynamic—Menudef value supplied to `M_SetupNextMenu`.

View source

M_SfxVol

function M_SfxVol(choice)

Adjusts the effects mixer volume and applies it immediately.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_SfxVol`.

View source

M_SizeDisplay

function M_SizeDisplay(choice)

Changes screen-block size within renderer bounds and schedules a view resize.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_SizeDisplay`.

View source

M_Sound

function M_Sound(choice)

Opens the sound submenu at its previously selected row.

ParameterTypeDefaultDescription
choicedynamic—Choice value supplied to `M_Sound`.

View source

M_StartControlPanel

function M_StartControlPanel()

Opens the main menu at its remembered row and clamps the cursor to enabled items.

View source

M_StartMessage

function M_StartMessage(string, routine, input)

Replaces the current menu with a modal prompt while remembering whether a menu was already open.

ParameterTypeDefaultDescription
stringdynamic—String value supplied to `M_StartMessage`.
routinedynamic—Routine value supplied to `M_StartMessage`.
inputdynamic—Input value supplied to `M_StartMessage`.

View source

M_StopMessage

function M_StopMessage()

Dismisses the modal prompt and restores the menu-active state captured when it opened.

View source

M_StringHeight

function M_StringHeight(string)

Measures multiline menu text height using the active HU font metrics.

ParameterTypeDefaultDescription
stringdynamic—String value supplied to `M_StringHeight`.

View source

M_StringWidth

function M_StringWidth(string)

Measures proportional menu text width using loaded HU font patches.

ParameterTypeDefaultDescription
stringdynamic—String value supplied to `M_StringWidth`.

View source

M_Ticker

function M_Ticker()

Pumps multiplayer handshakes and flips the selection skull every eight menu tics.

View source

M_VerifyNightmare

function M_VerifyNightmare(ch)

Confirms or cancels nightmare difficulty before starting a new game.

ParameterTypeDefaultDescription
chdynamic—Ch value supplied to `M_VerifyNightmare`.

View source

M_WriteText

function M_WriteText(x, y, string)

Draws patch-font glyphs with newline handling, unsupported-character spacing, and screen clipping.

ParameterTypeDefaultDescription
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.
stringdynamic—String value supplied to `M_WriteText`.

View source

main_end

const main_end = 7

Defines main end for the m menu subsystem.

View source

main_loadgame

const main_loadgame = 3

Defines main loadgame for the m menu subsystem.

View source

main_multiplayer

const main_multiplayer = 1

Defines main multiplayer for the m menu subsystem.

View source

main_newgame

const main_newgame = 0

Defines main newgame for the m menu subsystem.

View source

main_options

const main_options = 2

Defines main options for the m menu subsystem.

View source

main_quitdoom

const main_quitdoom = 6

Defines main quitdoom for the m menu subsystem.

View source

main_readthis

const main_readthis = 5

Defines main readthis for the m menu subsystem.

View source

main_savegame

const main_savegame = 4

Defines main savegame for the m menu subsystem.

View source

MainDef

MainDef

Tracks the mutable main def value used by the m menu subsystem.

View source

MainMenu

MainMenu

Tracks the mutable main menu value used by the m menu subsystem.

View source

menu_t struct

menuactive

menuactive

Tracks whether menuactive is active in the m menu subsystem.

View source

menuitem_t struct

messageLastMenuActive

messageLastMenuActive

Tracks whether message last menu active is active in the m menu subsystem.

View source

messageNeedsInput

messageNeedsInput

Tracks whether message needs input is active in the m menu subsystem.

View source

messageRoutine

messageRoutine

Tracks the mutable message routine value used by the m menu subsystem.

View source

messages

const messages = 1

Defines messages for the m menu subsystem.

View source

messageString

messageString

Stores the mutable message string text used by the m menu subsystem.

View source

messageToPrint

messageToPrint

Tracks the mutable message to print value used by the m menu subsystem.

View source

messx

messx

Tracks the mutable messx value used by the m menu subsystem.

View source

messy

messy

Tracks the mutable messy value used by the m menu subsystem.

View source

mousesens

const mousesens = 7

Defines mousesens for the m menu subsystem.

View source

mouseSensitivity

mouseSensitivity

Tracks the mutable mouse sensitivity value used by the m menu subsystem.

View source

mp_host_end

const mp_host_end = 8

Defines mp host end for the m menu subsystem.

View source

mp_host_fraglimit

const mp_host_fraglimit = 4

Defines mp host fraglimit for the m menu subsystem.

View source

mp_host_map

const mp_host_map = 1

Defines mp host map for the m menu subsystem.

View source

mp_host_mode_item

const mp_host_mode_item = 0

Defines mp host mode item for the m menu subsystem.

View source

mp_host_players

const mp_host_players = 3

Defines mp host players for the m menu subsystem.

View source

mp_host_port_item

const mp_host_port_item = 6

Defines mp host port item for the m menu subsystem.

View source

mp_host_skill_item

const mp_host_skill_item = 2

Defines mp host skill item for the m menu subsystem.

View source

mp_host_start

const mp_host_start = 7

Defines mp host start for the m menu subsystem.

View source

mp_host_timelimit

const mp_host_timelimit = 5

Defines mp host timelimit for the m menu subsystem.

View source

mp_join_end

const mp_join_end = 3

Defines mp join end for the m menu subsystem.

View source

mp_join_host_item

const mp_join_host_item = 0

Defines mp join host item for the m menu subsystem.

View source

mp_join_port_item

const mp_join_port_item = 1

Defines mp join port item for the m menu subsystem.

View source

mp_join_start

const mp_join_start = 2

Defines mp join start for the m menu subsystem.

View source

mp_main_end

const mp_main_end = 3

Defines mp main end for the m menu subsystem.

View source

mp_main_host

const mp_main_host = 0

Defines mp main host for the m menu subsystem.

View source

mp_main_join

const mp_main_join = 1

Defines mp main join for the m menu subsystem.

View source

mp_main_name

const mp_main_name = 2

Defines mp main name for the m menu subsystem.

View source

mp_name_done

const mp_name_done = 1

Defines mp name done for the m menu subsystem.

View source

mp_name_edit

const mp_name_edit = 0

Defines mp name edit for the m menu subsystem.

View source

mp_name_end

const mp_name_end = 2

Defines mp name end for the m menu subsystem.

View source

MPHostDef

MPHostDef

Tracks the mutable mphost def value used by the m menu subsystem.

View source

MPHostMenu

MPHostMenu

Tracks the mutable mphost menu value used by the m menu subsystem.

View source

MPJoinDef

MPJoinDef

Tracks the mutable mpjoin def value used by the m menu subsystem.

View source

mpJoinHostBuf

mpJoinHostBuf

Tracks the mutable mp join host buf value used by the m menu subsystem.

View source

mpJoinHostCharIndex

mpJoinHostCharIndex

Tracks the mutable mp join host char index value used by the m menu subsystem.

View source

mpJoinHostEnter

mpJoinHostEnter

Tracks the mutable mp join host enter value used by the m menu subsystem.

View source

mpJoinHostOld

mpJoinHostOld

Tracks the mutable mp join host old value used by the m menu subsystem.

View source

MPJoinMenu

MPJoinMenu

Tracks the mutable mpjoin menu value used by the m menu subsystem.

View source

mpNameBuf

mpNameBuf

Tracks the mutable mp name buf value used by the m menu subsystem.

View source

mpNameCharIndex

mpNameCharIndex

Tracks the mutable mp name char index value used by the m menu subsystem.

View source

MPNameDef

MPNameDef

Tracks the mutable mpname def value used by the m menu subsystem.

View source

mpNameEnter

mpNameEnter

Tracks the mutable mp name enter value used by the m menu subsystem.

View source

MPNameMenu

MPNameMenu

Tracks the mutable mpname menu value used by the m menu subsystem.

View source

mpNameOld

mpNameOld

Tracks the mutable mp name old value used by the m menu subsystem.

View source

msgNames

msgNames

Stores the msg names collection used by the m menu subsystem.

View source

MultiplayerDef

MultiplayerDef

Tracks the mutable multiplayer def value used by the m menu subsystem.

View source

MultiplayerMenu

MultiplayerMenu

Tracks the mutable multiplayer menu value used by the m menu subsystem.

View source

music_vol

const music_vol = 2

Defines music vol for the m menu subsystem.

View source

NewDef

NewDef

Tracks the mutable new def value used by the m menu subsystem.

View source

newg_end

const newg_end = 5

Defines newg end for the m menu subsystem.

View source

NewGameMenu

NewGameMenu

Tracks the mutable new game menu value used by the m menu subsystem.

View source

nightmare

const nightmare = 4

Defines nightmare for the m menu subsystem.

View source

opt_end

const opt_end = 10

Defines opt end for the m menu subsystem.

View source

option_empty1

const option_empty1 = 4

Defines option empty1 for the m menu subsystem.

View source

option_empty1b

const option_empty1b = 6

Defines option empty1b for the m menu subsystem.

View source

option_empty2

const option_empty2 = 8

Defines option empty2 for the m menu subsystem.

View source

OptionsDef

OptionsDef

Tracks the mutable options def value used by the m menu subsystem.

View source

OptionsMenu

OptionsMenu

Tracks the mutable options menu value used by the m menu subsystem.

View source

quickSaveSlot

quickSaveSlot

Tracks the mutable quick save slot value used by the m menu subsystem.

View source

quitsounds

quitsounds

Tracks the mutable quitsounds value used by the m menu subsystem.

View source

quitsounds2

quitsounds2

Tracks the mutable quitsounds2 value used by the m menu subsystem.

View source

read1_end

const read1_end = 1

Defines read1 end for the m menu subsystem.

View source

read2_end

const read2_end = 1

Defines read2 end for the m menu subsystem.

View source

ReadDef1

ReadDef1

Tracks the mutable read def1 value used by the m menu subsystem.

View source

ReadDef2

ReadDef2

Tracks the mutable read def2 value used by the m menu subsystem.

View source

ReadMenu1

ReadMenu1

Tracks the mutable read menu1 value used by the m menu subsystem.

View source

ReadMenu2

ReadMenu2

Tracks the mutable read menu2 value used by the m menu subsystem.

View source

saveCharIndex

saveCharIndex

Tracks the mutable save char index value used by the m menu subsystem.

View source

SaveDef

SaveDef

Tracks the mutable save def value used by the m menu subsystem.

View source

savegamestrings

savegamestrings

Tracks the mutable savegamestrings value used by the m menu subsystem.

View source

SaveMenu

SaveMenu

Tracks the mutable save menu value used by the m menu subsystem.

View source

saveOldString

saveOldString

Tracks the mutable save old string value used by the m menu subsystem.

View source

saveSlot

saveSlot

Tracks the mutable save slot value used by the m menu subsystem.

View source

saveStringEnter

saveStringEnter

Tracks the mutable save string enter value used by the m menu subsystem.

View source

SAVESTRINGSIZE

const SAVESTRINGSIZE = 24

Defines savestringsize for the m menu subsystem.

View source

screenblocks

screenblocks

Tracks the mutable screenblocks value used by the m menu subsystem.

View source

screenSize

screenSize

Tracks the mutable screen size value used by the m menu subsystem.

View source

scrnsize

const scrnsize = 3

Defines scrnsize for the m menu subsystem.

View source

sfx_vol

const sfx_vol = 0

Defines sfx vol for the m menu subsystem.

View source

showMessages

showMessages

Tracks the mutable show messages value used by the m menu subsystem.

View source

skullAnimCounter

skullAnimCounter

Tracks the mutable skull anim counter value used by the m menu subsystem.

View source

skullName

skullName

Stores the skull name collection used by the m menu subsystem.

View source

SKULLXOFF

const SKULLXOFF = -32

Defines skullxoff for the m menu subsystem.

View source

sound_end

const sound_end = 4

Defines sound end for the m menu subsystem.

View source

SoundDef

SoundDef

Tracks the mutable sound def value used by the m menu subsystem.

View source

SoundMenu

SoundMenu

Tracks the mutable sound menu value used by the m menu subsystem.

View source

soundvol

const soundvol = 9

Defines soundvol for the m menu subsystem.

View source

tempstring

tempstring

Stores the mutable tempstring text used by the m menu subsystem.

View source

toorough

const toorough = 1

Defines toorough for the m menu subsystem.

View source

violence

const violence = 3

Defines violence for the m menu subsystem.

View source

whichSkull

whichSkull

Tracks the mutable which skull value used by the m menu subsystem.

View source