add "Create Song from music file" function

This commit is contained in:
Chris Danford
2005-09-27 09:59:39 +00:00
parent b9fe8abfea
commit ea5eb4b223
6 changed files with 50 additions and 33 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ void MainMenuDlg::OnCreateSong()
BOOL bSuccess; BOOL bSuccess;
CString sSongDirectory = "Songs\\MyCreations\\"; CString sSongDirectory = "Songs\\My Creations\\";
CreateDirectory( sSongDirectory, NULL ); // ok if this fails. It will already exist if we've created another song. CreateDirectory( sSongDirectory, NULL ); // ok if this fails. It will already exist if we've created another song.
DWORD dwError = ::GetLastError(); DWORD dwError = ::GetLastError();
sSongDirectory += sFileNameNoExt; sSongDirectory += sFileNameNoExt;
+2 -1
View File
@@ -35,11 +35,12 @@ protected:
// Generated message map functions // Generated message map functions
//{{AFX_MSG(MainMenuDlg) //{{AFX_MSG(MainMenuDlg)
afx_msg void OnConvertTheme();
afx_msg void OnExportPackages(); afx_msg void OnExportPackages();
afx_msg void OnEditInstallations(); afx_msg void OnEditInstallations();
afx_msg void OnAnalyzeElements(); afx_msg void OnAnalyzeElements();
afx_msg void OnChangeApi(); afx_msg void OnChangeApi();
afx_msg void OnCreateSong();
virtual BOOL OnInitDialog();
//}}AFX_MSG //}}AFX_MSG
DECLARE_MESSAGE_MAP() DECLARE_MESSAGE_MAP()
}; };
+1
View File
@@ -20,6 +20,7 @@
#define ZERO(x) memset(&x, 0, sizeof(x)) #define ZERO(x) memset(&x, 0, sizeof(x))
#define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); } #define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); }
#define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
#define RECTWIDTH(rect) ((rect).right - (rect).left) #define RECTWIDTH(rect) ((rect).right - (rect).left)
#define RECTHEIGHT(rect) ((rect).bottom - (rect).top) #define RECTHEIGHT(rect) ((rect).bottom - (rect).top)
+3 -1
View File
@@ -47,6 +47,7 @@
#define IDC_BUTTON_ANALYZE 1025 #define IDC_BUTTON_ANALYZE 1025
#define IDC_CHANGE_API 1025 #define IDC_CHANGE_API 1025
#define IDC_BUTTON_EDIT_METRICS 1026 #define IDC_BUTTON_EDIT_METRICS 1026
#define IDC_CREATE_SONG 1026
#define IDC_BUTTON_ANALYZE_METRICS 1027 #define IDC_BUTTON_ANALYZE_METRICS 1027
#define IDC_EDIT_VALUE 1028 #define IDC_EDIT_VALUE 1028
#define IDC_EDIT_DEFAULT 1029 #define IDC_EDIT_DEFAULT 1029
@@ -67,6 +68,7 @@
#define IDC_RADIO_SOUND_NULL 1052 #define IDC_RADIO_SOUND_NULL 1052
#define IDC_CHECK_LOG_TO_DISK 1053 #define IDC_CHECK_LOG_TO_DISK 1053
#define IDC_CHECK_SHOW_LOG_WINDOW 1054 #define IDC_CHECK_SHOW_LOG_WINDOW 1054
#define IDC_EDIT_INSTALLATION 1054
// Next default values for new objects // Next default values for new objects
// //
@@ -74,7 +76,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 149 #define _APS_NEXT_RESOURCE_VALUE 149
#define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1054 #define _APS_NEXT_CONTROL_VALUE 1055
#define _APS_NEXT_SYMED_VALUE 104 #define _APS_NEXT_SYMED_VALUE 104
#endif #endif
#endif #endif
+19 -14
View File
@@ -2,7 +2,7 @@
[General Info] [General Info]
Version=1 Version=1
LastClass=ChangeGameSettings LastClass=MainMenuDlg
LastTemplate=CDialog LastTemplate=CDialog
NewFileInclude1=#include "stdafx.h" NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "smpackage.h" NewFileInclude2=#include "smpackage.h"
@@ -16,25 +16,25 @@ Resource1=IDR_MAINFRAME
Resource2=IDD_ENTER_STRING Resource2=IDD_ENTER_STRING
Class3=CSMPackageInstallDlg Class3=CSMPackageInstallDlg
Class4=CSmpackageExportDlg Class4=CSmpackageExportDlg
Resource3=IDD_INSTALL Resource3=IDD_UNINSTALL_OLD_PACKAGES
Class5=EnterName Class5=EnterName
Resource4=IDD_ENTER_COMMENT Resource4=IDD_INSTALL
Class6=EditInsallations Class6=EditInsallations
Resource5=IDD_SHOW_COMMENT Resource5=IDD_EXPORTER
Class7=MainMenuDlg Class7=MainMenuDlg
Resource6=IDD_EDIT_INSTALLATIONS Resource6=IDD_EDIT_METRICS
Class8=ConvertThemeDlg Class8=ConvertThemeDlg
Resource7=IDD_CONVERT_THEME Resource7=IDD_CHANGE_GAME_SETTINGS
Class9=EditMetricsDlg Class9=EditMetricsDlg
Resource8=IDD_EXPORTER Resource8=IDD_DIALOG_NAME
Resource9=IDD_UNINSTALL_OLD_PACKAGES Resource9=IDD_SHOW_COMMENT
Class10=EnterComment Class10=EnterComment
Resource10=IDD_MENU Resource10=IDD_CONVERT_THEME
Class11=ShowComment Class11=ShowComment
Resource11=IDD_EDIT_METRICS Resource11=IDD_ENTER_COMMENT
Resource12=IDD_DIALOG_NAME Resource12=IDD_EDIT_INSTALLATIONS
Class12=ChangeGameSettings Class12=ChangeGameSettings
Resource13=IDD_CHANGE_GAME_SETTINGS Resource13=IDD_MENU
[CLS:CSmpackageApp] [CLS:CSmpackageApp]
Type=0 Type=0
@@ -140,7 +140,7 @@ LastObject=EditInsallations
[DLG:IDD_MENU] [DLG:IDD_MENU]
Type=1 Type=1
Class=MainMenuDlg Class=MainMenuDlg
ControlCount=14 ControlCount=19
Control1=IDOK,button,1342242817 Control1=IDOK,button,1342242817
Control2=IDC_STATIC,static,1342177294 Control2=IDC_STATIC,static,1342177294
Control3=IDC_EXPORT_PACKAGES,button,1342242816 Control3=IDC_EXPORT_PACKAGES,button,1342242816
@@ -155,6 +155,11 @@ Control11=IDC_STATIC,static,1342308352
Control12=IDC_STATIC,button,1342177287 Control12=IDC_STATIC,button,1342177287
Control13=IDC_CHANGE_API,button,1342242816 Control13=IDC_CHANGE_API,button,1342242816
Control14=IDC_STATIC,static,1342308352 Control14=IDC_STATIC,static,1342308352
Control15=IDC_STATIC,button,1342177287
Control16=IDC_CREATE_SONG,button,1342242816
Control17=IDC_STATIC,static,1342308352
Control18=IDC_STATIC,static,1342308354
Control19=IDC_EDIT_INSTALLATION,edit,1350633600
[CLS:MainMenuDlg] [CLS:MainMenuDlg]
Type=0 Type=0
@@ -163,7 +168,7 @@ ImplementationFile=MainMenuDlg.cpp
BaseClass=CDialog BaseClass=CDialog
Filter=D Filter=D
VirtualFilter=dWC VirtualFilter=dWC
LastObject=IDC_ANALYZE_ELEMENTS LastObject=MainMenuDlg
[DLG:IDD_CONVERT_THEME] [DLG:IDD_CONVERT_THEME]
Type=1 Type=1
+24 -16
View File
@@ -155,29 +155,37 @@ BEGIN
IDC_STATIC,18,144,196,17 IDC_STATIC,18,144,196,17
END END
IDD_MENU DIALOG DISCARDABLE 0, 0, 332, 293 IDD_MENU DIALOGEX 0, 0, 332, 334
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "StepMania Tools Main Menu" CAPTION "StepMania Tools Main Menu"
FONT 8, "MS Sans Serif" FONT 8, "MS Sans Serif"
BEGIN BEGIN
DEFPUSHBUTTON "Exit",IDOK,275,272,50,14 DEFPUSHBUTTON "Exit",IDOK,275,313,50,14
CONTROL 140,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38 CONTROL 140,IDC_STATIC,"Static",SS_BITMAP,0,0,332,38
PUSHBUTTON "Export Packages",IDC_EXPORT_PACKAGES,20,120,70,15 PUSHBUTTON "Export Packages",IDC_EXPORT_PACKAGES,20,130,70,15
LTEXT "Choose this option to create .smzip files that you can share with other StepMania and DWI users. A .smzip package can contain songs, courses, themes, background animations, and more.", LTEXT "Choose this option to create .smzip files that you can share with other StepMania and DWI users. A .smzip package can contain songs, courses, themes, background animations, and more.",
IDC_STATIC,105,115,215,25 IDC_STATIC,105,125,215,25
GROUPBOX ".smzip Packages",IDC_STATIC,5,100,320,50 GROUPBOX ".smzip Packages",IDC_STATIC,7,110,318,50
GROUPBOX "Themes",IDC_STATIC,5,155,320,53 GROUPBOX "Themes",IDC_STATIC,7,165,318,44
PUSHBUTTON "Theme Tools",IDC_ANALYZE_ELEMENTS,20,176,70,15 PUSHBUTTON "Theme Tools",IDC_ANALYZE_ELEMENTS,20,183,70,15
PUSHBUTTON "Edit Installations",IDC_EDIT_INSTALLATIONS,20,65,70,15 PUSHBUTTON "Edit Installations",IDC_EDIT_INSTALLATIONS,20,75,70,15
LTEXT "Choose this option to edit the list of locations where you have StepMania or DWI installed. When you double-click on a .smzip file, you can choose to install the package to any of these locations.", LTEXT "Choose this option to edit the list of locations where you have StepMania or DWI installed. When you double-click on a .smzip file, you can choose to install the package to any of these locations.",
IDC_STATIC,105,60,215,25 IDC_STATIC,105,70,215,25
GROUPBOX "Installations",IDC_STATIC,5,45,320,50 GROUPBOX "Installations",IDC_STATIC,7,55,318,50
LTEXT "Using this feature, you can:\n - Catch redundant and misnamed theme elements\n - Convert a SM 3.0 theme for use in SM 4.0\n - Edit theme metrics using a user-friendly interface", LTEXT "Using this feature, you can:\n - Catch redundant and misnamed theme elements\n - Edit theme metrics using a user-friendly interface",
IDC_STATIC,103,168,215,35 IDC_STATIC,103,178,215,26
GROUPBOX "Game Settings",IDC_STATIC,6,215,320,49 GROUPBOX "Game Settings",IDC_STATIC,6,214,320,49
PUSHBUTTON "Change Settings",IDC_CHANGE_API,20,234,70,15 PUSHBUTTON "Change Settings",IDC_CHANGE_API,20,233,70,15
LTEXT "Using this feature, you can:\n - Change the graphics API that StepMania will use.\n - Change the sound API that StepMania will use.", LTEXT "Using this feature, you can:\n - Change the graphics API that StepMania will use.\n - Change the sound API that StepMania will use.",
IDC_STATIC,104,228,215,29 IDC_STATIC,104,227,215,29
GROUPBOX "Songs",IDC_STATIC,6,267,320,38
PUSHBUTTON "Create Song",IDC_CREATE_SONG,20,282,70,15
LTEXT "Choose this option to create a new song in StepMania from your favorite mp3 or ogg music file.",
IDC_STATIC,104,281,215,23
RTEXT "Installation:",IDC_STATIC,37,42,63,9,0,
WS_EX_TRANSPARENT
EDITTEXT IDC_EDIT_INSTALLATION,105,40,220,12,ES_AUTOHSCROLL |
ES_READONLY
END END
IDD_CONVERT_THEME DIALOG DISCARDABLE 0, 0, 332, 258 IDD_CONVERT_THEME DIALOG DISCARDABLE 0, 0, 332, 258
@@ -389,7 +397,7 @@ BEGIN
LEFTMARGIN, 7 LEFTMARGIN, 7
RIGHTMARGIN, 325 RIGHTMARGIN, 325
TOPMARGIN, 7 TOPMARGIN, 7
BOTTOMMARGIN, 286 BOTTOMMARGIN, 327
END END
IDD_CONVERT_THEME, DIALOG IDD_CONVERT_THEME, DIALOG