diff --git a/src/NotesLoaderSSC.cpp b/src/NotesLoaderSSC.cpp index 82f6135342..1721e01dfa 100644 --- a/src/NotesLoaderSSC.cpp +++ b/src/NotesLoaderSSC.cpp @@ -928,6 +928,7 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach } } } + out.m_fVersion = STEPFILE_VERSION_NUMBER; return true; } diff --git a/src/NotesWriterSSC.cpp b/src/NotesWriterSSC.cpp index 0a77bae975..e26d3d6c69 100644 --- a/src/NotesWriterSSC.cpp +++ b/src/NotesWriterSSC.cpp @@ -47,7 +47,7 @@ static RString BackgroundChangeToString( const BackgroundChange &bgc ) * @param out the Song in question. */ static void WriteGlobalTags( RageFile &f, const Song &out ) { - f.PutLine( ssprintf( "#VERSION:%.2f;", out.m_fVersion ) ); + f.PutLine( ssprintf( "#VERSION:%.2f;", STEPFILE_VERSION_NUMBER ) ); f.PutLine( ssprintf( "#TITLE:%s;", SmEscape(out.m_sMainTitle).c_str() ) ); f.PutLine( ssprintf( "#SUBTITLE:%s;", SmEscape(out.m_sSubTitle).c_str() ) ); f.PutLine( ssprintf( "#ARTIST:%s;", SmEscape(out.m_sArtist).c_str() ) ); diff --git a/src/Song.cpp b/src/Song.cpp index 2f45d43e29..67b730ee61 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -36,8 +36,7 @@ #include #include -/** @brief The version of the .ssc file format. */ -const static float VERSION_NUMBER = 0.53f; + /** * @brief The internal version of the cache for StepMania. * @@ -66,7 +65,7 @@ Song::Song() m_ForegroundChanges = AutoPtrCopyOnWrite(new VBackgroundChange); m_LoadedFromProfile = ProfileSlot_Invalid; - m_fVersion = VERSION_NUMBER; + m_fVersion = STEPFILE_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 aefc16f763..07d05a7742 100644 --- a/src/Song.h +++ b/src/Song.h @@ -16,6 +16,9 @@ class StepsID; struct lua_State; struct BackgroundChange; +/** @brief The version of the .ssc file format. */ +const static float STEPFILE_VERSION_NUMBER = 0.53f; + /** @brief How many edits for this song can each profile have? */ const int MAX_EDITS_PER_SONG_PER_PROFILE = 5; /** @brief How many edits for this song can be available? */ @@ -73,7 +76,7 @@ public: ~Song(); void Reset(); void DetachSteps(); - + /** * @brief Load a song from the chosen directory. *