Use Init() for all screens, so we can set state before the base class
members are loaded--they'll see resets, score finalization, etc. It also results in smaller code, due to a g++ bug that causes constructors to be emitted several times.
This commit is contained in:
@@ -24,6 +24,12 @@ const unsigned NUM_CREDIT_LINES = sizeof(CREDIT_LINES) / sizeof(CString);
|
||||
REGISTER_SCREEN_CLASS( ScreenMusicScroll );
|
||||
ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sClassName )
|
||||
{
|
||||
}
|
||||
|
||||
void ScreenMusicScroll::Init()
|
||||
{
|
||||
ScreenAttract::Init();
|
||||
|
||||
vector<Song*> arraySongs;
|
||||
SONGMAN->GetSongs( arraySongs );
|
||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||
|
||||
Reference in New Issue
Block a user