revert a bunch of LoadingWindow text that is processor bound and won't display anyway; also reverted ArchHooks in SongManager (seriously, wtf?); if we need it that badly, let's make a better structure

This commit is contained in:
Mark Cannon
2011-08-04 03:07:52 +00:00
parent ebe832a142
commit 1fc7012d2e
+11 -46
View File
@@ -17,6 +17,7 @@
#include "arch/ArchHooks/ArchHooks.h" #include "arch/ArchHooks/ArchHooks.h"
#include "arch/LoadingWindow/LoadingWindow.h" #include "arch/LoadingWindow/LoadingWindow.h"
#include "arch/Dialog/Dialog.h" #include "arch/Dialog/Dialog.h"
#include "arch/LuaDriver/LuaDriver.h"
#include <ctime> #include <ctime>
#include "ProductInfo.h" #include "ProductInfo.h"
@@ -875,7 +876,7 @@ static void MountTreeOfZips( const RString &dir )
FILEMAN->Mount( "zip", zips[i], "/" ); FILEMAN->Mount( "zip", zips[i], "/" );
} }
GetDirListing( path + "/*", dirs, true, true ); GetDirListing( path + "/*", dirs, true, true ); */
} }
} }
@@ -933,19 +934,6 @@ static void ApplyLogPreferences()
} }
static LocalizedString COULDNT_OPEN_LOADING_WINDOW( "LoadingWindow", "Couldn't open any loading windows." ); static LocalizedString COULDNT_OPEN_LOADING_WINDOW( "LoadingWindow", "Couldn't open any loading windows." );
static LocalizedString STARTING_SOUND ( "LoadingWindow", "Starting sound subsystem...");
static LocalizedString INIT_BOOKKEEPER ( "LoadingWindow", "Initializing bookkeeper...");
static LocalizedString START_LIGHTS ( "LoadingWindow", "Starting lights subsystem...");
static LocalizedString LOAD_GAMETYPE ( "LoadingWindow", "Loading game type...");
static LocalizedString BUILD_SONG_CACHE_INDEX ( "LoadingWindow", "Building song cache index...");
static LocalizedString LOAD_BANNER_CACHE ( "LoadingWindow", "Loading banner cache...");
static LocalizedString INIT_MEMCARD ( "LoadingWindow", "Initializing memory card system...");
static LocalizedString INIT_CHARS ( "LoadingWindow", "Initializing character system...");
static LocalizedString INIT_PROFILES ( "LoadingWindow", "Initializing profile system...");
static LocalizedString UPDATE_POPULAR ( "LoadingWindow", "Updating popular song list...");
static LocalizedString UPDATE_COURSE_RANKS ( "LoadingWindow", "Updating course rankings...");
static LocalizedString INIT_STATICS ( "LoadingWindow", "Initializing statics manager...");
static LocalizedString INIT_MESSAGE ( "LoadingWindow", "Initializing message system...");
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
@@ -1073,34 +1061,22 @@ int main(int argc, char* argv[])
if( PREFSMAN->m_iSoundWriteAhead ) if( PREFSMAN->m_iSoundWriteAhead )
LOG->Info( "Sound writeahead has been overridden to %i", PREFSMAN->m_iSoundWriteAhead.Get() ); LOG->Info( "Sound writeahead has been overridden to %i", PREFSMAN->m_iSoundWriteAhead.Get() );
pLoadingWindow->SetText(STARTING_SOUND);
SOUNDMAN = new RageSoundManager; SOUNDMAN = new RageSoundManager;
SOUNDMAN->Init(); SOUNDMAN->Init();
SOUNDMAN->SetMixVolume(); SOUNDMAN->SetMixVolume();
SOUND = new GameSoundManager; SOUND = new GameSoundManager;
pLoadingWindow->SetText(INIT_BOOKKEEPER);
BOOKKEEPER = new Bookkeeper; BOOKKEEPER = new Bookkeeper;
pLoadingWindow->SetText(START_LIGHTS);
LIGHTSMAN = new LightsManager; LIGHTSMAN = new LightsManager;
INPUTFILTER = new InputFilter; INPUTFILTER = new InputFilter;
INPUTMAPPER = new InputMapper; INPUTMAPPER = new InputMapper;
pLoadingWindow->SetText(LOAD_GAMETYPE);
StepMania::ChangeCurrentGame( GAMESTATE->GetCurrentGame() ); StepMania::ChangeCurrentGame( GAMESTATE->GetCurrentGame() );
INPUTQUEUE = new InputQueue; INPUTQUEUE = new InputQueue;
pLoadingWindow->SetText(BUILD_SONG_CACHE_INDEX);
SONGINDEX = new SongCacheIndex; SONGINDEX = new SongCacheIndex;
pLoadingWindow->SetText(LOAD_BANNER_CACHE);
BANNERCACHE = new BannerCache; BANNERCACHE = new BannerCache;
//BACKGROUNDCACHE = new BackgroundCache; //BACKGROUNDCACHE = new BackgroundCache;
#define earlyBail if( ArchHooks::UserQuit() ) { \
ShutdownGame(); \
SAFE_DELETE( pLoadingWindow ); \
return 0; \
} \
// depends on SONGINDEX: // depends on SONGINDEX:
SONGMAN = new SongManager; SONGMAN = new SongManager;
SONGMAN->InitAll(); // this takes a long time SONGMAN->InitAll(); // this takes a long time
@@ -1108,41 +1084,30 @@ int main(int argc, char* argv[])
CRYPTMAN = new CryptManager; // need to do this before ProfileMan CRYPTMAN = new CryptManager; // need to do this before ProfileMan
if( PREFSMAN->m_bSignProfileData ) if( PREFSMAN->m_bSignProfileData )
CRYPTMAN->GenerateGlobalKeys(); CRYPTMAN->GenerateGlobalKeys();
earlyBail
pLoadingWindow->SetText(INIT_MEMCARD);
MEMCARDMAN = new MemoryCardManager; MEMCARDMAN = new MemoryCardManager;
earlyBail
pLoadingWindow->SetText(INIT_CHARS);
earlyBail
CHARMAN = new CharacterManager; CHARMAN = new CharacterManager;
pLoadingWindow->SetText(INIT_PROFILES);
earlyBail
PROFILEMAN = new ProfileManager; PROFILEMAN = new ProfileManager;
PROFILEMAN->Init(); // must load after SONGMAN PROFILEMAN->Init(); // must load after SONGMAN
earlyBail
UNLOCKMAN = new UnlockManager; UNLOCKMAN = new UnlockManager;
pLoadingWindow->SetText(UPDATE_POPULAR);
earlyBail
SONGMAN->UpdatePopular(); SONGMAN->UpdatePopular();
SONGMAN->UpdatePreferredSort(); SONGMAN->UpdatePreferredSort();
earlyBail
NSMAN = new NetworkSyncManager( pLoadingWindow ); NSMAN = new NetworkSyncManager( pLoadingWindow );
pLoadingWindow->SetText(INIT_MESSAGE);
MESSAGEMAN = new MessageManager; MESSAGEMAN = new MessageManager;
pLoadingWindow->SetText(INIT_STATICS);
STATSMAN = new StatsManager; STATSMAN = new StatsManager;
earlyBail
// Initialize which courses are ranking courses here. // Initialize which courses are ranking courses here.
pLoadingWindow->SetText(UPDATE_COURSE_RANKS); pLoadingWindow->SetText(UPDATE_COURSE_RANKS);
SONGMAN->UpdateRankingCourses(); SONGMAN->UpdateRankingCourses();
earlyBail
// destroy this before init'ing Display, for now SAFE_DELETE( pLoadingWindow ); // destroy this before init'ing Display
// we will lose the rights to be focused, but that's not too important
// when we are going fullscreen /* If the user has tried to quit during the loading, do it before creating
SAFE_DELETE( pLoadingWindow ); * the main window. This prevents going to full screen just to quit. */
if( ArchHooks::UserQuit() )
{
ShutdownGame();
return 0;
}
StartDisplay(); StartDisplay();