Changed TimingData Lua API to not return strings that will be immediately be parsed into numbers.

This commit is contained in:
Kyzentun
2014-03-09 10:19:52 -06:00
parent dd187e204c
commit 2fc1c51389
4 changed files with 97 additions and 25 deletions
+25
View File
@@ -170,6 +170,14 @@ RString ComboSegment::ToString(int dec) const
return ssprintf(str.c_str(), GetBeat(), GetCombo(), GetMissCombo());
}
vector<float> ComboSegment::GetValues() const
{
vector<float> ret;
ret.push_back(GetCombo());
ret.push_back(GetMissCombo());
return ret;
}
RString LabelSegment::ToString(int dec) const
{
const RString str = "%.0" + IntToString(dec) + "f=%s";
@@ -189,6 +197,14 @@ RString TimeSignatureSegment::ToString(int dec) const
return ssprintf(str.c_str(), GetBeat(), GetNum(), GetDen());
}
vector<float> TimeSignatureSegment::GetValues() const
{
vector<float> ret;
ret.push_back(GetNum());
ret.push_back(GetDen());
return ret;
}
RString SpeedSegment::ToString(int dec) const
{
const RString str = "%.0" + IntToString(dec)
@@ -198,6 +214,15 @@ RString SpeedSegment::ToString(int dec) const
GetDelay(), GetUnit());
}
vector<float> SpeedSegment::GetValues() const
{
vector<float> ret;
ret.push_back(GetRatio());
ret.push_back(GetDelay());
ret.push_back(GetUnit());
return ret;
}
void SpeedSegment::Scale( int start, int oldLength, int newLength )
{
if( GetUnit() == 0 )