The people voted: different namings upcoming.
Old #DESCRIPTION will become #CHARTNAME. #DESCRIPTION will now be used for general comments or other theme related stuff. Old SSC files will have their #DESCRIPTION converted to #CHARTNAME when completed.
This commit is contained in:
+2
-13
@@ -145,17 +145,6 @@ void SSCLoader::ProcessScrolls( TimingData &out, const RString sParam )
|
||||
}
|
||||
}
|
||||
|
||||
void SSCLoader::ProcessWarnings( Steps *out, const RString param)
|
||||
{
|
||||
vector<RString> splitWarnings;
|
||||
split(param, ",", splitWarnings);
|
||||
|
||||
FOREACH(RString, splitWarnings, s)
|
||||
{
|
||||
out->SetWarning(*s);
|
||||
}
|
||||
}
|
||||
|
||||
bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCache )
|
||||
{
|
||||
LOG->Trace( "Song::LoadFromSSCFile(%s)", sPath.c_str() );
|
||||
@@ -456,9 +445,9 @@ bool SSCLoader::LoadFromSimfile( const RString &sPath, Song &out, bool bFromCach
|
||||
}
|
||||
case GETTING_STEP_INFO:
|
||||
{
|
||||
if (sValueName=="WARNINGS")
|
||||
if (sValueName == "CHARTNAME")
|
||||
{
|
||||
ProcessWarnings(pNewNotes, sParams[1]);
|
||||
pNewNotes->SetChartName(sParams[1]);
|
||||
}
|
||||
if( sValueName=="STEPSTYPE" )
|
||||
{
|
||||
|
||||
@@ -68,8 +68,6 @@ struct SSCLoader : public SMLoader
|
||||
void ProcessLabels( TimingData &, const RString );
|
||||
virtual void ProcessCombos( TimingData &, const RString, const int = -1 );
|
||||
void ProcessScrolls( TimingData &, const RString );
|
||||
|
||||
void ProcessWarnings( Steps *out, const RString param);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -508,9 +508,9 @@ public:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int GetWarnings(T *p, lua_State *L)
|
||||
static int GetChartName(T *p, lua_State *L)
|
||||
{
|
||||
lua_pushstring(L, p->GetWarningsToSetString());
|
||||
lua_pushstring(L, p->GetChartName());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ public:
|
||||
ADD_METHOD( HasAttacks );
|
||||
ADD_METHOD( GetRadarValues );
|
||||
ADD_METHOD( GetTimingData );
|
||||
ADD_METHOD( GetWarnings );
|
||||
ADD_METHOD( GetChartName );
|
||||
//ADD_METHOD( GetSMNoteData );
|
||||
ADD_METHOD( GetStepsType );
|
||||
ADD_METHOD( IsAnEdit );
|
||||
|
||||
+6
-25
@@ -98,33 +98,14 @@ public:
|
||||
/** @brief The stringified list of attacks. */
|
||||
vector<RString> m_sAttackString;
|
||||
|
||||
set<RString> GetWarnings() const
|
||||
RString GetChartName() const
|
||||
{
|
||||
return this->chartWarnings;
|
||||
return parent ? Real()->GetChartName() : this->chartName;
|
||||
}
|
||||
|
||||
RString GetWarningsToSetString() const
|
||||
void SetChartName(const RString name)
|
||||
{
|
||||
RString ret = "";
|
||||
set<RString> tmp = this->GetWarnings();
|
||||
unsigned index = 0;
|
||||
FOREACHS_CONST(RString, tmp, s)
|
||||
{
|
||||
ret += *s;
|
||||
if (++index < tmp.size())
|
||||
ret += ",";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void SetWarning(const RString warning)
|
||||
{
|
||||
this->chartWarnings.insert(warning);
|
||||
}
|
||||
|
||||
void EraseWarnings()
|
||||
{
|
||||
this->chartWarnings.clear();
|
||||
this->chartName = name;
|
||||
}
|
||||
|
||||
void SetFilename( RString fn ) { m_sFilename = fn; }
|
||||
@@ -224,8 +205,8 @@ private:
|
||||
/** @brief The name of the person who created the Steps. */
|
||||
RString m_sCredit;
|
||||
|
||||
/** @brief The list of warnings found in a chart. */
|
||||
set<RString> chartWarnings;
|
||||
/** @brief The name of the chart. */
|
||||
RString chartName;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user