diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ccd0188..d5322d6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -444,10 +444,10 @@ if (ISLE_BUILD_CONFIG) LEGO1/mxdirectx/mxdirect3d.cpp CONFIG/config.cpp CONFIG/ConfigCommandLineInfo.cpp - CONFIG/common.cpp CONFIG/AboutDlg.cpp CONFIG/MainDlg.cpp CONFIG/detectdx5.cpp + CONFIG/StdAfx.cpp CONFIG/res/config.rc ) target_compile_definitions(config PRIVATE _AFXDLL MXDIRECTX_FOR_CONFIG) diff --git a/CONFIG/AboutDlg.cpp b/CONFIG/AboutDlg.cpp index b14704f1..9585d1c1 100644 --- a/CONFIG/AboutDlg.cpp +++ b/CONFIG/AboutDlg.cpp @@ -6,7 +6,7 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60) DECOMP_SIZE_ASSERT(CAboutDialog, 0x60) // FUNCTION: CONFIG 0x00403c20 -CAboutDialog::CAboutDialog() : CCommonDialog(IDD) +CAboutDialog::CAboutDialog() : CDialog(IDD) { } diff --git a/CONFIG/AboutDlg.h b/CONFIG/AboutDlg.h index 725ac9e9..d959f82e 100644 --- a/CONFIG/AboutDlg.h +++ b/CONFIG/AboutDlg.h @@ -1,36 +1,23 @@ #if !defined(AFX_ABOUTDLG_H) #define AFX_ABOUTDLG_H -#include "afxwin.h" -#include "common.h" +#include "StdAfx.h" #include "compat.h" #include "res/resource.h" // VTABLE: CONFIG 0x00406308 // SIZE 0x60 -class CAboutDialog : public CCommonDialog { +class CAboutDialog : public CDialog { public: CAboutDialog(); - // Dialog Data - //{{AFX_DATA(CMainDialog) enum { IDD = IDD_ABOUT }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainDialog) protected: void DoDataExchange(CDataExchange* pDX) override; - //}}AFX_VIRTUAL - // void UpdateInterface(); - // void SwitchToAdvanced(BOOL p_advanced); - // Implementation protected: - //{{AFX_MSG(CMainDialog) - //}}AFX_MSG DECLARE_MESSAGE_MAP() }; diff --git a/CONFIG/ConfigCommandLineInfo.h b/CONFIG/ConfigCommandLineInfo.h index d7b88ac9..82510df1 100644 --- a/CONFIG/ConfigCommandLineInfo.h +++ b/CONFIG/ConfigCommandLineInfo.h @@ -1,12 +1,11 @@ #if !defined(AFX_CONFIGCOMMANDLINEINFO_H) #define AFX_CONFIGCOMMANDLINEINFO_H +#include "StdAfx.h" #include "compat.h" #include "config.h" #include "decomp.h" -#include - // VTABLE: CONFIG 0x004060e8 // SIZE 0x24 class CConfigCommandLineInfo : public CCommandLineInfo { diff --git a/CONFIG/MainDlg.cpp b/CONFIG/MainDlg.cpp index 52f55e58..e2f52209 100644 --- a/CONFIG/MainDlg.cpp +++ b/CONFIG/MainDlg.cpp @@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60) DECOMP_SIZE_ASSERT(CMainDialog, 0x70) // FUNCTION: CONFIG 0x00403d50 -CMainDialog::CMainDialog(CWnd* pParent) : CCommonDialog(IDD, pParent) +CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent) { afxCurrentWinApp; m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG)); diff --git a/CONFIG/MainDlg.h b/CONFIG/MainDlg.h index 3f8da55a..e5a696c0 100644 --- a/CONFIG/MainDlg.h +++ b/CONFIG/MainDlg.h @@ -1,30 +1,22 @@ #if !defined(AFX_MAINDLG_H) #define AFX_MAINDLG_H -#include "afxwin.h" -#include "common.h" +#include "StdAfx.h" #include "compat.h" #include "decomp.h" #include "res/resource.h" // VTABLE: CONFIG 0x004063e0 // SIZE 0x70 -class CMainDialog : public CCommonDialog { +class CMainDialog : public CDialog { public: CMainDialog(CWnd* pParent); - // Dialog Data - //{{AFX_DATA(CMainDialog) enum { IDD = IDD_MAIN }; - //}}AFX_DATA - - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainDialog) protected: void DoDataExchange(CDataExchange* pDX) override; - //}}AFX_VIRTUAL void UpdateInterface(); void SwitchToAdvanced(BOOL p_advanced); @@ -35,7 +27,6 @@ class CMainDialog : public CCommonDialog { // Implementation protected: - //{{AFX_MSG(CMainDialog) BOOL OnInitDialog() override; void OnSysCommand(UINT nID, LPARAM lParam); void OnPaint(); @@ -57,7 +48,7 @@ class CMainDialog : public CCommonDialog { void OnButtonAdvanced(); void OnCheckboxDrawCursor(); void OnCheckboxMusic(); - //}}AFX_MSG + DECLARE_MESSAGE_MAP() }; diff --git a/CONFIG/StdAfx.cpp b/CONFIG/StdAfx.cpp new file mode 100644 index 00000000..3e0b3d04 --- /dev/null +++ b/CONFIG/StdAfx.cpp @@ -0,0 +1,5 @@ +// stdafx.cpp : source file that includes just the standard includes +// simple.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" diff --git a/CONFIG/StdAfx.h b/CONFIG/StdAfx.h new file mode 100644 index 00000000..39243b3b --- /dev/null +++ b/CONFIG/StdAfx.h @@ -0,0 +1,31 @@ +#if !defined(AFX_STDAFX_H) +#define AFX_STDAFX_H + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC extensions +#include // MFC core and standard components +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +#if 0 + +// FUNCTION: CONFIG 0x402ca0 +// CObject::Serialize + +// FUNCTION: CONFIG 0x402cb0 +// CObject::AssertValid + +// FUNCTION: CONFIG 0x402cc0 +// CObject::Dump + +// FUNCTION: CONFIG 0x00403c90 +// CWnd::BeginModalState + +// FUNCTION: CONFIG 0x00403ca0 +// CWnd::EndModalState + +#endif + +#endif // !defined(AFX_STDAFX_H) diff --git a/CONFIG/common.cpp b/CONFIG/common.cpp deleted file mode 100644 index 207d583d..00000000 --- a/CONFIG/common.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "common.h" - -// FUNCTION: CONFIG 0x00403c90 -void CCommonDialog::BeginModalState() -{ - ::EnableWindow(m_hWnd, FALSE); -} - -// FUNCTION: CONFIG 0x00403ca0 -void CCommonDialog::EndModalState() -{ - ::EnableWindow(m_hWnd, TRUE); -} diff --git a/CONFIG/common.h b/CONFIG/common.h deleted file mode 100644 index f8c6299e..00000000 --- a/CONFIG/common.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef AFX_COMMON_H -#define AFX_COMMON_H - -#include "compat.h" - -#include - -class CCommonDialog : public CDialog { -public: - CCommonDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL) : CDialog(nIDTemplate, pParentWnd) {} - - void BeginModalState() override; - void EndModalState() override; -}; - -#endif diff --git a/CONFIG/config.h b/CONFIG/config.h index 7112f8e4..771dc228 100644 --- a/CONFIG/config.h +++ b/CONFIG/config.h @@ -1,10 +1,10 @@ #if !defined(AFX_CONFIG_H) #define AFX_CONFIG_H +#include "StdAfx.h" #include "compat.h" #include "decomp.h" -#include #include class MxDeviceEnumerate; diff --git a/CONFIG/library_mfc.h b/CONFIG/library_mfc.h deleted file mode 100644 index c6e1aa47..00000000 --- a/CONFIG/library_mfc.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef 0 - -// FUNCTION: CONFIG 0x402ca0 -// CObject::Serialize - -// FUNCTION: CONFIG 0x402cb0 -// CObject::AssertValid - -// FUNCTION: CONFIG 0x402cc0 -// CObject::Dump - -#endif