diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index b36143fd8c..2a8500c807 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -212,6 +212,11 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach out.m_sArtistTranslit = sParams[1]; } + else if( sValueName=="VERSION" ) + { + out.m_fVersion = StringToFloat( sParams[1] ); + } + else if( sValueName=="GENRE" ) { out.m_sGenre = sParams[1]; diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index 3a41dde97c..365a490493 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -46,6 +46,7 @@ static void WriteGlobalTags( RageFile &f, const Song &out ) f.PutLine( ssprintf( "#TITLETRANSLIT:%s;", SmEscape(out.m_sMainTitleTranslit).c_str() ) ); f.PutLine( ssprintf( "#SUBTITLETRANSLIT:%s;", SmEscape(out.m_sSubTitleTranslit).c_str() ) ); f.PutLine( ssprintf( "#ARTISTTRANSLIT:%s;", SmEscape(out.m_sArtistTranslit).c_str() ) ); + f.PutLine( ssprintf( "#VERSION:%f;", out.m_fVersion ) ); f.PutLine( ssprintf( "#GENRE:%s;", SmEscape(out.m_sGenre).c_str() ) ); f.PutLine( ssprintf( "#CREDIT:%s;", SmEscape(out.m_sCredit).c_str() ) ); f.PutLine( ssprintf( "#BANNER:%s;", SmEscape(out.m_sBannerFile).c_str() ) ); diff --git a/src/Song.cpp b/src/Song.cpp index 4f44ac884a..a4b62e0bab 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -52,6 +52,8 @@ static const char *InstrumentTrackNames[] = { XToString( InstrumentTrack ); StringToX( InstrumentTrack ); +const static float VERSION_NUMBER = 0.5f; + Song::Song() { FOREACH_BackgroundLayer( i ) @@ -59,6 +61,7 @@ Song::Song() m_ForegroundChanges = AutoPtrCopyOnWrite(new VBackgroundChange); m_LoadedFromProfile = ProfileSlot_Invalid; + m_fVersion = VERSION_NUMBER; m_fMusicSampleStartSeconds = -1; m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH; m_fMusicLengthSeconds = 0; diff --git a/src/Song.h b/src/Song.h index 3aa36f025b..4fb810754b 100644 --- a/src/Song.h +++ b/src/Song.h @@ -123,6 +123,9 @@ public: // "title subtitle" RString GetDisplayFullTitle() const; RString GetTranslitFullTitle() const; + + // allow versioning with the song. + float m_fVersion; RString m_sGenre;