move awards to ScreenEvaluation
This commit is contained in:
@@ -1218,7 +1218,6 @@ Class=ScreenEvaluation
|
|||||||
FailedSoundTime=0
|
FailedSoundTime=0
|
||||||
PassedSoundTime=0
|
PassedSoundTime=0
|
||||||
NumSequenceSounds=0
|
NumSequenceSounds=0
|
||||||
PeakComboAwardCommand=
|
|
||||||
|
|
||||||
PlayerNameP1X=
|
PlayerNameP1X=
|
||||||
PlayerNameP1Y=
|
PlayerNameP1Y=
|
||||||
@@ -1289,6 +1288,7 @@ ShowTimeArea=0
|
|||||||
ShowGraphArea=0
|
ShowGraphArea=0
|
||||||
ShowComboArea=0
|
ShowComboArea=0
|
||||||
ShowPerDifficultyAward=0
|
ShowPerDifficultyAward=0
|
||||||
|
ShowPeakComboAward=0
|
||||||
TimerSeconds=15
|
TimerSeconds=15
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
MemoryCardIcons=1
|
MemoryCardIcons=1
|
||||||
@@ -1602,6 +1602,7 @@ ShowTimeArea=0
|
|||||||
ShowGraphArea=0
|
ShowGraphArea=0
|
||||||
ShowComboArea=0
|
ShowComboArea=0
|
||||||
ShowPerDifficultyAward=0
|
ShowPerDifficultyAward=0
|
||||||
|
ShowPeakComboAward=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
MemoryCardIcons=1
|
MemoryCardIcons=1
|
||||||
@@ -1908,6 +1909,7 @@ ShowTimeArea=0
|
|||||||
ShowGraphArea=0
|
ShowGraphArea=0
|
||||||
ShowComboArea=0
|
ShowComboArea=0
|
||||||
ShowPerDifficultyAward=0
|
ShowPerDifficultyAward=0
|
||||||
|
ShowPeakComboAward=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
ShowTotalScoreArea=0
|
ShowTotalScoreArea=0
|
||||||
@@ -2122,6 +2124,7 @@ ShowTimeArea=1
|
|||||||
ShowGraphArea=0
|
ShowGraphArea=0
|
||||||
ShowComboArea=0
|
ShowComboArea=0
|
||||||
ShowPerDifficultyAward=0
|
ShowPerDifficultyAward=0
|
||||||
|
ShowPeakComboAward=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
ShowTotalScoreArea=0
|
ShowTotalScoreArea=0
|
||||||
@@ -2335,6 +2338,7 @@ ShowTimeArea=1
|
|||||||
ShowGraphArea=0
|
ShowGraphArea=0
|
||||||
ShowComboArea=0
|
ShowComboArea=0
|
||||||
ShowPerDifficultyAward=0
|
ShowPerDifficultyAward=0
|
||||||
|
ShowPeakComboAward=0
|
||||||
TimerSeconds=30
|
TimerSeconds=30
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
ShowTotalScoreArea=0
|
ShowTotalScoreArea=0
|
||||||
@@ -2560,6 +2564,7 @@ ShowTimeArea=0
|
|||||||
ShowGraphArea=0
|
ShowGraphArea=0
|
||||||
ShowComboArea=0
|
ShowComboArea=0
|
||||||
ShowPerDifficultyAward=0
|
ShowPerDifficultyAward=0
|
||||||
|
ShowPeakComboAward=0
|
||||||
TimerSeconds=15
|
TimerSeconds=15
|
||||||
StyleIcon=1
|
StyleIcon=1
|
||||||
ShowTotalScoreArea=0
|
ShowTotalScoreArea=0
|
||||||
|
|||||||
@@ -121,12 +121,12 @@ XToString( MemoryCardState );
|
|||||||
|
|
||||||
static const CString PerDifficultyAwardNames[NUM_PER_DIFFICULTY_AWARDS] = {
|
static const CString PerDifficultyAwardNames[NUM_PER_DIFFICULTY_AWARDS] = {
|
||||||
"FullComboGreats",
|
"FullComboGreats",
|
||||||
"FullComboPerfects",
|
|
||||||
"FullComboMarvelouses",
|
|
||||||
"SingleDigitGreats",
|
"SingleDigitGreats",
|
||||||
"SingleDigitPerfects",
|
|
||||||
"OneGreat",
|
"OneGreat",
|
||||||
|
"FullComboPerfects",
|
||||||
|
"SingleDigitPerfects",
|
||||||
"OnePerfect",
|
"OnePerfect",
|
||||||
|
"FullComboMarvelouses",
|
||||||
"Greats80Percent",
|
"Greats80Percent",
|
||||||
"Greats90Percent",
|
"Greats90Percent",
|
||||||
"Greats100Percent",
|
"Greats100Percent",
|
||||||
|
|||||||
@@ -311,12 +311,12 @@ const CString& CoinModeToString( CoinMode cm );
|
|||||||
enum PerDifficultyAward
|
enum PerDifficultyAward
|
||||||
{
|
{
|
||||||
AWARD_FULL_COMBO_GREATS,
|
AWARD_FULL_COMBO_GREATS,
|
||||||
AWARD_FULL_COMBO_PERFECTS,
|
|
||||||
AWARD_FULL_COMBO_MARVELOUSES,
|
|
||||||
AWARD_SINGLE_DIGIT_GREATS,
|
AWARD_SINGLE_DIGIT_GREATS,
|
||||||
AWARD_SINGLE_DIGIT_PERFECTS,
|
|
||||||
AWARD_ONE_GREAT,
|
AWARD_ONE_GREAT,
|
||||||
|
AWARD_FULL_COMBO_PERFECTS,
|
||||||
|
AWARD_SINGLE_DIGIT_PERFECTS,
|
||||||
AWARD_ONE_PERFECT,
|
AWARD_ONE_PERFECT,
|
||||||
|
AWARD_FULL_COMBO_MARVELOUSES,
|
||||||
AWARD_GREATS_80_PERCENT,
|
AWARD_GREATS_80_PERCENT,
|
||||||
AWARD_GREATS_90_PERCENT,
|
AWARD_GREATS_90_PERCENT,
|
||||||
AWARD_GREATS_100_PERCENT,
|
AWARD_GREATS_100_PERCENT,
|
||||||
|
|||||||
@@ -1783,6 +1783,7 @@ bool PlayerIsUsingModifier( PlayerNumber pn, const CString sModifier )
|
|||||||
#include "LuaFunctions.h"
|
#include "LuaFunctions.h"
|
||||||
LuaFunction_PlayerNumber( IsPlayerEnabled, GAMESTATE->IsPlayerEnabled(pn) )
|
LuaFunction_PlayerNumber( IsPlayerEnabled, GAMESTATE->IsPlayerEnabled(pn) )
|
||||||
LuaFunction_PlayerNumber( IsHumanPlayer, GAMESTATE->IsHumanPlayer(pn) )
|
LuaFunction_PlayerNumber( IsHumanPlayer, GAMESTATE->IsHumanPlayer(pn) )
|
||||||
|
LuaFunction_PlayerNumber( IsPlayerUsingProfile, PROFILEMAN->IsUsingProfile(pn) )
|
||||||
LuaFunction_PlayerNumber( IsWinner, GAMESTATE->GetStageResult(pn)==RESULT_WIN )
|
LuaFunction_PlayerNumber( IsWinner, GAMESTATE->GetStageResult(pn)==RESULT_WIN )
|
||||||
LuaFunction_NoArgs( IsCourseMode, GAMESTATE->IsCourseMode() )
|
LuaFunction_NoArgs( IsCourseMode, GAMESTATE->IsCourseMode() )
|
||||||
LuaFunction_NoArgs( IsDemonstration, GAMESTATE->m_bDemonstrationOrJukebox )
|
LuaFunction_NoArgs( IsDemonstration, GAMESTATE->m_bDemonstrationOrJukebox )
|
||||||
|
|||||||
+32
-26
@@ -169,12 +169,30 @@ CString Profile::GetDisplayName() const
|
|||||||
return "NoName";
|
return "NoName";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CString FormatCalories( float fCals )
|
||||||
|
{
|
||||||
|
return Commify((int)fCals) + " Cal";
|
||||||
|
}
|
||||||
|
|
||||||
CString Profile::GetDisplayTotalCaloriesBurned() const
|
CString Profile::GetDisplayTotalCaloriesBurned() const
|
||||||
{
|
{
|
||||||
if( m_iWeightPounds == 0 ) // weight not entered
|
if( m_iWeightPounds == 0 ) // weight not entered
|
||||||
return "N/A";
|
return "N/A";
|
||||||
else
|
else
|
||||||
return Commify((int)m_fTotalCaloriesBurned) + " Cal";
|
return FormatCalories( m_fTotalCaloriesBurned );
|
||||||
|
}
|
||||||
|
|
||||||
|
CString Profile::GetDisplayTotalCaloriesBurnedToday() const
|
||||||
|
{
|
||||||
|
time_t now = time(NULL);
|
||||||
|
tm tNow;
|
||||||
|
localtime_r( &now, &tNow );
|
||||||
|
Day today = { tNow.tm_yday, tNow.tm_year+1900 };
|
||||||
|
float fCals = GetCaloriesBurnedForDay(today);
|
||||||
|
if( m_iWeightPounds == 0 ) // weight not entered
|
||||||
|
return "N/A";
|
||||||
|
else
|
||||||
|
return FormatCalories( m_fTotalCaloriesBurned );
|
||||||
}
|
}
|
||||||
|
|
||||||
int Profile::GetTotalNumSongsPlayed() const
|
int Profile::GetTotalNumSongsPlayed() const
|
||||||
@@ -193,12 +211,11 @@ int Profile::GetTotalNumSongsPassed() const
|
|||||||
return iTotal;
|
return iTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Profile::GetPossibleSongDancePointsForStepsType( StepsType st ) const
|
int Profile::GetPossibleSongDancePoints( StepsType st, Difficulty dc ) const
|
||||||
{
|
{
|
||||||
int iTotal = 0;
|
int iTotal = 0;
|
||||||
|
|
||||||
// add steps high scores
|
// add steps high scores
|
||||||
{
|
|
||||||
const vector<Song*> vSongs = SONGMAN->GetAllSongs();
|
const vector<Song*> vSongs = SONGMAN->GetAllSongs();
|
||||||
for( unsigned i=0; i<vSongs.size(); i++ )
|
for( unsigned i=0; i<vSongs.size(); i++ )
|
||||||
{
|
{
|
||||||
@@ -215,21 +232,22 @@ int Profile::GetPossibleSongDancePointsForStepsType( StepsType st ) const
|
|||||||
if( pSteps->m_StepsType != st )
|
if( pSteps->m_StepsType != st )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
|
if( pSteps->GetDifficulty() != dc )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
const RadarValues& fRadars = pSteps->GetRadarValues();
|
const RadarValues& fRadars = pSteps->GetRadarValues();
|
||||||
iTotal += ScoreKeeperMAX2::GetPossibleDancePoints( fRadars );
|
iTotal += ScoreKeeperMAX2::GetPossibleDancePoints( fRadars );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return iTotal;
|
return iTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Profile::GetActualSongDancePointsForStepsType( StepsType st ) const
|
int Profile::GetActualSongDancePoints( StepsType st, Difficulty dc ) const
|
||||||
{
|
{
|
||||||
int iTotal = 0;
|
int iTotal = 0;
|
||||||
|
|
||||||
// add steps high scores
|
// add steps high scores
|
||||||
{
|
|
||||||
for( std::map<SongID,HighScoresForASong>::const_iterator i = m_SongHighScores.begin();
|
for( std::map<SongID,HighScoresForASong>::const_iterator i = m_SongHighScores.begin();
|
||||||
i != m_SongHighScores.end();
|
i != m_SongHighScores.end();
|
||||||
++i )
|
++i )
|
||||||
@@ -262,6 +280,9 @@ int Profile::GetActualSongDancePointsForStepsType( StepsType st ) const
|
|||||||
if( pSteps->m_StepsType != st )
|
if( pSteps->m_StepsType != st )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if( pSteps->GetDifficulty() != dc )
|
||||||
|
continue; // skip
|
||||||
|
|
||||||
const HighScoresForASteps& h = j->second;
|
const HighScoresForASteps& h = j->second;
|
||||||
const HighScoreList& hs = h.hs;
|
const HighScoreList& hs = h.hs;
|
||||||
|
|
||||||
@@ -270,12 +291,11 @@ int Profile::GetActualSongDancePointsForStepsType( StepsType st ) const
|
|||||||
iTotal += (int)truncf( hs.GetTopScore().fPercentDP * iPossibleDP );
|
iTotal += (int)truncf( hs.GetTopScore().fPercentDP * iPossibleDP );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return iTotal;
|
return iTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Profile::GetPossibleCourseDancePointsForStepsType( StepsType st ) const
|
int Profile::GetPossibleCourseDancePoints( StepsType st, CourseDifficulty cd ) const
|
||||||
{
|
{
|
||||||
int iTotal = 0;
|
int iTotal = 0;
|
||||||
|
|
||||||
@@ -290,8 +310,6 @@ int Profile::GetPossibleCourseDancePointsForStepsType( StepsType st ) const
|
|||||||
if( !pCourse->AllSongsAreFixed() )
|
if( !pCourse->AllSongsAreFixed() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
FOREACH_ShownCourseDifficulty( cd )
|
|
||||||
{
|
|
||||||
Trail* pTrail = pCourse->GetTrail(st,cd);
|
Trail* pTrail = pCourse->GetTrail(st,cd);
|
||||||
if( pTrail == NULL )
|
if( pTrail == NULL )
|
||||||
continue;
|
continue;
|
||||||
@@ -299,17 +317,15 @@ int Profile::GetPossibleCourseDancePointsForStepsType( StepsType st ) const
|
|||||||
const RadarValues& fRadars = pTrail->GetRadarValues();
|
const RadarValues& fRadars = pTrail->GetRadarValues();
|
||||||
iTotal += ScoreKeeperMAX2::GetPossibleDancePoints( fRadars );
|
iTotal += ScoreKeeperMAX2::GetPossibleDancePoints( fRadars );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return iTotal;
|
return iTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Profile::GetActualCourseDancePointsForStepsType( StepsType st ) const
|
int Profile::GetActualCourseDancePoints( StepsType st, CourseDifficulty cd ) const
|
||||||
{
|
{
|
||||||
int iTotal = 0;
|
int iTotal = 0;
|
||||||
|
|
||||||
// add course high scores
|
// add course high scores
|
||||||
{
|
|
||||||
for( std::map<CourseID,HighScoresForACourse>::const_iterator i = m_CourseHighScores.begin();
|
for( std::map<CourseID,HighScoresForACourse>::const_iterator i = m_CourseHighScores.begin();
|
||||||
i != m_CourseHighScores.end();
|
i != m_CourseHighScores.end();
|
||||||
i++ )
|
i++ )
|
||||||
@@ -343,6 +359,9 @@ int Profile::GetActualCourseDancePointsForStepsType( StepsType st ) const
|
|||||||
if( pTrail->m_StepsType != st )
|
if( pTrail->m_StepsType != st )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if( pTrail->m_CourseDifficulty != cd )
|
||||||
|
continue;
|
||||||
|
|
||||||
const HighScoresForATrail& h = j->second;
|
const HighScoresForATrail& h = j->second;
|
||||||
const HighScoreList& hs = h.hs;
|
const HighScoreList& hs = h.hs;
|
||||||
|
|
||||||
@@ -351,23 +370,10 @@ int Profile::GetActualCourseDancePointsForStepsType( StepsType st ) const
|
|||||||
iTotal += (int)truncf( hs.GetTopScore().fPercentDP * iPossibleDP );
|
iTotal += (int)truncf( hs.GetTopScore().fPercentDP * iPossibleDP );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return iTotal;
|
return iTotal;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Profile::GetPercentCompleteForStepsType( StepsType st ) const
|
|
||||||
{
|
|
||||||
int iPossible =
|
|
||||||
GetPossibleSongDancePointsForStepsType( st ) +
|
|
||||||
GetPossibleCourseDancePointsForStepsType( st );
|
|
||||||
int iActual =
|
|
||||||
GetActualSongDancePointsForStepsType( st ) +
|
|
||||||
GetActualCourseDancePointsForStepsType( st );
|
|
||||||
|
|
||||||
return float(iActual) / iPossible;
|
|
||||||
}
|
|
||||||
|
|
||||||
CString Profile::GetProfileDisplayNameFromDir( CString sDir )
|
CString Profile::GetProfileDisplayNameFromDir( CString sDir )
|
||||||
{
|
{
|
||||||
Profile profile;
|
Profile profile;
|
||||||
|
|||||||
@@ -59,13 +59,15 @@ public:
|
|||||||
//
|
//
|
||||||
CString GetDisplayName() const;
|
CString GetDisplayName() const;
|
||||||
CString GetDisplayTotalCaloriesBurned() const;
|
CString GetDisplayTotalCaloriesBurned() const;
|
||||||
|
CString GetDisplayTotalCaloriesBurnedToday() const;
|
||||||
int GetTotalNumSongsPlayed() const;
|
int GetTotalNumSongsPlayed() const;
|
||||||
int GetTotalNumSongsPassed() const;
|
int GetTotalNumSongsPassed() const;
|
||||||
int GetActualSongDancePointsForStepsType( StepsType st ) const;
|
int GetActualSongDancePoints( StepsType st, Difficulty dc ) const;
|
||||||
int GetActualCourseDancePointsForStepsType( StepsType st ) const;
|
int GetActualCourseDancePoints( StepsType st, CourseDifficulty cd ) const;
|
||||||
int GetPossibleSongDancePointsForStepsType( StepsType st ) const;
|
int GetPossibleSongDancePoints( StepsType st, Difficulty dc ) const;
|
||||||
int GetPossibleCourseDancePointsForStepsType( StepsType st ) const;
|
int GetPossibleCourseDancePoints( StepsType st, CourseDifficulty cd ) const;
|
||||||
float GetPercentCompleteForStepsType( StepsType st ) const;
|
float GetSongsPercentComplete( StepsType st, Difficulty dc ) const { return (float)(GetActualSongDancePoints(st,dc))/GetPossibleSongDancePoints(st,dc); }
|
||||||
|
float GetCoursesPercentComplete( StepsType st, CourseDifficulty cd ) const { return (float)(GetActualCourseDancePoints(st,cd))/GetPossibleCourseDancePoints(st,cd); }
|
||||||
static CString GetProfileDisplayNameFromDir( CString sDir );
|
static CString GetProfileDisplayNameFromDir( CString sDir );
|
||||||
int GetSongNumTimesPlayed( const Song* pSong ) const;
|
int GetSongNumTimesPlayed( const Song* pSong ) const;
|
||||||
int GetSongNumTimesPlayed( const SongID& songID ) const;
|
int GetSongNumTimesPlayed( const SongID& songID ) const;
|
||||||
|
|||||||
@@ -771,20 +771,24 @@ bool PrintPercentCompleteForStepsType( RageFile &f, const Profile *pProfile, Ste
|
|||||||
|
|
||||||
PRINT_OPEN(f, GAMEMAN->NotesTypeToThemedString(st) );
|
PRINT_OPEN(f, GAMEMAN->NotesTypeToThemedString(st) );
|
||||||
{
|
{
|
||||||
|
FOREACH_Difficulty( dc )
|
||||||
|
{
|
||||||
|
if( dc == DIFFICULTY_EDIT )
|
||||||
|
continue; // skip
|
||||||
|
if( !SHOW_DIFFICULTY(dc) )
|
||||||
|
continue;
|
||||||
BEGIN_TABLE(1);
|
BEGIN_TABLE(1);
|
||||||
{
|
{
|
||||||
const int iActualSong = pProfile->GetActualSongDancePointsForStepsType(st);
|
const int iActualSong = pProfile->GetActualSongDancePoints(st,dc);
|
||||||
const int iActualCourse = pProfile->GetActualCourseDancePointsForStepsType(st);
|
const int iPossibleSong = pProfile->GetPossibleSongDancePoints(st,dc);
|
||||||
const int iPossibleSong = pProfile->GetPossibleSongDancePointsForStepsType(st);
|
const float fPercent = float(iActualSong) / (iPossibleSong);
|
||||||
const int iPossibleCourse = pProfile->GetPossibleCourseDancePointsForStepsType(st);
|
CString sDifficulty = DifficultyToThemedString(dc);
|
||||||
const float fPercent = float(iActualSong+iActualCourse) / (iPossibleSong+iPossibleCourse);
|
TABLE_LINE2( sDifficulty+" Percent Complete", ssprintf("%06.3f%%", fPercent*100) );
|
||||||
TABLE_LINE2( "Percent Complete", ssprintf("%06.3f%%", fPercent*100) );
|
TABLE_LINE2( sDifficulty+" Actual Song Points", iActualSong );
|
||||||
TABLE_LINE2( "Actual Song Points", iActualSong );
|
TABLE_LINE2( sDifficulty+" Possible Song Points", iPossibleSong );
|
||||||
TABLE_LINE2( "Actual Course Points", iActualCourse );
|
|
||||||
TABLE_LINE2( "Possible Song Points", iPossibleSong );
|
|
||||||
TABLE_LINE2( "Possible Course Points", iPossibleCourse );
|
|
||||||
}
|
}
|
||||||
END_TABLE;
|
END_TABLE;
|
||||||
|
}
|
||||||
|
|
||||||
PRINT_OPEN(f, "Songs" );
|
PRINT_OPEN(f, "Songs" );
|
||||||
{
|
{
|
||||||
@@ -851,6 +855,20 @@ bool PrintPercentCompleteForStepsType( RageFile &f, const Profile *pProfile, Ste
|
|||||||
}
|
}
|
||||||
PRINT_CLOSE(f);
|
PRINT_CLOSE(f);
|
||||||
|
|
||||||
|
FOREACH_ShownCourseDifficulty( cd )
|
||||||
|
{
|
||||||
|
BEGIN_TABLE(1);
|
||||||
|
{
|
||||||
|
const int iActualCourse = pProfile->GetActualCourseDancePoints(st,cd);
|
||||||
|
const int iPossibleCourse = pProfile->GetPossibleCourseDancePoints(st,cd);
|
||||||
|
const float fPercent = float(iActualCourse) / (iPossibleCourse);
|
||||||
|
TABLE_LINE2( CourseDifficultyToThemedString(cd)+" Percent Complete", ssprintf("%06.3f%%", fPercent*100) );
|
||||||
|
TABLE_LINE2( CourseDifficultyToThemedString(cd)+" Actual Course Points", iActualCourse );
|
||||||
|
TABLE_LINE2( CourseDifficultyToThemedString(cd)+" Possible Course Points", iPossibleCourse );
|
||||||
|
}
|
||||||
|
END_TABLE;
|
||||||
|
}
|
||||||
|
|
||||||
PRINT_OPEN(f, "Courses" );
|
PRINT_OPEN(f, "Courses" );
|
||||||
{
|
{
|
||||||
TranslatedWrite(f, "<table class='difficulty'>\n" );
|
TranslatedWrite(f, "<table class='difficulty'>\n" );
|
||||||
|
|||||||
+127
-27
@@ -14,6 +14,8 @@
|
|||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "SongUtil.h"
|
#include "SongUtil.h"
|
||||||
#include "ScreenManager.h"
|
#include "ScreenManager.h"
|
||||||
|
#include "PrefsManager.h"
|
||||||
|
#include "StageStats.h"
|
||||||
|
|
||||||
|
|
||||||
#define SCROLL_DELAY THEME->GetMetricF("ScreenEnding","ScrollDelay")
|
#define SCROLL_DELAY THEME->GetMetricF("ScreenEnding","ScrollDelay")
|
||||||
@@ -22,30 +24,75 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CString GetStatsLineTitle( PlayerNumber pn, int iLine )
|
CString GetStatsLineTitle( PlayerNumber pn, EndingStatsLine line )
|
||||||
|
{
|
||||||
|
switch( line )
|
||||||
|
{
|
||||||
|
case CALORIES_TODAY: return "Calories Today";
|
||||||
|
case CURRENT_COMBO: return "Current Combo";
|
||||||
|
case PERCENT_COMPLETE_EASY:
|
||||||
|
case PERCENT_COMPLETE_MEDIUM:
|
||||||
|
case PERCENT_COMPLETE_HARD:
|
||||||
|
case PERCENT_COMPLETE_CHALLENGE:
|
||||||
|
// Ugly...
|
||||||
{
|
{
|
||||||
static const CString s[NUM_ENDING_STATS_LINES] = {
|
|
||||||
"%s %% Complete",
|
|
||||||
"Total Calories",
|
|
||||||
"Total Played",
|
|
||||||
"Current Combo",
|
|
||||||
};
|
|
||||||
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||||
return ssprintf( s[iLine], GAMEMAN->NotesTypeToThemedString(st).c_str() );
|
CString sStepsType = GAMEMAN->NotesTypeToThemedString(st);
|
||||||
|
if( GAMESTATE->IsCourseMode() )
|
||||||
|
{
|
||||||
|
CourseDifficulty cd = (CourseDifficulty)line;
|
||||||
|
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
|
||||||
|
return "";
|
||||||
|
CString sDifficulty = CourseDifficultyToThemedString(cd);
|
||||||
|
return ssprintf( "%s %% Complete", sStepsType.c_str() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Difficulty dc = (Difficulty)line;
|
||||||
|
CString sDifficulty = DifficultyToThemedString(dc);
|
||||||
|
return ssprintf( "%s %% Complete", sStepsType.c_str() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: ASSERT(0); return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CString GetStatsLineValue( PlayerNumber pn, int iLine )
|
CString GetStatsLineValue( PlayerNumber pn, EndingStatsLine line )
|
||||||
{
|
{
|
||||||
Profile* pProfile = PROFILEMAN->GetProfile( pn );
|
Profile* pProfile = PROFILEMAN->GetProfile( pn );
|
||||||
ASSERT( pProfile );
|
ASSERT( pProfile );
|
||||||
|
|
||||||
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
switch( line )
|
||||||
switch( iLine )
|
|
||||||
{
|
{
|
||||||
case PERCENT_COMPLETE: return ssprintf( "%06.3f%%", pProfile->GetPercentCompleteForStepsType(st)*100 );
|
case CALORIES_TODAY: return pProfile->GetDisplayTotalCaloriesBurned();
|
||||||
case TOTAL_CALORIES: return pProfile->GetDisplayTotalCaloriesBurned();
|
|
||||||
case TOTAL_SONGS_PLAYED: return Commify( pProfile->GetTotalNumSongsPlayed() );
|
|
||||||
case CURRENT_COMBO: return Commify( pProfile->m_iCurrentCombo );
|
case CURRENT_COMBO: return Commify( pProfile->m_iCurrentCombo );
|
||||||
|
case PERCENT_COMPLETE_EASY:
|
||||||
|
case PERCENT_COMPLETE_MEDIUM:
|
||||||
|
case PERCENT_COMPLETE_HARD:
|
||||||
|
case PERCENT_COMPLETE_CHALLENGE:
|
||||||
|
{
|
||||||
|
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||||
|
Difficulty dc = (Difficulty)(line-1);
|
||||||
|
}
|
||||||
|
// Ugly...
|
||||||
|
{
|
||||||
|
StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType;
|
||||||
|
CString sStepsType = GAMEMAN->NotesTypeToThemedString(st);
|
||||||
|
if( GAMESTATE->IsCourseMode() )
|
||||||
|
{
|
||||||
|
CourseDifficulty cd = (CourseDifficulty)line;
|
||||||
|
if( !GAMESTATE->IsCourseDifficultyShown(cd) )
|
||||||
|
return "";
|
||||||
|
CString sDifficulty = CourseDifficultyToThemedString(cd);
|
||||||
|
return ssprintf( "%06.3f%%", pProfile->GetCoursesPercentComplete(st,cd)*100 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Difficulty dc = (Difficulty)line;
|
||||||
|
CString sDifficulty = DifficultyToThemedString(dc);
|
||||||
|
return ssprintf( "%06.3f%%", pProfile->GetSongsPercentComplete(st,dc)*100 );
|
||||||
|
}
|
||||||
|
}
|
||||||
default: ASSERT(0); return "";
|
default: ASSERT(0); return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,6 +100,59 @@ CString GetStatsLineValue( PlayerNumber pn, int iLine )
|
|||||||
|
|
||||||
ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, false/*dont reset GAMESTATE*/ )
|
ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, false/*dont reset GAMESTATE*/ )
|
||||||
{
|
{
|
||||||
|
if( PREFSMAN->m_bScreenTestMode )
|
||||||
|
{
|
||||||
|
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_1, false);
|
||||||
|
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2, false);
|
||||||
|
|
||||||
|
GAMESTATE->m_PlayMode = PLAY_MODE_REGULAR;
|
||||||
|
GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS;
|
||||||
|
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
||||||
|
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
||||||
|
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||||
|
GAMESTATE->m_pCurSong = SONGMAN->GetRandomSong();
|
||||||
|
GAMESTATE->m_pCurCourse = SONGMAN->GetRandomCourse();
|
||||||
|
GAMESTATE->m_pCurSteps[PLAYER_1] = GAMESTATE->m_pCurSong->GetAllSteps()[0];
|
||||||
|
GAMESTATE->m_pCurSteps[PLAYER_2] = GAMESTATE->m_pCurSong->GetAllSteps()[0];
|
||||||
|
g_CurStageStats.pSteps[PLAYER_1] = GAMESTATE->m_pCurSteps[PLAYER_1];
|
||||||
|
g_CurStageStats.pSteps[PLAYER_2] = GAMESTATE->m_pCurSteps[PLAYER_2];
|
||||||
|
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 2;
|
||||||
|
GAMESTATE->m_PlayerOptions[PLAYER_2].m_fScrollSpeed = 2;
|
||||||
|
GAMESTATE->m_iCurrentStageIndex = 0;
|
||||||
|
GAMESTATE->m_PlayerOptions[PLAYER_1].ChooseRandomMofifiers();
|
||||||
|
GAMESTATE->m_PlayerOptions[PLAYER_2].ChooseRandomMofifiers();
|
||||||
|
|
||||||
|
for( float f = 0; f < 100.0f; f += 1.0f )
|
||||||
|
{
|
||||||
|
float fP1 = fmodf(f/100*4+.3f,1);
|
||||||
|
g_CurStageStats.SetLifeRecord( PLAYER_1, fP1, f );
|
||||||
|
g_CurStageStats.SetLifeRecord( PLAYER_2, 1-fP1, f );
|
||||||
|
}
|
||||||
|
|
||||||
|
g_CurStageStats.iActualDancePoints[PLAYER_1] = rand()%3;
|
||||||
|
g_CurStageStats.iPossibleDancePoints[PLAYER_1] = 2;
|
||||||
|
g_CurStageStats.iActualDancePoints[PLAYER_2] = rand()%2;
|
||||||
|
g_CurStageStats.iPossibleDancePoints[PLAYER_2] = 1;
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_1] = 0;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_1, 0, false );
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_1] = 1;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_1, 1, false );
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_1] = 50;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_1, 25, false );
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_1] = 250;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_1, 100, false );
|
||||||
|
|
||||||
|
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_MARVELOUS] = rand()%2;
|
||||||
|
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_PERFECT] = rand()%2;
|
||||||
|
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_GREAT] = rand()%2;
|
||||||
|
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_MARVELOUS] = rand()%2;
|
||||||
|
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_PERFECT] = rand()%2;
|
||||||
|
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_GREAT] = rand()%2;
|
||||||
|
|
||||||
|
g_vPlayedStageStats.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
vector<Song*> arraySongs;
|
vector<Song*> arraySongs;
|
||||||
SONGMAN->GetSongs( arraySongs );
|
SONGMAN->GetSongs( arraySongs );
|
||||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||||
@@ -72,24 +172,24 @@ ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, fa
|
|||||||
SET_XY_AND_ON_COMMAND( m_textPlayerName[p] );
|
SET_XY_AND_ON_COMMAND( m_textPlayerName[p] );
|
||||||
this->AddChild( &m_textPlayerName[p] );
|
this->AddChild( &m_textPlayerName[p] );
|
||||||
|
|
||||||
m_bWaitingForRemoveCard[p] = MEMCARDMAN->GetCardState((PlayerNumber)p)!=MEMORY_CARD_STATE_NO_CARD;
|
m_bWaitingForRemoveCard[p] = MEMCARDMAN->GetCardState(p)!=MEMORY_CARD_STATE_NO_CARD;
|
||||||
|
|
||||||
if( pProfile == NULL )
|
if( pProfile == NULL )
|
||||||
continue; // don't show the stats lines
|
continue; // don't show the stats lines
|
||||||
|
|
||||||
for( int i=0; i<NUM_ENDING_STATS_LINES; i++ )
|
FOREACH_EndingStatsLine( i )
|
||||||
{
|
{
|
||||||
m_textStatsTitle[p][i].LoadFromFont( THEME->GetPathToF("ScreenEnding stats title") );
|
m_Lines[i][p].title.LoadFromFont( THEME->GetPathToF("ScreenEnding stats title") );
|
||||||
m_textStatsTitle[p][i].SetText( GetStatsLineTitle((PlayerNumber)p, i) );
|
m_Lines[i][p].title.SetText( GetStatsLineTitle(p, i) );
|
||||||
m_textStatsTitle[p][i].SetName( ssprintf("StatsTitleP%dLine%d",p+1,i+1) );
|
m_Lines[i][p].title.SetName( ssprintf("StatsTitleP%dLine%d",p+1,i+1) );
|
||||||
SET_XY_AND_ON_COMMAND( m_textStatsTitle[p][i] );
|
SET_XY_AND_ON_COMMAND( m_Lines[i][p].title );
|
||||||
this->AddChild( &m_textStatsTitle[p][i] );
|
this->AddChild( &m_Lines[i][p].title );
|
||||||
|
|
||||||
m_textStatsValue[p][i].LoadFromFont( THEME->GetPathToF("ScreenEnding stats value") );
|
m_Lines[i][p].value.LoadFromFont( THEME->GetPathToF("ScreenEnding stats value") );
|
||||||
m_textStatsValue[p][i].SetText( GetStatsLineValue((PlayerNumber)p, i) );
|
m_Lines[i][p].value.SetText( GetStatsLineValue(p, i) );
|
||||||
m_textStatsValue[p][i].SetName( ssprintf("StatsValueP%dLine%d",p+1,i+1) );
|
m_Lines[i][p].value.SetName( ssprintf("StatsValueP%dLine%d",p+1,i+1) );
|
||||||
SET_XY_AND_ON_COMMAND( m_textStatsValue[p][i] );
|
SET_XY_AND_ON_COMMAND( m_Lines[i][p].value );
|
||||||
this->AddChild( &m_textStatsValue[p][i] );
|
this->AddChild( &m_Lines[i][p].value );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sprRemoveMemoryCard[p].SetName( ssprintf("RemoveCardP%d",p+1) );
|
m_sprRemoveMemoryCard[p].SetName( ssprintf("RemoveCardP%d",p+1) );
|
||||||
@@ -132,7 +232,7 @@ void ScreenEnding::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
if( m_bWaitingForRemoveCard[p] )
|
if( m_bWaitingForRemoveCard[p] )
|
||||||
{
|
{
|
||||||
m_bWaitingForRemoveCard[p] = MEMCARDMAN->GetCardState((PlayerNumber)p)!=MEMORY_CARD_STATE_NO_CARD;
|
m_bWaitingForRemoveCard[p] = MEMCARDMAN->GetCardState(p)!=MEMORY_CARD_STATE_NO_CARD;
|
||||||
if( !m_bWaitingForRemoveCard[p] )
|
if( !m_bWaitingForRemoveCard[p] )
|
||||||
m_sprRemoveMemoryCard[p].SetHidden( true );
|
m_sprRemoveMemoryCard[p].SetHidden( true );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,15 @@
|
|||||||
|
|
||||||
enum EndingStatsLine
|
enum EndingStatsLine
|
||||||
{
|
{
|
||||||
PERCENT_COMPLETE,
|
CALORIES_TODAY,
|
||||||
TOTAL_CALORIES,
|
|
||||||
TOTAL_SONGS_PLAYED,
|
|
||||||
CURRENT_COMBO,
|
CURRENT_COMBO,
|
||||||
|
PERCENT_COMPLETE_EASY,
|
||||||
|
PERCENT_COMPLETE_MEDIUM,
|
||||||
|
PERCENT_COMPLETE_HARD,
|
||||||
|
PERCENT_COMPLETE_CHALLENGE,
|
||||||
NUM_ENDING_STATS_LINES
|
NUM_ENDING_STATS_LINES
|
||||||
};
|
};
|
||||||
|
#define FOREACH_EndingStatsLine( l ) FOREACH_ENUM( EndingStatsLine, NUM_ENDING_STATS_LINES, l )
|
||||||
|
|
||||||
class ScreenEnding : public ScreenAttract
|
class ScreenEnding : public ScreenAttract
|
||||||
{
|
{
|
||||||
@@ -27,8 +30,11 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
BitmapText m_textPlayerName[NUM_PLAYERS];
|
BitmapText m_textPlayerName[NUM_PLAYERS];
|
||||||
BitmapText m_textStatsTitle[NUM_PLAYERS][NUM_ENDING_STATS_LINES];
|
struct Line
|
||||||
BitmapText m_textStatsValue[NUM_PLAYERS][NUM_ENDING_STATS_LINES];
|
{
|
||||||
|
BitmapText title;
|
||||||
|
BitmapText value;
|
||||||
|
} m_Lines[NUM_ENDING_STATS_LINES][NUM_PLAYERS];
|
||||||
|
|
||||||
Sprite m_sprRemoveMemoryCard[NUM_PLAYERS];
|
Sprite m_sprRemoveMemoryCard[NUM_PLAYERS];
|
||||||
bool m_bWaitingForRemoveCard[NUM_PLAYERS];
|
bool m_bWaitingForRemoveCard[NUM_PLAYERS];
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const char* STATS_STRING[NUM_STATS_LINES] =
|
|||||||
#define SHOW_GRAPH_AREA THEME->GetMetricB(m_sName,"ShowGraphArea")
|
#define SHOW_GRAPH_AREA THEME->GetMetricB(m_sName,"ShowGraphArea")
|
||||||
#define SHOW_COMBO_AREA THEME->GetMetricB(m_sName,"ShowComboArea")
|
#define SHOW_COMBO_AREA THEME->GetMetricB(m_sName,"ShowComboArea")
|
||||||
#define SHOW_PER_DIFFICULTY_AWARD THEME->GetMetricB(m_sName,"ShowPerDifficultyAward")
|
#define SHOW_PER_DIFFICULTY_AWARD THEME->GetMetricB(m_sName,"ShowPerDifficultyAward")
|
||||||
|
#define SHOW_PEAK_COMBO_AWARD THEME->GetMetricB(m_sName,"ShowPeakComboAward")
|
||||||
#define GRAPH_START_HEIGHT THEME->GetMetricF(m_sName,"GraphStartHeight")
|
#define GRAPH_START_HEIGHT THEME->GetMetricF(m_sName,"GraphStartHeight")
|
||||||
#define TYPE THEME->GetMetric (m_sName,"Type")
|
#define TYPE THEME->GetMetric (m_sName,"Type")
|
||||||
#define PASSED_SOUND_TIME THEME->GetMetricF(m_sName,"PassedSoundTime")
|
#define PASSED_SOUND_TIME THEME->GetMetricF(m_sName,"PassedSoundTime")
|
||||||
@@ -72,7 +73,6 @@ const char* STATS_STRING[NUM_STATS_LINES] =
|
|||||||
#define NUM_SEQUENCE_SOUNDS THEME->GetMetricI(m_sName,"NumSequenceSounds")
|
#define NUM_SEQUENCE_SOUNDS THEME->GetMetricI(m_sName,"NumSequenceSounds")
|
||||||
#define SOUNDSEQ_TIME( i ) THEME->GetMetricF(m_sName,ssprintf("SoundSeqTime%d", i+1))
|
#define SOUNDSEQ_TIME( i ) THEME->GetMetricF(m_sName,ssprintf("SoundSeqTime%d", i+1))
|
||||||
#define SOUNDSEQ_NAME( i ) THEME->GetMetric (m_sName,ssprintf("SoundSeqName%d", i+1))
|
#define SOUNDSEQ_NAME( i ) THEME->GetMetric (m_sName,ssprintf("SoundSeqName%d", i+1))
|
||||||
#define PEAK_COMBO_AWARD_COMMAND THEME->GetMetric (m_sName,"PeakComboAwardCommand")
|
|
||||||
#define MAX_COMBO_NUM_DIGITS THEME->GetMetricI(m_sName,"MaxComboNumDigits")
|
#define MAX_COMBO_NUM_DIGITS THEME->GetMetricI(m_sName,"MaxComboNumDigits")
|
||||||
#define PLAYER_OPTIONS_SEPARATOR THEME->GetMetric (m_sName,"PlayerOptionsSeparator")
|
#define PLAYER_OPTIONS_SEPARATOR THEME->GetMetric (m_sName,"PlayerOptionsSeparator")
|
||||||
|
|
||||||
@@ -136,13 +136,31 @@ void ScreenEvaluation::Init()
|
|||||||
g_CurStageStats.UpdateComboList( PLAYER_1, 25, false );
|
g_CurStageStats.UpdateComboList( PLAYER_1, 25, false );
|
||||||
g_CurStageStats.iCurCombo[PLAYER_1] = 250;
|
g_CurStageStats.iCurCombo[PLAYER_1] = 250;
|
||||||
g_CurStageStats.UpdateComboList( PLAYER_1, 100, false );
|
g_CurStageStats.UpdateComboList( PLAYER_1, 100, false );
|
||||||
|
if( rand()%2 )
|
||||||
|
{
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_1] = rand()%11000;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_1, 110, false );
|
||||||
|
}
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_2] = 0;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_2, 0, false );
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_2] = 1;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_2, 1, false );
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_2] = 50;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_2, 25, false );
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_2] = 250;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_2, 100, false );
|
||||||
|
if( rand()%2 )
|
||||||
|
{
|
||||||
|
g_CurStageStats.iCurCombo[PLAYER_2] = rand()%11000;
|
||||||
|
g_CurStageStats.UpdateComboList( PLAYER_2, 110, false );
|
||||||
|
}
|
||||||
|
|
||||||
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_MARVELOUS] = rand()%2;
|
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_MARVELOUS] = rand()%3;
|
||||||
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_PERFECT] = rand()%2;
|
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_PERFECT] = rand()%3;
|
||||||
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_GREAT] = rand()%2;
|
g_CurStageStats.iTapNoteScores[PLAYER_1][TNS_GREAT] = rand()%3;
|
||||||
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_MARVELOUS] = rand()%2;
|
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_MARVELOUS] = rand()%3;
|
||||||
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_PERFECT] = rand()%2;
|
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_PERFECT] = rand()%3;
|
||||||
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_GREAT] = rand()%2;
|
g_CurStageStats.iTapNoteScores[PLAYER_2][TNS_GREAT] = rand()%3;
|
||||||
|
|
||||||
g_vPlayedStageStats.clear();
|
g_vPlayedStageStats.clear();
|
||||||
}
|
}
|
||||||
@@ -625,7 +643,7 @@ void ScreenEvaluation::Init()
|
|||||||
case boo: iValue = stageStats.iTapNoteScores[p][TNS_BOO]; break;
|
case boo: iValue = stageStats.iTapNoteScores[p][TNS_BOO]; break;
|
||||||
case miss: iValue = stageStats.iTapNoteScores[p][TNS_MISS]; break;
|
case miss: iValue = stageStats.iTapNoteScores[p][TNS_MISS]; break;
|
||||||
case ok: iValue = stageStats.iHoldNoteScores[p][HNS_OK]; break;
|
case ok: iValue = stageStats.iHoldNoteScores[p][HNS_OK]; break;
|
||||||
case max_combo: iValue = stageStats.iMaxCombo[p]; break;
|
case max_combo: iValue = stageStats.GetMaxCombo(p).cnt; break;
|
||||||
case error: iValue = stageStats.iTotalError[p]; break;
|
case error: iValue = stageStats.iTotalError[p]; break;
|
||||||
default: iValue = 0; ASSERT(0);
|
default: iValue = 0; ASSERT(0);
|
||||||
}
|
}
|
||||||
@@ -637,12 +655,6 @@ void ScreenEvaluation::Init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FOREACH_EnabledPlayer( pn )
|
|
||||||
{
|
|
||||||
if( pcaToShow[pn] != PEAK_COMBO_AWARD_INVALID )
|
|
||||||
m_textJudgeNumbers[max_combo][pn].Command( PEAK_COMBO_AWARD_COMMAND );
|
|
||||||
}
|
|
||||||
|
|
||||||
for( l=0; l<NUM_STATS_LINES; l++ )
|
for( l=0; l<NUM_STATS_LINES; l++ )
|
||||||
{
|
{
|
||||||
if( !SHOW_STAT(l) )
|
if( !SHOW_STAT(l) )
|
||||||
@@ -766,16 +778,24 @@ void ScreenEvaluation::Init()
|
|||||||
SET_XY_AND_ON_COMMAND( m_sprPersonalRecord[p] );
|
SET_XY_AND_ON_COMMAND( m_sprPersonalRecord[p] );
|
||||||
this->AddChild( m_sprPersonalRecord[p] );
|
this->AddChild( m_sprPersonalRecord[p] );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( SHOW_PER_DIFFICULTY_AWARD && pdaToShow[p]!=PER_DIFFICULTY_AWARD_INVALID )
|
if( SHOW_PER_DIFFICULTY_AWARD && pdaToShow[p]!=PER_DIFFICULTY_AWARD_INVALID )
|
||||||
{
|
{
|
||||||
CString sAward = PerDifficultyAwardToString( pdaToShow[p] );
|
CString sAward = PerDifficultyAwardToString( pdaToShow[p] );
|
||||||
|
|
||||||
m_PerDifficultyAward[p].Load( THEME->GetPathToG(ssprintf("ScreenEvaluation award %s",sAward.c_str())) );
|
m_PerDifficultyAward[p].Load( THEME->GetPathG(m_sName,"PerDifficultyAward "+sAward) );
|
||||||
m_PerDifficultyAward[p]->SetName( ssprintf("PerDifficultyAwardP%d",p+1) );
|
m_PerDifficultyAward[p]->SetName( ssprintf("PerDifficultyAwardP%d",p+1) );
|
||||||
SET_XY_AND_ON_COMMAND( m_PerDifficultyAward[p] );
|
SET_XY_AND_ON_COMMAND( m_PerDifficultyAward[p] );
|
||||||
this->AddChild( m_PerDifficultyAward[p] );
|
this->AddChild( m_PerDifficultyAward[p] );
|
||||||
}
|
}
|
||||||
|
if( SHOW_PEAK_COMBO_AWARD && pcaToShow[p]!=PEAK_COMBO_AWARD_INVALID )
|
||||||
|
{
|
||||||
|
CString sAward = PeakComboAwardToString( pcaToShow[p] );
|
||||||
|
|
||||||
|
m_PeakComboAward[p].Load( THEME->GetPathG(m_sName,"PeakComboAward "+sAward) );
|
||||||
|
m_PeakComboAward[p]->SetName( ssprintf("PeakComboAwardP%d",p+1) );
|
||||||
|
SET_XY_AND_ON_COMMAND( m_PeakComboAward[p] );
|
||||||
|
this->AddChild( m_PeakComboAward[p] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bOneHasNewTopRecord = false;
|
bool bOneHasNewTopRecord = false;
|
||||||
@@ -1306,6 +1326,8 @@ void ScreenEvaluation::TweenOffScreen()
|
|||||||
OFF_COMMAND( m_sprPersonalRecord[p] );
|
OFF_COMMAND( m_sprPersonalRecord[p] );
|
||||||
if( m_PerDifficultyAward[p].IsLoaded() )
|
if( m_PerDifficultyAward[p].IsLoaded() )
|
||||||
OFF_COMMAND( m_PerDifficultyAward[p] );
|
OFF_COMMAND( m_PerDifficultyAward[p] );
|
||||||
|
if( m_PeakComboAward[p].IsLoaded() )
|
||||||
|
OFF_COMMAND( m_PeakComboAward[p] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OFF_COMMAND( m_sprTryExtraStage );
|
OFF_COMMAND( m_sprTryExtraStage );
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ protected:
|
|||||||
bool m_bTryExtraStage;
|
bool m_bTryExtraStage;
|
||||||
AutoActor m_sprTryExtraStage;
|
AutoActor m_sprTryExtraStage;
|
||||||
AutoActor m_PerDifficultyAward[NUM_PLAYERS];
|
AutoActor m_PerDifficultyAward[NUM_PLAYERS];
|
||||||
|
AutoActor m_PeakComboAward[NUM_PLAYERS];
|
||||||
bool m_bFailed;
|
bool m_bFailed;
|
||||||
|
|
||||||
RageSound m_soundStart; // sound played if the player passes or fails
|
RageSound m_soundStart; // sound played if the player passes or fails
|
||||||
|
|||||||
Reference in New Issue
Block a user