CreateD3dDevice
function · gx · host
- Address
0x5995c0· 335 bytes, up to0x59970e- Signature
uint32_t __thiscall (void *this, void *format)- Meaning
- Creates the Direct3D 9 device with behaviour flags 0x22 or 0x52, then fills the caps block and makes the default texture
- Confidence
- verified, proof one
- Finding
- gx/device#direct3d-device-start
Finding: Direct3D device start in gx: the device
Slot +0x20 of CGxDeviceD3d (0x599a60, arguments the window procedure and the format) saves the screen's gamma ramp (GetDeviceGammaRamp into +0x928, copied to +0x328), registers the window class GxWindowClassD3d (0x599b30, icon BlizzardIcon.ico, cursor BlizzardCursor.cur, procedure 0x598750) and runs 0x5992a0, which loads d3d9.dll (0x598e40, Direct3DCreate9(32)), reads GetDeviceCaps into +0x38ac and GetAdapterDisplayMode into +0x3a24. It stores the window procedure at +0xf28 and calls slot +0x28 (0x599c90) with the format: that copies the format to +0x204, creates the window (0x598b50), creates the device (0x5995c0) and shows the window.
The derivation is in the doc.
Callers 2
Callees 8
- _atexit crt
- TexturePoolAcquire gx
- CGxTexFlags::CGxTexFlags gx
- GxTexUpdateRect gx
- LogGxCaps gx
- CGxDeviceD3d::FillCaps gx
- CGxDeviceD3d::BuildPresentParameters gx
- 0x5a24a0 gx
Calls and jumps by a bare address, from tables/calls.tsv.