本文整理汇总了C++中Steps::SetSavedToDisk方法的典型用法代码示例。如果您正苦于以下问题:C++ Steps::SetSavedToDisk方法的具体用法?C++ Steps::SetSavedToDisk怎么用?C++ Steps::SetSavedToDisk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Steps
的用法示例。
在下文中一共展示了Steps::SetSavedToDisk方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromTokens
void SMLoader::LoadFromTokens(
RString sStepsType,
RString sDescription,
RString sDifficulty,
RString sMeter,
RString sRadarValues,
RString sNoteData,
Steps &out
)
{
// we're loading from disk, so this is by definition already saved:
out.SetSavedToDisk( true );
Trim( sStepsType );
Trim( sDescription );
Trim( sDifficulty );
Trim( sNoteData );
// LOG->Trace( "Steps::LoadFromTokens()" );
// backwards compatibility hacks:
// HACK: We eliminated "ez2-single-hard", but we should still handle it.
if( sStepsType == "ez2-single-hard" )
sStepsType = "ez2-single";
// HACK: "para-single" used to be called just "para"
if( sStepsType == "para" )
sStepsType = "para-single";
out.m_StepsType = GAMEMAN->StringToStepsType( sStepsType );
out.SetDescription( sDescription );
out.SetCredit( sDescription ); // this is often used for both.
out.SetChartName(sDescription); // yeah, one more for good measure.
out.SetDifficulty( OldStyleStringToDifficulty(sDifficulty) );
// Handle hacks that originated back when StepMania didn't have
// Difficulty_Challenge. (At least v1.64, possibly v3.0 final...)
if( out.GetDifficulty() == Difficulty_Hard )
{
// HACK: SMANIAC used to be Difficulty_Hard with a special description.
if( sDescription.CompareNoCase("smaniac") == 0 )
out.SetDifficulty( Difficulty_Challenge );
// HACK: CHALLENGE used to be Difficulty_Hard with a special description.
if( sDescription.CompareNoCase("challenge") == 0 )
out.SetDifficulty( Difficulty_Challenge );
}
if( sMeter.empty() )
{
// some simfiles (e.g. X-SPECIALs from Zenius-I-Vanisher) don't
// have a meter on certain steps. Make the meter 1 in these instances.
sMeter = "1";
}
out.SetMeter( StringToInt(sMeter) );
out.SetSMNoteData( sNoteData );
out.TidyUpData();
}
示例2: LoadFromKSFFile
//.........这里部分代码省略.........
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
ScrollSegment seg = ScrollSegment( BeatToNoteRow(fCurBeat), numTemp );
stepsTiming.AddSegment( seg );
//return true;
}
continue;
}
// Half-doubles is offset; "0011111100000".
if( out.m_StepsType == StepsType_pump_halfdouble )
sRowString.erase( 0, 2 );
// Update TICKCOUNT for Direct Move files.
if( bTickChangeNeeded )
{
iTickCount = newTick;
bTickChangeNeeded = false;
}
for( t=0; t < notedata.GetNumTracks(); t++ )
{
if( sRowString[t] == '4' )
{
/* Remember when each hold starts; ignore the middle. */
if( iHoldStartRow[t] == -1 )
iHoldStartRow[t] = BeatToNoteRow(fCurBeat);
continue;
}
if( iHoldStartRow[t] != -1 ) // this ends the hold
{
int iEndRow = BeatToNoteRow(prevBeat);
if( iHoldStartRow[t] == iEndRow )
notedata.SetTapNote( t, iHoldStartRow[t], TAP_ORIGINAL_TAP );
else
{
//notedata.AddHoldNote( t, iHoldStartRow[t], iEndRow , TAP_ORIGINAL_PUMP_HEAD );
notedata.AddHoldNote( t, iHoldStartRow[t], iEndRow , TAP_ORIGINAL_HOLD_HEAD );
}
iHoldStartRow[t] = -1;
}
TapNote tap;
switch( sRowString[t] )
{
case '0': tap = TAP_EMPTY; break;
case '1': tap = TAP_ORIGINAL_TAP; break;
//allow setting more notetypes on ksf files, this may come in handy (it should) -DaisuMaster
case 'M':
case 'm':
tap = TAP_ORIGINAL_MINE;
break;
case 'F':
case 'f':
tap = TAP_ORIGINAL_FAKE;
break;
case 'L':
case 'l':
tap = TAP_ORIGINAL_LIFT;
break;
default:
LOG->UserLog( "Song file", sPath, "has an invalid row \"%s\"; corrupt notes ignored.",
sRowString.c_str() );
//return false;
tap = TAP_EMPTY;
break;
}
notedata.SetTapNote(t, BeatToNoteRow(fCurBeat), tap);
}
prevBeat = fCurBeat;
fCurBeat = prevBeat + 1.0f / iTickCount;
}
out.SetNoteData( notedata );
out.m_Timing = stepsTiming;
out.TidyUpData();
out.SetSavedToDisk( true ); // we're loading from disk, so this is by definintion already saved
return true;
}