[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.7.1.2 Syntax

Written by numerous Crystal Space developers. Extensive Texinfo typesetting performed by Eric Sunshine, sunshine@sunshineco.com.

Basic Syntax Elements

number

A general number.

pos-number

A general positive number.

integer

A general integer.

pos-integer

A positive integer (> 0).

number..number

A numeric range. For example, `0..1' represents a number between 0 and 1.

name

A name identifier. An unquoted string provided that it contains no punctuation or whitespace; otherwise delimited by double quotes.

string

A string delimited by double quotes. Special characters are escaped with a backslash.

Number List

number-list => number [ `,' number ] ...

Boolean Value

yes => `yes' | `true' | `on' | `1'
no => `no' | `false' | `off' | `0'
yes-no => yes | no

Color Description

red => 0..1
green => 0..1
blue => 0..1
color => red `,' green `,' blue

Vectors and Coordinates

Note that the x-axis points to the right, the y-axis points up, and the z-axis points forward.

x => number
y => number
z => number
u => number
v => number
vector-2d => x `,' z
vector-3d => x `,' y `,' z
vector-4d => x `,' y `,' z `,' r
vertex-idx => integer
coordinate => vector-3d
coordinate-2d => vector-2d
texture-coordinate => u `,' v

Object Names

sector-name => name
light-name => name
col-name => name
texture-name => name
material-name => name
mesh-name => name
meshfact-name => name
library-name => name
file-name => name
region-name => name
plugin-name => name
plugin-shortname => name

Attributes and Numbers

radius => pos-number
texture-length => pos-number
height-nr => number
angle => number
light-index => `0' | pos-integer
vertex-index => `0' | pos-integer
keyname => string
keyvalue => string

Visibility Culling

culler => `CULLER' `(' `)'

Key

key => `KEY' `(' keyname `,' keyvalue `)'

Lighting Primitives

tex-lighting => `TEXTURE_LIGHTING' `(' yes-no `)'
lighting => `LIGHTING' `(' yes-no `)'

Fog

density => number
fog-desc => `FOG' `(' color `,' density `)'
alpha-nr => `0' | `25' | `50' | `75'
alpha => `ALPHA' `(' alpha-nr `)'

Vertex and Vector

vertex => `VERTEX' `(' coordinate `)'
vector => `V' `(' vector-3d `)'
quaternion => `Q' `(' vector-4d `)'

Matrices, Vectors, Scalers, and Angles

matrix-scaler => number
matrix-x-scaler => matrix-scaler
matrix-y-scaler => matrix-scaler
matrix-z-scaler => matrix-scaler
stated-matrix-x-scaler => `SCALE_X' `(' matrix-x-scaler `)'
stated-matrix-y-scaler => `SCALE_Y' `(' matrix-y-scaler `)'
stated-matrix-z-scaler => `SCALE_Z' `(' matrix-z-scaler `)'
complex-matrix-scaler => stated-matrix-x-scaler
        | stated-matrix-y-scaler
        | stated-matrix-z-scaler
full-matrix-scaler => matrix-x-scaler `,' matrix-y-scaler `,' matrix-z-scaler
uniform-matrix-scaler => matrix-scaler
simple-matrix-scaler => `SCALE' `(' uniform-matrix-scaler | full-matrix-scaler `)'
compound-matrix-scaler => simple-matrix-scaler | complex-matrix-scaler

rotation-x-angle => angle
rotation-y-angle => angle
rotation-z-angle => angle
rotation-x-matrix => `ROT_X' `(' rotation-x-angle `)'
rotation-y-matrix => `ROT_Y' `(' rotation-y-angle `)'
rotation-z-matrix => `ROT_Z' `(' rotation-z-angle `)'
complex-rotation-matrix => rotation-x-matrix | rotation-y-matrix | rotation-z-matrix
rotation-angles => rotation-x-angle `,' rotation-y-angle `,' rotation-z-angle
simple-rotation-matrix => `ROT' `(' rotation-angles `)'

rotation-matrix => simple-rotation-matrix | complex-rotation-matrix
complex-matrix => rotation-matrix | compound-matrix-scaler
simple-scaled-matrix => uniform-matrix-scaler
normal-matrix => vector-3d `,' vector-3d `,' vector-3d
identity-matrix => `IDENTITY'
matrix-type => identity-matrix
        | normal-matrix
        | simple-scaled-matrix
        | complex-matrix
matrix => `MATRIX' `(' [ matrix-type ... ] `)'

move-comp => matrix | vector
move2 => `MOVE' `(' [ move-comp ... ] `)'
move => `MOVE' `(' matrix vector `)'
hardmove => `HARDMOVE' `(' [ move-comp ... ] `)'

Lights

dynamic-flag => `0' | `1'
light-oldsyntax => coordinate `:' radius `,' color `,' dynamic-flag

light-center => `CENTER' `(' coordinate `)'
light-radius => `RADIUS' `(' radius `)'
light-color => `COLOR' `(' color `)'
light-dynamic => `DYNAMIC' `(' `)'
light-halo => `HALO' `(' `)'
light-comp => light-center
        | light-radius
        | light-dynamic
        | light-color
        | light-halo
light-newsyntax => [ light-comp ... ]

light => `LIGHT' light-name `(' light-oldsyntax | light-newsyntax `)'

Collection Objects

col-mesh => `MESH' `(' mesh-name `)'
col-collection => `COLLECTION' `(' col-name `)'
col-light => `LIGHT' `(' light-name `)'
col-sector => `SECTOR' `(' sector-name `)'
collection-comp => col-collection
        | col-light
        | col-sector
        | col-mesh
collection => `COLLECTION' col-name `(' [ collection-comp ... ] `)'

Materials and Textures

material => `MATERIAL' `(' material-name `)'
texture => `TEXTURE' `(' texture-name `)'
ceil-texture => `CEIL_TEXTURE' `(' texture-name `)'
floor-texture => `FLOOR_TEXTURE' `(' texture-name `)'
texnr => `TEXNR' `(' texture-name `)' (Obsolete)
texlen => `LEN' `(' texture-length `)'
texture-scale => `TEXTURE_SCALE' `(' texture-length `)'

Material and Texture Description

transparent => `TRANSPARENT' `(' color `)'
procedural => `PROCEDURAL' `(' `)'
tex2d => `FOR_2D' `(' yes-no `)'
tex3d => `FOR_3D' `(' yes-no `)'
persistent => `PERSISTENT' `(' `)'
filter => `FILTER' `(' ... `)'
mipmap => `MIPMAP' `(' yes-no `)'
dither => `DITHER' `(' yes-no `)'
texture-file => `FILE' `(' file-name `)'

texture-desc-comp => transparent
        | filter
        | mipmap
        | dither
        | file
        | procedural
        | tex2d
        | tex3d
        | persistent
texture-desc => `TEXTURE' texture-name `(' [ texture-desc-comp ... ] `)'

material-desc-comp => texture
        | `COLOR' `(' color `)'
        | `DIFFUSE' `(' number `)'
        | `AMBIENT' `(' number `)'
        | `REFLECTION' `(' number `)'
material-desc => `MATERIAL' material-name `(' [ material-desc-comp ... ] `)'

Mesh Objects

plugin => `PLUGIN' `(' string `)'
params => `PARAMS' `(' string `)'

mesh-comp => plugin
        | key
        | params
        | mesh
        | move2
mesh => `MESHOBJ' mesh-name `(' [ mesh-comp ... ] `)'

Mesh Object Factories

meshfact-file => `FILE' `(' file-name `)'
meshfact-comp => plugin
        | params
        | meshfact-file
        | material
meshfact => `MESHOBJ' meshfact-name `(' [ meshfact-comp ... ] `)'

Nodes

position => `POSITION' `(' coordinate `)'
node-comp => position | key
node => `NODE' `(' [ node-comp ... ] `)'

Sectors

sector-comp => vertex
        | culler
        | light
        | mesh
        | fog-desc
        | circle
        | key
        | node
sector => `SECTOR' sector-name `(' [ sector-comp ... ] `)'

Texture List

textures-comp => texture-desc
textures => `TEXTURES' `(' [ textures-comp ... ] `)'

Material List

materials-comp => material-desc
materials => `MATERIALS' `(' [ materials-comp ... ] `)'

Material Groupings

Sometimes you want things of the same type but with different materials on it. This is where material groupings come in handy. The final name of a texture in a `MAT_SET' expression will be `mat-set-name_texture-name'. The materials will be merged into the global texture list. You should define a `MAT_SET' after `TEXTURES' since the latter command clears the internal list first. For usage of `MAT_SET' see the description of `THING'.

mat-set-name => name
material-set => `MAT_SET' mat-set-name `(' materials `)'

Library

library => `LIBRARY' library-name `(' file-name `)'

Starting Position

start-sector => `SECTOR' `(' sector-name `)'
start-position => `POSITION' `(' coordinate `)'
start-up => `UP' `(' vector-3d `)'
start-forward => `FORWARD' `(' vector-3d `)'
start-comp => start-sector
        | start-position
        | start-up
        | start-forward
start-newsyntax => [ start-comp ... ] start-oldsyntax => sector-name `,' coordinate start => `START' `(' start-oldsyntax | start-newsyntax `)'

For Loader Plug-Ins

plugin-id => plugin-name | plugin-shortname
plugin-spec => `PLUGIN' `(' plugin-id `)'
plugin-params => `PARAMS' `(' ... `)'
plugin-comp => `PLUGIN' plugin-shortname `(' plugin-name `)'
plugins => `PLUGINS' `(' [ plugin-comp ... ] `)'

Add-ons

addon-comp => plugin-spec | plugin-params
addon => `ADDON' `(' [ addon-comp ... ] `)'

Sounds

sound-file => `FILE' `(' file-name `)'
sound => `SOUND' [ file-name ] `(' [ sound-file ] `)'
sounds => `SOUNDS' `(' [ sound ... ] `)'

Current Region

region => `REGION' `(' [ region-name ] `)'

Render Priorities

rendpri-value => integer
rendpri-setting => `BACK2FRONT' | `FRONT2BACK' | `NONE'
rendpri-comp => `PRIORITY' `(' rendpri-value `,' rendpri-setting `)'
renderpriorities => `RENDERPRIORITIES' `(' [ rendpri-comp ... ] `)'

World

world-comp => textures
        | materials
        | library
        | addon
        | material-set
        | sounds
        | region
        | renderpriorities
        | plugins
        | sector
        | meshfact
        | collection
        | start
        | key
world => `WORLD' `(' [ world-comp ... ] `)'

Library File

library-comp => textures | materials | meshfact
library => `LIBRARY' `(' [ library-comp ... ] `)'


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html