Add m_ to StageStats and PlayerStageStats members. There are several methods of these classes with local variable names that are similar to the member names. m_ helps distinguish between those two types.
This commit is contained in:
@@ -46,22 +46,22 @@ void ComboGraph::Load( const StageStats &s, const PlayerStageStats &pss )
|
||||
|
||||
/* Find the largest combo. */
|
||||
int iMaxComboSize = 0;
|
||||
for( unsigned i = 0; i < pss.ComboList.size(); ++i )
|
||||
iMaxComboSize = max( iMaxComboSize, pss.ComboList[i].GetStageCnt() );
|
||||
for( unsigned i = 0; i < pss.m_ComboList.size(); ++i )
|
||||
iMaxComboSize = max( iMaxComboSize, pss.m_ComboList[i].GetStageCnt() );
|
||||
|
||||
for( unsigned i = 0; i < pss.ComboList.size(); ++i )
|
||||
for( unsigned i = 0; i < pss.m_ComboList.size(); ++i )
|
||||
{
|
||||
const PlayerStageStats::Combo_t &combo = pss.ComboList[i];
|
||||
const PlayerStageStats::Combo_t &combo = pss.m_ComboList[i];
|
||||
if( combo.GetStageCnt() < MinComboSizeToShow )
|
||||
continue; /* too small */
|
||||
|
||||
const bool bIsMax = (combo.GetStageCnt() == iMaxComboSize);
|
||||
|
||||
LOG->Trace( "combo %i is %f+%f of %f", i, combo.fStartSecond, combo.fSizeSeconds, fLastSecond );
|
||||
LOG->Trace( "combo %i is %f+%f of %f", i, combo.m_fStartSecond, combo.m_fSizeSeconds, fLastSecond );
|
||||
Actor *pSprite = bIsMax? m_pMaxCombo->Copy():m_pNormalCombo->Copy();
|
||||
|
||||
const float fStart = SCALE( combo.fStartSecond, fFirstSecond, fLastSecond, 0.0f, 1.0f );
|
||||
const float fSize = SCALE( combo.fSizeSeconds, 0, fLastSecond-fFirstSecond, 0.0f, 1.0f );
|
||||
const float fStart = SCALE( combo.m_fStartSecond, fFirstSecond, fLastSecond, 0.0f, 1.0f );
|
||||
const float fSize = SCALE( combo.m_fSizeSeconds, 0, fLastSecond-fFirstSecond, 0.0f, 1.0f );
|
||||
pSprite->SetCropLeft ( SCALE( fSize, 0.0f, 1.0f, 0.5f, 0.0f ) );
|
||||
pSprite->SetCropRight( SCALE( fSize, 0.0f, 1.0f, 0.5f, 0.0f ) );
|
||||
|
||||
@@ -71,9 +71,9 @@ void ComboGraph::Load( const StageStats &s, const PlayerStageStats &pss )
|
||||
this->AddChild( pSprite );
|
||||
}
|
||||
|
||||
for( unsigned i = 0; i < pss.ComboList.size(); ++i )
|
||||
for( unsigned i = 0; i < pss.m_ComboList.size(); ++i )
|
||||
{
|
||||
const PlayerStageStats::Combo_t &combo = pss.ComboList[i];
|
||||
const PlayerStageStats::Combo_t &combo = pss.m_ComboList[i];
|
||||
if( combo.GetStageCnt() < MinComboSizeToShow )
|
||||
continue; /* too small */
|
||||
|
||||
@@ -86,8 +86,8 @@ void ComboGraph::Load( const StageStats &s, const PlayerStageStats &pss )
|
||||
|
||||
BitmapText *pText = m_pMaxComboText->Copy();
|
||||
|
||||
const float fStart = SCALE( combo.fStartSecond, fFirstSecond, fLastSecond, 0.0f, 1.0f );
|
||||
const float fSize = SCALE( combo.fSizeSeconds, 0, fLastSecond-fFirstSecond, 0.0f, 1.0f );
|
||||
const float fStart = SCALE( combo.m_fStartSecond, fFirstSecond, fLastSecond, 0.0f, 1.0f );
|
||||
const float fSize = SCALE( combo.m_fSizeSeconds, 0, fLastSecond-fFirstSecond, 0.0f, 1.0f );
|
||||
|
||||
const float fWidth = m_pNormalCombo->GetUnzoomedWidth();
|
||||
const float fCenterPercent = fStart + fSize/2;
|
||||
|
||||
@@ -328,7 +328,7 @@ void DancingCharacters::DrawPrimitives()
|
||||
continue;
|
||||
}
|
||||
|
||||
bool bFailed = STATSMAN->m_CurStageStats.m_player[p].bFailed;
|
||||
bool bFailed = STATSMAN->m_CurStageStats.m_player[p].m_bFailed;
|
||||
bool bDanger = m_bDrawDangerLight;
|
||||
|
||||
DISPLAY->SetLighting( true );
|
||||
|
||||
+14
-14
@@ -506,7 +506,7 @@ void GameState::BeginStage()
|
||||
m_pPlayerState[p]->m_PlayerOptions.Assign( ModsLevel_Stage, m_pPlayerState[p]->m_PlayerOptions.GetPreferred() );
|
||||
m_SongOptions.Assign( ModsLevel_Stage, m_SongOptions.GetPreferred() );
|
||||
}
|
||||
STATSMAN->m_CurStageStats.fMusicRate = m_SongOptions.GetSong().m_fMusicRate;
|
||||
STATSMAN->m_CurStageStats.m_fMusicRate = m_SongOptions.GetSong().m_fMusicRate;
|
||||
m_iNumStagesOfThisSong = GetNumStagesForCurrentSong();
|
||||
ASSERT( m_iNumStagesOfThisSong != -1 );
|
||||
}
|
||||
@@ -634,14 +634,14 @@ void GameState::ResetStageStatistics()
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(p);
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = pProfile->m_iCurrentCombo;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = pProfile->m_iCurrentCombo;
|
||||
}
|
||||
}
|
||||
else // GetStageIndex() > 0
|
||||
{
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = OldStats.m_player[p].iCurCombo;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = OldStats.m_player[p].m_iCurCombo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -787,7 +787,7 @@ int GameState::GetCourseSongIndex() const
|
||||
int iSongIndex = 0;
|
||||
/* iSongsPlayed includes the current song, so it's 1-based; subtract one. */
|
||||
FOREACH_EnabledPlayer( pn )
|
||||
iSongIndex = max( iSongIndex, STATSMAN->m_CurStageStats.m_player[pn].iSongsPlayed-1 );
|
||||
iSongIndex = max( iSongIndex, STATSMAN->m_CurStageStats.m_player[pn].m_iSongsPlayed-1 );
|
||||
return iSongIndex;
|
||||
}
|
||||
|
||||
@@ -1026,7 +1026,7 @@ bool GameState::HasEarnedExtraStage() const
|
||||
ASSERT(pSong);
|
||||
|
||||
const StageStats &stats = STATSMAN->m_CurStageStats;
|
||||
return stats.vpPlayedSongs.size() && stats.vpPlayedSongs.back() == pSong;
|
||||
return stats.m_vpPlayedSongs.size() && stats.m_vpPlayedSongs.back() == pSong;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1063,11 +1063,11 @@ StageResult GameState::GetStageResult( PlayerNumber pn ) const
|
||||
continue;
|
||||
|
||||
/* If anyone did just as well, at best it's a draw. */
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].iActualDancePoints == STATSMAN->m_CurStageStats.m_player[pn].iActualDancePoints )
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints == STATSMAN->m_CurStageStats.m_player[pn].m_iActualDancePoints )
|
||||
win = RESULT_DRAW;
|
||||
|
||||
/* If anyone did better, we lost. */
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].iActualDancePoints > STATSMAN->m_CurStageStats.m_player[pn].iActualDancePoints )
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints > STATSMAN->m_CurStageStats.m_player[pn].m_iActualDancePoints )
|
||||
return RESULT_LOSE;
|
||||
}
|
||||
return win;
|
||||
@@ -1124,11 +1124,11 @@ bool GameState::IsDisqualified( PlayerNumber pn )
|
||||
if( !IsHumanPlayer(pn) )
|
||||
return false;
|
||||
|
||||
if( STATSMAN->m_CurStageStats.bGaveUp )
|
||||
if( STATSMAN->m_CurStageStats.m_bGaveUp )
|
||||
return true;
|
||||
|
||||
#ifndef DEBUG
|
||||
if( STATSMAN->m_CurStageStats.bUsedAutoplay )
|
||||
if( STATSMAN->m_CurStageStats.m_bUsedAutoplay )
|
||||
return true;
|
||||
#endif //DEBUG
|
||||
|
||||
@@ -1270,9 +1270,9 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
||||
{
|
||||
CHECKPOINT_M( ssprintf("%u/%i", i, (int)STATSMAN->m_vPlayedStageStats.size() ) );
|
||||
SongAndSteps sas;
|
||||
sas.pSong = STATSMAN->m_vPlayedStageStats[i].vpPlayedSongs[0];
|
||||
sas.pSong = STATSMAN->m_vPlayedStageStats[i].m_vpPlayedSongs[0];
|
||||
ASSERT( sas.pSong );
|
||||
sas.pSteps = STATSMAN->m_vPlayedStageStats[i].m_player[pn].vpPlayedSteps[0];
|
||||
sas.pSteps = STATSMAN->m_vPlayedStageStats[i].m_player[pn].m_vpPlayedSteps[0];
|
||||
ASSERT( sas.pSteps );
|
||||
vSongAndSteps.push_back( sas );
|
||||
}
|
||||
@@ -1559,7 +1559,7 @@ bool GameState::AllAreInDangerOrWorse() const
|
||||
bool GameState::AllHumanHaveComboOf30OrMoreMisses() const
|
||||
{
|
||||
FOREACH_HumanPlayer( p )
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].iCurMissCombo < 30 )
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].m_iCurMissCombo < 30 )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -1751,11 +1751,11 @@ float GameState::GetGoalPercentComplete( PlayerNumber pn )
|
||||
switch( pProfile->m_GoalType )
|
||||
{
|
||||
case GoalType_Calories:
|
||||
fActual = pssAccum.fCaloriesBurned + pssCurrent.fCaloriesBurned;
|
||||
fActual = pssAccum.m_fCaloriesBurned + pssCurrent.m_fCaloriesBurned;
|
||||
fGoal = (float)pProfile->m_iGoalCalories;
|
||||
break;
|
||||
case GoalType_Time:
|
||||
fActual = ssAccum.fGameplaySeconds + ssCurrent.fGameplaySeconds;
|
||||
fActual = ssAccum.m_fGameplaySeconds + ssCurrent.m_fGameplaySeconds;
|
||||
fGoal = (float)pProfile->m_iGoalSeconds;
|
||||
break;
|
||||
case GoalType_None:
|
||||
|
||||
@@ -211,9 +211,9 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt
|
||||
// Show song boundaries
|
||||
//
|
||||
float fSec = 0;
|
||||
FOREACH_CONST( Song*, ss.vpPossibleSongs, song )
|
||||
FOREACH_CONST( Song*, ss.m_vpPossibleSongs, song )
|
||||
{
|
||||
if( song == ss.vpPossibleSongs.end()-1 )
|
||||
if( song == ss.m_vpPossibleSongs.end()-1 )
|
||||
continue;
|
||||
fSec += (*song)->GetStepsSeconds();
|
||||
|
||||
@@ -226,7 +226,7 @@ void GraphDisplay::LoadFromStageStats( const StageStats &ss, const PlayerStageSt
|
||||
|
||||
UpdateVerts();
|
||||
|
||||
if( !pss.bFailed )
|
||||
if( !pss.m_bFailed )
|
||||
{
|
||||
//
|
||||
// Search for the min life record to show "Just Barely!"
|
||||
|
||||
@@ -81,7 +81,7 @@ void HoldJudgment::HandleMessage( const Message &msg )
|
||||
{
|
||||
ASSERT( m_mpToTrack != MultiPlayer_Invalid );
|
||||
if( msg == enum_add2(Message_ShowHoldJudgmentMuliPlayerP1,m_mpToTrack) )
|
||||
SetHoldJudgment( STATSMAN->m_CurStageStats.m_multiPlayer[m_mpToTrack].hnsLast );
|
||||
SetHoldJudgment( STATSMAN->m_CurStageStats.m_multiPlayer[m_mpToTrack].m_hnsLast );
|
||||
|
||||
ActorFrame::HandleMessage( msg );
|
||||
}
|
||||
|
||||
@@ -93,10 +93,10 @@ void Inventory::Update( float fDelta )
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
|
||||
// check to see if they deserve a new item
|
||||
if( STATSMAN->m_CurStageStats.m_player[pn].iCurCombo != m_iLastSeenCombo )
|
||||
if( STATSMAN->m_CurStageStats.m_player[pn].m_iCurCombo != m_iLastSeenCombo )
|
||||
{
|
||||
int iOldCombo = m_iLastSeenCombo;
|
||||
m_iLastSeenCombo = STATSMAN->m_CurStageStats.m_player[pn].iCurCombo;
|
||||
m_iLastSeenCombo = STATSMAN->m_CurStageStats.m_player[pn].m_iCurCombo;
|
||||
int iNewCombo = m_iLastSeenCombo;
|
||||
|
||||
#define CROSSED(i) (iOldCombo<i)&&(iNewCombo>=i)
|
||||
|
||||
@@ -108,7 +108,7 @@ void Judgment::LoadFromMultiPlayer( MultiPlayer mp )
|
||||
void Judgment::HandleMessage( const Message &msg )
|
||||
{
|
||||
if( m_mpToTrack != MultiPlayer_Invalid && msg == enum_add2(Message_ShowJudgmentMuliPlayerP1,m_mpToTrack) )
|
||||
SetJudgment( STATSMAN->m_CurStageStats.m_multiPlayer[m_mpToTrack].tnsLast, false ); // FIXME: save and pass early bool?
|
||||
SetJudgment( STATSMAN->m_CurStageStats.m_multiPlayer[m_mpToTrack].m_tnsLast, false ); // FIXME: save and pass early bool?
|
||||
|
||||
ActorFrame::HandleMessage( msg );
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ void LifeMeterBar::ChangeLife( float fDeltaLife )
|
||||
}
|
||||
|
||||
/* If we've already failed, there's no point in letting them fill up the bar again. */
|
||||
if( m_pPlayerStageStats->bFailed )
|
||||
if( m_pPlayerStageStats->m_bFailed )
|
||||
return;
|
||||
|
||||
switch( GAMESTATE->m_SongOptions.GetSong().m_DrainType )
|
||||
|
||||
@@ -64,7 +64,7 @@ void LifeMeterBattery::Load( const PlayerState *pPlayerState, PlayerStageStats *
|
||||
|
||||
void LifeMeterBattery::OnSongEnded()
|
||||
{
|
||||
if( m_pPlayerStageStats->bFailed || m_iLivesLeft == 0 )
|
||||
if( m_pPlayerStageStats->m_bFailed || m_iLivesLeft == 0 )
|
||||
return;
|
||||
|
||||
if( m_iLivesLeft < GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives )
|
||||
|
||||
@@ -139,7 +139,7 @@ void LifeMeterTime::Update( float fDeltaTime )
|
||||
// update current stage stats so ScoreDisplayLifeTime can show the right thing
|
||||
float fSecs = GetLifeSeconds();
|
||||
fSecs = max( 0, fSecs );
|
||||
m_pPlayerStageStats->fLifeRemainingSeconds = fSecs;
|
||||
m_pPlayerStageStats->m_fLifeRemainingSeconds = fSecs;
|
||||
|
||||
LifeMeter::Update( fDeltaTime );
|
||||
|
||||
@@ -163,7 +163,7 @@ float LifeMeterTime::GetLife() const
|
||||
|
||||
float LifeMeterTime::GetLifeSeconds() const
|
||||
{
|
||||
float fSecs = m_fLifeTotalGainedSeconds - (m_fLifeTotalLostSeconds + STATSMAN->m_CurStageStats.fStepsSeconds);
|
||||
float fSecs = m_fLifeTotalGainedSeconds - (m_fLifeTotalLostSeconds + STATSMAN->m_CurStageStats.m_fStepsSeconds);
|
||||
return fSecs;
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ void NetworkSyncManager::ReportScore(int playerID, int step, int score, int comb
|
||||
|
||||
ctr = uint8_t( STATSMAN->m_CurStageStats.m_player[playerID].GetGrade()*16 );
|
||||
|
||||
if ( STATSMAN->m_CurStageStats.m_player[playerID].bFailed )
|
||||
if ( STATSMAN->m_CurStageStats.m_player[playerID].m_bFailed )
|
||||
ctr = uint8_t( 112 ); //Code for failed (failed constant seems not to work)
|
||||
|
||||
m_packet.Write1(ctr);
|
||||
|
||||
@@ -207,7 +207,7 @@ float GetActualVoltageRadarValue( const NoteData &in, float fSongSeconds, const
|
||||
* keeper. Instead, let's use the length of the longest recorded combo. This is
|
||||
* only subtly different: it's the percent of the song the longest combo took to get. */
|
||||
const PlayerStageStats::Combo_t MaxCombo = pss.GetMaxCombo();
|
||||
float fComboPercent = SCALE( MaxCombo.fSizeSeconds, 0, pss.fLastSecond-pss.fFirstSecond, 0.0f, 1.0f );
|
||||
float fComboPercent = SCALE( MaxCombo.m_fSizeSeconds, 0, pss.m_fLastSecond-pss.m_fFirstSecond, 0.0f, 1.0f );
|
||||
return clamp( fComboPercent, 0.0f, 1.0f );
|
||||
}
|
||||
|
||||
@@ -226,11 +226,11 @@ float GetActualAirRadarValue( const NoteData &in, float fSongSeconds )
|
||||
/* Return the ratio of actual to possible dance points. */
|
||||
float GetActualChaosRadarValue( const NoteData &in, float fSongSeconds, const PlayerStageStats &pss )
|
||||
{
|
||||
const int iPossibleDP = pss.iPossibleDancePoints;
|
||||
const int iPossibleDP = pss.m_iPossibleDancePoints;
|
||||
if ( iPossibleDP == 0 )
|
||||
return 1;
|
||||
|
||||
const int ActualDP = pss.iActualDancePoints;
|
||||
const int ActualDP = pss.m_iActualDancePoints;
|
||||
return clamp( float(ActualDP)/iPossibleDP, 0.0f, 1.0f );
|
||||
}
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ void PercentageDisplay::Update( float fDeltaTime )
|
||||
|
||||
void PercentageDisplay::Refresh()
|
||||
{
|
||||
const int iActualDancePoints = m_pPlayerStageStats->iActualDancePoints;
|
||||
const int iCurPossibleDancePoints = m_pPlayerStageStats->iCurPossibleDancePoints;
|
||||
const int iActualDancePoints = m_pPlayerStageStats->m_iActualDancePoints;
|
||||
const int iCurPossibleDancePoints = m_pPlayerStageStats->m_iCurPossibleDancePoints;
|
||||
|
||||
if( iActualDancePoints == m_Last && iCurPossibleDancePoints == m_LastMax )
|
||||
return;
|
||||
|
||||
+25
-25
@@ -334,7 +334,7 @@ void Player::Load()
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
|
||||
bool bOniDead = GAMESTATE->m_SongOptions.GetStage().m_LifeType == SongOptions::LIFE_BATTERY &&
|
||||
(m_pPlayerStageStats == NULL || m_pPlayerStageStats->bFailed);
|
||||
(m_pPlayerStageStats == NULL || m_pPlayerStageStats->m_bFailed);
|
||||
|
||||
/* The editor reuses Players ... so we really need to make sure everything
|
||||
* is reset and not tweening. Perhaps ActorFrame should recurse to subactors;
|
||||
@@ -345,7 +345,7 @@ void Player::Load()
|
||||
if( m_pPlayerStageStats )
|
||||
{
|
||||
if( m_pCombo )
|
||||
m_pCombo->SetCombo( m_pPlayerStageStats->iCurCombo, m_pPlayerStageStats->iCurMissCombo ); // combo can persist between songs and games
|
||||
m_pCombo->SetCombo( m_pPlayerStageStats->m_iCurCombo, m_pPlayerStageStats->m_iCurMissCombo ); // combo can persist between songs and games
|
||||
}
|
||||
if( m_pAttackDisplay )
|
||||
m_pAttackDisplay->Init( m_pPlayerState );
|
||||
@@ -576,7 +576,7 @@ void Player::Update( float fDeltaTime )
|
||||
|
||||
Step( iTrack, iSongRow, now, false, false );
|
||||
if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY )
|
||||
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
||||
STATSMAN->m_CurStageStats.m_bUsedAutoplay = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ void Player::Update( float fDeltaTime )
|
||||
// TODO: Make the CPU miss sometimes.
|
||||
bIsHoldingButton = true;
|
||||
if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY )
|
||||
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
||||
STATSMAN->m_CurStageStats.m_bUsedAutoplay = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -684,7 +684,7 @@ void Player::Update( float fDeltaTime )
|
||||
{
|
||||
fLife = 1;
|
||||
hns = HNS_Held;
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->m_iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidHoldNote( iTrack, HNS_Held, bBright ); // bright ghost flash
|
||||
}
|
||||
@@ -698,7 +698,7 @@ void Player::Update( float fDeltaTime )
|
||||
HandleHoldScore( tn );
|
||||
|
||||
if( m_pPlayerStageStats != NULL )
|
||||
m_pPlayerStageStats->hnsLast = hns;
|
||||
m_pPlayerStageStats->m_hnsLast = hns;
|
||||
if( m_pPlayerState->m_mp != MultiPlayer_Invalid )
|
||||
MESSAGEMAN->Broadcast( enum_add2(Message_ShowHoldJudgmentMuliPlayerP1,m_pPlayerState->m_mp) );
|
||||
|
||||
@@ -980,7 +980,7 @@ int Player::GetClosestNonEmptyRow( int iNoteRow, int iMaxRowsAhead, int iMaxRows
|
||||
bool Player::IsOniDead() const
|
||||
{
|
||||
// If we're playing on oni and we've died, do nothing.
|
||||
return GAMESTATE->m_SongOptions.GetCurrent().m_LifeType == SongOptions::LIFE_BATTERY && m_pPlayerStageStats && m_pPlayerStageStats->bFailed;
|
||||
return GAMESTATE->m_SongOptions.GetCurrent().m_LifeType == SongOptions::LIFE_BATTERY && m_pPlayerStageStats && m_pPlayerStageStats->m_bFailed;
|
||||
}
|
||||
|
||||
void Player::Fret( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease )
|
||||
@@ -1050,7 +1050,7 @@ void Player::StepOrStrum( int col, int row, const RageTimer &tm, bool bHeld, boo
|
||||
// Increase life
|
||||
tn.HoldResult.fLife = 1;
|
||||
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->m_iCurCombo>(int)BRIGHT_GHOST_COMBO_THRESHOLD;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidHoldNote( col, HNS_Held, bBright );
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ void Player::StepOrStrum( int col, int row, const RageTimer &tm, bool bHeld, boo
|
||||
break;
|
||||
}
|
||||
|
||||
m_pPlayerStageStats->fCaloriesBurned += fCals;
|
||||
m_pPlayerStageStats->m_fCaloriesBurned += fCals;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1365,7 +1365,7 @@ void Player::StepOrStrum( int col, int row, const RageTimer &tm, bool bHeld, boo
|
||||
{
|
||||
const bool bBlind = (m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind != 0);
|
||||
// XXX This is the wrong combo for shared players. STATSMAN->m_CurStageStats.m_Player[pn] might work but could be wrong.
|
||||
const bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo > int(BRIGHT_GHOST_COMBO_THRESHOLD) || bBlind;
|
||||
const bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->m_iCurCombo > int(BRIGHT_GHOST_COMBO_THRESHOLD) || bBlind;
|
||||
if( m_pNoteField )
|
||||
m_pNoteField->DidTapNote( col, score, bBright );
|
||||
if( score >= TNS_W3 || bBlind )
|
||||
@@ -1603,7 +1603,7 @@ void Player::FlashGhostRow( int iRow, PlayerNumber pn )
|
||||
TapNoteScore lastTNS = NoteDataWithScoring::LastTapNoteWithResult( m_NoteData, iRow, pn ).result.tns;
|
||||
const bool bBlind = (m_pPlayerState->m_PlayerOptions.GetCurrent().m_fBlind != 0);
|
||||
// XXX This is the wrong combo for shared players. STATSMAN->m_CurStageStats.m_Player[pn] might work but could be wrong.
|
||||
const bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->iCurCombo > int(BRIGHT_GHOST_COMBO_THRESHOLD) || bBlind;
|
||||
const bool bBright = m_pPlayerStageStats && m_pPlayerStageStats->m_iCurCombo > int(BRIGHT_GHOST_COMBO_THRESHOLD) || bBlind;
|
||||
|
||||
for( int iTrack = 0; iTrack < m_NoteData.GetNumTracks(); ++iTrack )
|
||||
{
|
||||
@@ -1636,7 +1636,7 @@ void Player::CrossedRow( int iNoteRow, const RageTimer &now )
|
||||
{
|
||||
Step( t, iNoteRow, now, false, false );
|
||||
if( m_pPlayerState->m_PlayerController == PC_AUTOPLAY )
|
||||
STATSMAN->m_CurStageStats.bUsedAutoplay = true;
|
||||
STATSMAN->m_CurStageStats.m_bUsedAutoplay = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1715,7 +1715,7 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
TapNoteScore scoreOfLastTap = NoteDataWithScoring::LastTapNoteWithResult(m_NoteData, row, pn).result.tns;
|
||||
const int iOldCombo = m_pPlayerStageStats ? m_pPlayerStageStats->iCurCombo : 0;
|
||||
const int iOldCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurCombo : 0;
|
||||
|
||||
if( scoreOfLastTap == TNS_Miss )
|
||||
m_LastTapNoteScore = TNS_Miss;
|
||||
@@ -1746,8 +1746,8 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
if( m_pSecondaryScoreKeeper != NULL )
|
||||
m_pSecondaryScoreKeeper->HandleTapRowScore( m_NoteData, row, bComboStopped, bMissComboStopped );
|
||||
|
||||
const int iCurCombo = m_pPlayerStageStats ? m_pPlayerStageStats->iCurCombo : 0;
|
||||
const int iCurMissCombo = m_pPlayerStageStats ? m_pPlayerStageStats->iCurMissCombo : 0;
|
||||
const int iCurCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurCombo : 0;
|
||||
const int iCurMissCombo = m_pPlayerStageStats ? m_pPlayerStageStats->m_iCurMissCombo : 0;
|
||||
|
||||
if( m_pPlayerStageStats && m_pCombo )
|
||||
{
|
||||
@@ -1781,7 +1781,7 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
|
||||
// new max combo
|
||||
if( m_pPlayerStageStats )
|
||||
m_pPlayerStageStats->iMaxCombo = max(m_pPlayerStageStats->iMaxCombo, iCurCombo);
|
||||
m_pPlayerStageStats->m_iMaxCombo = max(m_pPlayerStageStats->m_iMaxCombo, iCurCombo);
|
||||
|
||||
/*
|
||||
* Use the real current beat, not the beat we've been passed. That's because we
|
||||
@@ -1792,7 +1792,7 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
* GAMESTATE->m_fMusicSeconds. Use fStepsSeconds instead.
|
||||
*/
|
||||
if( m_pPlayerStageStats )
|
||||
m_pPlayerStageStats->UpdateComboList( STATSMAN->m_CurStageStats.fStepsSeconds, false );
|
||||
m_pPlayerStageStats->UpdateComboList( STATSMAN->m_CurStageStats.m_fStepsSeconds, false );
|
||||
|
||||
float life = -1;
|
||||
if( m_pLifeMeter )
|
||||
@@ -1807,18 +1807,18 @@ void Player::HandleTapRowScore( unsigned row )
|
||||
}
|
||||
if( life != -1 )
|
||||
if( m_pPlayerStageStats )
|
||||
m_pPlayerStageStats->SetLifeRecordAt( life, STATSMAN->m_CurStageStats.fStepsSeconds );
|
||||
m_pPlayerStageStats->SetLifeRecordAt( life, STATSMAN->m_CurStageStats.m_fStepsSeconds );
|
||||
|
||||
if( m_pScoreDisplay )
|
||||
{
|
||||
if( m_pPlayerStageStats )
|
||||
m_pScoreDisplay->SetScore( m_pPlayerStageStats->iScore );
|
||||
m_pScoreDisplay->SetScore( m_pPlayerStageStats->m_iScore );
|
||||
m_pScoreDisplay->OnJudgment( scoreOfLastTap );
|
||||
}
|
||||
if( m_pSecondaryScoreDisplay )
|
||||
{
|
||||
if( m_pPlayerStageStats )
|
||||
m_pSecondaryScoreDisplay->SetScore( m_pPlayerStageStats->iScore );
|
||||
m_pSecondaryScoreDisplay->SetScore( m_pPlayerStageStats->m_iScore );
|
||||
m_pSecondaryScoreDisplay->OnJudgment( scoreOfLastTap );
|
||||
}
|
||||
|
||||
@@ -1855,13 +1855,13 @@ void Player::HandleHoldScore( const TapNote &tn )
|
||||
if( m_pScoreDisplay )
|
||||
{
|
||||
if( m_pPlayerStageStats )
|
||||
m_pScoreDisplay->SetScore( m_pPlayerStageStats->iScore );
|
||||
m_pScoreDisplay->SetScore( m_pPlayerStageStats->m_iScore );
|
||||
m_pScoreDisplay->OnJudgment( holdScore, tapScore );
|
||||
}
|
||||
if( m_pSecondaryScoreDisplay )
|
||||
{
|
||||
if( m_pPlayerStageStats )
|
||||
m_pSecondaryScoreDisplay->SetScore( m_pPlayerStageStats->iScore );
|
||||
m_pSecondaryScoreDisplay->SetScore( m_pPlayerStageStats->m_iScore );
|
||||
m_pSecondaryScoreDisplay->OnJudgment( holdScore, tapScore );
|
||||
}
|
||||
|
||||
@@ -1894,9 +1894,9 @@ void Player::CacheAllUsedNoteSkins()
|
||||
|
||||
bool Player::IsPlayingBeginner() const
|
||||
{
|
||||
if( m_pPlayerStageStats != NULL && !m_pPlayerStageStats->vpPossibleSteps.empty() )
|
||||
if( m_pPlayerStageStats != NULL && !m_pPlayerStageStats->m_vpPossibleSteps.empty() )
|
||||
{
|
||||
Steps *pSteps = m_pPlayerStageStats->vpPossibleSteps[0];
|
||||
Steps *pSteps = m_pPlayerStageStats->m_vpPossibleSteps[0];
|
||||
return pSteps->GetDifficulty() == DIFFICULTY_BEGINNER;
|
||||
}
|
||||
|
||||
@@ -1912,7 +1912,7 @@ bool Player::IsPlayingBeginner() const
|
||||
void Player::SetJudgment( TapNoteScore tns, bool bEarly )
|
||||
{
|
||||
if( m_pPlayerStageStats )
|
||||
m_pPlayerStageStats->tnsLast = tns;
|
||||
m_pPlayerStageStats->m_tnsLast = tns;
|
||||
if( m_pPlayerState->m_mp != MultiPlayer_Invalid )
|
||||
MESSAGEMAN->Broadcast( enum_add2(Message_ShowJudgmentMuliPlayerP1,m_pPlayerState->m_mp) );
|
||||
|
||||
|
||||
+161
-152
@@ -20,26 +20,35 @@ Grade GetGradeFromPercent( float fPercent, bool bMerciful );
|
||||
|
||||
void PlayerStageStats::Init()
|
||||
{
|
||||
vpPlayedSteps.clear();
|
||||
vpPossibleSteps.clear();
|
||||
fAliveSeconds = 0;
|
||||
bFailed = false;
|
||||
iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0;
|
||||
iPossibleGradePoints = 0;
|
||||
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
|
||||
iSongsPassed = iSongsPlayed = 0;
|
||||
fLifeRemainingSeconds = 0;
|
||||
fCaloriesBurned = 0;
|
||||
tnsLast = TapNoteScore_Invalid;
|
||||
hnsLast = HoldNoteScore_Invalid;
|
||||
m_vpPlayedSteps.clear();
|
||||
m_vpPossibleSteps.clear();
|
||||
m_fAliveSeconds = 0;
|
||||
m_bFailed = false;
|
||||
m_iPossibleDancePoints = 0;
|
||||
m_iCurPossibleDancePoints = 0;
|
||||
m_iActualDancePoints = 0;
|
||||
m_iPossibleGradePoints = 0;
|
||||
m_iCurCombo = 0;
|
||||
m_iMaxCombo = 0;
|
||||
m_iCurMissCombo = 0;
|
||||
m_iScore = 0;
|
||||
m_iBonus = 0;
|
||||
m_iMaxScore = 0;
|
||||
m_iCurMaxScore = 0;
|
||||
m_iSongsPassed = 0;
|
||||
m_iSongsPlayed = 0;
|
||||
m_fLifeRemainingSeconds = 0;
|
||||
m_fCaloriesBurned = 0;
|
||||
m_tnsLast = TapNoteScore_Invalid;
|
||||
m_hnsLast = HoldNoteScore_Invalid;
|
||||
|
||||
ZERO( iTapNoteScores );
|
||||
ZERO( iHoldNoteScores );
|
||||
radarPossible.Zero();
|
||||
radarActual.Zero();
|
||||
ZERO( m_iTapNoteScores );
|
||||
ZERO( m_iHoldNoteScores );
|
||||
m_radarPossible.Zero();
|
||||
m_radarActual.Zero();
|
||||
|
||||
fFirstSecond = FLT_MAX;
|
||||
fLastSecond = 0;
|
||||
m_fFirstSecond = FLT_MAX;
|
||||
m_fLastSecond = 0;
|
||||
|
||||
m_pdaToShow = PerDifficultyAward_Invalid;
|
||||
m_pcaToShow = PeakComboAward_Invalid;
|
||||
@@ -51,70 +60,70 @@ void PlayerStageStats::Init()
|
||||
|
||||
void PlayerStageStats::AddStats( const PlayerStageStats& other )
|
||||
{
|
||||
FOREACH_CONST( Steps*, other.vpPlayedSteps, s )
|
||||
vpPlayedSteps.push_back( *s );
|
||||
FOREACH_CONST( Steps*, other.vpPossibleSteps, s )
|
||||
vpPossibleSteps.push_back( *s );
|
||||
fAliveSeconds += other.fAliveSeconds;
|
||||
bFailed |= other.bFailed;
|
||||
iPossibleDancePoints += other.iPossibleDancePoints;
|
||||
iActualDancePoints += other.iActualDancePoints;
|
||||
iCurPossibleDancePoints += other.iCurPossibleDancePoints;
|
||||
iPossibleGradePoints += other.iPossibleGradePoints;
|
||||
FOREACH_CONST( Steps*, other.m_vpPlayedSteps, s )
|
||||
m_vpPlayedSteps.push_back( *s );
|
||||
FOREACH_CONST( Steps*, other.m_vpPossibleSteps, s )
|
||||
m_vpPossibleSteps.push_back( *s );
|
||||
m_fAliveSeconds += other.m_fAliveSeconds;
|
||||
m_bFailed |= other.m_bFailed;
|
||||
m_iPossibleDancePoints += other.m_iPossibleDancePoints;
|
||||
m_iActualDancePoints += other.m_iActualDancePoints;
|
||||
m_iCurPossibleDancePoints += other.m_iCurPossibleDancePoints;
|
||||
m_iPossibleGradePoints += other.m_iPossibleGradePoints;
|
||||
|
||||
for( int t=0; t<NUM_TapNoteScore; t++ )
|
||||
iTapNoteScores[t] += other.iTapNoteScores[t];
|
||||
m_iTapNoteScores[t] += other.m_iTapNoteScores[t];
|
||||
for( int h=0; h<NUM_HoldNoteScore; h++ )
|
||||
iHoldNoteScores[h] += other.iHoldNoteScores[h];
|
||||
iCurCombo += other.iCurCombo;
|
||||
iMaxCombo += other.iMaxCombo;
|
||||
iCurMissCombo += other.iCurMissCombo;
|
||||
iScore += other.iScore;
|
||||
iMaxScore += other.iMaxScore;
|
||||
iCurMaxScore += other.iCurMaxScore;
|
||||
radarPossible += other.radarPossible;
|
||||
radarActual += other.radarActual;
|
||||
iSongsPassed += other.iSongsPassed;
|
||||
iSongsPlayed += other.iSongsPlayed;
|
||||
fCaloriesBurned += other.fCaloriesBurned;
|
||||
fLifeRemainingSeconds = other.fLifeRemainingSeconds; // don't accumulate
|
||||
m_iHoldNoteScores[h] += other.m_iHoldNoteScores[h];
|
||||
m_iCurCombo += other.m_iCurCombo;
|
||||
m_iMaxCombo += other.m_iMaxCombo;
|
||||
m_iCurMissCombo += other.m_iCurMissCombo;
|
||||
m_iScore += other.m_iScore;
|
||||
m_iMaxScore += other.m_iMaxScore;
|
||||
m_iCurMaxScore += other.m_iCurMaxScore;
|
||||
m_radarPossible += other.m_radarPossible;
|
||||
m_radarActual += other.m_radarActual;
|
||||
m_iSongsPassed += other.m_iSongsPassed;
|
||||
m_iSongsPlayed += other.m_iSongsPlayed;
|
||||
m_fCaloriesBurned += other.m_fCaloriesBurned;
|
||||
m_fLifeRemainingSeconds = other.m_fLifeRemainingSeconds; // don't accumulate
|
||||
|
||||
const float fOtherFirstSecond = other.fFirstSecond + fLastSecond;
|
||||
const float fOtherLastSecond = other.fLastSecond + fLastSecond;
|
||||
fLastSecond = fOtherLastSecond;
|
||||
const float fOtherFirstSecond = other.m_fFirstSecond + m_fLastSecond;
|
||||
const float fOtherLastSecond = other.m_fLastSecond + m_fLastSecond;
|
||||
m_fLastSecond = fOtherLastSecond;
|
||||
|
||||
map<float,float>::const_iterator it;
|
||||
for( it = other.fLifeRecord.begin(); it != other.fLifeRecord.end(); ++it )
|
||||
for( it = other.m_fLifeRecord.begin(); it != other.m_fLifeRecord.end(); ++it )
|
||||
{
|
||||
const float pos = it->first;
|
||||
const float life = it->second;
|
||||
fLifeRecord[fOtherFirstSecond+pos] = life;
|
||||
m_fLifeRecord[fOtherFirstSecond+pos] = life;
|
||||
}
|
||||
|
||||
for( unsigned i=0; i<other.ComboList.size(); ++i )
|
||||
for( unsigned i=0; i<other.m_ComboList.size(); ++i )
|
||||
{
|
||||
const Combo_t &combo = other.ComboList[i];
|
||||
const Combo_t &combo = other.m_ComboList[i];
|
||||
|
||||
Combo_t newcombo(combo);
|
||||
newcombo.fStartSecond += fOtherFirstSecond;
|
||||
ComboList.push_back( newcombo );
|
||||
newcombo.m_fStartSecond += fOtherFirstSecond;
|
||||
m_ComboList.push_back( newcombo );
|
||||
}
|
||||
|
||||
/* Merge identical combos. This normally only happens in course mode, when a combo
|
||||
* continues between songs. */
|
||||
for( unsigned i=1; i<ComboList.size(); ++i )
|
||||
for( unsigned i=1; i<m_ComboList.size(); ++i )
|
||||
{
|
||||
Combo_t &prevcombo = ComboList[i-1];
|
||||
Combo_t &combo = ComboList[i];
|
||||
const float PrevComboEnd = prevcombo.fStartSecond + prevcombo.fSizeSeconds;
|
||||
const float ThisComboStart = combo.fStartSecond;
|
||||
Combo_t &prevcombo = m_ComboList[i-1];
|
||||
Combo_t &combo = m_ComboList[i];
|
||||
const float PrevComboEnd = prevcombo.m_fStartSecond + prevcombo.m_fSizeSeconds;
|
||||
const float ThisComboStart = combo.m_fStartSecond;
|
||||
if( fabsf(PrevComboEnd - ThisComboStart) > 0.001 )
|
||||
continue;
|
||||
|
||||
/* These are really the same combo. */
|
||||
prevcombo.fSizeSeconds += combo.fSizeSeconds;
|
||||
prevcombo.cnt += combo.cnt;
|
||||
ComboList.erase( ComboList.begin()+i );
|
||||
prevcombo.m_fSizeSeconds += combo.m_fSizeSeconds;
|
||||
prevcombo.m_cnt += combo.m_cnt;
|
||||
m_ComboList.erase( m_ComboList.begin()+i );
|
||||
--i;
|
||||
}
|
||||
}
|
||||
@@ -139,7 +148,7 @@ Grade GetGradeFromPercent( float fPercent, bool bMerciful )
|
||||
|
||||
Grade PlayerStageStats::GetGrade() const
|
||||
{
|
||||
if( bFailed )
|
||||
if( m_bFailed )
|
||||
return Grade_Failed;
|
||||
|
||||
/* XXX: This entire calculation should be in ScoreKeeper, but final evaluation
|
||||
@@ -147,34 +156,34 @@ Grade PlayerStageStats::GetGrade() const
|
||||
float fActual = 0;
|
||||
|
||||
bool bIsBeginner = false;
|
||||
if( vpPlayedSteps.size() && !GAMESTATE->IsCourseMode() )
|
||||
bIsBeginner = vpPlayedSteps[0]->GetDifficulty() == DIFFICULTY_BEGINNER;
|
||||
if( m_vpPlayedSteps.size() && !GAMESTATE->IsCourseMode() )
|
||||
bIsBeginner = m_vpPlayedSteps[0]->GetDifficulty() == DIFFICULTY_BEGINNER;
|
||||
|
||||
FOREACH_TapNoteScore( tns )
|
||||
{
|
||||
int iTapScoreValue = ScoreKeeperNormal::TapNoteScoreToGradePoints( tns, bIsBeginner );
|
||||
fActual += iTapNoteScores[tns] * iTapScoreValue;
|
||||
LOG->Trace( "GetGrade actual: %i * %i", iTapNoteScores[tns], iTapScoreValue );
|
||||
fActual += m_iTapNoteScores[tns] * iTapScoreValue;
|
||||
LOG->Trace( "GetGrade actual: %i * %i", m_iTapNoteScores[tns], iTapScoreValue );
|
||||
}
|
||||
|
||||
FOREACH_HoldNoteScore( hns )
|
||||
{
|
||||
int iHoldScoreValue = ScoreKeeperNormal::HoldNoteScoreToGradePoints( hns, bIsBeginner );
|
||||
fActual += iHoldNoteScores[hns] * iHoldScoreValue;
|
||||
LOG->Trace( "GetGrade actual: %i * %i", iHoldNoteScores[hns], iHoldScoreValue );
|
||||
fActual += m_iHoldNoteScores[hns] * iHoldScoreValue;
|
||||
LOG->Trace( "GetGrade actual: %i * %i", m_iHoldNoteScores[hns], iHoldScoreValue );
|
||||
}
|
||||
|
||||
LOG->Trace( "GetGrade: fActual: %f, fPossible: %d", fActual, iPossibleGradePoints );
|
||||
LOG->Trace( "GetGrade: fActual: %f, fPossible: %d", fActual, m_iPossibleGradePoints );
|
||||
|
||||
|
||||
float fPercent = (iPossibleGradePoints == 0) ? 0 : fActual / iPossibleGradePoints;
|
||||
float fPercent = (m_iPossibleGradePoints == 0) ? 0 : fActual / m_iPossibleGradePoints;
|
||||
|
||||
|
||||
bool bMerciful =
|
||||
vpPlayedSteps.size() > 0 &&
|
||||
m_vpPlayedSteps.size() > 0 &&
|
||||
GAMESTATE->m_PlayMode == PLAY_MODE_REGULAR &&
|
||||
PREFSMAN->m_bMercifulBeginner;
|
||||
FOREACH_CONST( Steps*, vpPlayedSteps, s )
|
||||
FOREACH_CONST( Steps*, m_vpPlayedSteps, s )
|
||||
{
|
||||
if( (*s)->GetDifficulty() != DIFFICULTY_BEGINNER )
|
||||
bMerciful = false;
|
||||
@@ -185,23 +194,23 @@ Grade PlayerStageStats::GetGrade() const
|
||||
LOG->Trace( "GetGrade: Grade: %s, %i", GradeToString(grade).c_str(), GRADE_TIER02_IS_ALL_W2S );
|
||||
if( GRADE_TIER02_IS_ALL_W2S )
|
||||
{
|
||||
if( iTapNoteScores[TNS_W1] > 0 &&
|
||||
iTapNoteScores[TNS_W2] == 0 &&
|
||||
iTapNoteScores[TNS_W3] == 0 &&
|
||||
iTapNoteScores[TNS_W4] == 0 &&
|
||||
iTapNoteScores[TNS_W5] == 0 &&
|
||||
iTapNoteScores[TNS_Miss] == 0 &&
|
||||
iTapNoteScores[TNS_HitMine] == 0 &&
|
||||
iHoldNoteScores[HNS_LetGo] == 0 )
|
||||
if( m_iTapNoteScores[TNS_W1] > 0 &&
|
||||
m_iTapNoteScores[TNS_W2] == 0 &&
|
||||
m_iTapNoteScores[TNS_W3] == 0 &&
|
||||
m_iTapNoteScores[TNS_W4] == 0 &&
|
||||
m_iTapNoteScores[TNS_W5] == 0 &&
|
||||
m_iTapNoteScores[TNS_Miss] == 0 &&
|
||||
m_iTapNoteScores[TNS_HitMine] == 0 &&
|
||||
m_iHoldNoteScores[HNS_LetGo] == 0 )
|
||||
return Grade_Tier01;
|
||||
|
||||
if( iTapNoteScores[TNS_W2] > 0 &&
|
||||
iTapNoteScores[TNS_W3] == 0 &&
|
||||
iTapNoteScores[TNS_W4] == 0 &&
|
||||
iTapNoteScores[TNS_W5] == 0 &&
|
||||
iTapNoteScores[TNS_Miss] == 0 &&
|
||||
iTapNoteScores[TNS_HitMine] == 0 &&
|
||||
iHoldNoteScores[HNS_LetGo] == 0 )
|
||||
if( m_iTapNoteScores[TNS_W2] > 0 &&
|
||||
m_iTapNoteScores[TNS_W3] == 0 &&
|
||||
m_iTapNoteScores[TNS_W4] == 0 &&
|
||||
m_iTapNoteScores[TNS_W5] == 0 &&
|
||||
m_iTapNoteScores[TNS_Miss] == 0 &&
|
||||
m_iTapNoteScores[TNS_HitMine] == 0 &&
|
||||
m_iHoldNoteScores[HNS_LetGo] == 0 )
|
||||
return Grade_Tier02;
|
||||
|
||||
return max( grade, Grade_Tier03 );
|
||||
@@ -212,29 +221,29 @@ Grade PlayerStageStats::GetGrade() const
|
||||
|
||||
float PlayerStageStats::GetPercentDancePoints() const
|
||||
{
|
||||
if( iPossibleDancePoints == 0 )
|
||||
if( m_iPossibleDancePoints == 0 )
|
||||
return 0; // div/0
|
||||
|
||||
if( iActualDancePoints == iPossibleDancePoints )
|
||||
if( m_iActualDancePoints == m_iPossibleDancePoints )
|
||||
return 1; // correct for rounding error
|
||||
|
||||
/* This can happen in battle, with transform attacks. */
|
||||
//ASSERT_M( iActualDancePoints <= iPossibleDancePoints, ssprintf("%i/%i", iActualDancePoints, iPossibleDancePoints) );
|
||||
|
||||
float fPercentDancePoints = iActualDancePoints / (float)iPossibleDancePoints;
|
||||
float fPercentDancePoints = m_iActualDancePoints / (float)m_iPossibleDancePoints;
|
||||
|
||||
return fPercentDancePoints;
|
||||
}
|
||||
|
||||
float PlayerStageStats::GetCurMaxPercentDancePoints() const
|
||||
{
|
||||
if ( iPossibleDancePoints == 0 )
|
||||
if ( m_iPossibleDancePoints == 0 )
|
||||
return 0; // div/0
|
||||
|
||||
if ( iCurPossibleDancePoints == iPossibleDancePoints )
|
||||
if ( m_iCurPossibleDancePoints == m_iPossibleDancePoints )
|
||||
return 1; // correct for rounding error
|
||||
|
||||
float fCurMaxPercentDancePoints = iCurPossibleDancePoints / (float)iPossibleDancePoints;
|
||||
float fCurMaxPercentDancePoints = m_iCurPossibleDancePoints / (float)m_iPossibleDancePoints;
|
||||
|
||||
return fCurMaxPercentDancePoints;
|
||||
}
|
||||
@@ -253,7 +262,7 @@ int PlayerStageStats::GetLessonScoreActual() const
|
||||
case TNS_W3:
|
||||
case TNS_W2:
|
||||
case TNS_W1:
|
||||
iScore += iTapNoteScores[tns];
|
||||
iScore += m_iTapNoteScores[tns];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -263,7 +272,7 @@ int PlayerStageStats::GetLessonScoreActual() const
|
||||
switch( hns )
|
||||
{
|
||||
case HNS_Held:
|
||||
iScore += iHoldNoteScores[hns];
|
||||
iScore += m_iHoldNoteScores[hns];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -275,7 +284,7 @@ int PlayerStageStats::GetLessonScoreNeeded() const
|
||||
{
|
||||
float fScore = 0;
|
||||
|
||||
FOREACH_CONST( Steps*, vpPossibleSteps, steps )
|
||||
FOREACH_CONST( Steps*, m_vpPossibleSteps, steps )
|
||||
fScore += (*steps)->GetRadarValues( PLAYER_1 ).m_Values.v.fNumTapsAndHolds;
|
||||
|
||||
return lrintf( fScore * LESSON_PASS_THRESHOLD );
|
||||
@@ -283,18 +292,18 @@ int PlayerStageStats::GetLessonScoreNeeded() const
|
||||
|
||||
void PlayerStageStats::ResetScoreForLesson()
|
||||
{
|
||||
iCurPossibleDancePoints = 0;
|
||||
iActualDancePoints = 0;
|
||||
m_iCurPossibleDancePoints = 0;
|
||||
m_iActualDancePoints = 0;
|
||||
FOREACH_TapNoteScore( tns )
|
||||
iTapNoteScores[tns] = 0;
|
||||
m_iTapNoteScores[tns] = 0;
|
||||
FOREACH_HoldNoteScore( hns )
|
||||
iHoldNoteScores[hns] = 0;
|
||||
iCurCombo = 0;
|
||||
iMaxCombo = 0;
|
||||
iCurMissCombo = 0;
|
||||
iScore = 0;
|
||||
iCurMaxScore = 0;
|
||||
iMaxScore = 0;
|
||||
m_iHoldNoteScores[hns] = 0;
|
||||
m_iCurCombo = 0;
|
||||
m_iMaxCombo = 0;
|
||||
m_iCurMissCombo = 0;
|
||||
m_iScore = 0;
|
||||
m_iCurMaxScore = 0;
|
||||
m_iMaxScore = 0;
|
||||
}
|
||||
|
||||
void PlayerStageStats::SetLifeRecordAt( float fLife, float fStepsSecond )
|
||||
@@ -306,12 +315,12 @@ void PlayerStageStats::SetLifeRecordAt( float fLife, float fStepsSecond )
|
||||
if( fStepsSecond < 0 )
|
||||
return;
|
||||
|
||||
fFirstSecond = min( fStepsSecond, fFirstSecond );
|
||||
fLastSecond = max( fStepsSecond, fLastSecond );
|
||||
//LOG->Trace( "fLastSecond = %f", fLastSecond );
|
||||
m_fFirstSecond = min( fStepsSecond, m_fFirstSecond );
|
||||
m_fLastSecond = max( fStepsSecond, m_fLastSecond );
|
||||
//LOG->Trace( "fLastSecond = %f", m_fLastSecond );
|
||||
|
||||
// fSecond will always be greater than any value already in the map.
|
||||
fLifeRecord[fStepsSecond] = fLife;
|
||||
m_fLifeRecord[fStepsSecond] = fLife;
|
||||
|
||||
//
|
||||
// Memory optimization:
|
||||
@@ -320,33 +329,33 @@ void PlayerStageStats::SetLifeRecordAt( float fLife, float fStepsSecond )
|
||||
// records in the map since we're only inserting at the end, and we know all
|
||||
// earlier redundant records have already been removed.
|
||||
//
|
||||
map<float,float>::iterator C = fLifeRecord.end();
|
||||
map<float,float>::iterator C = m_fLifeRecord.end();
|
||||
--C;
|
||||
if( C == fLifeRecord.begin() ) // no earlier records left
|
||||
if( C == m_fLifeRecord.begin() ) // no earlier records left
|
||||
return;
|
||||
|
||||
map<float,float>::iterator B = C;
|
||||
--B;
|
||||
if( B == fLifeRecord.begin() ) // no earlier records left
|
||||
if( B == m_fLifeRecord.begin() ) // no earlier records left
|
||||
return;
|
||||
|
||||
map<float,float>::iterator A = B;
|
||||
--A;
|
||||
|
||||
if( A->second == B->second && B->second == C->second )
|
||||
fLifeRecord.erase(B);
|
||||
m_fLifeRecord.erase(B);
|
||||
}
|
||||
|
||||
float PlayerStageStats::GetLifeRecordAt( float fStepsSecond ) const
|
||||
{
|
||||
if( fLifeRecord.empty() )
|
||||
if( m_fLifeRecord.empty() )
|
||||
return 0;
|
||||
|
||||
/* Find the first element whose key is greater than k. */
|
||||
map<float,float>::const_iterator it = fLifeRecord.upper_bound( fStepsSecond );
|
||||
map<float,float>::const_iterator it = m_fLifeRecord.upper_bound( fStepsSecond );
|
||||
|
||||
/* Find the last element whose key is less than or equal to k. */
|
||||
if( it != fLifeRecord.begin() )
|
||||
if( it != m_fLifeRecord.begin() )
|
||||
--it;
|
||||
|
||||
return it->second;
|
||||
@@ -355,18 +364,18 @@ float PlayerStageStats::GetLifeRecordAt( float fStepsSecond ) const
|
||||
|
||||
float PlayerStageStats::GetLifeRecordLerpAt( float fStepsSecond ) const
|
||||
{
|
||||
if( fLifeRecord.empty() )
|
||||
if( m_fLifeRecord.empty() )
|
||||
return 0;
|
||||
|
||||
/* Find the first element whose key is greater than k. */
|
||||
map<float,float>::const_iterator later = fLifeRecord.upper_bound( fStepsSecond );
|
||||
map<float,float>::const_iterator later = m_fLifeRecord.upper_bound( fStepsSecond );
|
||||
|
||||
/* Find the last element whose key is less than or equal to k. */
|
||||
map<float,float>::const_iterator earlier = later;
|
||||
if( earlier != fLifeRecord.begin() )
|
||||
if( earlier != m_fLifeRecord.begin() )
|
||||
--earlier;
|
||||
|
||||
if( later == fLifeRecord.end() )
|
||||
if( later == m_fLifeRecord.end() )
|
||||
return earlier->second;
|
||||
|
||||
if( earlier->first == later->first ) // two samples from the same time. Don't divide by zero in SCALE
|
||||
@@ -399,21 +408,21 @@ void PlayerStageStats::UpdateComboList( float fSecond, bool bRollover )
|
||||
|
||||
if( !bRollover )
|
||||
{
|
||||
fFirstSecond = min( fSecond, fFirstSecond );
|
||||
fLastSecond = max( fSecond, fLastSecond );
|
||||
m_fFirstSecond = min( fSecond, m_fFirstSecond );
|
||||
m_fLastSecond = max( fSecond, m_fLastSecond );
|
||||
//LOG->Trace( "fLastSecond = %f", fLastSecond );
|
||||
}
|
||||
|
||||
int cnt = iCurCombo;
|
||||
int cnt = m_iCurCombo;
|
||||
if( !cnt )
|
||||
return; /* no combo */
|
||||
|
||||
if( ComboList.size() == 0 || ComboList.back().cnt >= cnt )
|
||||
if( m_ComboList.size() == 0 || m_ComboList.back().m_cnt >= cnt )
|
||||
{
|
||||
/* If the previous combo (if any) starts on -9999, then we rolled over some
|
||||
* combo, but missed the first step. Remove it. */
|
||||
if( ComboList.size() && ComboList.back().fStartSecond == -9999 )
|
||||
ComboList.erase( ComboList.begin()+ComboList.size()-1, ComboList.end() );
|
||||
if( m_ComboList.size() && m_ComboList.back().m_fStartSecond == -9999 )
|
||||
m_ComboList.erase( m_ComboList.begin()+m_ComboList.size()-1, m_ComboList.end() );
|
||||
|
||||
/* This is a new combo. */
|
||||
Combo_t NewCombo;
|
||||
@@ -422,46 +431,46 @@ void PlayerStageStats::UpdateComboList( float fSecond, bool bRollover )
|
||||
* a placeholder in and set it on the next call. (Otherwise, start will be less
|
||||
* than fFirstPos.) */
|
||||
if( bRollover )
|
||||
NewCombo.fStartSecond = -9999;
|
||||
NewCombo.m_fStartSecond = -9999;
|
||||
else
|
||||
NewCombo.fStartSecond = fSecond;
|
||||
ComboList.push_back( NewCombo );
|
||||
NewCombo.m_fStartSecond = fSecond;
|
||||
m_ComboList.push_back( NewCombo );
|
||||
}
|
||||
|
||||
Combo_t &combo = ComboList.back();
|
||||
if( !bRollover && combo.fStartSecond == -9999 )
|
||||
combo.fStartSecond = 0;
|
||||
Combo_t &combo = m_ComboList.back();
|
||||
if( !bRollover && combo.m_fStartSecond == -9999 )
|
||||
combo.m_fStartSecond = 0;
|
||||
|
||||
combo.fSizeSeconds = fSecond - combo.fStartSecond;
|
||||
combo.cnt = cnt;
|
||||
combo.m_fSizeSeconds = fSecond - combo.m_fStartSecond;
|
||||
combo.m_cnt = cnt;
|
||||
|
||||
if( bRollover )
|
||||
combo.rollover = cnt;
|
||||
combo.m_rollover = cnt;
|
||||
}
|
||||
|
||||
/* This returns the largest combo contained within the song, as if
|
||||
* m_bComboContinuesBetweenSongs is turned off. */
|
||||
PlayerStageStats::Combo_t PlayerStageStats::GetMaxCombo() const
|
||||
{
|
||||
if( ComboList.size() == 0 )
|
||||
if( m_ComboList.size() == 0 )
|
||||
return Combo_t();
|
||||
|
||||
int m = 0;
|
||||
for( unsigned i = 1; i < ComboList.size(); ++i )
|
||||
for( unsigned i = 1; i < m_ComboList.size(); ++i )
|
||||
{
|
||||
if( ComboList[i].cnt > ComboList[m].cnt )
|
||||
if( m_ComboList[i].m_cnt > m_ComboList[m].m_cnt )
|
||||
m = i;
|
||||
}
|
||||
|
||||
return ComboList[m];
|
||||
return m_ComboList[m];
|
||||
}
|
||||
|
||||
int PlayerStageStats::GetComboAtStartOfStage() const
|
||||
{
|
||||
if( ComboList.empty() )
|
||||
if( m_ComboList.empty() )
|
||||
return 0;
|
||||
else
|
||||
return ComboList[0].rollover;
|
||||
return m_ComboList[0].m_rollover;
|
||||
}
|
||||
|
||||
bool PlayerStageStats::FullComboOfScore( TapNoteScore tnsAllGreaterOrEqual ) const
|
||||
@@ -470,20 +479,20 @@ bool PlayerStageStats::FullComboOfScore( TapNoteScore tnsAllGreaterOrEqual ) con
|
||||
ASSERT( tnsAllGreaterOrEqual <= TNS_W1 );
|
||||
|
||||
// If missed any holds, then it's not a full combo
|
||||
if( iHoldNoteScores[HNS_LetGo] > 0 )
|
||||
if( m_iHoldNoteScores[HNS_LetGo] > 0 )
|
||||
return false;
|
||||
|
||||
// If has any of the judgments below, then not a full combo
|
||||
for( int i=TNS_Miss; i<tnsAllGreaterOrEqual; i++ )
|
||||
{
|
||||
if( iTapNoteScores[i] > 0 )
|
||||
if( m_iTapNoteScores[i] > 0 )
|
||||
return false;
|
||||
}
|
||||
|
||||
// If has at least one of the judgments equal to or above, then is a full combo.
|
||||
for( int i=tnsAllGreaterOrEqual; i<NUM_TapNoteScore; i++ )
|
||||
{
|
||||
if( iTapNoteScores[i] > 0 )
|
||||
if( m_iTapNoteScores[i] > 0 )
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -493,13 +502,13 @@ bool PlayerStageStats::FullComboOfScore( TapNoteScore tnsAllGreaterOrEqual ) con
|
||||
bool PlayerStageStats::SingleDigitsOfScore( TapNoteScore tnsAllGreaterOrEqual ) const
|
||||
{
|
||||
return FullComboOfScore( tnsAllGreaterOrEqual ) &&
|
||||
iTapNoteScores[tnsAllGreaterOrEqual] < 10;
|
||||
m_iTapNoteScores[tnsAllGreaterOrEqual] < 10;
|
||||
}
|
||||
|
||||
bool PlayerStageStats::OneOfScore( TapNoteScore tnsAllGreaterOrEqual ) const
|
||||
{
|
||||
return FullComboOfScore( tnsAllGreaterOrEqual ) &&
|
||||
iTapNoteScores[tnsAllGreaterOrEqual] == 1;
|
||||
m_iTapNoteScores[tnsAllGreaterOrEqual] == 1;
|
||||
}
|
||||
|
||||
int PlayerStageStats::GetTotalTaps() const
|
||||
@@ -507,7 +516,7 @@ int PlayerStageStats::GetTotalTaps() const
|
||||
int iTotalTaps = 0;
|
||||
for( int i=TNS_Miss; i<NUM_TapNoteScore; i++ )
|
||||
{
|
||||
iTotalTaps += iTapNoteScores[i];
|
||||
iTotalTaps += m_iTapNoteScores[i];
|
||||
}
|
||||
return iTotalTaps;
|
||||
}
|
||||
@@ -517,9 +526,9 @@ float PlayerStageStats::GetPercentageOfTaps( TapNoteScore tns ) const
|
||||
int iTotalTaps = 0;
|
||||
for( int i=TNS_Miss; i<NUM_TapNoteScore; i++ )
|
||||
{
|
||||
iTotalTaps += iTapNoteScores[i];
|
||||
iTotalTaps += m_iTapNoteScores[i];
|
||||
}
|
||||
return iTapNoteScores[tns] / (float)iTotalTaps;
|
||||
return m_iTapNoteScores[tns] / (float)iTotalTaps;
|
||||
}
|
||||
|
||||
void PlayerStageStats::CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutoplay )
|
||||
@@ -577,7 +586,7 @@ void PlayerStageStats::CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutop
|
||||
|
||||
// DO give peak combo awards if using easy mods
|
||||
int iComboAtStartOfStage = GetComboAtStartOfStage();
|
||||
int iPeakCombo = GetMaxCombo().cnt;
|
||||
int iPeakCombo = GetMaxCombo().m_cnt;
|
||||
|
||||
FOREACH_PeakComboAward( pca )
|
||||
{
|
||||
@@ -607,11 +616,11 @@ LuaFunction( GetGradeFromPercent, GetGradeFromPercent( FArg(1), false ) )
|
||||
class LunaPlayerStageStats: public Luna<PlayerStageStats>
|
||||
{
|
||||
public:
|
||||
DEFINE_METHOD( GetCaloriesBurned, fCaloriesBurned )
|
||||
DEFINE_METHOD( GetLifeRemainingSeconds, fLifeRemainingSeconds )
|
||||
DEFINE_METHOD( GetCaloriesBurned, m_fCaloriesBurned )
|
||||
DEFINE_METHOD( GetLifeRemainingSeconds, m_fLifeRemainingSeconds )
|
||||
DEFINE_METHOD( GetSurvivalSeconds, GetSurvivalSeconds() )
|
||||
DEFINE_METHOD( FullCombo, FullCombo() )
|
||||
DEFINE_METHOD( MaxCombo, GetMaxCombo().cnt )
|
||||
DEFINE_METHOD( MaxCombo, GetMaxCombo().m_cnt )
|
||||
DEFINE_METHOD( GetGrade, GetGrade() )
|
||||
DEFINE_METHOD( GetLessonScoreActual, GetLessonScoreActual() )
|
||||
DEFINE_METHOD( GetLessonScoreNeeded, GetLessonScoreNeeded() )
|
||||
|
||||
@@ -26,42 +26,42 @@ public:
|
||||
int GetLessonScoreNeeded() const;
|
||||
void ResetScoreForLesson();
|
||||
|
||||
vector<Steps*> vpPlayedSteps;
|
||||
vector<Steps*> vpPossibleSteps;
|
||||
float fAliveSeconds; // how far into the music did they last before failing? Updated by Gameplay, scaled by music rate.
|
||||
vector<Steps*> m_vpPlayedSteps;
|
||||
vector<Steps*> m_vpPossibleSteps;
|
||||
float m_fAliveSeconds; // how far into the music did they last before failing? Updated by Gameplay, scaled by music rate.
|
||||
|
||||
/* Set if the player actually failed at any point during the song. This is always
|
||||
* false in FAIL_OFF. If recovery is enabled and two players are playing,
|
||||
* this is only set if both players were failing at the same time. */
|
||||
bool bFailed;
|
||||
bool m_bFailed;
|
||||
|
||||
int iPossibleDancePoints;
|
||||
int iCurPossibleDancePoints;
|
||||
int iActualDancePoints;
|
||||
int iPossibleGradePoints;
|
||||
int iTapNoteScores[NUM_TapNoteScore];
|
||||
int iHoldNoteScores[NUM_HoldNoteScore];
|
||||
int iCurCombo;
|
||||
int iMaxCombo;
|
||||
int iCurMissCombo;
|
||||
int iScore;
|
||||
int iCurMaxScore;
|
||||
int iMaxScore;
|
||||
int iBonus; // bonus to be added on screeneval
|
||||
RadarValues radarPossible; // filled in by ScreenGameplay on start of notes
|
||||
RadarValues radarActual;
|
||||
int m_iPossibleDancePoints;
|
||||
int m_iCurPossibleDancePoints;
|
||||
int m_iActualDancePoints;
|
||||
int m_iPossibleGradePoints;
|
||||
int m_iTapNoteScores[NUM_TapNoteScore];
|
||||
int m_iHoldNoteScores[NUM_HoldNoteScore];
|
||||
int m_iCurCombo;
|
||||
int m_iMaxCombo;
|
||||
int m_iCurMissCombo;
|
||||
int m_iScore;
|
||||
int m_iCurMaxScore;
|
||||
int m_iMaxScore;
|
||||
int m_iBonus; // bonus to be added on screeneval
|
||||
RadarValues m_radarPossible; // filled in by ScreenGameplay on start of notes
|
||||
RadarValues m_radarActual;
|
||||
/* The number of songs played and passed, respectively. */
|
||||
int iSongsPassed;
|
||||
int iSongsPlayed;
|
||||
float fLifeRemainingSeconds; // used in survival
|
||||
int m_iSongsPassed;
|
||||
int m_iSongsPlayed;
|
||||
float m_fLifeRemainingSeconds; // used in survival
|
||||
|
||||
// workout
|
||||
float fCaloriesBurned;
|
||||
float m_fCaloriesBurned;
|
||||
|
||||
TapNoteScore tnsLast;
|
||||
HoldNoteScore hnsLast;
|
||||
TapNoteScore m_tnsLast;
|
||||
HoldNoteScore m_hnsLast;
|
||||
|
||||
map<float,float> fLifeRecord;
|
||||
map<float,float> m_fLifeRecord;
|
||||
void SetLifeRecordAt( float fLife, float fStepsSecond );
|
||||
void GetLifeRecord( float *fLifeOut, int iNumSamples, float fStepsEndSecond ) const;
|
||||
float GetLifeRecordAt( float fStepsSecond ) const;
|
||||
@@ -71,24 +71,24 @@ public:
|
||||
{
|
||||
/* Start and size of this combo, in the same scale as the combo list mapping and
|
||||
* the life record. */
|
||||
float fStartSecond, fSizeSeconds;
|
||||
float m_fStartSecond, m_fSizeSeconds;
|
||||
|
||||
/* Combo size, in steps. */
|
||||
int cnt;
|
||||
int m_cnt;
|
||||
|
||||
/* Size of the combo that didn't come from this stage (rollover from the last song).
|
||||
* (This is a subset of cnt.) */
|
||||
int rollover;
|
||||
int m_rollover;
|
||||
|
||||
/* Get the size of the combo that came from this song. */
|
||||
int GetStageCnt() const { return cnt - rollover; }
|
||||
int GetStageCnt() const { return m_cnt - m_rollover; }
|
||||
|
||||
Combo_t(): fStartSecond(0), fSizeSeconds(0), cnt(0), rollover(0) { }
|
||||
bool IsZero() const { return fStartSecond < 0; }
|
||||
Combo_t(): m_fStartSecond(0), m_fSizeSeconds(0), m_cnt(0), m_rollover(0) { }
|
||||
bool IsZero() const { return m_fStartSecond < 0; }
|
||||
};
|
||||
vector<Combo_t> ComboList;
|
||||
float fFirstSecond;
|
||||
float fLastSecond;
|
||||
vector<Combo_t> m_ComboList;
|
||||
float m_fFirstSecond;
|
||||
float m_fLastSecond;
|
||||
|
||||
int GetComboAtStartOfStage() const;
|
||||
bool FullComboOfScore( TapNoteScore tnsAllGreaterOrEqual ) const;
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
void UpdateComboList( float fSecond, bool rollover );
|
||||
Combo_t GetMaxCombo() const;
|
||||
|
||||
float GetSurvivalSeconds() const { return fAliveSeconds + fLifeRemainingSeconds; }
|
||||
float GetSurvivalSeconds() const { return m_fAliveSeconds + m_fLifeRemainingSeconds; }
|
||||
|
||||
// Final results:
|
||||
void CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutoplay );
|
||||
|
||||
@@ -53,8 +53,8 @@ void ScoreDisplayAliveTime::UpdateNumber()
|
||||
ASSERT( m_PlayerNumber != PLAYER_INVALID );
|
||||
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
|
||||
fSecsIntoPlay =
|
||||
STATSMAN->GetAccumPlayedStageStats().m_player[m_PlayerNumber].fAliveSeconds +
|
||||
STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fAliveSeconds;
|
||||
STATSMAN->GetAccumPlayedStageStats().m_player[m_PlayerNumber].m_fAliveSeconds +
|
||||
STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].m_fAliveSeconds;
|
||||
|
||||
SetText( SecondsToMMSSMsMs(fSecsIntoPlay) );
|
||||
}
|
||||
|
||||
@@ -62,8 +62,8 @@ void ScoreDisplayCalories::PlayCommand( const RString &sCommandName )
|
||||
void ScoreDisplayCalories::UpdateNumber()
|
||||
{
|
||||
float fCals =
|
||||
STATSMAN->GetAccumPlayedStageStats().m_player[m_PlayerNumber].fCaloriesBurned +
|
||||
STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].fCaloriesBurned;
|
||||
STATSMAN->GetAccumPlayedStageStats().m_player[m_PlayerNumber].m_fCaloriesBurned +
|
||||
STATSMAN->m_CurStageStats.m_player[m_PlayerNumber].m_fCaloriesBurned;
|
||||
|
||||
SetTargetNumber( fCals );
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ void ScoreDisplayLifeTime::Update( float fDelta )
|
||||
{
|
||||
ScoreDisplay::Update( fDelta );
|
||||
|
||||
float fSecs = m_pPlayerStageStats->fLifeRemainingSeconds;
|
||||
float fSecs = m_pPlayerStageStats->m_fLifeRemainingSeconds;
|
||||
|
||||
RString s = SecondsToMSSMsMs(fSecs);
|
||||
m_textTimeRemaining.SetText( s );
|
||||
@@ -73,7 +73,7 @@ void ScoreDisplayLifeTime::Update( float fDelta )
|
||||
|
||||
void ScoreDisplayLifeTime::OnLoadSong()
|
||||
{
|
||||
if( STATSMAN->m_CurStageStats.m_player[m_pPlayerState->m_PlayerNumber].bFailed )
|
||||
if( STATSMAN->m_CurStageStats.m_player[m_pPlayerState->m_PlayerNumber].m_bFailed )
|
||||
return;
|
||||
|
||||
Course* pCourse = GAMESTATE->m_pCurCourse;
|
||||
@@ -85,7 +85,7 @@ void ScoreDisplayLifeTime::OnLoadSong()
|
||||
|
||||
void ScoreDisplayLifeTime::OnJudgment( TapNoteScore tns )
|
||||
{
|
||||
if( STATSMAN->m_CurStageStats.m_player[m_pPlayerState->m_PlayerNumber].bFailed )
|
||||
if( STATSMAN->m_CurStageStats.m_player[m_pPlayerState->m_PlayerNumber].m_bFailed )
|
||||
return;
|
||||
|
||||
float fMeterChange = 0;
|
||||
@@ -106,7 +106,7 @@ void ScoreDisplayLifeTime::OnJudgment( TapNoteScore tns )
|
||||
|
||||
void ScoreDisplayLifeTime::OnJudgment( HoldNoteScore hns, TapNoteScore tns )
|
||||
{
|
||||
if( STATSMAN->m_CurStageStats.m_player[m_pPlayerState->m_PlayerNumber].bFailed )
|
||||
if( STATSMAN->m_CurStageStats.m_player[m_pPlayerState->m_PlayerNumber].m_bFailed )
|
||||
return;
|
||||
|
||||
float fMeterChange = 0;
|
||||
|
||||
@@ -45,8 +45,8 @@ void ScoreDisplayNormal::SetScore( int iNewScore )
|
||||
// score for subtracrive is MaxScore - score).
|
||||
|
||||
|
||||
int iMaxScore = STATSMAN->m_CurStageStats.m_player[pn].iMaxScore;
|
||||
int iCurMaxScore = STATSMAN->m_CurStageStats.m_player[pn].iCurMaxScore;
|
||||
int iMaxScore = STATSMAN->m_CurStageStats.m_player[pn].m_iMaxScore;
|
||||
int iCurMaxScore = STATSMAN->m_CurStageStats.m_player[pn].m_iCurMaxScore;
|
||||
|
||||
switch( m_pPlayerState->m_PlayerOptions.GetCurrent().m_ScoreDisplay )
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ void ScoreDisplayOni::Update( float fDelta )
|
||||
|
||||
float fSecsIntoPlay = 0;
|
||||
if( GAMESTATE->IsPlayerEnabled(pn) )
|
||||
fSecsIntoPlay = STATSMAN->m_CurStageStats.m_player[pn].fAliveSeconds;
|
||||
fSecsIntoPlay = STATSMAN->m_CurStageStats.m_player[pn].m_fAliveSeconds;
|
||||
|
||||
m_text.SetText( SecondsToMMSSMsMs(fSecsIntoPlay) );
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ void ScoreKeeperNormal::Load(
|
||||
iTotalPossibleGradePoints += this->GetPossibleGradePoints( rvPre, rvPost );
|
||||
}
|
||||
|
||||
m_pPlayerStageStats->iPossibleDancePoints = iTotalPossibleDancePoints;
|
||||
m_pPlayerStageStats->iPossibleGradePoints = iTotalPossibleGradePoints;
|
||||
m_pPlayerStageStats->m_iPossibleDancePoints = iTotalPossibleDancePoints;
|
||||
m_pPlayerStageStats->m_iPossibleGradePoints = iTotalPossibleGradePoints;
|
||||
|
||||
m_iScoreRemainder = 0;
|
||||
m_iCurToastyCombo = 0;
|
||||
@@ -183,7 +183,7 @@ void ScoreKeeperNormal::OnNextSong( int iSongInCourseIndex, const Steps* pSteps,
|
||||
m_iNumTapsAndHolds = pNoteData->GetNumRowsWithTapOrHoldHead() + pNoteData->GetNumHoldNotes();
|
||||
|
||||
m_iPointBonus = m_iMaxPossiblePoints;
|
||||
m_pPlayerStageStats->iMaxScore = m_iMaxScoreSoFar;
|
||||
m_pPlayerStageStats->m_iMaxScore = m_iMaxScoreSoFar;
|
||||
|
||||
/* MercifulBeginner shouldn't clamp weights in course mode, even if a beginner song
|
||||
* is in a course, since that makes PlayerStageStats::GetGrade hard. */
|
||||
@@ -222,8 +222,8 @@ static int GetScore(int p, int Z, int S, int n)
|
||||
|
||||
void ScoreKeeperNormal::AddScore( TapNoteScore score )
|
||||
{
|
||||
int &iScore = m_pPlayerStageStats->iScore;
|
||||
int &iCurMaxScore = m_pPlayerStageStats->iCurMaxScore;
|
||||
int &iScore = m_pPlayerStageStats->m_iScore;
|
||||
int &iCurMaxScore = m_pPlayerStageStats->m_iCurMaxScore;
|
||||
/*
|
||||
Regular scoring:
|
||||
|
||||
@@ -281,7 +281,7 @@ void ScoreKeeperNormal::AddScore( TapNoteScore score )
|
||||
const int Z = m_iMaxPossiblePoints/10;
|
||||
|
||||
// Don't use a multiplier if the player has failed
|
||||
if( m_pPlayerStageStats->bFailed )
|
||||
if( m_pPlayerStageStats->m_bFailed )
|
||||
{
|
||||
iScore += p;
|
||||
// make score evenly divisible by 5
|
||||
@@ -294,8 +294,8 @@ void ScoreKeeperNormal::AddScore( TapNoteScore score )
|
||||
else
|
||||
{
|
||||
iScore += GetScore(p, Z, sum, m_iTapNotesHit);
|
||||
const int &iCurrentCombo = m_pPlayerStageStats->iCurCombo;
|
||||
m_pPlayerStageStats->iBonus += m_ComboBonusFactor[score] * iCurrentCombo;
|
||||
const int &iCurrentCombo = m_pPlayerStageStats->m_iCurCombo;
|
||||
m_pPlayerStageStats->m_iBonus += m_ComboBonusFactor[score] * iCurrentCombo;
|
||||
}
|
||||
|
||||
/* Subtract the maximum this step could have been worth from the bonus. */
|
||||
@@ -305,7 +305,7 @@ void ScoreKeeperNormal::AddScore( TapNoteScore score )
|
||||
|
||||
if ( m_iTapNotesHit == m_iNumTapsAndHolds && score >= TNS_W2 )
|
||||
{
|
||||
if( !m_pPlayerStageStats->bFailed )
|
||||
if( !m_pPlayerStageStats->m_bFailed )
|
||||
iScore += m_iPointBonus;
|
||||
if ( m_bIsLastSongInCourse )
|
||||
{
|
||||
@@ -338,14 +338,14 @@ void ScoreKeeperNormal::HandleTapScore( const TapNote &tn )
|
||||
TapNoteScore score = tn.result.tns;
|
||||
if( score == TNS_HitMine )
|
||||
{
|
||||
if( !m_pPlayerStageStats->bFailed )
|
||||
m_pPlayerStageStats->iActualDancePoints += TapNoteScoreToDancePoints( TNS_HitMine );
|
||||
m_pPlayerStageStats->iTapNoteScores[TNS_HitMine] += 1;
|
||||
if( !m_pPlayerStageStats->m_bFailed )
|
||||
m_pPlayerStageStats->m_iActualDancePoints += TapNoteScoreToDancePoints( TNS_HitMine );
|
||||
m_pPlayerStageStats->m_iTapNoteScores[TNS_HitMine] += 1;
|
||||
}
|
||||
|
||||
NSMAN->ReportScore( m_pPlayerState->m_PlayerNumber, score,
|
||||
m_pPlayerStageStats->iScore,
|
||||
m_pPlayerStageStats->iCurCombo,
|
||||
m_pPlayerStageStats->m_iScore,
|
||||
m_pPlayerStageStats->m_iCurCombo,
|
||||
tn.result.fTapNoteOffset );
|
||||
}
|
||||
}
|
||||
@@ -363,14 +363,14 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow, bool &b
|
||||
return;
|
||||
|
||||
// Update dance points.
|
||||
if( !m_pPlayerStageStats->bFailed )
|
||||
m_pPlayerStageStats->iActualDancePoints += TapNoteScoreToDancePoints( scoreOfLastTap );
|
||||
if( !m_pPlayerStageStats->m_bFailed )
|
||||
m_pPlayerStageStats->m_iActualDancePoints += TapNoteScoreToDancePoints( scoreOfLastTap );
|
||||
|
||||
// update judged row totals
|
||||
m_pPlayerStageStats->iTapNoteScores[scoreOfLastTap] += 1;
|
||||
m_pPlayerStageStats->m_iTapNoteScores[scoreOfLastTap] += 1;
|
||||
|
||||
// increment the current total possible dance score
|
||||
m_pPlayerStageStats->iCurPossibleDancePoints += TapNoteScoreToDancePoints( TNS_W1 );
|
||||
m_pPlayerStageStats->m_iCurPossibleDancePoints += TapNoteScoreToDancePoints( TNS_W1 );
|
||||
|
||||
//
|
||||
// Regular combo
|
||||
@@ -379,16 +379,16 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow, bool &b
|
||||
if( scoreOfLastTap >= m_MinScoreToMaintainCombo )
|
||||
{
|
||||
bMissComboStopped = true;
|
||||
m_pPlayerStageStats->iCurMissCombo = 0;
|
||||
m_pPlayerStageStats->m_iCurMissCombo = 0;
|
||||
if( scoreOfLastTap >= m_MinScoreToContinueCombo )
|
||||
m_pPlayerStageStats->iCurCombo += iComboCountIfHit;
|
||||
m_pPlayerStageStats->m_iCurCombo += iComboCountIfHit;
|
||||
}
|
||||
else if( scoreOfLastTap < m_MinScoreToMaintainCombo )
|
||||
{
|
||||
bComboStopped = true;
|
||||
m_pPlayerStageStats->iCurCombo = 0;
|
||||
m_pPlayerStageStats->m_iCurCombo = 0;
|
||||
if( scoreOfLastTap == TNS_Miss )
|
||||
++m_pPlayerStageStats->iCurMissCombo;
|
||||
++m_pPlayerStageStats->m_iCurMissCombo;
|
||||
}
|
||||
|
||||
AddScore( scoreOfLastTap ); // only score once per row
|
||||
@@ -433,8 +433,8 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow, bool &b
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
float offset = NoteDataWithScoring::LastTapNoteWithResult( nd, iRow, pn ).result.fTapNoteOffset;
|
||||
NSMAN->ReportScore( pn, scoreOfLastTap,
|
||||
m_pPlayerStageStats->iScore,
|
||||
m_pPlayerStageStats->iCurCombo, offset );
|
||||
m_pPlayerStageStats->m_iScore,
|
||||
m_pPlayerStageStats->m_iCurCombo, offset );
|
||||
}
|
||||
|
||||
|
||||
@@ -443,14 +443,14 @@ void ScoreKeeperNormal::HandleHoldScore( const TapNote &tn )
|
||||
HoldNoteScore holdScore = tn.HoldResult.hns;
|
||||
|
||||
// update dance points totals
|
||||
if( !m_pPlayerStageStats->bFailed )
|
||||
m_pPlayerStageStats->iActualDancePoints += HoldNoteScoreToDancePoints( holdScore );
|
||||
m_pPlayerStageStats->iCurPossibleDancePoints += HoldNoteScoreToDancePoints( HNS_Held );
|
||||
m_pPlayerStageStats->iHoldNoteScores[holdScore] ++;
|
||||
if( !m_pPlayerStageStats->m_bFailed )
|
||||
m_pPlayerStageStats->m_iActualDancePoints += HoldNoteScoreToDancePoints( holdScore );
|
||||
m_pPlayerStageStats->m_iCurPossibleDancePoints += HoldNoteScoreToDancePoints( HNS_Held );
|
||||
m_pPlayerStageStats->m_iHoldNoteScores[holdScore] ++;
|
||||
|
||||
// increment the current total possible dance score
|
||||
|
||||
m_pPlayerStageStats->iCurPossibleDancePoints += HoldNoteScoreToDancePoints( HNS_Held );
|
||||
m_pPlayerStageStats->m_iCurPossibleDancePoints += HoldNoteScoreToDancePoints( HNS_Held );
|
||||
|
||||
if( holdScore == HNS_Held )
|
||||
AddScore( TNS_W1 );
|
||||
@@ -462,8 +462,8 @@ void ScoreKeeperNormal::HandleHoldScore( const TapNote &tn )
|
||||
NSMAN->ReportScore(
|
||||
pn,
|
||||
holdScore+TNS_W1,
|
||||
m_pPlayerStageStats->iScore,
|
||||
m_pPlayerStageStats->iCurCombo,
|
||||
m_pPlayerStageStats->m_iScore,
|
||||
m_pPlayerStageStats->m_iCurCombo,
|
||||
tn.result.fTapNoteOffset );
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ ScreenEnding::ScreenEnding() : ScreenAttract( false/*dont reset GAMESTATE*/ )
|
||||
GAMESTATE->m_pCurCourse.Set( SONGMAN->GetRandomCourse() );
|
||||
GAMESTATE->m_pCurSteps[PLAYER_1].Set( GAMESTATE->m_pCurSong->GetAllSteps()[0] );
|
||||
GAMESTATE->m_pCurSteps[PLAYER_2].Set( GAMESTATE->m_pCurSong->GetAllSteps()[0] );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].vpPlayedSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].vpPlayedSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_2] );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_vpPlayedSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].m_vpPlayedSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_2] );
|
||||
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions, ModsLevel_Stage, m_fScrollSpeed, 2.0f );
|
||||
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[PLAYER_2]->m_PlayerOptions, ModsLevel_Stage, m_fScrollSpeed, 2.0f );
|
||||
GAMESTATE->m_iCurrentStageIndex = 0;
|
||||
@@ -52,25 +52,25 @@ ScreenEnding::ScreenEnding() : ScreenAttract( false/*dont reset GAMESTATE*/ )
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].SetLifeRecordAt( 1-fP1, f );
|
||||
}
|
||||
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iActualDancePoints = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iPossibleDancePoints = 2;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].iActualDancePoints = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].iPossibleDancePoints = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iActualDancePoints = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iPossibleDancePoints = 2;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].m_iActualDancePoints = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].m_iPossibleDancePoints = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].UpdateComboList( 0, false );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iCurCombo = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iCurCombo = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].UpdateComboList( 1, false );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iCurCombo = 50;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iCurCombo = 50;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].UpdateComboList( 25, false );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iCurCombo = 250;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iCurCombo = 250;
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].UpdateComboList( 100, false );
|
||||
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iTapNoteScores[TNS_W1] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iTapNoteScores[TNS_W2] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].iTapNoteScores[TNS_W3] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].iTapNoteScores[TNS_W1] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].iTapNoteScores[TNS_W2] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].iTapNoteScores[TNS_W3] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iTapNoteScores[TNS_W1] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iTapNoteScores[TNS_W2] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_1].m_iTapNoteScores[TNS_W3] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].m_iTapNoteScores[TNS_W1] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].m_iTapNoteScores[TNS_W2] = RandomInt( 2 );
|
||||
STATSMAN->m_CurStageStats.m_player[PLAYER_2].m_iTapNoteScores[TNS_W3] = RandomInt( 2 );
|
||||
|
||||
STATSMAN->m_vPlayedStageStats.clear();
|
||||
}
|
||||
|
||||
@@ -92,13 +92,13 @@ ScreenEvaluation::ScreenEvaluation()
|
||||
|
||||
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
|
||||
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
|
||||
STATSMAN->m_CurStageStats.playMode = GAMESTATE->m_PlayMode;
|
||||
STATSMAN->m_CurStageStats.pStyle = GAMESTATE->GetCurrentStyle();
|
||||
STATSMAN->m_CurStageStats.StageType = StageStats::STAGE_NORMAL;
|
||||
STATSMAN->m_CurStageStats.m_playMode = GAMESTATE->m_PlayMode;
|
||||
STATSMAN->m_CurStageStats.m_pStyle = GAMESTATE->GetCurrentStyle();
|
||||
STATSMAN->m_CurStageStats.m_StageType = StageStats::STAGE_NORMAL;
|
||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||
GAMESTATE->m_pCurSong.Set( SONGMAN->GetRandomSong() );
|
||||
STATSMAN->m_CurStageStats.vpPlayedSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
STATSMAN->m_CurStageStats.vpPossibleSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
STATSMAN->m_CurStageStats.m_vpPlayedSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
STATSMAN->m_CurStageStats.m_vpPossibleSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
GAMESTATE->m_pCurCourse.Set( SONGMAN->GetRandomCourse() );
|
||||
GAMESTATE->m_iCurrentStageIndex = 0;
|
||||
|
||||
@@ -113,8 +113,8 @@ ScreenEvaluation::ScreenEvaluation()
|
||||
GAMESTATE->m_pCurCourse->GetAllTrails( apTrails );
|
||||
if( apTrails.size() )
|
||||
GAMESTATE->m_pCurTrail[p].Set( apTrails[0] );
|
||||
STATSMAN->m_CurStageStats.m_player[p].vpPlayedSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
|
||||
STATSMAN->m_CurStageStats.m_player[p].vpPossibleSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_vpPlayedSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_vpPossibleSteps.push_back( GAMESTATE->m_pCurSteps[PLAYER_1] );
|
||||
|
||||
|
||||
PO_GROUP_ASSIGN( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions, ModsLevel_Stage, m_fScrollSpeed, 2.0f );
|
||||
@@ -131,38 +131,38 @@ ScreenEvaluation::ScreenEvaluation()
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
float fSeconds = GAMESTATE->m_pCurSong->GetStepsSeconds();
|
||||
STATSMAN->m_CurStageStats.m_player[p].iActualDancePoints = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iPossibleDancePoints = 2;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iPossibleDancePoints = 2;
|
||||
if( RandomInt(2) )
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 11000;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 11000;
|
||||
else
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0, true );
|
||||
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo += 50;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo += 50;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0.10f * fSeconds, false );
|
||||
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0.15f * fSeconds, false );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0.25f * fSeconds, false );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 50;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 50;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0.35f * fSeconds, false );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0.45f * fSeconds, false );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 1;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 0.50f * fSeconds, false );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 100;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 100;
|
||||
STATSMAN->m_CurStageStats.m_player[p].UpdateComboList( 1.00f * fSeconds, false );
|
||||
if( RandomInt(5) == 0 )
|
||||
{
|
||||
STATSMAN->m_CurStageStats.m_player[p].bFailed = true;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_bFailed = true;
|
||||
}
|
||||
STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W1] = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W2] = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W3] = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].iPossibleGradePoints = 4*ScoreKeeperNormal::TapNoteScoreToGradePoints(TNS_W1, false);
|
||||
STATSMAN->m_CurStageStats.m_player[p].fLifeRemainingSeconds = randomf( 90, 580 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W1] = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W2] = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W3] = RandomInt( 3 );
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iPossibleGradePoints = 4*ScoreKeeperNormal::TapNoteScoreToGradePoints(TNS_W1, false);
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_fLifeRemainingSeconds = randomf( 90, 580 );
|
||||
}
|
||||
|
||||
STATSMAN->m_vPlayedStageStats.clear();
|
||||
@@ -217,8 +217,8 @@ void ScreenEvaluation::Init()
|
||||
Grade g = STATSMAN->m_CurStageStats.m_player[p].GetGrade();
|
||||
if( g < (int) ARRAYLEN(ScoreBonuses) )
|
||||
{
|
||||
STATSMAN->m_CurStageStats.m_player[p].iBonus += ScoreBonuses[(int)g];
|
||||
STATSMAN->m_CurStageStats.m_player[p].iBonus += ScoreBonuses[(int)g];
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iBonus += ScoreBonuses[(int)g];
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iBonus += ScoreBonuses[(int)g];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,7 +230,7 @@ void ScreenEvaluation::Init()
|
||||
STATSMAN->m_CurStageStats.CommitScores( SUMMARY );
|
||||
|
||||
FOREACH_HumanPlayer( p )
|
||||
STATSMAN->m_CurStageStats.m_player[p].CalcAwards( p, STATSMAN->m_CurStageStats.bGaveUp, STATSMAN->m_CurStageStats.bUsedAutoplay );
|
||||
STATSMAN->m_CurStageStats.m_player[p].CalcAwards( p, STATSMAN->m_CurStageStats.m_bGaveUp, STATSMAN->m_CurStageStats.m_bUsedAutoplay );
|
||||
|
||||
// Run this here, so STATSMAN->m_CurStageStats is available to overlays.
|
||||
ScreenWithMenuElements::Init();
|
||||
@@ -267,9 +267,9 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
if( SUMMARY )
|
||||
{
|
||||
for( unsigned i=0; i<STATSMAN->m_CurStageStats.vpPlayedSongs.size(); i++ )
|
||||
for( unsigned i=0; i<STATSMAN->m_CurStageStats.m_vpPlayedSongs.size(); i++ )
|
||||
{
|
||||
Song *pSong = STATSMAN->m_CurStageStats.vpPlayedSongs[i];
|
||||
Song *pSong = STATSMAN->m_CurStageStats.m_vpPlayedSongs[i];
|
||||
|
||||
m_SmallBanner[i].LoadFromSong( pSong );
|
||||
m_SmallBanner[i].ScaleToClipped( BANNER_WIDTH, BANNER_HEIGHT );
|
||||
@@ -404,7 +404,7 @@ void ScreenEvaluation::Init()
|
||||
for( int r=0; r<NUM_SHOWN_RADAR_CATEGORIES; r++ ) // foreach line
|
||||
{
|
||||
m_sprPossibleBar[p][r].Load( THEME->GetPathG(m_sName,ssprintf("bar possible p%d",p+1)) );
|
||||
m_sprPossibleBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * STATSMAN->m_CurStageStats.m_player[p].radarPossible[r] );
|
||||
m_sprPossibleBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * STATSMAN->m_CurStageStats.m_player[p].m_radarPossible[r] );
|
||||
m_sprPossibleBar[p][r].SetName( ssprintf("BarPossible%dP%d",r+1,p+1) );
|
||||
ActorUtil::LoadAllCommands( m_sprPossibleBar[p][r], m_sName );
|
||||
SET_XY( m_sprPossibleBar[p][r] );
|
||||
@@ -412,7 +412,7 @@ void ScreenEvaluation::Init()
|
||||
|
||||
m_sprActualBar[p][r].Load( THEME->GetPathG(m_sName,ssprintf("bar actual p%d",p+1)) );
|
||||
// should be out of the possible bar, not actual (whatever value that is at)
|
||||
m_sprActualBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * STATSMAN->m_CurStageStats.m_player[p].radarActual[r] );
|
||||
m_sprActualBar[p][r].SetWidth( m_sprPossibleBar[p][r].GetUnzoomedWidth() * STATSMAN->m_CurStageStats.m_player[p].m_radarActual[r] );
|
||||
|
||||
float value = (float)100 * m_sprActualBar[p][r].GetUnzoomedWidth() / m_sprPossibleBar[p][r].GetUnzoomedWidth();
|
||||
LOG->Trace("Radar bar %d of 5 - %f percent", r, value);
|
||||
@@ -422,7 +422,7 @@ void ScreenEvaluation::Init()
|
||||
SET_XY( m_sprActualBar[p][r] );
|
||||
|
||||
// .99999 is fairly close to 1.00, so we use that
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].radarActual[r] > 0.99999f )
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].m_radarActual[r] > 0.99999f )
|
||||
m_sprActualBar[p][r].RunCommands( BAR_ACTUAL_MAX_COMMAND );
|
||||
this->AddChild( &m_sprActualBar[p][r] );
|
||||
}
|
||||
@@ -446,7 +446,7 @@ void ScreenEvaluation::Init()
|
||||
m_textSurvivedNumber[p].SetShadowLength( 0 );
|
||||
// curewater: edited the "# stages cleared" text so it deducts one if you failed.
|
||||
// Should be accurate, but I'm not sure if its "standard" that (bool)true = 1. (assumption)
|
||||
m_textSurvivedNumber[p].SetText( ssprintf("%02d", STATSMAN->m_CurStageStats.m_player[p].iSongsPassed) );
|
||||
m_textSurvivedNumber[p].SetText( ssprintf("%02d", STATSMAN->m_CurStageStats.m_player[p].m_iSongsPassed) );
|
||||
m_textSurvivedNumber[p].SetName( ssprintf("SurvivedNumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textSurvivedNumber[p], m_sName );
|
||||
SET_XY( m_textSurvivedNumber[p] );
|
||||
@@ -512,14 +512,14 @@ void ScreenEvaluation::Init()
|
||||
int iValue;
|
||||
switch( l )
|
||||
{
|
||||
case JudgeLine_W1: iValue = STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W1]; break;
|
||||
case JudgeLine_W2: iValue = STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W2]; break;
|
||||
case JudgeLine_W3: iValue = STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W3]; break;
|
||||
case JudgeLine_W4: iValue = STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W4]; break;
|
||||
case JudgeLine_W5: iValue = STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_W5]; break;
|
||||
case JudgeLine_Miss: iValue = STATSMAN->m_CurStageStats.m_player[p].iTapNoteScores[TNS_Miss]; break;
|
||||
case JudgeLine_Held: iValue = STATSMAN->m_CurStageStats.m_player[p].iHoldNoteScores[HNS_Held]; break;
|
||||
case JudgeLine_MaxCombo: iValue = STATSMAN->m_CurStageStats.m_player[p].GetMaxCombo().cnt; break;
|
||||
case JudgeLine_W1: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W1]; break;
|
||||
case JudgeLine_W2: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W2]; break;
|
||||
case JudgeLine_W3: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W3]; break;
|
||||
case JudgeLine_W4: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W4]; break;
|
||||
case JudgeLine_W5: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_W5]; break;
|
||||
case JudgeLine_Miss: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iTapNoteScores[TNS_Miss]; break;
|
||||
case JudgeLine_Held: iValue = STATSMAN->m_CurStageStats.m_player[p].m_iHoldNoteScores[HNS_Held]; break;
|
||||
case JudgeLine_MaxCombo: iValue = STATSMAN->m_CurStageStats.m_player[p].GetMaxCombo().m_cnt; break;
|
||||
DEFAULT_FAIL( l );
|
||||
}
|
||||
|
||||
@@ -559,8 +559,8 @@ void ScreenEvaluation::Init()
|
||||
RadarCategory_Jumps, RadarCategory_Holds, RadarCategory_Mines, RadarCategory_Hands, RadarCategory_Rolls
|
||||
};
|
||||
const int ind = indeces[l];
|
||||
const int iActual = (int) roundf(STATSMAN->m_CurStageStats.m_player[p].radarActual[ind]);
|
||||
const int iPossible = (int) roundf(STATSMAN->m_CurStageStats.m_player[p].radarPossible[ind]);
|
||||
const int iActual = (int) roundf(STATSMAN->m_CurStageStats.m_player[p].m_radarActual[ind]);
|
||||
const int iPossible = (int) roundf(STATSMAN->m_CurStageStats.m_player[p].m_radarPossible[ind]);
|
||||
|
||||
m_textStatsText[l][p].SetText( ssprintf("%3d/%3d",iActual,iPossible) );
|
||||
}
|
||||
@@ -585,7 +585,7 @@ void ScreenEvaluation::Init()
|
||||
m_textScore[p].SetName( ssprintf("ScoreNumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textScore[p], m_sName );
|
||||
SET_XY( m_textScore[p] );
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, STATSMAN->m_CurStageStats.m_player[p].iScore) );
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, STATSMAN->m_CurStageStats.m_player[p].m_iScore) );
|
||||
this->AddChild( &m_textScore[p] );
|
||||
}
|
||||
}
|
||||
@@ -602,7 +602,7 @@ void ScreenEvaluation::Init()
|
||||
{
|
||||
int iTotalScore=0;
|
||||
for( unsigned i=0; i<STATSMAN->m_vPlayedStageStats.size(); i++ )
|
||||
iTotalScore += STATSMAN->m_vPlayedStageStats[i].m_player[p].iScore;
|
||||
iTotalScore += STATSMAN->m_vPlayedStageStats[i].m_player[p].m_iScore;
|
||||
|
||||
//iTotalScore += STATSMAN->m_CurStageStats.m_player[p].iScore;
|
||||
|
||||
@@ -637,7 +637,7 @@ void ScreenEvaluation::Init()
|
||||
m_textTime[p].SetName( ssprintf("TimeNumberP%d",p+1) );
|
||||
ActorUtil::LoadAllCommands( m_textTime[p], m_sName );
|
||||
SET_XY( m_textTime[p] );
|
||||
m_textTime[p].SetText( SecondsToMMSSMsMs(STATSMAN->m_CurStageStats.m_player[p].fAliveSeconds) );
|
||||
m_textTime[p].SetText( SecondsToMMSSMsMs(STATSMAN->m_CurStageStats.m_player[p].m_fAliveSeconds) );
|
||||
this->AddChild( &m_textTime[p] );
|
||||
}
|
||||
}
|
||||
@@ -794,21 +794,21 @@ void ScreenEvaluation::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
FOREACH_EnabledPlayer( p )
|
||||
{
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].iBonus == 0 )
|
||||
if( STATSMAN->m_CurStageStats.m_player[p].m_iBonus == 0 )
|
||||
continue;
|
||||
|
||||
if( GAMESTATE->IsCourseMode() )
|
||||
continue;
|
||||
|
||||
int increment = STATSMAN->m_CurStageStats.m_player[p].iBonus/10;
|
||||
int increment = STATSMAN->m_CurStageStats.m_player[p].m_iBonus/10;
|
||||
if( increment < 1 )
|
||||
increment = min( 1024, STATSMAN->m_CurStageStats.m_player[p].iBonus );
|
||||
increment = min( 1024, STATSMAN->m_CurStageStats.m_player[p].m_iBonus );
|
||||
|
||||
STATSMAN->m_CurStageStats.m_player[p].iBonus -= increment;
|
||||
STATSMAN->m_CurStageStats.m_player[p].iScore += increment;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iBonus -= increment;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iScore += increment;
|
||||
|
||||
if( SHOW_SCORE_AREA )
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, STATSMAN->m_CurStageStats.m_player[p].iScore) );
|
||||
m_textScore[p].SetText( ssprintf("%*.0i", NUM_SCORE_DIGITS, STATSMAN->m_CurStageStats.m_player[p].m_iScore) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -398,19 +398,19 @@ void ScreenGameplay::Init()
|
||||
FOREACH_EnabledPlayer(p)
|
||||
PROFILEMAN->IncrementCoursePlayCount( GAMESTATE->m_pCurCourse, GAMESTATE->m_pCurTrail[p], p );
|
||||
|
||||
STATSMAN->m_CurStageStats.playMode = GAMESTATE->m_PlayMode;
|
||||
STATSMAN->m_CurStageStats.pStyle = GAMESTATE->GetCurrentStyle();
|
||||
STATSMAN->m_CurStageStats.m_playMode = GAMESTATE->m_PlayMode;
|
||||
STATSMAN->m_CurStageStats.m_pStyle = GAMESTATE->GetCurrentStyle();
|
||||
|
||||
/* Record combo rollover. */
|
||||
FOREACH_EnabledPlayerInfoNotDummy( m_vPlayerInfo, pi )
|
||||
pi->GetPlayerStageStats()->UpdateComboList( 0, true );
|
||||
|
||||
if( GAMESTATE->IsExtraStage() )
|
||||
STATSMAN->m_CurStageStats.StageType = StageStats::STAGE_EXTRA;
|
||||
STATSMAN->m_CurStageStats.m_StageType = StageStats::STAGE_EXTRA;
|
||||
else if( GAMESTATE->IsExtraStage2() )
|
||||
STATSMAN->m_CurStageStats.StageType = StageStats::STAGE_EXTRA2;
|
||||
STATSMAN->m_CurStageStats.m_StageType = StageStats::STAGE_EXTRA2;
|
||||
else
|
||||
STATSMAN->m_CurStageStats.StageType = StageStats::STAGE_NORMAL;
|
||||
STATSMAN->m_CurStageStats.m_StageType = StageStats::STAGE_NORMAL;
|
||||
|
||||
|
||||
m_DancingState = STATE_INTRO;
|
||||
@@ -588,7 +588,7 @@ void ScreenGameplay::Init()
|
||||
m_MaxCombo.SetName( "MaxCombo" );
|
||||
ActorUtil::LoadAllCommands( m_MaxCombo, m_sName );
|
||||
SET_XY( m_MaxCombo );
|
||||
m_MaxCombo.SetText( ssprintf("%d", m_vPlayerInfo[0].GetPlayerStageStats()->iMaxCombo) ); // TODO: Make this work for both players
|
||||
m_MaxCombo.SetText( ssprintf("%d", m_vPlayerInfo[0].GetPlayerStageStats()->m_iMaxCombo) ); // TODO: Make this work for both players
|
||||
this->AddChild( &m_MaxCombo );
|
||||
|
||||
|
||||
@@ -879,11 +879,11 @@ void ScreenGameplay::InitSongQueues()
|
||||
}
|
||||
|
||||
// Fill StageStats
|
||||
STATSMAN->m_CurStageStats.vpPossibleSongs = m_apSongsQueue;
|
||||
STATSMAN->m_CurStageStats.m_vpPossibleSongs = m_apSongsQueue;
|
||||
FOREACH( PlayerInfo, m_vPlayerInfo, pi )
|
||||
{
|
||||
if( pi->GetPlayerStageStats() )
|
||||
pi->GetPlayerStageStats()->vpPossibleSteps = pi->m_vpStepsQueue;
|
||||
pi->GetPlayerStageStats()->m_vpPossibleSteps = pi->m_vpStepsQueue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,7 +1017,7 @@ void ScreenGameplay::LoadCourseSongNumber( int iSongNumber )
|
||||
void ScreenGameplay::ReloadCurrentSong()
|
||||
{
|
||||
FOREACH_EnabledPlayerInfoNotDummy( m_vPlayerInfo, pi )
|
||||
pi->GetPlayerStageStats()->iSongsPlayed--;
|
||||
pi->GetPlayerStageStats()->m_iSongsPlayed--;
|
||||
|
||||
LoadNextSong();
|
||||
}
|
||||
@@ -1028,21 +1028,21 @@ void ScreenGameplay::LoadNextSong()
|
||||
|
||||
FOREACH_EnabledPlayerInfoNotDummy( m_vPlayerInfo, pi )
|
||||
{
|
||||
pi->GetPlayerStageStats()->iSongsPlayed++;
|
||||
pi->GetPlayerStageStats()->m_iSongsPlayed++;
|
||||
if( pi->m_ptextCourseSongNumber )
|
||||
pi->m_ptextCourseSongNumber->SetText( ssprintf("%d", pi->GetPlayerStageStats()->iSongsPassed+1) );
|
||||
pi->m_ptextCourseSongNumber->SetText( ssprintf("%d", pi->GetPlayerStageStats()->m_iSongsPassed+1) );
|
||||
}
|
||||
|
||||
// super hack
|
||||
if( GAMESTATE->m_bMultiplayer )
|
||||
STATSMAN->m_CurStageStats.m_player[GAMESTATE->m_MasterPlayerNumber].iSongsPlayed++;
|
||||
STATSMAN->m_CurStageStats.m_player[GAMESTATE->m_MasterPlayerNumber].m_iSongsPlayed++;
|
||||
|
||||
LoadCourseSongNumber( GAMESTATE->GetCourseSongIndex() );
|
||||
|
||||
int iPlaySongIndex = GAMESTATE->GetCourseSongIndex();
|
||||
iPlaySongIndex %= m_apSongsQueue.size();
|
||||
GAMESTATE->m_pCurSong.Set( m_apSongsQueue[iPlaySongIndex] );
|
||||
STATSMAN->m_CurStageStats.vpPlayedSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
STATSMAN->m_CurStageStats.m_vpPlayedSongs.push_back( GAMESTATE->m_pCurSong );
|
||||
|
||||
// No need to do this here. We do it in SongFinished().
|
||||
//GAMESTATE->RemoveAllActiveAttacks();
|
||||
@@ -1060,7 +1060,7 @@ void ScreenGameplay::LoadNextSong()
|
||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||
{
|
||||
Steps* pSteps = GAMESTATE->m_pCurSteps[ pi->GetStepsAndTrailIndex() ];
|
||||
pi->GetPlayerStageStats()->vpPlayedSteps.push_back( pSteps );
|
||||
pi->GetPlayerStageStats()->m_vpPlayedSteps.push_back( pSteps );
|
||||
|
||||
ASSERT( GAMESTATE->m_pCurSteps[ pi->GetStepsAndTrailIndex() ] );
|
||||
if( pi->m_ptextStepsDescription )
|
||||
@@ -1082,7 +1082,7 @@ void ScreenGameplay::LoadNextSong()
|
||||
// reset oni game over graphic
|
||||
SET_XY_AND_ON_COMMAND( pi->m_sprOniGameOver );
|
||||
|
||||
if( GAMESTATE->m_SongOptions.GetCurrent().m_LifeType==SongOptions::LIFE_BATTERY && pi->GetPlayerStageStats()->bFailed ) // already failed
|
||||
if( GAMESTATE->m_SongOptions.GetCurrent().m_LifeType==SongOptions::LIFE_BATTERY && pi->GetPlayerStageStats()->m_bFailed ) // already failed
|
||||
pi->ShowOniGameOver();
|
||||
|
||||
if( GAMESTATE->m_SongOptions.GetCurrent().m_LifeType==SongOptions::LIFE_BAR && pi->m_pLifeMeter )
|
||||
@@ -1218,7 +1218,7 @@ void ScreenGameplay::LoadNextSong()
|
||||
|
||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||
{
|
||||
if( !pi->GetPlayerStageStats()->bFailed )
|
||||
if( !pi->GetPlayerStageStats()->m_bFailed )
|
||||
{
|
||||
// give a little life back between stages
|
||||
if( pi->m_pLifeMeter )
|
||||
@@ -1557,7 +1557,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
return;
|
||||
|
||||
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID && !m_MaxCombo.GetHidden() )
|
||||
m_MaxCombo.SetText( ssprintf("%d", STATSMAN->m_CurStageStats.m_player[GAMESTATE->m_MasterPlayerNumber].iMaxCombo) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
||||
m_MaxCombo.SetText( ssprintf("%d", STATSMAN->m_CurStageStats.m_player[GAMESTATE->m_MasterPlayerNumber].m_iMaxCombo) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
||||
|
||||
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
||||
|
||||
@@ -1607,11 +1607,11 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
// check for individual fail
|
||||
if( pi->m_pLifeMeter == NULL || !pi->m_pLifeMeter->IsFailing() )
|
||||
continue; /* isn't failing */
|
||||
if( pi->GetPlayerStageStats()->bFailed )
|
||||
if( pi->GetPlayerStageStats()->m_bFailed )
|
||||
continue; /* failed and is already dead */
|
||||
|
||||
LOG->Trace("Player %d failed", (int)pn);
|
||||
pi->GetPlayerStageStats()->bFailed = true; // fail
|
||||
pi->GetPlayerStageStats()->m_bFailed = true; // fail
|
||||
|
||||
//
|
||||
// Check for and do Oni die.
|
||||
@@ -1669,13 +1669,13 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
float fUnscaledDeltaTime = m_timerGameplaySeconds.GetDeltaTime();
|
||||
|
||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||
if( !pi->GetPlayerStageStats()->bFailed )
|
||||
pi->GetPlayerStageStats()->fAliveSeconds += fUnscaledDeltaTime * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate;
|
||||
if( !pi->GetPlayerStageStats()->m_bFailed )
|
||||
pi->GetPlayerStageStats()->m_fAliveSeconds += fUnscaledDeltaTime * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate;
|
||||
|
||||
// update fGameplaySeconds
|
||||
STATSMAN->m_CurStageStats.fGameplaySeconds += fUnscaledDeltaTime;
|
||||
STATSMAN->m_CurStageStats.m_fGameplaySeconds += fUnscaledDeltaTime;
|
||||
if( GAMESTATE->m_fSongBeat >= GAMESTATE->m_pCurSong->m_fFirstBeat && GAMESTATE->m_fSongBeat < GAMESTATE->m_pCurSong->m_fLastBeat )
|
||||
STATSMAN->m_CurStageStats.fStepsSeconds += fUnscaledDeltaTime;
|
||||
STATSMAN->m_CurStageStats.m_fStepsSeconds += fUnscaledDeltaTime;
|
||||
|
||||
//
|
||||
// Check for end of song
|
||||
@@ -1787,10 +1787,10 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
{
|
||||
// Give up
|
||||
|
||||
STATSMAN->m_CurStageStats.bGaveUp = true;
|
||||
STATSMAN->m_CurStageStats.m_bGaveUp = true;
|
||||
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
||||
{
|
||||
pi->GetPlayerStageStats()->bFailed |= GAMESTATE->AllHumanHaveComboOf30OrMoreMisses();
|
||||
pi->GetPlayerStageStats()->m_bFailed |= GAMESTATE->AllHumanHaveComboOf30OrMoreMisses();
|
||||
}
|
||||
|
||||
AbortGiveUp( false );
|
||||
@@ -2244,10 +2244,10 @@ void ScreenGameplay::SaveStats()
|
||||
const NoteData &nd = pi->m_pPlayer->GetNoteData();
|
||||
|
||||
NoteDataUtil::CalculateRadarValues( nd, fMusicLen, rv );
|
||||
pss.radarPossible += rv;
|
||||
pss.m_radarPossible += rv;
|
||||
|
||||
NoteDataWithScoring::GetActualRadarValues( nd, pss, fMusicLen, rv );
|
||||
pss.radarActual += rv;
|
||||
pss.m_radarActual += rv;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2317,14 +2317,14 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
/* Mark failure. */
|
||||
if( GAMESTATE->GetPlayerFailType(pi->GetPlayerState()) != SongOptions::FAIL_OFF &&
|
||||
(pi->m_pLifeMeter && pi->m_pLifeMeter->IsFailing()) )
|
||||
pi->GetPlayerStageStats()->bFailed = true;
|
||||
pi->GetPlayerStageStats()->m_bFailed = true;
|
||||
|
||||
if( !pi->GetPlayerStageStats()->bFailed )
|
||||
pi->GetPlayerStageStats()->iSongsPassed++;
|
||||
if( !pi->GetPlayerStageStats()->m_bFailed )
|
||||
pi->GetPlayerStageStats()->m_iSongsPassed++;
|
||||
|
||||
// set a life record at the point of failure
|
||||
if( pi->GetPlayerStageStats()->bFailed )
|
||||
pi->GetPlayerStageStats()->SetLifeRecordAt( 0, STATSMAN->m_CurStageStats.fGameplaySeconds );
|
||||
if( pi->GetPlayerStageStats()->m_bFailed )
|
||||
pi->GetPlayerStageStats()->SetLifeRecordAt( 0, STATSMAN->m_CurStageStats.m_fGameplaySeconds );
|
||||
}
|
||||
|
||||
/* If all players have *really* failed (bFailed, not the life meter or
|
||||
@@ -2363,7 +2363,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
||||
{
|
||||
/* XXX: In battle modes, switch( GAMESTATE->GetStageResult(p) ). */
|
||||
if( pi->GetPlayerStageStats()->bFailed )
|
||||
if( pi->GetPlayerStageStats()->m_bFailed )
|
||||
pDancers->Change2DAnimState( pi->m_pn, AS2D_FAIL ); // fail anim
|
||||
else if( pi->m_pLifeMeter && pi->GetPlayerState()->m_HealthState == PlayerState::HOT )
|
||||
pDancers->Change2DAnimState( pi->m_pn, AS2D_WINFEVER ); // full life pass anim
|
||||
@@ -2526,7 +2526,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
float fMaxSurviveSeconds = 0;
|
||||
FOREACH_EnabledPlayer(p)
|
||||
fMaxSurviveSeconds = max( fMaxSurviveSeconds, STATSMAN->m_CurStageStats.m_player[p].fAliveSeconds );
|
||||
fMaxSurviveSeconds = max( fMaxSurviveSeconds, STATSMAN->m_CurStageStats.m_player[p].m_fAliveSeconds );
|
||||
m_textSurviveTime.SetText( "TIME: " + SecondsToMMSSMsMs(fMaxSurviveSeconds) );
|
||||
SET_XY_AND_ON_COMMAND( m_textSurviveTime );
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ void ScreenJukebox::Init()
|
||||
FOREACH_EnabledPlayer( p )
|
||||
{
|
||||
/* Reset the combo, in case ComboContinuesBetweenSongs is enabled. */
|
||||
STATSMAN->m_CurStageStats.m_player[p].iCurCombo = 0;
|
||||
STATSMAN->m_CurStageStats.m_player[p].m_iCurCombo = 0;
|
||||
|
||||
if( GAMESTATE->m_bJukeboxUsesModifiers )
|
||||
{
|
||||
|
||||
@@ -129,36 +129,36 @@ ScreenNameEntry::ScreenNameEntry()
|
||||
StageStats ss;
|
||||
for( int z = 0; z < 3; ++z )
|
||||
{
|
||||
ss.vpPlayedSongs.push_back( SONGMAN->GetRandomSong() );
|
||||
ss.vpPossibleSongs = ss.vpPlayedSongs;
|
||||
ss.pStyle = GAMESTATE->GetCurrentStyle();
|
||||
ss.playMode = GAMESTATE->m_PlayMode;
|
||||
ASSERT( ss.vpPlayedSongs[0]->GetAllSteps().size() );
|
||||
ss.m_vpPlayedSongs.push_back( SONGMAN->GetRandomSong() );
|
||||
ss.m_vpPossibleSongs = ss.m_vpPlayedSongs;
|
||||
ss.m_pStyle = GAMESTATE->GetCurrentStyle();
|
||||
ss.m_playMode = GAMESTATE->m_PlayMode;
|
||||
ASSERT( ss.m_vpPlayedSongs[0]->GetAllSteps().size() );
|
||||
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
Steps *pSteps = ss.vpPlayedSongs[0]->GetAllSteps()[0];
|
||||
ss.m_player[p].vpPlayedSteps.push_back( pSteps );
|
||||
Steps *pSteps = ss.m_vpPlayedSongs[0]->GetAllSteps()[0];
|
||||
ss.m_player[p].m_vpPlayedSteps.push_back( pSteps );
|
||||
GAMESTATE->m_pCurSteps[p].Set( pSteps );
|
||||
ss.m_player[p].iPossibleDancePoints = 100;
|
||||
ss.m_player[p].iActualDancePoints = 100;
|
||||
ss.m_player[p].iScore = 100;
|
||||
ss.m_player[p].iPossibleDancePoints = 1000;
|
||||
ss.m_player[p].iActualDancePoints = 985;
|
||||
ss.m_player[p].vpPossibleSteps.push_back( pSteps );
|
||||
ss.m_player[p].m_iPossibleDancePoints = 100;
|
||||
ss.m_player[p].m_iActualDancePoints = 100;
|
||||
ss.m_player[p].m_iScore = 100;
|
||||
ss.m_player[p].m_iPossibleDancePoints = 1000;
|
||||
ss.m_player[p].m_iActualDancePoints = 985;
|
||||
ss.m_player[p].m_vpPossibleSteps.push_back( pSteps );
|
||||
|
||||
HighScore hs;
|
||||
hs.SetGrade( Grade_Tier03 );
|
||||
hs.SetPercentDP( ss.m_player[p].GetPercentDancePoints() );
|
||||
hs.SetScore( ss.m_player[p].iScore );
|
||||
hs.SetScore( ss.m_player[p].m_iScore );
|
||||
hs.SetDateTime( DateTime::GetNowDateTime() );
|
||||
int a, b;
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddCategoryScore( st, RANKING_A, p, hs, a, b );
|
||||
}
|
||||
|
||||
|
||||
@@ -144,36 +144,36 @@ ScreenNameEntryTraditional::ScreenNameEntryTraditional()
|
||||
StageStats ss;
|
||||
for( int z = 0; z < 3; ++z )
|
||||
{
|
||||
ss.vpPlayedSongs.push_back( SONGMAN->GetRandomSong() );
|
||||
ss.vpPossibleSongs = ss.vpPlayedSongs;
|
||||
ss.pStyle = GAMESTATE->GetCurrentStyle();
|
||||
ss.playMode = GAMESTATE->m_PlayMode;
|
||||
ASSERT( ss.vpPlayedSongs[0]->GetAllSteps().size() );
|
||||
ss.m_vpPlayedSongs.push_back( SONGMAN->GetRandomSong() );
|
||||
ss.m_vpPossibleSongs = ss.m_vpPlayedSongs;
|
||||
ss.m_pStyle = GAMESTATE->GetCurrentStyle();
|
||||
ss.m_playMode = GAMESTATE->m_PlayMode;
|
||||
ASSERT( ss.m_vpPlayedSongs[0]->GetAllSteps().size() );
|
||||
StepsType st = GAMESTATE->GetCurrentStyle()->m_StepsType;
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
{
|
||||
Steps *pSteps = ss.vpPlayedSongs[0]->GetAllSteps()[0];
|
||||
ss.m_player[p].vpPlayedSteps.push_back( pSteps );
|
||||
Steps *pSteps = ss.m_vpPlayedSongs[0]->GetAllSteps()[0];
|
||||
ss.m_player[p].m_vpPlayedSteps.push_back( pSteps );
|
||||
GAMESTATE->m_pCurSteps[p].Set( pSteps );
|
||||
ss.m_player[p].iPossibleDancePoints = 100;
|
||||
ss.m_player[p].iActualDancePoints = 100;
|
||||
ss.m_player[p].iScore = 100;
|
||||
ss.m_player[p].iPossibleDancePoints = 1000;
|
||||
ss.m_player[p].iActualDancePoints = 985;
|
||||
ss.m_player[p].vpPossibleSteps.push_back( pSteps );
|
||||
ss.m_player[p].m_iPossibleDancePoints = 100;
|
||||
ss.m_player[p].m_iActualDancePoints = 100;
|
||||
ss.m_player[p].m_iScore = 100;
|
||||
ss.m_player[p].m_iPossibleDancePoints = 1000;
|
||||
ss.m_player[p].m_iActualDancePoints = 985;
|
||||
ss.m_player[p].m_vpPossibleSteps.push_back( pSteps );
|
||||
|
||||
HighScore hs;
|
||||
hs.SetGrade( Grade_Tier03 );
|
||||
hs.SetPercentDP( ss.m_player[p].GetPercentDancePoints() );
|
||||
hs.SetScore( ss.m_player[p].iScore );
|
||||
hs.SetScore( ss.m_player[p].m_iScore );
|
||||
hs.SetDateTime( DateTime::GetNowDateTime() );
|
||||
int a, b;
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddStepsScore( ss.m_vpPlayedSongs[0], pSteps, p, hs, a, b );
|
||||
PROFILEMAN->AddCategoryScore( st, RANKING_A, p, hs, a, b );
|
||||
}
|
||||
|
||||
@@ -334,14 +334,14 @@ void ScreenNameEntryTraditional::Init()
|
||||
for( unsigned i = 0; i < STATSMAN->m_vPlayedStageStats.size(); ++i )
|
||||
{
|
||||
StageStats &ss = STATSMAN->m_vPlayedStageStats[i];
|
||||
Song* pSong = ss.vpPlayedSongs[0];
|
||||
Steps* pSteps = ss.m_player[p].vpPlayedSteps[0];
|
||||
Song* pSong = ss.m_vpPlayedSongs[0];
|
||||
Steps* pSteps = ss.m_player[p].m_vpPlayedSteps[0];
|
||||
Course* pCourse = GAMESTATE->m_pCurCourse;
|
||||
Trail* pTrail = GAMESTATE->m_pCurTrail[p];
|
||||
|
||||
int iHighScoreIndex = -1; // -1 means "out of ranking"
|
||||
Grade grade = ss.m_player[p].GetGrade();
|
||||
int iScore = ss.m_player[p].iScore;
|
||||
int iScore = ss.m_player[p].m_iScore;
|
||||
float fPercentDP = ss.m_player[p].GetPercentDancePoints();
|
||||
|
||||
// If this is a SHOW_NEVER song, then it's probably a training.
|
||||
|
||||
@@ -652,7 +652,7 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
|
||||
if( GAMESTATE->IsEventMode() )
|
||||
i = max( 0, int(STATSMAN->m_vPlayedStageStats.size())-5 );
|
||||
for( ; i < (int)STATSMAN->m_vPlayedStageStats.size(); ++i )
|
||||
if( STATSMAN->m_vPlayedStageStats[i].vpPlayedSongs.back() == m_MusicWheel.GetSelectedSong() )
|
||||
if( STATSMAN->m_vPlayedStageStats[i].m_vpPlayedSongs.back() == m_MusicWheel.GetSelectedSong() )
|
||||
bIsRepeat = true;
|
||||
|
||||
/* Don't complain about repeats if the user didn't get to pick. */
|
||||
|
||||
@@ -18,16 +18,16 @@
|
||||
|
||||
StageStats::StageStats()
|
||||
{
|
||||
playMode = PlayMode_Invalid;
|
||||
pStyle = NULL;
|
||||
vpPlayedSongs.clear();
|
||||
vpPossibleSongs.clear();
|
||||
StageType = Stage_Invalid;
|
||||
bGaveUp = false;
|
||||
bUsedAutoplay = false;
|
||||
fGameplaySeconds = 0;
|
||||
fStepsSeconds = 0;
|
||||
fMusicRate = 1;
|
||||
m_playMode = PlayMode_Invalid;
|
||||
m_pStyle = NULL;
|
||||
m_vpPlayedSongs.clear();
|
||||
m_vpPossibleSongs.clear();
|
||||
m_StageType = Stage_Invalid;
|
||||
m_bGaveUp = false;
|
||||
m_bUsedAutoplay = false;
|
||||
m_fGameplaySeconds = 0;
|
||||
m_fStepsSeconds = 0;
|
||||
m_fMusicRate = 1;
|
||||
}
|
||||
|
||||
void StageStats::Init()
|
||||
@@ -37,32 +37,32 @@ void StageStats::Init()
|
||||
|
||||
void StageStats::AssertValid( PlayerNumber pn ) const
|
||||
{
|
||||
ASSERT( vpPlayedSongs.size() != 0 );
|
||||
ASSERT( vpPossibleSongs.size() != 0 );
|
||||
if( vpPlayedSongs[0] )
|
||||
CHECKPOINT_M( vpPlayedSongs[0]->GetTranslitFullTitle() );
|
||||
ASSERT( m_player[pn].vpPlayedSteps.size() != 0 );
|
||||
ASSERT( m_player[pn].vpPlayedSteps[0] );
|
||||
ASSERT_M( playMode < NUM_PlayMode, ssprintf("playmode %i", playMode) );
|
||||
ASSERT( pStyle != NULL );
|
||||
ASSERT_M( m_player[pn].vpPlayedSteps[0]->GetDifficulty() < NUM_Difficulty, ssprintf("difficulty %i", m_player[pn].vpPlayedSteps[0]->GetDifficulty()) );
|
||||
ASSERT( vpPlayedSongs.size() == m_player[pn].vpPlayedSteps.size() );
|
||||
ASSERT( vpPossibleSongs.size() == m_player[pn].vpPossibleSteps.size() );
|
||||
ASSERT( m_vpPlayedSongs.size() != 0 );
|
||||
ASSERT( m_vpPossibleSongs.size() != 0 );
|
||||
if( m_vpPlayedSongs[0] )
|
||||
CHECKPOINT_M( m_vpPlayedSongs[0]->GetTranslitFullTitle() );
|
||||
ASSERT( m_player[pn].m_vpPlayedSteps.size() != 0 );
|
||||
ASSERT( m_player[pn].m_vpPlayedSteps[0] );
|
||||
ASSERT_M( m_playMode < NUM_PlayMode, ssprintf("playmode %i", m_playMode) );
|
||||
ASSERT( m_pStyle != NULL );
|
||||
ASSERT_M( m_player[pn].m_vpPlayedSteps[0]->GetDifficulty() < NUM_Difficulty, ssprintf("difficulty %i", m_player[pn].m_vpPlayedSteps[0]->GetDifficulty()) );
|
||||
ASSERT( m_vpPlayedSongs.size() == m_player[pn].m_vpPlayedSteps.size() );
|
||||
ASSERT( m_vpPossibleSongs.size() == m_player[pn].m_vpPossibleSteps.size() );
|
||||
}
|
||||
|
||||
void StageStats::AssertValid( MultiPlayer pn ) const
|
||||
{
|
||||
ASSERT( vpPlayedSongs.size() != 0 );
|
||||
ASSERT( vpPossibleSongs.size() != 0 );
|
||||
if( vpPlayedSongs[0] )
|
||||
CHECKPOINT_M( vpPlayedSongs[0]->GetTranslitFullTitle() );
|
||||
ASSERT( m_multiPlayer[pn].vpPlayedSteps.size() != 0 );
|
||||
ASSERT( m_multiPlayer[pn].vpPlayedSteps[0] );
|
||||
ASSERT_M( playMode < NUM_PlayMode, ssprintf("playmode %i", playMode) );
|
||||
ASSERT( pStyle != NULL );
|
||||
ASSERT_M( m_player[pn].vpPlayedSteps[0]->GetDifficulty() < NUM_Difficulty, ssprintf("difficulty %i", m_player[pn].vpPlayedSteps[0]->GetDifficulty()) );
|
||||
ASSERT( vpPlayedSongs.size() == m_player[pn].vpPlayedSteps.size() );
|
||||
ASSERT( vpPossibleSongs.size() == m_player[pn].vpPossibleSteps.size() );
|
||||
ASSERT( m_vpPlayedSongs.size() != 0 );
|
||||
ASSERT( m_vpPossibleSongs.size() != 0 );
|
||||
if( m_vpPlayedSongs[0] )
|
||||
CHECKPOINT_M( m_vpPlayedSongs[0]->GetTranslitFullTitle() );
|
||||
ASSERT( m_multiPlayer[pn].m_vpPlayedSteps.size() != 0 );
|
||||
ASSERT( m_multiPlayer[pn].m_vpPlayedSteps[0] );
|
||||
ASSERT_M( m_playMode < NUM_PlayMode, ssprintf("playmode %i", m_playMode) );
|
||||
ASSERT( m_pStyle != NULL );
|
||||
ASSERT_M( m_player[pn].m_vpPlayedSteps[0]->GetDifficulty() < NUM_Difficulty, ssprintf("difficulty %i", m_player[pn].m_vpPlayedSteps[0]->GetDifficulty()) );
|
||||
ASSERT( m_vpPlayedSongs.size() == m_player[pn].m_vpPlayedSteps.size() );
|
||||
ASSERT( m_vpPossibleSongs.size() == m_player[pn].m_vpPossibleSteps.size() );
|
||||
}
|
||||
|
||||
|
||||
@@ -74,28 +74,28 @@ int StageStats::GetAverageMeter( PlayerNumber pn ) const
|
||||
|
||||
int iTotalMeter = 0;
|
||||
|
||||
for( unsigned i=0; i<vpPlayedSongs.size(); i++ )
|
||||
for( unsigned i=0; i<m_vpPlayedSongs.size(); i++ )
|
||||
{
|
||||
const Steps* pSteps = m_player[pn].vpPlayedSteps[i];
|
||||
const Steps* pSteps = m_player[pn].m_vpPlayedSteps[i];
|
||||
iTotalMeter += pSteps->GetMeter();
|
||||
}
|
||||
return iTotalMeter / vpPlayedSongs.size(); // round down
|
||||
return iTotalMeter / m_vpPlayedSongs.size(); // round down
|
||||
}
|
||||
|
||||
void StageStats::AddStats( const StageStats& other )
|
||||
{
|
||||
ASSERT( !other.vpPlayedSongs.empty() );
|
||||
FOREACH_CONST( Song*, other.vpPlayedSongs, s )
|
||||
vpPlayedSongs.push_back( *s );
|
||||
FOREACH_CONST( Song*, other.vpPossibleSongs, s )
|
||||
vpPossibleSongs.push_back( *s );
|
||||
StageType = Stage_Invalid; // meaningless
|
||||
ASSERT( !other.m_vpPlayedSongs.empty() );
|
||||
FOREACH_CONST( Song*, other.m_vpPlayedSongs, s )
|
||||
m_vpPlayedSongs.push_back( *s );
|
||||
FOREACH_CONST( Song*, other.m_vpPossibleSongs, s )
|
||||
m_vpPossibleSongs.push_back( *s );
|
||||
m_StageType = Stage_Invalid; // meaningless
|
||||
|
||||
bGaveUp |= other.bGaveUp;
|
||||
bUsedAutoplay |= other.bUsedAutoplay;
|
||||
m_bGaveUp |= other.m_bGaveUp;
|
||||
m_bUsedAutoplay |= other.m_bUsedAutoplay;
|
||||
|
||||
fGameplaySeconds += other.fGameplaySeconds;
|
||||
fStepsSeconds += other.fStepsSeconds;
|
||||
m_fGameplaySeconds += other.m_fGameplaySeconds;
|
||||
m_fStepsSeconds += other.m_fStepsSeconds;
|
||||
|
||||
FOREACH_EnabledPlayer( p )
|
||||
m_player[p].AddStats( other.m_player[p] );
|
||||
@@ -104,7 +104,7 @@ void StageStats::AddStats( const StageStats& other )
|
||||
bool StageStats::OnePassed() const
|
||||
{
|
||||
FOREACH_EnabledPlayer( p )
|
||||
if( !m_player[p].bFailed )
|
||||
if( !m_player[p].m_bFailed )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ bool StageStats::OnePassed() const
|
||||
bool StageStats::AllFailed() const
|
||||
{
|
||||
FOREACH_EnabledPlayer( p )
|
||||
if( !m_player[p].bFailed )
|
||||
if( !m_player[p].m_bFailed )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -120,9 +120,9 @@ bool StageStats::AllFailed() const
|
||||
float StageStats::GetTotalPossibleStepsSeconds() const
|
||||
{
|
||||
float fSecs = 0;
|
||||
FOREACH_CONST( Song*, vpPossibleSongs, s )
|
||||
FOREACH_CONST( Song*, m_vpPossibleSongs, s )
|
||||
fSecs += (*s)->GetStepsSeconds();
|
||||
return fSecs / fMusicRate;
|
||||
return fSecs / m_fMusicRate;
|
||||
}
|
||||
|
||||
void StageStats::CommitScores( bool bSummary )
|
||||
@@ -162,20 +162,20 @@ void StageStats::CommitScores( bool bSummary )
|
||||
HighScore &hs = m_player[p].m_HighScore;
|
||||
hs.SetName( RANKING_TO_FILL_IN_MARKER[p] );
|
||||
hs.SetGrade( m_player[p].GetGrade() );
|
||||
hs.SetScore( m_player[p].iScore );
|
||||
hs.SetScore( m_player[p].m_iScore );
|
||||
hs.SetPercentDP( m_player[p].GetPercentDancePoints() );
|
||||
hs.SetSurviveSeconds( m_player[p].fAliveSeconds );
|
||||
hs.SetSurviveSeconds( m_player[p].m_fAliveSeconds );
|
||||
hs.SetModifiers( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.GetStage().GetString() );
|
||||
hs.SetDateTime( DateTime::GetNowDateTime() );
|
||||
hs.SetPlayerGuid( PROFILEMAN->IsPersistentProfile(p) ? PROFILEMAN->GetProfile(p)->m_sGuid : RString("") );
|
||||
hs.SetMachineGuid( PROFILEMAN->GetMachineProfile()->m_sGuid );
|
||||
hs.SetProductID( PREFSMAN->m_iProductID );
|
||||
FOREACH_TapNoteScore( tns )
|
||||
hs.SetTapNoteScore( tns, m_player[p].iTapNoteScores[tns] );
|
||||
hs.SetTapNoteScore( tns, m_player[p].m_iTapNoteScores[tns] );
|
||||
FOREACH_HoldNoteScore( hns )
|
||||
hs.SetHoldNoteScore( hns, m_player[p].iHoldNoteScores[hns] );
|
||||
hs.SetRadarValues( m_player[p].radarActual );
|
||||
hs.SetLifeRemainingSeconds( m_player[p].fLifeRemainingSeconds );
|
||||
hs.SetHoldNoteScore( hns, m_player[p].m_iHoldNoteScores[hns] );
|
||||
hs.SetRadarValues( m_player[p].m_radarActual );
|
||||
hs.SetLifeRemainingSeconds( m_player[p].m_fLifeRemainingSeconds );
|
||||
}
|
||||
|
||||
FOREACH_HumanPlayer( p )
|
||||
@@ -189,7 +189,7 @@ void StageStats::CommitScores( bool bSummary )
|
||||
if( bSummary )
|
||||
{
|
||||
// don't save scores if any stage was failed
|
||||
if( m_player[p].bFailed )
|
||||
if( m_player[p].m_bFailed )
|
||||
continue;
|
||||
|
||||
int iAverageMeter = GetAverageMeter(p);
|
||||
@@ -211,7 +211,7 @@ void StageStats::CommitScores( bool bSummary )
|
||||
else
|
||||
{
|
||||
// don't save scores for a failed song
|
||||
if( m_player[p].bFailed )
|
||||
if( m_player[p].m_bFailed )
|
||||
continue;
|
||||
|
||||
ASSERT( pSteps );
|
||||
@@ -272,7 +272,7 @@ class LunaStageStats: public Luna<StageStats>
|
||||
public:
|
||||
static int GetPlayerStageStats( T* p, lua_State *L ) { p->m_player[Enum::Check<PlayerNumber>(L, 1)].PushSelf(L); return 1; }
|
||||
static int GetMultiPlayerStageStats( T* p, lua_State *L ) { p->m_multiPlayer[Enum::Check<MultiPlayer>(L, 1)].PushSelf(L); return 1; }
|
||||
static int GetGameplaySeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->fGameplaySeconds); return 1; }
|
||||
static int GetGameplaySeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_fGameplaySeconds); return 1; }
|
||||
static int OnePassed( T* p, lua_State *L ) { lua_pushboolean(L, p->OnePassed()); return 1; }
|
||||
static int AllFailed( T* p, lua_State *L ) { lua_pushboolean(L, p->AllFailed()); return 1; }
|
||||
|
||||
|
||||
+10
-10
@@ -26,20 +26,20 @@ public:
|
||||
|
||||
int GetAverageMeter( PlayerNumber pn ) const;
|
||||
|
||||
PlayMode playMode;
|
||||
const Style* pStyle;
|
||||
vector<Song*> vpPlayedSongs;
|
||||
vector<Song*> vpPossibleSongs;
|
||||
enum { Stage_Invalid, STAGE_NORMAL, STAGE_EXTRA, STAGE_EXTRA2 } StageType;
|
||||
PlayMode m_playMode;
|
||||
const Style* m_pStyle;
|
||||
vector<Song*> m_vpPlayedSongs;
|
||||
vector<Song*> m_vpPossibleSongs;
|
||||
enum { Stage_Invalid, STAGE_NORMAL, STAGE_EXTRA, STAGE_EXTRA2 } m_StageType;
|
||||
|
||||
bool bGaveUp; // exited gameplay by giving up
|
||||
bool bUsedAutoplay; // used autoplay at any point during gameplay
|
||||
bool m_bGaveUp; // exited gameplay by giving up
|
||||
bool m_bUsedAutoplay; // used autoplay at any point during gameplay
|
||||
|
||||
// TODO: These are updated in ScreenGameplay::Update based on fDelta.
|
||||
// They should be made more accurate.
|
||||
float fGameplaySeconds; // how many seconds before gameplay ended. Updated by Gameplay, not scaled by music rate.
|
||||
float fStepsSeconds; // this is <= fGameplaySeconds unless the song has steps past the end
|
||||
float fMusicRate;
|
||||
float m_fGameplaySeconds; // how many seconds before gameplay ended. Updated by Gameplay, not scaled by music rate.
|
||||
float m_fStepsSeconds; // this is <= fGameplaySeconds unless the song has steps past the end
|
||||
float m_fMusicRate;
|
||||
|
||||
// Total number of seconds between first beat and last beat for every song.
|
||||
float GetTotalPossibleStepsSeconds() const;
|
||||
|
||||
@@ -45,14 +45,14 @@ static StageStats AccumPlayedStageStats( const vector<StageStats>& vss )
|
||||
|
||||
if( !vss.empty() )
|
||||
{
|
||||
ssreturn.pStyle = vss[0].pStyle;
|
||||
ssreturn.playMode = vss[0].playMode;
|
||||
ssreturn.m_pStyle = vss[0].m_pStyle;
|
||||
ssreturn.m_playMode = vss[0].m_playMode;
|
||||
}
|
||||
|
||||
FOREACH_CONST( StageStats, vss, ss )
|
||||
ssreturn.AddStats( *ss );
|
||||
|
||||
unsigned uNumSongs = ssreturn.vpPlayedSongs.size();
|
||||
unsigned uNumSongs = ssreturn.m_vpPlayedSongs.size();
|
||||
|
||||
if( uNumSongs == 0 )
|
||||
return ssreturn; // don't divide by 0 below
|
||||
@@ -65,16 +65,16 @@ static StageStats AccumPlayedStageStats( const vector<StageStats>& vss )
|
||||
{
|
||||
for( int r = 0; r < RadarCategory_TapsAndHolds; r++)
|
||||
{
|
||||
ssreturn.m_player[p].radarPossible[r] /= uNumSongs;
|
||||
ssreturn.m_player[p].radarActual[r] /= uNumSongs;
|
||||
ssreturn.m_player[p].m_radarPossible[r] /= uNumSongs;
|
||||
ssreturn.m_player[p].m_radarActual[r] /= uNumSongs;
|
||||
}
|
||||
}
|
||||
FOREACH_EnabledMultiPlayer( p )
|
||||
{
|
||||
for( int r = 0; r < RadarCategory_TapsAndHolds; r++)
|
||||
{
|
||||
ssreturn.m_multiPlayer[p].radarPossible[r] /= uNumSongs;
|
||||
ssreturn.m_multiPlayer[p].radarActual[r] /= uNumSongs;
|
||||
ssreturn.m_multiPlayer[p].m_radarPossible[r] /= uNumSongs;
|
||||
ssreturn.m_multiPlayer[p].m_radarActual[r] /= uNumSongs;
|
||||
}
|
||||
}
|
||||
return ssreturn;
|
||||
@@ -95,7 +95,7 @@ void StatsManager::GetFinalEvalStageStats( StageStats& statsOut ) const
|
||||
if( !ss.OnePassed() )
|
||||
continue;
|
||||
|
||||
if( ss.StageType == StageStats::STAGE_NORMAL )
|
||||
if( ss.m_StageType == StageStats::STAGE_NORMAL )
|
||||
{
|
||||
if( PassedRegularSongsLeft == 0 )
|
||||
break;
|
||||
@@ -122,14 +122,14 @@ void AddPlayerStatsToProfile( Profile *pProfile, const StageStats &ss, PlayerNum
|
||||
CHECKPOINT;
|
||||
|
||||
StyleID sID;
|
||||
sID.FromStyle( ss.pStyle );
|
||||
sID.FromStyle( ss.m_pStyle );
|
||||
|
||||
ASSERT( ss.vpPlayedSongs.size() == ss.m_player[pn].vpPlayedSteps.size() );
|
||||
for( unsigned i=0; i<ss.vpPlayedSongs.size(); i++ )
|
||||
ASSERT( ss.m_vpPlayedSongs.size() == ss.m_player[pn].m_vpPlayedSteps.size() );
|
||||
for( unsigned i=0; i<ss.m_vpPlayedSongs.size(); i++ )
|
||||
{
|
||||
Steps *pSteps = ss.m_player[pn].vpPlayedSteps[i];
|
||||
Steps *pSteps = ss.m_player[pn].m_vpPlayedSteps[i];
|
||||
|
||||
pProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
|
||||
pProfile->m_iNumSongsPlayedByPlayMode[ss.m_playMode]++;
|
||||
pProfile->m_iNumSongsPlayedByStyle[sID] ++;
|
||||
pProfile->m_iNumSongsPlayedByDifficulty[pSteps->GetDifficulty()] ++;
|
||||
|
||||
@@ -137,11 +137,11 @@ void AddPlayerStatsToProfile( Profile *pProfile, const StageStats &ss, PlayerNum
|
||||
pProfile->m_iNumSongsPlayedByMeter[iMeter] ++;
|
||||
}
|
||||
|
||||
pProfile->m_iTotalDancePoints += ss.m_player[pn].iActualDancePoints;
|
||||
pProfile->m_iTotalDancePoints += ss.m_player[pn].m_iActualDancePoints;
|
||||
|
||||
if( ss.StageType == StageStats::STAGE_EXTRA || ss.StageType == StageStats::STAGE_EXTRA2 )
|
||||
if( ss.m_StageType == StageStats::STAGE_EXTRA || ss.m_StageType == StageStats::STAGE_EXTRA2 )
|
||||
{
|
||||
if( ss.m_player[pn].bFailed )
|
||||
if( ss.m_player[pn].m_bFailed )
|
||||
++pProfile->m_iNumExtraStagesFailed;
|
||||
else
|
||||
++pProfile->m_iNumExtraStagesPassed;
|
||||
@@ -149,9 +149,9 @@ void AddPlayerStatsToProfile( Profile *pProfile, const StageStats &ss, PlayerNum
|
||||
|
||||
// If you fail in a course, you passed all but the final song.
|
||||
// FIXME: Not true. If playing with 2 players, one player could have failed earlier.
|
||||
if( !ss.m_player[pn].bFailed )
|
||||
if( !ss.m_player[pn].m_bFailed )
|
||||
{
|
||||
pProfile->m_iNumStagesPassedByPlayMode[ss.playMode] ++;
|
||||
pProfile->m_iNumStagesPassedByPlayMode[ss.m_playMode] ++;
|
||||
pProfile->m_iNumStagesPassedByGrade[ss.m_player[pn].GetGrade()] ++;
|
||||
}
|
||||
}
|
||||
@@ -166,24 +166,24 @@ void StatsManager::CommitStatsToProfiles()
|
||||
//
|
||||
FOREACH_HumanPlayer( pn )
|
||||
{
|
||||
int iNumTapsAndHolds = (int) m_CurStageStats.m_player[pn].radarActual[RadarCategory_TapsAndHolds];
|
||||
int iNumJumps = (int) m_CurStageStats.m_player[pn].radarActual[RadarCategory_Jumps];
|
||||
int iNumHolds = (int) m_CurStageStats.m_player[pn].radarActual[RadarCategory_Holds];
|
||||
int iNumRolls = (int) m_CurStageStats.m_player[pn].radarActual[RadarCategory_Rolls];
|
||||
int iNumMines = (int) m_CurStageStats.m_player[pn].radarActual[RadarCategory_Mines];
|
||||
int iNumHands = (int) m_CurStageStats.m_player[pn].radarActual[RadarCategory_Hands];
|
||||
float fCaloriesBurned = m_CurStageStats.m_player[pn].fCaloriesBurned;
|
||||
int iNumTapsAndHolds = (int) m_CurStageStats.m_player[pn].m_radarActual[RadarCategory_TapsAndHolds];
|
||||
int iNumJumps = (int) m_CurStageStats.m_player[pn].m_radarActual[RadarCategory_Jumps];
|
||||
int iNumHolds = (int) m_CurStageStats.m_player[pn].m_radarActual[RadarCategory_Holds];
|
||||
int iNumRolls = (int) m_CurStageStats.m_player[pn].m_radarActual[RadarCategory_Rolls];
|
||||
int iNumMines = (int) m_CurStageStats.m_player[pn].m_radarActual[RadarCategory_Mines];
|
||||
int iNumHands = (int) m_CurStageStats.m_player[pn].m_radarActual[RadarCategory_Hands];
|
||||
float fCaloriesBurned = m_CurStageStats.m_player[pn].m_fCaloriesBurned;
|
||||
PROFILEMAN->AddStepTotals( pn, iNumTapsAndHolds, iNumJumps, iNumHolds, iNumRolls, iNumMines, iNumHands, fCaloriesBurned );
|
||||
}
|
||||
|
||||
// Update profile stats
|
||||
Profile* pMachineProfile = PROFILEMAN->GetMachineProfile();
|
||||
|
||||
int iGameplaySeconds = (int)truncf(m_CurStageStats.fGameplaySeconds);
|
||||
int iGameplaySeconds = (int)truncf(m_CurStageStats.m_fGameplaySeconds);
|
||||
|
||||
pMachineProfile->m_iTotalGameplaySeconds += iGameplaySeconds;
|
||||
pMachineProfile->m_iCurrentCombo = 0;
|
||||
pMachineProfile->m_iNumTotalSongsPlayed += m_CurStageStats.vpPlayedSongs.size();
|
||||
pMachineProfile->m_iNumTotalSongsPlayed += m_CurStageStats.m_vpPlayedSongs.size();
|
||||
|
||||
CHECKPOINT;
|
||||
FOREACH_HumanPlayer( pn )
|
||||
@@ -196,9 +196,9 @@ void StatsManager::CommitStatsToProfiles()
|
||||
pPlayerProfile->m_iTotalGameplaySeconds += iGameplaySeconds;
|
||||
pPlayerProfile->m_iCurrentCombo =
|
||||
PREFSMAN->m_bComboContinuesBetweenSongs ?
|
||||
m_CurStageStats.m_player[pn].iCurCombo :
|
||||
m_CurStageStats.m_player[pn].m_iCurCombo :
|
||||
0;
|
||||
pPlayerProfile->m_iNumTotalSongsPlayed += m_CurStageStats.vpPlayedSongs.size();
|
||||
pPlayerProfile->m_iNumTotalSongsPlayed += m_CurStageStats.m_vpPlayedSongs.size();
|
||||
}
|
||||
|
||||
AddPlayerStatsToProfile( pMachineProfile, m_CurStageStats, pn );
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
bool bPlayerFailedOneStage = false;
|
||||
FOREACH_CONST( StageStats, STATSMAN->m_vPlayedStageStats, ss )
|
||||
{
|
||||
if( ss->m_player[p].bFailed )
|
||||
if( ss->m_player[p].m_bFailed )
|
||||
{
|
||||
bPlayerFailedOneStage = true;
|
||||
break;
|
||||
|
||||
@@ -43,7 +43,7 @@ void WorkoutGraph::LoadFromNode( const XNode* pNode )
|
||||
|
||||
void WorkoutGraph::SetFromGameState()
|
||||
{
|
||||
SetFromGameStateInternal( STATSMAN->m_CurStageStats.vpPlayedSongs.size() );
|
||||
SetFromGameStateInternal( STATSMAN->m_CurStageStats.m_vpPlayedSongs.size() );
|
||||
}
|
||||
|
||||
void WorkoutGraph::SetFromGameStateInternal( int iNumSongsToShowForCurrentStage )
|
||||
@@ -56,7 +56,7 @@ void WorkoutGraph::SetFromGameStateInternal( int iNumSongsToShowForCurrentStage
|
||||
m_vpBars.clear();
|
||||
|
||||
int iTotalSongsPlayed =
|
||||
STATSMAN->GetAccumPlayedStageStats().vpPlayedSongs.size() +
|
||||
STATSMAN->GetAccumPlayedStageStats().m_vpPlayedSongs.size() +
|
||||
iNumSongsToShowForCurrentStage;
|
||||
int iWorkoutEstimatedSongs = WORKOUTMAN->m_pCurWorkout->GetEstimatedNumSongs();
|
||||
int iNumSongsToShow = max( iTotalSongsPlayed, iWorkoutEstimatedSongs );
|
||||
|
||||
Reference in New Issue
Block a user