PackColorFromFloats
function · ui · primitive
- Address
0x76f900· 118 bytes, up to0x76f975- Signature
void __thiscall (void *this, float a, float r, float g, float b)- Meaning
- Packs four floats into 0xAARRGGBB at the this pointer, each as trunc(c·255 + 0.5)
- Confidence
- verified, proof one
- Finding
- ui/modelanim#setlight-and-getlight
- Test
ui::glue_767_76f900_color_pack
Finding: SetLight and GetLight in ui: Model frames, animation, light and fog
SetLight(enabled[, omni, x, y, z, ambientIntensity[, r, g, b], diffuseIntensity[, r, g, b]]) builds a
light on the stack and copies it over the frame's light only when enabled is nonzero after truncation.
SetLight(0, …) writes nothing and cannot turn a light off, so a PlayerModel's light stays. omni
(index 3) picks point (nonzero) or directional; x, y, z are a position or a direction, normalised.
Each intensity scales its colour; if an intensity is under 2^-22 in size or its three components are not
all numbers, its colour is white and the next intensity is read from the following index. Components are
clamped to [0, 1]. GetLight returns 7, 10 or 13 values.
The derivation is in the doc.
Callers 1
Callees 1
- __ftol crt
Calls and jumps by a bare address, from tables/calls.tsv.