Implement/match DeviceImpl::HandlePaint

This commit is contained in:
Anonymous Maarten 2024-12-20 18:24:21 +01:00
parent 4ff5891d7a
commit 459ddf2a7a
3 changed files with 7 additions and 8 deletions

View File

@ -60,16 +60,12 @@ void DeviceImpl::HandleActivate(WORD wParam)
} }
} }
// Really don't know what's going on here. Seems it will call down to Init
// but the decomp suggests it otherwise looks the same as InitFromD3D but Init
// takes widly different parameters.
// FUNCTION: LEGO1 0x100a2d20 // FUNCTION: LEGO1 0x100a2d20
void DeviceImpl::InitFromWindowsDevice(Device*) void DeviceImpl::HandlePaint(HDC p_dc)
{ {
// Device argument is intentionally unused.
IDirect3DRMWinDevice* winDevice; IDirect3DRMWinDevice* winDevice;
if (SUCCEEDED(m_data->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice))) { if (SUCCEEDED(m_data->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice))) {
// m_data->Init(??); winDevice->HandlePaint(p_dc);
winDevice->Release(); winDevice->Release();
} }
} }
@ -79,3 +75,6 @@ Result DeviceImpl::Update()
{ {
return ResultVal(m_data->Update()); return ResultVal(m_data->Update());
} }
// GLOBAL: LEGO1 0x100dd1d0
// IID_IDirect3DRMWinDevice

View File

@ -146,7 +146,7 @@ class DeviceImpl : public Device {
// vtable+0x20 // vtable+0x20
Result Update() override; Result Update() override;
void HandleActivate(WORD) override; void HandleActivate(WORD) override;
void InitFromWindowsDevice(Device*) override; void HandlePaint(HDC) override;
IDirect3DRMDevice2* ImplementationData() const { return m_data; } IDirect3DRMDevice2* ImplementationData() const { return m_data; }
void SetImplementationData(IDirect3DRMDevice2* device) { m_data = device; } void SetImplementationData(IDirect3DRMDevice2* device) { m_data = device; }

View File

@ -172,7 +172,7 @@ class Device : public Object {
// vtable+0x20 // vtable+0x20
virtual Result Update() = 0; virtual Result Update() = 0;
virtual void HandleActivate(WORD) = 0; virtual void HandleActivate(WORD) = 0;
virtual void InitFromWindowsDevice(Device*) = 0; virtual void HandlePaint(HDC) = 0;
// SYNTHETIC: LEGO1 0x100a2350 // SYNTHETIC: LEGO1 0x100a2350
// Tgl::Device::~Device // Tgl::Device::~Device