diff --git a/stepmania/src/smpackage-net2003.vcproj b/stepmania/src/smpackage-net2003.vcproj index 3baf0e74f6..16161fc37c 100644 --- a/stepmania/src/smpackage-net2003.vcproj +++ b/stepmania/src/smpackage-net2003.vcproj @@ -41,6 +41,7 @@ Name="VCCustomBuildTool"/> - - - - @@ -186,12 +181,6 @@ - - - - @@ -262,17 +251,14 @@ - - + RelativePath="res\smpackage.ico"> + RelativePath=".\smpackage\smpackage.rc"> @@ -290,6 +276,15 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - first ); - SortCStringArray( asKeys ); - - for( unsigned i=0; ibegin(); val != pKey->end(); ++val ) - { - CString sName = val->first, sValue = val->second; - asNames.push_back( sName ); - } - - SortCStringArray( asNames ); - - for( unsigned j=0; j 1000 -#pragma once -#endif // _MSC_VER > 1000 -// EditMetricsDlg.h : header file -// - -#include "TreeCtrlEx.h" - -///////////////////////////////////////////////////////////////////////////// -// EditMetricsDlg dialog - -class EditMetricsDlg : public CDialog -{ -// Construction -public: - EditMetricsDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(EditMetricsDlg) - enum { IDD = IDD_EDIT_METRICS }; - CEdit m_editValue; - CEdit m_editDefault; - CButton m_buttonRemove; - CButton m_buttonOverride; - CTreeCtrlEx m_tree; - //}}AFX_DATA - - CString m_sTheme; - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(EditMetricsDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(EditMetricsDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnButtonOverride(); - afx_msg void OnButtonRemove(); - afx_msg void OnButtonNew(); - afx_msg void OnButtonSave(); - afx_msg void OnChangeEditValue(); - afx_msg void OnButtonHelp(); - afx_msg void OnDblclkTree(NMHDR* pNMHDR, LRESULT* pResult); - afx_msg void OnButtonClose(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() - - void RefreshTree(); - void GetSelectedKeyAndName( CString& sKeyOut, CString& sNameOut ); -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_EDITMETRICSDLG_H__39D944CD_BCE4_4C30_876E_0B5A0CE42931__INCLUDED_) diff --git a/stepmania/src/smpackage/converttheme.bmp b/stepmania/src/smpackage/converttheme.bmp deleted file mode 100644 index 15e2bc7b6d..0000000000 Binary files a/stepmania/src/smpackage/converttheme.bmp and /dev/null differ diff --git a/stepmania/src/smpackage/editmetrics.bmp b/stepmania/src/smpackage/editmetrics.bmp deleted file mode 100644 index d571f42441..0000000000 Binary files a/stepmania/src/smpackage/editmetrics.bmp and /dev/null differ diff --git a/stepmania/src/smpackage/onvertThemeDlg.cpp b/stepmania/src/smpackage/onvertThemeDlg.cpp deleted file mode 100644 index 5f3f57fba1..0000000000 --- a/stepmania/src/smpackage/onvertThemeDlg.cpp +++ /dev/null @@ -1,348 +0,0 @@ -// onvertThemeDlg.cpp : implementation file -// - -#include "stdafx.h" -#include "smpackage.h" -#include "onvertThemeDlg.h" -#include "smpackageUtil.h" -#include "EditMetricsDlg.h" -#include "EditMetricsDlg.h" -#include "IniFile.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// ConvertThemeDlg dialog - - -ConvertThemeDlg::ConvertThemeDlg(CWnd* pParent /*=NULL*/) - : CDialog(ConvertThemeDlg::IDD, pParent) -{ - //{{AFX_DATA_INIT(ConvertThemeDlg) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT -} - - -void ConvertThemeDlg::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(ConvertThemeDlg) - DDX_Control(pDX, IDC_BUTTON_ANALYZE_METRICS, m_buttonAnalyzeMetrics); - DDX_Control(pDX, IDC_BUTTON_EDIT_METRICS, m_buttonEditMetrics); - DDX_Control(pDX, IDC_BUTTON_ANALYZE, m_buttonAnalyze); - DDX_Control(pDX, IDC_LIST_THEMES, m_listThemes); - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(ConvertThemeDlg, CDialog) - //{{AFX_MSG_MAP(ConvertThemeDlg) - ON_LBN_SELCHANGE(IDC_LIST_THEMES, OnSelchangeListThemes) - ON_BN_CLICKED(IDC_BUTTON_ANALYZE, OnButtonAnalyze) - ON_BN_CLICKED(IDC_BUTTON_EDIT_METRICS, OnButtonEditMetrics) - ON_BN_CLICKED(IDC_BUTTON_ANALYZE_METRICS, OnButtonAnalyzeMetrics) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// ConvertThemeDlg message handlers - -BOOL ConvertThemeDlg::OnInitDialog() -{ - CDialog::OnInitDialog(); - - // TODO: Add extra initialization here - - CStringArray asThemes; - GetDirListing( "Themes\\*.*", asThemes, true, false ); - for( unsigned i=0; ifirst; - const IniFile::key &Key = it->second; - for( IniFile::key::const_iterator val = Key.begin(); val != Key.end(); ++val ) - { - CString sName = val->first, sValue = val->second; - mapBaseClassPlusNameToValue[sKey+"-"+sName] = sValue; - } - } - - CMapStringToString mapThemeClassPlusNameToValue; - for( it = iniTheme.begin(); it != iniTheme.end(); ++it ) - { - CString sKey = it->first; - const IniFile::key &Key = it->second; - for( IniFile::key::const_iterator val = Key.begin(); val != Key.end(); ++val ) - { - CString sName = val->first, sValue = val->second; - mapThemeClassPlusNameToValue[sKey+"-"+sName] = sValue; - } - } - - - CStringArray asRedundant; - CStringArray asWarning; - for( POSITION pos1=mapThemeClassPlusNameToValue.GetStartPosition(); pos1!=NULL; ) - { - CString sThemeKey, sThemeValue; - mapThemeClassPlusNameToValue.GetNextAssoc( pos1, sThemeKey, sThemeValue ); - bool bFoundMatch = false; - - for( POSITION pos2=mapBaseClassPlusNameToValue.GetStartPosition(); pos2!=NULL; ) - { - CString sBaseKey, sBaseValue; - mapBaseClassPlusNameToValue.GetNextAssoc( pos2, sBaseKey, sBaseValue ); - - if( sThemeKey == sBaseKey ) // match - { - bFoundMatch = true; - if( sThemeValue == sBaseValue ) - asRedundant.push_back( sThemeKey ); - break; // skip to next file in asThemeFilePaths - } - } - if( !bFoundMatch ) - asWarning.push_back( sThemeKey ); - } - - SortCStringArray( asRedundant ); - SortCStringArray( asWarning ); - - FILE* fp = fopen( "metrics_report.txt", "w" ); - ASSERT( fp ); - fprintf( fp, "Theme metrics report for '"+sThemeName+"'.\n\n" ); - fprintf( fp, "The following metrics are REDUNDANT.\n" - " (These metrics are identical to the metrics in the base theme.\n" - " They are unnecessary and should be deleted.)\n" ); - for( i=0; i 1000 -#pragma once -#endif // _MSC_VER > 1000 -// onvertThemeDlg.h : header file -// - -///////////////////////////////////////////////////////////////////////////// -// ConvertThemeDlg dialog - -class ConvertThemeDlg : public CDialog -{ -// Construction -public: - ConvertThemeDlg(CWnd* pParent = NULL); // standard constructor - -// Dialog Data - //{{AFX_DATA(ConvertThemeDlg) - enum { IDD = IDD_CONVERT_THEME }; - CButton m_buttonAnalyzeMetrics; - CButton m_buttonEditMetrics; - CButton m_buttonAnalyze; - CListBox m_listThemes; - //}}AFX_DATA - - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(ConvertThemeDlg) - protected: - virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL - -// Implementation -protected: - - // Generated message map functions - //{{AFX_MSG(ConvertThemeDlg) - virtual BOOL OnInitDialog(); - afx_msg void OnSelchangeListThemes(); - afx_msg void OnButtonAnalyze(); - afx_msg void OnButtonEditMetrics(); - afx_msg void OnButtonAnalyzeMetrics(); - //}}AFX_MSG - DECLARE_MESSAGE_MAP() -}; - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_ONVERTTHEMEDLG_H__4A6650E2_F5C6_4914_8610_2118AB81455F__INCLUDED_)