mvoe logic to StageStats::AllFailed

This commit is contained in:
Glenn Maynard
2003-11-03 23:55:58 +00:00
parent e49678e956
commit cdd1f885bf
3 changed files with 11 additions and 5 deletions
+1 -5
View File
@@ -1630,11 +1630,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
/* If all players have *really* failed (bFailed, not the life meter or
* bFailedEarlier): */
bool bAllReallyFailed = true;
for( p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
if( !GAMESTATE->m_CurStageStats.bFailed[p] )
bAllReallyFailed = false;
const bool bAllReallyFailed = GAMESTATE->m_CurStageStats.AllFailed();
if( !bAllReallyFailed && !IsLastSong() )
{
+9
View File
@@ -145,6 +145,15 @@ bool StageStats::OnePassed() const
return false;
}
bool StageStats::AllFailed() const
{
for( int pn=0; pn<NUM_PLAYERS; pn++ )
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(pn)) )
if( !GAMESTATE->m_CurStageStats.bFailed[pn] )
return false;
return true;
}
float StageStats::GetPercentDancePoints( PlayerNumber pn ) const
{
if( iPossibleDancePoints[pn] == 0 )
+1
View File
@@ -25,6 +25,7 @@ struct StageStats
void AddStats( const StageStats& other ); // accumulate
Grade GetGrade( PlayerNumber pn );
bool OnePassed() const;
bool AllFailed() const;
float GetPercentDancePoints( PlayerNumber pn ) const;
Song* pSong;