benilla-re systems structs docs

LerpColourCopy

function · lighting · primitive

Address
0x6d6c20 · 173 bytes, up to 0x6d6ccc
Signature
void __thiscall (uint32_t *this, uint32_t a, const uint32_t *src)
Meaning
Moves a packed colour toward another by a weight, the same bytes as the terrain's
Confidence
verified, proof one
Finding
lighting/daynight#record-blend

Finding: Record blend in lighting: day-night

0x6d67c0 blends a source record into a destination by a weight t clamped to [0, 1] (NaN as 1). With a = the low byte of the bits of f32(t·255 + 512) shifted right by 14, colours +0x00 to +0x40 and +0x4c move each channel to dst + ((src − dst)·a >> 8), keep the destination's top byte, and take the source's three channels whole when a is 255. The floats +0x44, +0x48, +0x58 and +0x64 to +0x74 become dst + (src − dst)·t; +0x50, +0x54, +0x5c, +0x60 and +0x78 onward are kept.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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