diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 82b999cbd7..1531077def 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -744,7 +744,7 @@ MenuTimer=Turn this &oq;OFF&cq; to disable the time limit in menus. ArcadeStages=The number of songs a player can play in Arcade mode.::Set this to &oq;Unlimited&cq;, and you can continue playing forever.::Also, when this option is set to &oq;Unlimited&cq;, failing will take you::back to the the Select Music or Select Course screen. JudgeDifficulty=Increase this value to cause your steps to be judged more strictly::(i.e. shink the timing window). LifeDifficulty=Increate this value to cause your life meter to::drain faster and refill slower. -Fail=Choose the conditions for game over.::LIFE DRAINED will stop the music immediately when all players have 0 life.::END OF SONG will cause the game to end at the conclusion of the current song::if all players failed at some point during the song.::OFF disables game over entirely. +DefaultFailType=Choose the conditions for game over.::ARCADE will stop the music immediately when all players have 0 life.::END OF SONG will cause the game to end at the conclusion of the current song::if all players failed at some point during the song.::OFF disables game over entirely. ShowStats=Display Performance Statistics in the upper right corner::of the screen. FPS = frames per second.::TPF = triangles per frame. DPF = draws per frame. CoinMode=When set to HOME, options will be shown on the title screen.::When set to PAY the title menu choices are hidden and you must::insert coins before joining in. When set to FREE the title menu::choices are hidden and you can joining in without inserting coins. CoinsPerCredit=The number of coins that must be inserted before a player can join. @@ -797,21 +797,23 @@ LineSpacingX=0 LineSpacingY=60 BulletsStartX=100 BulletsStartY=140 +TextZoom=1.0 +TextColor=0.8,0.8,1,1 NamesStartX=180 NamesStartY=140 -NamesZoom=1.2 -NamesColor=0.8,0.8,1,1 ScoresStartX=520 ScoresStartY=140 -ScoresZoom=1.2 -ScoresColor=0.8,0.8,1,1 +PointsStartX=380 +PointsStartY=140 +TimeStartX=560 +TimeStartY=140 SecondsPerPage=5 ShowCategories=1 CoursesToShow=Courses/NaokiStandard.crs,Courses/ParanoiaBrothers.crs NotesTypesToHide=dance-couple,dance-solo [ScreenIntroMovie] -SecondsToShow=15 +SecondsToShow=0 NextScreen=ScreenDemonstration [ScreenMemoryCard] diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index 5797319f88..f86d8dbafd 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -39,8 +39,8 @@ Course::Course() for( i=0; im_DefaultFailType; } void GameState::ResetLastRanking() diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index b581b158a0..937523bcd7 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -84,7 +84,7 @@ PrefsManager::PrefsManager() m_iBoostAppPriority = -1; m_iPolygonRadar = -1; m_bShowSongOptions = true; - m_FailType = FAIL_ARCADE; + m_DefaultFailType = SongOptions::FAIL_ARCADE; /* DDR Extreme-style extra stage support. * * Default off so people used to the current behavior (or those with extra * @@ -170,7 +170,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ) ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds ); ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds ); ini.GetValueB( "Options", "ShowSongOptions", m_bShowSongOptions ); - ini.GetValueI( "Options", "FailType", (int&)m_FailType ); + ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType ); m_asAdditionalSongFolders.clear(); @@ -243,7 +243,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds ); ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds ); ini.SetValueB( "Options", "ShowSongOptions", m_bShowSongOptions ); - ini.SetValueI( "Options", "FailType", (int&)m_FailType ); + ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType ); /* Only write these if they aren't the default. This ensures that we can change * the default and have it take effect for everyone (except people who diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index fa45836ad8..9e025f972a 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -11,7 +11,7 @@ Chris Gomez ----------------------------------------------------------------------------- */ - +#include "SongOptions.h" class PrefsManager { @@ -68,7 +68,7 @@ public: float m_fLongVerSongSeconds; float m_fMarathonVerSongSeconds; bool m_bShowSongOptions; - enum { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF } m_FailType; + SongOptions::FailType m_DefaultFailType; /* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */ int m_iBoostAppPriority; diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index e67f338c2e..6774d5ef8d 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -100,7 +100,7 @@ bool SetUpSongOptions() // always return true. GAMESTATE->m_PlayerOptions[p].m_bEffects[ PlayerOptions::EFFECT_MINI ] = true; } GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY; - PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; } for( int p=0; pm_SongOptions = SongOptions(); GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; - PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; GAMESTATE->m_bDemonstration = true; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 703aab7063..db6f892ea0 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -775,9 +775,9 @@ void ScreenGameplay::Update( float fDeltaTime ) // // check for fail // - switch( PREFSMAN->m_FailType ) + switch( GAMESTATE->m_SongOptions.m_FailType ) { - case PrefsManager::FAIL_ARCADE: + case SongOptions::FAIL_ARCADE: switch( GAMESTATE->m_SongOptions.m_LifeType ) { case SongOptions::LIFE_BAR: @@ -821,8 +821,8 @@ void ScreenGameplay::Update( float fDeltaTime ) break; } break; - case PrefsManager::FAIL_END_OF_SONG: - case PrefsManager::FAIL_OFF: + case SongOptions::FAIL_END_OF_SONG: + case SongOptions::FAIL_OFF: break; // don't check for fail default: ASSERT(0); @@ -1274,7 +1274,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) return; // ignore m_DancingState = STATE_OUTRO; - if( PREFSMAN->m_FailType == PrefsManager::FAIL_END_OF_SONG && AllFailedEarlier() ) + if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG && AllFailedEarlier() ) { this->SendScreenMessage( SM_BeginFailed, 0 ); return; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 9d2f2ac993..2a4f4a9029 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -93,7 +93,7 @@ bool PrepareForJukebox() // always return true. GAMESTATE->m_PlayerOptions[p].m_bEffects[ PlayerOptions::EFFECT_MINI ] = true; } GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY; - PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; } for( int p=0; pm_SongOptions = SongOptions(); GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; - PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; GAMESTATE->m_bDemonstration = true; diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index ffc35957b7..7201c1891e 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -43,7 +43,7 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { { "Arcade\nStages", 8, {"1","2","3","4","5","6","7","UNLIMITED"} }, { "Judge\nDifficulty", 8, {"1","2","3","4","5","6","7","8"} }, { "Life\nDifficulty", 7, {"1","2","3","4","5","6","7"} }, - { "Fail", 3, {"LIFE DRAINED","END OF SONG","OFF"} }, + { "Default\nFail Type", 3, {"ARCADE","END OF SONG","OFF"} }, { "Show\nStats", 2, {"OFF","ON"} }, { "Coin\nMode", 3, {"HOME","PAY","FREE PLAY"} }, { "Coins Per\nCredit", 8, {"1","2","3","4","5","6","7","8"} }, @@ -111,7 +111,7 @@ void ScreenMachineOptions::ImportOptions() else if( PREFSMAN->m_fLifeDifficultyScale == 0.40f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 6; else m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 3; - m_iSelectedOption[0][MO_FAIL] = PREFSMAN->m_FailType; + m_iSelectedOption[0][MO_FAIL] = PREFSMAN->m_DefaultFailType; m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0; m_iSelectedOption[0][MO_COIN_MODE] = PREFSMAN->m_CoinMode; m_iSelectedOption[0][MO_COINS_PER_CREDIT] = PREFSMAN->m_iCoinsPerCredit - 1; @@ -149,11 +149,11 @@ void ScreenMachineOptions::ExportOptions() default: ASSERT(0); } - (int&)PREFSMAN->m_FailType = m_iSelectedOption[0][MO_FAIL]; - PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1; - (int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE]; - PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1; - PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1; + (int&)PREFSMAN->m_DefaultFailType = m_iSelectedOption[0][MO_FAIL]; + PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1; + (int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE]; + PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1; + PREFSMAN->m_bJointPremium = m_iSelectedOption[0][MO_JOINT_PREMIUM] == 1; } void ScreenMachineOptions::GoToPrevState() diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 80fb658c22..bbb7c6a7f7 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -559,7 +559,7 @@ void ScreenSelectMusic::AdjustOptions() /* In event mode, switch to fail-end-of-stage if either chose beginner or easy. */ if(PREFSMAN->m_bEventMode && dc <= DIFFICULTY_EASY) - PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG; /* Otherwise, if either chose beginner's steps, and this is the first stage, * turn off failure completely (always give a second shot). */ @@ -567,13 +567,13 @@ void ScreenSelectMusic::AdjustOptions() { /* Beginners get a freebie and then end-of-song. */ if(GAMESTATE->m_iCurrentStageIndex == 0) - PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; else if(!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) - PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG; } /* Easy is always end-of-song. */ else if(dc == DIFFICULTY_EASY && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) - PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG; + GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG; } void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM ) diff --git a/stepmania/src/ScreenSongOptions.cpp b/stepmania/src/ScreenSongOptions.cpp index d137c46c26..20d5db50d5 100644 --- a/stepmania/src/ScreenSongOptions.cpp +++ b/stepmania/src/ScreenSongOptions.cpp @@ -24,6 +24,7 @@ enum { SO_LIFE = 0, SO_DRAIN, SO_BAT_LIVES, + SO_FAIL, SO_ASSIST, SO_RATE, SO_AUTOSYNC, @@ -34,6 +35,7 @@ OptionRowData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = { { "Life\nType", 2, {"BAR","BATTERY"} }, { "Bar\nDrain", 3, {"NORMAL","NO RECOVER","SUDDEN DEATH"} }, { "Bat\nLives", 10, {"1","2","3","4","5","6","7","8","9","10"} }, + { "Fail", 3, {"ARCADE","END OF SONG","OFF"} }, { "Assist", 2, {"OFF","TICK"} }, { "Rate", 9, {"x0.7","x0.8","x0.9","x1.0","x1.1","x1.2","x1.3","x1.4","x1.5"} }, { "Auto\nAdjust", 2, {"OFF", "ON"} }, @@ -61,6 +63,7 @@ void ScreenSongOptions::ImportOptions() m_iSelectedOption[0][SO_LIFE] = so.m_LifeType; m_iSelectedOption[0][SO_BAT_LIVES] = so.m_iBatteryLives-1; + m_iSelectedOption[0][SO_FAIL] = so.m_FailType; m_iSelectedOption[0][SO_ASSIST] = so.m_AssistType; m_iSelectedOption[0][SO_AUTOSYNC] = so.m_bAutoSync; @@ -83,6 +86,7 @@ void ScreenSongOptions::ExportOptions() so.m_LifeType = (SongOptions::LifeType)m_iSelectedOption[0][SO_LIFE]; so.m_DrainType = (SongOptions::DrainType)m_iSelectedOption[0][SO_DRAIN]; so.m_iBatteryLives = m_iSelectedOption[0][SO_BAT_LIVES]+1; + so.m_FailType = (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL]; so.m_AssistType = (SongOptions::AssistType)m_iSelectedOption[0][SO_ASSIST]; so.m_bAutoSync = m_iSelectedOption[0][SO_AUTOSYNC] != 0; diff --git a/stepmania/src/SongOptions.cpp b/stepmania/src/SongOptions.cpp index 026c3edc97..754d7e0a2e 100644 --- a/stepmania/src/SongOptions.cpp +++ b/stepmania/src/SongOptions.cpp @@ -33,6 +33,14 @@ CString SongOptions::GetString() break; } + + switch( m_FailType ) + { + case FAIL_ARCADE: break; + case FAIL_END_OF_SONG: sReturn += "FailEndOfSong, "; break; + case FAIL_OFF: sReturn += "FailOff, "; break; + } + if( m_fMusicRate != 1 ) { CString s = ssprintf( "%2.2f", m_fMusicRate ); diff --git a/stepmania/src/SongOptions.h b/stepmania/src/SongOptions.h index 32535f2f96..1bde170a69 100644 --- a/stepmania/src/SongOptions.h +++ b/stepmania/src/SongOptions.h @@ -20,6 +20,8 @@ struct SongOptions enum DrainType { DRAIN_NORMAL, DRAIN_NO_RECOVER, DRAIN_SUDDEN_DEATH }; DrainType m_DrainType; // only used with LifeBar int m_iBatteryLives; + enum FailType { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF }; + FailType m_FailType; enum AssistType { ASSIST_NONE=0, ASSIST_TICK }; AssistType m_AssistType; float m_fMusicRate; @@ -31,6 +33,7 @@ struct SongOptions m_LifeType = LIFE_BAR; m_DrainType = DRAIN_NORMAL; m_iBatteryLives = 4; + m_FailType = FAIL_ARCADE; m_AssistType = ASSIST_NONE; m_fMusicRate = 1.0f; m_bAutoSync = false;