no message

This commit is contained in:
Chris Danford
2002-06-23 02:50:33 +00:00
parent 248ad096af
commit 1500459bb1
45 changed files with 1128 additions and 524 deletions
+34 -11
View File
@@ -29,12 +29,13 @@ PrefsManager::PrefsManager()
m_bAnnouncer = true;
m_bEventMode = true;
m_iNumArcadeStages = 3;
m_iDifficulty = 4;
m_bAutoPlay = false;
m_fJudgeWindow = 0.10f;
for( int p=0; p<NUM_PLAYERS; p++ )
m_PreferredDifficultyClass[p] = CLASS_EASY;
m_SongSortOrder = SORT_GROUP;
m_PlayMode = PLAY_MODE_ARCADE;
m_PlayMode = PLAY_MODE_INVALID;
m_iCurrentStageIndex = 0;
ReadPrefsFromDisk();
@@ -61,7 +62,8 @@ void PrefsManager::ReadPrefsFromDisk()
ini.GetValueB( "Options", "Announcer", m_bAnnouncer );
ini.GetValueB( "Options", "EventMode", m_bEventMode );
ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
ini.GetValueI( "Options", "Difficulty", m_iDifficulty );
ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay );
ini.GetValueF( "Options", "JudgeWindow", m_fJudgeWindow );
}
@@ -79,7 +81,8 @@ void PrefsManager::SavePrefsToDisk()
ini.SetValueB( "Options", "Announcer", m_bAnnouncer );
ini.SetValueB( "Options", "EventMode", m_bEventMode );
ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages );
ini.SetValueI( "Options", "Difficulty", m_iDifficulty );
ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay );
ini.SetValueF( "Options", "JudgeWindow", m_fJudgeWindow );
ini.WriteFile();
}
@@ -89,20 +92,30 @@ int PrefsManager::GetStageIndex()
return m_iCurrentStageIndex;
}
int PrefsManager::GetStageNumber()
{
return m_iCurrentStageIndex+1;
}
bool PrefsManager::IsFinalStage()
{
return m_iCurrentStageIndex == m_iNumArcadeStages-1;
}
bool PrefsManager::IsExtraStage()
{
return m_iCurrentStageIndex == m_iNumArcadeStages;
}
bool PrefsManager::IsExtraStage2()
{
return m_iCurrentStageIndex == m_iNumArcadeStages+1;
}
CString PrefsManager::GetStageText()
{
if( m_iCurrentStageIndex == m_iNumArcadeStages-1 )
if( IsFinalStage() )
return "Final";
else if( IsExtraStage() )
return "Extra";
else if( IsExtraStage2() )
return "Extra 2";
int iStageNo = m_iCurrentStageIndex+1;
@@ -122,6 +135,16 @@ CString PrefsManager::GetStageText()
default:sNumberSuffix = "th"; break;
}
}
return ssprintf( "%d%s", this->GetStageNumber(), sNumberSuffix );
return ssprintf( "%d%s", iStageNo, sNumberSuffix );
}
D3DXCOLOR PrefsManager::GetStageColor()
{
if( IsFinalStage() )
return D3DXCOLOR(1,0.1f,0.1f,1); // red
else if( IsExtraStage() || IsExtraStage2() )
return D3DXCOLOR(1,1,0.3f,1); // yellow
else
return D3DXCOLOR(0.3f,1,0.3f,1); // green
}