silence music during demonstration if !AttractSound
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#include "StepMania.h"
|
#include "StepMania.h"
|
||||||
#include "ScreenAttract.h" // for AttractInput()
|
#include "ScreenAttract.h" // for AttractInput()
|
||||||
#include "ScreenManager.h"
|
#include "ScreenManager.h"
|
||||||
|
#include "RageSoundManager.h"
|
||||||
|
|
||||||
|
|
||||||
#define SHOW_RANDOM_MODIFIERS THEME->GetMetricF("ScreenDemonstration","SecondsToShow")
|
#define SHOW_RANDOM_MODIFIERS THEME->GetMetricF("ScreenDemonstration","SecondsToShow")
|
||||||
@@ -71,6 +72,9 @@ ScreenDemonstration::ScreenDemonstration( CString sName ) : ScreenJukebox( sName
|
|||||||
|
|
||||||
m_DancingState = STATE_DANCING;
|
m_DancingState = STATE_DANCING;
|
||||||
this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW );
|
this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW );
|
||||||
|
|
||||||
|
if( !PREFSMAN->m_bAttractSound )
|
||||||
|
SOUNDMAN->SetPrefs( 0 ); // slient
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenDemonstration::~ScreenDemonstration()
|
ScreenDemonstration::~ScreenDemonstration()
|
||||||
@@ -95,10 +99,13 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp
|
|||||||
case MENU_BUTTON_START:
|
case MENU_BUTTON_START:
|
||||||
case MENU_BUTTON_BACK:
|
case MENU_BUTTON_BACK:
|
||||||
|
|
||||||
|
m_soundMusic.Stop();
|
||||||
|
if( !PREFSMAN->m_bAttractSound )
|
||||||
|
SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on
|
||||||
|
|
||||||
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
if( PREFSMAN->m_iCoinMode == COIN_PAY )
|
||||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit )
|
||||||
break; // don't fall through
|
break; // don't fall through
|
||||||
m_soundMusic.Stop();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -117,6 +124,9 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
return;
|
return;
|
||||||
case SM_GoToNextScreen:
|
case SM_GoToNextScreen:
|
||||||
m_soundMusic.Stop();
|
m_soundMusic.Stop();
|
||||||
|
if( !PREFSMAN->m_bAttractSound )
|
||||||
|
SOUNDMAN->SetPrefs( PREFSMAN->m_fSoundVolume ); // turn volume back on
|
||||||
|
|
||||||
GAMESTATE->Reset();
|
GAMESTATE->Reset();
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user