Activate Step's #CREDIT tag.
This commit is contained in:
@@ -717,7 +717,7 @@ bool SSCLoader::LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCach
|
|||||||
|
|
||||||
else if( sValueName=="CREDIT" )
|
else if( sValueName=="CREDIT" )
|
||||||
{
|
{
|
||||||
; // Not implemented yet, but should be.
|
pNewNotes->SetCredit( sParams[1] );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( sValueName=="NOTES" )
|
else if( sValueName=="NOTES" )
|
||||||
|
|||||||
@@ -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( 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
|
// TODO: Remove this block, uncommon below block for Split Timing. -Wolfman2000
|
||||||
lines.push_back( "#BPMS:;" );
|
lines.push_back( "#BPMS:;" );
|
||||||
|
|||||||
+7
-1
@@ -322,7 +322,7 @@ void Steps::DeAutogen( bool bCopyNoteData )
|
|||||||
m_Difficulty = Real()->m_Difficulty;
|
m_Difficulty = Real()->m_Difficulty;
|
||||||
m_iMeter = Real()->m_iMeter;
|
m_iMeter = Real()->m_iMeter;
|
||||||
copy( Real()->m_CachedRadarValues, Real()->m_CachedRadarValues + NUM_PLAYERS, m_CachedRadarValues );
|
copy( Real()->m_CachedRadarValues, Real()->m_CachedRadarValues + NUM_PLAYERS, m_CachedRadarValues );
|
||||||
|
m_sCredit = Real()->m_sCredit;
|
||||||
parent = NULL;
|
parent = NULL;
|
||||||
|
|
||||||
if( bCopyNoteData )
|
if( bCopyNoteData )
|
||||||
@@ -366,6 +366,12 @@ void Steps::SetDifficultyAndDescription( Difficulty dc, RString sDescription )
|
|||||||
MakeValidEditDescription( m_sDescription );
|
MakeValidEditDescription( m_sDescription );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Steps::SetCredit( RString sCredit )
|
||||||
|
{
|
||||||
|
DeAutogen();
|
||||||
|
m_sCredit = sCredit;
|
||||||
|
}
|
||||||
|
|
||||||
bool Steps::MakeValidEditDescription( RString &sPreferredDescription )
|
bool Steps::MakeValidEditDescription( RString &sPreferredDescription )
|
||||||
{
|
{
|
||||||
if( int(sPreferredDescription.size()) > MAX_EDIT_STEPS_DESCRIPTION_LENGTH )
|
if( int(sPreferredDescription.size()) > MAX_EDIT_STEPS_DESCRIPTION_LENGTH )
|
||||||
|
|||||||
+4
-1
@@ -40,6 +40,7 @@ public:
|
|||||||
Difficulty GetDifficulty() const { return Real()->m_Difficulty; }
|
Difficulty GetDifficulty() const { return Real()->m_Difficulty; }
|
||||||
int GetMeter() const { return Real()->m_iMeter; }
|
int GetMeter() const { return Real()->m_iMeter; }
|
||||||
const RadarValues& GetRadarValues( PlayerNumber pn ) const { return Real()->m_CachedRadarValues[pn]; }
|
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; }
|
void SetFilename( RString fn ) { m_sFilename = fn; }
|
||||||
RString GetFilename() const { return m_sFilename; }
|
RString GetFilename() const { return m_sFilename; }
|
||||||
@@ -48,6 +49,7 @@ public:
|
|||||||
void SetDifficulty( Difficulty dc ) { SetDifficultyAndDescription( dc, GetDescription() ); }
|
void SetDifficulty( Difficulty dc ) { SetDifficultyAndDescription( dc, GetDescription() ); }
|
||||||
void SetDescription( RString sDescription ) { SetDifficultyAndDescription( this->GetDifficulty(), sDescription ); }
|
void SetDescription( RString sDescription ) { SetDifficultyAndDescription( this->GetDifficulty(), sDescription ); }
|
||||||
void SetDifficultyAndDescription( Difficulty dc, RString sDescription );
|
void SetDifficultyAndDescription( Difficulty dc, RString sDescription );
|
||||||
|
void SetCredit( RString sCredit );
|
||||||
static bool MakeValidEditDescription( RString &sPreferredDescription ); // return true if was modified
|
static bool MakeValidEditDescription( RString &sPreferredDescription ); // return true if was modified
|
||||||
|
|
||||||
void SetLoadedFromProfile( ProfileSlot slot ) { m_LoadedFromProfile = slot; }
|
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. */
|
/* These values are pulled from the autogen source first, if there is one. */
|
||||||
mutable unsigned m_iHash; // only used if m_Difficulty == Difficulty_Edit
|
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
|
Difficulty m_Difficulty; // difficulty classification
|
||||||
int m_iMeter; // difficulty rating from MIN_METER to MAX_METER
|
int m_iMeter; // difficulty rating from MIN_METER to MAX_METER
|
||||||
RadarValues m_CachedRadarValues[NUM_PLAYERS];
|
RadarValues m_CachedRadarValues[NUM_PLAYERS];
|
||||||
|
RString m_sCredit; // Step author
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user