MiniDoom

src/i_main.ml

Normalizes process arguments, starts Doom, and reports uncaught startup failures through the active platform UI.

Package
(global)
Reachable
Yes

Imports

Declarations

_IMain_IntToString

function _IMain_IntToString(v)

Formats a signed integer without relying on runtime-specific numeric string conversion.

ParameterTypeDefaultDescription
vdynamic—Value consumed by the operation.

View source

_IMAIN_MB_ICONERROR

const _IMAIN_MB_ICONERROR = 16

Defines imain mb iconerror for the i main subsystem.

View source

_IMAIN_MB_OK

const _IMAIN_MB_OK = 0

Defines imain mb ok for the i main subsystem.

View source

_IMain_ShowFatalError

inline function _IMain_ShowFatalError(msg)

Shows a fatal startup/runtime error in a GUI message box for windows-subsystem builds.

ParameterTypeDefaultDescription
msgdynamic—Msg value supplied to `_IMain_ShowFatalError`.

View source

main

function main(args)

Converts process arguments into Doom's argv representation, enters D_DoomMain, and reports an uncaught startup failure through the platform error path.

ParameterTypeDefaultDescription
argsdynamic—Args value supplied to `main`.

View source

MessageBoxW

extern function MessageBoxW(hwnd as ptr, text as wstr, caption as wstr, flags as u32) from "user32.dll" symbol "MessageBoxW" returns int

Displays the UTF-16 fatal-error dialog used when startup cannot reach the in-game console.

ParameterTypeDefaultDescription
hwndptr—`ptr` value supplied as hwnd to `MessageBoxW`.
textwstr—Text to process.
captionwstr—`wstr` value supplied as caption to `MessageBoxW`.
flagsu32—Bit flags that control the operation.

Returns: Result returned by the native `MessageBoxW` binding as `int`.

View source