Create MxDirectXInfo module (#1047)

* Some beta addrs and asserts to start

* Create mxdirectxinfo

* include fix

* CONFIG annotations

* Beta matching

* Match format function better, add dead code function

* LegoDeviceEnumerate
This commit is contained in:
MS
2024-06-27 15:22:13 -04:00
committed by GitHub
parent 536aa4b1fe
commit 6e39e87613
11 changed files with 1339 additions and 1133 deletions

View File

@@ -2,8 +2,7 @@
#include "decomp.h"
DECOMP_SIZE_ASSERT(MxDirectDraw, 0x880);
DECOMP_SIZE_ASSERT(MxDirectDraw::DeviceModesInfo, 0x17c);
DECOMP_SIZE_ASSERT(MxDirectDraw, 0x880)
#define RELEASE(x) \
if (x != NULL) { \
@@ -271,7 +270,7 @@ BOOL MxDirectDraw::DDInit(BOOL fullscreen)
// FUNCTION: LEGO1 0x1009d9d0
BOOL MxDirectDraw::IsSupportedMode(int width, int height, int bpp)
{
Mode mode = {width, height, bpp};
DeviceModesInfo::Mode mode = {width, height, bpp};
for (int i = 0; i < m_pCurrentDeviceModesList->m_count; i++) {
if (m_pCurrentDeviceModesList->m_modeArray[i] == mode) {
@@ -1095,21 +1094,3 @@ const char* MxDirectDraw::ErrorToString(HRESULT p_error)
return "Unrecognized error value.";
}
}
// FUNCTION: LEGO1 0x1009efb0
MxDirectDraw::DeviceModesInfo::DeviceModesInfo()
{
memset(this, 0, sizeof(*this));
}
// FUNCTION: LEGO1 0x1009efd0
MxDirectDraw::DeviceModesInfo::~DeviceModesInfo()
{
if (m_guid != NULL) {
delete m_guid;
}
if (m_modeArray != NULL) {
delete[] m_modeArray;
}
}