Difference between revisions of "Callback: Advanced effect creation"
From GRFSpecs
Jump to navigationJump to searchLine 13: | Line 13: | ||
| 0-7 || Effect |
| 0-7 || Effect |
||
* 00: Normal visual effect when driving. |
* 00: Normal visual effect when driving. |
||
− | * 01-FF: Reserved |
+ | * 01-FF: Reserved |
|- |
|- |
||
| 8-31 || Reserved, must be masked. |
| 8-31 || Reserved, must be masked. |
Latest revision as of 13:48, 23 August 2014
Advanced effect creation (160)
This callback is used when advanced visual effects are enabled via the Visual Effect properties resp. Callback 10.
The callback is called whenever the effect spawning model issues the vehicle to generate a visual effect. This callback then decides the position, amount and looks of the visual effect.
Variable 10 specifies what type of visual effect to generate:
Bits | Meaning |
---|---|
0-7 | Effect
|
8-31 | Reserved, must be masked. |
Variable 18 contains 32 random bits.
If the callback fails, no visual effect is created. Otherwise the result consists of:
Bits | Meaning |
---|---|
0-1 | Amount of effects to spawn (0 to 3), details are specified via register 100+x |
2-12 | Reserved, must be set to zero. |
13 | Train and RV only: If set, position effect relative to vehicle center instead of relative to vehicle sprite. (behaves the same for vehicles with length 8/8) |
14 | If set, disable auto-rotation of effect position wrt. vehicle orientation. |
Registers 100+x define the appearance of the x-th effect (amount specified via callback result):
Bits | Meaning |
---|---|
0-7 | Effect type
|
8-15 |
|
16-23 |
|
24-31 | Z position (signed) |