mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-22 11:31:57 -04:00
TglImpl::DeviceImpl functions (#1519)
This commit is contained in:
parent
804632b13f
commit
5ad885f958
@ -12,22 +12,49 @@ void* DeviceImpl::ImplementationDataPtr()
|
|||||||
return reinterpret_cast<void*>(&m_data);
|
return reinterpret_cast<void*>(&m_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016dea0
|
||||||
|
inline unsigned long DeviceGetWidth(IDirect3DRMDevice2* pDevice)
|
||||||
|
{
|
||||||
|
return pDevice->GetWidth();
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2c00
|
// FUNCTION: LEGO1 0x100a2c00
|
||||||
|
// FUNCTION: BETA10 0x1016de40
|
||||||
unsigned long DeviceImpl::GetWidth()
|
unsigned long DeviceImpl::GetWidth()
|
||||||
{
|
{
|
||||||
return m_data->GetWidth();
|
assert(m_data);
|
||||||
|
|
||||||
|
return DeviceGetWidth(m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016df20
|
||||||
|
inline unsigned long DeviceGetHeight(IDirect3DRMDevice2* pDevice)
|
||||||
|
{
|
||||||
|
return pDevice->GetHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2c10
|
// FUNCTION: LEGO1 0x100a2c10
|
||||||
|
// FUNCTION: BETA10 0x1016dec0
|
||||||
unsigned long DeviceImpl::GetHeight()
|
unsigned long DeviceImpl::GetHeight()
|
||||||
{
|
{
|
||||||
return m_data->GetHeight();
|
assert(m_data);
|
||||||
|
|
||||||
|
return DeviceGetHeight(m_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016dfa0
|
||||||
|
inline Result DeviceSetColorModel(IDirect3DRMDevice2* pDevice, ColorModel)
|
||||||
|
{
|
||||||
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2c20
|
// FUNCTION: LEGO1 0x100a2c20
|
||||||
Result DeviceImpl::SetColorModel(ColorModel)
|
// FUNCTION: BETA10 0x1016df40
|
||||||
|
Result DeviceImpl::SetColorModel(ColorModel p_model)
|
||||||
{
|
{
|
||||||
return Success;
|
assert(m_data);
|
||||||
|
|
||||||
|
return DeviceSetColorModel(m_data, p_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: BETA10 0x1016e020
|
// FUNCTION: BETA10 0x1016e020
|
||||||
@ -46,44 +73,96 @@ Result DeviceImpl::SetShadingModel(ShadingModel model)
|
|||||||
return DeviceSetShadingModel(m_data, model);
|
return DeviceSetShadingModel(m_data, model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016e140
|
||||||
|
inline Result DeviceSetShadeCount(IDirect3DRMDevice2* pDevice, unsigned long shadeCount)
|
||||||
|
{
|
||||||
|
return ResultVal(pDevice->SetShades(shadeCount));
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2ca0
|
// FUNCTION: LEGO1 0x100a2ca0
|
||||||
|
// FUNCTION: BETA10 0x1016e0e0
|
||||||
Result DeviceImpl::SetShadeCount(unsigned long shadeCount)
|
Result DeviceImpl::SetShadeCount(unsigned long shadeCount)
|
||||||
{
|
{
|
||||||
return ResultVal(m_data->SetShades(shadeCount));
|
assert(m_data);
|
||||||
|
|
||||||
|
return DeviceSetShadeCount(m_data, shadeCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016e1d0
|
||||||
|
inline Result DeviceSetDither(IDirect3DRMDevice2* pDevice, int dither)
|
||||||
|
{
|
||||||
|
return ResultVal(pDevice->SetDither(dither));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2cc0
|
// FUNCTION: LEGO1 0x100a2cc0
|
||||||
|
// FUNCTION: BETA10 0x1016e170
|
||||||
Result DeviceImpl::SetDither(int dither)
|
Result DeviceImpl::SetDither(int dither)
|
||||||
{
|
{
|
||||||
return ResultVal(m_data->SetDither(dither));
|
assert(m_data);
|
||||||
|
|
||||||
|
return DeviceSetDither(m_data, dither);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016e260
|
||||||
|
inline void DeviceHandleActivate(IDirect3DRMDevice2* pDevice, WORD wParam)
|
||||||
|
{
|
||||||
|
IDirect3DRMWinDevice* winDevice;
|
||||||
|
|
||||||
|
Result result = ResultVal(pDevice->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice));
|
||||||
|
if (Succeeded(result)) {
|
||||||
|
winDevice->HandleActivate(wParam);
|
||||||
|
int refCount = winDevice->Release();
|
||||||
|
assert(refCount == 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2ce0
|
// FUNCTION: LEGO1 0x100a2ce0
|
||||||
|
// FUNCTION: BETA10 0x1016e200
|
||||||
void DeviceImpl::HandleActivate(WORD wParam)
|
void DeviceImpl::HandleActivate(WORD wParam)
|
||||||
{
|
{
|
||||||
// Device argument is intentionally unused.
|
assert(m_data);
|
||||||
|
|
||||||
|
DeviceHandleActivate(m_data, wParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: BETA10 0x1016e360
|
||||||
|
inline void DeviceHandlePaint(IDirect3DRMDevice2* pDevice, void* p_data)
|
||||||
|
{
|
||||||
IDirect3DRMWinDevice* winDevice;
|
IDirect3DRMWinDevice* winDevice;
|
||||||
if (ResultVal(m_data->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice))) {
|
|
||||||
winDevice->HandleActivate(wParam);
|
Result result = ResultVal(pDevice->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice));
|
||||||
winDevice->Release();
|
if (Succeeded(result)) {
|
||||||
|
HDC hdc = (HDC) p_data;
|
||||||
|
winDevice->HandlePaint(hdc);
|
||||||
|
int refCount = winDevice->Release();
|
||||||
|
assert(refCount == 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2d20
|
// FUNCTION: LEGO1 0x100a2d20
|
||||||
void DeviceImpl::HandlePaint(HDC p_dc)
|
// FUNCTION: BETA10 0x1016e300
|
||||||
|
void DeviceImpl::HandlePaint(void* p_data)
|
||||||
{
|
{
|
||||||
IDirect3DRMWinDevice* winDevice;
|
assert(m_data);
|
||||||
if (SUCCEEDED(m_data->QueryInterface(IID_IDirect3DRMWinDevice, (LPVOID*) &winDevice))) {
|
|
||||||
winDevice->HandlePaint(p_dc);
|
DeviceHandlePaint(m_data, p_data);
|
||||||
winDevice->Release();
|
}
|
||||||
}
|
|
||||||
|
// FUNCTION: BETA10 0x1016e460
|
||||||
|
inline Result DeviceUpdate(IDirect3DRMDevice2* pDevice)
|
||||||
|
{
|
||||||
|
return ResultVal(pDevice->Update());
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100a2d60
|
// FUNCTION: LEGO1 0x100a2d60
|
||||||
|
// FUNCTION: BETA10 0x1016e400
|
||||||
Result DeviceImpl::Update()
|
Result DeviceImpl::Update()
|
||||||
{
|
{
|
||||||
return ResultVal(m_data->Update());
|
assert(m_data);
|
||||||
|
|
||||||
|
return DeviceUpdate(m_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100dd1d0
|
// GLOBAL: LEGO1 0x100dd1d0
|
||||||
|
// GLOBAL: BETA10 0x101c30b0
|
||||||
// IID_IDirect3DRMWinDevice
|
// IID_IDirect3DRMWinDevice
|
||||||
|
@ -183,7 +183,7 @@ public:
|
|||||||
// vtable+0x20
|
// vtable+0x20
|
||||||
Result Update() override;
|
Result Update() override;
|
||||||
void HandleActivate(WORD) override;
|
void HandleActivate(WORD) override;
|
||||||
void HandlePaint(HDC) override;
|
void HandlePaint(void*) override;
|
||||||
|
|
||||||
typedef IDirect3DRMDevice2* DeviceDataType;
|
typedef IDirect3DRMDevice2* DeviceDataType;
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ public:
|
|||||||
// vtable+0x20
|
// vtable+0x20
|
||||||
virtual Result Update() = 0;
|
virtual Result Update() = 0;
|
||||||
virtual void HandleActivate(WORD) = 0;
|
virtual void HandleActivate(WORD) = 0;
|
||||||
virtual void HandlePaint(HDC) = 0;
|
virtual void HandlePaint(void*) = 0;
|
||||||
|
|
||||||
// SYNTHETIC: BETA10 0x1016b740
|
// SYNTHETIC: BETA10 0x1016b740
|
||||||
// Tgl::Device::Device
|
// Tgl::Device::Device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user