GxLightPack
function · gx · unreached
- Address
0x589dc0· 27 bytes, up to0x589dda- Signature
void __fastcall (uint32_t index, uint32_t *outRecord)- Meaning
- Packs a light record's colours through GxLightRecordPack; nothing calls it
- Confidence
- verified, proof one
- Finding
- gx/draw#fixed-lights
Finding: Fixed lights in gx: drawing
The device holds four light records (+0x24fc, 0x54 bytes each). 0x593330(index, light, offset) copies a light into a record through 0x593040, which sets one dirty bit per changed group (bit 1 enable, 2 position or direction, 4 ambient, 8 diffuse, 0x10 specular, 0x20, 0x40, 0x80 the three attenuation terms) and stores each colour as three floats byte * (scale / 255), the product of the light's scalar and 1/255 formed at 53 bits before it multiplies the byte. When the light is positional (flags & 2) the offset is subtracted from the position. 0x593570 sets the enable word. 0x589d80 does both and fails for an index of 4 or more.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 2
- GxLightRecordPack gx
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.