GxColourToFloats
function · gx · primitive
- Address
0x5a2eb0· 72 bytes, up to0x5a2ef7- Signature
void __fastcall (float *out, const uint8_t *colour, float scale)- Meaning
- Converts four colour bytes to red, green, blue and alpha floats times a scale
- Confidence
- verified, proof one
- Finding
- gx/draw#lighting-at-draw-time
Finding: Lighting at draw time in gx: drawing
Before each draw Direct3D runs 0x5a1b20: it flushes render state (0x594210), then 0x5a1b60, which decides lighting from id 14. Lighting on: LIGHTING is capability bit 0, AMBIENT id 6, and each dirty light is set and enabled. Lighting off with a vertex colour or id 1 equal to 0xffffffff: LIGHTING 0 and AMBIENT id 6. Lighting off with no vertex colour and id 1 not white: all four lights disabled, LIGHTING 1, AMBIENT 0xffffffff. Then 0x5a1dd0 sets FILLMODE to solid (3) or wireframe (2) from capability bit 9, 0x5a1e30 the diffuse and ambient material source to the vertex colour when the format has one and to the material otherwise, and 0x5a1ee0 the changed clip planes.
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.