centralize attract volume

This commit is contained in:
Glenn Maynard
2007-05-03 05:28:46 +00:00
parent 1912eea57c
commit 35a0e18c2f
3 changed files with 14 additions and 10 deletions
+3 -5
View File
@@ -10,7 +10,7 @@
#include "GameSoundManager.h"
#include "GameManager.h"
#include "Style.h"
#include "ScreenAttract.h"
#define SECONDS_TO_SHOW THEME->GetMetricF(m_sName,"SecondsToShow")
#define ALLOW_STYLE_TYPES THEME->GetMetric (m_sName,"AllowStyleTypes")
@@ -19,15 +19,13 @@ REGISTER_SCREEN_CLASS( ScreenDemonstration );
ScreenDemonstration::ScreenDemonstration()
{
m_bDemonstration = true;
if( GAMESTATE->IsTimeToPlayAttractSounds() )
SOUNDMAN->SetVolumeOfNonCriticalSounds( 1.0f ); // unmute attract sounds
else
SOUNDMAN->SetVolumeOfNonCriticalSounds( 0.0f ); // mute attract sounds
ScreenAttract::SetAttractVolume( !GAMESTATE->IsTimeToPlayAttractSounds() );
}
void ScreenDemonstration::Init()
{
GAMESTATE->Reset();
GAMESTATE->VisitAttractScreen( m_sName );
// Choose a Style
{