本文整理汇总了C++中TimingData::SetBPMAtBeat方法的典型用法代码示例。如果您正苦于以下问题:C++ TimingData::SetBPMAtBeat方法的具体用法?C++ TimingData::SetBPMAtBeat怎么用?C++ TimingData::SetBPMAtBeat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimingData
的用法示例。
在下文中一共展示了TimingData::SetBPMAtBeat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromKSFFile
//.........这里部分代码省略.........
break;
}
else if( Rage::starts_with(sRowString, "|") )
{
/*
if (bKIUCompliant)
{
// Log an error, ignore the line.
continue;
}
*/
// gotta do something tricky here: if the bpm is below one then a couple of calculations
// for scrollsegments will be made, example, bpm 0.2, tick 4000, the scrollsegment will
// be 0. if the tickcount is non a stepmania standard then it will be adapted, a scroll
// segment will then be added based on approximations. -DaisuMaster
// eh better do it considering the tickcount (high tickcounts)
// I'm making some experiments, please spare me...
//continue;
std::string temp = sRowString.substr(2,sRowString.size()-3);
float numTemp = StringToFloat(temp);
if (Rage::starts_with(sRowString, "|T"))
{
// duh
iTickCount = static_cast<int>(numTemp);
// I have been owned by the man -DaisuMaster
stepsTiming.SetTickcountAtBeat( fCurBeat, Rage::clamp(iTickCount, 0, ROWS_PER_BEAT) );
}
else if (Rage::starts_with(sRowString, "|B"))
{
// BPM
stepsTiming.SetBPMAtBeat( fCurBeat, numTemp );
}
else if (Rage::starts_with(sRowString, "|E"))
{
// DelayBeat
float fCurDelay = 60 / stepsTiming.GetBPMAtBeat(fCurBeat) * numTemp / iTickCount;
fCurDelay += stepsTiming.GetDelayAtRow(BeatToNoteRow(fCurBeat) );
stepsTiming.SetDelayAtBeat( fCurBeat, fCurDelay );
}
else if (Rage::starts_with(sRowString, "|D"))
{
// Delays
float fCurDelay = stepsTiming.GetStopAtRow(BeatToNoteRow(fCurBeat) );
fCurDelay += numTemp / 1000;
stepsTiming.SetDelayAtBeat( fCurBeat, fCurDelay );
}
else if (Rage::starts_with(sRowString, "|M") || Rage::starts_with(sRowString, "|C"))
{
// multipliers/combo
ComboSegment seg( BeatToNoteRow(fCurBeat), int(numTemp) );
stepsTiming.AddSegment( seg );
}
else if (Rage::starts_with(sRowString, "|S"))
{
// speed segments
}
else if (Rage::starts_with(sRowString, "|F"))
{
// fakes
}
else if (Rage::starts_with(sRowString, "|X"))
{
// scroll segments