Пример #1
0
void Steps::TidyUpData()
{
	// Don't set the StepsType to dance single if it's invalid.  That just
	// causes unrecognized charts to end up where they don't belong.
	// Leave it as StepsType_Invalid so the Song can handle it specially.  This
	// is a forwards compatibility feature, so that if a future version adds a
	// new style, editing a simfile with unrecognized Steps won't silently
	// delete them. -Kyz
	if( m_StepsType == StepsType_Invalid )
	{
		LOG->Warn("Detected steps with unknown style '%s' in '%s'", m_StepsTypeStr.c_str(), m_pSong->m_sSongFileName.c_str());
	}
	else if(m_StepsTypeStr == "")
	{
		m_StepsTypeStr= GAMEMAN->GetStepsTypeInfo(m_StepsType).szName;
	}

	if( GetDifficulty() == Difficulty_Invalid )
		SetDifficulty( StringToDifficulty(GetDescription()) );

	if( GetDifficulty() == Difficulty_Invalid )
	{
		if(	 GetMeter() == 1 )	SetDifficulty( Difficulty_Beginner );
		else if( GetMeter() <= 3 )	SetDifficulty( Difficulty_Easy );
		else if( GetMeter() <= 6 )	SetDifficulty( Difficulty_Medium );
		else				SetDifficulty( Difficulty_Hard );
	}

	if( GetMeter() < 1) // meter is invalid
		SetMeter( int(PredictMeter()) );
}
Пример #2
0
void Steps::TidyUpData()
{
    if( m_StepsType == StepsType_Invalid )
        m_StepsType = StepsType_dance_single;

    if( GetDifficulty() == Difficulty_Invalid )
        SetDifficulty( StringToDifficulty(GetDescription()) );

    if( GetDifficulty() == Difficulty_Invalid )
    {
        if(	 GetMeter() == 1 )	SetDifficulty( Difficulty_Beginner );
        else if( GetMeter() <= 3 )	SetDifficulty( Difficulty_Easy );
        else if( GetMeter() <= 6 )	SetDifficulty( Difficulty_Medium );
        else				SetDifficulty( Difficulty_Hard );
    }

    if( GetMeter() < 1) // meter is invalid
        SetMeter( int(PredictMeter()) );
}