diff --git a/src/NotesLoaderSM.cpp b/src/NotesLoaderSM.cpp index ffe564269c..e770978675 100644 --- a/src/NotesLoaderSM.cpp +++ b/src/NotesLoaderSM.cpp @@ -78,6 +78,7 @@ void SMLoader::LoadFromTokens( out.m_StepsType = GAMEMAN->StringToStepsType( sStepsType ); out.SetDescription( sDescription ); out.SetCredit( sDescription ); // this is often used for both. + out.SetChartName(sDescription); // yeah, one more for good measure. out.SetDifficulty( StringToDifficulty(sDifficulty) ); // Handle hacks that originated back when StepMania didn't have diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index 19174bfc92..e10f1162a9 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -461,6 +461,11 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach else if( sValueName=="DESCRIPTION" ) { + if (out.m_fVersion < VERSION_CHART_NAME_TAG) + { + pNewNotes->SetChartName(sParams[1]); + } + // TODO: Make this the else clause? pNewNotes->SetDescription( sParams[1] ); } diff --git a/src/NotesLoaderSSC.h b/src/NotesLoaderSSC.h index 286a849ab2..5b35cc5c4c 100644 --- a/src/NotesLoaderSSC.h +++ b/src/NotesLoaderSSC.h @@ -28,6 +28,8 @@ const float VERSION_WARP_SEGMENT = 0.56f; const float VERSION_SPLIT_TIMING = 0.7f; /** @brief The version that moved the step's Offset higher up. */ const float VERSION_OFFSET_BEFORE_ATTACK = 0.72f; +/** @brief The version that introduced the Chart Name tag. */ +const float VERSION_CHART_NAME_TAG = 0.74f; /** * @brief The SSCLoader handles all of the parsing needed for .ssc files. diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index bad8a1690e..db5bc40d50 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -302,6 +302,7 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa lines.push_back( ssprintf("//---------------%s - %s----------------", GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName, SmEscape(in.GetDescription()).c_str()) ); lines.push_back( "#NOTEDATA:;" ); // our new separator. + lines.push_back( ssprintf( "#CHARTNAME:%s:", SmEscape(in.GetChartName()).c_str())); lines.push_back( ssprintf( "#STEPSTYPE:%s;", GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName ) ); lines.push_back( ssprintf( "#DESCRIPTION:%s;", SmEscape(in.GetDescription()).c_str() ) ); lines.push_back( ssprintf( "#CHARTSTYLE:%s;", SmEscape(in.GetChartStyle()).c_str() ) ); diff --git a/src/Song.h b/src/Song.h index 1858a136a0..55a3365229 100644 --- a/src/Song.h +++ b/src/Song.h @@ -20,7 +20,7 @@ void FixupPath( RString &path, const RString &sSongPath ); RString GetSongAssetPath( RString sPath, const RString &sSongPath ); /** @brief The version of the .ssc file format. */ -const static float STEPFILE_VERSION_NUMBER = 0.73f; +const static float STEPFILE_VERSION_NUMBER = 0.74f; /** @brief How many edits for this song can each profile have? */ const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;