benilla-re systems structs docs

QueryDevice

function · gx · host

Address
0x589ca0 · 11 bytes, up to 0x589caa
Signature
uint32_t __cdecl ()
Meaning
Returns the device's tag at +0x1fc through a tail call to 0x592120: 0 OpenGl, 1 Direct3D
Confidence
verified, proof one
Finding
gx/device#device-object

Finding: Device object in gx: the device

The base constructor 0x5916e0 zeroes the object, stores vtable 0x809da0 (whose unimplemented slots point at the pure-call stub 0x40a2d7) and tag 2 at +0x1fc; CGxDeviceD3d::CGxDeviceD3d (0x598ce0) then stores vtable 0x809ef8, tag 1 and 0 at +0x258, and CGxDeviceOpenGl (0x58dda0) vtable 0x809af8, tag 0 and 1 at +0x258. The accessor 0x589ca0 returns the tag. Fields: +0x204 a 14-dword copy of the format record, +0x23c the capability block, +0x2824 the render state entries, +0x328 and +0x928 the two gamma ramps, +0x24fc four light records, +0x2864 the capture flag. Direct3D adds +0x3894 the window, +0x38a4 the IDirect3D9, +0x38a8 the IDirect3DDevice9 and +0x38ac its caps.

The derivation is in the doc.

Callers 5

Callees 1

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