benilla-re systems structs docs

Texture::SetAlpha

function · ui · primitive

Address
0x79b580 · 265 bytes, up to 0x79b688
Signature
int __fastcall (lua_State *L)
Meaning
Replaces the alpha of the vertex colour with the value times 255, truncated and unclamped
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/texture#setting-a-vertex-colour
Test
ui::luabind_79a_set_alpha

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 0

None by a direct call or jump.

Callees 10

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