SimpleModelSetLight
function · ui · orchestration
- Address
0x76cf30· 27 bytes, up to0x76cf4a- Signature
void __thiscall (void *this, M2Light *light)- Meaning
- Copies a light over the frame's own light
- Confidence
- verified, proof one
- Finding
- ui/modelanim#setlight-and-getlight
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 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.