benilla-re systems structs docs

UpdateSpellScreenTint

function · spell · primitive

Address
0x6ec870 · 155 bytes, up to 0x6ec90a
Signature
void __thiscall (uint32_t *this, uint32_t now)
Meaning
Passes the tint colour and its fade-in, hold or fade-out level to 0x6d45c0, ending it at t3
Confidence
verified, proof one
Finding
spell/visuals#screen-tint
Test
spell::spellvisual_intensity_difftest

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.

Callers 1

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.