From: Glenn M. <gma...@us...> - 2005-07-22 23:08:37
|
Update of /cvsroot/stepmania/stepmania/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9807 Modified Files: Screen.cpp Log Message: prepare and group screens in the screen using them, not in the screen going to that screen (eg. not in GameCommand) Index: Screen.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/Screen.cpp,v retrieving revision 1.163 retrieving revision 1.164 diff -u -d -p -r1.163 -r1.164 --- Screen.cpp 22 Jul 2005 09:11:17 -0000 1.163 +++ Screen.cpp 22 Jul 2005 23:08:28 -0000 1.164 @@ -4,6 +4,7 @@ #include "GameState.h" #include "PrefsManager.h" #include "RageSound.h" +#include "RageLog.h" #include "ThemeManager.h" #include "ScreenManager.h" #include "GameSoundManager.h" @@ -11,6 +12,8 @@ #define NEXT_SCREEN THEME->GetMetric (m_sName,"NextScreen") #define PREV_SCREEN THEME->GetMetric (m_sName,"PrevScreen") +#define SCREENS_TO_PREPARE THEME->GetMetric (m_sName,"ScreensToPrepare") +#define SCREENS_TO_GROUP THEME->GetMetric (m_sName,"ScreensToGroup") Screen::Screen( CString sName ) { @@ -33,6 +36,19 @@ bool Screen::SortMessagesByDelayRemainin void Screen::Init() { this->RunCommands( THEME->GetMetricA(m_sName, "InitCommand") ); + + vector<CString> asList; + split( SCREENS_TO_PREPARE, ",", asList ); + for( unsigned i = 0; i < asList.size(); ++i ) + { + LOG->Trace( "Screen %s preparing \"%s\"", asList[i].c_str() ); + SCREENMAN->PrepareScreen( asList[i] ); + } + + asList.clear(); + split( SCREENS_TO_GROUP, ",", asList ); + for( unsigned i = 0; i < asList.size(); ++i ) + SCREENMAN->GroupScreen( asList[i] ); } void Screen::Update( float fDeltaTime ) |