MiniQuake

src/miniquake/quakec/edict.ml

Package
miniquake.quakec.edict
Reachable
Yes

Imports

Declarations

allocate

function allocate(machine, firstIndex)

Implements the `allocate` operation for `miniquake.quakec.edict` (allocate).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `allocate`.
firstIndexdynamic—Zero-based index of the requested entry.

View source

appendQuotedPair

function appendQuotedPair(prefix, name, value)

Add state for append quoted pair.

ParameterTypeDefaultDescription
prefixdynamic—The prefix input consumed by `appendQuotedPair`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `appendQuotedPair`.

View source

baseline

function baseline(machine, entityIndex)

Implements the `baseline` operation for `miniquake.quakec.edict` (baseline).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `baseline`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

className

function className(machine, entityIndex)

Return class name derived from the active module state.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `className`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

countEdicts

function countEdicts(machine)

Return count edicts for the active module state.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `countEdicts`.

View source

definitionAtOffset

function definitionAtOffset(definitions, offset)

Return definition at offset derived from the active module state.

ParameterTypeDefaultDescription
definitionsdynamic—The definitions input consumed by `definitionAtOffset`.
offsetdynamic—Zero-based offset of the requested data.

View source

definitionSerializedLength

function definitionSerializedLength(machine, words, definition)

Return definition serialized length derived from the active module state.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `definitionSerializedLength`.
wordsdynamic—The words input consumed by `definitionSerializedLength`.
definitiondynamic—The definition input consumed by `definitionSerializedLength`.

View source

definitionShouldSerialize

function definitionShouldSerialize(words, definition, globalsOnly)

Implements the `definitionShouldSerialize` operation for `miniquake.quakec.edict` (definition should serialize).

ParameterTypeDefaultDescription
wordsdynamic—The words input consumed by `definitionShouldSerialize`.
definitiondynamic—The definition input consumed by `definitionShouldSerialize`.
globalsOnlydynamic—The globals only input consumed by `definitionShouldSerialize`.

View source

diagnostic

function diagnostic(machine, text)

Implements the `diagnostic` operation for `miniquake.quakec.edict` (diagnostic).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `diagnostic`.
textdynamic—Text to parse or process.

View source

displayVectorString

function displayVectorString(words, offset)

Implements the `displayVectorString` operation for `miniquake.quakec.edict` (display vector string).

ParameterTypeDefaultDescription
wordsdynamic—The words input consumed by `displayVectorString`.
offsetdynamic—Zero-based offset of the requested data.

View source

ED_Alloc

function ED_Alloc(machine, firstIndex)

Mirror Quake's ED_Alloc routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_Alloc`.
firstIndexdynamic—Zero-based index of the requested entry.

View source

ED_ClearEdict

function ED_ClearEdict(machine, entityIndex)

Explicit MiniQuake entry-point names provide a one-to-one code-location map.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_ClearEdict`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ED_Count

function ED_Count(machine)

Mirror Quake's ED_Count routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_Count`.

View source

ED_FieldAtOfs

function ED_FieldAtOfs(machine, offset)

Mirror Quake's ED_FieldAtOfs routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_FieldAtOfs`.
offsetdynamic—Zero-based offset of the requested data.

View source

ED_FindField

function ED_FindField(machine, name)

Mirror Quake's ED_FindField routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_FindField`.
namedynamic—Stable name that identifies the requested object or option.

View source

ED_FindFunction

function ED_FindFunction(machine, name)

Mirror Quake's ED_FindFunction routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_FindFunction`.
namedynamic—Stable name that identifies the requested object or option.

View source

ED_FindGlobal

function ED_FindGlobal(machine, name)

Mirror Quake's ED_FindGlobal routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_FindGlobal`.
namedynamic—Stable name that identifies the requested object or option.

View source

ED_Free

function ED_Free(machine, entityIndex)

Mirror Quake's ED_Free routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_Free`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ED_GlobalAtOfs

function ED_GlobalAtOfs(machine, offset)

Mirror Quake's ED_GlobalAtOfs routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_GlobalAtOfs`.
offsetdynamic—Zero-based offset of the requested data.

View source

ED_LoadFromFile

function ED_LoadFromFile(machine, map, skill, deathmatch, firstDynamicIndex)

Mirror Quake's ED_LoadFromFile routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_LoadFromFile`.
mapdynamic—The map input consumed by `ED_LoadFromFile`.
skilldynamic—The skill input consumed by `ED_LoadFromFile`.
deathmatchdynamic—The deathmatch input consumed by `ED_LoadFromFile`.
firstDynamicIndexdynamic—Zero-based index of the requested entry.

View source

ED_NewString

function ED_NewString(text)

Mirror Quake's ED_NewString routine and its observable state changes.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

ED_ParseEdict

function ED_ParseEdict(machine, entityIndex, entity)

Mirror Quake's ED_ParseEdict routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_ParseEdict`.
entityIndexdynamic—Zero-based index of the requested entry.
entitydynamic—Entity affected by the operation.

View source

ED_ParseEpair

function ED_ParseEpair(machine, entityIndex, definition, value, globalBase)

Mirror Quake's ED_ParseEpair routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_ParseEpair`.
entityIndexdynamic—Zero-based index of the requested entry.
definitiondynamic—The definition input consumed by `ED_ParseEpair`.
valuedynamic—Value consumed by `ED_ParseEpair`.
globalBasedynamic—The global base input consumed by `ED_ParseEpair`.

View source

ED_ParseGlobals

function ED_ParseGlobals(machine, entity)

Mirror Quake's ED_ParseGlobals routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_ParseGlobals`.
entitydynamic—Entity affected by the operation.

View source

ED_Print

function ED_Print(machine, entityIndex)

Mirror Quake's ED_Print routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_Print`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ED_PrintEdict_f

function ED_PrintEdict_f(machine, entityIndex)

Mirror Quake's ED_PrintEdict_f routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_PrintEdict_f`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ED_PrintEdicts

function ED_PrintEdicts(machine)

Mirror Quake's ED_PrintEdicts routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_PrintEdicts`.

View source

ED_PrintNum

function ED_PrintNum(machine, entityIndex)

Mirror Quake's ED_PrintNum routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_PrintNum`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ED_Write

function ED_Write(machine, entityIndex)

Mirror Quake's ED_Write routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_Write`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

ED_WriteGlobals

function ED_WriteGlobals(machine)

Mirror Quake's ED_WriteGlobals routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `ED_WriteGlobals`.

View source

EDICT_NUM

function EDICT_NUM(machine, entityIndex)

Mirror Quake's EDICT_NUM routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `EDICT_NUM`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

edictCeil

function edictCeil(value)

Implements the `edictCeil` operation for `miniquake.quakec.edict` (edict ceil).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `edictCeil`.

View source

edictFloor

function edictFloor(value)

Implements the `edictFloor` operation for `miniquake.quakec.edict` (edict floor).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `edictFloor`.

View source

fieldDefinition

function fieldDefinition(machine, name)

Implements the `fieldDefinition` operation for `miniquake.quakec.edict` (field definition).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `fieldDefinition`.
namedynamic—Stable name that identifies the requested object or option.

View source

fixedOneDecimal

function fixedOneDecimal(value)

Implements the `fixedOneDecimal` operation for `miniquake.quakec.edict` (fixed one decimal).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `fixedOneDecimal`.

View source

fixedSixDecimals

function fixedSixDecimals(value)

Implements the `fixedSixDecimals` operation for `miniquake.quakec.edict` (fixed six decimals).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `fixedSixDecimals`.

View source

fixedSixDecimalsWord

function fixedSixDecimalsWord(rawWord)

Implements the `fixedSixDecimalsWord` operation for `miniquake.quakec.edict` (fixed six decimals word).

ParameterTypeDefaultDescription
rawWorddynamic—The raw word input consumed by `fixedSixDecimalsWord`.

View source

free

function free(machine, entityIndex)

Implements the `free` operation for `miniquake.quakec.edict` (free).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `free`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

GetEdictFieldValue

function GetEdictFieldValue(machine, entityIndex, name)

Return edict field value.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `GetEdictFieldValue`.
entityIndexdynamic—Zero-based index of the requested entry.
namedynamic—Stable name that identifies the requested object or option.

View source

globalDefinition

function globalDefinition(machine, name)

Implements the `globalDefinition` operation for `miniquake.quakec.edict` (global definition).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `globalDefinition`.
namedynamic—Stable name that identifies the requested object or option.

View source

initializeGlobals

function initializeGlobals(machine, mapName, skill, deathmatch, coop, serverFlags)

Initialize state for initialize globals.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `initializeGlobals`.
mapNamedynamic—Name of the map to load or inspect.
skilldynamic—The skill input consumed by `initializeGlobals`.
deathmatchdynamic—The deathmatch input consumed by `initializeGlobals`.
coopdynamic—The coop input consumed by `initializeGlobals`.
serverFlagsdynamic—The server flags input consumed by `initializeGlobals`.

View source

initializeWorldEntity

function initializeWorldEntity(machine, map)

SV_SpawnServer initializes the world edict before ED_LoadFromFile. The entity text then contributes keys such as message/sounds/worldtype while the engine-owned model, bounds and collision fields stay authoritative.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `initializeWorldEntity`.
mapdynamic—The map input consumed by `initializeWorldEntity`.

View source

loadMapEntities

function loadMapEntities(machine, map, skill, deathmatch)

Read and validate map entities.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `loadMapEntities`.
mapdynamic—The map input consumed by `loadMapEntities`.
skilldynamic—The skill input consumed by `loadMapEntities`.
deathmatchdynamic—The deathmatch input consumed by `loadMapEntities`.

View source

loadMapEntitiesFrom

function loadMapEntitiesFrom(machine, map, skill, deathmatch, firstDynamicIndex)

Read and validate map entities from.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `loadMapEntitiesFrom`.
mapdynamic—The map input consumed by `loadMapEntitiesFrom`.
skilldynamic—The skill input consumed by `loadMapEntitiesFrom`.
deathmatchdynamic—The deathmatch input consumed by `loadMapEntitiesFrom`.
firstDynamicIndexdynamic—Zero-based index of the requested entry.

View source

newString

function newString(text)

Create and initialize string.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

NUM_FOR_EDICT

function NUM_FOR_EDICT(machine, entityIndex)

Mirror Quake's NUM_FOR_EDICT routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `NUM_FOR_EDICT`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

parseEntity

function parseEntity(machine, entityIndex, entity)

Read and validate entity.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `parseEntity`.
entityIndexdynamic—Zero-based index of the requested entry.
entitydynamic—Entity affected by the operation.

View source

PR_GlobalString

function PR_GlobalString(machine, offset)

Mirror Quake's PR_GlobalString routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `PR_GlobalString`.
offsetdynamic—Zero-based offset of the requested data.

View source

PR_GlobalStringNoContents

function PR_GlobalStringNoContents(machine, offset)

Mirror Quake's PR_GlobalStringNoContents routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `PR_GlobalStringNoContents`.
offsetdynamic—Zero-based offset of the requested data.

View source

PR_Init

function PR_Init()

Mirror Quake's PR_Init routine and its observable state changes.

View source

PR_LoadProgs

function PR_LoadProgs(data, filename)

Mirror Quake's PR_LoadProgs routine and its observable state changes.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
filenamedynamic—Path of the file to process.

View source

PR_UglyValueString

function PR_UglyValueString(machine, valueType, words, offset)

Mirror Quake's PR_UglyValueString routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `PR_UglyValueString`.
valueTypedynamic—The value type input consumed by `PR_UglyValueString`.
wordsdynamic—The words input consumed by `PR_UglyValueString`.
offsetdynamic—Zero-based offset of the requested data.

View source

PR_ValueString

function PR_ValueString(machine, valueType, words, offset)

Mirror Quake's PR_ValueString routine and its observable state changes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `PR_ValueString`.
valueTypedynamic—The value type input consumed by `PR_ValueString`.
wordsdynamic—The words input consumed by `PR_ValueString`.
offsetdynamic—Zero-based offset of the requested data.

View source

printEdict

function printEdict(machine, entityIndex)

Format and emit edict.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `printEdict`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

quotedPairLine

function quotedPairLine(name, value)

Implements the `quotedPairLine` operation for `miniquake.quakec.edict` (quoted pair line).

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `quotedPairLine`.

View source

serializeDefinitions

function serializeDefinitions(machine, words, definitions, firstIndex, globalsOnly)

Encode and write definitions.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `serializeDefinitions`.
wordsdynamic—The words input consumed by `serializeDefinitions`.
definitionsdynamic—The definitions input consumed by `serializeDefinitions`.
firstIndexdynamic—Zero-based index of the requested entry.
globalsOnlydynamic—The globals only input consumed by `serializeDefinitions`.

View source

setGlobalByName

function setGlobalByName(machine, name, value)

Update module state for global by name.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `setGlobalByName`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `setGlobalByName`.

View source

setKeyValue

function setKeyValue(machine, entityIndex, key, value)

Update module state for key value.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `setKeyValue`.
entityIndexdynamic—Zero-based index of the requested entry.
keydynamic—Key used to identify the requested entry.
valuedynamic—Value consumed by `setKeyValue`.

View source

setWorldFloat

function setWorldFloat(machine, name, value)

Update module state for world float.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `setWorldFloat`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `setWorldFloat`.

View source

setWorldString

function setWorldString(machine, name, value)

Update module state for world string.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `setWorldString`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `setWorldString`.

View source

setWorldVector

function setWorldVector(machine, name, value)

Update module state for world vector.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `setWorldVector`.
namedynamic—Stable name that identifies the requested object or option.
valuedynamic—Value consumed by `setWorldVector`.

View source

shouldInhibit

function shouldInhibit(machine, entityIndex, skill, deathmatch)

Report whether should inhibit.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `shouldInhibit`.
entityIndexdynamic—Zero-based index of the requested entry.
skilldynamic—The skill input consumed by `shouldInhibit`.
deathmatchdynamic—The deathmatch input consumed by `shouldInhibit`.

View source

trimTrailingSpaces

function trimTrailingSpaces(text)

Implements the `trimTrailingSpaces` operation for `miniquake.quakec.edict` (trim trailing spaces).

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

typeSize

function typeSize(valueType)

Implements the `typeSize` operation for `miniquake.quakec.edict` (type size).

ParameterTypeDefaultDescription
valueTypedynamic—The value type input consumed by `typeSize`.

View source

uglyVectorString

function uglyVectorString(words, offset)

Implements the `uglyVectorString` operation for `miniquake.quakec.edict` (ugly vector string).

ParameterTypeDefaultDescription
wordsdynamic—The words input consumed by `uglyVectorString`.
offsetdynamic—Zero-based offset of the requested data.

View source

valueString

function valueString(machine, valueType, words, offset, ugly)

Implements the `valueString` operation for `miniquake.quakec.edict` (value string).

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `valueString`.
valueTypedynamic—The value type input consumed by `valueString`.
wordsdynamic—The words input consumed by `valueString`.
offsetdynamic—Zero-based offset of the requested data.
uglydynamic—The ugly input consumed by `valueString`.

View source

vectorComponentDefinition

function vectorComponentDefinition(name)

Implements the `vectorComponentDefinition` operation for `miniquake.quakec.edict` (vector component definition).

ParameterTypeDefaultDescription
namedynamic—Stable name that identifies the requested object or option.

View source

voidValueString

function voidValueString()

Implements the `voidValueString` operation for `miniquake.quakec.edict` (void value string).

View source

wordsAreZero

function wordsAreZero(words, offset, count)

Implements the `wordsAreZero` operation for `miniquake.quakec.edict` (words are zero).

ParameterTypeDefaultDescription
wordsdynamic—The words input consumed by `wordsAreZero`.
offsetdynamic—Zero-based offset of the requested data.
countdynamic—Number of entries or units to process.

View source

writeDefinitionBytes

function writeDefinitionBytes(machine, words, definition, output, cursor)

Encode and write definition bytes.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `writeDefinitionBytes`.
wordsdynamic—The words input consumed by `writeDefinitionBytes`.
definitiondynamic—The definition input consumed by `writeDefinitionBytes`.
outputdynamic—Destination buffer that receives the serialized definition.
cursordynamic—The cursor input consumed by `writeDefinitionBytes`.

View source

writeEdict

function writeEdict(machine, entityIndex)

Encode and write edict.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `writeEdict`.
entityIndexdynamic—Zero-based index of the requested entry.

View source

writeGlobals

function writeGlobals(machine)

Encode and write globals.

ParameterTypeDefaultDescription
machinedynamic—The machine input consumed by `writeGlobals`.

View source