MiniQuake2

src/miniquake2/client/ui/config.ml

Provides miniquake2 client ui config facilities for this project.

Package
miniquake2.client.ui.config
Reachable
Yes

Imports

Declarations

applyProductConfig

function applyProductConfig(config, input, commandState, mixer, screen)

Apply product config.

ParameterTypeDefaultDescription
configdynamic—Configuration used by the operation.
inputdynamic—input value consumed by this operation.
commandStatedynamic—commandState value consumed by this operation.
mixerdynamic—mixer value consumed by this operation.
screendynamic—screen value consumed by this operation.

View source

captureProductConfig

function captureProductConfig(input, commandState, mixer, screen)

Capture product config.

ParameterTypeDefaultDescription
inputdynamic—input value consumed by this operation.
commandStatedynamic—commandState value consumed by this operation.
mixerdynamic—mixer value consumed by this operation.
screendynamic—screen value consumed by this operation.

View source

CONFIG_HEADER

const CONFIG_HEADER = "MiniQuake2Config 3"

Defines the config header constant used by the miniquake2 client ui config module.

View source

CONFIG_LEGACY_HEADER

const CONFIG_LEGACY_HEADER = "MiniQuake2Config 1"

Defines the config legacy header constant used by the miniquake2 client ui config module.

View source

CONFIG_MAX_BINDINGS

const CONFIG_MAX_BINDINGS = 256

Defines the config max bindings constant used by the miniquake2 client ui config module.

View source

CONFIG_MAX_BYTES

const CONFIG_MAX_BYTES = 65536

Defines the config max bytes constant used by the miniquake2 client ui config module.

View source

CONFIG_MAX_LINES

const CONFIG_MAX_LINES = 512

Defines the config max lines constant used by the miniquake2 client ui config module.

View source

CONFIG_V2_HEADER

const CONFIG_V2_HEADER = "MiniQuake2Config 2"

Defines the config v2 header constant used by the miniquake2 client ui config module.

View source

decodeProductConfig

function decodeProductConfig(text)

Decode product config.

ParameterTypeDefaultDescription
textdynamic—Text consumed by the operation.

View source

encodeProductConfig

function encodeProductConfig(config)

Encode product config.

ParameterTypeDefaultDescription
configdynamic—Configuration used by the operation.

View source

loadProductConfig

function loadProductConfig(path)

Load product config.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.

View source

miniquake2.client.ui.config.ProductConfig struct

productConfigEncodedNumber

function productConfigEncodedNumber(value)

MiniLang renders an integral float as `3.`. The command tokenizer's numeric grammar deliberately rejects that spelling, so archive integral values as integers and retain the ordinary representation only for fractional values.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

productConfigNumber

function productConfigNumber(token, name)

Return the product config number.

ParameterTypeDefaultDescription
tokendynamic—token value consumed by this operation.
namedynamic—Name of the affected item.

View source

productConfigSafeCommand

function productConfigSafeCommand(command)

Return the product config safe command value.

ParameterTypeDefaultDescription
commanddynamic—command value consumed by this operation.

View source

productConfigValidate

function productConfigValidate(config)

Validate product config.

ParameterTypeDefaultDescription
configdynamic—Configuration used by the operation.

View source

saveProductConfig

function saveProductConfig(path, config)

Save product config.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.
configdynamic—Configuration used by the operation.

View source

selectProductConfig

function selectProductConfig(path, handover)

A live map-to-map snapshot is authoritative over disk. This mirrors the original client's process-lifetime Cvar/key tables while retaining the file as startup and crash-recovery storage.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.
handoverdynamic—handover value consumed by this operation.

View source