From 55af10f69ea7ea2ed50ed4af71f8437fee1fa8a3 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 6 Feb 2024 21:37:55 +0100 Subject: [PATCH] 88.78% --- CONFIG/config.cpp | 7 ++++++- CONFIG/config.h | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CONFIG/config.cpp b/CONFIG/config.cpp index ae8a0263..da1e7fb5 100644 --- a/CONFIG/config.cpp +++ b/CONFIG/config.cpp @@ -8,6 +8,11 @@ #include #include // _spawnl +DECOMP_SIZE_ASSERT(CWinApp, 0xc4) +DECOMP_SIZE_ASSERT(CConfigApp, 0x10c) + +DECOMP_STATIC_ASSERT(offsetof(CConfigApp, m_display_bit_depth) == 0xd0) + // FIXME: are these tags correct? // FIXME: how to tag static in-method variables? @@ -218,7 +223,7 @@ D3DCOLORMODEL CConfigApp::GetHardwareDeviceColorModel() const // FUNCTION: CONFIG 0x00403410 BOOL CConfigApp::IsPrimaryDriver() const { - return &m_device_enumerator->GetDriverList().front() == m_driver; + return m_driver == &m_device_enumerator->GetDriverList().front(); } // FUNCTION: CONFIG 0x00403430 diff --git a/CONFIG/config.h b/CONFIG/config.h index 62041c01..76bdfca5 100644 --- a/CONFIG/config.h +++ b/CONFIG/config.h @@ -13,7 +13,7 @@ struct MxDriver; #define currentConfigApp ((CConfigApp*) afxCurrentWinApp) -// SIZE 0x108 +// SIZE 0x10c class CConfigApp : public CWinApp { public: CConfigApp(); @@ -56,10 +56,9 @@ class CConfigApp : public CWinApp { BOOL IsLegoNotRunning(); public: - undefined m_unk0xc0; // 0x0c0 MxDeviceEnumerate* m_device_enumerator; // 0x0c4 MxDriver* m_driver; // 0x0c8 - MxDevice* m_device; // 0x0cc + MxDevice* m_device; // 0x0cc int m_display_bit_depth; // 0x0d0 BOOL m_flip_surfaces; // 0x0d4 BOOL m_full_screen; // 0x0d8 @@ -74,6 +73,7 @@ class CConfigApp : public CWinApp { int m_texture_quality; // 0x0fc undefined m_unk0x100[4]; // 0x100 BOOL m_music; // 0x104 + undefined m_unk[4]; }; #endif // !defined(AFX_CONFIG_H)