diff --git a/stepmania/src/CommonMetrics.cpp b/stepmania/src/CommonMetrics.cpp index e9578b1ca4..6a5c51241b 100644 --- a/stepmania/src/CommonMetrics.cpp +++ b/stepmania/src/CommonMetrics.cpp @@ -76,7 +76,7 @@ void ThemeMetricCourseDifficultiesToShow::Read() FOREACH_CONST( RString, v, i ) { CourseDifficulty d = StringToCourseDifficulty( *i ); - if( d == Difficulty_Invalid ) + if( d == CourseDifficulty_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 711fee0182..04662bf490 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -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 != CourseDifficulty_Invalid ); // // Check to see if the Trail cache is out of date @@ -332,13 +332,13 @@ bool Course::GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) c /* Sort according to DIFFICULTY_MEDIUM, since the order of songs * must not change across difficulties. */ Trail SortTrail; - if( cd == DIFFICULTY_MEDIUM ) + if( cd == COURSE_DIFFICULTY_REGULAR ) SortTrail = trail; else { - bool bOK = GetTrailUnsorted( st, DIFFICULTY_MEDIUM, SortTrail ); + bool bOK = GetTrailUnsorted( st, COURSE_DIFFICULTY_REGULAR, SortTrail ); - /* If we have any other difficulty, we must have DIFFICULTY_MEDIUM. */ + /* If we have any other difficulty, we must have COURSE_DIFFICULTY_REGULAR. */ ASSERT( bOK ); } ASSERT_M( trail.m_vEntries.size() == SortTrail.m_vEntries.size(), @@ -403,8 +403,8 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) switch( cd ) { - case DIFFICULTY_BEGINNER: - case DIFFICULTY_CHALLENGE: + case COURSE_DIFFICULTY_BEGINNER: + case COURSE_DIFFICULTY_CHALLENGE: return false; } @@ -434,7 +434,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) trail.m_CourseDifficulty = cd; /* Set to true if CourseDifficulty is able to change something. */ - bool bCourseDifficultyIsSignificant = (cd == DIFFICULTY_MEDIUM); + bool bCourseDifficultyIsSignificant = (cd == COURSE_DIFFICULTY_REGULAR); vector vpAllPossibleSongs; vector vSongAndSteps; @@ -518,9 +518,9 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) Difficulty dc = resolved.pSteps->GetDifficulty(); int iLowMeter = e->stepsCriteria.m_iLowMeter; int iHighMeter = e->stepsCriteria.m_iHighMeter; - if( cd != DIFFICULTY_MEDIUM && !e->bNoDifficult ) + if( cd != COURSE_DIFFICULTY_REGULAR && !e->bNoDifficult ) { - Difficulty new_dc = (Difficulty)(dc + cd - DIFFICULTY_MEDIUM); + Difficulty new_dc = (Difficulty)(dc + cd - COURSE_DIFFICULTY_REGULAR); new_dc = clamp( new_dc, (Difficulty)0, (Difficulty)(DIFFICULTY_EDIT-1) ); bool bChangedDifficulty = false; @@ -611,7 +611,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) trail.m_iSpecifiedMeter = m_iCustomMeter[cd]; /* If the course difficulty never actually changed anything, then this difficulty - * is equivalent to DIFFICULTY_MEDIUM; it doesn't exist. */ + * is equivalent to COURSE_DIFFICULTY_REGULAR; it doesn't exist. */ return bCourseDifficultyIsSignificant; } @@ -752,7 +752,7 @@ bool Course::GetTotalSeconds( StepsType st, float& fSecondsOut ) const if( !AllSongsAreFixed() ) return false; - Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM ); + Trail* pTrail = GetTrail( st, COURSE_DIFFICULTY_REGULAR ); fSecondsOut = pTrail->GetLengthSeconds(); return true; @@ -792,7 +792,7 @@ void Course::UpdateCourseStats( StepsType st ) return; } - const Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM ); + const Trail* pTrail = GetTrail( st, COURSE_DIFFICULTY_REGULAR ); m_SortOrder_TotalDifficulty += pTrail != NULL? pTrail->GetTotalMeter():0; diff --git a/stepmania/src/Course.h b/stepmania/src/Course.h index faf76eb4eb..751b2ca6a8 100644 --- a/stepmania/src/Course.h +++ b/stepmania/src/Course.h @@ -133,11 +133,11 @@ public: RString GetTranslitFullTitle() const; // Dereferences course_entries and returns only the playable Songs and Steps - Trail* GetTrail( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const; - Trail* GetTrailForceRegenCache( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const; + Trail* GetTrail( StepsType st, CourseDifficulty cd=COURSE_DIFFICULTY_REGULAR ) const; + Trail* GetTrailForceRegenCache( StepsType st, CourseDifficulty cd=COURSE_DIFFICULTY_REGULAR ) const; void GetTrails( vector &AddTo, StepsType st ) const; void GetAllTrails( vector &AddTo ) const; - int GetMeter( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const; + int GetMeter( StepsType st, CourseDifficulty cd=COURSE_DIFFICULTY_REGULAR ) const; bool HasMods() const; bool AllSongsAreFixed() const; @@ -193,7 +193,7 @@ public: bool IsAnEdit() const { return m_LoadedFromProfile != ProfileSlot_Invalid; } ProfileSlot m_LoadedFromProfile; // ProfileSlot_Invalid if wasn't loaded from a profile - typedef pair CacheEntry; + typedef pair CacheEntry; struct CacheData { Trail trail; diff --git a/stepmania/src/CourseLoaderCRS.cpp b/stepmania/src/CourseLoaderCRS.cpp index 457f11d5a2..e7a14e720a 100644 --- a/stepmania/src/CourseLoaderCRS.cpp +++ b/stepmania/src/CourseLoaderCRS.cpp @@ -68,12 +68,12 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou { if( sParams.params.size() == 2 ) { - out.m_iCustomMeter[DIFFICULTY_MEDIUM] = max( atoi(sParams[1]), 0 ); /* compat */ + out.m_iCustomMeter[COURSE_DIFFICULTY_REGULAR] = max( atoi(sParams[1]), 0 ); /* compat */ } else if( sParams.params.size() == 3 ) { const CourseDifficulty cd = StringToCourseDifficulty( sParams[1] ); - if( cd == Difficulty_Invalid ) + if( cd == CourseDifficulty_Invalid ) { LOG->UserLog( "Course file", sPath, "contains an invalid #METER string: \"%s\"", sParams[1].c_str() ); continue; diff --git a/stepmania/src/CourseUtil.cpp b/stepmania/src/CourseUtil.cpp index 404ba5caa0..66e5eb725e 100644 --- a/stepmania/src/CourseUtil.cpp +++ b/stepmania/src/CourseUtil.cpp @@ -148,7 +148,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector &vpCours course_sort_val.clear(); for( unsigned i = 0; i < vpCoursesInOut.size(); ++i ) { - int iMeter = vpCoursesInOut[i]->GetMeter( GAMESTATE->GetCurrentStyle()->m_StepsType, DIFFICULTY_MEDIUM ); + int iMeter = vpCoursesInOut[i]->GetMeter( GAMESTATE->GetCurrentStyle()->m_StepsType, COURSE_DIFFICULTY_REGULAR ); course_sort_val[vpCoursesInOut[i]] = ssprintf( "%06i", iMeter ); } sort( vpCoursesInOut.begin(), vpCoursesInOut.end(), CompareCoursePointersByTitle ); @@ -200,7 +200,7 @@ void CourseUtil::MakeDefaultEditCourseEntry( CourseEntry& out ) // Autogen ////////////////////////////////// -void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, Difficulty diff, Course &out ) +void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out ) { out.m_bIsAutogen = true; out.m_bRepeat = true; @@ -225,7 +225,7 @@ void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, Difficulty // but that'd be rare.) -glenn CourseEntry e; e.songCriteria.m_sGroupName = sGroupName; - e.stepsCriteria.m_difficulty = diff; + e.stepsCriteria.m_difficulty = (Difficulty)cd; e.bSecret = true; vector vSongs; @@ -234,9 +234,9 @@ void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, Difficulty out.m_vEntries.push_back( e ); } -void CourseUtil::AutogenNonstopFromGroup( const RString &sGroupName, Difficulty diff, Course &out ) +void CourseUtil::AutogenNonstopFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out ) { - AutogenEndlessFromGroup( sGroupName, diff, out ); + AutogenEndlessFromGroup( sGroupName, cd, out ); out.m_bRepeat = false; diff --git a/stepmania/src/CourseUtil.h b/stepmania/src/CourseUtil.h index 9d715f4da1..5d3aa01d88 100644 --- a/stepmania/src/CourseUtil.h +++ b/stepmania/src/CourseUtil.h @@ -28,8 +28,8 @@ namespace CourseUtil void MakeDefaultEditCourseEntry( CourseEntry &out ); - void AutogenEndlessFromGroup( const RString &sGroupName, Difficulty dc, Course &out ); - void AutogenNonstopFromGroup( const RString &sGroupName, Difficulty dc, Course &out ); + void AutogenEndlessFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out ); + void AutogenNonstopFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out ); void AutogenOniFromArtist( const RString &sArtistName, RString sArtistNameTranslit, vector aSongs, Difficulty dc, Course &out ); bool ValidateEditCourseName( const RString &sAnswer, RString &sErrorOut ); diff --git a/stepmania/src/DifficultyIcon.cpp b/stepmania/src/DifficultyIcon.cpp index 555a1199a1..198fae701d 100644 --- a/stepmania/src/DifficultyIcon.cpp +++ b/stepmania/src/DifficultyIcon.cpp @@ -80,7 +80,7 @@ void DifficultyIcon::SetFromTrail( PlayerNumber pn, const Trail* pTrail ) if( pTrail == NULL ) Unset(); else - SetFromDifficulty( pTrail->m_CourseDifficulty ); + SetFromDifficulty( (Difficulty)pTrail->m_CourseDifficulty ); } void DifficultyIcon::Unset() diff --git a/stepmania/src/DifficultyMeter.cpp b/stepmania/src/DifficultyMeter.cpp index ff3bcdb926..0a5139c25e 100644 --- a/stepmania/src/DifficultyMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -169,7 +169,7 @@ void DifficultyMeter::SetFromTrail( const Trail* pTrail ) } CourseDifficulty cd = pTrail->m_CourseDifficulty; - SetInternal( pTrail->GetMeter(), cd, GetCourseDifficultyCommandName( cd ), RString() ); + SetInternal( pTrail->GetMeter(), (Difficulty)cd, GetCourseDifficultyCommandName( cd ), RString() ); } void DifficultyMeter::Unset() @@ -184,7 +184,7 @@ void DifficultyMeter::SetFromMeterAndDifficulty( int iMeter, Difficulty dc ) void DifficultyMeter::SetFromMeterAndCourseDifficulty( int iMeter, CourseDifficulty cd ) { - SetInternal( 0, cd, GetCourseDifficultyCommandName(cd), RString() ); + SetInternal( 0, (Difficulty)cd, GetCourseDifficultyCommandName(cd), RString() ); } void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const RString &sDifficultyCommand, const RString &sDescription ) diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index d80e660d50..676ced2bcf 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -39,7 +39,7 @@ void GameCommand::Init() m_pStyle = NULL; m_pm = PlayMode_Invalid; m_dc = Difficulty_Invalid; - m_CourseDifficulty = Difficulty_Invalid; + m_CourseDifficulty = CourseDifficulty_Invalid; m_sPreferredModifiers = ""; m_sStageModifiers = ""; m_sAnnouncer = ""; @@ -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 != CourseDifficulty_Invalid, ssprintf("Invalid difficulty '%s'", sTrail.c_str()) ); m_pTrail = pCourse->GetTrail( pStyle->m_StepsType, cd ); if( m_pTrail == NULL ) @@ -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 != CourseDifficulty_Invalid ) FOREACH_CONST( PlayerNumber, vpns, pn ) GAMESTATE->ChangePreferredCourseDifficulty( *pn, m_CourseDifficulty ); if( m_pCharacter ) @@ -790,7 +790,7 @@ bool GameCommand::IsZero() const m_pCourse != NULL || m_pTrail != NULL || m_pCharacter != NULL || - m_CourseDifficulty != Difficulty_Invalid || + m_CourseDifficulty != CourseDifficulty_Invalid || !m_sSongGroup.empty() || m_SortOrder != SortOrder_Invalid || m_iWeightPounds != -1 || diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 886d1a9765..23660a4ff9 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -200,7 +200,7 @@ void GameState::Reset() FOREACH_PlayerNumber( p ) { m_PreferredDifficulty[p].Set( Difficulty_Invalid ); - m_PreferredCourseDifficulty[p].Set( DIFFICULTY_MEDIUM ); + m_PreferredCourseDifficulty[p].Set( COURSE_DIFFICULTY_REGULAR ); } m_SortOrder.Set( SortOrder_Invalid ); m_PreferredSortOrder = GetDefaultSort(); @@ -394,7 +394,7 @@ void GameState::PlayersFinalized() m_PreferredSortOrder = pProfile->m_SortOrder; if( pProfile->m_LastDifficulty != Difficulty_Invalid ) m_PreferredDifficulty[pn].Set( pProfile->m_LastDifficulty ); - if( pProfile->m_LastCourseDifficulty != Difficulty_Invalid ) + if( pProfile->m_LastCourseDifficulty != CourseDifficulty_Invalid ) m_PreferredCourseDifficulty[pn].Set( pProfile->m_LastCourseDifficulty ); if( m_pPreferredSong == NULL ) m_pPreferredSong = pProfile->m_lastSong.ToSong(); @@ -1424,7 +1424,7 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector &asFeatsOu feat.Type = RankingFeat::COURSE; feat.pCourse = pCourse; feat.Feat = ssprintf("MR #%d in %s", i+1, pCourse->GetDisplayFullTitle().c_str() ); - if( cd != DIFFICULTY_MEDIUM ) + if( cd != COURSE_DIFFICULTY_REGULAR ) feat.Feat += " " + CourseDifficultyToLocalizedString(cd); feat.pStringToFill = hs.GetNameMutable(); feat.grade = Grade_NoData; @@ -1693,7 +1693,7 @@ bool GameState::ChangePreferredCourseDifficulty( PlayerNumber pn, int dir ) while( 1 ) { cd = (CourseDifficulty)(cd+dir); - if( cd < 0 || cd >= NUM_Difficulty ) + if( cd < 0 || cd >= NUM_CourseDifficulty ) return false; if( find(v.begin(),v.end(),cd) == v.end() ) continue; /* not available */ diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index f902cc6398..6a70cb7fd5 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -101,7 +101,7 @@ void Profile::InitGeneralData() m_SortOrder = SortOrder_Invalid; m_LastDifficulty = Difficulty_Invalid; - m_LastCourseDifficulty = Difficulty_Invalid; + m_LastCourseDifficulty = CourseDifficulty_Invalid; m_lastSong.Unset(); m_lastCourse.Unset(); m_iTotalPlays = 0; @@ -1906,13 +1906,13 @@ public: static int GetTotalNumSongsPlayed( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iNumTotalSongsPlayed ); return 1; } static int IsCodeUnlocked( T* p, lua_State *L ) { lua_pushboolean(L, p->IsCodeUnlocked(SArg(1)) ); return 1; } static int GetSongsActual( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongsActual(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } - static int GetCoursesActual( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesActual(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } + static int GetCoursesActual( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesActual(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } static int GetSongsPossible( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongsPossible(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } - static int GetCoursesPossible( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPossible(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } + static int GetCoursesPossible( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPossible(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } static int GetSongsPercentComplete( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongsPercentComplete(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } - static int GetCoursesPercentComplete( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPercentComplete(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } + static int GetCoursesPercentComplete( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPercentComplete(Enum::Check(L, 1),Enum::Check(L, 2)) ); return 1; } static int GetTotalStepsWithTopGrade( T* p, lua_State *L ) { lua_pushnumber(L, p->GetTotalStepsWithTopGrade(Enum::Check(L, 1),Enum::Check(L, 2),Enum::Check(L, 3)) ); return 1; } - static int GetTotalTrailsWithTopGrade( T* p, lua_State *L ) { lua_pushnumber(L, p->GetTotalTrailsWithTopGrade(Enum::Check(L, 1),Enum::Check(L, 2),Enum::Check(L, 3)) ); return 1; } + static int GetTotalTrailsWithTopGrade( T* p, lua_State *L ) { lua_pushnumber(L, p->GetTotalTrailsWithTopGrade(Enum::Check(L, 1),Enum::Check(L, 2),Enum::Check(L, 3)) ); return 1; } static int GetNumTotalSongsPlayed( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iNumTotalSongsPlayed ); return 1; } static int GetLastPlayedStepsType( T* p, lua_State *L ) { lua_pushnumber(L, p->GetLastPlayedStepsType() ); return 1; } static int GetSongsAndCoursesPercentCompleteAllDifficulties( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongsAndCoursesPercentCompleteAllDifficulties(Enum::Check(L, 1)) ); return 1; } diff --git a/stepmania/src/ScreenOptionsEditCourseEntry.cpp b/stepmania/src/ScreenOptionsEditCourseEntry.cpp index 2b98a7d752..c3f22b29cc 100644 --- a/stepmania/src/ScreenOptionsEditCourseEntry.cpp +++ b/stepmania/src/ScreenOptionsEditCourseEntry.cpp @@ -242,8 +242,8 @@ 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 ? - GAMESTATE->m_cdEdit : ce.stepsCriteria.m_difficulty ); + CourseDifficulty cd = CourseDifficulty( ce.stepsCriteria.m_difficulty == Difficulty_Invalid ? + GAMESTATE->m_cdEdit : ce.stepsCriteria.m_difficulty ); if( pSong == NULL ) pSong = m_pLongSong; @@ -274,11 +274,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 ); + pSteps = SongUtil::GetStepsByDifficulty( pSong, st, (Difficulty)cd, false ); if( !pSteps ) pSteps = SongUtil::GetStepsByDifficulty( pSong, st, Difficulty_Invalid, false ); if( !pSteps ) - pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, cd, false ); + pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, (Difficulty)cd, false ); if( !pSteps ) pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, Difficulty_Invalid, false ); ASSERT( pSteps ); diff --git a/stepmania/src/ScreenOptionsManageCourses.cpp b/stepmania/src/ScreenOptionsManageCourses.cpp index b97e6ecd81..b2509dd309 100644 --- a/stepmania/src/ScreenOptionsManageCourses.cpp +++ b/stepmania/src/ScreenOptionsManageCourses.cpp @@ -34,9 +34,9 @@ static void RefreshTrail() struct StepsTypeAndDifficulty { StepsType st; - Difficulty cd; + CourseDifficulty cd; - StepsTypeAndDifficulty( const StepsType &s, const Difficulty &d ) : st( s ), cd( d ) { } + StepsTypeAndDifficulty( const StepsType &s, const CourseDifficulty &d ) : st( s ), cd( d ) { } bool operator==( const StepsTypeAndDifficulty &stad ) const { return st == stad.st && cd == stad.cd; } }; static void SetNextCombination() diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index 823aca7b1a..d8067870b8 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -301,7 +301,7 @@ void ScoreScroller::ConfigureActor( Actor *pActor, int iItem ) { BitmapText* pTextStepsScore = &item.m_textScore[*cd]; - const Trail *pTrail = pCourse->GetTrail( m_StepsType, *cd ); + const Trail *pTrail = pCourse->GetTrail( m_StepsType, (CourseDifficulty)*cd ); if( UNLOCKMAN->CourseIsLocked(pCourse) ) pTrail = NULL; pTextStepsScore->SetHidden( pTrail==NULL ); @@ -417,7 +417,7 @@ void ScreenRankingScroller::Init() if( m_PageType == PageType_AllSteps ) m_sprDifficulty[*d].Load( THEME->GetPathG(m_sName,"difficulty "+DifficultyToString(*d)) ); else - m_sprDifficulty[*d].Load( THEME->GetPathG(m_sName,"CourseDifficulty "+CourseDifficultyToString(*d)) ); + m_sprDifficulty[*d].Load( THEME->GetPathG(m_sName,"CourseDifficulty "+CourseDifficultyToString((CourseDifficulty)*d)) ); m_sprDifficulty[*d]->SetName( "Difficulty"+DifficultyToString(*d) ); m_sprDifficulty[*d]->SetXY( DIFFICULTY_X(*d), DIFFICULTY_Y ); this->AddChild( m_sprDifficulty[*d] ); diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 2ba7ee53aa..547dc4df52 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -748,11 +748,11 @@ void SongManager::InitAutogenCourses() // Generate random courses from each group. pCourse = new Course; - CourseUtil::AutogenEndlessFromGroup( sGroupName, DIFFICULTY_MEDIUM, *pCourse ); + CourseUtil::AutogenEndlessFromGroup( sGroupName, COURSE_DIFFICULTY_REGULAR, *pCourse ); m_pCourses.push_back( pCourse ); pCourse = new Course; - CourseUtil::AutogenNonstopFromGroup( sGroupName, DIFFICULTY_MEDIUM, *pCourse ); + CourseUtil::AutogenNonstopFromGroup( sGroupName, COURSE_DIFFICULTY_REGULAR, *pCourse ); m_pCourses.push_back( pCourse ); } @@ -760,7 +760,7 @@ void SongManager::InitAutogenCourses() // Generate "All Songs" endless course. pCourse = new Course; - CourseUtil::AutogenEndlessFromGroup( "", DIFFICULTY_MEDIUM, *pCourse ); + CourseUtil::AutogenEndlessFromGroup( "", COURSE_DIFFICULTY_REGULAR, *pCourse ); m_pCourses.push_back( pCourse ); /* Generate Oni courses from artists. Only create courses if we have at least diff --git a/stepmania/src/Trail.h b/stepmania/src/Trail.h index 55e4d74c90..fd9c6c6ca2 100644 --- a/stepmania/src/Trail.h +++ b/stepmania/src/Trail.h @@ -57,7 +57,7 @@ public: void Init() { m_StepsType = StepsType_Invalid; - m_CourseDifficulty = Difficulty_Invalid; + m_CourseDifficulty = CourseDifficulty_Invalid; m_iSpecifiedMeter = -1; m_vEntries.clear(); m_bRadarValuesCached = false; diff --git a/stepmania/src/TrailUtil.cpp b/stepmania/src/TrailUtil.cpp index 62af664242..e4e2f2cf92 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 = CourseDifficulty_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 == CourseDifficulty_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 != CourseDifficulty_Invalid; } bool TrailID::operator<( const TrailID &rhs ) const