benilla-re systems structs docs

BakePortrait

function · ui · orchestration

Address
0x524f60 · 2355 bytes, up to 0x525892
Meaning
Draws a unit's model into a cached 64 by 64 texture and binds it to a widget
Confidence
verified, proof one
Finding
ui/portraits#the-bake
Test
ui::glue_512_524f60_scale_ratios

Finding: The bake in ui: unit portraits

The bake draws a fresh copy of the unit's model (0x707400 of the model +0xd8) in a new scene (0x706e10), with the attachments removed (0x47a230) and the animation set to sequence 0 (0x7121a0). The lights are an ambient 0.45 grey and a white directional light along (-1, 0, -1) (callback 0x525b10). The camera is the model's own camera 0 (0x713540), built with 0x7ada40 over a rectangle (0, 0, 1, D). The viewport is 64 by 64 pixels in the corner of the render surface. The surface is cleared to 0, the scene is drawn twice (passes 0 and 1), the corner is read back into the texture Portrait1, and the device's matrices and viewport are restored.

The derivation is in the doc.

Callers 2

Callees 48

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