From 1a3d247dbf15cfd72f5d200badccd2802788f417 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 10 Oct 2005 04:50:53 +0000 Subject: [PATCH] simplify: m_bGameplayLeadIn is regular state, not music state; reset in Reset(), not ResetMusicStatistics --- stepmania/src/GameState.cpp | 6 +++--- stepmania/src/ScreenGameplay.cpp | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 19e9ddfaa3..aa388d3851 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -194,6 +194,7 @@ void GameState::Reset() m_bDemonstrationOrJukebox = false; m_bJukeboxUsesModifiers = false; m_iCurrentStageIndex = 0; + m_bGameplayLeadIn.Set( false ); m_BeatToNoteSkinRev = 0; m_iNumStagesOfThisSong = 0; @@ -583,7 +584,6 @@ void GameState::ResetMusicStatistics() m_fSongBeat = 0; m_fCurBPS = 10; m_bFreeze = false; - m_bGameplayLeadIn.Set( false ); Actor::SetBGMTime( 0, 0 ); } @@ -2007,7 +2007,7 @@ public: static int IsEventMode( T* p, lua_State *L ) { lua_pushboolean(L, p->IsEventMode() ); return 1; } static int GetNumPlayersEnabled( T* p, lua_State *L ) { lua_pushnumber(L, p->GetNumPlayersEnabled() ); return 1; } static int GetSongBeat( T* p, lua_State *L ) { lua_pushnumber(L, p->m_fSongBeat ); return 1; } - static int GetGameplayStarting( T* p, lua_State *L ) { lua_pushnumber(L, p->m_bGameplayLeadIn ); return 1; } + static int GetGameplayLeadIn( T* p, lua_State *L ) { lua_pushnumber(L, p->m_bGameplayLeadIn ); return 1; } static int PlayerUsingBothSides( T* p, lua_State *L ) { lua_pushboolean(L, p->PlayerUsingBothSides() ); return 1; } static int GetCoins( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iCoins ); return 1; } static int IsSideJoined( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bSideIsJoined[(PlayerNumber)IArg(1)] ); return 1; } @@ -2088,7 +2088,7 @@ public: ADD_METHOD( IsEventMode ); ADD_METHOD( GetNumPlayersEnabled ); ADD_METHOD( GetSongBeat ); - ADD_METHOD( GetGameplayStarting ); + ADD_METHOD( GetGameplayLeadIn ); ADD_METHOD( PlayerUsingBothSides ); ADD_METHOD( GetCoins ); ADD_METHOD( IsSideJoined ); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 07e11e84ba..a372f6e5a5 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -862,6 +862,8 @@ void ScreenGameplay::Init() pi->m_pSecondaryScoreKeeper->Load( m_apSongsQueue, pi->m_vpStepsQueue, pi->m_asModifiersQueue ); } + GAMESTATE->m_bGameplayLeadIn.Set( true ); + /* LoadNextSong first, since that positions some elements which need to be * positioned before we TweenOnScreen. */ LoadNextSong(); @@ -1061,8 +1063,6 @@ void ScreenGameplay::LoadNextSong() { GAMESTATE->ResetMusicStatistics(); - GAMESTATE->m_bGameplayLeadIn.Set( true ); - FOREACH_EnabledPlayerInfoNotDummy( m_vPlayerInfo, pi ) { pi->GetPlayerStageStats()->iSongsPlayed++; @@ -2494,7 +2494,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) COMMAND( m_sprCourseSongNumber, "ChangeOut" ); LoadNextSong(); - GAMESTATE->m_bGameplayLeadIn.Set( false ); m_NextSong.Reset(); m_NextSong.PlayCommand( "Finish" );