From b0df6d2d68fdeb2571673aefe4e1969973de8f5e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 10 Oct 2005 02:24:58 +0000 Subject: [PATCH] broadcast bPastHereWeGo --- stepmania/src/GameState.cpp | 3 ++- stepmania/src/GameState.h | 2 +- stepmania/src/MessageManager.h | 1 + stepmania/src/ScreenDemonstration.cpp | 2 +- stepmania/src/ScreenEdit.cpp | 6 +++--- stepmania/src/ScreenGameplay.cpp | 4 ++-- stepmania/src/ScreenGameplayLesson.cpp | 2 +- stepmania/src/ScreenHowToPlay.cpp | 2 +- stepmania/src/ScreenJukebox.cpp | 2 +- stepmania/src/ScreenNameEntry.cpp | 2 +- 10 files changed, 14 insertions(+), 12 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 691fb02be8..aa4575ca09 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -73,6 +73,7 @@ GameState::GameState() : m_pCurSteps( Message_CurrentStepsP1Changed ), m_pCurCourse( Message_CurrentCourseChanged ), m_pCurTrail( Message_CurrentTrailP1Changed ), + m_bPastHereWeGo( Message_HereWeGoChanged ), m_stEdit( Message_EditStepsTypeChanged ), m_pEditSourceSteps( Message_EditSourceStepsChanged ), m_stEditSource( Message_EditSourceStepsTypeChanged ), @@ -582,7 +583,7 @@ void GameState::ResetMusicStatistics() m_fSongBeat = 0; m_fCurBPS = 10; m_bFreeze = false; - m_bPastHereWeGo = false; + m_bPastHereWeGo.Set( false ); Actor::SetBGMTime( 0, 0 ); } diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index d8fb49858f..2319893091 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -160,7 +160,7 @@ public: float m_fLightSongBeat; // g_fLightsFalloffSeconds ahead bool m_bFreeze; // in the middle of a freeze RageTimer m_LastBeatUpdate; // time of last m_fSongBeat, etc. update - bool m_bPastHereWeGo; + BroadcastOnChange m_bPastHereWeGo; int m_BeatToNoteSkinRev; /* hack: incremented whenever m_BeatToNoteSkin changes */ void ResetNoteSkins(); diff --git a/stepmania/src/MessageManager.h b/stepmania/src/MessageManager.h index 8a7474ece1..cb61264766 100644 --- a/stepmania/src/MessageManager.h +++ b/stepmania/src/MessageManager.h @@ -35,6 +35,7 @@ enum Message Message_CurrentCourseChanged, Message_CurrentTrailP1Changed, Message_CurrentTrailP2Changed, + Message_HereWeGoChanged, Message_EditStepsTypeChanged, Message_EditSourceStepsChanged, Message_EditSourceStepsTypeChanged, diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index bb1ec9d99f..0082d17b52 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -66,7 +66,7 @@ void ScreenDemonstration::Init() ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that drive "ready", "go", etc. - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); m_DancingState = STATE_DANCING; this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 261401b07d..5f3d392b60 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -602,7 +602,7 @@ void ScreenEdit::Init() m_fBeatToReturnTo = 0; - GAMESTATE->m_bPastHereWeGo = false; + GAMESTATE->m_bPastHereWeGo.Set( false ); GAMESTATE->m_EditMode = EDIT_MODE.GetValue(); GAMESTATE->m_fSongBeat = 0; m_fTrailingBeat = GAMESTATE->m_fSongBeat; @@ -1927,7 +1927,7 @@ void ScreenEdit::TransitionEditState( EditState em ) SOUND->StopMusic(); m_soundMusic.StopPlaying(); m_soundAssistTick.StopPlaying(); - GAMESTATE->m_bPastHereWeGo = false; + GAMESTATE->m_bPastHereWeGo.Set( false ); switch( old ) { @@ -1988,7 +1988,7 @@ void ScreenEdit::TransitionEditState( EditState em ) float fSeconds = m_pSong->m_Timing.GetElapsedTimeFromBeat( NoteRowToBeat(m_iStartPlayingAt) ) - 1; GAMESTATE->UpdateSongPosition( fSeconds, m_pSong->m_Timing ); - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); /* Reset the note skin, in case preferences have changed. */ GAMESTATE->ResetNoteSkins(); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index ade502988d..1ee841e9bf 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -2315,7 +2315,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) SOUND->PlayOnceFromAnnouncer( "gameplay here we go normal" ); m_Go.StartTransitioning( SM_None ); - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); m_DancingState = STATE_DANCING; // STATE CHANGE! Now the user is allowed to press Back } else if( SM == SM_NotesEnded ) // received while STATE_DANCING @@ -2492,7 +2492,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) COMMAND( m_sprCourseSongNumber, "ChangeOut" ); LoadNextSong(); - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); m_NextSong.Reset(); m_NextSong.PlayCommand( "Finish" ); diff --git a/stepmania/src/ScreenGameplayLesson.cpp b/stepmania/src/ScreenGameplayLesson.cpp index cd0873815f..d34101ea81 100644 --- a/stepmania/src/ScreenGameplayLesson.cpp +++ b/stepmania/src/ScreenGameplayLesson.cpp @@ -24,7 +24,7 @@ void ScreenGameplayLesson::Init() ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that animate "ready", "here we go", etc. - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); m_DancingState = STATE_DANCING; diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index 4b00134d5a..25004453e5 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -149,7 +149,7 @@ void ScreenHowToPlay::Init() pStyle->GetTransformedNoteDataForStyle( PLAYER_1, tempNoteData, m_NoteData ); GAMESTATE->m_pCurSong.Set( &m_Song ); - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerController = PC_AUTOPLAY; m_pPlayer = new Player; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index de758208f0..7363e82ecf 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -237,7 +237,7 @@ void ScreenJukebox::Init() ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that animate "ready", "here we go", etc. - GAMESTATE->m_bPastHereWeGo = true; + GAMESTATE->m_bPastHereWeGo.Set( true ); m_DancingState = STATE_DANCING; } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 722911e4bc..561b055fd4 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -154,7 +154,7 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName ) } - GAMESTATE->m_bPastHereWeGo = true; // enable the gray arrows + GAMESTATE->m_bPastHereWeGo.Set( true ); // enable the gray arrows FOREACH_PlayerNumber( p ) {