add AttractSoundFrequency option

remove AttractSound and DemonstrationSound options
This commit is contained in:
Chris Danford
2003-12-28 19:46:50 +00:00
parent 625b25b050
commit 5aa2a3dff4
8 changed files with 37 additions and 21 deletions
+12
View File
@@ -56,6 +56,8 @@ GameState::GameState()
m_pUnlockingSys = new UnlockSystem;
ReloadCharacters();
m_iNumTimesThroughAttract = -1; // initial screen will bump this up to 0
}
GameState::~GameState()
@@ -161,6 +163,8 @@ void GameState::BeginGame()
m_timeGameStarted = time(NULL);
m_vpsNamesThatWereFilled.clear();
m_iNumTimesThroughAttract = 0;
}
void GameState::EndGame()
@@ -1210,3 +1214,11 @@ bool GameState::OneIsHot() const
return true;
return false;
}
bool GameState::IsTimeToPlayAttractSounds()
{
if( PREFSMAN->m_iAttractSoundFrequency == 0 ) // never
return false;
m_iNumTimesThroughAttract %= PREFSMAN->m_iAttractSoundFrequency;
return m_iNumTimesThroughAttract==0;
}