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];
|
out.m_sArtistTranslit = sParams[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if( sValueName=="VERSION" )
|
||||||
|
{
|
||||||
|
out.m_fVersion = StringToFloat( sParams[1] );
|
||||||
|
}
|
||||||
|
|
||||||
else if( sValueName=="GENRE" )
|
else if( sValueName=="GENRE" )
|
||||||
{
|
{
|
||||||
out.m_sGenre = sParams[1];
|
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( "#TITLETRANSLIT:%s;", SmEscape(out.m_sMainTitleTranslit).c_str() ) );
|
||||||
f.PutLine( ssprintf( "#SUBTITLETRANSLIT:%s;", SmEscape(out.m_sSubTitleTranslit).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( "#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( "#GENRE:%s;", SmEscape(out.m_sGenre).c_str() ) );
|
||||||
f.PutLine( ssprintf( "#CREDIT:%s;", SmEscape(out.m_sCredit).c_str() ) );
|
f.PutLine( ssprintf( "#CREDIT:%s;", SmEscape(out.m_sCredit).c_str() ) );
|
||||||
f.PutLine( ssprintf( "#BANNER:%s;", SmEscape(out.m_sBannerFile).c_str() ) );
|
f.PutLine( ssprintf( "#BANNER:%s;", SmEscape(out.m_sBannerFile).c_str() ) );
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ static const char *InstrumentTrackNames[] = {
|
|||||||
XToString( InstrumentTrack );
|
XToString( InstrumentTrack );
|
||||||
StringToX( InstrumentTrack );
|
StringToX( InstrumentTrack );
|
||||||
|
|
||||||
|
const static float VERSION_NUMBER = 0.5f;
|
||||||
|
|
||||||
Song::Song()
|
Song::Song()
|
||||||
{
|
{
|
||||||
FOREACH_BackgroundLayer( i )
|
FOREACH_BackgroundLayer( i )
|
||||||
@@ -59,6 +61,7 @@ Song::Song()
|
|||||||
m_ForegroundChanges = AutoPtrCopyOnWrite<VBackgroundChange>(new VBackgroundChange);
|
m_ForegroundChanges = AutoPtrCopyOnWrite<VBackgroundChange>(new VBackgroundChange);
|
||||||
|
|
||||||
m_LoadedFromProfile = ProfileSlot_Invalid;
|
m_LoadedFromProfile = ProfileSlot_Invalid;
|
||||||
|
m_fVersion = VERSION_NUMBER;
|
||||||
m_fMusicSampleStartSeconds = -1;
|
m_fMusicSampleStartSeconds = -1;
|
||||||
m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH;
|
m_fMusicSampleLengthSeconds = DEFAULT_MUSIC_SAMPLE_LENGTH;
|
||||||
m_fMusicLengthSeconds = 0;
|
m_fMusicLengthSeconds = 0;
|
||||||
|
|||||||
@@ -124,6 +124,9 @@ public:
|
|||||||
RString GetDisplayFullTitle() const;
|
RString GetDisplayFullTitle() const;
|
||||||
RString GetTranslitFullTitle() const;
|
RString GetTranslitFullTitle() const;
|
||||||
|
|
||||||
|
// allow versioning with the song.
|
||||||
|
float m_fVersion;
|
||||||
|
|
||||||
RString m_sGenre;
|
RString m_sGenre;
|
||||||
|
|
||||||
// This is read and saved, but never actually used.
|
// This is read and saved, but never actually used.
|
||||||
|
|||||||
Reference in New Issue
Block a user