benilla-re systems structs docs

DrawScreenFade

function · ui · primitive

Address
0x4c0f50 · 760 bytes, up to 0x4c1247
Meaning
Draws the fade quad with an alpha from the elapsed time and runs the callback after the last frame
Confidence
verified, proof one
Finding
ui/screenfade#drawing-a-fade

Finding: Drawing a fade in ui: the screen fade

0x4c0f50 is the layer's draw. While the mode is set it takes the seconds since the first drawn frame, scales them by the duration to 0 to 255 and writes the quad's alpha: rising for mode 2, falling for mode 1. A frame at or past the duration draws the end value, 255 for mode 2 and 0 for mode 1. It then draws the quad with the fade texture. When the finished byte is set it stops the fade after mode 1, clears the mode and calls the callback with its argument in ecx.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 10

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