LightningBolt::Update
function · gx · primitive
- Address
0x7af9b0· 732 bytes, up to0x7afc8b- Signature
void __thiscall (LightningBolt *this, float dt)- Meaning
- Advances the bolt clock, rebuilds its arrays when marked and morphs its centre line toward a new random one
- Confidence
- verified, proof one
- Finding
- gx/lightning#bolt-update
- Test
gx::lightning_age_fadd_difftest,gx::lightning_age_gate_difftest,gx::lightning_blend_difftest,gx::lightning_param_pos_difftest,gx::lightning_step_fraction_difftest
Finding: Bolt update in gx: lightning
0x7af9b0(dt) runs when flag bit 1 is set. With a non-zero period the clock +0x60 becomes fmod(dt + clock, period), otherwise 0. With the rebuild bit set it rebuilds the centre line, sizes the ribbon arrays for 2 * points vertices, writes texture coordinates (the pair at vertex k gets u = k / (2 * points - 2), v 0 and 1; the first two vertices (0, 0.5), the last two (1, 0.5)) and the indices 0, 1, 2, ..., and clears the bit. Every update then builds a second centre line and sets each interior point to 0.75 * old + 0.25 * new.
The derivation is in the doc.
Callers 1
Callees 10
- SplatVector3 loadingscreen
- _atexit crt
- 0x596ff0 gx
- 0x5970f0 gx
- 0x5971e0 gx
- 0x6d5050 lighting
- __CIfmod crt
- LightningBolt::BuildPoints gx
- LightningPointArrayDelete gx
- LightningIndexArrayDelete gx
Calls and jumps by a bare address, from tables/calls.tsv.