MiniQuake2

src/miniquake2/client/assets/registry.ml

Provides miniquake2 client assets registry facilities for this project.

Package
miniquake2.client.assets.registry
Reachable
Yes

Imports

Declarations

appendBounded

function appendBounded(values, value, maximum)

Append bounded.

ParameterTypeDefaultDescription
valuesdynamic—values value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.
maximumdynamic—maximum value consumed by this operation.

View source

bindings

function bindings(state)

Return the bindings value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

cached

function cached(values, name, generation)

Report whether cached.

ParameterTypeDefaultDescription
valuesdynamic—values value consumed by this operation.
namedynamic—Name of the affected item.
generationdynamic—generation value consumed by this operation.

View source

cacheNamed

function cacheNamed(state, kind, entry)

Cache named.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
kinddynamic—kind value consumed by this operation.
entrydynamic—entry value consumed by this operation.

View source

callbacks

function callbacks(loadModel, loadSkin, loadSound, onMissing)

Performs the callbacks operation for the miniquake2 client assets registry module.

ParameterTypeDefaultDescription
loadModeldynamic—loadModel value consumed by this operation.
loadSkindynamic—loadSkin value consumed by this operation.
loadSounddynamic—loadSound value consumed by this operation.
onMissingdynamic—onMissing value consumed by this operation.

View source

clientAssetBindingSlot

clientAssetBindingSlot

Stores module-wide client asset binding slot state for the miniquake2 client assets registry module.

View source

miniquake2.client.assets.registry.ClientAssetBindingSlot struct

clientAssetBoundModelIndex

function clientAssetBoundModelIndex(index)

Return the client asset bound model index.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

clientAssetBoundModelName

function clientAssetBoundModelName(name)

Return the client asset bound model name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

clientAssetBoundPlayerModel

function clientAssetBoundPlayerModel(index)

Return the client asset bound player model value.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

clientAssetBoundPlayerSkin

function clientAssetBoundPlayerSkin(index)

Return the client asset bound player skin value.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

clientAssetBoundPlayerWeapon

function clientAssetBoundPlayerWeapon(index, weaponIndex)

Return the client asset bound player weapon value.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.
weaponIndexdynamic—Zero-based index of weapon.

View source

clientAssetBoundSkinName

function clientAssetBoundSkinName(name)

Return the client asset bound skin name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

clientAssetBoundSoundEntity

function clientAssetBoundSoundEntity(entityNumber, soundIndex, soundName)

Return the client asset bound sound entity value.

ParameterTypeDefaultDescription
entityNumberdynamic—entityNumber value consumed by this operation.
soundIndexdynamic—Zero-based index of sound.
soundNamedynamic—soundName value consumed by this operation.

View source

clientAssetBoundSoundIndex

function clientAssetBoundSoundIndex(index)

Return the client asset bound sound index.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the affected item.

View source

clientAssetBoundSoundName

function clientAssetBoundSoundName(name)

Return the client asset bound sound name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

clientIdentity

function clientIdentity(value)

Return the client identity value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

clientInfo

function clientInfo(state, index)

Return the client info value.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.

View source

containsTraversal

function containsTraversal(value)

Report whether contains traversal.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

create

function create(loaders)

Creates create for the miniquake2 client assets registry module.

ParameterTypeDefaultDescription
loadersdynamic—loaders value consumed by this operation.

View source

createLenient

function createLenient(loadModel, loadSkin, loadSound)

Create lenient.

ParameterTypeDefaultDescription
loadModeldynamic—loadModel value consumed by this operation.
loadSkindynamic—loadSkin value consumed by this operation.
loadSounddynamic—loadSound value consumed by this operation.

View source

ignoreMissing

function ignoreMissing(value)

Report whether ignore missing.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

indexed

function indexed(entry, index, name)

Return the indexed value.

ParameterTypeDefaultDescription
entrydynamic—entry value consumed by this operation.
indexdynamic—Zero-based index of the affected item.
namedynamic—Name of the affected item.

View source

inlineModelName

function inlineModelName(name)

Return the inline model name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

loadClientInfo

function loadClientInfo(state, value)

Load client info.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
valuedynamic—Value consumed or transformed by the operation.

View source

loadModelAsset

function loadModelAsset(state, index, name)

Load model asset.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.
namedynamic—Name of the affected item.

View source

loadOptionalSkinAsset

function loadOptionalSkinAsset(state, name)

CL_LoadClientinfo probes an authored player skin, optionally retries that skin on the male model, and finally uses male/grunt. The first two misses are normal fallback control flow and must not pollute the precache-missing list.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

loadOptionalSoundAsset

function loadOptionalSoundAsset(state, name)

S_RegisterSexedSound probes a model-specific file without treating absence as a missing precache asset: failure is the normal path to the male alias.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

loadSkinAsset

function loadSkinAsset(state, name)

Load skin asset.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

loadSoundAsset

function loadSoundAsset(state, index, name)

Load sound asset.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.
namedynamic—Name of the affected item.

View source

MAX_CLIENT_WEAPON_MODELS

const MAX_CLIENT_WEAPON_MODELS = 20

Defines the max client weapon models constant used by the miniquake2 client assets registry module.

View source

MAX_MISSING_ASSETS

const MAX_MISSING_ASSETS = 512

Defines the max missing assets constant used by the miniquake2 client assets registry module.

View source

MAX_NAMED_ASSETS

const MAX_NAMED_ASSETS = 256

Defines the max named assets constant used by the miniquake2 client assets registry module.

View source

missingAssets

function missingAssets(state)

Report whether missing assets.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.

View source

missingNamed

function missingNamed(state, kind, index, name, reason)

Report whether missing named.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
kinddynamic—kind value consumed by this operation.
indexdynamic—Zero-based index of the affected item.
namedynamic—Name of the affected item.
reasondynamic—reason value consumed by this operation.

View source

noteMissing

function noteMissing(state, kind, index, name, reason)

Report whether note missing.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
kinddynamic—kind value consumed by this operation.
indexdynamic—Zero-based index of the affected item.
namedynamic—Name of the affected item.
reasondynamic—reason value consumed by this operation.

View source

refreshClientInfos

function refreshClientInfos(state, configStrings)

Refresh client infos.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
configStringsdynamic—configStrings value consumed by this operation.

View source

refreshConfigStrings

function refreshConfigStrings(state, configStrings)

Quake II may allocate model, sound and image configstrings after sign-on. Weapon projectiles are the common case: g_weapon.c calls modelindex when a shot is spawned, so an active client must register the new indexed asset without restarting the whole map registration generation.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
configStringsdynamic—configStrings value consumed by this operation.

View source

registerConfigStrings

function registerConfigStrings(state, configStrings, mapName)

Register config strings.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
configStringsdynamic—configStrings value consumed by this operation.
mapNamedynamic—mapName value consumed by this operation.

View source

releaseBindings

function releaseBindings()

Release bindings.

View source

reset

function reset(state, mapName)

Performs the reset operation for the miniquake2 client assets registry module.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
mapNamedynamic—mapName value consumed by this operation.

View source

resolveModelIndex

function resolveModelIndex(state, index)

Resolve model index.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.

View source

resolveModelName

function resolveModelName(state, name)

Resolve model name.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

resolvePlayerModel

function resolvePlayerModel(state, index)

Resolve player model.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.

View source

resolvePlayerSkin

function resolvePlayerSkin(state, index)

Resolve player skin.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.

View source

resolvePlayerWeapon

function resolvePlayerWeapon(state, index, weaponIndex)

Resolve player weapon.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.
weaponIndexdynamic—Zero-based index of weapon.

View source

resolveSkinName

function resolveSkinName(state, name)

Resolve skin name.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

resolveSoundForEntity

function resolveSoundForEntity(state, entityNumber, soundIndex, soundName)

Resolve sound for entity.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
entityNumberdynamic—entityNumber value consumed by this operation.
soundIndexdynamic—Zero-based index of sound.
soundNamedynamic—soundName value consumed by this operation.

View source

resolveSoundIndex

function resolveSoundIndex(state, index)

Resolve sound index.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
indexdynamic—Zero-based index of the affected item.

View source

resolveSoundName

function resolveSoundName(state, name)

Resolve sound name.

ParameterTypeDefaultDescription
statedynamic—Mutable state inspected or updated by the operation.
namedynamic—Name of the affected item.

View source

safeModelName

function safeModelName(name)

Return the safe model name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

safeRegularName

function safeRegularName(name)

Return the safe regular name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

safeSoundName

function safeSoundName(name)

Return the safe sound name.

ParameterTypeDefaultDescription
namedynamic—Name of the affected item.

View source

textSlice

inline function textSlice(value, start, count)

Performs the textSlice operation for the miniquake2 client assets registry module.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
startdynamic—start value consumed by this operation.
countdynamic—Number of items or units to process.

View source

validModel

function validModel(value)

Report whether valid model.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

validSkin

function validSkin(value)

Report whether valid skin.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

validSound

function validSound(value)

Report whether valid sound.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source