add option to hide name entry screen if course isn't in ranking list

This commit is contained in:
Andrew Wong
2003-11-03 10:14:13 +00:00
parent f27a2b5398
commit 38f78c4560
6 changed files with 38 additions and 0 deletions
+13
View File
@@ -992,3 +992,16 @@ void Course::Info::GetAttackArray( AttackArray &out ) const
out.insert( out.end(), Attacks.begin(), Attacks.end() ); out.insert( out.end(), Attacks.begin(), Attacks.end() );
} }
bool Course::IsRanking() const
{
CStringArray rankingsongs;
split(THEME->GetMetric("ScreenRanking", "CoursesToShow"), ",", rankingsongs);
for(unsigned i=0; i < rankingsongs.size(); i++)
if (rankingsongs[i].CompareNoCase(m_sPath))
return true;
return false;
}
+1
View File
@@ -196,6 +196,7 @@ public:
// sorting values // sorting values
int SortOrder_TotalDifficulty; int SortOrder_TotalDifficulty;
int SortOrder_Ranking; int SortOrder_Ranking;
bool IsRanking() const;
void UpdateCourseStats(); void UpdateCourseStats();
+4
View File
@@ -133,6 +133,8 @@ PrefsManager::PrefsManager()
m_bMoveRandomToEnd = false; m_bMoveRandomToEnd = false;
m_iScoringType = SCORING_MAX2; m_iScoringType = SCORING_MAX2;
m_iGetRankingName = RANKING_ON;
m_fLongVerSongSeconds = 60*2.5f; // Dynamite Rave is 2:55 m_fLongVerSongSeconds = 60*2.5f; // Dynamite Rave is 2:55
m_fMarathonVerSongSeconds = 60*5.f; m_fMarathonVerSongSeconds = 60*5.f;
@@ -298,6 +300,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "LastSeenMemory", m_iLastSeenMemory ); ini.GetValue( "Options", "LastSeenMemory", m_iLastSeenMemory );
#endif #endif
ini.GetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking ); ini.GetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
ini.GetValue( "Options", "GetRankingName", (int&)m_iGetRankingName);
ini.GetValue( "Options", "AntiAliasing", m_bAntiAliasing ); ini.GetValue( "Options", "AntiAliasing", m_bAntiAliasing );
ini.GetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds ); ini.GetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
ini.GetValue( "Options", "ForceLogFlush", m_bForceLogFlush ); ini.GetValue( "Options", "ForceLogFlush", m_bForceLogFlush );
@@ -424,6 +427,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "LastSeenMemory", m_iLastSeenMemory ); ini.SetValue( "Options", "LastSeenMemory", m_iLastSeenMemory );
#endif #endif
ini.SetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking ); ini.SetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
ini.SetValue( "Options", "GetRankingName", m_iGetRankingName);
ini.SetValue( "Options", "AntiAliasing", m_bAntiAliasing ); ini.SetValue( "Options", "AntiAliasing", m_bAntiAliasing );
ini.SetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds ); ini.SetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
ini.SetValue( "Options", "ForceLogFlush", m_bForceLogFlush ); ini.SetValue( "Options", "ForceLogFlush", m_bForceLogFlush );
+1
View File
@@ -118,6 +118,7 @@ public:
// course ranking // course ranking
enum CourseSortOrders { COURSE_SORT_SONGS, COURSE_SORT_METER, COURSE_SORT_METER_SUM, COURSE_SORT_RANK } m_iCourseSortOrder; enum CourseSortOrders { COURSE_SORT_SONGS, COURSE_SORT_METER, COURSE_SORT_METER_SUM, COURSE_SORT_RANK } m_iCourseSortOrder;
bool m_bMoveRandomToEnd; bool m_bMoveRandomToEnd;
enum GetRankingName { RANKING_OFF, RANKING_ON, RANKING_LIST } m_iGetRankingName;
// scoring type; SCORING_MAX2 should always be first // scoring type; SCORING_MAX2 should always be first
enum ScoringTypes { SCORING_MAX2, SCORING_5TH } m_iScoringType; enum ScoringTypes { SCORING_MAX2, SCORING_5TH } m_iScoringType;
+12
View File
@@ -149,6 +149,18 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
return; return;
} }
bool IsOnRanking = ( (GAMESTATE->m_PlayMode == PLAY_MODE_NONSTOP || GAMESTATE->m_PlayMode == PLAY_MODE_ONI)
&& !(GAMESTATE->m_pCurCourse->IsRanking()) );
if (PREFSMAN->m_iGetRankingName == PrefsManager::RANKING_OFF ||
(PREFSMAN->m_iGetRankingName == PrefsManager::RANKING_LIST && !IsOnRanking))
{
// don't collect score due to ranking setting
HandleScreenMessage( SM_GoToNextScreen );
return;
}
GAMESTATE->m_bPastHereWeGo = true; // enable the gray arrows GAMESTATE->m_bPastHereWeGo = true; // enable the gray arrows
m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenNameEntry background") ); m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenNameEntry background") );
@@ -298,6 +298,12 @@ static void ShowSongOptions( int &sel, bool ToSel, const CStringArray &choices )
MoveMap( sel, PREFSMAN->m_ShowSongOptions, ToSel, mapping, ARRAYSIZE(mapping) ); MoveMap( sel, PREFSMAN->m_ShowSongOptions, ToSel, mapping, ARRAYSIZE(mapping) );
} }
static void ShowNameEntry( int &sel, bool ToSel, const CStringArray &choices )
{
const PrefsManager::GetRankingName mapping[] = { PrefsManager::RANKING_OFF, PrefsManager::RANKING_ON, PrefsManager::RANKING_LIST };
MoveMap( sel, PREFSMAN->m_iGetRankingName, ToSel, mapping, ARRAYSIZE(mapping) );
}
static void DefaultFailType( int &sel, bool ToSel, const CStringArray &choices ) static void DefaultFailType( int &sel, bool ToSel, const CStringArray &choices )
{ {
if( ToSel ) if( ToSel )
@@ -449,6 +455,7 @@ static const ConfOption g_ConfOptions[] =
ConfOption( "Coins Per\nCredit", CoinsPerCredit, "1","2","3","4","5","6","7","8" ), ConfOption( "Coins Per\nCredit", CoinsPerCredit, "1","2","3","4","5","6","7","8" ),
ConfOption( "Joint\nPremium", JointPremium, "OFF","ON" ), ConfOption( "Joint\nPremium", JointPremium, "OFF","ON" ),
ConfOption( "Show Song\nOptions", ShowSongOptions, "HIDE","SHOW","ASK" ), ConfOption( "Show Song\nOptions", ShowSongOptions, "HIDE","SHOW","ASK" ),
ConfOption( "Show Name\nEntry", ShowNameEntry, "OFF", "ON", "RANKING SONGS" ),
/* Graphic options */ /* Graphic options */
ConfOption( "Display\nMode", DisplayMode, "FULLSCREEN", "WINDOWED" ), ConfOption( "Display\nMode", DisplayMode, "FULLSCREEN", "WINDOWED" ),