more enum standardization
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
@@ -9,7 +9,7 @@ const int NUM_LAST_WEEKS = 52;
|
||||
const int DAYS_IN_YEAR = 366; // maximum (leap years)
|
||||
const int HOURS_IN_DAY = 24;
|
||||
const int DAYS_IN_WEEK = 7;
|
||||
enum Month { NUM_Month = 12 };
|
||||
enum Month { NUM_Month = 12, Month_Invalid };
|
||||
|
||||
RString DayInYearToString( int iDayInYearIndex );
|
||||
RString LastDayToString( int iLastDayIndex );
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -56,7 +56,7 @@ private:
|
||||
Row()
|
||||
{
|
||||
m_Steps = NULL;
|
||||
m_dc = DIFFICULTY_Invalid;
|
||||
m_dc = Difficulty_Invalid;
|
||||
m_fY = 0;
|
||||
m_bHidden = false;
|
||||
}
|
||||
|
||||
@@ -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() );
|
||||
|
||||
@@ -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<PlayerNumber> &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<PlayerNumber> &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 ||
|
||||
|
||||
@@ -168,7 +168,7 @@ TapNoteScore StringToTapNoteScore( const RString &s )
|
||||
else if( s == "Perfect" ) return TNS_W2;
|
||||
else if( s == "Marvelous" ) return TNS_W1;
|
||||
|
||||
return TNS_Invalid;
|
||||
return TapNoteScore_Invalid;
|
||||
}
|
||||
XToLocalizedString( TapNoteScore );
|
||||
LuaFunction( TapNoteScoreToLocalizedString, TapNoteScoreToLocalizedString(Enum::Check<TapNoteScore>(L, 1)) );
|
||||
@@ -192,7 +192,7 @@ HoldNoteScore StringToHoldNoteScore( const RString &s )
|
||||
else if( s == "LetGo" ) return HNS_LetGo;
|
||||
else if( s == "Held" ) return HNS_Held;
|
||||
|
||||
return HNS_Invalid;
|
||||
return HoldNoteScore_Invalid;
|
||||
}
|
||||
XToLocalizedString( HoldNoteScore );
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ enum TapNoteScore {
|
||||
TNS_W2,
|
||||
TNS_W1,
|
||||
NUM_TapNoteScore,
|
||||
TNS_Invalid,
|
||||
TapNoteScore_Invalid,
|
||||
};
|
||||
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM2( TapNoteScore, tns )
|
||||
const RString& TapNoteScoreToString( TapNoteScore tns );
|
||||
@@ -159,7 +159,7 @@ enum HoldNoteScore
|
||||
HNS_LetGo, // the HoldNote has passed and they missed it
|
||||
HNS_Held, // the HoldNote has passed and was successfully held all the way through
|
||||
NUM_HoldNoteScore,
|
||||
HNS_Invalid,
|
||||
HoldNoteScore_Invalid,
|
||||
};
|
||||
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM2( HoldNoteScore, hns )
|
||||
const RString& HoldNoteScoreToString( HoldNoteScore hns );
|
||||
@@ -345,7 +345,7 @@ enum PerDifficultyAward
|
||||
AWARD_PERCENT_90_W3,
|
||||
AWARD_PERCENT_100_W3,
|
||||
NUM_PerDifficultyAward,
|
||||
PER_DIFFICULTY_AWARD_Invalid,
|
||||
PerDifficultyAward_Invalid,
|
||||
};
|
||||
#define FOREACH_PerDifficultyAward( pma ) FOREACH_ENUM2( PerDifficultyAward, pma )
|
||||
const RString& PerDifficultyAwardToString( PerDifficultyAward pma );
|
||||
@@ -367,7 +367,7 @@ enum PeakComboAward
|
||||
AWARD_9000_PEAK_COMBO,
|
||||
AWARD_10000_PEAK_COMBO,
|
||||
NUM_PeakComboAward,
|
||||
PEAK_COMBO_AWARD_Invalid,
|
||||
PeakComboAward_Invalid,
|
||||
};
|
||||
#define FOREACH_PeakComboAward( pca ) FOREACH_ENUM2( PeakComboAward, pca )
|
||||
const RString& PeakComboAwardToString( PeakComboAward pma );
|
||||
@@ -444,7 +444,7 @@ enum Stage
|
||||
STAGE_EVENT,
|
||||
STAGE_DEMO,
|
||||
NUM_Stage,
|
||||
STAGE_Invalid,
|
||||
Stage_Invalid,
|
||||
};
|
||||
#define FOREACH_Stage( s ) FOREACH_ENUM2( Stage, s )
|
||||
const RString& StageToString( Stage s );
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -31,9 +31,9 @@ enum Grade
|
||||
Grade_Tier20,
|
||||
Grade_Failed, // = E
|
||||
NUM_Grade,
|
||||
GRADE_Invalid,
|
||||
Grade_Invalid,
|
||||
};
|
||||
#define Grade_NoData GRADE_Invalid
|
||||
#define Grade_NoData Grade_Invalid
|
||||
|
||||
/* This is in the header so the test sets don't require Grade.cpp (through PrefsManager),
|
||||
* since that pulls in ThemeManager. */
|
||||
|
||||
@@ -10,6 +10,7 @@ enum ModsLevel
|
||||
ModsLevel_Stage, // Preferred + forced stage mods
|
||||
ModsLevel_Song, // Stage + forced attack mods
|
||||
NUM_ModsLevel,
|
||||
ModsLevel_Invalid
|
||||
};
|
||||
LuaDeclareType( ModsLevel );
|
||||
|
||||
|
||||
@@ -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] );
|
||||
}
|
||||
|
||||
@@ -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<Difficulty> 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
|
||||
|
||||
@@ -43,7 +43,7 @@ NoteType NoteDataUtil::GetSmallestNoteTypeForMeasure( const NoteData &n, int iMe
|
||||
}
|
||||
|
||||
if( nt == NUM_NoteType ) // we didn't find one
|
||||
return NOTE_TYPE_Invalid; // well-formed notes created in the editor should never get here
|
||||
return NoteType_Invalid; // well-formed notes created in the editor should never get here
|
||||
else
|
||||
return nt;
|
||||
}
|
||||
@@ -337,7 +337,7 @@ void NoteDataUtil::GetSMNoteDataString( const NoteData &in, RString &sRet )
|
||||
|
||||
NoteType nt = GetSmallestNoteTypeForMeasure( *nd, m );
|
||||
int iRowSpacing;
|
||||
if( nt == NOTE_TYPE_Invalid )
|
||||
if( nt == NoteType_Invalid )
|
||||
iRowSpacing = 1;
|
||||
else
|
||||
iRowSpacing = int(roundf( NoteTypeToBeat(nt) * ROWS_PER_BEAT ));
|
||||
@@ -1644,11 +1644,11 @@ void NoteDataUtil::Stomp( NoteData &inout, StepsType st, int iStartIndex, int iE
|
||||
|
||||
void NoteDataUtil::SnapToNearestNoteType( NoteData &inout, NoteType nt1, NoteType nt2, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
// nt2 is optional and should be NOTE_TYPE_Invalid if it is not used
|
||||
// nt2 is optional and should be NoteType_Invalid if it is not used
|
||||
|
||||
float fSnapInterval1 = NoteTypeToBeat( nt1 );
|
||||
float fSnapInterval2 = 10000; // nothing will ever snap to this. That's what we want!
|
||||
if( nt2 != NOTE_TYPE_Invalid )
|
||||
if( nt2 != NoteType_Invalid )
|
||||
fSnapInterval2 = NoteTypeToBeat( nt2 );
|
||||
|
||||
// iterate over all TapNotes in the interval and snap them
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace NoteDataUtil
|
||||
|
||||
inline void SnapToNearestNoteType( NoteData &inout, NoteType nt, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
SnapToNearestNoteType( inout, nt, NOTE_TYPE_Invalid, iStartIndex, iEndIndex );
|
||||
SnapToNearestNoteType( inout, nt, NoteType_Invalid, iStartIndex, iEndIndex );
|
||||
}
|
||||
|
||||
// True if no notes in row that aren't true in the mask
|
||||
|
||||
@@ -45,7 +45,7 @@ float NoteTypeToBeat( NoteType nt )
|
||||
case NOTE_TYPE_64TH: return 1.0f/16; // sixty-fourth notes
|
||||
case NOTE_TYPE_192ND: return 1.0f/48; // sixty-fourth note triplets
|
||||
default: ASSERT(0); // and fall through
|
||||
case NOTE_TYPE_Invalid: return 1.0f/48;
|
||||
case NoteType_Invalid: return 1.0f/48;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ enum NoteType
|
||||
NOTE_TYPE_64TH, // sixty-fourth note
|
||||
NOTE_TYPE_192ND,// sixty-fourth note triplet
|
||||
NUM_NoteType,
|
||||
NOTE_TYPE_Invalid
|
||||
NoteType_Invalid
|
||||
};
|
||||
const RString& NoteTypeToString( NoteType nt );
|
||||
const RString& NoteTypeToLocalizedString( NoteType nt );
|
||||
|
||||
@@ -223,7 +223,7 @@ void NotesWriterDWI::WriteDWINotesField( RageFile &f, const Steps &out, int star
|
||||
break;
|
||||
case NOTE_TYPE_48TH:
|
||||
case NOTE_TYPE_192ND:
|
||||
case NOTE_TYPE_Invalid:
|
||||
case NoteType_Invalid:
|
||||
// since, for whatever reason, the only way to do
|
||||
// 48ths is through a block of 192nds...
|
||||
f.Write( "`" );
|
||||
@@ -300,7 +300,7 @@ void NotesWriterDWI::WriteDWINotesField( RageFile &f, const Steps &out, int star
|
||||
break;
|
||||
case NOTE_TYPE_48TH:
|
||||
case NOTE_TYPE_192ND:
|
||||
case NOTE_TYPE_Invalid:
|
||||
case NoteType_Invalid:
|
||||
f.Write( "'" );
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -14,9 +14,10 @@ enum PlayerNumber
|
||||
PLAYER_1 = 0,
|
||||
PLAYER_2,
|
||||
NUM_PlayerNumber, // leave this at the end
|
||||
PLAYER_INVALID
|
||||
PlayerNumber_Invalid
|
||||
};
|
||||
const int NUM_PLAYERS = NUM_PlayerNumber;
|
||||
const PlayerNumber NUM_PLAYERS = NUM_PlayerNumber;
|
||||
const PlayerNumber PLAYER_INVALID = PlayerNumber_Invalid;
|
||||
const RString& PlayerNumberToString( PlayerNumber pn );
|
||||
const RString& PlayerNumberToLocalizedString( PlayerNumber pn );
|
||||
LuaDeclareType( PlayerNumber );
|
||||
|
||||
@@ -31,8 +31,8 @@ void PlayerStageStats::Init()
|
||||
iSongsPassed = iSongsPlayed = 0;
|
||||
fLifeRemainingSeconds = 0;
|
||||
fCaloriesBurned = 0;
|
||||
tnsLast = TNS_Invalid;
|
||||
hnsLast = HNS_Invalid;
|
||||
tnsLast = TapNoteScore_Invalid;
|
||||
hnsLast = HoldNoteScore_Invalid;
|
||||
|
||||
ZERO( iTapNoteScores );
|
||||
ZERO( iHoldNoteScores );
|
||||
@@ -42,8 +42,8 @@ void PlayerStageStats::Init()
|
||||
fFirstSecond = FLT_MAX;
|
||||
fLastSecond = 0;
|
||||
|
||||
m_pdaToShow = PER_DIFFICULTY_AWARD_Invalid;
|
||||
m_pcaToShow = PEAK_COMBO_AWARD_Invalid;
|
||||
m_pdaToShow = PerDifficultyAward_Invalid;
|
||||
m_pcaToShow = PeakComboAward_Invalid;
|
||||
m_iPersonalHighScoreIndex = -1;
|
||||
m_iMachineHighScoreIndex = -1;
|
||||
m_rc = RankingCategory_Invalid;
|
||||
@@ -528,7 +528,7 @@ void PlayerStageStats::CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutop
|
||||
{
|
||||
LOG->Trace( "hand out awards" );
|
||||
|
||||
m_pcaToShow = PEAK_COMBO_AWARD_Invalid;
|
||||
m_pcaToShow = PeakComboAward_Invalid;
|
||||
|
||||
if( bGaveUp || bUsedAutoplay )
|
||||
return;
|
||||
@@ -573,7 +573,7 @@ void PlayerStageStats::CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutop
|
||||
if( !vPdas.empty() )
|
||||
m_pdaToShow = vPdas.back();
|
||||
else
|
||||
m_pdaToShow = PER_DIFFICULTY_AWARD_Invalid;
|
||||
m_pdaToShow = PerDifficultyAward_Invalid;
|
||||
|
||||
LOG->Trace( "done with per difficulty awards" );
|
||||
|
||||
@@ -593,7 +593,7 @@ void PlayerStageStats::CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutop
|
||||
if( !GAMESTATE->m_vLastPeakComboAwards[p].empty() )
|
||||
m_pcaToShow = GAMESTATE->m_vLastPeakComboAwards[p].back();
|
||||
else
|
||||
m_pcaToShow = PEAK_COMBO_AWARD_Invalid;
|
||||
m_pcaToShow = PeakComboAward_Invalid;
|
||||
|
||||
LOG->Trace( "done with per combo awards" );
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1297,7 +1297,7 @@ void ScreenGameplay::LoadLights()
|
||||
vector<RString> 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 );
|
||||
|
||||
@@ -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] );
|
||||
}
|
||||
|
||||
@@ -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 vector<PlayerN
|
||||
{
|
||||
if( iChoice == 0 )
|
||||
{
|
||||
ce.stepsCriteria.m_difficulty = DIFFICULTY_Invalid;
|
||||
ce.stepsCriteria.m_difficulty = Difficulty_Invalid;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -168,7 +168,7 @@ void ScreenOptionsManageCourses::Init()
|
||||
void ScreenOptionsManageCourses::BeginScreen()
|
||||
{
|
||||
if( GAMESTATE->m_stEdit == StepsType_Invalid ||
|
||||
GAMESTATE->m_cdEdit == DIFFICULTY_Invalid )
|
||||
GAMESTATE->m_cdEdit == Difficulty_Invalid )
|
||||
{
|
||||
SetNextCombination();
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
@@ -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<Steps*> 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<Steps*>& vpSteps = (st == StepsType_Invalid)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
Steps *pClosest = NULL;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace SongUtil
|
||||
const Song *pSong,
|
||||
vector<Steps*>& 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 = "",
|
||||
|
||||
@@ -22,7 +22,7 @@ StageStats::StageStats()
|
||||
pStyle = NULL;
|
||||
vpPlayedSongs.clear();
|
||||
vpPossibleSongs.clear();
|
||||
StageType = STAGE_Invalid;
|
||||
StageType = Stage_Invalid;
|
||||
bGaveUp = false;
|
||||
bUsedAutoplay = false;
|
||||
fGameplaySeconds = 0;
|
||||
@@ -88,7 +88,7 @@ void StageStats::AddStats( const StageStats& other )
|
||||
vpPlayedSongs.push_back( *s );
|
||||
FOREACH_CONST( Song*, other.vpPossibleSongs, s )
|
||||
vpPossibleSongs.push_back( *s );
|
||||
StageType = STAGE_Invalid; // meaningless
|
||||
StageType = Stage_Invalid; // meaningless
|
||||
|
||||
bGaveUp |= other.bGaveUp;
|
||||
bUsedAutoplay |= other.bUsedAutoplay;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
const Style* pStyle;
|
||||
vector<Song*> vpPlayedSongs;
|
||||
vector<Song*> vpPossibleSongs;
|
||||
enum { STAGE_Invalid, STAGE_NORMAL, STAGE_EXTRA, STAGE_EXTRA2 } StageType;
|
||||
enum { Stage_Invalid, STAGE_NORMAL, STAGE_EXTRA, STAGE_EXTRA2 } StageType;
|
||||
|
||||
bool bGaveUp; // exited gameplay by giving up
|
||||
bool bUsedAutoplay; // used autoplay at any point during gameplay
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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<SongIDAndStepsID,Steps *> 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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user