This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:orx:config:syntax [2013/05/02 23:24 (13 years ago)] – [Vector] sergeig | en:orx:config:syntax [2025/09/30 17:26 (6 weeks ago)] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 132: | Line 132: | ||
| Key2 = Var2; <= this will still be added to the ' | Key2 = Var2; <= this will still be added to the ' | ||
| + | |||
| + | ===== Command ===== | ||
| + | The Command module allows you to execute Orx functions from both the console and .ini files. Syntax for .ini files is specified in https:// | ||
| Line 137: | Line 140: | ||
| ==== Basic types ==== | ==== Basic types ==== | ||
| + | |||
| + | Boolean values are expressed with literals '' | ||
| + | |||
| + | <code ini> | ||
| Floating points (float) values are expressed using a decimal separator (' | Floating points (float) values are expressed using a decimal separator (' | ||
| Line 161: | Line 168: | ||
| ==== Vector ==== | ==== Vector ==== | ||
| - | Vectors are always defined using three components, separated by commas (',' | + | Vectors are always defined using **three** components, separated by commas (',' |
| <code ini> | <code ini> | ||
| Line 168: | Line 175: | ||
| Vectors are used, most of the time, to represent coordinates (x, y, z) or color components (r, g, b). | Vectors are used, most of the time, to represent coordinates (x, y, z) or color components (r, g, b). | ||
| - | At INI level there is currently support only for 3D vectors even if you specify only 2 coordinates: | ||
| - | <code ini> | ||
| - | will be passed to a shader as if it was a 3D vector. | ||
| ==== Random ==== | ==== Random ==== | ||
| Line 184: | Line 188: | ||
| Lists of values for a single key are also supported. All the elements are separated using the pound character ('#' | Lists of values for a single key are also supported. All the elements are separated using the pound character ('#' | ||
| - | <code ini>ListValue | + | <code ini>ValueList |
| - | If spaces are defined around the list separators '#' | + | If spaces are defined around the list separators '#' |
| **NB: Spaces around the list delimiter ('#' | **NB: Spaces around the list delimiter ('#' | ||
| **NB: When querying lists using the config API, please look at the functions containing the word ' | **NB: When querying lists using the config API, please look at the functions containing the word ' | ||
| - | But let's visualize this with an example. =)\\ | + | But let's visualize this with examples. =)\\ |
| Code | Code | ||
| - | <code c> | + | <code c>orxVECTOR vMyVector; |
| + | orxConfig_GetVector(" | ||
| + | orxFLOAT fMyFloat = orxConfig_GetFloat(" | ||
| INI | INI | ||
| - | <code ini> | + | <code ini>MyVector = (1, 2, 3) # (4.0, 5.0, 6.0) |
| + | MyFloat = 1.0 # 2.0 # 3.0</ | ||
| - | The function | + | The functions |
| - | If the value was define | + | If the values were defined |
| Please also note that controlled randoms using lists works also with non-numerical values. | Please also note that controlled randoms using lists works also with non-numerical values. | ||
| Line 212: | Line 219: | ||
| | | ||
| Key3 = Var1 # Var2 ##; This list will not span on the next line but will contain a 3rd (and last) empty element.</ | Key3 = Var1 # Var2 ##; This list will not span on the next line but will contain a 3rd (and last) empty element.</ | ||
| - | |||
| - | Lists of vectors can be defined in-place: | ||
| - | <code ini> | ||