debug option to not show loading window

This commit is contained in:
Glenn Maynard
2004-02-15 22:56:51 +00:00
parent b63eaa449c
commit e755ecab67
4 changed files with 20 additions and 11 deletions
+3
View File
@@ -265,6 +265,7 @@ PrefsManager::PrefsManager()
m_bTimestamping = false; m_bTimestamping = false;
m_bLogSkips = false; m_bLogSkips = false;
m_bLogCheckpoints = false; m_bLogCheckpoints = false;
m_bShowLoadingWindow = true;
for( int p=0; p<NUM_PLAYERS; p++ ) for( int p=0; p<NUM_PLAYERS; p++ )
{ {
@@ -505,6 +506,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Debug", "Timestamping", m_bTimestamping ); ini.GetValue( "Debug", "Timestamping", m_bTimestamping );
ini.GetValue( "Debug", "LogSkips", m_bLogSkips ); ini.GetValue( "Debug", "LogSkips", m_bLogSkips );
ini.GetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints ); ini.GetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints );
ini.GetValue( "Debug", "ShowLoadingWindow", m_bShowLoadingWindow );
} }
void PrefsManager::SaveGlobalPrefsToDisk() const void PrefsManager::SaveGlobalPrefsToDisk() const
@@ -725,6 +727,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Debug", "Timestamping", m_bTimestamping ); ini.SetValue( "Debug", "Timestamping", m_bTimestamping );
ini.SetValue( "Debug", "LogSkips", m_bLogSkips ); ini.SetValue( "Debug", "LogSkips", m_bLogSkips );
ini.SetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints ); ini.SetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints );
ini.SetValue( "Debug", "ShowLoadingWindow", m_bShowLoadingWindow );
ini.WriteFile(); ini.WriteFile();
} }
+1
View File
@@ -239,6 +239,7 @@ public:
bool m_bTimestamping; bool m_bTimestamping;
bool m_bLogSkips; bool m_bLogSkips;
bool m_bLogCheckpoints; bool m_bLogCheckpoints;
bool m_bShowLoadingWindow;
/* Game-specific prefs: */ /* Game-specific prefs: */
CString m_sDefaultModifiers; CString m_sDefaultModifiers;
+13 -11
View File
@@ -897,17 +897,6 @@ int main(int argc, char* argv[])
* We use our own error handlers. */ * We use our own error handlers. */
SDL_Init( SDL_INIT_NOPARACHUTE ); SDL_Init( SDL_INIT_NOPARACHUTE );
LoadingWindow *loading_window = MakeLoadingWindow();
if( loading_window == NULL )
{
LOG->Trace("Couldn't open any loading windows.");
exit(1);
}
loading_window->Paint();
srand( time(NULL) ); // seed number generator
// //
// Create game objects // Create game objects
// //
@@ -920,6 +909,19 @@ int main(int argc, char* argv[])
LOG->SetTimestamping( PREFSMAN->m_bTimestamping ); LOG->SetTimestamping( PREFSMAN->m_bTimestamping );
Checkpoints::LogCheckpoints( PREFSMAN->m_bLogCheckpoints ); Checkpoints::LogCheckpoints( PREFSMAN->m_bLogCheckpoints );
/* This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow. */
LoadingWindow *loading_window = MakeLoadingWindow();
if( loading_window == NULL )
{
LOG->Trace("Couldn't open any loading windows.");
exit(1);
}
loading_window->Paint();
srand( time(NULL) ); // seed number generator
CheckSDLVersion( 1,2,6 ); CheckSDLVersion( 1,2,6 );
if( PREFSMAN->m_bFirstRun ) if( PREFSMAN->m_bFirstRun )
+3
View File
@@ -25,6 +25,9 @@
LoadingWindow *MakeLoadingWindow() LoadingWindow *MakeLoadingWindow()
{ {
if( !PREFSMAN->m_bShowLoadingWindow )
return new LoadingWindow_Null;
/* Don't load NULL by default. On most systems, if we can't load the SDL /* Don't load NULL by default. On most systems, if we can't load the SDL
* loading window, we won't be able to init OpenGL, either, so don't bother. */ * loading window, we won't be able to init OpenGL, either, so don't bother. */
CString drivers = "win32,cocoa,gtk,sdl"; CString drivers = "win32,cocoa,gtk,sdl";