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:
@@ -647,6 +647,9 @@ LyricBackChangedCommand=LyricCommand,"Back"
|
|||||||
InLength=0
|
InLength=0
|
||||||
OutLength=0
|
OutLength=0
|
||||||
|
|
||||||
|
[NotesWriterSM]
|
||||||
|
DescriptionUsesCreditField=false
|
||||||
|
|
||||||
[OptionRow]
|
[OptionRow]
|
||||||
ShowModIcons=false
|
ShowModIcons=false
|
||||||
ShowUnderlines=true
|
ShowUnderlines=true
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
|
#include "ThemeMetric.h"
|
||||||
|
|
||||||
|
ThemeMetric<bool> USE_CREDIT ( "NotesWriterSM", "DescriptionUsesCreditField" );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Turn the BackgroundChange into a string.
|
* @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()) );
|
GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName, SmEscape(in.GetDescription()).c_str()) );
|
||||||
lines.push_back( song.m_vsKeysoundFile.empty() ? "#NOTES:" : "#NOTES2:" );
|
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:", 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( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) );
|
||||||
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user