MiniQuake

src/miniquake/render_ui_contract.ml

Package
miniquake.render_ui_contract
Reachable
Yes

Imports

Declarations

consoleLogicalHeight

function consoleLogicalHeight(width, height, physicalHeight)

Implements the `consoleLogicalHeight` operation for `miniquake.render_ui_contract` (console logical height).

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
physicalHeightdynamic—The physical height input consumed by `consoleLogicalHeight`.

View source

consoleLogicalWidth

function consoleLogicalWidth(width, height)

Implements the `consoleLogicalWidth` operation for `miniquake.render_ui_contract` (console logical width).

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

consoleScale

function consoleScale(width, height)

Console glyphs use the same nearest-neighbour integer enlargement as the other indexed Quake UI art. Keep the backing text buffer in logical pixels so a resize changes wrapping at the same scale that is actually rendered.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

INVENTORY_HEIGHT

const INVENTORY_HEIGHT = 24

Defines the inventory height value used by `miniquake.render_ui_contract`.

View source

overlayOrder

function overlayOrder(dialog, loading, intermission, gameInput)

Implements the `overlayOrder` operation for `miniquake.render_ui_contract` (overlay order).

ParameterTypeDefaultDescription
dialogdynamic—The dialog input consumed by `overlayOrder`.
loadingdynamic—The loading input consumed by `overlayOrder`.
intermissiondynamic—The intermission input consumed by `overlayOrder`.
gameInputdynamic—The game input input consumed by `overlayOrder`.

View source

set2dStateOrder

function set2dStateOrder()

Update module state for 2d state order.

View source

STATUSBAR_HEIGHT

const STATUSBAR_HEIGHT = 24

Defines the statusbar height value used by `miniquake.render_ui_contract`.

View source

STATUSBAR_WIDTH

const STATUSBAR_WIDTH = 320

Defines the statusbar width value used by `miniquake.render_ui_contract`.

View source

statusbarLines

function statusbarLines(viewSize, intermission)

Implements the `statusbarLines` operation for `miniquake.render_ui_contract` (statusbar lines).

ParameterTypeDefaultDescription
viewSizedynamic—Size of the requested data or resource.
intermissiondynamic—The intermission input consumed by `statusbarLines`.

View source

statusbarPhysicalLines

function statusbarPhysicalLines(width, height, viewSize, intermission)

Implements the `statusbarPhysicalLines` operation for `miniquake.render_ui_contract` (statusbar physical lines).

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.
viewSizedynamic—Size of the requested data or resource.
intermissiondynamic—The intermission input consumed by `statusbarPhysicalLines`.

View source

statusbarScale

function statusbarScale(width, height)

The status bar, inventory strip and their 8-pixel glyphs are authored for the same 320-pixel Quake canvas as the menus. Keeping one integral scale avoids a tiny HUD at high resolutions and prevents filtered indexed art.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

statusbarScaledXOffset

function statusbarScaledXOffset(width, gameType, scale)

Implements the `statusbarScaledXOffset` operation for `miniquake.render_ui_contract` (statusbar scaled x offset).

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
gameTypedynamic—The game type input consumed by `statusbarScaledXOffset`.
scaledynamic—The scale input consumed by `statusbarScaledXOffset`.

View source

statusbarXOffset

function statusbarXOffset(width, gameType)

Implements the `statusbarXOffset` operation for `miniquake.render_ui_contract` (statusbar x offset).

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
gameTypedynamic—The game type input consumed by `statusbarXOffset`.

View source

TGA_BYTES_PER_PIXEL

const TGA_BYTES_PER_PIXEL = 3

Defines the tga bytes per pixel value used by `miniquake.render_ui_contract`.

View source

TGA_HEADER_BYTES

const TGA_HEADER_BYTES = 18

Defines the tga header bytes value used by `miniquake.render_ui_contract`.

View source

tgaByteLength

function tgaByteLength(width, height)

Return tga byte length derived from the active module state.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

viewModelDepthMaximum

function viewModelDepthMaximum()

Implements the `viewModelDepthMaximum` operation for `miniquake.render_ui_contract` (view model depth maximum).

View source

virtualCanvasLayout

function virtualCanvasLayout(width, height)

Implements the `virtualCanvasLayout` operation for `miniquake.render_ui_contract` (virtual canvas layout).

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source

virtualCanvasScale

function virtualCanvasScale(width, height)

GLQuake's menu helpers retain a 320-pixel logical canvas and only center it horizontally. Modern high-DPI modes need enlargement, but fractional or unbounded stretching makes the indexed font and qpics visibly uneven. Use a conservative integral scale: original size around 640x480, 2x around 1080p, and at most 4x on very large displays. Some valid widescreen modes (for example 1176x664) fall just below the legacy 1.5x ratio threshold despite having ample room for a 2x 320x200 canvas; promote those explicitly so the original 8-pixel menu font does not become needlessly tiny.

ParameterTypeDefaultDescription
widthdynamic—Requested width in pixels or data units.
heightdynamic—Requested height in pixels or data units.

View source