Files
src/i_video.ml
Owns the Win32 game window, keyboard/mouse polling, indexed-frame presentation, HD overlays, wipes, and screenshots.
- Package
(global)- Reachable
- Yes
Imports
Declarations
# _I_AddKeyMap
inline function _I_AddKeyMap(vk, doomKey)
Appends a Win32 virtual-key to Doom-key mapping with an initially released edge-tracking cell.
| Parameter | Type | Default | Description |
|---|
vk | dynamic | — | Vk value supplied to `_I_AddKeyMap`. |
doomKey | dynamic | — | Doom input-key code to process. |
View source
# _i_altGPrev
_i_altGPrev
Tracks whether i alt gprev is active in the i video subsystem.
View source
# _I_BI_RGB
const _I_BI_RGB = 0
Defines i bi rgb for the i video subsystem.
View source
# _i_bmi
_i_bmi
Tracks the mutable i bmi value used by the i video subsystem.
View source
# _I_BuildBmpFromFrame
function _I_BuildBmpFromFrame()
Encodes the currently selected presentation framebuffer as an 8-bit BMP.
View source
# _I_BuildBmpFromIndexedFrame
function _I_BuildBmpFromIndexedFrame(src, width, height)
Builds an 8-bit BMP from a prepared indexed frame.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_BuildBmpFromIndexedFrame`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
View source
# _I_BuildHighresGameFrame
function _I_BuildHighresGameFrame()
Presents the native high-resolution world buffer plus scaled logical UI/overlay areas.
View source
# _I_BuildNearestLogicalFrame
function _I_BuildNearestLogicalFrame(src)
Builds a cheap nearest-scaled logical frame used as fallback behind prepared assets.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_BuildNearestLogicalFrame`. |
View source
# _I_BuildPresentFrame
function _I_BuildPresentFrame()
Returns the framebuffer that should be presented to the window.
View source
# _I_ClampPresentScale
inline function _I_ClampPresentScale(scale)
Keeps the physical presentation scale inside the supported range.
| Parameter | Type | Default | Description |
|---|
scale | dynamic | — | Scale value supplied to `_I_ClampPresentScale`. |
View source
# _I_COLORONCOLOR
const _I_COLORONCOLOR = 3
Defines the Doom palette selection for i coloroncolor.
View source
# _I_ComposeHDWipeFrame
function _I_ComposeHDWipeFrame()
Composes one RGBA melt frame from the start/end captures and each column group's vertical frontier.
View source
# _i_consoleTildePrev
_i_consoleTildePrev
Tracks whether i console tilde prev is active in the i video subsystem.
View source
# _I_CreateWindow
function _I_CreateWindow()
Creates, sizes, activates, and acquires a device context for the fullscreen or windowed native game window.
View source
# _i_cursorHidden
_i_cursorHidden
Tracks whether i cursor hidden is active in the i video subsystem.
View source
# _I_DIB_RGB_COLORS
const _I_DIB_RGB_COLORS = 0
Defines the Doom palette selection for i dib rgb colors.
View source
# _I_DrawGLOverlayFrame
function _I_DrawGLOverlayFrame()
Composes a visible status bar, marked logical UI, and prepared HD patches, then submits the masked overlay to OpenGL.
View source
# _I_DrawLoadingIndicator
function _I_DrawLoadingIndicator()
Renders a small animated loading marker in the lower-right corner of the software framebuffer.
View source
# _I_EnsureGLOOverlay
function _I_EnsureGLOOverlay()
Ensures the OpenGL UI overlay color and alpha-mask buffers match the physical presentation dimensions.
View source
# _I_EnsureScreenshotDir
function _I_EnsureScreenshotDir()
Creates the screenshot directory once and caches success so periodic captures avoid repeated filesystem work.
View source
# _i_forceSoftwarePresent
_i_forceSoftwarePresent
Tracks whether i force software present is active in the i video subsystem.
View source
# _i_fpsFrameCount
_i_fpsFrameCount
Tracks the mutable i fps frame count value used by the i video subsystem.
View source
# _I_FpsTitle
inline function _I_FpsTitle()
Formats the base window caption with the most recently measured non-negative FPS value.
View source
# _i_fpsValue
_i_fpsValue
Tracks the mutable i fps value value used by the i video subsystem.
View source
# _i_fpsWindowStart
_i_fpsWindowStart
Tracks the mutable i fps window start value used by the i video subsystem.
View source
# _i_fullscreen
_i_fullscreen
Tracks whether i fullscreen is active in the i video subsystem.
View source
# _i_glOverlayBuffer
_i_glOverlayBuffer
Holds the optional i gl overlay buffer resource used by the i video subsystem.
View source
# _I_GLOverlayHighresPatches
function _I_GLOverlayHighresPatches()
Merges prepared native-resolution patch pixels and their mask into the OpenGL overlay buffers.
View source
# _I_GLOverlayLogicalMask
function _I_GLOverlayLogicalMask(src, mask)
Expands only mask-selected logical indexed pixels into the OpenGL overlay buffers.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_GLOverlayLogicalMask`. |
mask | dynamic | — | Mask value supplied to `_I_GLOverlayLogicalMask`. |
View source
# _I_GLOverlayLogicalPixel
function _I_GLOverlayLogicalPixel(src, sx, sy)
Expands one logical indexed pixel into its physical-scale overlay block and marks those destination pixels opaque.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_GLOverlayLogicalPixel`. |
sx | dynamic | — | Horizontal coordinate or vector component represented by sx. |
sy | dynamic | — | Vertical coordinate or vector component represented by sy. |
View source
# _I_GLOverlayLogicalRect
function _I_GLOverlayLogicalRect(src, x, y, w, h)
Clips and expands a logical indexed rectangle into the OpenGL overlay buffers.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_GLOverlayLogicalRect`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
w | dynamic | — | W value supplied to `_I_GLOverlayLogicalRect`. |
h | dynamic | — | H value supplied to `_I_GLOverlayLogicalRect`. |
View source
# _i_glOverlayMask
_i_glOverlayMask
Holds the optional i gl overlay mask resource used by the i video subsystem.
View source
# _I_GWL_STYLE
const _I_GWL_STYLE = -16
Defines i gwl style for the i video subsystem.
View source
# _I_HandleRendererHotkeyMessage
function _I_HandleRendererHotkeyMessage(msg, wparam, lparam)
Handles Alt+G from the Win32 message stream, independent of foreground polling.
| Parameter | Type | Default | Description |
|---|
msg | dynamic | — | Msg value supplied to `_I_HandleRendererHotkeyMessage`. |
wparam | dynamic | — | Wparam value supplied to `_I_HandleRendererHotkeyMessage`. |
lparam | dynamic | — | Lparam value supplied to `_I_HandleRendererHotkeyMessage`. |
View source
# _i_hdc
_i_hdc
Holds the optional i hdc resource used by the i video subsystem.
View source
# _I_HDWIPE_Rand
inline function _I_HDWIPE_Rand()
Produces deterministic 15-bit randomness for high-resolution melt-column delays.
View source
# _i_hdWipeActive
_i_hdWipeActive
Tracks whether i hd wipe active is active in the i video subsystem.
View source
# _i_hdWipeEnd
_i_hdWipeEnd
Holds the optional i hd wipe end resource used by the i video subsystem.
View source
# _i_hdWipeFrame
_i_hdWipeFrame
Holds the optional i hd wipe frame resource used by the i video subsystem.
View source
# _i_hdWipeSeed
_i_hdWipeSeed
Tracks the mutable i hd wipe seed value used by the i video subsystem.
View source
# _i_hdWipeStart
_i_hdWipeStart
Holds the optional i hd wipe start resource used by the i video subsystem.
View source
# _i_hdWipeY
_i_hdWipeY
Stores the i hd wipe y collection used by the i video subsystem.
View source
# _i_hwnd
_i_hwnd
Holds the optional i hwnd resource used by the i video subsystem.
View source
# _I_IDiv
inline function _I_IDiv(a, b)
Coerces numeric operands and returns their signed quotient truncated toward zero, using zero for a zero divisor.
| Parameter | Type | Default | Description |
|---|
a | dynamic | — | First input operand. |
b | dynamic | — | Second input operand. |
View source
# _I_IndexedToRGBA
function _I_IndexedToRGBA(src, dst, width, height)
Expands validated indexed pixels through the active RGB palette into opaque RGBA output.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_IndexedToRGBA`. |
dst | dynamic | — | Dst value supplied to `_I_IndexedToRGBA`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
View source
# _I_InitBitmapInfo
function _I_InitBitmapInfo()
Builds a top-down 8-bit BITMAPINFO for the physical presentation size and forwards its initial palette to OpenGL.
View source
# _I_InitDefaultPalette
function _I_InitDefaultPalette()
Seeds the 256-entry RGB palette with a grayscale ramp before PLAYPAL is applied.
View source
# _i_inited
_i_inited
Tracks whether i inited is active in the i video subsystem.
View source
# _I_InitKeyMap
function _I_InitKeyMap()
Lazily builds the complete navigation, function, digit, numpad, punctuation, and lowercase-letter key map.
View source
# _I_InitPresentMetrics
function _I_InitPresentMetrics()
Initializes physical framebuffer dimensions used by GDI presentation.
View source
# _I_IntToString
function _I_IntToString(v)
Formats an integer as decimal text without relying on platform string conversion.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | Value consumed by the operation. |
View source
# _i_keyDoom
_i_keyDoom
Stores the i key doom collection used by the i video subsystem.
View source
# _i_keyPrev
_i_keyPrev
Stores the i key prev collection used by the i video subsystem.
View source
# _i_keyVk
_i_keyVk
Stores the i key vk collection used by the i video subsystem.
View source
# _i_lastPresentFrame
_i_lastPresentFrame
Holds the optional i last present frame resource used by the i video subsystem.
View source
# _i_lastPresentRGBA
_i_lastPresentRGBA
Holds the optional i last present rgba resource used by the i video subsystem.
View source
# _i_loadingAnimPhase
_i_loadingAnimPhase
Tracks the mutable i loading anim phase value used by the i video subsystem.
View source
# _i_loadingStatusText
_i_loadingStatusText
Stores the mutable i loading status text text used by the i video subsystem.
View source
# _I_MaybeAutoScreenshot
function _I_MaybeAutoScreenshot()
Writes the current presentation frame only when the one-second automatic capture deadline has elapsed.
View source
# _I_MaybeAutoScreenshotFromFrame
function _I_MaybeAutoScreenshotFromFrame(src, width, height)
Writes a prepared frame when the auto screenshot interval has elapsed.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_MaybeAutoScreenshotFromFrame`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
View source
# _I_MouseButtonsNow
inline function _I_MouseButtonsNow()
Packs the current left, right, and middle Win32 button states into Doom's three-bit mouse mask.
View source
# _i_mouseInited
_i_mouseInited
Tracks whether i mouse inited is active in the i video subsystem.
View source
# _i_mousePoint
_i_mousePoint
Tracks the mutable i mouse point value used by the i video subsystem.
View source
# _i_mousePrevButtons
_i_mousePrevButtons
Tracks the mutable i mouse prev buttons value used by the i video subsystem.
View source
# _i_mousePrevX
_i_mousePrevX
Tracks the mutable i mouse prev x value used by the i video subsystem.
View source
# _i_mousePrevY
_i_mousePrevY
Tracks the mutable i mouse prev y value used by the i video subsystem.
View source
# _i_msg
_i_msg
Tracks the mutable i msg value used by the i video subsystem.
View source
# _i_overlayBase
_i_overlayBase
Holds the optional i overlay base resource used by the i video subsystem.
View source
# _I_OverlayChangedLogicalPixels
function _I_OverlayChangedLogicalPixels(scaled, cur, base)
Copies only logical pixels changed after the world pass, preserving high-res world rendering.
| Parameter | Type | Default | Description |
|---|
scaled | dynamic | — | Scaled value supplied to `_I_OverlayChangedLogicalPixels`. |
cur | dynamic | — | Cur value supplied to `_I_OverlayChangedLogicalPixels`. |
base | dynamic | — | Base value supplied to `_I_OverlayChangedLogicalPixels`. |
View source
# _I_OverlayChangedLogicalPixelsNearest
function _I_OverlayChangedLogicalPixelsNearest(cur, base)
Copies changed logical pixels directly into the high-resolution frame.
| Parameter | Type | Default | Description |
|---|
cur | dynamic | — | Cur value supplied to `_I_OverlayChangedLogicalPixelsNearest`. |
base | dynamic | — | Base value supplied to `_I_OverlayChangedLogicalPixelsNearest`. |
View source
# _I_OverlayLogicalRectNearest
function _I_OverlayLogicalRectNearest(src, x, y, w, h)
Copies a logical-screen rectangle into the high-resolution frame with cheap nearest scaling.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_OverlayLogicalRectNearest`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
w | dynamic | — | W value supplied to `_I_OverlayLogicalRectNearest`. |
h | dynamic | — | H value supplied to `_I_OverlayLogicalRectNearest`. |
View source
# _I_OverlayMarkedLogicalPixels
function _I_OverlayMarkedLogicalPixels(scaled, mask)
Copies logical pixels marked by V_DrawPatch/V_DrawBlock into the high-resolution frame.
| Parameter | Type | Default | Description |
|---|
scaled | dynamic | — | Scaled value supplied to `_I_OverlayMarkedLogicalPixels`. |
mask | dynamic | — | Mask value supplied to `_I_OverlayMarkedLogicalPixels`. |
View source
# _I_OverlayMarkedLogicalPixelsNearest
function _I_OverlayMarkedLogicalPixelsNearest(src, mask)
Copies UI-marked logical pixels directly into the high-resolution frame.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_OverlayMarkedLogicalPixelsNearest`. |
mask | dynamic | — | Mask value supplied to `_I_OverlayMarkedLogicalPixelsNearest`. |
View source
# _I_OverlayPreparedHighresPatches
function _I_OverlayPreparedHighresPatches()
Copies pre-upscaled patch pixels prepared by V_DrawPatch into the presentation frame.
View source
# _i_overlayRowBuffer
_i_overlayRowBuffer
Holds the optional i overlay row buffer resource used by the i video subsystem.
View source
# _I_OverlayScaledRect
function _I_OverlayScaledRect(scaled, x, y, w, h)
Copies a scaled logical-screen rectangle into the high-resolution frame.
| Parameter | Type | Default | Description |
|---|
scaled | dynamic | — | Scaled value supplied to `_I_OverlayScaledRect`. |
x | dynamic | — | Horizontal map- or screen-space coordinate. |
y | dynamic | — | Vertical map- or screen-space coordinate. |
w | dynamic | — | W value supplied to `_I_OverlayScaledRect`. |
h | dynamic | — | H value supplied to `_I_OverlayScaledRect`. |
View source
# _i_ownsWindow
_i_ownsWindow
Tracks whether i owns window is active in the i video subsystem.
View source
# _i_paletteRgb
_i_paletteRgb
Tracks the mutable i palette rgb value used by the i video subsystem.
View source
# _I_PM_REMOVE
const _I_PM_REMOVE = 1
Defines i pm remove for the i video subsystem.
View source
# _I_PollKeyboard
function _I_PollKeyboard()
Polls mapped virtual keys while focused, posts edge-triggered Doom events, and handles the Alt+G renderer toggle.
View source
# _I_PollMouse
function _I_PollMouse()
Converts focused cursor deltas and button changes into Doom mouse events while synchronizing cursor visibility.
View source
# _i_presentBuffer
_i_presentBuffer
Holds the optional i present buffer resource used by the i video subsystem.
View source
# _i_presentHeight
_i_presentHeight
Tracks the mutable i present height value used by the i video subsystem.
View source
# _I_PresentIndexedFrameGL
function _I_PresentIndexedFrameGL(src)
Presents an indexed frame whose dimensions match the physical presentation buffer.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_PresentIndexedFrameGL`. |
View source
# _I_PresentIndexedFrameGLSized
function _I_PresentIndexedFrameGLSized(src, srcW, srcH)
Palette-expands an arbitrary indexed frame, resizes the GL viewport, submits it as RGBA, and swaps buffers.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_PresentIndexedFrameGLSized`. |
srcW | dynamic | — | Src w value supplied to `_I_PresentIndexedFrameGLSized`. |
srcH | dynamic | — | Src h value supplied to `_I_PresentIndexedFrameGLSized`. |
View source
# _i_presentScale
_i_presentScale
Tracks the mutable i present scale value used by the i video subsystem.
View source
# _i_presentWidth
_i_presentWidth
Tracks the mutable i present width value used by the i video subsystem.
View source
# _I_PumpMessages
function _I_PumpMessages()
Drains queued Win32 messages, handles Alt+G directly, and quits if the stored game window was destroyed.
View source
# _I_ReadS32
inline function _I_ReadS32(buf, off)
Decodes a signed 32-bit little-endian field from a Win32 structure buffer.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `_I_ReadS32`. |
off | dynamic | — | Zero-based byte or element offset. |
View source
# _I_ReadU32
inline function _I_ReadU32(buf, off)
Decodes an unsigned 32-bit little-endian field from a Win32 structure buffer.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `_I_ReadU32`. |
off | dynamic | — | Zero-based byte or element offset. |
View source
# _i_rect
_i_rect
Tracks the mutable i rect value used by the i video subsystem.
View source
# _I_ReleaseKeyboard
function _I_ReleaseKeyboard(postEvents)
Clears all remembered key-down edges and optionally posts matching Doom key-up events on focus loss.
| Parameter | Type | Default | Description |
|---|
postEvents | dynamic | — | Post events value supplied to `_I_ReleaseKeyboard`. |
View source
# _I_SaveLastPresentFrame
function _I_SaveLastPresentFrame(src)
Caches the latest full-size indexed frame and its palette-expanded RGBA copy for capture and wipe fallback.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_SaveLastPresentFrame`. |
View source
# _I_SaveLastRGBAFrameSized
function _I_SaveLastRGBAFrameSized(src, width, height)
Converts an indexed frame of arbitrary dimensions for OpenGL presentation.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_SaveLastRGBAFrameSized`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
View source
# _I_SCREENSHOT_INTERVAL_MS
const _I_SCREENSHOT_INTERVAL_MS = 1000
Defines i screenshot interval ms for the i video subsystem.
View source
# _i_screenshotDir
_i_screenshotDir
Stores the mutable i screenshot dir text used by the i video subsystem.
View source
# _i_screenshotDirReady
_i_screenshotDirReady
Tracks whether i screenshot dir ready is active in the i video subsystem.
View source
# _i_screenshotEnabled
_i_screenshotEnabled
Tracks whether i screenshot enabled is active in the i video subsystem.
View source
# _i_screenshotIndex
_i_screenshotIndex
Tracks the mutable i screenshot index value used by the i video subsystem.
View source
# _i_screenshotNextTick
_i_screenshotNextTick
Tracks the mutable i screenshot next tick value used by the i video subsystem.
View source
# _i_screenshotWriteError
_i_screenshotWriteError
Tracks whether i screenshot write error is active in the i video subsystem.
View source
# _I_SetCursorVisible
function _I_SetCursorVisible(visible)
Keeps cursor visibility in sync while game window is active.
| Parameter | Type | Default | Description |
|---|
visible | dynamic | — | Visible value supplied to `_I_SetCursorVisible`. |
View source
# _I_SetWindowTitle
inline function _I_SetWindowTitle(title)
Applies a changed caption once and clears STATIC-class repaint requests caused by title updates.
| Parameter | Type | Default | Description |
|---|
title | dynamic | — | Title value supplied to `_I_SetWindowTitle`. |
View source
# _I_ShouldAutoScreenshot
function _I_ShouldAutoScreenshot()
Returns true when the next auto screenshot interval has elapsed.
View source
# _I_SM_CXSCREEN
const _I_SM_CXSCREEN = 0
Defines i sm cxscreen for the i video subsystem.
View source
# _I_SM_CYSCREEN
const _I_SM_CYSCREEN = 1
Defines i sm cyscreen for the i video subsystem.
View source
# _I_SRCCOPY
const _I_SRCCOPY = 13369376
Defines i srccopy for the i video subsystem.
View source
# _I_SS_OWNERDRAW
const _I_SS_OWNERDRAW = 13
Defines i ss ownerdraw for the i video subsystem.
View source
# _I_STATUSBAR_HEIGHT
const _I_STATUSBAR_HEIGHT = 32
Defines i statusbar height for the i video subsystem.
View source
# _I_StatusOverlayY
inline function _I_StatusOverlayY()
Returns the logical start row of a visible status bar, or screen height when fullscreen rendering must remain unobscured.
View source
# _I_SW_MAXIMIZE
const _I_SW_MAXIMIZE = 3
Defines the maximum i sw maximize accepted by the i video subsystem.
View source
# _I_SW_SHOW
const _I_SW_SHOW = 5
Defines i sw show for the i video subsystem.
View source
# _I_SWP_FRAMECHANGED
const _I_SWP_FRAMECHANGED = 32
Defines i swp framechanged for the i video subsystem.
View source
# _I_SWP_SHOWWINDOW
const _I_SWP_SHOWWINDOW = 64
Defines i swp showwindow for the i video subsystem.
View source
# _i_titleBase
_i_titleBase
Stores the mutable i title base text used by the i video subsystem.
View source
# _i_titleLast
_i_titleLast
Stores the mutable i title last text used by the i video subsystem.
View source
# _I_ToggleRendererHotkey
function _I_ToggleRendererHotkey()
Switches renderer state and invalidates cached high-resolution overlays.
View source
# _I_ToIntOr
function _I_ToIntOr(v, fallback)
Coerces numeric values to truncation-toward-zero integers and returns fallback on failure in `_I_ToIntOr`
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | Value consumed by the operation. |
fallback | dynamic | — | Value returned when the requested conversion or lookup is unavailable. |
View source
# _I_UpdateBitmapColorTable
function _I_UpdateBitmapColorTable()
Converts the active RGB palette into the BGR0 color table embedded in the 8-bit BITMAPINFO.
View source
# _I_UpdateWindowTitle
function _I_UpdateWindowTitle()
Counts presented frames over one-second windows and updates the caption unless a loading status owns it.
View source
# _I_VK_LBUTTON
const _I_VK_LBUTTON = 1
Defines i vk lbutton for the i video subsystem.
View source
# _I_VK_MBUTTON
const _I_VK_MBUTTON = 4
Defines i vk mbutton for the i video subsystem.
View source
# _I_VK_RBUTTON
const _I_VK_RBUTTON = 2
Defines i vk rbutton for the i video subsystem.
View source
# _I_WINDOW_SCALE
const _I_WINDOW_SCALE = 2
Defines i window scale for the i video subsystem.
View source
# _i_windowFailed
_i_windowFailed
Tracks whether i window failed is active in the i video subsystem.
View source
# _I_WM_CLOSE
const _I_WM_CLOSE = 16
Defines i wm close for the i video subsystem.
View source
# _I_WM_DESTROY
const _I_WM_DESTROY = 2
Defines i wm destroy for the i video subsystem.
View source
# _I_WM_ERASEBKGND
const _I_WM_ERASEBKGND = 20
Defines i wm erasebkgnd for the i video subsystem.
View source
# _I_WM_KEYDOWN
const _I_WM_KEYDOWN = 256
Defines i wm keydown for the i video subsystem.
View source
# _I_WM_KEYUP
const _I_WM_KEYUP = 257
Defines i wm keyup for the i video subsystem.
View source
# _I_WM_NCDESTROY
const _I_WM_NCDESTROY = 130
Defines i wm ncdestroy for the i video subsystem.
View source
# _I_WM_PAINT
const _I_WM_PAINT = 15
Defines i wm paint for the i video subsystem.
View source
# _I_WM_QUIT
const _I_WM_QUIT = 18
Defines i wm quit for the i video subsystem.
View source
# _I_WM_SYSKEYDOWN
const _I_WM_SYSKEYDOWN = 260
Defines i wm syskeydown for the i video subsystem.
View source
# _I_WM_SYSKEYUP
const _I_WM_SYSKEYUP = 261
Defines i wm syskeyup for the i video subsystem.
View source
# _I_WriteAutoScreenshot
function _I_WriteAutoScreenshot()
Captures the current presentation selection and delegates indexed BMP creation and numbered file output.
View source
# _I_WriteAutoScreenshotFromFrame
function _I_WriteAutoScreenshotFromFrame(src, width, height)
Writes an auto screenshot from a prepared indexed frame.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `_I_WriteAutoScreenshotFromFrame`. |
width | dynamic | — | Width of the target in pixels or map units. |
height | dynamic | — | Height of the target in pixels or map units. |
View source
# _I_WriteU16
inline function _I_WriteU16(buf, off, value)
Encodes the low 16 bits of a value into a little-endian Win32 structure buffer.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `_I_WriteU16`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
View source
# _I_WriteU32
inline function _I_WriteU32(buf, off, value)
Encodes the low 32 bits of a value into a little-endian Win32 structure buffer.
| Parameter | Type | Default | Description |
|---|
buf | dynamic | — | Buf value supplied to `_I_WriteU32`. |
off | dynamic | — | Zero-based byte or element offset. |
value | dynamic | — | Value consumed by the operation. |
View source
# _I_WS_OVERLAPPEDWINDOW
const _I_WS_OVERLAPPEDWINDOW = 13565952
Defines i ws overlappedwindow for the i video subsystem.
View source
# _I_WS_VISIBLE
const _I_WS_VISIBLE = 268435456
Defines i ws visible for the i video subsystem.
View source
# BringWindowToTop
extern function BringWindowToTop(hwnd as ptr) from "user32.dll" symbol "BringWindowToTop" returns bool
Raises the game window above other top-level windows during activation.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `BringWindowToTop`. |
Returns: Result returned by the native `BringWindowToTop` binding as `bool`.
View source
# CreateDirectoryW
extern function CreateDirectoryW(path as wstr, security as ptr) from "kernel32.dll" symbol "CreateDirectoryW" returns bool
Creates the auto-screenshot output directory when it does not yet exist.
| Parameter | Type | Default | Description |
|---|
path | wstr | — | Filesystem path to process. |
security | ptr | — | Optional native security-attributes pointer. |
Returns: The resulting auto-screenshot output directory when it does not yet exist.
View source
# createnullcursor
function createnullcursor()
Preserves the legacy cursor-construction hook; cursor hiding is handled through ShowCursor instead.
View source
# DestroyWindow
extern function DestroyWindow(hwnd as ptr) from "user32.dll" symbol "DestroyWindow" returns bool
Destroys a game window owned by this video backend.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `DestroyWindow`. |
Returns: Result returned by the native `DestroyWindow` binding as `bool`.
View source
# DispatchMessageW
extern function DispatchMessageW(msg as bytes) from "user32.dll" symbol "DispatchMessageW" returns ptr
Dispatches a retrieved Win32 message to the target window procedure.
| Parameter | Type | Default | Description |
|---|
msg | bytes | — | `bytes` value supplied as msg to `DispatchMessageW`. |
Returns: Result returned by the native `DispatchMessageW` binding as `ptr`.
View source
# Expand4
function Expand4(src, dst, count)
Retains the legacy expansion entry point as a bounded raw byte copy into the destination buffer.
| Parameter | Type | Default | Description |
|---|
src | dynamic | — | Src value supplied to `Expand4`. |
dst | dynamic | — | Dst value supplied to `Expand4`. |
count | dynamic | — | Number of elements or iterations to process. |
View source
# GetAsyncKeyState
extern function GetAsyncKeyState(vkey as int) from "user32.dll" symbol "GetAsyncKeyState" returns int
Polls a virtual key's current high-bit down state for edge-based Doom input events.
| Parameter | Type | Default | Description |
|---|
vkey | int | — | Native virtual-key code to translate. |
Returns: Result returned by the native `GetAsyncKeyState` binding as `int`.
View source
# GetClientRect
extern function GetClientRect(hwnd as ptr, rect as bytes) from "user32.dll" symbol "GetClientRect" returns bool
Reads the current drawable client dimensions for OpenGL resize or GDI scaling.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `GetClientRect`. |
rect | bytes | — | `bytes` value supplied as rect to `GetClientRect`. |
Returns: The requested the current drawable client dimensions for OpenGL resize or GDI scaling.
View source
# GetConsoleWindow
extern function GetConsoleWindow() from "kernel32.dll" symbol "GetConsoleWindow" returns ptr
Retrieves the process console window so startup can reuse or coordinate native window state.
Returns: Result returned by the native `GetConsoleWindow` binding as `ptr`.
View source
# GetCursorPos
extern function GetCursorPos(point as bytes) from "user32.dll" symbol "GetCursorPos" returns bool
Reads screen-space cursor coordinates used to derive relative mouse movement.
| Parameter | Type | Default | Description |
|---|
point | bytes | — | `bytes` value supplied as point to `GetCursorPos`. |
Returns: The requested screen-space cursor coordinates used to derive relative mouse movement.
View source
# GetDC
extern function GetDC(hwnd as ptr) from "user32.dll" symbol "GetDC" returns ptr
Acquires the client device context used for software StretchDIBits presentation.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `GetDC`. |
Returns: Result returned by the native `GetDC` binding as `ptr`.
View source
# GetForegroundWindow
extern function GetForegroundWindow() from "user32.dll" symbol "GetForegroundWindow" returns ptr
Identifies the foreground window so input is released when the game loses focus.
Returns: Result returned by the native `GetForegroundWindow` binding as `ptr`.
View source
# GetSystemMetrics
extern function GetSystemMetrics(index as int) from "user32.dll" symbol "GetSystemMetrics" returns int
Reads desktop dimensions used to size the borderless fullscreen window.
| Parameter | Type | Default | Description |
|---|
index | int | — | Zero-based element or table index. |
Returns: The requested desktop dimensions used to size the borderless fullscreen window.
View source
# GetWindowLongPtrW
extern function GetWindowLongPtrW(hwnd as ptr, index as int) from "user32.dll" symbol "GetWindowLongPtrW" returns ptr
Reads native window style data needed when updating presentation mode.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `GetWindowLongPtrW`. |
index | int | — | Zero-based element or table index. |
Returns: The requested native window style data needed when updating presentation mode.
View source
# grabsharedmemory
function grabsharedmemory(size)
Preserves the legacy shared-framebuffer allocation hook; this backend owns byte buffers directly and returns void.
| Parameter | Type | Default | Description |
|---|
size | dynamic | — | Requested size in bytes or elements. |
View source
# I_BeginHDWipe
function I_BeginHDWipe()
Captures the current high-resolution start frame from OpenGL, the last RGBA frame, or a nearest logical fallback.
View source
# I_CaptureGLFrameToScreen
function I_CaptureGLFrameToScreen()
Composes the current OpenGL world and UI, then reads a logical indexed capture into screen zero.
View source
# I_CaptureLogicalOverlayBase
function I_CaptureLogicalOverlayBase()
Captures the logical framebuffer before late menu/message drawing.
View source
# I_FinishUpdate
function I_FinishUpdate()
Presents one completed frame through native OpenGL, indexed GL fallback, or GDI and performs FPS/screenshot bookkeeping.
View source
# I_GetEvent
function I_GetEvent()
Pumps native messages and posts all currently observed keyboard and mouse input changes.
View source
# I_GetFPS
function I_GetFPS()
Exposes the last completed one-second presentation sample to in-game UI overlays.
View source
# I_HDScreenWipe
function I_HDScreenWipe(tics)
Advances, draws, and swaps the high-resolution melt transition, returning true after every column reaches the bottom.
| Parameter | Type | Default | Description |
|---|
tics | dynamic | — | Duration measured in Doom game tics. |
View source
# I_InitGraphics
function I_InitGraphics()
Allocates video/input buffers, parses display and screenshot options, creates the window, and initializes presentation state.
View source
# I_LoadingPulse
function I_LoadingPulse()
Pumps window/audio updates and draws an animated loading marker while heavy loading code runs.
View source
# I_PollInput
function I_PollInput()
Pumps native messages and posts current keyboard and mouse edge/motion events to Doom.
View source
# I_PrepareHDWipeEnd
function I_PrepareHDWipeEnd()
Captures the destination frame and initializes correlated delayed melt positions for two-logical-pixel column groups.
View source
# I_ReadScreen
function I_ReadScreen(scr)
Copies the complete 320x200 logical framebuffer from screen zero into a caller-provided capture buffer.
| Parameter | Type | Default | Description |
|---|
scr | dynamic | — | Scr value supplied to `I_ReadScreen`. |
View source
# I_SetForceSoftwarePresent
function I_SetForceSoftwarePresent(v)
Forces the next presentation path to use a nearest-scaled logical framebuffer instead of native OpenGL world output.
| Parameter | Type | Default | Description |
|---|
v | dynamic | — | Value consumed by the operation. |
View source
# I_SetLoadingStatus
function I_SetLoadingStatus(text)
Sets or clears loading text in the window caption, resets animation when cleared, and pumps messages immediately.
| Parameter | Type | Default | Description |
|---|
text | dynamic | — | Text to process. |
View source
# I_SetPalette
function I_SetPalette(palette)
Applies the selected gamma table to a 256-color palette and updates both GDI and OpenGL palette consumers.
| Parameter | Type | Default | Description |
|---|
palette | dynamic | — | Palette value supplied to `I_SetPalette`. |
View source
# I_ShutdownGraphics
function I_ShutdownGraphics()
Restores the cursor, shuts down OpenGL, releases the device context, and destroys the owned native window.
View source
# I_StartFrame
function I_StartFrame()
Services native window messages at the start of a rendered frame.
View source
# I_StartTic
function I_StartTic()
Polls and posts platform input events at the start of a simulation tic.
View source
# I_UpdateNoBlit
function I_UpdateNoBlit()
Services the Win32 message queue without presenting or modifying a framebuffer.
View source
# InitExpand
function InitExpand()
Preserves the legacy indexed expansion initializer; physical scaling is performed by current presentation paths.
View source
# InitExpand2
function InitExpand2()
Preserves the second legacy expansion initializer; no precomputed expansion tables are required.
View source
# IsWindow
extern function IsWindow(hwnd as ptr) from "user32.dll" symbol "IsWindow" returns bool
Validates that the stored native handle still names a live window.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `IsWindow`. |
Returns: Result returned by the native `IsWindow` binding as `bool`.
View source
# PeekMessageW
extern function PeekMessageW(msg as bytes, hwnd as ptr, minMsg as u32, maxMsg as u32, removeMsg as u32) from "user32.dll" symbol "PeekMessageW" returns bool
Retrieves and optionally removes queued Win32 messages without blocking the game loop.
| Parameter | Type | Default | Description |
|---|
msg | bytes | — | `bytes` value supplied as msg to `PeekMessageW`. |
hwnd | ptr | — | `ptr` value supplied as hwnd to `PeekMessageW`. |
minMsg | u32 | — | `u32` value supplied as min msg to `PeekMessageW`. |
maxMsg | u32 | — | `u32` value supplied as max msg to `PeekMessageW`. |
removeMsg | u32 | — | `u32` value supplied as remove msg to `PeekMessageW`. |
Returns: Result returned by the native `PeekMessageW` binding as `bool`.
View source
# ReleaseDC
extern function ReleaseDC(hwnd as ptr, hdc as ptr) from "user32.dll" symbol "ReleaseDC" returns int
Releases a client device context previously acquired for software presentation.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `ReleaseDC`. |
hdc | ptr | — | `ptr` value supplied as hdc to `ReleaseDC`. |
Returns: Result returned by the native `ReleaseDC` binding as `int`.
View source
# SetActiveWindow
extern function SetActiveWindow(hwnd as ptr) from "user32.dll" symbol "SetActiveWindow" returns ptr
Activates the game window within the current input thread.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `SetActiveWindow`. |
Returns: Result returned by the native `SetActiveWindow` binding as `ptr`.
View source
# SetForegroundWindow
extern function SetForegroundWindow(hwnd as ptr) from "user32.dll" symbol "SetForegroundWindow" returns bool
Requests foreground keyboard focus for the newly created game window.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `SetForegroundWindow`. |
Returns: Result returned by the native `SetForegroundWindow` binding as `bool`.
View source
# SetStretchBltMode
extern function SetStretchBltMode(hdc as ptr, mode as int) from "gdi32.dll" symbol "SetStretchBltMode" returns int
Selects COLORONCOLOR scaling for crisp software framebuffer presentation.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `ptr` value supplied as hdc to `SetStretchBltMode`. |
mode | int | — | `int` value supplied as mode to `SetStretchBltMode`. |
Returns: Result returned by the native `SetStretchBltMode` binding as `int`.
View source
# SetWindowLongPtrW
extern function SetWindowLongPtrW(hwnd as ptr, index as int, newLong as ptr) from "user32.dll" symbol "SetWindowLongPtrW" returns ptr
Replaces native window style data when updating presentation mode.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `SetWindowLongPtrW`. |
index | int | — | Zero-based element or table index. |
newLong | ptr | — | `ptr` value supplied as new long to `SetWindowLongPtrW`. |
Returns: Result returned by the native `SetWindowLongPtrW` binding as `ptr`.
View source
# SetWindowPos
extern function SetWindowPos(hwnd as ptr, insertAfter as ptr, x as int, y as int, width as int, height as int, flags as u32) from "user32.dll" symbol "SetWindowPos" returns bool
Repositions or resizes the game window while changing fullscreen/windowed presentation.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `SetWindowPos`. |
insertAfter | ptr | — | `ptr` value supplied as insert after to `SetWindowPos`. |
x | int | — | Horizontal map- or screen-space coordinate. |
y | int | — | Vertical map- or screen-space coordinate. |
width | int | — | Width of the target in pixels or map units. |
height | int | — | Height of the target in pixels or map units. |
flags | u32 | — | Bit flags that control the operation. |
Returns: Result returned by the native `SetWindowPos` binding as `bool`.
View source
# SetWindowTextW
extern function SetWindowTextW(hwnd as ptr, text as wstr) from "user32.dll" symbol "SetWindowTextW" returns bool
Updates the game window caption with loading or FPS status.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `SetWindowTextW`. |
text | wstr | — | Text to process. |
Returns: Result returned by the native `SetWindowTextW` binding as `bool`.
View source
# ShowCursor
extern function ShowCursor(show as bool) from "user32.dll" symbol "ShowCursor" returns int
Shows or hides the system cursor.
| Parameter | Type | Default | Description |
|---|
show | bool | — | `bool` value supplied as show to `ShowCursor`. |
Returns: Result returned by the native `ShowCursor` binding as `int`.
View source
# ShowWindow
extern function ShowWindow(hwnd as ptr, cmdShow as int) from "user32.dll" symbol "ShowWindow" returns bool
Applies the requested visibility state to the native game window.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `ShowWindow`. |
cmdShow | int | — | `int` value supplied as cmd show to `ShowWindow`. |
Returns: Result returned by the native `ShowWindow` binding as `bool`.
View source
# StretchDIBits
extern function StretchDIBits(hdc as ptr, xDest as int, yDest as int, destWidth as int, destHeight as int, xSrc as int, ySrc as int, srcWidth as int, srcHeight as int, bits as bytes, bmi as bytes, usage as u32, rop as u32) from "gdi32.dll" symbol "StretchDIBits" returns int
Scales and copies the indexed DIB presentation buffer into the window client area.
| Parameter | Type | Default | Description |
|---|
hdc | ptr | — | `ptr` value supplied as hdc to `StretchDIBits`. |
xDest | int | — | `int` value supplied as x dest to `StretchDIBits`. |
yDest | int | — | `int` value supplied as y dest to `StretchDIBits`. |
destWidth | int | — | Width of dest width in pixels or map units. |
destHeight | int | — | Height of dest height in pixels or map units. |
xSrc | int | — | `int` value supplied as x src to `StretchDIBits`. |
ySrc | int | — | `int` value supplied as y src to `StretchDIBits`. |
srcWidth | int | — | Width of src width in pixels or map units. |
srcHeight | int | — | Height of src height in pixels or map units. |
bits | bytes | — | `bytes` value supplied as bits to `StretchDIBits`. |
bmi | bytes | — | `bytes` value supplied as bmi to `StretchDIBits`. |
usage | u32 | — | `u32` value supplied as usage to `StretchDIBits`. |
rop | u32 | — | `u32` value supplied as rop to `StretchDIBits`. |
Returns: Result returned by the native `StretchDIBits` binding as `int`.
View source
# TranslateMessage
extern function TranslateMessage(msg as bytes) from "user32.dll" symbol "TranslateMessage" returns bool
Generates character messages from a retrieved keyboard message before dispatch.
| Parameter | Type | Default | Description |
|---|
msg | bytes | — | `bytes` value supplied as msg to `TranslateMessage`. |
Returns: Result returned by the native `TranslateMessage` binding as `bool`.
View source
# UpdateWindow
extern function UpdateWindow(hwnd as ptr) from "user32.dll" symbol "UpdateWindow" returns bool
Forces pending client-area painting for a shown native window.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `UpdateWindow`. |
Returns: Result returned by the native `UpdateWindow` binding as `bool`.
View source
# UploadNewPalette
function UploadNewPalette(pal)
Compatibility entry point that applies a newly selected Doom palette through the active gamma-aware path.
| Parameter | Type | Default | Description |
|---|
pal | dynamic | — | Pal value supplied to `UploadNewPalette`. |
View source
# ValidateRect
extern function ValidateRect(hwnd as ptr, rect as ptr) from "user32.dll" symbol "ValidateRect" returns bool
Clears pending client repaint requests after title updates on the built-in STATIC window class.
| Parameter | Type | Default | Description |
|---|
hwnd | ptr | — | `ptr` value supplied as hwnd to `ValidateRect`. |
rect | ptr | — | `ptr` value supplied as rect to `ValidateRect`. |
Returns: Result returned by the native `ValidateRect` binding as `bool`.
View source
# xlatekey
function xlatekey(vk)
Translates a Win32 virtual key to its Doom code, with direct digit and lowercase-letter fallbacks.
| Parameter | Type | Default | Description |
|---|
vk | dynamic | — | Vk value supplied to `xlatekey`. |
View source