# apply
function apply(server, saved)Apply the requested value to the active subsystem state.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
saved | dynamic | — | The saved input consumed by `apply`. |
src/miniquake/savegame.mlminiquake/array_util.ml as arrayutil → src/miniquake/array_util.mlminiquake/common.ml as common → src/miniquake/common.mlminiquake/constants.ml as c → src/miniquake/constants.mlminiquake/format/bsp.ml as bsp → src/miniquake/format/bsp.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/protocol_text.ml as protocolText → src/miniquake/protocol_text.mlminiquake/quakec/edict.ml as qcedict → src/miniquake/quakec/edict.mlminiquake/quakec/vm.ml as vm → src/miniquake/quakec/vm.mlminiquake/types.ml as t → src/miniquake/types.mlfunction apply(server, saved)Apply the requested value to the active subsystem state.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
saved | dynamic | — | The saved input consumed by `apply`. |
function decodeText(data)Decodes text for `miniquake.savegame`.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
function displayComment(comment)Implements the `displayComment` operation for `miniquake.savegame` (display comment).
| Parameter | Type | Default | Description |
|---|---|---|---|
comment | dynamic | — | The comment input consumed by `displayComment`. |
function encodeText(text)Encodes text for `miniquake.savegame`.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
function fieldName(machine, offset)Return field name derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `fieldName`. |
offset | dynamic | — | Zero-based offset of the requested data. |
function filename(name)Implements the `filename` operation for `miniquake.savegame` (filename).
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
function floatLine(data, offset, label)Implements the `floatLine` operation for `miniquake.savegame` (float line).
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset of the requested data. |
label | dynamic | — | The label input consumed by `floatLine`. |
function functionName(machine, index)Return function name derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `functionName`. |
index | dynamic | — | Zero-based index of the requested entry. |
function hasSuffixInsensitive(text, suffix)Report whether suffix insensitive.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
suffix | dynamic | — | The suffix input consumed by `hasSuffixInsensitive`. |
function Host_SavegameComment(levelName, killed, total)host_cmd.c entry points. SaveGamestate/LoadGamestate are used only by the QUAKE2 compile-time path in the reference, but retain useful in-memory counterparts so the original functions have concrete MiniLang code sites.
| Parameter | Type | Default | Description |
|---|---|---|---|
levelName | dynamic | — | Name that identifies the requested value or resource. |
killed | dynamic | — | The killed input consumed by `Host_SavegameComment`. |
total | dynamic | — | The total input consumed by `Host_SavegameComment`. |
function inspectComment(text)Inspect comment and emit its decoded metadata.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
function inspectCommentBytes(data)Inspect comment bytes and emit its decoded metadata.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
function LoadGamestate(server, text)Read and validate gamestate.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
text | dynamic | — | Text to parse or process. |
function LoadGamestateBytes(server, data)Read and validate gamestate bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
data | dynamic | — | Input data consumed by the operation. |
function namedGlobalFloat(machine, name)Implements the `namedGlobalFloat` operation for `miniquake.savegame` (named global float).
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `namedGlobalFloat`. |
name | dynamic | — | Stable name that identifies the requested object or option. |
function numberLine(data, offset, label)Implements the `numberLine` operation for `miniquake.savegame` (number line).
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset of the requested data. |
label | dynamic | — | The label input consumed by `numberLine`. |
function paddedComment(levelName, killed, total)Implements the `paddedComment` operation for `miniquake.savegame` (padded comment).
| Parameter | Type | Default | Description |
|---|---|---|---|
levelName | dynamic | — | Name that identifies the requested value or resource. |
killed | dynamic | — | The killed input consumed by `paddedComment`. |
total | dynamic | — | The total input consumed by `paddedComment`. |
function parse(text)Implements the `parse` operation for `miniquake.savegame` (parse).
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
function parseBytes(data)Parses bytes for `miniquake.savegame`.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
function readLine(data, offset)Read and validate line.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset of the requested data. |
const SAVEGAME_COMMENT_LENGTH = 39Defines the savegame comment length value used by `miniquake.savegame`.
const SAVEGAME_VERSION = 5Defines the savegame version value used by `miniquake.savegame`.
function SaveGamestate(server)Encode and write gamestate.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
function SaveGamestateBytes(server)Encode and write gamestate bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
function serializeBytes(server)fopen(..., "w") writes the one-byte Quake text stream verbatim. Keep the in-memory string API for tests and command code, but make byte I/O the authoritative savegame boundary.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
function serializeServer(server)Encode and write server.
| Parameter | Type | Default | Description |
|---|---|---|---|
server | dynamic | — | Server state participating in the operation. |
function typeSize(valueType)Implements the `typeSize` operation for `miniquake.savegame` (type size).
| Parameter | Type | Default | Description |
|---|---|---|---|
valueType | dynamic | — | The value type input consumed by `typeSize`. |
function uglyValue(machine, words, definition)Return ugly value derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `uglyValue`. |
words | dynamic | — | The words input consumed by `uglyValue`. |
definition | dynamic | — | The definition input consumed by `uglyValue`. |
function vectorComponentName(name)Return vector component name derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
function wordsAreZero(words, offset, count)Implements the `wordsAreZero` operation for `miniquake.savegame` (words are zero).
| Parameter | Type | Default | Description |
|---|---|---|---|
words | dynamic | — | The words input consumed by `wordsAreZero`. |
offset | dynamic | — | Zero-based offset of the requested data. |
count | dynamic | — | Number of entries or units to process. |
function writeDefinitions(machine, words, definitions, globalsOnly)Encode and write definitions.
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `writeDefinitions`. |
words | dynamic | — | The words input consumed by `writeDefinitions`. |
definitions | dynamic | — | The definitions input consumed by `writeDefinitions`. |
globalsOnly | dynamic | — | The globals only input consumed by `writeDefinitions`. |
function writeEdict(machine, entityIndex)Encode and write edict.
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `writeEdict`. |
entityIndex | dynamic | — | Zero-based index of the requested entry. |
function writeGlobals(machine)Encode and write globals.
| Parameter | Type | Default | Description |
|---|---|---|---|
machine | dynamic | — | The machine input consumed by `writeGlobals`. |