Trim chart name, description, and credit after loading them from the simfile.
This commit is contained in:
@@ -108,6 +108,7 @@ void SetOrigin(SongTagInfo& info)
|
||||
void SetCredit(SongTagInfo& info)
|
||||
{
|
||||
info.song->m_sCredit = (*info.params)[1];
|
||||
Trim(info.song->m_sCredit);
|
||||
}
|
||||
void SetBanner(SongTagInfo& info)
|
||||
{
|
||||
@@ -313,7 +314,9 @@ void SetStepsVersion(StepsTagInfo& info)
|
||||
}
|
||||
void SetChartName(StepsTagInfo& info)
|
||||
{
|
||||
info.steps->SetChartName((*info.params)[1]);
|
||||
RString name= (*info.params)[1];
|
||||
Trim(name);
|
||||
info.steps->SetChartName(name);
|
||||
}
|
||||
void SetStepsType(StepsTagInfo& info)
|
||||
{
|
||||
@@ -328,13 +331,15 @@ void SetChartStyle(StepsTagInfo& info)
|
||||
}
|
||||
void SetDescription(StepsTagInfo& info)
|
||||
{
|
||||
RString name= (*info.params)[1];
|
||||
Trim(name);
|
||||
if(info.song->m_fVersion < VERSION_CHART_NAME_TAG && !info.for_load_edit)
|
||||
{
|
||||
info.steps->SetChartName((*info.params)[1]);
|
||||
info.steps->SetChartName(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
info.steps->SetDescription((*info.params)[1]);
|
||||
info.steps->SetDescription(name);
|
||||
}
|
||||
info.ssc_format= true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
* @brief The internal version of the cache for StepMania.
|
||||
*
|
||||
* Increment this value to invalidate the current cache. */
|
||||
const int FILE_CACHE_VERSION = 226;
|
||||
const int FILE_CACHE_VERSION = 227;
|
||||
|
||||
/** @brief How long does a song sample last by default? */
|
||||
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
|
||||
|
||||
Reference in New Issue
Block a user