CRibbonEmitter::Initialize
function · models · primitive
- Address
0x7b73a0· 793 bytes, up to0x7b76b8- Signature
void __thiscall (CRibbonEmitter *this, float rate, float life, const uint32_t *rgba, void *m, void *ml, void *t, const float *rect, uint32_t r, uint32_t c)- Meaning
- Sizes the edge ring from rate and lifespan, sets the texture grid and defaults, and marks the ribbon initialized
- Confidence
- verified, proof one
- Finding
- models/ribbons#ribbon-ring
- Test
models::ribbon_fractions_difftest,models::ribbon_init_buffer_count_difftest,models::ribbon_init_clamp_gate_difftest
Finding: Ribbon ring in models: ribbons
A ribbon keeps its edges in a ring of n = ceil(ceil(rate)·L) + 2 slots, with rate the record's
edges per second (+0x94) and L its lifespan (+0x98) raised to at least 0.25. Each slot holds
an age and a 40-byte vertex pair, bottom then top, each a position and texture coordinates; edges
live from the tail to the head, and the head slot holds the uncommitted edge at the bone. The
index array holds i mod 2n for i below 4n, so a draw of the live run reads straight through
the wrap. A new ribbon starts hidden, 10 above and 10 below, with no gravity.
The derivation is in the doc.
Callers 1
- CM2Model::InitializeLoaded models
Callees 11
- __ftol crt
- 0x6673e0 storm
- GrowWordArray terrain
- ceil crt
- CRibbonEmitter::CopyTextures models
- CRibbonEmitter::SetTextureCell models
- RibbonArrayClear models
- RibbonNoOp models
- RibbonIndexArrayGrow models
- CRibbonVertexArrayGrow models
- CRibbonMatArrayReserve models
Calls and jumps by a bare address, from tables/calls.tsv.