move AllFailedEarlier into StageStats

This commit is contained in:
Glenn Maynard
2003-12-31 20:58:14 +00:00
parent 37ebb054d7
commit d5d1ea5ca4
4 changed files with 10 additions and 10 deletions
+1 -9
View File
@@ -1013,14 +1013,6 @@ float ScreenGameplay::StartPlayingSong(float MinTimeToNotes, float MinTimeToMusi
return fFirstSecond - fStartSecond;
}
bool ScreenGameplay::AllFailedEarlier() const
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) && !g_CurStageStats.bFailedEarlier[p] )
return false;
return true;
}
// play assist ticks
bool ScreenGameplay::IsTimeToPlayTicks() const
{
@@ -1380,7 +1372,7 @@ void ScreenGameplay::UpdateCheckFail()
if( GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY &&
GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_ARCADE )
{
if( !AllFailedEarlier() ) // if not the last one to fail
if( !g_CurStageStats.AllFailedEarlier() ) // if not the last one to fail
{
// kill them!
m_soundOniDie.PlayRandom();
-1
View File
@@ -78,7 +78,6 @@ protected:
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);
void ShowSavePrompt( ScreenMessage SM_SendWhenDone );
bool AllFailedEarlier() const;
bool IsTimeToPlayTicks() const;
void UpdateLyrics( float fDeltaTime );
void UpdateCheckFail();
+8
View File
@@ -224,6 +224,14 @@ bool StageStats::AllFailed() const
return true;
}
bool StageStats::AllFailedEarlier() const
{
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(p) && !bFailedEarlier[p] )
return false;
return true;
}
float StageStats::GetPercentDancePoints( PlayerNumber pn ) const
{
if( iPossibleDancePoints[pn] == 0 )
+1
View File
@@ -28,6 +28,7 @@ struct StageStats
Grade GetGrade( PlayerNumber pn ) const;
bool OnePassed() const;
bool AllFailed() const;
bool AllFailedEarlier() const;
float GetPercentDancePoints( PlayerNumber pn ) const;
PlayMode playMode;