Add ComparePlayerOptions and CompareSongOptions.

Fix "c200" never parsing.
This commit is contained in:
Glenn Maynard
2003-09-27 19:23:15 +00:00
parent 09897c0241
commit 048828e544
2 changed files with 48 additions and 1 deletions
+32 -1
View File
@@ -201,7 +201,7 @@ void PlayerOptions::FromString( CString sOptions )
continue;
}
else if( sscanf( sBit, "C%d", &i1 ) == 1 )
else if( sscanf( sBit, "c%d", &i1 ) == 1 )
{
m_bTimeSpacing = true;
m_fScrollBPM = (float) i1;
@@ -441,3 +441,34 @@ float PlayerOptions::GetReversePercentForColumn( int iCol )
f -= 1;
return f;
}
bool ComparePlayerOptions( const PlayerOptions &po1, const PlayerOptions &po2 )
{
#define COMPARE(x) { if( po1.x != po2.x ) return false; }
COMPARE(m_bTimeSpacing);
COMPARE(m_fScrollSpeed);
COMPARE(m_fScrollBPM);
COMPARE(m_fDark);
COMPARE(m_fBlind);
COMPARE(m_Turn);
COMPARE(m_Transform);
COMPARE(m_bHoldNotes);
COMPARE(m_bTimingAssist);
COMPARE(m_bProTiming);
COMPARE(m_fPerspectiveTilt);
COMPARE(m_fSkew);
COMPARE(m_sPositioning);
COMPARE(m_sNoteSkin);
int i;
for( i = 0; i < PlayerOptions::NUM_ACCELS; ++i )
COMPARE(m_fAccels[i]);
for( i = 0; i < PlayerOptions::NUM_EFFECTS; ++i )
COMPARE(m_fEffects[i]);
for( i = 0; i < PlayerOptions::NUM_APPEARANCES; ++i )
COMPARE(m_fAppearances[i]);
for( i = 0; i < PlayerOptions::NUM_SCROLLS; ++i )
COMPARE(m_fScrolls[i]);
#undef COMPARE
return true;
}
+16
View File
@@ -114,3 +114,19 @@ void SongOptions::FromString( CString sOptions )
else if( sBit == "savescore" ) m_bSaveScore = on;
}
}
bool CompareSongOptions( const SongOptions &so1, const SongOptions &so2 )
{
#define COMPARE(x) { if( so1.x != so2.x ) return false; }
COMPARE( m_LifeType );
COMPARE( m_DrainType );
COMPARE( m_iBatteryLives );
COMPARE( m_FailType );
COMPARE( m_fMusicRate );
COMPARE( m_bAssistTick );
COMPARE( m_bAutoSync );
COMPARE( m_bSaveScore );
#undef COMPARE
return true;
}