sm124futures: Allow choosing which field to use.

Either the #DESCRIPTION or #CREDIT tag can be used for SM files.
By default, the old behavior is still used.
This commit is contained in:
Jason Felds
2011-03-13 19:35:57 -04:00
parent e14cb3ce6e
commit c435129078
2 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -15,6 +15,9 @@
#include "RageUtil.h"
#include "Song.h"
#include "Steps.h"
#include "ThemeMetric.h"
ThemeMetric<bool> USE_CREDIT ( "NotesWriterSM", "DescriptionUsesCreditField" );
/**
* @brief Turn the BackgroundChange into a string.
@@ -268,7 +271,8 @@ static RString GetSMNotesTag( const Song &song, const Steps &in )
GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName, SmEscape(in.GetDescription()).c_str()) );
lines.push_back( song.m_vsKeysoundFile.empty() ? "#NOTES:" : "#NOTES2:" );
lines.push_back( ssprintf( " %s:", GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName ) );
lines.push_back( ssprintf( " %s:", SmEscape(in.GetDescription()).c_str() ) );
RString desc = (USE_CREDIT ? in.GetCredit() : in.GetDescription());
lines.push_back( ssprintf( " %s:", SmEscape(desc).c_str() ) );
lines.push_back( ssprintf( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) );
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );