diff --git a/stepmania/src/CommonMetrics.cpp b/stepmania/src/CommonMetrics.cpp index c723a22692..155a7ef0e9 100644 --- a/stepmania/src/CommonMetrics.cpp +++ b/stepmania/src/CommonMetrics.cpp @@ -46,7 +46,7 @@ void ThemeMetricDifficultiesToShow::Read() FOREACH_CONST( RString, v, i ) { Difficulty d = StringToDifficulty( *i ); - if( d == DIFFICULTY_INVALID ) + if( d == DIFFICULTY_Invalid ) RageException::Throw( "Unknown difficulty \"%s\" in CourseDifficultiesToShow.", i->c_str() ); m_v.push_back( d ); } @@ -76,7 +76,7 @@ void ThemeMetricCourseDifficultiesToShow::Read() FOREACH_CONST( RString, v, i ) { CourseDifficulty d = StringToCourseDifficulty( *i ); - if( d == DIFFICULTY_INVALID ) + if( d == DIFFICULTY_Invalid ) RageException::Throw( "Unknown CourseDifficulty \"%s\" in CourseDifficultiesToShow.", i->c_str() ); m_v.push_back( d ); } diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index a69ee85ad4..813c060ab8 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -64,7 +64,7 @@ RString CourseEntry::GetTextDescription() const vsEntryDescription.push_back( songCriteria.m_sGroupName ); if( songCriteria.m_bUseSongGenreAllowedList ) vsEntryDescription.push_back( join(",",songCriteria.m_vsSongGenreAllowedList) ); - if( stepsCriteria.m_difficulty != DIFFICULTY_INVALID && stepsCriteria.m_difficulty != DIFFICULTY_MEDIUM ) + if( stepsCriteria.m_difficulty != DIFFICULTY_Invalid && stepsCriteria.m_difficulty != DIFFICULTY_MEDIUM ) vsEntryDescription.push_back( DifficultyToLocalizedString(stepsCriteria.m_difficulty) ); if( stepsCriteria.m_iLowMeter != -1 ) vsEntryDescription.push_back( ssprintf("Low meter: %d", stepsCriteria.m_iLowMeter) ); @@ -263,7 +263,7 @@ RString Course::GetTranslitFullTitle() const * course difficulty doesn't exist, NULL is returned. */ Trail* Course::GetTrail( StepsType st, CourseDifficulty cd ) const { - ASSERT( cd != DIFFICULTY_INVALID ); + ASSERT( cd != DIFFICULTY_Invalid ); // // Check to see if the Trail cache is out of date @@ -543,7 +543,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) * on the original range, bump the steps based on course difficulty, and * then retroactively tweak the low_meter/high_meter so course displays * line up. */ - if( e->stepsCriteria.m_difficulty == DIFFICULTY_INVALID && bChangedDifficulty ) + if( e->stepsCriteria.m_difficulty == DIFFICULTY_Invalid && bChangedDifficulty ) { /* Minimum and maximum to add to make the meter range contain the actual * meter: */ @@ -574,11 +574,11 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) te.iLowMeter = iLowMeter; te.iHighMeter = iHighMeter; - /* If we chose based on meter (not difficulty), then store DIFFICULTY_INVALID, so + /* If we chose based on meter (not difficulty), then store DIFFICULTY_Invalid, so * other classes can tell that we used meter. */ - if( e->stepsCriteria.m_difficulty == DIFFICULTY_INVALID ) + if( e->stepsCriteria.m_difficulty == DIFFICULTY_Invalid ) { - te.dc = DIFFICULTY_INVALID; + te.dc = DIFFICULTY_Invalid; } else { diff --git a/stepmania/src/CourseEntryDisplay.cpp b/stepmania/src/CourseEntryDisplay.cpp index 9457732625..1214ee497c 100644 --- a/stepmania/src/CourseEntryDisplay.cpp +++ b/stepmania/src/CourseEntryDisplay.cpp @@ -157,7 +157,7 @@ void CourseEntryDisplay::SetFromGameState( int iCourseEntryIndex ) } Difficulty dc = te->dc; - if( dc == DIFFICULTY_INVALID ) + if( dc == DIFFICULTY_Invalid ) dc = DIFFICULTY_EDIT; SetDifficulty( pn, s, dc ); diff --git a/stepmania/src/CourseLoaderCRS.cpp b/stepmania/src/CourseLoaderCRS.cpp index de2eadabea..689c2f170b 100644 --- a/stepmania/src/CourseLoaderCRS.cpp +++ b/stepmania/src/CourseLoaderCRS.cpp @@ -73,7 +73,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou else if( sParams.params.size() == 3 ) { const CourseDifficulty cd = StringToCourseDifficulty( sParams[1] ); - if( cd == DIFFICULTY_INVALID ) + if( cd == DIFFICULTY_Invalid ) { LOG->UserLog( "Course file", sPath, "contains an invalid #METER string: \"%s\"", sParams[1].c_str() ); continue; @@ -202,7 +202,7 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou } new_entry.stepsCriteria.m_difficulty = StringToDifficulty( sParams[2] ); - if( new_entry.stepsCriteria.m_difficulty == DIFFICULTY_INVALID ) + if( new_entry.stepsCriteria.m_difficulty == DIFFICULTY_Invalid ) { int retval = sscanf( sParams[2], "%d..%d", &new_entry.stepsCriteria.m_iLowMeter, &new_entry.stepsCriteria.m_iHighMeter ); if( retval == 1 ) diff --git a/stepmania/src/CourseWriterCRS.cpp b/stepmania/src/CourseWriterCRS.cpp index 1f2817497e..384f91ca4e 100644 --- a/stepmania/src/CourseWriterCRS.cpp +++ b/stepmania/src/CourseWriterCRS.cpp @@ -119,7 +119,7 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin } f.Write( ":" ); - if( entry.stepsCriteria.m_difficulty != DIFFICULTY_INVALID ) + if( entry.stepsCriteria.m_difficulty != DIFFICULTY_Invalid ) f.Write( DifficultyToString(entry.stepsCriteria.m_difficulty) ); else if( entry.stepsCriteria.m_iLowMeter != -1 && entry.stepsCriteria.m_iHighMeter != -1 ) f.Write( ssprintf( "%d..%d", entry.stepsCriteria.m_iLowMeter, entry.stepsCriteria.m_iHighMeter ) ); diff --git a/stepmania/src/Difficulty.cpp b/stepmania/src/Difficulty.cpp index 7b0d4818d8..97f548524f 100644 --- a/stepmania/src/Difficulty.cpp +++ b/stepmania/src/Difficulty.cpp @@ -44,7 +44,7 @@ Difficulty StringToDifficulty( const RString& sDC ) else if( s2 == "expert" ) return DIFFICULTY_CHALLENGE; else if( s2 == "oni" ) return DIFFICULTY_CHALLENGE; else if( s2 == "edit" ) return DIFFICULTY_EDIT; - else return DIFFICULTY_INVALID; + else return DIFFICULTY_Invalid; } static const char *CourseDifficultyNames[] = @@ -69,7 +69,7 @@ CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd ) if( GAMESTATE->IsCourseDifficultyShown(d) ) return d; } - return DIFFICULTY_INVALID; + return DIFFICULTY_Invalid; } /* diff --git a/stepmania/src/Difficulty.h b/stepmania/src/Difficulty.h index 8e6d94d35f..dc4fafa5ee 100644 --- a/stepmania/src/Difficulty.h +++ b/stepmania/src/Difficulty.h @@ -15,7 +15,7 @@ enum Difficulty DIFFICULTY_CHALLENGE, DIFFICULTY_EDIT, NUM_Difficulty, - DIFFICULTY_INVALID + DIFFICULTY_Invalid }; #define FOREACH_Difficulty( dc ) FOREACH_ENUM2( Difficulty, dc ) const RString& DifficultyToString( Difficulty dc ); @@ -27,7 +27,7 @@ LuaDeclareType( Difficulty ); typedef Difficulty CourseDifficulty; #define NUM_CourseDifficulty NUM_Difficulty #define FOREACH_CourseDifficulty FOREACH_Difficulty -#define FOREACH_ShownCourseDifficulty( cd ) for( Difficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=DIFFICULTY_INVALID; cd=GetNextShownCourseDifficulty(cd) ) +#define FOREACH_ShownCourseDifficulty( cd ) for( Difficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=DIFFICULTY_Invalid; cd=GetNextShownCourseDifficulty(cd) ) const RString& CourseDifficultyToString( Difficulty dc ); const RString& CourseDifficultyToLocalizedString( Difficulty dc ); diff --git a/stepmania/src/DifficultyList.h b/stepmania/src/DifficultyList.h index 3c614d2d0b..b4ab04bcc3 100644 --- a/stepmania/src/DifficultyList.h +++ b/stepmania/src/DifficultyList.h @@ -56,7 +56,7 @@ private: Row() { m_Steps = NULL; - m_dc = DIFFICULTY_INVALID; + m_dc = DIFFICULTY_Invalid; m_fY = 0; m_bHidden = false; } diff --git a/stepmania/src/EditMenu.cpp b/stepmania/src/EditMenu.cpp index be021150f5..c961c72536 100644 --- a/stepmania/src/EditMenu.cpp +++ b/stepmania/src/EditMenu.cpp @@ -392,7 +392,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row ) m_textValue[ROW_STEPS_TYPE].SetText( GAMEMAN->StepsTypeToLocalizedString(GetSelectedStepsType()) ); { - Difficulty dcOld = DIFFICULTY_INVALID; + Difficulty dcOld = DIFFICULTY_Invalid; if( !m_vpSteps.empty() ) dcOld = GetSelectedDifficulty(); @@ -506,7 +506,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row ) m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GAMEMAN->StepsTypeToLocalizedString(GetSelectedSourceStepsType()) ); m_vpSourceSteps.clear(); - m_vpSourceSteps.push_back( StepsAndDifficulty(NULL,DIFFICULTY_INVALID) ); // "blank" + m_vpSourceSteps.push_back( StepsAndDifficulty(NULL,DIFFICULTY_Invalid) ); // "blank" FOREACH_Difficulty( dc ) { // fill in m_vpSourceSteps @@ -534,14 +534,14 @@ void EditMenu::OnRowValueChanged( EditMenuRow row ) m_textValue[ROW_SOURCE_STEPS].SetHidden( GetSelectedSteps() ? true : false ); { RString s; - if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID ) + if( GetSelectedSourceDifficulty() == DIFFICULTY_Invalid ) s = BLANK; else s = DifficultyToLocalizedString(GetSelectedSourceDifficulty()); m_textValue[ROW_SOURCE_STEPS].SetText( s ); } bool bHideMeter = false; - if( GetSelectedSourceDifficulty() == DIFFICULTY_INVALID ) + if( GetSelectedSourceDifficulty() == DIFFICULTY_Invalid ) bHideMeter = true; else if( GetSelectedSourceSteps() ) m_SourceMeter.SetFromSteps( GetSelectedSourceSteps() ); diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 93ac76b4b9..0d6026d8b8 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -38,8 +38,8 @@ void GameCommand::Init() m_MultiPlayer = MultiPlayer_Invalid; m_pStyle = NULL; m_pm = PlayMode_Invalid; - m_dc = DIFFICULTY_INVALID; - m_CourseDifficulty = DIFFICULTY_INVALID; + m_dc = DIFFICULTY_Invalid; + m_CourseDifficulty = DIFFICULTY_Invalid; m_sPreferredModifiers = ""; m_sStageModifiers = ""; m_sAnnouncer = ""; @@ -86,7 +86,7 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const // HACK: don't compare m_dc if m_pSteps is set. This causes problems // in ScreenSelectOptionsMaster::ImportOptions if m_PreferredDifficulty // doesn't match the difficulty of m_pCurSteps. - if( m_pSteps == NULL && m_dc != DIFFICULTY_INVALID ) + if( m_pSteps == NULL && m_dc != DIFFICULTY_Invalid ) { // Why is this checking for all players? FOREACH_HumanPlayer( pn ) @@ -193,7 +193,7 @@ void GameCommand::LoadOne( const Command& cmd ) else if( sName == "difficulty" ) { Difficulty dc = StringToDifficulty( sValue ); - if( dc != DIFFICULTY_INVALID ) + if( dc != DIFFICULTY_Invalid ) m_dc = dc; else m_bInvalid |= true; @@ -297,7 +297,7 @@ void GameCommand::LoadOne( const Command& cmd ) RageException::Throw( "Must set Course and Style to set Steps." ); const CourseDifficulty cd = StringToCourseDifficulty( sTrail ); - ASSERT_M( cd != DIFFICULTY_INVALID, ssprintf("Invalid difficulty '%s'", sTrail.c_str()) ); + ASSERT_M( cd != DIFFICULTY_Invalid, ssprintf("Invalid difficulty '%s'", sTrail.c_str()) ); m_pTrail = pCourse->GetTrail( pStyle->m_StepsType, cd ); if( m_pTrail == NULL ) @@ -655,7 +655,7 @@ void GameCommand::ApplySelf( const vector &vpns ) const ASSERT(0); } } - if( m_dc != DIFFICULTY_INVALID ) + if( m_dc != DIFFICULTY_Invalid ) FOREACH_CONST( PlayerNumber, vpns, pn ) GAMESTATE->ChangePreferredDifficulty( *pn, m_dc ); if( m_sAnnouncer != "" ) @@ -697,7 +697,7 @@ void GameCommand::ApplySelf( const vector &vpns ) const if( m_pTrail ) FOREACH_CONST( PlayerNumber, vpns, pn ) GAMESTATE->m_pCurTrail[*pn].Set( m_pTrail ); - if( m_CourseDifficulty != DIFFICULTY_INVALID ) + if( m_CourseDifficulty != DIFFICULTY_Invalid ) FOREACH_CONST( PlayerNumber, vpns, pn ) GAMESTATE->ChangePreferredCourseDifficulty( *pn, m_CourseDifficulty ); if( m_pCharacter ) @@ -781,7 +781,7 @@ bool GameCommand::IsZero() const { if( m_pm != PlayMode_Invalid || m_pStyle != NULL || - m_dc != DIFFICULTY_INVALID || + m_dc != DIFFICULTY_Invalid || m_sAnnouncer != "" || m_sPreferredModifiers != "" || m_sStageModifiers != "" || @@ -790,7 +790,7 @@ bool GameCommand::IsZero() const m_pCourse != NULL || m_pTrail != NULL || m_pCharacter != NULL || - m_CourseDifficulty != DIFFICULTY_INVALID || + m_CourseDifficulty != DIFFICULTY_Invalid || !m_sSongGroup.empty() || m_SortOrder != SortOrder_INVALID || m_iWeightPounds != -1 || diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index f7b38158e8..a00cb4f927 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -222,7 +222,7 @@ enum MemoryCardState MemoryCardState_Removed, MemoryCardState_NoCard, NUM_MemoryCardState, - MemoryCardState_INVALID, + MemoryCardState_Invalid, }; const RString& MemoryCardStateToString( MemoryCardState mcs ); diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index ac88971d30..f5780b9d53 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -199,7 +199,7 @@ void GameState::Reset() m_bChangedFailTypeOnScreenSongOptions = false; FOREACH_PlayerNumber( p ) { - m_PreferredDifficulty[p].Set( DIFFICULTY_INVALID ); + m_PreferredDifficulty[p].Set( DIFFICULTY_Invalid ); m_PreferredCourseDifficulty[p].Set( DIFFICULTY_MEDIUM ); } m_SortOrder.Set( SortOrder_INVALID ); @@ -392,9 +392,9 @@ void GameState::PlayersFinalized() // Only set the sort order if it wasn't already set by a GameCommand (or by an earlier profile) if( m_PreferredSortOrder == SortOrder_INVALID && pProfile->m_SortOrder != SortOrder_INVALID ) m_PreferredSortOrder = pProfile->m_SortOrder; - if( pProfile->m_LastDifficulty != DIFFICULTY_INVALID ) + if( pProfile->m_LastDifficulty != DIFFICULTY_Invalid ) m_PreferredDifficulty[pn].Set( pProfile->m_LastDifficulty ); - if( pProfile->m_LastCourseDifficulty != DIFFICULTY_INVALID ) + if( pProfile->m_LastCourseDifficulty != DIFFICULTY_Invalid ) m_PreferredCourseDifficulty[pn].Set( pProfile->m_LastCourseDifficulty ); if( m_pPreferredSong == NULL ) m_pPreferredSong = pProfile->m_lastSong.ToSong(); @@ -576,9 +576,9 @@ void GameState::SaveCurrentSettingsToProfile( PlayerNumber pn ) pProfile->SetDefaultModifiers( m_pCurGame, m_pPlayerState[pn]->m_PlayerOptions.GetPreferred().GetSavedPrefsString() ); if( IsSongSort(m_PreferredSortOrder) ) pProfile->m_SortOrder = m_PreferredSortOrder; - if( m_PreferredDifficulty[pn] != DIFFICULTY_INVALID ) + if( m_PreferredDifficulty[pn] != DIFFICULTY_Invalid ) pProfile->m_LastDifficulty = m_PreferredDifficulty[pn]; - if( m_PreferredCourseDifficulty[pn] != DIFFICULTY_INVALID ) + if( m_PreferredCourseDifficulty[pn] != DIFFICULTY_Invalid ) pProfile->m_LastCourseDifficulty = m_PreferredCourseDifficulty[pn]; if( m_pPreferredSong ) pProfile->m_lastSong.FromSong( m_pPreferredSong ); @@ -1203,7 +1203,7 @@ SongOptions::FailType GameState::GetPlayerFailType( const PlayerState *pPlayerSt } else { - Difficulty dc = DIFFICULTY_INVALID; + Difficulty dc = DIFFICULTY_Invalid; if( m_pCurSteps[pn] ) dc = m_pCurSteps[pn]->GetDifficulty(); @@ -1712,7 +1712,7 @@ bool GameState::IsCourseDifficultyShown( CourseDifficulty cd ) Difficulty GameState::GetEasiestStepsDifficulty() const { - Difficulty dc = DIFFICULTY_INVALID; + Difficulty dc = DIFFICULTY_Invalid; FOREACH_HumanPlayer( p ) { if( m_pCurSteps[p] == NULL ) diff --git a/stepmania/src/MemoryCardDisplay.cpp b/stepmania/src/MemoryCardDisplay.cpp index 52aa2fcd14..1cabf9280e 100644 --- a/stepmania/src/MemoryCardDisplay.cpp +++ b/stepmania/src/MemoryCardDisplay.cpp @@ -11,7 +11,7 @@ REGISTER_ACTOR_CLASS( MemoryCardDisplay ) MemoryCardDisplay::MemoryCardDisplay() { m_PlayerNumber = PLAYER_INVALID; - m_LastSeenState = MemoryCardState_INVALID; + m_LastSeenState = MemoryCardState_Invalid; } void MemoryCardDisplay::Load( PlayerNumber pn ) @@ -43,7 +43,7 @@ void MemoryCardDisplay::Update( float fDelta ) MemoryCardState newMcs = MEMCARDMAN->GetCardState(m_PlayerNumber); if( m_LastSeenState != newMcs ) { - if( m_LastSeenState != MemoryCardState_INVALID ) + if( m_LastSeenState != MemoryCardState_Invalid ) m_spr[m_LastSeenState].SetHidden( true ); m_LastSeenState = newMcs; m_spr[m_LastSeenState].SetHidden( false ); diff --git a/stepmania/src/MemoryCardManager.cpp b/stepmania/src/MemoryCardManager.cpp index 4a836422cf..eee6c2c358 100644 --- a/stepmania/src/MemoryCardManager.cpp +++ b/stepmania/src/MemoryCardManager.cpp @@ -412,7 +412,7 @@ void MemoryCardManager::CheckStateChanges() { const UsbStorageDevice &new_device = m_Device[p]; - MemoryCardState state = MemoryCardState_INVALID; + MemoryCardState state = MemoryCardState_Invalid; RString sError; if( m_bCardsLocked ) @@ -445,7 +445,7 @@ void MemoryCardManager::CheckStateChanges() } } - if( state == MemoryCardState_INVALID ) + if( state == MemoryCardState_Invalid ) { switch( new_device.m_State ) { diff --git a/stepmania/src/MusicBannerWheel.cpp b/stepmania/src/MusicBannerWheel.cpp index 4359e7d4a9..c4561c43d5 100644 --- a/stepmania/src/MusicBannerWheel.cpp +++ b/stepmania/src/MusicBannerWheel.cpp @@ -69,7 +69,7 @@ MusicBannerWheel::MusicBannerWheel() for ( unsigned i = 0; i < arraySongs.size(); i++) { //ONLY get non-autogenned steps - Steps* pSteps = SongUtil::GetStepsByDifficulty( arraySongs[i], GAMESTATE->GetCurrentStyle()->m_StepsType, DIFFICULTY_INVALID, false ); + Steps* pSteps = SongUtil::GetStepsByDifficulty( arraySongs[i], GAMESTATE->GetCurrentStyle()->m_StepsType, DIFFICULTY_Invalid, false ); if ( pSteps != NULL ) pNotAutogen.push_back( arraySongs[i] ); } diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 0b93a386f1..4e7a30a039 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -742,7 +742,7 @@ void MusicWheel::UpdateSwitch() // // Change difficulty for sorts by meter - XXX: do this with GameCommand? // - Difficulty dc = DIFFICULTY_INVALID; + Difficulty dc = DIFFICULTY_Invalid; switch( GAMESTATE->m_SortOrder ) { case SORT_EASY_METER: dc = DIFFICULTY_EASY; break; @@ -750,7 +750,7 @@ void MusicWheel::UpdateSwitch() case SORT_HARD_METER: dc = DIFFICULTY_HARD; break; case SORT_CHALLENGE_METER: dc = DIFFICULTY_CHALLENGE; break; } - if( dc != DIFFICULTY_INVALID ) + if( dc != DIFFICULTY_Invalid ) { FOREACH_PlayerNumber( p ) if( GAMESTATE->IsPlayerEnabled(p) ) @@ -1053,7 +1053,7 @@ Song *MusicWheel::GetPreferredSelectionForRandomOrPortal() vector vDifficultiesToRequire; FOREACH_HumanPlayer(p) { - if( GAMESTATE->m_PreferredDifficulty[p] == DIFFICULTY_INVALID ) + if( GAMESTATE->m_PreferredDifficulty[p] == DIFFICULTY_Invalid ) continue; // skip // TRICKY: Don't require that edits be present if perferred diff --git a/stepmania/src/OptionRowHandler.cpp b/stepmania/src/OptionRowHandler.cpp index a71c95a719..81083a0235 100644 --- a/stepmania/src/OptionRowHandler.cpp +++ b/stepmania/src/OptionRowHandler.cpp @@ -675,13 +675,13 @@ class OptionRowHandlerListDifficulties: public OptionRowHandlerList { m_Def.m_bOneChoiceForAllPlayers = true; m_Def.m_sName = "Difficulty"; - m_Default.m_dc = DIFFICULTY_INVALID; + m_Default.m_dc = DIFFICULTY_Invalid; m_Def.m_bAllowThemeItems = false; // we theme the text ourself { m_Def.m_vsChoices.push_back( "AllDifficulties" ); GameCommand mc; - mc.m_dc = DIFFICULTY_INVALID; + mc.m_dc = DIFFICULTY_Invalid; m_aListEntries.push_back( mc ); } diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index ac8bb9e714..5911483bbb 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -100,8 +100,8 @@ void Profile::InitGeneralData() m_sGuid = MakeGuid(); m_SortOrder = SortOrder_INVALID; - m_LastDifficulty = DIFFICULTY_INVALID; - m_LastCourseDifficulty = DIFFICULTY_INVALID; + m_LastDifficulty = DIFFICULTY_Invalid; + m_LastCourseDifficulty = DIFFICULTY_Invalid; m_lastSong.Unset(); m_lastCourse.Unset(); m_iTotalPlays = 0; diff --git a/stepmania/src/RageInput.cpp b/stepmania/src/RageInput.cpp index 2e3217aa78..194f6adaf5 100644 --- a/stepmania/src/RageInput.cpp +++ b/stepmania/src/RageInput.cpp @@ -158,7 +158,7 @@ InputDeviceState RageInput::GetInputDeviceState( InputDevice id ) } } - return InputDeviceState_INVALID; + return InputDeviceState_Invalid; } RString RageInput::GetDisplayDevicesString() const diff --git a/stepmania/src/RageInputDevice.h b/stepmania/src/RageInputDevice.h index b3133df8b5..d19aadca76 100644 --- a/stepmania/src/RageInputDevice.h +++ b/stepmania/src/RageInputDevice.h @@ -81,7 +81,7 @@ enum InputDeviceState InputDeviceState_Disconnected, InputDeviceState_MissingMultitap, NUM_InputDeviceState, - InputDeviceState_INVALID + InputDeviceState_Invalid }; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index f6c5a5d594..828a16f0e2 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1297,7 +1297,7 @@ void ScreenGameplay::LoadLights() vector asDifficulties; split( sDifficulty, ",", asDifficulties ); - Difficulty d1 = DIFFICULTY_INVALID; + Difficulty d1 = DIFFICULTY_Invalid; if( asDifficulties.size() > 0 ) d1 = StringToDifficulty( asDifficulties[0] ); pSteps = SongUtil::GetClosestNotes( GAMESTATE->m_pCurSong, GAMESTATE->GetCurrentStyle()->m_StepsType, d1 ); diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 081109b673..c6b0e2eceb 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -57,7 +57,7 @@ void ScreenJukebox::SetSong() } else { - if( GAMESTATE->m_PreferredDifficulty[PLAYER_1] != DIFFICULTY_INVALID ) + if( GAMESTATE->m_PreferredDifficulty[PLAYER_1] != DIFFICULTY_Invalid ) { vDifficultiesToShow.push_back( GAMESTATE->m_PreferredDifficulty[PLAYER_1] ); } diff --git a/stepmania/src/ScreenOptionsEditCourseEntry.cpp b/stepmania/src/ScreenOptionsEditCourseEntry.cpp index 72f490819a..d680244cd3 100644 --- a/stepmania/src/ScreenOptionsEditCourseEntry.cpp +++ b/stepmania/src/ScreenOptionsEditCourseEntry.cpp @@ -242,7 +242,7 @@ void ScreenOptionsEditCourseEntry::HandleScreenMessage( const ScreenMessage SM ) Song *pSong = ce.pSong; Steps *pSteps; StepsType st = GAMESTATE->m_stEdit; - CourseDifficulty cd = ( ce.stepsCriteria.m_difficulty == DIFFICULTY_INVALID ? + CourseDifficulty cd = ( ce.stepsCriteria.m_difficulty == DIFFICULTY_Invalid ? GAMESTATE->m_cdEdit : ce.stepsCriteria.m_difficulty ); if( pSong == NULL ) @@ -276,11 +276,11 @@ void ScreenOptionsEditCourseEntry::HandleScreenMessage( const ScreenMessage SM ) // Try to find steps first using st and cd, then st, then cd, then any. pSteps = SongUtil::GetStepsByDifficulty( pSong, st, cd, false ); if( !pSteps ) - pSteps = SongUtil::GetStepsByDifficulty( pSong, st, DIFFICULTY_INVALID, false ); + pSteps = SongUtil::GetStepsByDifficulty( pSong, st, DIFFICULTY_Invalid, false ); if( !pSteps ) pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, cd, false ); if( !pSteps ) - pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, DIFFICULTY_INVALID, false ); + pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, DIFFICULTY_Invalid, false ); ASSERT( pSteps ); // Set up for ScreenEdit @@ -478,7 +478,7 @@ void ScreenOptionsEditCourseEntry::ExportOptions( int iRow, const vectorm_stEdit == StepsType_Invalid || - GAMESTATE->m_cdEdit == DIFFICULTY_INVALID ) + GAMESTATE->m_cdEdit == DIFFICULTY_Invalid ) { SetNextCombination(); } diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 7be3c91dec..e60e0dceae 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -804,7 +804,7 @@ void ScreenSelectMusic::SwitchToPreferredDifficulty() break; } - if( GAMESTATE->m_PreferredDifficulty[pn] != DIFFICULTY_INVALID ) + if( GAMESTATE->m_PreferredDifficulty[pn] != DIFFICULTY_Invalid ) { int iDiff = abs(m_vpSteps[i]->GetDifficulty() - GAMESTATE->m_PreferredDifficulty[pn]); diff --git a/stepmania/src/SongUtil.cpp b/stepmania/src/SongUtil.cpp index c651106faf..44de8c150c 100644 --- a/stepmania/src/SongUtil.cpp +++ b/stepmania/src/SongUtil.cpp @@ -104,7 +104,7 @@ void SongUtil::GetSteps( { Steps* pSteps = vpSteps[i]; - if( dc != DIFFICULTY_INVALID && dc != pSteps->GetDifficulty() ) + if( dc != DIFFICULTY_Invalid && dc != pSteps->GetDifficulty() ) continue; if( iMeterLow != -1 && iMeterLow > pSteps->GetMeter() ) continue; @@ -154,7 +154,7 @@ Steps* SongUtil::GetStepsByDifficulty( const Song *pSong, StepsType st, Difficul { Steps* pSteps = vpSteps[i]; - if( dc != DIFFICULTY_INVALID && dc != pSteps->GetDifficulty() ) + if( dc != DIFFICULTY_Invalid && dc != pSteps->GetDifficulty() ) continue; if( !bIncludeAutoGen && pSteps->IsAutogen() ) continue; @@ -186,7 +186,7 @@ Steps* SongUtil::GetStepsByMeter( const Song *pSong, StepsType st, int iMeterLow Steps* SongUtil::GetStepsByDescription( const Song *pSong, StepsType st, RString sDescription ) { vector vNotes; - GetSteps( pSong, vNotes, st, DIFFICULTY_INVALID, -1, -1, sDescription ); + GetSteps( pSong, vNotes, st, DIFFICULTY_Invalid, -1, -1, sDescription ); if( vNotes.size() == 0 ) return NULL; else @@ -196,7 +196,7 @@ Steps* SongUtil::GetStepsByDescription( const Song *pSong, StepsType st, RString Steps* SongUtil::GetClosestNotes( const Song *pSong, StepsType st, Difficulty dc, bool bIgnoreLocked ) { - ASSERT( dc != DIFFICULTY_INVALID ); + ASSERT( dc != DIFFICULTY_Invalid ); const vector& vpSteps = (st == StepsType_Invalid)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st); Steps *pClosest = NULL; diff --git a/stepmania/src/SongUtil.h b/stepmania/src/SongUtil.h index 54cf3a8de2..4bcf000de5 100644 --- a/stepmania/src/SongUtil.h +++ b/stepmania/src/SongUtil.h @@ -59,7 +59,7 @@ namespace SongUtil const Song *pSong, vector& arrayAddTo, StepsType st = StepsType_Invalid, - Difficulty dc = DIFFICULTY_INVALID, + Difficulty dc = DIFFICULTY_Invalid, int iMeterLow = -1, int iMeterHigh = -1, const RString &sDescription = "", @@ -70,7 +70,7 @@ namespace SongUtil Steps* GetOneSteps( const Song *pSong, StepsType st = StepsType_Invalid, - Difficulty dc = DIFFICULTY_INVALID, + Difficulty dc = DIFFICULTY_Invalid, int iMeterLow = -1, int iMeterHigh = -1, const RString &sDescription = "", diff --git a/stepmania/src/Steps.cpp b/stepmania/src/Steps.cpp index 95c5a34d02..1881e5f6ab 100644 --- a/stepmania/src/Steps.cpp +++ b/stepmania/src/Steps.cpp @@ -32,7 +32,7 @@ Steps::Steps() m_StepsType = StepsType_Invalid; m_LoadedFromProfile = ProfileSlot_Invalid; m_iHash = 0; - m_Difficulty = DIFFICULTY_INVALID; + m_Difficulty = DIFFICULTY_Invalid; m_iMeter = 0; m_pNoteData = new NoteData; @@ -155,10 +155,10 @@ float Steps::PredictMeter() const void Steps::TidyUpData() { - if( GetDifficulty() == DIFFICULTY_INVALID ) + if( GetDifficulty() == DIFFICULTY_Invalid ) SetDifficulty( StringToDifficulty(GetDescription()) ); - if( GetDifficulty() == DIFFICULTY_INVALID ) + if( GetDifficulty() == DIFFICULTY_Invalid ) { if( GetMeter() == 1 ) SetDifficulty( DIFFICULTY_BEGINNER ); else if( GetMeter() <= 3 ) SetDifficulty( DIFFICULTY_EASY ); diff --git a/stepmania/src/StepsUtil.cpp b/stepmania/src/StepsUtil.cpp index 7bd53e03b3..7c88cd0a5b 100644 --- a/stepmania/src/StepsUtil.cpp +++ b/stepmania/src/StepsUtil.cpp @@ -13,7 +13,7 @@ bool StepsCriteria::Matches( const Song *pSong, const Steps *pSteps ) const { - if( m_difficulty != DIFFICULTY_INVALID && pSteps->GetDifficulty() != m_difficulty ) + if( m_difficulty != DIFFICULTY_Invalid && pSteps->GetDifficulty() != m_difficulty ) return false; if( m_iLowMeter != -1 && pSteps->GetMeter() < m_iLowMeter ) return false; @@ -191,7 +191,7 @@ void StepsID::FromSteps( const Steps *p ) if( p == NULL ) { st = StepsType_Invalid; - dc = DIFFICULTY_INVALID; + dc = DIFFICULTY_Invalid; sDescription = ""; uHash = 0; } @@ -225,7 +225,7 @@ static map g_Cache; Steps *StepsID::ToSteps( const Song *p, bool bAllowNull, bool bUseCache ) const { - if( st == StepsType_Invalid || dc == DIFFICULTY_INVALID ) + if( st == StepsType_Invalid || dc == DIFFICULTY_Invalid ) return NULL; SongID songID; @@ -317,7 +317,7 @@ RString StepsID::ToString() const bool StepsID::IsValid() const { - return st != StepsType_Invalid && dc != DIFFICULTY_INVALID; + return st != StepsType_Invalid && dc != DIFFICULTY_Invalid; } bool StepsID::operator<( const StepsID &rhs ) const diff --git a/stepmania/src/StepsUtil.h b/stepmania/src/StepsUtil.h index ac7aa44683..8121def7ad 100644 --- a/stepmania/src/StepsUtil.h +++ b/stepmania/src/StepsUtil.h @@ -13,7 +13,7 @@ class SongCriteria; class StepsCriteria { public: - Difficulty m_difficulty; // don't filter if DIFFICULTY_INVALID + Difficulty m_difficulty; // don't filter if DIFFICULTY_Invalid int m_iLowMeter; // don't filter if -1 int m_iHighMeter; // don't filter if -1 StepsType m_st; // don't filter if StepsType_Invalid @@ -21,7 +21,7 @@ public: StepsCriteria() { - m_difficulty = DIFFICULTY_INVALID; + m_difficulty = DIFFICULTY_Invalid; m_iLowMeter = -1; m_iHighMeter = -1; m_st = StepsType_Invalid; diff --git a/stepmania/src/Trail.h b/stepmania/src/Trail.h index 3cc9c199fd..8b37979274 100644 --- a/stepmania/src/Trail.h +++ b/stepmania/src/Trail.h @@ -19,7 +19,7 @@ struct TrailEntry bSecret(false), iLowMeter(-1), iHighMeter(-1), - dc(DIFFICULTY_INVALID) + dc(DIFFICULTY_Invalid) { } void GetAttackArray( AttackArray &out ) const; @@ -57,7 +57,7 @@ public: void Init() { m_StepsType = StepsType_Invalid; - m_CourseDifficulty = DIFFICULTY_INVALID; + m_CourseDifficulty = DIFFICULTY_Invalid; m_iSpecifiedMeter = -1; m_vEntries.clear(); m_bRadarValuesCached = false; diff --git a/stepmania/src/TrailUtil.cpp b/stepmania/src/TrailUtil.cpp index 0602f00d21..a278d600b1 100644 --- a/stepmania/src/TrailUtil.cpp +++ b/stepmania/src/TrailUtil.cpp @@ -11,7 +11,7 @@ void TrailID::FromTrail( const Trail *p ) if( p == NULL ) { st = StepsType_Invalid; - cd = DIFFICULTY_INVALID; + cd = DIFFICULTY_Invalid; } else { @@ -24,7 +24,7 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const { ASSERT( p ); - if( st == StepsType_Invalid || cd == DIFFICULTY_INVALID ) + if( st == StepsType_Invalid || cd == DIFFICULTY_Invalid ) return NULL; Trail *ret = p->GetTrail( st, cd ); @@ -66,7 +66,7 @@ RString TrailID::ToString() const bool TrailID::IsValid() const { - return st != StepsType_Invalid && cd != DIFFICULTY_INVALID; + return st != StepsType_Invalid && cd != DIFFICULTY_Invalid; } bool TrailID::operator<( const TrailID &rhs ) const diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 7d40081200..c543c55d83 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -174,7 +174,7 @@ bool UnlockManager::ModifierIsLocked( const RString &sOneMod ) const const UnlockEntry *UnlockManager::FindSong( const Song *pSong ) const { FOREACH_CONST( UnlockEntry, m_UnlockEntries, e ) - if( e->m_pSong == pSong && e->m_dc == DIFFICULTY_INVALID ) + if( e->m_pSong == pSong && e->m_dc == DIFFICULTY_Invalid ) return &(*e); return NULL; } @@ -294,7 +294,7 @@ bool UnlockEntry::IsValid() const return m_pSong != NULL; case UnlockRewardType_Steps: - return m_pSong != NULL && m_dc != DIFFICULTY_INVALID; + return m_pSong != NULL && m_dc != DIFFICULTY_Invalid; case UnlockRewardType_Course: return m_pCourse != NULL; @@ -578,7 +578,7 @@ void UnlockManager::UpdateCachedPointers() } e->m_dc = StringToDifficulty( e->m_cmd.GetArg(2) ); - if( e->m_dc == DIFFICULTY_INVALID ) + if( e->m_dc == DIFFICULTY_Invalid ) { LOG->Warn( "Unlock: Invalid difficulty \"%s\"", e->m_cmd.GetArg(2).s.c_str() ); break; diff --git a/stepmania/src/UnlockManager.h b/stepmania/src/UnlockManager.h index c66d99c950..64db68c84f 100644 --- a/stepmania/src/UnlockManager.h +++ b/stepmania/src/UnlockManager.h @@ -55,7 +55,7 @@ public: m_Type = UnlockRewardType_Invalid; m_pSong = NULL; - m_dc = DIFFICULTY_INVALID; + m_dc = DIFFICULTY_Invalid; m_pCourse = NULL; ZERO( m_fRequirement );