revert. You brought back a type I've been trying to remove.

This commit is contained in:
Glenn Maynard
2006-10-07 22:33:24 +00:00
parent df5d19bd97
commit 78a91ba878
19 changed files with 73 additions and 81 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ void ThemeMetricCourseDifficultiesToShow::Read()
FOREACH_CONST( RString, v, i )
{
CourseDifficulty d = StringToCourseDifficulty( *i );
if( d == CourseDifficulty_Invalid )
if( d == Difficulty_Invalid )
RageException::Throw( "Unknown CourseDifficulty \"%s\" in CourseDifficultiesToShow.", i->c_str() );
m_v.push_back( d );
}
+12 -12
View File
@@ -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 != CourseDifficulty_Invalid );
ASSERT( cd != Difficulty_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 == COURSE_DIFFICULTY_REGULAR )
if( cd == DIFFICULTY_MEDIUM )
SortTrail = trail;
else
{
bool bOK = GetTrailUnsorted( st, COURSE_DIFFICULTY_REGULAR, SortTrail );
bool bOK = GetTrailUnsorted( st, DIFFICULTY_MEDIUM, SortTrail );
/* If we have any other difficulty, we must have COURSE_DIFFICULTY_REGULAR. */
/* If we have any other difficulty, we must have DIFFICULTY_MEDIUM. */
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 COURSE_DIFFICULTY_BEGINNER:
case COURSE_DIFFICULTY_CHALLENGE:
case DIFFICULTY_BEGINNER:
case 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 == COURSE_DIFFICULTY_REGULAR);
bool bCourseDifficultyIsSignificant = (cd == DIFFICULTY_MEDIUM);
vector<Song*> vpAllPossibleSongs;
vector<SongAndSteps> 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 != COURSE_DIFFICULTY_REGULAR && !e->bNoDifficult )
if( cd != DIFFICULTY_MEDIUM && !e->bNoDifficult )
{
Difficulty new_dc = (Difficulty)(dc + cd - COURSE_DIFFICULTY_REGULAR);
Difficulty new_dc = (Difficulty)(dc + cd - DIFFICULTY_MEDIUM);
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 COURSE_DIFFICULTY_REGULAR; it doesn't exist. */
* is equivalent to DIFFICULTY_MEDIUM; 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, COURSE_DIFFICULTY_REGULAR );
Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM );
fSecondsOut = pTrail->GetLengthSeconds();
return true;
@@ -792,7 +792,7 @@ void Course::UpdateCourseStats( StepsType st )
return;
}
const Trail* pTrail = GetTrail( st, COURSE_DIFFICULTY_REGULAR );
const Trail* pTrail = GetTrail( st, DIFFICULTY_MEDIUM );
m_SortOrder_TotalDifficulty += pTrail != NULL? pTrail->GetTotalMeter():0;
+4 -4
View File
@@ -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=COURSE_DIFFICULTY_REGULAR ) const;
Trail* GetTrailForceRegenCache( StepsType st, CourseDifficulty cd=COURSE_DIFFICULTY_REGULAR ) const;
Trail* GetTrail( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const;
Trail* GetTrailForceRegenCache( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) const;
void GetTrails( vector<Trail*> &AddTo, StepsType st ) const;
void GetAllTrails( vector<Trail*> &AddTo ) const;
int GetMeter( StepsType st, CourseDifficulty cd=COURSE_DIFFICULTY_REGULAR ) const;
int GetMeter( StepsType st, CourseDifficulty cd=DIFFICULTY_MEDIUM ) 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<StepsType,CourseDifficulty> CacheEntry;
typedef pair<StepsType,Difficulty> CacheEntry;
struct CacheData
{
Trail trail;
+2 -2
View File
@@ -68,12 +68,12 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou
{
if( sParams.params.size() == 2 )
{
out.m_iCustomMeter[COURSE_DIFFICULTY_REGULAR] = max( atoi(sParams[1]), 0 ); /* compat */
out.m_iCustomMeter[DIFFICULTY_MEDIUM] = max( atoi(sParams[1]), 0 ); /* compat */
}
else if( sParams.params.size() == 3 )
{
const CourseDifficulty cd = StringToCourseDifficulty( sParams[1] );
if( cd == CourseDifficulty_Invalid )
if( cd == Difficulty_Invalid )
{
LOG->UserLog( "Course file", sPath, "contains an invalid #METER string: \"%s\"", sParams[1].c_str() );
continue;
+5 -5
View File
@@ -148,7 +148,7 @@ void CourseUtil::SortCoursePointerArrayByAvgDifficulty( vector<Course*> &vpCours
course_sort_val.clear();
for( unsigned i = 0; i < vpCoursesInOut.size(); ++i )
{
int iMeter = vpCoursesInOut[i]->GetMeter( GAMESTATE->GetCurrentStyle()->m_StepsType, COURSE_DIFFICULTY_REGULAR );
int iMeter = vpCoursesInOut[i]->GetMeter( GAMESTATE->GetCurrentStyle()->m_StepsType, DIFFICULTY_MEDIUM );
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, CourseDifficulty cd, Course &out )
void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, Difficulty diff, Course &out )
{
out.m_bIsAutogen = true;
out.m_bRepeat = true;
@@ -225,7 +225,7 @@ void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, CourseDiffi
// but that'd be rare.) -glenn
CourseEntry e;
e.songCriteria.m_sGroupName = sGroupName;
e.stepsCriteria.m_difficulty = (Difficulty)cd;
e.stepsCriteria.m_difficulty = diff;
e.bSecret = true;
vector<Song*> vSongs;
@@ -234,9 +234,9 @@ void CourseUtil::AutogenEndlessFromGroup( const RString &sGroupName, CourseDiffi
out.m_vEntries.push_back( e );
}
void CourseUtil::AutogenNonstopFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out )
void CourseUtil::AutogenNonstopFromGroup( const RString &sGroupName, Difficulty diff, Course &out )
{
AutogenEndlessFromGroup( sGroupName, cd, out );
AutogenEndlessFromGroup( sGroupName, diff, out );
out.m_bRepeat = false;
+2 -2
View File
@@ -28,8 +28,8 @@ namespace CourseUtil
void MakeDefaultEditCourseEntry( CourseEntry &out );
void AutogenEndlessFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out );
void AutogenNonstopFromGroup( const RString &sGroupName, CourseDifficulty cd, Course &out );
void AutogenEndlessFromGroup( const RString &sGroupName, Difficulty dc, Course &out );
void AutogenNonstopFromGroup( const RString &sGroupName, Difficulty dc, Course &out );
void AutogenOniFromArtist( const RString &sArtistName, RString sArtistNameTranslit, vector<Song*> aSongs, Difficulty dc, Course &out );
bool ValidateEditCourseName( const RString &sAnswer, RString &sErrorOut );
+5 -6
View File
@@ -40,11 +40,11 @@ Difficulty StringToDifficulty( const RString& sDC )
else if( s2 == "maniac" ) return DIFFICULTY_HARD;
else if( s2 == "heavy" ) return DIFFICULTY_HARD;
else if( s2 == "smaniac" ) return DIFFICULTY_CHALLENGE;
else if( s2 == "challenge" ) return DIFFICULTY_CHALLENGE;
else if( s2 == "challenge" )return DIFFICULTY_CHALLENGE;
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[] =
@@ -59,18 +59,17 @@ static const char *CourseDifficultyNames[] =
XToString( CourseDifficulty, NUM_Difficulty );
XToLocalizedString( CourseDifficulty );
StringToX( CourseDifficulty );
LuaXType( CourseDifficulty );
LuaFunction( CourseDifficultyToLocalizedString, CourseDifficultyToLocalizedString(Enum::Check<CourseDifficulty>(L, 1)) );
LuaFunction( CourseDifficultyToLocalizedString, CourseDifficultyToLocalizedString(Enum::Check<Difficulty>(L, 1)) );
CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd )
{
for( CourseDifficulty d=enum_add2(cd,1); d<NUM_CourseDifficulty; enum_add(d, 1) )
for( CourseDifficulty d=(CourseDifficulty)(cd+1); d<NUM_Difficulty; ((int&)d)++ )
{
if( GAMESTATE->IsCourseDifficultyShown(d) )
return d;
}
return CourseDifficulty_Invalid;
return Difficulty_Invalid;
}
/*
+12 -19
View File
@@ -6,7 +6,7 @@
//
// Player number stuff
//
enum Difficulty
enum Difficulty
{
DIFFICULTY_BEGINNER,
DIFFICULTY_EASY,
@@ -23,25 +23,18 @@ const RString& DifficultyToLocalizedString( Difficulty dc );
Difficulty StringToDifficulty( const RString& sDC );
LuaDeclareType( Difficulty );
enum CourseDifficulty
{
COURSE_DIFFICULTY_BEGINNER,
COURSE_DIFFICULTY_EASY,
COURSE_DIFFICULTY_REGULAR,
COURSE_DIFFICULTY_DIFFICULT,
COURSE_DIFFICULTY_CHALLENGE,
COURSE_DIFFICULTY_EDIT,
NUM_CourseDifficulty,
CourseDifficulty_Invalid
};
#define FOREACH_CourseDifficulty( cd ) FOREACH_ENUM( CourseDifficulty, cd )
#define FOREACH_ShownCourseDifficulty( cd ) for( CourseDifficulty cd=GetNextShownCourseDifficulty((CourseDifficulty)-1); cd!=CourseDifficulty_Invalid; cd=GetNextShownCourseDifficulty(cd) )
const RString& CourseDifficultyToString( CourseDifficulty dc );
const RString& CourseDifficultyToLocalizedString( CourseDifficulty dc );
CourseDifficulty StringToCourseDifficulty( const RString& sDC );
LuaDeclareType( CourseDifficulty );
CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty pn );
typedef Difficulty CourseDifficulty;
#define NUM_CourseDifficulty NUM_Difficulty
#define CourseDifficulty_Invalid Difficulty_Invalid
#define FOREACH_CourseDifficulty FOREACH_Difficulty
#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 );
Difficulty StringToCourseDifficulty( const RString& sDC );
Difficulty GetNextShownCourseDifficulty( Difficulty pn );
#endif
+1 -1
View File
@@ -80,7 +80,7 @@ void DifficultyIcon::SetFromTrail( PlayerNumber pn, const Trail* pTrail )
if( pTrail == NULL )
Unset();
else
SetFromDifficulty( (Difficulty)pTrail->m_CourseDifficulty );
SetFromDifficulty( pTrail->m_CourseDifficulty );
}
void DifficultyIcon::Unset()
+2 -2
View File
@@ -169,7 +169,7 @@ void DifficultyMeter::SetFromTrail( const Trail* pTrail )
}
CourseDifficulty cd = pTrail->m_CourseDifficulty;
SetInternal( pTrail->GetMeter(), (Difficulty)cd, GetCourseDifficultyCommandName( cd ), RString() );
SetInternal( pTrail->GetMeter(), 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, (Difficulty)cd, GetCourseDifficultyCommandName(cd), RString() );
SetInternal( 0, cd, GetCourseDifficultyCommandName(cd), RString() );
}
void DifficultyMeter::SetInternal( int iMeter, Difficulty dc, const RString &sDifficultyCommand, const RString &sDescription )
+4 -4
View File
@@ -39,7 +39,7 @@ void GameCommand::Init()
m_pStyle = NULL;
m_pm = PlayMode_Invalid;
m_dc = Difficulty_Invalid;
m_CourseDifficulty = CourseDifficulty_Invalid;
m_CourseDifficulty = Difficulty_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 != CourseDifficulty_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 )
@@ -697,7 +697,7 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
if( m_pTrail )
FOREACH_CONST( PlayerNumber, vpns, pn )
GAMESTATE->m_pCurTrail[*pn].Set( m_pTrail );
if( m_CourseDifficulty != CourseDifficulty_Invalid )
if( m_CourseDifficulty != Difficulty_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 != CourseDifficulty_Invalid ||
m_CourseDifficulty != Difficulty_Invalid ||
!m_sSongGroup.empty() ||
m_SortOrder != SortOrder_Invalid ||
m_iWeightPounds != -1 ||
+4 -4
View File
@@ -200,7 +200,7 @@ void GameState::Reset()
FOREACH_PlayerNumber( p )
{
m_PreferredDifficulty[p].Set( Difficulty_Invalid );
m_PreferredCourseDifficulty[p].Set( COURSE_DIFFICULTY_REGULAR );
m_PreferredCourseDifficulty[p].Set( DIFFICULTY_MEDIUM );
}
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 != CourseDifficulty_Invalid )
if( pProfile->m_LastCourseDifficulty != Difficulty_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<RankingFeat> &asFeatsOu
feat.Type = RankingFeat::COURSE;
feat.pCourse = pCourse;
feat.Feat = ssprintf("MR #%d in %s", i+1, pCourse->GetDisplayFullTitle().c_str() );
if( cd != COURSE_DIFFICULTY_REGULAR )
if( cd != DIFFICULTY_MEDIUM )
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_CourseDifficulty )
if( cd < 0 || cd >= NUM_Difficulty )
return false;
if( find(v.begin(),v.end(),cd) == v.end() )
continue; /* not available */
+5 -5
View File
@@ -101,7 +101,7 @@ void Profile::InitGeneralData()
m_SortOrder = SortOrder_Invalid;
m_LastDifficulty = Difficulty_Invalid;
m_LastCourseDifficulty = CourseDifficulty_Invalid;
m_LastCourseDifficulty = Difficulty_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<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2)) ); return 1; }
static int GetCoursesActual( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesActual(Enum::Check<StepsType>(L, 1),Enum::Check<CourseDifficulty>(L, 2)) ); return 1; }
static int GetCoursesActual( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesActual(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2)) ); return 1; }
static int GetSongsPossible( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongsPossible(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2)) ); return 1; }
static int GetCoursesPossible( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPossible(Enum::Check<StepsType>(L, 1),Enum::Check<CourseDifficulty>(L, 2)) ); return 1; }
static int GetCoursesPossible( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPossible(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2)) ); return 1; }
static int GetSongsPercentComplete( T* p, lua_State *L ) { lua_pushnumber(L, p->GetSongsPercentComplete(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2)) ); return 1; }
static int GetCoursesPercentComplete( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPercentComplete(Enum::Check<StepsType>(L, 1),Enum::Check<CourseDifficulty>(L, 2)) ); return 1; }
static int GetCoursesPercentComplete( T* p, lua_State *L ) { lua_pushnumber(L, p->GetCoursesPercentComplete(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2)) ); return 1; }
static int GetTotalStepsWithTopGrade( T* p, lua_State *L ) { lua_pushnumber(L, p->GetTotalStepsWithTopGrade(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2),Enum::Check<Grade>(L, 3)) ); return 1; }
static int GetTotalTrailsWithTopGrade( T* p, lua_State *L ) { lua_pushnumber(L, p->GetTotalTrailsWithTopGrade(Enum::Check<StepsType>(L, 1),Enum::Check<CourseDifficulty>(L, 2),Enum::Check<Grade>(L, 3)) ); return 1; }
static int GetTotalTrailsWithTopGrade( T* p, lua_State *L ) { lua_pushnumber(L, p->GetTotalTrailsWithTopGrade(Enum::Check<StepsType>(L, 1),Enum::Check<Difficulty>(L, 2),Enum::Check<Grade>(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<StepsType>(L, 1)) ); return 1; }
@@ -243,7 +243,7 @@ void ScreenOptionsEditCourseEntry::HandleScreenMessage( const ScreenMessage SM )
Steps *pSteps;
StepsType st = GAMESTATE->m_stEdit;
CourseDifficulty cd = ( ce.stepsCriteria.m_difficulty == Difficulty_Invalid ?
GAMESTATE->m_cdEdit : CourseDifficulty(ce.stepsCriteria.m_difficulty) );
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, (Difficulty)cd, false );
pSteps = SongUtil::GetStepsByDifficulty( pSong, st, cd, false );
if( !pSteps )
pSteps = SongUtil::GetStepsByDifficulty( pSong, st, Difficulty_Invalid, false );
if( !pSteps )
pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, (Difficulty)cd, false );
pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, cd, false );
if( !pSteps )
pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, Difficulty_Invalid, false );
ASSERT( pSteps );
+2 -2
View File
@@ -34,9 +34,9 @@ static void RefreshTrail()
struct StepsTypeAndDifficulty
{
StepsType st;
CourseDifficulty cd;
Difficulty cd;
StepsTypeAndDifficulty( const StepsType &s, const CourseDifficulty &d ) : st( s ), cd( d ) { }
StepsTypeAndDifficulty( const StepsType &s, const Difficulty &d ) : st( s ), cd( d ) { }
bool operator==( const StepsTypeAndDifficulty &stad ) const { return st == stad.st && cd == stad.cd; }
};
static void SetNextCombination()
+2 -2
View File
@@ -301,7 +301,7 @@ void ScoreScroller::ConfigureActor( Actor *pActor, int iItem )
{
BitmapText* pTextStepsScore = &item.m_textScore[*cd];
const Trail *pTrail = pCourse->GetTrail( m_StepsType, (CourseDifficulty)*cd );
const Trail *pTrail = pCourse->GetTrail( m_StepsType, *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((CourseDifficulty)*d)) );
m_sprDifficulty[*d].Load( THEME->GetPathG(m_sName,"CourseDifficulty "+CourseDifficultyToString(*d)) );
m_sprDifficulty[*d]->SetName( "Difficulty"+DifficultyToString(*d) );
m_sprDifficulty[*d]->SetXY( DIFFICULTY_X(*d), DIFFICULTY_Y );
this->AddChild( m_sprDifficulty[*d] );
+3 -3
View File
@@ -748,11 +748,11 @@ void SongManager::InitAutogenCourses()
// Generate random courses from each group.
pCourse = new Course;
CourseUtil::AutogenEndlessFromGroup( sGroupName, COURSE_DIFFICULTY_REGULAR, *pCourse );
CourseUtil::AutogenEndlessFromGroup( sGroupName, DIFFICULTY_MEDIUM, *pCourse );
m_pCourses.push_back( pCourse );
pCourse = new Course;
CourseUtil::AutogenNonstopFromGroup( sGroupName, COURSE_DIFFICULTY_REGULAR, *pCourse );
CourseUtil::AutogenNonstopFromGroup( sGroupName, DIFFICULTY_MEDIUM, *pCourse );
m_pCourses.push_back( pCourse );
}
@@ -760,7 +760,7 @@ void SongManager::InitAutogenCourses()
// Generate "All Songs" endless course.
pCourse = new Course;
CourseUtil::AutogenEndlessFromGroup( "", COURSE_DIFFICULTY_REGULAR, *pCourse );
CourseUtil::AutogenEndlessFromGroup( "", DIFFICULTY_MEDIUM, *pCourse );
m_pCourses.push_back( pCourse );
/* Generate Oni courses from artists. Only create courses if we have at least
+1 -1
View File
@@ -57,7 +57,7 @@ public:
void Init()
{
m_StepsType = StepsType_Invalid;
m_CourseDifficulty = CourseDifficulty_Invalid;
m_CourseDifficulty = Difficulty_Invalid;
m_iSpecifiedMeter = -1;
m_vEntries.clear();
m_bRadarValuesCached = false;
+3 -3
View File
@@ -11,7 +11,7 @@ void TrailID::FromTrail( const Trail *p )
if( p == NULL )
{
st = StepsType_Invalid;
cd = CourseDifficulty_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 == CourseDifficulty_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 != CourseDifficulty_Invalid;
return st != StepsType_Invalid && cd != Difficulty_Invalid;
}
bool TrailID::operator<( const TrailID &rhs ) const