mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-30 03:31:15 +00:00
GetZBufferDepth
This commit is contained in:
parent
d4e7bb1132
commit
622fc8fb63
@ -121,6 +121,32 @@ BOOL MxDirect3D::D3DSetMode()
|
|||||||
OutputDebugString("MxDirect3D::D3DSetMode() back lock failed\n");
|
OutputDebugString("MxDirect3D::D3DSetMode() back lock failed\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
// FUNCTION: LEGO1 0x1009b5a0
|
||||||
|
MxU32 MxDirect3D::GetZBufferDepth(MxAssignedDevice* p_deviceInfo)
|
||||||
|
{
|
||||||
|
int depth;
|
||||||
|
DWORD deviceDepth;
|
||||||
|
|
||||||
|
if ((p_deviceInfo->m_desc.dwFlags & D3DCOLOR_MONO)) {
|
||||||
|
deviceDepth = p_deviceInfo->m_desc.dwDeviceZBufferBitDepth;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
deviceDepth = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (deviceDepth & DDBD_32)
|
||||||
|
depth = 32;
|
||||||
|
else if (deviceDepth & DDBD_24)
|
||||||
|
depth = 24;
|
||||||
|
else if (deviceDepth & DDBD_16)
|
||||||
|
depth = 16;
|
||||||
|
else if (deviceDepth & DDBD_8)
|
||||||
|
depth = 8;
|
||||||
|
else
|
||||||
|
depth = -1;
|
||||||
|
|
||||||
|
return depth;
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1009b5f0
|
// FUNCTION: LEGO1 0x1009b5f0
|
||||||
BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_driver, MxDevice* p_device)
|
BOOL MxDirect3D::SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_driver, MxDevice* p_device)
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class MxAssignedDevice {
|
|||||||
|
|
||||||
friend class MxDirect3D;
|
friend class MxDirect3D;
|
||||||
|
|
||||||
private:
|
public:
|
||||||
GUID m_guid; // 0x00
|
GUID m_guid; // 0x00
|
||||||
MxU32 m_flags; // 0x10
|
MxU32 m_flags; // 0x10
|
||||||
D3DDEVICEDESC m_desc; // 0x14
|
D3DDEVICEDESC m_desc; // 0x14
|
||||||
@ -57,6 +57,7 @@ class MxDirect3D : public MxDirectDraw {
|
|||||||
|
|
||||||
BOOL CreateIDirect3D();
|
BOOL CreateIDirect3D();
|
||||||
BOOL D3DSetMode();
|
BOOL D3DSetMode();
|
||||||
|
MxU32 GetZBufferDepth(MxAssignedDevice* p_deviceInfo);
|
||||||
BOOL SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_driver, MxDevice* p_device);
|
BOOL SetDevice(MxDeviceEnumerate& p_deviceEnumerate, MxDriver* p_driver, MxDevice* p_device);
|
||||||
|
|
||||||
inline MxAssignedDevice* GetAssignedDevice() { return this->m_assignedDevice; };
|
inline MxAssignedDevice* GetAssignedDevice() { return this->m_assignedDevice; };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user