From ab179acc1abf7ecbae4a655894afe0d015639b70 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Dec 2002 10:07:27 +0000 Subject: [PATCH] add an option to not display the caution screen --- stepmania/Themes/default/metrics.ini | 1 + stepmania/src/PrefsManager.cpp | 3 +++ stepmania/src/PrefsManager.h | 2 +- stepmania/src/ScreenAppearanceOptions.cpp | 4 ++++ stepmania/src/ScreenCaution.cpp | 6 ++++++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 277be4f19c..f6440ff2db 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -725,6 +725,7 @@ Announcer=Choose from this list of installed annoucner packs.::For more informat Theme=Choose from this list of installed theme packs.::For more information about creating theme packs, see the README. NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README. HowToPlay=Toggle whether the How To Play screen is shown. +Caution=Toggle whether the Caution screen is shown. [ScreenNetworkWaiting] ServerInfoX=320 diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 2f76e8a036..26a230d2b4 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -60,6 +60,7 @@ PrefsManager::PrefsManager() m_bUseBGIfNoBanner = false; m_bDelayedEscape = true; m_bHowToPlay = true; + m_bShowDontDie = true; m_bArcadeOptionsNavigation = false; m_iUnloadTextureDelaySeconds = 0; // disabled 60*30; // 30 mins m_bCoinOpMode = false; @@ -112,6 +113,7 @@ PrefsManager::~PrefsManager() ini.GetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); ini.GetValueB( "Options", "Vsync", m_bVsync ); ini.GetValueB( "Options", "HowToPlay", m_bHowToPlay ); + ini.GetValueB( "Options", "Caution", m_bShowDontDie ); ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); ini.GetValue ( "Options", "DWIPath", m_DWIPath ); ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); @@ -164,6 +166,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); ini.SetValueB( "Options", "Vsync", m_bVsync ); ini.SetValueB( "Options", "HowToPlay", m_bHowToPlay ); + ini.SetValueB( "Options", "Caution", m_bShowDontDie ); ini.SetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); ini.SetValue ( "Options", "DWIPath", m_DWIPath ); ini.SetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index e5a9586a32..f6633586d2 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -49,7 +49,7 @@ public: float m_fJudgeWindowGoodPercent; bool m_bAutoPlay; bool m_bDelayedEscape; - bool m_bHowToPlay; + bool m_bHowToPlay, m_bShowDontDie; bool m_bArcadeOptionsNavigation; bool m_bCoinOpMode; diff --git a/stepmania/src/ScreenAppearanceOptions.cpp b/stepmania/src/ScreenAppearanceOptions.cpp index 01c402149f..a055f9473d 100644 --- a/stepmania/src/ScreenAppearanceOptions.cpp +++ b/stepmania/src/ScreenAppearanceOptions.cpp @@ -31,6 +31,7 @@ enum { AO_THEME, AO_SKIN, AO_HOWTOPLAY, + AO_CAUTION, NUM_APPEARANCE_OPTIONS_LINES }; @@ -39,6 +40,7 @@ OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = { { "Theme", 0, {""} }, // fill this in on ImportOptions() { "Note\nSkin", 0, {""} }, // fill this in on ImportOptions() { "How To\nPlay", 2, {"SKIP","SHOW"} }, + { "Caution", 2, {"SKIP","SHOW"} }, }; ScreenAppearanceOptions::ScreenAppearanceOptions() : @@ -149,6 +151,7 @@ void ScreenAppearanceOptions::ImportOptions() m_iSelectedOption[0][AO_SKIN] = 0; m_iSelectedOption[0][AO_HOWTOPLAY] = PREFSMAN->m_bHowToPlay? 1:0; + m_iSelectedOption[0][AO_CAUTION] = PREFSMAN->m_bShowDontDie? 1:0; } void ScreenAppearanceOptions::ExportOptions() @@ -171,6 +174,7 @@ void ScreenAppearanceOptions::ExportOptions() GAMEMAN->SwitchNoteSkin( sNewSkin ); PREFSMAN->m_bHowToPlay = !!m_iSelectedOption[0][AO_HOWTOPLAY]; + PREFSMAN->m_bShowDontDie = !!m_iSelectedOption[0][AO_CAUTION]; PREFSMAN->SaveGamePrefsToDisk(); PREFSMAN->SaveGlobalPrefsToDisk(); diff --git a/stepmania/src/ScreenCaution.cpp b/stepmania/src/ScreenCaution.cpp index 06a0b98f08..adbdd7ceb7 100644 --- a/stepmania/src/ScreenCaution.cpp +++ b/stepmania/src/ScreenCaution.cpp @@ -32,6 +32,12 @@ ScreenCaution::ScreenCaution() { GAMESTATE->m_bPlayersCanJoin = true; + if(!PREFSMAN->m_bShowDontDie) + { + this->SendScreenMessage( SM_GoToNextScreen, 0.f ); + return; + } + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","caution") ); this->AddChild( &m_Background );