benilla-re systems structs docs

BuildOrthoMatrix

function · gxumath · primitive

Address
0x5c3d90 · 188 bytes, up to 0x5c3e4b
Signature
void __thiscall (void *this, float l, float r, float b, float t, float n, float f)
Meaning
Writes the orthographic matrix of the left, right, bottom, top, near and far planes
Confidence
verified, proof one
Finding
gxumath#orthographic-matrix
Test
gxumath::ortho_difftest

Finding: Orthographic matrix in gxumath

0x5c3d90 (ecx the output; l, r, b, t, n, f on the stack; ret 0x18) writes m0 = 2/(r − l), m5 = 2/(t − b), m10 = 2/(f − n), m12 = −(l + r)/(r − l), m13 = −(b + t)/(t − b), m14 = −(n + f)/(f − n), m15 = 1 and 0 elsewhere. It needs l ≠ r, b ≠ t and n < f, else error 0x57; NaN passes the first two. 0x5c3e50 loads six floats from the structure at ecx in that order and calls it with the output in edx; nothing calls it.

The derivation is in the doc.

Callers 13

Callees 1

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