From 6590bd2d4826fc0f7bcddc541d0dedf72ad7859a Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 1 May 2004 23:28:53 +0000 Subject: [PATCH] don't load multiple copies of "common start" or "common invalid" sound --- stepmania/src/EditCoursesMenu.cpp | 14 ++++++-------- stepmania/src/EditCoursesMenu.h | 2 -- stepmania/src/MusicWheel.cpp | 9 ++++----- stepmania/src/MusicWheel.h | 1 - stepmania/src/ScreenAttract.cpp | 2 -- stepmania/src/ScreenAttract.h | 1 - stepmania/src/ScreenCenterImage.cpp | 2 +- stepmania/src/ScreenEdit.cpp | 6 +++--- stepmania/src/ScreenEz2SelectMusic.cpp | 5 ++--- stepmania/src/ScreenEz2SelectMusic.h | 3 --- stepmania/src/ScreenEz2SelectPlayer.cpp | 4 +--- stepmania/src/ScreenEz2SelectPlayer.h | 1 - stepmania/src/ScreenJukeboxMenu.cpp | 6 ++---- stepmania/src/ScreenJukeboxMenu.h | 2 -- stepmania/src/ScreenMapControllers.cpp | 4 ++-- stepmania/src/ScreenMiniMenu.cpp | 2 +- stepmania/src/ScreenOptions.cpp | 3 +-- stepmania/src/ScreenOptions.h | 1 - stepmania/src/ScreenProfileOptions.cpp | 4 ++-- stepmania/src/ScreenPrompt.cpp | 2 +- stepmania/src/ScreenSelectCharacter.cpp | 3 +-- stepmania/src/ScreenSelectCharacter.h | 1 - stepmania/src/ScreenSelectCourse.cpp | 5 ++--- stepmania/src/ScreenSelectCourse.h | 1 - stepmania/src/ScreenSelectDifficulty.cpp | 3 +-- stepmania/src/ScreenSelectDifficulty.h | 1 - stepmania/src/ScreenSelectDifficultyEX.cpp | 3 +-- stepmania/src/ScreenSelectDifficultyEX.h | 1 - stepmania/src/ScreenSelectGroup.cpp | 3 +-- stepmania/src/ScreenSelectGroup.h | 1 - stepmania/src/ScreenSelectMaster.cpp | 3 +-- stepmania/src/ScreenSelectMaster.h | 1 - stepmania/src/ScreenSelectMusic.cpp | 3 +-- stepmania/src/ScreenSelectMusic.h | 1 - stepmania/src/ScreenSelectStyle.cpp | 3 +-- stepmania/src/ScreenSelectStyle.h | 1 - stepmania/src/ScreenTextEntry.cpp | 2 +- stepmania/src/ScreenTitleMenu.cpp | 4 +--- stepmania/src/ScreenTitleMenu.h | 2 -- 39 files changed, 37 insertions(+), 79 deletions(-) diff --git a/stepmania/src/EditCoursesMenu.cpp b/stepmania/src/EditCoursesMenu.cpp index fb03e749fd..973407c559 100644 --- a/stepmania/src/EditCoursesMenu.cpp +++ b/stepmania/src/EditCoursesMenu.cpp @@ -147,8 +147,6 @@ EditCoursesMenu::EditCoursesMenu() m_soundChangeRow.Load( THEME->GetPathToS("EditCoursesMenu row") ); m_soundChangeValue.Load( THEME->GetPathToS("EditCoursesMenu value") ); - m_soundStart.Load( THEME->GetPathToS("Common start") ); - m_soundInvalid.Load( THEME->GetPathToS("Common invalid") ); m_soundSave.Load( THEME->GetPathToS("EditCoursesMenu save") ); @@ -279,19 +277,19 @@ void EditCoursesMenu::Start() SCREENMAN->SystemMessage( "Course saved." ); break; case add_entry: - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); pCourse->m_entries.insert( pCourse->m_entries.begin()+m_iSelection[ROW_ENTRY], pCourse->m_entries[m_iSelection[ROW_ENTRY]] ); OnRowValueChanged( ROW_ENTRY ); break; case delete_selected_entry: if( pCourse->m_entries.size() == 1 ) { - m_soundInvalid.Play(); + SCREENMAN->PlayInvalidSound(); SCREENMAN->SystemMessage( "Cannot delete the last entry from a course" ); break; } - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); pCourse->m_entries.erase( pCourse->m_entries.begin()+m_iSelection[ROW_ENTRY] ); CLAMP( m_iSelection[ROW_ENTRY], 0, (int) pCourse->m_entries.size()-1 ); OnRowValueChanged( ROW_ENTRY ); @@ -391,7 +389,7 @@ void EditCoursesMenu::Start() } break; case ROW_ENTRY_PLAYER_OPTIONS: - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); GAMESTATE->m_PlayerOptions[PLAYER_1] = PlayerOptions(); GAMESTATE->m_PlayerOptions[PLAYER_1].FromString( pEntry->modifiers ); @@ -399,7 +397,7 @@ void EditCoursesMenu::Start() SCREENMAN->AddNewScreenToTop( "ScreenPlayerOptions", SM_BackFromPlayerOptions ); break; case ROW_ENTRY_SONG_OPTIONS: - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); GAMESTATE->m_SongOptions = SongOptions(); GAMESTATE->m_SongOptions.FromString( pEntry->modifiers ); @@ -407,7 +405,7 @@ void EditCoursesMenu::Start() SCREENMAN->AddNewScreenToTop( "ScreenSongOptions", SM_BackFromSongOptions ); break; default: - m_soundInvalid.Play(); + SCREENMAN->PlayInvalidSound(); return; } } diff --git a/stepmania/src/EditCoursesMenu.h b/stepmania/src/EditCoursesMenu.h index 052230bfa5..49e2a4539e 100644 --- a/stepmania/src/EditCoursesMenu.h +++ b/stepmania/src/EditCoursesMenu.h @@ -109,8 +109,6 @@ private: RageSound m_soundChangeRow; RageSound m_soundChangeValue; - RageSound m_soundStart; - RageSound m_soundInvalid; RageSound m_soundSave; }; diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index a7645be793..3c7c3f969f 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -127,7 +127,6 @@ void MusicWheel::Load() m_soundChangeMusic.Load( THEME->GetPathToS("MusicWheel change"), true ); m_soundChangeSort.Load( THEME->GetPathToS("MusicWheel sort") ); m_soundExpand.Load( THEME->GetPathToS("MusicWheel expand") ); - m_soundStart.Load( THEME->GetPathToS("Common start") ); m_soundLocked.Load( THEME->GetPathToS("MusicWheel locked"), true ); @@ -1002,7 +1001,7 @@ void MusicWheel::Update( float fDeltaTime ) if( (GAMESTATE->IsExtraStage() && !PREFSMAN->m_bPickExtraStage) || GAMESTATE->IsExtraStage2() ) { m_WheelState = STATE_LOCKED; - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); m_fLockedWheelVelocity = 0; } else @@ -1029,7 +1028,7 @@ void MusicWheel::Update( float fDeltaTime ) { m_WheelState = STATE_LOCKED; m_fTimeLeftInState = 0; - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); m_fLockedWheelVelocity = 0; /* Send this again so the screen starts sample music. */ @@ -1236,7 +1235,7 @@ bool MusicWheel::Select() // return true if this selection ends the screen { m_fPositionOffsetFromSelection = max(m_fPositionOffsetFromSelection, 0.3f); m_WheelState = STATE_LOCKED; - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); m_fLockedWheelVelocity = 0; SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); return false; @@ -1324,7 +1323,7 @@ void MusicWheel::StartLeap() m_iSelection = rand() % m_CurWheelItemData.size(); m_fPositionOffsetFromSelection = 0; m_WheelState = STATE_SELECTING_MUSIC; - m_soundStart.Play(); + SCREENMAN->PlayStartSound(); SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); RebuildMusicWheelItems(); } diff --git a/stepmania/src/MusicWheel.h b/stepmania/src/MusicWheel.h index 3c851a9102..a3d3b348d0 100644 --- a/stepmania/src/MusicWheel.h +++ b/stepmania/src/MusicWheel.h @@ -125,7 +125,6 @@ protected: RageSound m_soundChangeMusic; RageSound m_soundChangeSort; RageSound m_soundExpand; - RageSound m_soundStart; RageSound m_soundLocked; bool WheelItemIsVisible(int n); diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 29849e5493..e7c4eb1af9 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -56,8 +56,6 @@ ScreenAttract::ScreenAttract( CString sName, bool bResetGameState ) : Screen( sN SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sName) ); - m_soundStart.Load( THEME->GetPathToS("Common start") ); - if( GAMESTATE->IsTimeToPlayAttractSounds() ) SOUND->PlayMusic( THEME->GetPathToS(m_sName + " music") ); else diff --git a/stepmania/src/ScreenAttract.h b/stepmania/src/ScreenAttract.h index 7a6ab374bc..47c8385b2e 100644 --- a/stepmania/src/ScreenAttract.h +++ b/stepmania/src/ScreenAttract.h @@ -34,7 +34,6 @@ protected: BGAnimation m_Background; Transition m_In; Transition m_Out; - RandomSample m_soundStart; }; diff --git a/stepmania/src/ScreenCenterImage.cpp b/stepmania/src/ScreenCenterImage.cpp index 40ee943018..71a8b8af7d 100644 --- a/stepmania/src/ScreenCenterImage.cpp +++ b/stepmania/src/ScreenCenterImage.cpp @@ -133,7 +133,7 @@ void ScreenCenterImage::Input( const DeviceInput& DeviceI, const InputEventType case SDLK_KP_ENTER: if(!IsTransitioning()) { - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); StartTransitioning( SM_GoToNextScreen ); } } diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 7aa2986372..525125a3d5 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -960,7 +960,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ case SDLK_F5: if( it==vSteps.begin() ) { - SOUND->PlayOnce( THEME->GetPathToS("Common invalid") ); + SCREENMAN->PlayInvalidSound(); return; } it--; @@ -969,7 +969,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ it++; if( it==vSteps.end() ) { - SOUND->PlayOnce( THEME->GetPathToS("Common invalid") ); + SCREENMAN->PlayInvalidSound(); return; } break; @@ -2144,7 +2144,7 @@ void ScreenEdit::HandleBGChangeChoice( BGChangeChoice c, int* iAnswers ) change.m_sBGName = ""; break; default: - SOUND->PlayOnce( THEME->GetPathToS("Common invalid") ); + SCREENMAN->PlayInvalidSound(); }; change.m_fRate = (float)atof( g_BGChange.rows[rate].choices[iAnswers[rate]] )/100.f; diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index 4151b64563..3d6e5d2e9c 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -104,7 +104,6 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic( CString sName ) : ScreenWithMenuElem m_soundButtonPress.Load( THEME->GetPathToS("ScreenEz2SelectMusic buttonpress")); m_soundMusicChange.Load( THEME->GetPathToS("ScreenEz2SelectMusic change")); m_soundMusicCycle.Load( THEME->GetPathToS("ScreenEz2SelectMusic cycle")); - m_soundSelect.Load( THEME->GetPathToS("Common start") ); m_ChoiceListFrame.Load( THEME->GetPathToG("ScreenEz2SelectMusic list frame")); m_ChoiceListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y); @@ -252,7 +251,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START ) { - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); m_bGoToOptions = true; m_sprOptionsMessage.SetState( 1 ); } @@ -459,7 +458,7 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn ) return; } - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); if((PREVIEWMUSICMODE == 1 || PREVIEWMUSICMODE == 3) && iConfirmSelection == 0) { diff --git a/stepmania/src/ScreenEz2SelectMusic.h b/stepmania/src/ScreenEz2SelectMusic.h index b766b2b316..317430bf26 100644 --- a/stepmania/src/ScreenEz2SelectMusic.h +++ b/stepmania/src/ScreenEz2SelectMusic.h @@ -94,9 +94,6 @@ protected: #endif int iConfirmSelection; - - - RageSound m_soundSelect; }; diff --git a/stepmania/src/ScreenEz2SelectPlayer.cpp b/stepmania/src/ScreenEz2SelectPlayer.cpp index 844a69327a..2c84c47f4a 100644 --- a/stepmania/src/ScreenEz2SelectPlayer.cpp +++ b/stepmania/src/ScreenEz2SelectPlayer.cpp @@ -90,8 +90,6 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer( CString sName ) : ScreenWithMenuEl } } - m_soundSelect.Load( THEME->GetPathToS("Common start") ); - SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("select player intro") ); SOUND->PlayMusic( THEME->GetPathToS("ScreenSelectPlayer music") ); @@ -209,7 +207,7 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn ) GAMESTATE->m_bSideIsJoined[pn] = true; SCREENMAN->RefreshCreditsMessages(); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); m_sprJoinMessage[pn].SetState( pn+NUM_PLAYERS ); if( FOLD_ON_JOIN ) diff --git a/stepmania/src/ScreenEz2SelectPlayer.h b/stepmania/src/ScreenEz2SelectPlayer.h index b20fbd115d..44bfa30c44 100644 --- a/stepmania/src/ScreenEz2SelectPlayer.h +++ b/stepmania/src/ScreenEz2SelectPlayer.h @@ -33,6 +33,5 @@ private: Sprite m_sprJoinMessage[NUM_PLAYERS]; Sprite m_sprJoinFrame[NUM_PLAYERS]; - RageSound m_soundSelect; BGAnimation m_Background; }; diff --git a/stepmania/src/ScreenJukeboxMenu.cpp b/stepmania/src/ScreenJukeboxMenu.cpp index fb2e0346b1..f509c49cef 100644 --- a/stepmania/src/ScreenJukeboxMenu.cpp +++ b/stepmania/src/ScreenJukeboxMenu.cpp @@ -53,8 +53,6 @@ ScreenJukeboxMenu::ScreenJukeboxMenu( CString sClassName ) : ScreenWithMenuEleme m_textExplanation.SetZoom( 0.7f ); this->AddChild( &m_textExplanation ); - m_soundInvalid.Load( THEME->GetPathToS("Common invalid") ); - SOUND->PlayMusic( THEME->GetPathToS("ScreenJukeboxMenu music") ); } @@ -132,14 +130,14 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn ) { /* No songs are available for the selected style, group, and difficulty. */ - m_soundInvalid.Play(); + SCREENMAN->PlayInvalidSound(); SCREENMAN->SystemMessage( "No songs available with these settings" ); return; } SOUND->StopMusic(); - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); StartTransitioning( SM_GoToNextScreen ); } diff --git a/stepmania/src/ScreenJukeboxMenu.h b/stepmania/src/ScreenJukeboxMenu.h index 940f58a5e1..53d9762894 100644 --- a/stepmania/src/ScreenJukeboxMenu.h +++ b/stepmania/src/ScreenJukeboxMenu.h @@ -36,8 +36,6 @@ private: JukeboxMenu m_Selector; BitmapText m_textExplanation; - - RageSound m_soundInvalid; }; diff --git a/stepmania/src/ScreenMapControllers.cpp b/stepmania/src/ScreenMapControllers.cpp index 6e7d6d2e89..496f3eee09 100644 --- a/stepmania/src/ScreenMapControllers.cpp +++ b/stepmania/src/ScreenMapControllers.cpp @@ -192,7 +192,7 @@ void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventTy if ( DeviceI.device == DEVICE_KEYBOARD && (DeviceI.button >= SDLK_F1 && DeviceI.button <= SDLK_F12) ) { m_textError.SetText( "That key can not be mapped." ); - SOUND->PlayOnce( THEME->GetPathToS("Common invalid" ) ); + SCREENMAN->PlayInvalidSound(); m_textError.StopTweening(); m_textError.SetDiffuse( RageColor(0,1,0,1) ); m_textError.BeginTweening( 3 ); @@ -263,7 +263,7 @@ void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventTy case SDLK_ESCAPE: /* Quit the screen. */ if(!IsTransitioning()) { - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); StartTransitioning( SM_GoToNextScreen ); for( int b=0; bGetCurrentGameDef()->m_iButtonsPerController; b++ ) m_Line[b].Command( (b%2)? ODD_LINE_OUT:EVEN_LINE_OUT ); diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 3f8fd18ddd..04c60eae1c 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -228,7 +228,7 @@ void ScreenMiniMenu::MenuStart( PlayerNumber pn, const InputEventType type ) m_Out.StartTransitioning( SM_GoToOK ); - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); s_iLastLine = m_iCurLine; COPY( s_iLastAnswers, m_iCurAnswers ); diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 3239782167..c0b2c4e714 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -102,7 +102,6 @@ ScreenOptions::ScreenOptions( CString sClassName ) : ScreenWithMenuElements(sCla m_SoundChangeCol.Load( THEME->GetPathToS("ScreenOptions change"), true ); m_SoundNextRow.Load( THEME->GetPathToS("ScreenOptions next"), true ); m_SoundPrevRow.Load( THEME->GetPathToS("ScreenOptions prev"), true ); - m_SoundStart.Load( THEME->GetPathToS("Common start") ); m_SoundToggleOn.Load( THEME->GetPathToS("ScreenOptions toggle on") ); m_SoundToggleOff.Load( THEME->GetPathToS("ScreenOptions toggle off") ); @@ -957,7 +956,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) return; /* already transitioning */ StartTransitioning( SM_GoToNextScreen ); - m_SoundStart.Play(); + SCREENMAN->PlayStartSound(); m_framePage.Command( FRAME_OFF_COMMAND ); break; diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index bc329732f3..3243b2d585 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -180,7 +180,6 @@ protected: RageSound m_SoundChangeCol; RageSound m_SoundNextRow; RageSound m_SoundPrevRow; - RageSound m_SoundStart; RageSound m_SoundToggleOn; RageSound m_SoundToggleOff; }; diff --git a/stepmania/src/ScreenProfileOptions.cpp b/stepmania/src/ScreenProfileOptions.cpp index a2fa32798b..c45272d87c 100644 --- a/stepmania/src/ScreenProfileOptions.cpp +++ b/stepmania/src/ScreenProfileOptions.cpp @@ -193,7 +193,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type const CString sName = GetSelectedProfileName(); if( sProfileID=="" ) - SOUND->PlayOnce( THEME->GetPathToS("common invalid") ); + SCREENMAN->PlayInvalidSound(); else SCREENMAN->Prompt( SM_DoneDeleting, ssprintf("Delete profile %s '%s'?",sProfileID.c_str(),sName.c_str()), true ); break; @@ -204,7 +204,7 @@ void ScreenProfileOptions::MenuStart( PlayerNumber pn, const InputEventType type const CString sName = GetSelectedProfileName(); if( sProfileID=="" ) - SOUND->PlayOnce( THEME->GetPathToS("common invalid") ); + SCREENMAN->PlayInvalidSound(); else SCREENMAN->TextEntry( SM_DoneRenaming, ssprintf("Rename profile %s '%s'",sProfileID.c_str(),sName.c_str()), sName, NULL ); break; diff --git a/stepmania/src/ScreenPrompt.cpp b/stepmania/src/ScreenPrompt.cpp index 0311a7bd1d..9de59afd08 100644 --- a/stepmania/src/ScreenPrompt.cpp +++ b/stepmania/src/ScreenPrompt.cpp @@ -174,7 +174,7 @@ void ScreenPrompt::MenuStart( PlayerNumber pn ) m_textAnswer[1].BeginTweening( 0.2f ); m_textAnswer[1].SetDiffuse( RageColor(1,1,1,0) ); - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); if( m_bAnswer ) { diff --git a/stepmania/src/ScreenSelectCharacter.cpp b/stepmania/src/ScreenSelectCharacter.cpp index 291a30053b..b365a9d11a 100644 --- a/stepmania/src/ScreenSelectCharacter.cpp +++ b/stepmania/src/ScreenSelectCharacter.cpp @@ -150,7 +150,6 @@ ScreenSelectCharacter::ScreenSelectCharacter( CString sClassName ) : ScreenWithM m_soundChange.Load( THEME->GetPathToS("ScreenSelectCharacter change") ); - m_soundSelect.Load( THEME->GetPathToS("Common start") ); SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group intro") ); @@ -356,7 +355,7 @@ void ScreenSelectCharacter::MenuStart( PlayerNumber pn ) } AfterRowChange(pn); AfterValueChange(pn); - m_soundSelect.PlayRandom(); + SCREENMAN->PlayStartSound(); bool bAllAreFinished = true; for( int p=0; pAddChild( &m_sprOptionsMessage ); // draw and update manually - m_soundSelect.Load( THEME->GetPathToS("Common start") ); m_soundOptionsChange.Load( THEME->GetPathToS("ScreenSelectCourse options") ); m_soundChangeNotes.Load( THEME->GetPathToS("ScreenSelectCourse difficulty") ); @@ -248,7 +247,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type, m_bGoToOptions = true; m_sprOptionsMessage.SetState( 1 ); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); return; } @@ -338,7 +337,7 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn ) TweenOffScreen(); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); m_bMadeChoice = true; diff --git a/stepmania/src/ScreenSelectCourse.h b/stepmania/src/ScreenSelectCourse.h index 6183488128..cb81737c29 100644 --- a/stepmania/src/ScreenSelectCourse.h +++ b/stepmania/src/ScreenSelectCourse.h @@ -57,7 +57,6 @@ protected: bool m_bGoToOptions, m_bAllowOptionsMenuRepeat; Sprite m_sprOptionsMessage; - RageSound m_soundSelect; RageSound m_soundOptionsChange; RageSound m_soundChangeNotes; }; diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index 7ca5c61f50..ce5b13eb70 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -116,7 +116,6 @@ ScreenSelectDifficulty::ScreenSelectDifficulty( CString sClassName ) : ScreenSel this->AddChild( &m_framePages ); m_soundChange.Load( THEME->GetPathToS( m_sName + " change") ); - m_soundSelect.Load( THEME->GetPathToS( "Common start") ); m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") ); m_fLockInputTime = LOCK_INPUT_SECONDS; @@ -384,7 +383,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn ) if( bPlaySelect ) { SOUND->PlayOnceFromAnnouncer( ssprintf("ScreenSelectDifficulty comment %s",mc.m_sName.c_str()) ); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); } int p; diff --git a/stepmania/src/ScreenSelectDifficulty.h b/stepmania/src/ScreenSelectDifficulty.h index 0fdbdc22a7..b13141447c 100644 --- a/stepmania/src/ScreenSelectDifficulty.h +++ b/stepmania/src/ScreenSelectDifficulty.h @@ -61,7 +61,6 @@ protected: Sprite m_sprOK[NUM_PLAYERS]; RageSound m_soundChange; - RageSound m_soundSelect; RandomSample m_soundDifficult; vector m_ModeChoices[NUM_PAGES]; diff --git a/stepmania/src/ScreenSelectDifficultyEX.cpp b/stepmania/src/ScreenSelectDifficultyEX.cpp index 6b454af9e4..54eedb3f4b 100644 --- a/stepmania/src/ScreenSelectDifficultyEX.cpp +++ b/stepmania/src/ScreenSelectDifficultyEX.cpp @@ -149,7 +149,6 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX( CString sClassName ) : Scree this->AddChild( &m_framePages ); m_soundChange.Load( THEME->GetPathToS( "ScreenSelectDifficulty change") ); - m_soundSelect.Load( THEME->GetPathToS( "Common start") ); m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") ); m_fLockInputTime = LOCK_INPUT_SECONDS; TweenOnScreen(); @@ -393,7 +392,7 @@ void ScreenSelectDifficultyEX::MenuStart( PlayerNumber pn ) } } SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("ScreenSelectDifficulty comment %s",mc.m_sName.c_str())) ); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); } if( IsACourse( m_iChoice[pn] ) ) diff --git a/stepmania/src/ScreenSelectDifficultyEX.h b/stepmania/src/ScreenSelectDifficultyEX.h index 7ae3293325..7162112da8 100644 --- a/stepmania/src/ScreenSelectDifficultyEX.h +++ b/stepmania/src/ScreenSelectDifficultyEX.h @@ -68,7 +68,6 @@ protected: Sprite m_sprPicture[NUM_PLAYERS]; RageSound m_soundChange; - RageSound m_soundSelect; RandomSample m_soundDifficult; vector m_ModeChoices; diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 9fd46fa815..d315f4a4c7 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -135,7 +135,6 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : ScreenWithMenuEleme m_soundChange.Load( THEME->GetPathToS("ScreenSelectGroup change") ); - m_soundSelect.Load( THEME->GetPathToS("Common start") ); SOUND->PlayOnceFromAnnouncer( "select group intro" ); @@ -246,7 +245,7 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn ) if( m_bChosen ) return; - m_soundSelect.PlayRandom(); + SCREENMAN->PlayStartSound(); m_MenuTimer->Stop(); m_bChosen = true; diff --git a/stepmania/src/ScreenSelectGroup.h b/stepmania/src/ScreenSelectGroup.h index 9b3c6b7694..529cb06ac8 100644 --- a/stepmania/src/ScreenSelectGroup.h +++ b/stepmania/src/ScreenSelectGroup.h @@ -51,7 +51,6 @@ private: GroupList m_GroupList; RandomSample m_soundChange; - RandomSample m_soundSelect; bool m_bChosen; }; diff --git a/stepmania/src/ScreenSelectMaster.cpp b/stepmania/src/ScreenSelectMaster.cpp index 67c13ed42c..e261b349e1 100644 --- a/stepmania/src/ScreenSelectMaster.cpp +++ b/stepmania/src/ScreenSelectMaster.cpp @@ -201,7 +201,6 @@ ScreenSelectMaster::ScreenSelectMaster( CString sClassName ) : ScreenSelect( sCl } m_soundChange.Load( THEME->GetPathToS( ssprintf("%s change", m_sName.c_str())), true ); - m_soundSelect.Load( THEME->GetPathToS( "Common start") ); m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") ); // init m_Next order info @@ -600,7 +599,7 @@ void ScreenSelectMaster::MenuStart( PlayerNumber pn ) ModeChoice &mc = m_aModeChoices[m_iChoice[pn]]; SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("%s comment %s",m_sName.c_str(), mc.m_sName.c_str())) ); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); float fSecs = 0; bool bAllDone = true; diff --git a/stepmania/src/ScreenSelectMaster.h b/stepmania/src/ScreenSelectMaster.h index 67964f1bdc..fae1e83b84 100644 --- a/stepmania/src/ScreenSelectMaster.h +++ b/stepmania/src/ScreenSelectMaster.h @@ -81,7 +81,6 @@ protected: ActorScroller m_Scroller[NUM_PLAYERS]; RageSound m_soundChange; - RageSound m_soundSelect; RandomSample m_soundDifficult; int m_iChoice[NUM_PLAYERS]; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index ca60259dd5..9783e2fd67 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -321,7 +321,6 @@ ScreenSelectMusic::ScreenSelectMusic( CString sClassName ) : ScreenWithMenuEleme m_bgNoOptionsOut.Load( THEME->GetPathToB(m_sName+" no options out") ); // this->AddChild( &m_bgNoOptionsOut ); // drawn on top - m_soundSelect.Load( THEME->GetPathToS("Common start") ); m_soundDifficultyEasier.Load( THEME->GetPathToS("ScreenSelectMusic difficulty easier") ); m_soundDifficultyHarder.Load( THEME->GetPathToS("ScreenSelectMusic difficulty harder") ); m_soundOptionsChange.Load( THEME->GetPathToS("ScreenSelectMusic options") ); @@ -1104,7 +1103,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) if( m_bMadeChoice ) { TweenOffScreen(); - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) { diff --git a/stepmania/src/ScreenSelectMusic.h b/stepmania/src/ScreenSelectMusic.h index cf76c18473..ba3022177f 100644 --- a/stepmania/src/ScreenSelectMusic.h +++ b/stepmania/src/ScreenSelectMusic.h @@ -115,7 +115,6 @@ protected: Transition m_bgOptionsOut; Transition m_bgNoOptionsOut; - RageSound m_soundSelect; RageSound m_soundDifficultyEasier; RageSound m_soundDifficultyHarder; RageSound m_soundOptionsChange; diff --git a/stepmania/src/ScreenSelectStyle.cpp b/stepmania/src/ScreenSelectStyle.cpp index 4873d24ea3..ced26b98f9 100644 --- a/stepmania/src/ScreenSelectStyle.cpp +++ b/stepmania/src/ScreenSelectStyle.cpp @@ -125,7 +125,6 @@ ScreenSelectStyle::ScreenSelectStyle( CString sClassName ) : ScreenSelect( sClas m_soundChange.Load( THEME->GetPathToS(m_sName + " change") ); - m_soundSelect.Load( THEME->GetPathToS("Common start") ); // @@ -188,7 +187,7 @@ void ScreenSelectStyle::MenuRight( PlayerNumber pn ) void ScreenSelectStyle::MenuStart( PlayerNumber pn ) { - m_soundSelect.Play(); + SCREENMAN->PlayStartSound(); SCREENMAN->SendMessageToTopScreen( SM_AllDoneChoosing ); const ModeChoice& mc = m_aModeChoices[GetSelectionIndex(pn)]; diff --git a/stepmania/src/ScreenSelectStyle.h b/stepmania/src/ScreenSelectStyle.h index e60fbd1b7f..a2a5477742 100644 --- a/stepmania/src/ScreenSelectStyle.h +++ b/stepmania/src/ScreenSelectStyle.h @@ -46,7 +46,6 @@ protected: Sprite m_sprPremium; RageSound m_soundChange; - RageSound m_soundSelect; int m_iSelection; }; diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index 8283c2959b..3c55861df2 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -206,7 +206,7 @@ void ScreenTextEntry::MenuStart( PlayerNumber pn ) m_textAnswer.BeginTweening( 0.2f ); m_textAnswer.SetDiffuse( RageColor(1,1,1,0) ); - SOUND->PlayOnce( THEME->GetPathToS("Common start") ); + SCREENMAN->PlayStartSound(); if( m_bCancelled ) { diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 39f31df458..3afa125c1e 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -173,8 +173,6 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam m_soundChange.Load( THEME->GetPathToS("ScreenTitleMenu change"),true ); - m_soundSelect.Load( THEME->GetPathToS("Common start") ); - m_soundInvalid.Load( THEME->GetPathToS("Common invalid") ); m_Choice = 0; @@ -261,7 +259,7 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty CString why; if( !mc.IsPlayable( &why ) ) { - m_soundInvalid.Play(); + SCREENMAN->PlayInvalidSound(); if( why != "" ) SCREENMAN->SystemMessage( why ); return; diff --git a/stepmania/src/ScreenTitleMenu.h b/stepmania/src/ScreenTitleMenu.h index cd770b09b8..30b1ea82d5 100644 --- a/stepmania/src/ScreenTitleMenu.h +++ b/stepmania/src/ScreenTitleMenu.h @@ -47,8 +47,6 @@ private: BitmapText m_textChoice[MAX_MODE_CHOICES]; RageSound m_soundChange; - RageSound m_soundSelect; - RageSound m_soundInvalid; RageTimer TimeToDemonstration;