benilla-re systems structs docs

s_spellScreenTint

global · spell

Address
0xcee8d4 · 20 bytes, up to 0xcee8e7
Type
uint32_t[5]
Meaning
Holds the tint colour and its times t0 to t3; written by 0x6ec910, 0x6ec870 and its initializer
Confidence
verified, proof one
Finding
spell/visuals#screen-tint

Finding: Screen tint in spell: visuals

Kit procedure kind 6 calls 0x6ec910(colour, spellId, fraction) with ftol(param0) | 0xff000000 and param1. With d the spell's cast time from 0x6e3340, it stores the colour and t0 = now, t1 = now + ftol(d·fraction), t2 = now + d, t3 = now + d + 100. Each frame 0x6ec870 passes the colour and a level to 0x6d45c0: (now − t0)/(t1 − t0) before t1, 1.0 before t2, 1 − (now − t2)/(t3 − t2) before t3; after that 0.0 once, clearing t0 and t3. Nothing is passed while t0 = t3. 0x6d45c0 stores the colour and the low byte of bits(f32(255·level + 512.0)) >> 14.

The derivation is in the doc.