Files
src/miniquake2/renderer/classic/world.ml
Provides miniquake2 renderer classic world facilities for this project.
- Package
miniquake2.renderer.classic.world- Reachable
- Yes
Imports
Declarations
# addBaseTexture
function addBaseTexture(textures, image, generation)
Add base texture.
| Parameter | Type | Default | Description |
|---|
textures | dynamic | — | textures value consumed by this operation. |
image | dynamic | — | image value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
View source
# addWorldDraw
function addWorldDraw(textures, draws, surface, generation)
Add world draw.
| Parameter | Type | Default | Description |
|---|
textures | dynamic | — | textures value consumed by this operation. |
draws | dynamic | — | draws value consumed by this operation. |
surface | dynamic | — | surface value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
View source
# build
function build(map, loadFile, lightStyles, entityFrame, modulate, generation)
Build state.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | map value consumed by this operation. |
loadFile | dynamic | — | loadFile value consumed by this operation. |
lightStyles | dynamic | — | lightStyles value consumed by this operation. |
entityFrame | dynamic | — | entityFrame value consumed by this operation. |
modulate | dynamic | — | modulate value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
View source
# buildModelDraws
function buildModelDraws(scene, textures, generation, model)
Build model draws.
| Parameter | Type | Default | Description |
|---|
scene | dynamic | — | scene value consumed by this operation. |
textures | dynamic | — | textures value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
model | dynamic | — | model value consumed by this operation. |
View source
miniquake2.renderer.classic.world.ClassicTgaImage struct
# classicWorldDecodeTga
function classicWorldDecodeTga(data, path)
Decode the uncompressed and RLE true-colour TGA variants accepted by ref_gl. The decoder remains MiniLang-owned so custom-server sky data is validated before it enters the renderer resource graph.
| Parameter | Type | Default | Description |
|---|
data | dynamic | — | Input data consumed by the operation. |
path | dynamic | — | Path of the file or directory used by the operation. |
View source
# classicWorldEntityValue
function classicWorldEntityValue(entityText, key)
Return the classic world entity value.
| Parameter | Type | Default | Description |
|---|
entityText | dynamic | — | entityText value consumed by this operation. |
key | dynamic | — | key value consumed by this operation. |
View source
# classicWorldSkyAxis
function classicWorldSkyAxis(entityText)
Return the classic world sky axis value.
| Parameter | Type | Default | Description |
|---|
entityText | dynamic | — | entityText value consumed by this operation. |
View source
# classicWorldSkyRotate
function classicWorldSkyRotate(entityText)
Rotate classic world sky.
| Parameter | Type | Default | Description |
|---|
entityText | dynamic | — | entityText value consumed by this operation. |
View source
# classicWorldSkyTexture
function classicWorldSkyTexture(loadFile, skyName, suffix, generation, fallbackPalette)
Return the classic world sky texture value.
| Parameter | Type | Default | Description |
|---|
loadFile | dynamic | — | loadFile value consumed by this operation. |
skyName | dynamic | — | skyName value consumed by this operation. |
suffix | dynamic | — | suffix value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
fallbackPalette | dynamic | — | fallbackPalette value consumed by this operation. |
View source
# configureSky
function configureSky(world, loadFile, name, rotate, axis)
Configure sky.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
loadFile | dynamic | — | loadFile value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
rotate | dynamic | — | rotate value consumed by this operation. |
axis | dynamic | — | axis value consumed by this operation. |
View source
# copyLightmapAtlasRow
function copyLightmapAtlasRow(destination, destinationPixel, source, sourcePixel, pixels)
Copy lightmap atlas row.
| Parameter | Type | Default | Description |
|---|
destination | dynamic | — | destination value consumed by this operation. |
destinationPixel | dynamic | — | destinationPixel value consumed by this operation. |
source | dynamic | — | source value consumed by this operation. |
sourcePixel | dynamic | — | sourcePixel value consumed by this operation. |
pixels | dynamic | — | pixels value consumed by this operation. |
View source
# copyLightmapIntoAtlas
function copyLightmapIntoAtlas(texture, x, y, width, height, source)
Copy lightmap into atlas.
| Parameter | Type | Default | Description |
|---|
texture | dynamic | — | texture value consumed by this operation. |
x | dynamic | — | Horizontal coordinate used by the operation. |
y | dynamic | — | Vertical coordinate used by the operation. |
width | dynamic | — | Width in the coordinate or storage units used by the caller. |
height | dynamic | — | Height in the coordinate or storage units used by the caller. |
source | dynamic | — | source value consumed by this operation. |
View source
# findBrushModel
function findBrushModel(world, modelIndex)
Find brush model.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
modelIndex | dynamic | — | Zero-based index of model. |
View source
# findTexture
function findTexture(textures, role, name)
Find texture.
| Parameter | Type | Default | Description |
|---|
textures | dynamic | — | textures value consumed by this operation. |
role | dynamic | — | role value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
View source
# LIGHTMAP_ATLAS_SIZE
const LIGHTMAP_ATLAS_SIZE = 256
Defines the lightmap atlas size constant used by the miniquake2 renderer classic world module.
View source
miniquake2.renderer.classic.world.LightmapAtlasState struct
# loadImages
function loadImages(map, loadFile, palette)
Load images.
| Parameter | Type | Default | Description |
|---|
map | dynamic | — | map value consumed by this operation. |
loadFile | dynamic | — | loadFile value consumed by this operation. |
palette | dynamic | — | palette value consumed by this operation. |
View source
# newLightmapAtlas
function newLightmapAtlas(state)
Return the new lightmap atlas value.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# packLightmapAtlases
function packLightmapAtlases(draws, brushModels, generation, faceCount)
Pack lightmap atlases.
| Parameter | Type | Default | Description |
|---|
draws | dynamic | — | draws value consumed by this operation. |
brushModels | dynamic | — | brushModels value consumed by this operation. |
generation | dynamic | — | generation value consumed by this operation. |
faceCount | dynamic | — | Number of face to process. |
View source
# packLightmapDraw
function packLightmapDraw(state, draw)
Pack lightmap draw.
| Parameter | Type | Default | Description |
|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
draw | dynamic | — | draw value consumed by this operation. |
View source
# PALETTE_PATH
const PALETTE_PATH = "pics/colormap.pcx"
Defines the palette path constant used by the miniquake2 renderer classic world module.
View source
# planSignature
function planSignature(world)
Return the plan signature value.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
View source
# quakePalette
function quakePalette(loadFile)
Return the quake palette value.
| Parameter | Type | Default | Description |
|---|
loadFile | dynamic | — | loadFile value consumed by this operation. |
View source
# readBytes
function readBytes(loadFile, path)
Read bytes.
| Parameter | Type | Default | Description |
|---|
loadFile | dynamic | — | loadFile value consumed by this operation. |
path | dynamic | — | Path of the file or directory used by the operation. |
View source
# surfaceBounds
function surfaceBounds(surface)
Return the surface bounds.
| Parameter | Type | Default | Description |
|---|
surface | dynamic | — | surface value consumed by this operation. |
View source
# texturePath
function texturePath(name)
Return the texture path.
| Parameter | Type | Default | Description |
|---|
name | dynamic | — | Name of the affected item. |
View source
# triangleCount
function triangleCount(world)
Return the triangle count.
| Parameter | Type | Default | Description |
|---|
world | dynamic | — | world value consumed by this operation. |
View source