if using a handicap option, don't add a high score and show "disqualify" on the eval screen
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
_blank
|
||||||
@@ -1149,6 +1149,15 @@ PassedSoundTime=0
|
|||||||
NumSequenceSounds=0
|
NumSequenceSounds=0
|
||||||
PeakComboAwardCommand=
|
PeakComboAwardCommand=
|
||||||
|
|
||||||
|
DisqualifiedP1X=0
|
||||||
|
DisqualifiedP1Y=0
|
||||||
|
DisqualifiedP1OffCommand=
|
||||||
|
DisqualifiedP1OnCommand=
|
||||||
|
DisqualifiedP2X=0
|
||||||
|
DisqualifiedP2Y=0
|
||||||
|
DisqualifiedP2OffCommand=
|
||||||
|
DisqualifiedP2OnCommand=
|
||||||
|
|
||||||
[ScreenEvaluationStage]
|
[ScreenEvaluationStage]
|
||||||
Fallback=ScreenEvaluation
|
Fallback=ScreenEvaluation
|
||||||
NextScreen=ScreenSelectMusic
|
NextScreen=ScreenSelectMusic
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ inline void UtilSetXYAndOnCommand( Actor& actor, CString sClassName )
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* convenience */
|
/* convenience */
|
||||||
inline void UtilCommand( Actor* pActor, CString sClassName, CString sCommandName ) { UtilCommand( *pActor, sClassName, sCommandName ); }
|
inline void UtilCommand( Actor* pActor, CString sClassName, CString sCommandName ) { if(pActor) UtilCommand( *pActor, sClassName, sCommandName ); }
|
||||||
inline void UtilOnCommand( Actor* pActor, CString sClassName ) { UtilOnCommand( *pActor, sClassName ); }
|
inline void UtilOnCommand( Actor* pActor, CString sClassName ) { if(pActor) UtilOnCommand( *pActor, sClassName ); }
|
||||||
inline void UtilOffCommand( Actor* pActor, CString sClassName ) { UtilOffCommand( *pActor, sClassName ); }
|
inline void UtilOffCommand( Actor* pActor, CString sClassName ) { if(pActor) UtilOffCommand( *pActor, sClassName ); }
|
||||||
inline void UtilSetXYAndOnCommand( Actor* pActor, CString sClassName ) { UtilSetXYAndOnCommand( *pActor, sClassName ); }
|
inline void UtilSetXYAndOnCommand( Actor* pActor, CString sClassName ) { if(pActor) UtilSetXYAndOnCommand( *pActor, sClassName ); }
|
||||||
|
|
||||||
// Return a Sprite, BitmapText, or Model depending on the file type
|
// Return a Sprite, BitmapText, or Model depending on the file type
|
||||||
Actor* LoadFromActorFile( CString sIniPath, CString sLayer = "Actor" );
|
Actor* LoadFromActorFile( CString sIniPath, CString sLayer = "Actor" );
|
||||||
|
|||||||
@@ -829,6 +829,14 @@ void GameState::RestoreSelectedOptions()
|
|||||||
m_SongOptions = m_StoredSongOptions;
|
m_SongOptions = m_StoredSongOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GameState::IsDisqualified( PlayerNumber pn )
|
||||||
|
{
|
||||||
|
if( GAMESTATE->IsCourseMode() )
|
||||||
|
return GAMESTATE->m_PlayerOptions[pn].IsHandicapForCourse( GAMESTATE->m_pCurCourse );
|
||||||
|
else
|
||||||
|
return GAMESTATE->m_PlayerOptions[pn].IsHandicapForSong( GAMESTATE->m_pCurSong );
|
||||||
|
}
|
||||||
|
|
||||||
void GameState::ResetNoteSkins()
|
void GameState::ResetNoteSkins()
|
||||||
{
|
{
|
||||||
for( int pn = 0; pn < NUM_PLAYERS; ++pn )
|
for( int pn = 0; pn < NUM_PLAYERS; ++pn )
|
||||||
|
|||||||
@@ -211,6 +211,8 @@ public:
|
|||||||
void StoreSelectedOptions();
|
void StoreSelectedOptions();
|
||||||
void RestoreSelectedOptions();
|
void RestoreSelectedOptions();
|
||||||
|
|
||||||
|
bool IsDisqualified( PlayerNumber pn );
|
||||||
|
|
||||||
void AdjustFailType();
|
void AdjustFailType();
|
||||||
|
|
||||||
// character stuff
|
// character stuff
|
||||||
|
|||||||
@@ -319,6 +319,14 @@ void ScreenEvaluation::Init()
|
|||||||
SET_XY_AND_ON_COMMAND( m_textPlayerOptions[p] );
|
SET_XY_AND_ON_COMMAND( m_textPlayerOptions[p] );
|
||||||
m_textPlayerOptions[p].SetText( sPO );
|
m_textPlayerOptions[p].SetText( sPO );
|
||||||
this->AddChild( &m_textPlayerOptions[p] );
|
this->AddChild( &m_textPlayerOptions[p] );
|
||||||
|
|
||||||
|
if( GAMESTATE->IsDisqualified((PlayerNumber)p) )
|
||||||
|
{
|
||||||
|
m_sprDisqualified[p].Load( THEME->GetPathToG("ScreenEvaluation disqualified") );
|
||||||
|
m_sprDisqualified[p]->SetName( ssprintf("DisqualifiedP%d",p+1) );
|
||||||
|
SET_XY_AND_ON_COMMAND( m_sprDisqualified[p] );
|
||||||
|
this->AddChild( m_sprDisqualified[p] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -840,6 +848,10 @@ void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonal
|
|||||||
if( !GAMESTATE->IsHumanPlayer(p) )
|
if( !GAMESTATE->IsHumanPlayer(p) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// don't save scores if the player is disqualified
|
||||||
|
if( GAMESTATE->IsDisqualified((PlayerNumber)p) )
|
||||||
|
continue;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add step totals
|
// Add step totals
|
||||||
//
|
//
|
||||||
@@ -877,68 +889,6 @@ void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonal
|
|||||||
|
|
||||||
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForHighScore )
|
if( hs.fPercentDP >= PREFSMAN->m_fMinPercentageForHighScore )
|
||||||
PROFILEMAN->AddStepsHighScore( GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
PROFILEMAN->AddStepsHighScore( GAMESTATE->m_pCurNotes[p], (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
||||||
|
|
||||||
if( PROFILEMAN->IsUsingProfile((PlayerNumber)p) )
|
|
||||||
{
|
|
||||||
// check for awards
|
|
||||||
Profile* pProfile = PROFILEMAN->GetProfile((PlayerNumber)p);
|
|
||||||
|
|
||||||
if( stageStats.FullComboOfScore( (PlayerNumber)p, TNS_GREAT ) )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_FULL_COMBO_GREATS );
|
|
||||||
if( stageStats.FullComboOfScore( (PlayerNumber)p, TNS_PERFECT ) )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_FULL_COMBO_PERFECTS );
|
|
||||||
if( stageStats.FullComboOfScore( (PlayerNumber)p, TNS_MARVELOUS ) )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_FULL_COMBO_MARVELOUSES );
|
|
||||||
|
|
||||||
if( stageStats.SingleDigitsOfScore( (PlayerNumber)p, TNS_GREAT ) )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_SINGLE_DIGIT_GREATS );
|
|
||||||
if( stageStats.SingleDigitsOfScore( (PlayerNumber)p, TNS_PERFECT ) )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_SINGLE_DIGIT_PERFECTS );
|
|
||||||
|
|
||||||
float fPercentGreats = stageStats.GetPercentageOfTaps((PlayerNumber)p, TNS_GREAT);
|
|
||||||
if( fPercentGreats >= 0.8f )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_GREATS_80_PERCENT );
|
|
||||||
if( fPercentGreats >= 0.9f )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_GREATS_90_PERCENT );
|
|
||||||
if( fPercentGreats >= 1.f )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_GREATS_100_PERCENT );
|
|
||||||
|
|
||||||
int iComboAtStartOfStage = stageStats.GetComboAtStartOfStage( (PlayerNumber)p );
|
|
||||||
int iPeakCombo = stageStats.GetMaxCombo((PlayerNumber)p).cnt;
|
|
||||||
|
|
||||||
FOREACH_PeakComboAward( pca )
|
|
||||||
{
|
|
||||||
int iLevel = 100/*0*/ * (pca+1);
|
|
||||||
bool bCrossedLevel = iComboAtStartOfStage < iLevel && iPeakCombo >= iLevel;
|
|
||||||
if( bCrossedLevel )
|
|
||||||
{
|
|
||||||
GAMESTATE->m_vLastPeakComboAwards[p].push_back( pca );
|
|
||||||
m_textJudgeNumbers[max_combo][p].Command( PEAK_COMBO_AWARD_COMMAND );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- )
|
|
||||||
{
|
|
||||||
PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p][i];
|
|
||||||
Steps* pSteps = stageStats.pSteps[p];
|
|
||||||
bool bAlreadyHad = pProfile->HasPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
|
|
||||||
pProfile->AddPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
|
|
||||||
if( bAlreadyHad )
|
|
||||||
GAMESTATE->m_vLastPerDifficultyAwards[p].erase( GAMESTATE->m_vLastPerDifficultyAwards[p].begin()+i );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- )
|
|
||||||
{
|
|
||||||
PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p][i];
|
|
||||||
bool bAlreadyHad = pProfile->HasPeakComboAward( pca );
|
|
||||||
pProfile->AddPeakComboAward( pca );
|
|
||||||
if( bAlreadyHad )
|
|
||||||
GAMESTATE->m_vLastPeakComboAwards[p].erase( GAMESTATE->m_vLastPeakComboAwards[p].begin()+i );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -963,8 +913,8 @@ void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonal
|
|||||||
{
|
{
|
||||||
Course* pCourse = GAMESTATE->m_pCurCourse;
|
Course* pCourse = GAMESTATE->m_pCurCourse;
|
||||||
CourseDifficulty cd = GAMESTATE->m_CourseDifficulty[p];
|
CourseDifficulty cd = GAMESTATE->m_CourseDifficulty[p];
|
||||||
if( pCourse )
|
ASSERT( pCourse );
|
||||||
{
|
|
||||||
// don't save scores for a failed Nonstop
|
// don't save scores for a failed Nonstop
|
||||||
// DO save scores for a failed Oni/Endless
|
// DO save scores for a failed Oni/Endless
|
||||||
if( stageStats.bFailed[p] && pCourse->IsNonstop() )
|
if( stageStats.bFailed[p] && pCourse->IsNonstop() )
|
||||||
@@ -973,13 +923,13 @@ void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonal
|
|||||||
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
|
if( hs.fPercentDP > PREFSMAN->m_fMinPercentageForHighScore )
|
||||||
PROFILEMAN->AddCourseHighScore( pCourse, nt, cd, (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
PROFILEMAN->AddCourseHighScore( pCourse, nt, cd, (PlayerNumber)p, hs, iPersonalHighScoreIndex[p], iMachineHighScoreIndex[p] );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If both players get a machine high score, a player whose score is added later
|
// If both players get a machine high score, a player whose score is added later
|
||||||
// may bump the players who were added earlier. Adjust for this.
|
// may bump the players who were added earlier. Adjust for this.
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
@@ -1020,6 +970,91 @@ void ScreenEvaluation::CommitScores( const StageStats &stageStats, int iPersonal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// hand out awards
|
||||||
|
//
|
||||||
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
{
|
||||||
|
if( !GAMESTATE->IsHumanPlayer(p) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// must be using a profile to receive awards
|
||||||
|
if( !PROFILEMAN->IsUsingProfile((PlayerNumber)p) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Profile* pProfile = PROFILEMAN->GetProfile((PlayerNumber)p);
|
||||||
|
|
||||||
|
|
||||||
|
// per-difficulty awards
|
||||||
|
switch( m_Type )
|
||||||
|
{
|
||||||
|
case stage:
|
||||||
|
// don't give per-difficutly awards if using easy mods
|
||||||
|
if( !GAMESTATE->IsDisqualified((PlayerNumber)p) )
|
||||||
|
{
|
||||||
|
if( stageStats.FullComboOfScore( (PlayerNumber)p, TNS_GREAT ) )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_FULL_COMBO_GREATS );
|
||||||
|
if( stageStats.FullComboOfScore( (PlayerNumber)p, TNS_PERFECT ) )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_FULL_COMBO_PERFECTS );
|
||||||
|
if( stageStats.FullComboOfScore( (PlayerNumber)p, TNS_MARVELOUS ) )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_FULL_COMBO_MARVELOUSES );
|
||||||
|
|
||||||
|
if( stageStats.SingleDigitsOfScore( (PlayerNumber)p, TNS_GREAT ) )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_SINGLE_DIGIT_GREATS );
|
||||||
|
if( stageStats.SingleDigitsOfScore( (PlayerNumber)p, TNS_PERFECT ) )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_SINGLE_DIGIT_PERFECTS );
|
||||||
|
|
||||||
|
float fPercentGreats = stageStats.GetPercentageOfTaps((PlayerNumber)p, TNS_GREAT);
|
||||||
|
if( fPercentGreats >= 0.8f )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_GREATS_80_PERCENT );
|
||||||
|
if( fPercentGreats >= 0.9f )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_GREATS_90_PERCENT );
|
||||||
|
if( fPercentGreats >= 1.f )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].push_back( AWARD_GREATS_100_PERCENT );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DO give peak combo awards if using easy mods
|
||||||
|
int iComboAtStartOfStage = stageStats.GetComboAtStartOfStage( (PlayerNumber)p );
|
||||||
|
int iPeakCombo = stageStats.GetMaxCombo((PlayerNumber)p).cnt;
|
||||||
|
|
||||||
|
FOREACH_PeakComboAward( pca )
|
||||||
|
{
|
||||||
|
int iLevel = 100/*0*/ * (pca+1);
|
||||||
|
bool bCrossedLevel = iComboAtStartOfStage < iLevel && iPeakCombo >= iLevel;
|
||||||
|
if( bCrossedLevel )
|
||||||
|
{
|
||||||
|
GAMESTATE->m_vLastPeakComboAwards[p].push_back( pca );
|
||||||
|
m_textJudgeNumbers[max_combo][p].Command( PEAK_COMBO_AWARD_COMMAND );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// erase awards from the Last list that have been received so that we
|
||||||
|
// won't show them again.
|
||||||
|
{
|
||||||
|
for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- )
|
||||||
|
{
|
||||||
|
PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p][i];
|
||||||
|
Steps* pSteps = stageStats.pSteps[p];
|
||||||
|
bool bAlreadyHad = pProfile->HasPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
|
||||||
|
pProfile->AddPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
|
||||||
|
if( bAlreadyHad )
|
||||||
|
GAMESTATE->m_vLastPerDifficultyAwards[p].erase( GAMESTATE->m_vLastPerDifficultyAwards[p].begin()+i );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- )
|
||||||
|
{
|
||||||
|
PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p][i];
|
||||||
|
bool bAlreadyHad = pProfile->HasPeakComboAward( pca );
|
||||||
|
pProfile->AddPeakComboAward( pca );
|
||||||
|
if( bAlreadyHad )
|
||||||
|
GAMESTATE->m_vLastPeakComboAwards[p].erase( GAMESTATE->m_vLastPeakComboAwards[p].begin()+i );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1037,6 +1072,7 @@ void ScreenEvaluation::TweenOffScreen()
|
|||||||
continue;
|
continue;
|
||||||
OFF_COMMAND( m_DifficultyIcon[p] );
|
OFF_COMMAND( m_DifficultyIcon[p] );
|
||||||
OFF_COMMAND( m_textPlayerOptions[p] );
|
OFF_COMMAND( m_textPlayerOptions[p] );
|
||||||
|
OFF_COMMAND( m_sprDisqualified[p] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// small banner area
|
// small banner area
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ protected:
|
|||||||
Sprite m_sprStage;
|
Sprite m_sprStage;
|
||||||
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
||||||
BitmapText m_textPlayerOptions[NUM_PLAYERS];
|
BitmapText m_textPlayerOptions[NUM_PLAYERS];
|
||||||
|
AutoActor m_sprDisqualified[NUM_PLAYERS];
|
||||||
Banner m_SmallBanner[MAX_SONGS_TO_SHOW];
|
Banner m_SmallBanner[MAX_SONGS_TO_SHOW];
|
||||||
Sprite m_sprSmallBannerFrame[MAX_SONGS_TO_SHOW];
|
Sprite m_sprSmallBannerFrame[MAX_SONGS_TO_SHOW];
|
||||||
|
|
||||||
|
|||||||
@@ -188,9 +188,7 @@ void ScreenPlayerOptions::UpdateDisqualified()
|
|||||||
{
|
{
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
bool bIsHandicap = GAMESTATE->IsCourseMode() ?
|
bool bIsHandicap = GAMESTATE->IsDisqualified((PlayerNumber)p);
|
||||||
GAMESTATE->m_PlayerOptions[p].IsHandicapForCourse( GAMESTATE->m_pCurCourse ) :
|
|
||||||
GAMESTATE->m_PlayerOptions[p].IsHandicapForSong( GAMESTATE->m_pCurSong );
|
|
||||||
|
|
||||||
m_sprDisqualify[p]->SetHidden( !bIsHandicap );
|
m_sprDisqualify[p]->SetHidden( !bIsHandicap );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user