Files
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.
| Parameter | Type | Default | Description |
|---|
values | dynamic | — | values value consumed by this operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
maximum | dynamic | — | maximum value consumed by this operation. |
View source
# bindings
function bindings(state)
Return the bindings value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# cached
function cached(values, name, generation)
Report whether cached.
| Parameter | Type | Default | Description |
|---|
values | dynamic | — | values value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
generation | dynamic | — | generation value consumed by this operation. |
View source
# cacheNamed
function cacheNamed(state, kind, entry)
Cache named.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
kind | dynamic | — | kind value consumed by this operation. |
entry | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
loadModel | dynamic | — | loadModel value consumed by this operation. |
loadSkin | dynamic | — | loadSkin value consumed by this operation. |
loadSound | dynamic | — | loadSound value consumed by this operation. |
onMissing | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
index | dynamic | — | Zero-based index of the affected item. |
View source
# clientAssetBoundModelName
function clientAssetBoundModelName(name)
Return the client asset bound model name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# clientAssetBoundPlayerModel
function clientAssetBoundPlayerModel(index)
Return the client asset bound player model value.
| Parameter | Type | Default | Description |
|---|
index | dynamic | — | Zero-based index of the affected item. |
View source
# clientAssetBoundPlayerSkin
function clientAssetBoundPlayerSkin(index)
Return the client asset bound player skin value.
| Parameter | Type | Default | Description |
|---|
index | dynamic | — | Zero-based index of the affected item. |
View source
# clientAssetBoundPlayerWeapon
function clientAssetBoundPlayerWeapon(index, weaponIndex)
Return the client asset bound player weapon value.
| Parameter | Type | Default | Description |
|---|
index | dynamic | — | Zero-based index of the affected item. |
weaponIndex | dynamic | — | Zero-based index of weapon. |
View source
# clientAssetBoundSkinName
function clientAssetBoundSkinName(name)
Return the client asset bound skin name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# clientAssetBoundSoundEntity
function clientAssetBoundSoundEntity(entityNumber, soundIndex, soundName)
Return the client asset bound sound entity value.
| Parameter | Type | Default | Description |
|---|
entityNumber | dynamic | — | entityNumber value consumed by this operation. |
soundIndex | dynamic | — | Zero-based index of sound. |
soundName | dynamic | — | soundName value consumed by this operation. |
View source
# clientAssetBoundSoundIndex
function clientAssetBoundSoundIndex(index)
Return the client asset bound sound index.
| Parameter | Type | Default | Description |
|---|
index | dynamic | — | Zero-based index of the affected item. |
View source
# clientAssetBoundSoundName
function clientAssetBoundSoundName(name)
Return the client asset bound sound name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# clientIdentity
function clientIdentity(value)
Return the client identity value.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# clientInfo
function clientInfo(state, index)
Return the client info value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# containsTraversal
function containsTraversal(value)
Report whether contains traversal.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# create
function create(loaders)
Creates create for the miniquake2 client assets registry module.
| Parameter | Type | Default | Description |
|---|
loaders | dynamic | — | loaders value consumed by this operation. |
View source
# createLenient
function createLenient(loadModel, loadSkin, loadSound)
Create lenient.
| Parameter | Type | Default | Description |
|---|
loadModel | dynamic | — | loadModel value consumed by this operation. |
loadSkin | dynamic | — | loadSkin value consumed by this operation. |
loadSound | dynamic | — | loadSound value consumed by this operation. |
View source
# ignoreMissing
function ignoreMissing(value)
Report whether ignore missing.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# indexed
function indexed(entry, index, name)
Return the indexed value.
| Parameter | Type | Default | Description |
|---|
entry | dynamic | — | entry value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
name | dynamic | — | Name of the affected item. |
View source
# inlineModelName
function inlineModelName(name)
Return the inline model name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# loadClientInfo
function loadClientInfo(state, value)
Load client info.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# loadModelAsset
function loadModelAsset(state, index, name)
Load model asset.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
name | dynamic | — | Name of the affected item. |
View source
# loadSkinAsset
function loadSkinAsset(state, name)
Load skin asset.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
name | dynamic | — | Name of the affected item. |
View source
# loadSoundAsset
function loadSoundAsset(state, index, name)
Load sound asset.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# missingNamed
function missingNamed(state, kind, index, name, reason)
Report whether missing named.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
kind | dynamic | — | kind value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
name | dynamic | — | Name of the affected item. |
reason | dynamic | — | reason value consumed by this operation. |
View source
# noteMissing
function noteMissing(state, kind, index, name, reason)
Report whether note missing.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
kind | dynamic | — | kind value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
name | dynamic | — | Name of the affected item. |
reason | dynamic | — | reason value consumed by this operation. |
View source
# refreshClientInfos
function refreshClientInfos(state, configStrings)
Refresh client infos.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
configStrings | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
configStrings | dynamic | — | configStrings value consumed by this operation. |
View source
# registerConfigStrings
function registerConfigStrings(state, configStrings, mapName)
Register config strings.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
configStrings | dynamic | — | configStrings value consumed by this operation. |
mapName | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
View source
# resolveModelIndex
function resolveModelIndex(state, index)
Resolve model index.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# resolveModelName
function resolveModelName(state, name)
Resolve model name.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
name | dynamic | — | Name of the affected item. |
View source
# resolvePlayerModel
function resolvePlayerModel(state, index)
Resolve player model.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# resolvePlayerSkin
function resolvePlayerSkin(state, index)
Resolve player skin.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# resolvePlayerWeapon
function resolvePlayerWeapon(state, index, weaponIndex)
Resolve player weapon.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
weaponIndex | dynamic | — | Zero-based index of weapon. |
View source
# resolveSkinName
function resolveSkinName(state, name)
Resolve skin name.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
name | dynamic | — | Name of the affected item. |
View source
# resolveSoundForEntity
function resolveSoundForEntity(state, entityNumber, soundIndex, soundName)
Resolve sound for entity.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
entityNumber | dynamic | — | entityNumber value consumed by this operation. |
soundIndex | dynamic | — | Zero-based index of sound. |
soundName | dynamic | — | soundName value consumed by this operation. |
View source
# resolveSoundIndex
function resolveSoundIndex(state, index)
Resolve sound index.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# resolveSoundName
function resolveSoundName(state, name)
Resolve sound name.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
name | dynamic | — | Name of the affected item. |
View source
# safeModelName
function safeModelName(name)
Return the safe model name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# safeRegularName
function safeRegularName(name)
Return the safe regular name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# safeSoundName
function safeSoundName(name)
Return the safe sound name.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | 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.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
start | dynamic | — | start value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# validModel
function validModel(value)
Report whether valid model.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# validSkin
function validSkin(value)
Report whether valid skin.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source
# validSound
function validSound(value)
Report whether valid sound.
| Parameter | Type | Default | Description |
|---|
value | dynamic | — | Value consumed or transformed by the operation. |
View source