benilla-re systems structs docs

CScriptRegion::SetVertexColor

function · ui · primitive

Address
0x77f750 · 355 bytes, up to 0x77f8b2
Meaning
Sets a region's vertex colour, skipping a repeat and an opaque white when none is set
Confidence
verified, proof one
Finding
ui/texture#setting-a-vertex-colour

Finding: Setting a vertex colour in ui: texture colour and drawing

SetVertexColor(r, g, b[, a]) clamps each value to 0 to 1, takes a missing alpha as the current alpha, packs it as ×255 + 0.5 truncated, and stores it as the only entry of both arrays. With no vertex colour yet, white of alpha 0xfe or 0xff stores nothing; repeating the one entry does nothing. SetAlpha(a) replaces the alpha of the colour GetVertexColor answers with a × 255 truncated, with no clamp. That equals SetVertexColor with the current colour only for exactly one entry. With a gradient the read answers white and the store leaves one entry: SetAlpha gives flat white, and SetVertexColor without an alpha the given colour at alpha 0xff (0x79ae0a copies only the read's alpha byte).

The derivation is in the doc.

Callers 25

Callees 7

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