From ae22b80bd58db61250d302e450a1f42047e59c59 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 18 Feb 2004 02:31:43 +0000 Subject: [PATCH] speed up compiles slightly --- stepmania/src/ScreenEvaluation.cpp | 5 +++++ stepmania/src/ScreenEvaluation.h | 1 + stepmania/src/ScreenGameplay.cpp | 16 +++++++++------- stepmania/src/ScreenGameplay.h | 3 ++- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 58a07c8552..e795482076 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -94,6 +94,11 @@ const ScreenMessage SM_PlayCheer = ScreenMessage(SM_User+6); ScreenEvaluation::ScreenEvaluation( CString sClassName ) : Screen(sClassName) +{ + Init(); // work around horrible gcc bug 3187 +} + +void ScreenEvaluation::Init() { // // debugging diff --git a/stepmania/src/ScreenEvaluation.h b/stepmania/src/ScreenEvaluation.h index fc92a6498b..83e13edbd3 100644 --- a/stepmania/src/ScreenEvaluation.h +++ b/stepmania/src/ScreenEvaluation.h @@ -59,6 +59,7 @@ public: virtual void MenuStart( PlayerNumber pn ); protected: + void Init(); void CommitScores( const StageStats &stageStats, int iPersonalHighScoreIndex[NUM_PLAYERS], int iMachineHighScoreIndex[NUM_PLAYERS], RankingCategory rc[NUM_PLAYERS] ); void EndScreen(); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index b0fad55f24..989f232692 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -89,12 +89,14 @@ const ScreenMessage SM_StopHereWeGo = ScreenMessage(SM_User+41); ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen(sName) { - LOG->Trace( "ScreenGameplay::ScreenGameplay()" ); + m_bDemonstration = bDemonstration; + Init(); // work around horrible gcc bug 3187 +} +void ScreenGameplay::Init() +{ int p; - m_bDemonstration = bDemonstration; - if( m_bDemonstration ) LIGHTSMAN->SetLightMode( LIGHTMODE_DEMONSTRATION ); else @@ -297,7 +299,7 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen(sN m_sprStaticBackground.SetZ( 2 ); // behind everything else this->AddChild(&m_sprStaticBackground); - if( !bDemonstration ) // only load if we're going to use it + if( !m_bDemonstration ) // only load if we're going to use it { m_Toasty.Load( THEME->GetPathToB("ScreenGameplay toasty") ); this->AddChild( &m_Toasty ); @@ -612,7 +614,7 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen(sN m_textAutoPlay.LoadFromFont( THEME->GetPathToF("ScreenGameplay autoplay") ); m_textAutoPlay.SetName( "AutoPlay" ); SET_XY( m_textAutoPlay ); - if( !bDemonstration ) // only load if we're not in demonstration of jukebox + if( !m_bDemonstration ) // only load if we're not in demonstration of jukebox this->AddChild( &m_textAutoPlay ); UpdateAutoPlayText(); @@ -636,7 +638,7 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen(sN } - if( !bDemonstration ) // only load if we're going to use it + if( !m_bDemonstration ) // only load if we're going to use it { m_Ready.Load( THEME->GetPathToB("ScreenGameplay ready") ); this->AddChild( &m_Ready ); @@ -713,7 +715,7 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen(sN this->SortByZ(); - if( !bDemonstration ) // only load if we're going to use it + if( !m_bDemonstration ) // only load if we're going to use it { m_soundAssistTick.Load( THEME->GetPathToS("ScreenGameplay assist tick"), true ); diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index d4de09387c..bba7ec9ec4 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -60,7 +60,8 @@ class LyricsLoader; class ScreenGameplay : public Screen { public: - ScreenGameplay( CString sName, bool bDemonstration = false ); + ScreenGameplay( CString sName, bool bDemonstration ); + void Init(); virtual ~ScreenGameplay(); virtual void Update( float fDeltaTime );