diff --git a/stepmania/src/GameConstantsAndTypes.cpp b/stepmania/src/GameConstantsAndTypes.cpp index 2f24d486d5..0b7983f321 100644 --- a/stepmania/src/GameConstantsAndTypes.cpp +++ b/stepmania/src/GameConstantsAndTypes.cpp @@ -90,7 +90,6 @@ CString CoinModeToString( CoinMode cm ) case COIN_HOME: return "home"; case COIN_PAY: return "pay"; case COIN_FREE: return "free"; - case COIN_EVENT: return "event"; default: ASSERT(0); return ""; } } diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index f149a92bd7..6ee3dd0dfe 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -220,7 +220,7 @@ const CString RANDOMMOVIES_DIR = "RandomMovies/"; // Coin stuff // -enum CoinMode { COIN_HOME, COIN_PAY, COIN_FREE, COIN_EVENT, NUM_COIN_MODES }; +enum CoinMode { COIN_HOME, COIN_PAY, COIN_FREE, NUM_COIN_MODES }; CString CoinModeToString( CoinMode cm ); diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 1b5435b700..2fc09dfa6e 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -181,14 +181,14 @@ int GameState::GetNumStagesLeft() { if(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2()) return 1; - if(PREFSMAN->m_iCoinMode==COIN_EVENT) + if( PREFSMAN->m_bEventMode ) return 999; return PREFSMAN->m_iNumArcadeStages - m_iCurrentStageIndex; } bool GameState::IsFinalStage() { - if( PREFSMAN->m_iCoinMode==COIN_EVENT ) + if( PREFSMAN->m_bEventMode ) return false; int iPredictedStageForCurSong = 1; if( m_pCurSong != NULL ) @@ -199,14 +199,14 @@ bool GameState::IsFinalStage() bool GameState::IsExtraStage() { - if( PREFSMAN->m_iCoinMode==COIN_EVENT ) + if( PREFSMAN->m_bEventMode ) return false; return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages; } bool GameState::IsExtraStage2() { - if( PREFSMAN->m_iCoinMode==COIN_EVENT ) + if( PREFSMAN->m_bEventMode ) return false; return m_iCurrentStageIndex == PREFSMAN->m_iNumArcadeStages+1; } @@ -217,7 +217,7 @@ CString GameState::GetStageText() else if( m_PlayMode == PLAY_MODE_ONI ) return "oni"; else if( m_PlayMode == PLAY_MODE_NONSTOP ) return "nonstop"; else if( m_PlayMode == PLAY_MODE_ENDLESS ) return "endless"; - else if( PREFSMAN->m_iCoinMode==COIN_EVENT ) return "event"; + else if( PREFSMAN->m_bEventMode ) return "event"; else if( IsFinalStage() ) return "final"; else if( IsExtraStage() ) return "extra1"; else if( IsExtraStage2() ) return "extra2"; @@ -326,7 +326,7 @@ bool GameState::IsCourseMode() const bool GameState::HasEarnedExtraStage() { - if( PREFSMAN->m_iCoinMode==COIN_EVENT ) + if( PREFSMAN->m_bEventMode ) return false; if( GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE ) diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 940de7b99c..e8b8e67f1e 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -54,6 +54,7 @@ PrefsManager::PrefsManager() m_fBGBrightness = 0.8f; m_bMenuTimer = true; m_iNumArcadeStages = 3; + m_bEventMode = false; m_bAutoPlay = false; m_fJudgeWindowScale = 1.0f; m_fJudgeWindowMarvelousSeconds = 0.0225f; @@ -143,6 +144,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ) ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness ); ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer ); ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages ); + ini.GetValueB( "Options", "EventMode", m_bEventMode ); ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay ); ini.GetValueF( "Options", "JudgeWindowScale", m_fJudgeWindowScale ); ini.GetValueF( "Options", "JudgeWindowMarvelousSeconds",m_fJudgeWindowMarvelousSeconds ); @@ -225,6 +227,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueF( "Options", "BGBrightness", m_fBGBrightness ); ini.SetValueB( "Options", "MenuTimer", m_bMenuTimer ); ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages ); + ini.SetValueB( "Options", "EventMode", m_bEventMode ); ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay ); ini.SetValueF( "Options", "JudgeWindowScale", m_fJudgeWindowScale ); ini.SetValueF( "Options", "JudgeWindowMarvelousSeconds",m_fJudgeWindowMarvelousSeconds ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 0a5e35d075..67fd90d1db 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -40,6 +40,7 @@ public: bool m_bMenuTimer; bool m_bShowDanger; int m_iNumArcadeStages; + bool m_bEventMode; float m_fJudgeWindowScale; float m_fLifeDifficultyScale; float m_fJudgeWindowMarvelousSeconds; diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 8c45670317..ecf58f98e7 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -96,7 +96,6 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy // fall through case COIN_HOME: case COIN_FREE: - case COIN_EVENT: SOUNDMAN->StopMusic(); /* We already played the it was a coin was inserted. Don't play it again. */ if( MenuI.button != MENU_BUTTON_COIN ) diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 6482b573b3..c1f37196f3 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -863,7 +863,7 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn ) m_Grades[p].SettleImmediately(); - if( PREFSMAN->m_iCoinMode==COIN_EVENT ) + if( PREFSMAN->m_bEventMode ) { switch( GAMESTATE->m_PlayMode ) { diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index c265824952..eefad8010c 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1510,7 +1510,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: case PLAY_MODE_RAVE: - if( PREFSMAN->m_iCoinMode==COIN_EVENT ) + if( PREFSMAN->m_bEventMode ) HandleScreenMessage( SM_GoToScreenAfterBack ); else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) SCREENMAN->SetNewScreen( "ScreenEvaluationStage" ); diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 96e07bec0e..6e2a864c90 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -186,7 +186,6 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type // fall through case COIN_HOME: case COIN_FREE: - case COIN_EVENT: SOUNDMAN->StopMusic(); /* We already played the it was a coin was inserted. Don't play it again. */ if( MenuI.button != MENU_BUTTON_COIN ) diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index 9f3524dc72..a5f7b3853f 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -41,8 +41,8 @@ enum { OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { OptionRow( "Menu\nTimer", "OFF","ON" ), - OptionRow( "Coin\nMode", "HOME","PAY","FREE PLAY","EVENT MODE" ), - OptionRow( "Songs Per\nPlay", "1","2","3","4","5","6","7" ), + OptionRow( "Coin\nMode", "HOME","PAY","FREE PLAY" ), + OptionRow( "Songs Per\nPlay", "1","2","3","4","5","6","7","UNLIMITED" ), OptionRow( "Judge\nDifficulty", "1","2","3","4","5","6","7","8" ), OptionRow( "Life\nDifficulty", "1","2","3","4","5","6","7" ), OptionRow( "Default\nFail Type", "ARCADE","END OF SONG","OFF" ), @@ -71,7 +71,7 @@ void ScreenMachineOptions::ImportOptions() { m_iSelectedOption[0][MO_COIN_MODE] = PREFSMAN->m_iCoinMode; m_iSelectedOption[0][MO_MENU_TIMER] = PREFSMAN->m_bMenuTimer ? 1:0; - m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] = PREFSMAN->m_iNumArcadeStages - 1; + m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] = PREFSMAN->m_bEventMode ? 7 : PREFSMAN->m_iNumArcadeStages - 1; /* .02 difficulty is beyond our timing right now; even autoplay * misses! At least fix autoplay before enabling this, or we'll @@ -114,6 +114,7 @@ void ScreenMachineOptions::ExportOptions() PREFSMAN->m_iCoinMode = m_iSelectedOption[0][MO_COIN_MODE]; PREFSMAN->m_bMenuTimer = m_iSelectedOption[0][MO_MENU_TIMER] == 1; PREFSMAN->m_iNumArcadeStages = m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] + 1; + PREFSMAN->m_bEventMode = m_iSelectedOption[0][MO_NUM_ARCADE_STAGES] == 7; switch( m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] ) { diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index d941beb76c..0ab6ac4455 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -149,15 +149,16 @@ void ScreenSystemLayer::RefreshCreditsMessages() // update joined for( int p=0; pm_iCoinMode ) { case COIN_HOME: if( GAMESTATE->m_bSideIsJoined[p] ) - m_textCreditInfo[p].SetText( "" ); + sText = ""; else if( GAMESTATE->m_bPlayersCanJoin ) // would (GAMESTATE->m_CurStyle!=STYLE_INVALID) do the same thing? - m_textCreditInfo[p].SetText( "PRESS START" ); + sText = "PRESS START"; else - m_textCreditInfo[p].SetText( "NOT PRESENT" ); + sText = "NOT PRESENT"; break; case COIN_PAY: { @@ -165,18 +166,17 @@ void ScreenSystemLayer::RefreshCreditsMessages() CString txt = ssprintf("CREDIT(S) %d", GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit); if (Coins) txt += ssprintf(" %d/%d", Coins, PREFSMAN->m_iCoinsPerCredit ); - m_textCreditInfo[p].SetText(txt); + sText = txt; } break; case COIN_FREE: - m_textCreditInfo[p].SetText( "FREE PLAY" ); - break; - case COIN_EVENT: - m_textCreditInfo[p].SetText( "EVENT MODE" ); + sText = "FREE PLAY"; break; default: ASSERT(0); } + + m_textCreditInfo[p].SetText( sText ); } } diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index d677c64c45..1708516afb 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -487,7 +487,7 @@ void ScreenSelectMusic::AdjustOptions() /* If beginner's steps were chosen, and this is the first stage, * turn off failure completely--always give a second try. */ if(dc == DIFFICULTY_BEGINNER && - PREFSMAN->m_iCoinMode!=COIN_EVENT && /* stage index is meaningless in event mode */ + PREFSMAN->m_bEventMode && /* stage index is meaningless in event mode */ GAMESTATE->m_iCurrentStageIndex == 0) ft = SongOptions::FAIL_OFF; // Redundant. -Chris diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 25c956ff4b..328b23ccfc 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -116,7 +116,6 @@ ScreenTitleMenu::ScreenTitleMenu() : Screen("ScreenTitleMenu") break; case COIN_PAY: case COIN_FREE: - case COIN_EVENT: break; default: ASSERT(0);