preload cancel all sound

This commit is contained in:
Glenn Maynard
2005-02-07 23:31:55 +00:00
parent f752e1c3b0
commit 2bdff91293
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -47,6 +47,10 @@ ScreenPlayerOptions::ScreenPlayerOptions( CString sClassName ) :
m_bAcceptedChoices = false;
m_bGoToOptions = ( PREFSMAN->m_ShowSongOptions == PrefsManager::YES );
CString sPath = THEME->GetPathS( m_sName,"cancel all", true );
if( sPath != "" )
m_CancelAll.Load( sPath, true );
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("player options intro") );
FOREACH_HumanPlayer( pn )
@@ -123,7 +127,8 @@ void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventTyp
PlayerNumber pn = GAMESTATE->GetCurrentStyle()->ControllerToPlayerNumber( GameI.controller );
if( GAMESTATE->IsHumanPlayer(pn) && CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_CANCEL_ALL_PLAYER_OPTIONS) )
{
SOUND->PlayOnce( THEME->GetPathS(m_sName,"cancel all") );
if( m_CancelAll.IsLoaded() )
m_CancelAll.Play();
// apply the game default mods, but not the Profile saved mods
GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.Init();
+2
View File
@@ -23,6 +23,8 @@ private:
bool m_bGoToOptions;
bool m_bAskOptionsMessage;
Sprite m_sprOptionsMessage;
RageSound m_CancelAll;
AutoActor m_sprCancelAll[NUM_PLAYERS];
};