Prepare for a place to process timing data.

Hopefully what I'm thinking of won't cause too much slowdown.
This commit is contained in:
Jason Felds
2011-06-08 14:43:59 -04:00
parent d0821262d1
commit 9ac07e1e2e
2 changed files with 23 additions and 0 deletions
+11
View File
@@ -106,6 +106,7 @@ static Preference<Premium> g_Premium( "Premium", Premium_Off );
Preference<bool> GameState::m_bAutoJoin( "AutoJoin", false ); Preference<bool> GameState::m_bAutoJoin( "AutoJoin", false );
GameState::GameState() : GameState::GameState() :
processedTiming( NULL ),
m_pCurGame( Message_CurrentGameChanged ), m_pCurGame( Message_CurrentGameChanged ),
m_pCurStyle( Message_CurrentStyleChanged ), m_pCurStyle( Message_CurrentStyleChanged ),
m_PlayMode( Message_PlayModeChanged ), m_PlayMode( Message_PlayModeChanged ),
@@ -200,6 +201,16 @@ void GameState::SetMasterPlayerNumber(const PlayerNumber p)
this->masterPlayerNumber = 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 ) void GameState::ApplyGameCommand( const RString &sCommand, PlayerNumber pn )
{ {
GameCommand m; GameCommand m;
+12
View File
@@ -37,6 +37,8 @@ class GameState
{ {
/** @brief The player number used with Styles where one player controls both sides. */ /** @brief The player number used with Styles where one player controls both sides. */
PlayerNumber masterPlayerNumber; PlayerNumber masterPlayerNumber;
/** @brief The TimingData that is used for processing certain functions. */
TimingData * processedTiming;
public: public:
/** @brief Set up the GameState with initial values. */ /** @brief Set up the GameState with initial values. */
GameState(); GameState();
@@ -150,6 +152,16 @@ public:
* @param p the master player number. */ * @param p the master player number. */
void SetMasterPlayerNumber(const PlayerNumber p); 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 IsCourseMode() const;
bool IsBattleMode() const; // not Rave bool IsBattleMode() const; // not Rave