From 2f6be235a4914d567e5c013d1b020e4cca6efb93 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Tue, 24 Jun 2025 22:12:44 +0200 Subject: [PATCH 1/2] [ZH] Show the System Maps tab in World Builder without RTS_DEBUG --- .../Code/Tools/WorldBuilder/src/OpenMap.cpp | 15 +++------------ .../Code/Tools/WorldBuilder/src/SaveMap.cpp | 15 +++------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/OpenMap.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/OpenMap.cpp index 5c320ce0a31..6576fb522e3 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/src/OpenMap.cpp +++ b/GeneralsMD/Code/Tools/WorldBuilder/src/OpenMap.cpp @@ -33,11 +33,7 @@ OpenMap::OpenMap(TOpenMapInfo *pInfo, CWnd* pParent /*=NULL*/) m_pInfo(pInfo) { m_pInfo->browse = false; -#if defined(RTS_DEBUG) m_usingSystemDir = ::AfxGetApp()->GetProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", TRUE); -#else - m_usingSystemDir = FALSE; -#endif //{{AFX_DATA_INIT(OpenMap) // NOTE: the ClassWizard will add member initialization here @@ -110,9 +106,7 @@ void OpenMap::OnOK() void OpenMap::populateMapListbox( Bool systemMaps ) { m_usingSystemDir = systemMaps; -#if defined(RTS_DEBUG) ::AfxGetApp()->WriteProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", m_usingSystemDir); -#endif HANDLE hFindFile = 0; WIN32_FIND_DATA findData; @@ -190,12 +184,9 @@ BOOL OpenMap::OnInitDialog() if (pUserMaps != NULL) pUserMaps->SetCheck( !m_usingSystemDir ); -#if !defined(RTS_DEBUG) - if (pSystemMaps) - pSystemMaps->ShowWindow( FALSE ); - if (pUserMaps) - pUserMaps->ShowWindow( FALSE ); -#endif + // TheSuperHackers @tweak Originally World Builder has hidden the System Maps tab button in Release builds, + // perhaps with the intention to only show User Maps to community users. However, World Builder did release + // as a Debug build and always had the System Maps tab, therefore this now shows it always for simplicity. populateMapListbox( m_usingSystemDir ); diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/SaveMap.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/SaveMap.cpp index d6a9255f29e..1f5e8f7d3c1 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/src/SaveMap.cpp +++ b/GeneralsMD/Code/Tools/WorldBuilder/src/SaveMap.cpp @@ -32,11 +32,7 @@ SaveMap::SaveMap(TSaveMapInfo *pInfo, CWnd* pParent /*=NULL*/) : CDialog(SaveMap::IDD, pParent), m_pInfo(pInfo) { -#if defined(RTS_DEBUG) m_pInfo->usingSystemDir = m_usingSystemDir = ::AfxGetApp()->GetProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", TRUE); -#else - m_pInfo->usingSystemDir = m_usingSystemDir = FALSE; -#endif //{{AFX_DATA_INIT(SaveMap) // NOTE: the ClassWizard will add member initialization here @@ -121,9 +117,7 @@ void SaveMap::OnBrowse() void SaveMap::populateMapListbox( Bool systemMaps ) { m_pInfo->usingSystemDir = m_usingSystemDir = systemMaps; -#if defined(RTS_DEBUG) ::AfxGetApp()->WriteProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", m_usingSystemDir); -#endif HANDLE hFindFile = 0; WIN32_FIND_DATA findData; @@ -225,12 +219,9 @@ BOOL SaveMap::OnInitDialog() if (pUserMaps != NULL) pUserMaps->SetCheck( !m_usingSystemDir ); -#if !defined(RTS_DEBUG) - if (pSystemMaps) - pSystemMaps->ShowWindow( FALSE ); - if (pUserMaps) - pUserMaps->ShowWindow( FALSE ); -#endif + // TheSuperHackers @tweak Originally World Builder has hidden the System Maps tab button in Release builds, + // perhaps with the intention to only show User Maps to community users. However, World Builder did release + // as a Debug build and always had the System Maps tab, therefore this now shows it always for simplicity. populateMapListbox( m_usingSystemDir ); From b9d04a6c369d561bf76613cfda7ce8b3d10f3bae Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 30 Jun 2025 22:40:46 +0200 Subject: [PATCH 2/2] Replicate in Generals --- Generals/Code/Tools/WorldBuilder/src/OpenMap.cpp | 15 +++------------ Generals/Code/Tools/WorldBuilder/src/SaveMap.cpp | 15 +++------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Generals/Code/Tools/WorldBuilder/src/OpenMap.cpp b/Generals/Code/Tools/WorldBuilder/src/OpenMap.cpp index 9511b204b86..151d041bfae 100644 --- a/Generals/Code/Tools/WorldBuilder/src/OpenMap.cpp +++ b/Generals/Code/Tools/WorldBuilder/src/OpenMap.cpp @@ -33,11 +33,7 @@ OpenMap::OpenMap(TOpenMapInfo *pInfo, CWnd* pParent /*=NULL*/) m_pInfo(pInfo) { m_pInfo->browse = false; -#if defined(RTS_DEBUG) m_usingSystemDir = ::AfxGetApp()->GetProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", TRUE); -#else - m_usingSystemDir = FALSE; -#endif //{{AFX_DATA_INIT(OpenMap) // NOTE: the ClassWizard will add member initialization here @@ -110,9 +106,7 @@ void OpenMap::OnOK() void OpenMap::populateMapListbox( Bool systemMaps ) { m_usingSystemDir = systemMaps; -#if defined(RTS_DEBUG) ::AfxGetApp()->WriteProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", m_usingSystemDir); -#endif HANDLE hFindFile = 0; WIN32_FIND_DATA findData; @@ -190,12 +184,9 @@ BOOL OpenMap::OnInitDialog() if (pUserMaps != NULL) pUserMaps->SetCheck( !m_usingSystemDir ); -#if !defined(RTS_DEBUG) - if (pSystemMaps) - pSystemMaps->ShowWindow( FALSE ); - if (pUserMaps) - pUserMaps->ShowWindow( FALSE ); -#endif + // TheSuperHackers @tweak Originally World Builder has hidden the System Maps tab button in Release builds, + // perhaps with the intention to only show User Maps to community users. However, World Builder did release + // as a Debug build and always had the System Maps tab, therefore this now shows it always for simplicity. populateMapListbox( m_usingSystemDir ); diff --git a/Generals/Code/Tools/WorldBuilder/src/SaveMap.cpp b/Generals/Code/Tools/WorldBuilder/src/SaveMap.cpp index bfe66e525f2..3f40900b24b 100644 --- a/Generals/Code/Tools/WorldBuilder/src/SaveMap.cpp +++ b/Generals/Code/Tools/WorldBuilder/src/SaveMap.cpp @@ -32,11 +32,7 @@ SaveMap::SaveMap(TSaveMapInfo *pInfo, CWnd* pParent /*=NULL*/) : CDialog(SaveMap::IDD, pParent), m_pInfo(pInfo) { -#if defined(RTS_DEBUG) m_pInfo->usingSystemDir = m_usingSystemDir = ::AfxGetApp()->GetProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", TRUE); -#else - m_pInfo->usingSystemDir = m_usingSystemDir = FALSE; -#endif //{{AFX_DATA_INIT(SaveMap) // NOTE: the ClassWizard will add member initialization here @@ -121,9 +117,7 @@ void SaveMap::OnBrowse() void SaveMap::populateMapListbox( Bool systemMaps ) { m_pInfo->usingSystemDir = m_usingSystemDir = systemMaps; -#if defined(RTS_DEBUG) ::AfxGetApp()->WriteProfileInt(MAP_OPENSAVE_PANEL_SECTION, "UseSystemDir", m_usingSystemDir); -#endif HANDLE hFindFile = 0; WIN32_FIND_DATA findData; @@ -225,12 +219,9 @@ BOOL SaveMap::OnInitDialog() if (pUserMaps != NULL) pUserMaps->SetCheck( !m_usingSystemDir ); -#if !defined(RTS_DEBUG) - if (pSystemMaps) - pSystemMaps->ShowWindow( FALSE ); - if (pUserMaps) - pUserMaps->ShowWindow( FALSE ); -#endif + // TheSuperHackers @tweak Originally World Builder has hidden the System Maps tab button in Release builds, + // perhaps with the intention to only show User Maps to community users. However, World Builder did release + // as a Debug build and always had the System Maps tab, therefore this now shows it always for simplicity. populateMapListbox( m_usingSystemDir );