Activate Step's #CREDIT tag.

This commit is contained in:
Jason Felds
2011-02-11 01:17:24 -05:00
parent abd9a446e4
commit 985a62e504
4 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -717,7 +717,7 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
else if( sValueName=="CREDIT" )
{
; // Not implemented yet, but should be.
pNewNotes->SetCredit( sParams[1] );
}
else if( sValueName=="NOTES" )
+1 -1
View File
@@ -276,7 +276,7 @@ static RString GetSSCNotesTag( const Song &song, const Steps &in, bool bSavingCa
}
lines.push_back( ssprintf( "#RADARVALUES:%s:", join(",",asRadarValues).c_str() ) );
lines.push_back( "#CREDIT:;" ); // will be done later.
lines.push_back( ssprintf( "#CREDIT:%s;", SmEscape(in.GetCredit()).c_str() ) );
// TODO: Remove this block, uncommon below block for Split Timing. -Wolfman2000
lines.push_back( "#BPMS:;" );
+7 -1
View File
@@ -322,7 +322,7 @@ void Steps::DeAutogen( bool bCopyNoteData )
m_Difficulty = Real()->m_Difficulty;
m_iMeter = Real()->m_iMeter;
copy( Real()->m_CachedRadarValues, Real()->m_CachedRadarValues + NUM_PLAYERS, m_CachedRadarValues );
m_sCredit = Real()->m_sCredit;
parent = NULL;
if( bCopyNoteData )
@@ -366,6 +366,12 @@ void Steps::SetDifficultyAndDescription( Difficulty dc, RString sDescription )
MakeValidEditDescription( m_sDescription );
}
void Steps::SetCredit( RString sCredit )
{
DeAutogen();
m_sCredit = sCredit;
}
bool Steps::MakeValidEditDescription( RString &sPreferredDescription )
{
if( int(sPreferredDescription.size()) > MAX_EDIT_STEPS_DESCRIPTION_LENGTH )
+4 -1
View File
@@ -40,6 +40,7 @@ public:
Difficulty GetDifficulty() const { return Real()->m_Difficulty; }
int GetMeter() const { return Real()->m_iMeter; }
const RadarValues& GetRadarValues( PlayerNumber pn ) const { return Real()->m_CachedRadarValues[pn]; }
RString GetCredit() const { return Real()->m_sCredit; }
void SetFilename( RString fn ) { m_sFilename = fn; }
RString GetFilename() const { return m_sFilename; }
@@ -48,6 +49,7 @@ public:
void SetDifficulty( Difficulty dc ) { SetDifficultyAndDescription( dc, GetDescription() ); }
void SetDescription( RString sDescription ) { SetDifficultyAndDescription( this->GetDifficulty(), sDescription ); }
void SetDifficultyAndDescription( Difficulty dc, RString sDescription );
void SetCredit( RString sCredit );
static bool MakeValidEditDescription( RString &sPreferredDescription ); // return true if was modified
void SetLoadedFromProfile( ProfileSlot slot ) { m_LoadedFromProfile = slot; }
@@ -92,10 +94,11 @@ private:
/* These values are pulled from the autogen source first, if there is one. */
mutable unsigned m_iHash; // only used if m_Difficulty == Difficulty_Edit
RString m_sDescription; // Step author, edit name, or something meaningful
RString m_sDescription; // Edit name, or something meaningful
Difficulty m_Difficulty; // difficulty classification
int m_iMeter; // difficulty rating from MIN_METER to MAX_METER
RadarValues m_CachedRadarValues[NUM_PLAYERS];
RString m_sCredit; // Step author
};
#endif