MiniQuake

src/miniquake/artifact_compat.ml

Package
miniquake.artifact_compat
Reachable
No

Imports

Declarations

bytesCrc

function bytesCrc(data)

Return bytes crc derived from the active module state.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.

View source

bytesEqual

function bytesEqual(left, right)

Assert exact equality and report both values on failure.

ParameterTypeDefaultDescription
leftdynamic—The left input consumed by `bytesEqual`.
rightdynamic—The right input consumed by `bytesEqual`.

View source

CONTRACT_TEXT

const CONTRACT_TEXT = "artifact-compat|demo-protocol15|retail-demos=3|save-version=5|save-roundtrip|deterministic-evidence"

Defines the contract text value used by `miniquake.artifact_compat`.

View source

contractVector

function contractVector()

Implements the `contractVector` operation for `miniquake.artifact_compat` (contract vector).

View source

demoSummary

function demoSummary(recording, report, sourceBytes)

Return demo summary derived from the active module state.

ParameterTypeDefaultDescription
recordingdynamic—The recording input consumed by `demoSummary`.
reportdynamic—The report input consumed by `demoSummary`.
sourceBytesdynamic—Byte data consumed by the operation.

View source

FINGERPRINT

const FINGERPRINT = 1498615953

Defines the fingerprint value used by `miniquake.artifact_compat`.

View source

firstByteDifference

function firstByteDifference(left, right)

Return [first differing offset, left byte, right byte, left length, right length]. Byte values are -1 when the corresponding stream ended first.

ParameterTypeDefaultDescription
leftdynamic—The left input consumed by `firstByteDifference`.
rightdynamic—The right input consumed by `firstByteDifference`.

View source

pairListDifference

function pairListDifference(leftPairs, rightPairs, label)

A Quake version-5 savegame is a deliberately lossy text snapshot. Runtime floats are written with six decimals and only DEF_SAVEGLOBAL globals are archived. Compare the parsed save-domain state instead of the complete live VM state, which also contains transient globals that the original format does not preserve.

ParameterTypeDefaultDescription
leftPairsdynamic—The left pairs input consumed by `pairListDifference`.
rightPairsdynamic—The right pairs input consumed by `pairListDifference`.
labeldynamic—The label input consumed by `pairListDifference`.

View source

RETAIL_DEMO_COUNT

const RETAIL_DEMO_COUNT = 3

Defines the retail demo count value used by `miniquake.artifact_compat`.

View source

retailDemoNames

function retailDemoNames()

Return retail demo names derived from the active module state.

View source

SAVE_FLOAT_FORMAT

const SAVE_FLOAT_FORMAT = "msvcrt_percent_f"

Defines the save float format value used by `miniquake.artifact_compat`.

View source

SAVEGAME_VERSION

const SAVEGAME_VERSION = 5

Defines the savegame version value used by `miniquake.artifact_compat`.

View source

saveSemanticDifference

function saveSemanticDifference(left, right)

Encode and write semantic difference.

ParameterTypeDefaultDescription
leftdynamic—The left input consumed by `saveSemanticDifference`.
rightdynamic—The right input consumed by `saveSemanticDifference`.

View source

saveSemanticEqual

function saveSemanticEqual(left, right)

Compare semantic equal.

ParameterTypeDefaultDescription
leftdynamic—The left input consumed by `saveSemanticEqual`.
rightdynamic—The right input consumed by `saveSemanticEqual`.

View source

saveSummary

function saveSummary(saveBytes, mapName, timeValue, edictHash, globalsHash)

Encode and write summary.

ParameterTypeDefaultDescription
saveBytesdynamic—Byte data consumed by the operation.
mapNamedynamic—Name of the map to load or inspect.
timeValuedynamic—The time value input consumed by `saveSummary`.
edictHashdynamic—The edict hash input consumed by `saveSummary`.
globalsHashdynamic—The globals hash input consumed by `saveSummary`.

View source

STATUS

const STATUS = "artifact_compat_109_frozen_v1"

Defines the status value used by `miniquake.artifact_compat`.

View source