Add requested VERSION tag.
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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() ) );
|
||||
|
||||
@@ -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<VBackgroundChange>(new VBackgroundChange);
|
||||
|
||||
m_LoadedFromProfile = ProfileSlot_Invalid;
|
||||
m_fVersion = VERSION_NUMBER;
|
||||
m_fMusicSampleStartSeconds = -1;
|
||||
m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH;
|
||||
m_fMusicLengthSeconds = 0;
|
||||
|
||||
@@ -123,6 +123,9 @@ public:
|
||||
// "title subtitle"
|
||||
RString GetDisplayFullTitle() const;
|
||||
RString GetTranslitFullTitle() const;
|
||||
|
||||
// allow versioning with the song.
|
||||
float m_fVersion;
|
||||
|
||||
RString m_sGenre;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user