# animationSlot
function animationSlot(name)Implements the `animationSlot` operation for `miniquake.format.bsp` (animation slot).
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
src/miniquake/format/bsp.mlminiquake/array_util.ml as arrayutil → src/miniquake/array_util.mlminiquake/byteio.ml as bio → src/miniquake/byteio.mlminiquake/common.ml as common → src/miniquake/common.mlminiquake/constants.ml as c → src/miniquake/constants.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/protocol_text.ml as protocolText → src/miniquake/protocol_text.mlminiquake/types.ml as t → src/miniquake/types.mlstd/fs.ml as fs → ../MiniLangCompilerOptimization/MiniLangCompilerPy/std/fs.ml external dependencyfunction animationSlot(name)Implements the `animationSlot` operation for `miniquake.format.bsp` (animation slot).
| Parameter | Type | Default | Description |
|---|---|---|---|
name | dynamic | — | Stable name that identifies the requested object or option. |
function CalcSurfaceExtents(map, faceIndex)Implements the `CalcSurfaceExtents` operation for `miniquake.format.bsp` (calc surface extents).
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `CalcSurfaceExtents`. |
faceIndex | dynamic | — | Zero-based index of the requested entry. |
function ceilValue(value)Return ceil value derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `ceilValue`. |
function decompressVisibility(data, offset, rowBytes)Implements the `decompressVisibility` operation for `miniquake.format.bsp` (decompress visibility).
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset of the requested data. |
rowBytes | dynamic | — | Byte data consumed by the operation. |
function emptyAnimationTable(count)Implements the `emptyAnimationTable` operation for `miniquake.format.bsp` (empty animation table).
| Parameter | Type | Default | Description |
|---|---|---|---|
count | dynamic | — | Number of entries or units to process. |
function entityValue(entity, key)Return entity value derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
key | dynamic | — | Key used to identify the requested entry. |
function entityVector(entity, key)Implements the `entityVector` operation for `miniquake.format.bsp` (entity vector).
| Parameter | Type | Default | Description |
|---|---|---|---|
entity | dynamic | — | Entity affected by the operation. |
key | dynamic | — | Key used to identify the requested entry. |
function exactPrefix(text, prefix)Implements the `exactPrefix` operation for `miniquake.format.bsp` (exact prefix).
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
prefix | dynamic | — | The prefix input consumed by `exactPrefix`. |
function faceUnderwater(map, faceIndex)Implements the `faceUnderwater` operation for `miniquake.format.bsp` (face underwater).
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `faceUnderwater`. |
faceIndex | dynamic | — | Zero-based index of the requested entry. |
function floorValue(value)Implements the `floorValue` operation for `miniquake.format.bsp` (floor value).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `floorValue`. |
function load(filename)Implements the `load` operation for `miniquake.format.bsp` (load).
| Parameter | Type | Default | Description |
|---|---|---|---|
filename | dynamic | — | Path of the file to process. |
function Mod_DecompressVis(data, offset, numLeafs)Mirror Quake's Mod_DecompressVis routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
offset | dynamic | — | Zero-based offset of the requested data. |
numLeafs | dynamic | — | The num leafs input consumed by `Mod_DecompressVis`. |
function Mod_LoadBrushModel(data, filename)Mirror Quake's Mod_LoadBrushModel routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
filename | dynamic | — | Path of the file to process. |
function Mod_LoadClipnodes(data, lump)Mirror Quake's Mod_LoadClipnodes routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadClipnodes`. |
function Mod_LoadEdges(data, lump)Mirror Quake's Mod_LoadEdges routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadEdges`. |
function Mod_LoadEntities(data, lump)Mirror Quake's Mod_LoadEntities routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadEntities`. |
function Mod_LoadFaces(data, lump)Mirror Quake's Mod_LoadFaces routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadFaces`. |
function Mod_LoadLeafs(data, lump)Mirror Quake's Mod_LoadLeafs routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadLeafs`. |
function Mod_LoadLighting(data, lump)Mirror Quake's Mod_LoadLighting routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadLighting`. |
function Mod_LoadMarksurfaces(data, lump)Mirror Quake's Mod_LoadMarksurfaces routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadMarksurfaces`. |
function Mod_LoadNodes(data, lump)Mirror Quake's Mod_LoadNodes routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadNodes`. |
function Mod_LoadPlanes(data, lump)Mirror Quake's Mod_LoadPlanes routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadPlanes`. |
function Mod_LoadSubmodels(data, lump)Mirror Quake's Mod_LoadSubmodels routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadSubmodels`. |
function Mod_LoadSurfedges(data, lump)Mirror Quake's Mod_LoadSurfedges routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadSurfedges`. |
function Mod_LoadTexinfo(data, lump)Mirror Quake's Mod_LoadTexinfo routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadTexinfo`. |
function Mod_LoadTextures(data, lump)Logical equivalents of the original per-lump loaders. Their storage outputs are immutable arrays rather than hunk pointer ranges.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadTextures`. |
function Mod_LoadVertexes(data, lump)Mirror Quake's Mod_LoadVertexes routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadVertexes`. |
function Mod_LoadVisibility(data, lump)Mirror Quake's Mod_LoadVisibility routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `Mod_LoadVisibility`. |
function Mod_SetParent(map)Mirror Quake's Mod_SetParent routine and its observable state changes.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `Mod_SetParent`. |
function parse(data, filename)Implements the `parse` operation for `miniquake.format.bsp` (parse).
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
filename | dynamic | — | Path of the file to process. |
function parseClipNodes(data, lump)Read and validate clip nodes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseClipNodes`. |
function parseEdges(data, lump)Read and validate edges.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseEdges`. |
function parseEntities(text)Read and validate entities.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
function parseFaces(data, lump)Read and validate faces.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseFaces`. |
function parseLeafs(data, lump)Read and validate leafs.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseLeafs`. |
function parseLumps(data)Read and validate lumps.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
function parseMarkSurfaces(data, lump)Read and validate mark surfaces.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseMarkSurfaces`. |
function parseModels(data, lump)Read and validate models.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseModels`. |
function parseNodes(data, lump)Read and validate nodes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseNodes`. |
function parsePlanes(data, lump)Read and validate planes.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parsePlanes`. |
function parseSurfEdges(data, lump)Read and validate surf edges.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseSurfEdges`. |
function parseTexInfo(data, lump)Read and validate tex info.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseTexInfo`. |
function parseTextures(data, lump)Read and validate textures.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseTextures`. |
function parseVector(text)Read and validate vector.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
function parseVertices(data, lump)Read and validate vertices.
| Parameter | Type | Default | Description |
|---|---|---|---|
data | dynamic | — | Input data consumed by the operation. |
lump | dynamic | — | The lump input consumed by `parseVertices`. |
function planeSignBits(plane)Return plane sign bits derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
plane | dynamic | — | The plane input consumed by `planeSignBits`. |
function sameAnimationName(left, right)Return same animation name derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
left | dynamic | — | The left input consumed by `sameAnimationName`. |
right | dynamic | — | The right input consumed by `sameAnimationName`. |
function sequenceTextureAnimations(textures)The pointer links of texture_t are represented as stable texture indices.
| Parameter | Type | Default | Description |
|---|---|---|---|
textures | dynamic | — | The textures input consumed by `sequenceTextureAnimations`. |
function surfaceVertex(map, face, edgeNumber)Implements the `surfaceVertex` operation for `miniquake.format.bsp` (surface vertex).
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `surfaceVertex`. |
face | dynamic | — | The face input consumed by `surfaceVertex`. |
edgeNumber | dynamic | — | The edge number input consumed by `surfaceVertex`. |
function texInfoMipAdjust(info)Implements the `texInfoMipAdjust` operation for `miniquake.format.bsp` (tex info mip adjust).
| Parameter | Type | Default | Description |
|---|---|---|---|
info | dynamic | — | The info input consumed by `texInfoMipAdjust`. |
const TEXTURE_ANIMATION_CACHE_SIZE = 16BSP texture arrays are immutable after loading. Cache their linked animation tables so a render-frame lookup does not rebuild hundreds of short arrays for every visible animated texture.
textureAnimationCacheKeysTracks the module-level texture animation cache keys state owned by `miniquake.format.bsp`.
textureAnimationCacheSourcesTracks the module-level texture animation cache sources state owned by `miniquake.format.bsp`.
textureAnimationCacheTablesTracks the module-level texture animation cache tables state owned by `miniquake.format.bsp`.
function textureAnimationIndex(textures, baseIndex, time, alternate)Return texture animation index derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
textures | dynamic | — | The textures input consumed by `textureAnimationIndex`. |
baseIndex | dynamic | — | Zero-based index of the requested entry. |
time | dynamic | — | Simulation or presentation time for the operation. |
alternate | dynamic | — | The alternate input consumed by `textureAnimationIndex`. |
function tokenizeEntities(text)Convert entities into its canonical representation.
| Parameter | Type | Default | Description |
|---|---|---|---|
text | dynamic | — | Text to parse or process. |
function validateBrushModel(map)Validate brush model and report any incompatibility.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | dynamic | — | The map input consumed by `validateBrushModel`. |
function validLeafVisibilityOffset(offset, visibilitySize)External BSP29 models (ammo and health boxes in the retail data) have no visibility lump and store visofs 0 in their leaves. GLQuake accepts this: Mod_LoadVisibility leaves loadmodel->visdata NULL and NULL + 0 remains the no-PVS case. World BSPs additionally use -1 as the explicit no-PVS sentinel. Preserve both original encodings while still rejecting offsets outside a non-empty visibility lump.
| Parameter | Type | Default | Description |
|---|---|---|---|
offset | dynamic | — | Zero-based offset of the requested data. |
visibilitySize | dynamic | — | Size of the requested data or resource. |