This commit is contained in:
Glenn Maynard
2006-10-07 04:13:43 +00:00
parent 064a411962
commit 8a4ddd1515
34 changed files with 84 additions and 84 deletions
+2 -2
View File
@@ -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 );
}
+6 -6
View File
@@ -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
{
+1 -1
View File
@@ -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 );
+2 -2
View File
@@ -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 )
+1 -1
View File
@@ -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 ) );
+2 -2
View File
@@ -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;
}
/*
+2 -2
View File
@@ -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 );
+1 -1
View File
@@ -56,7 +56,7 @@ private:
Row()
{
m_Steps = NULL;
m_dc = DIFFICULTY_INVALID;
m_dc = DIFFICULTY_Invalid;
m_fY = 0;
m_bHidden = false;
}
+4 -4
View File
@@ -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() );
+9 -9
View File
@@ -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 ||
+1 -1
View File
@@ -222,7 +222,7 @@ enum MemoryCardState
MemoryCardState_Removed,
MemoryCardState_NoCard,
NUM_MemoryCardState,
MemoryCardState_INVALID,
MemoryCardState_Invalid,
};
const RString& MemoryCardStateToString( MemoryCardState mcs );
+7 -7
View File
@@ -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 )
+2 -2
View File
@@ -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 );
+2 -2
View File
@@ -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 )
{
+1 -1
View File
@@ -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] );
}
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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 );
}
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -158,7 +158,7 @@ InputDeviceState RageInput::GetInputDeviceState( InputDevice id )
}
}
return InputDeviceState_INVALID;
return InputDeviceState_Invalid;
}
RString RageInput::GetDisplayDevicesString() const
+1 -1
View File
@@ -81,7 +81,7 @@ enum InputDeviceState
InputDeviceState_Disconnected,
InputDeviceState_MissingMultitap,
NUM_InputDeviceState,
InputDeviceState_INVALID
InputDeviceState_Invalid
};
+1 -1
View File
@@ -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 );
+1 -1
View File
@@ -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
{
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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]);
+4 -4
View File
@@ -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;
+2 -2
View File
@@ -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 = "",
+3 -3
View File
@@ -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 );
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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 );