diff --git a/src/GameState.cpp b/src/GameState.cpp index a720dcbd89..9b030ff98d 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -106,6 +106,7 @@ static Preference g_Premium( "Premium", Premium_Off ); Preference GameState::m_bAutoJoin( "AutoJoin", false ); GameState::GameState() : + processedTiming( NULL ), m_pCurGame( Message_CurrentGameChanged ), m_pCurStyle( Message_CurrentStyleChanged ), m_PlayMode( Message_PlayModeChanged ), @@ -200,6 +201,16 @@ void GameState::SetMasterPlayerNumber(const PlayerNumber p) this->masterPlayerNumber = p; } +TimingData * GameState::GetProcessedTimingData() const +{ + return this->processedTiming; +} + +void GameState::SetProcessedTimingData(TimingData t) +{ + this->processedTiming = &t; +} + void GameState::ApplyGameCommand( const RString &sCommand, PlayerNumber pn ) { GameCommand m; diff --git a/src/GameState.h b/src/GameState.h index 79618aa711..463cc8c2ca 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -37,6 +37,8 @@ class GameState { /** @brief The player number used with Styles where one player controls both sides. */ PlayerNumber masterPlayerNumber; + /** @brief The TimingData that is used for processing certain functions. */ + TimingData * processedTiming; public: /** @brief Set up the GameState with initial values. */ GameState(); @@ -149,6 +151,16 @@ public: * @brief Set the master player number. * @param p the master player number. */ void SetMasterPlayerNumber(const PlayerNumber p); + + /** + * @brief Retrieve the present timing data being processed. + * @return the timing data pointer. */ + TimingData * GetProcessedTimingData() const; + + /** + * @brief Set the timing data to be used with processing. + * @param t the timing data. */ + void SetProcessedTimingData(TimingData t); bool IsCourseMode() const; bool IsBattleMode() const; // not Rave