benilla-re systems structs docs

CGxDeviceD3d::SetGammaRamp

function · gx · host

Address
0x599e10 · 66 bytes, up to 0x599e51
Signature
void __thiscall (CGxDeviceD3d *this, const uint16_t *ramp)
Meaning
Copies the ramp in and applies it with SetGammaRamp when full-screen gamma is supported and not windowed
Confidence
verified, proof one
Finding
gx/device#gamma-ramp

Finding: Gamma ramp in gx: the device

0x591680(ramp, g) fills three 256-entry tables of 16-bit values at ramp +0, +0x200 and +0x400: entry i is __ftol(pow(i * (1/255), g) * 65535) in each. The constructor builds the two device ramps for g = 1.0 (+0x328 and +0x928). The device slot +0x34 builds the working ramp +0x328 from a gamma value, slot +0x30 copies in a whole ramp, and the Direct3D versions then call IDirect3DDevice9::SetGammaRamp(0, 0, ramp) only when [dev+0x38b8] & 0x20000 is set and the device is not windowed ([dev+0x20b] clear).

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 2

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