mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-21 07:11:16 +00:00
Move a few things around on the Enumerate context obj
This commit is contained in:
parent
e4d7c3b190
commit
345044db09
@ -67,6 +67,7 @@ void MxDirect3D::Destroy()
|
|||||||
|
|
||||||
// This should get deleted by MxDirectDraw::Destroy
|
// This should get deleted by MxDirectDraw::Destroy
|
||||||
if (m_pCurrentDeviceModesList) {
|
if (m_pCurrentDeviceModesList) {
|
||||||
|
// delete m_pCurrentDeviceModesList; // missing?
|
||||||
m_pCurrentDeviceModesList = NULL;
|
m_pCurrentDeviceModesList = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,10 +130,15 @@ MxDeviceModeFinder::~MxDeviceModeFinder()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1009c070 STUB
|
// OFFSET: LEGO1 0x1009c070 STUB
|
||||||
BOOL MxDirect3D::FUN_1009c070()
|
BOOL MxDeviceEnumerate::FUN_1009c070()
|
||||||
{
|
{
|
||||||
//DirectDrawCreate()
|
// TODO
|
||||||
//BuildErrorString("GetCaps failed: %s\n", xxx);
|
// HRESULT ret = DirectDrawCreate();
|
||||||
|
HRESULT ret = 0;
|
||||||
|
if (ret) {
|
||||||
|
MxDirect3D::BuildErrorString("GetCaps failed: %s\n",
|
||||||
|
EnumerateErrorToString(ret));
|
||||||
|
}
|
||||||
//IDirect3D2_EnumDevices
|
//IDirect3D2_EnumDevices
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -148,13 +154,14 @@ void MxDirect3D::BuildErrorString(const char *p_format, char *p_msg)
|
|||||||
// OFFSET: LEGO1 0x1009c6c0
|
// OFFSET: LEGO1 0x1009c6c0
|
||||||
MxResult MxDeviceEnumerate::_DoEnumerate()
|
MxResult MxDeviceEnumerate::_DoEnumerate()
|
||||||
{
|
{
|
||||||
|
// TODO: what does ECX refer to in this context?
|
||||||
if (m_unk010_flag)
|
if (m_unk010_flag)
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
|
|
||||||
HRESULT ret = DirectDrawEnumerate(EnumerateCallback, this);
|
HRESULT ret = DirectDrawEnumerate(EnumerateCallback, this);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
MxDirect3D::BuildErrorString("DirectDrawEnumerate returned error %s\n",
|
MxDirect3D::BuildErrorString("DirectDrawEnumerate returned error %s\n",
|
||||||
MxDirect3D::D3DErrorToString(ret));
|
EnumerateErrorToString(ret));
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,11 +172,12 @@ MxResult MxDeviceEnumerate::_DoEnumerate()
|
|||||||
// OFFSET: LEGO1 0x1009c710 STUB
|
// OFFSET: LEGO1 0x1009c710 STUB
|
||||||
BOOL FAR PASCAL EnumerateCallback(GUID FAR *, LPSTR, LPSTR, LPVOID)
|
BOOL FAR PASCAL EnumerateCallback(GUID FAR *, LPSTR, LPSTR, LPVOID)
|
||||||
{
|
{
|
||||||
|
// TODO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x1009c730 STUB
|
// OFFSET: LEGO1 0x1009c730 STUB
|
||||||
char *MxDirect3D::D3DErrorToString(HRESULT p_error)
|
char *MxDeviceEnumerate::EnumerateErrorToString(HRESULT p_error)
|
||||||
{
|
{
|
||||||
// TODO: This is a list of error messages, similar to the function in
|
// TODO: This is a list of error messages, similar to the function in
|
||||||
// MxDirectDraw, except that this one now contains the Direct3D errors.
|
// MxDirectDraw, except that this one now contains the Direct3D errors.
|
||||||
|
|||||||
@ -18,18 +18,21 @@ class MxDeviceModeFinder
|
|||||||
MxDirectDraw::DeviceModesInfo *m_deviceInfo; // +0xe0
|
MxDirectDraw::DeviceModesInfo *m_deviceInfo; // +0xe0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// VTABLE 0x100db814 (or 0x100d9cc8?)
|
||||||
// SIZE 0x198
|
// SIZE 0x198
|
||||||
class MxDeviceEnumerate
|
class MxDeviceEnumerate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MxDeviceEnumerate();
|
MxDeviceEnumerate();
|
||||||
MxResult _DoEnumerate();
|
virtual MxResult _DoEnumerate();
|
||||||
|
BOOL FUN_1009c070();
|
||||||
|
|
||||||
|
static char *EnumerateErrorToString(HRESULT p_error);
|
||||||
|
|
||||||
undefined4 m_unk000;
|
|
||||||
undefined4 m_unk004;
|
undefined4 m_unk004;
|
||||||
undefined4 m_unk008;
|
undefined4 m_unk008;
|
||||||
undefined4 m_unk00c;
|
undefined4 m_unk00c;
|
||||||
BOOL m_unk010_flag; // +0x20
|
MxBool m_unk010_flag; // +0x10
|
||||||
|
|
||||||
undefined4 m_unknown[97];
|
undefined4 m_unknown[97];
|
||||||
};
|
};
|
||||||
@ -59,11 +62,8 @@ class MxDirect3D : public MxDirectDraw
|
|||||||
|
|
||||||
BOOL CreateIDirect3D();
|
BOOL CreateIDirect3D();
|
||||||
BOOL D3DSetMode();
|
BOOL D3DSetMode();
|
||||||
BOOL FUN_1009c070();
|
|
||||||
MxResult _DoEnumerate();
|
|
||||||
|
|
||||||
static void BuildErrorString(const char *, char *);
|
static void BuildErrorString(const char *, char *);
|
||||||
static char *D3DErrorToString(HRESULT p_error);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MxDeviceModeFinder *m_pDeviceModeFinder; // +0x880
|
MxDeviceModeFinder *m_pDeviceModeFinder; // +0x880
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user