combo graph fix

This commit is contained in:
Glenn Maynard
2003-12-23 04:44:34 +00:00
parent ba361166eb
commit 33899d03d6
6 changed files with 18 additions and 13 deletions
+3
View File
@@ -52,6 +52,9 @@ void ComboGraph::Load( CString Path, const StageStats &s, PlayerNumber pn )
if( combo.GetStageCnt() < MinComboSizeToShow )
continue; /* too small */
if( !MaxComboSize )
continue;
const bool IsMax = (combo.GetStageCnt() == MaxComboSize);
if( !IsMax )
continue;
+1 -1
View File
@@ -1151,7 +1151,7 @@ void PlayerMinus::HandleTapRowScore( unsigned row )
/* Use the real current beat, not the beat we've been passed. That's because we
* want to record the current life/combo to the current time; eg. if it's a MISS,
* the beat we're registering is in the past, but the life is changing now. */
g_CurStageStats.UpdateComboList( m_PlayerNumber, GAMESTATE->m_fSongBeat );
g_CurStageStats.UpdateComboList( m_PlayerNumber, GAMESTATE->m_fSongBeat, false );
float life = -1;
if( m_pLifeMeter )
+4 -4
View File
@@ -115,13 +115,13 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName)
}
g_CurStageStats.iCurCombo[PLAYER_1] = 0;
g_CurStageStats.UpdateComboList( PLAYER_1, 0 );
g_CurStageStats.UpdateComboList( PLAYER_1, 0, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 1;
g_CurStageStats.UpdateComboList( PLAYER_1, 1 );
g_CurStageStats.UpdateComboList( PLAYER_1, 1, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 50;
g_CurStageStats.UpdateComboList( PLAYER_1, 25 );
g_CurStageStats.UpdateComboList( PLAYER_1, 25, false );
g_CurStageStats.iCurCombo[PLAYER_1] = 250;
g_CurStageStats.UpdateComboList( PLAYER_1, 100 );
g_CurStageStats.UpdateComboList( PLAYER_1, 100, false );
}
LOG->Trace( "ScreenEvaluation::ScreenEvaluation()" );
+3
View File
@@ -214,6 +214,9 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S
ASSERT( !m_apNotesQueue[p].empty() );
g_CurStageStats.pSteps[p] = m_apNotesQueue[p][0];
g_CurStageStats.iMeter[p] = m_apNotesQueue[p][0]->GetMeter();
/* Record combo rollover. */
g_CurStageStats.UpdateComboList( (PlayerNumber)p, 0, true );
}
if( GAMESTATE->IsExtraStage() )
+6 -7
View File
@@ -296,7 +296,9 @@ void StageStats::GetLifeRecord( PlayerNumber pn, float *life, int nout ) const
}
}
void StageStats::UpdateComboList( PlayerNumber pn, float pos )
/* If "rollover" is true, we're being called before gameplay begins, so we can record
* the amount of the first combo that comes from the previous song. */
void StageStats::UpdateComboList( PlayerNumber pn, float pos, bool rollover )
{
if( pos < 0 )
return;
@@ -314,17 +316,14 @@ void StageStats::UpdateComboList( PlayerNumber pn, float pos )
Combo_t NewCombo;
NewCombo.start = pos;
ComboList[pn].push_back( NewCombo );
/* If this is the first combo, and the current combo is greater than 1,
* then that extra part of the combo must have come from a previous song.
* Remember it separately. */
if( ComboList[pn].size() == 1 )
ComboList[pn][0].rollover = cnt-1;
}
Combo_t &combo = ComboList[pn].back();
combo.size = pos - combo.start;
combo.cnt = cnt;
if( rollover )
combo.rollover = cnt;
}
/* This returns the largest combo contained within the song, as if
+1 -1
View File
@@ -94,7 +94,7 @@ struct StageStats
float fFirstPos[NUM_PLAYERS], fLastPos[NUM_PLAYERS];
bool FullCombo( PlayerNumber pn ) const;
void UpdateComboList( PlayerNumber pn, float pos );
void UpdateComboList( PlayerNumber pn, float pos, bool rollover );
Combo_t GetMaxCombo( PlayerNumber pn ) const;
};