Shard
struct · spell · 32 bytes
- Meaning
- Holds one shard: link, position, model, start time and started flag
- Confidence
- verified, proof one
- Finding
- spell/visuals#shard-model-start-and-end
Finding: Shard model, start and end in spell: visuals
Each shard is constructed with its start time unset and gets a model of the emitter's path with the event callback
0x6ebe30 and the done callback 0x6ebe70, and the start time worldTime + 2·b,
b = low byte of bits(f32(255·u + 512.0)) >> 14 for a fresh u, or 1 when that is 0. The draw
callback skips shards before their start; the first draw starts the model's animation, and every
draw sets the model's translation to the shard. The event callback counts every call in
0xcee944 and plays the sound only for a $SND event on a count divisible by 4. The done
callback, given 0 as its second argument, closes the model and frees the shard.
The derivation is in the doc.
Fields 5
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 8 | void *[2] | m_link | Holds the shard's link in its emitter's shard list | verified, proof one | spell/visuals#shard-model-start-and-end |
0x0008 | 12 | float[3] | m_position | Holds the shard position the second trace writes | verified, proof one | spell/visuals#shard-placement |
0x0014 | 4 | void * | m_model | Holds the shard's model | verified, proof one | spell/visuals#shard-model-start-and-end |
0x0018 | 4 | uint32_t | m_startTime | Holds the world time at which the shard starts, never 0 | verified, proof one | spell/visuals#shard-model-start-and-end |
0x001c | 1 | uint8_t | m_started | Holds 1 once the shard's animation has started | verified, proof one | spell/visuals#shard-model-start-and-end |