StepsType_Invalid
This commit is contained in:
@@ -94,7 +94,7 @@ static void RemoveStepsTypes( vector<StepsType>& inout, RString sStepsTypesToRem
|
||||
FOREACH_CONST( RString, v, i )
|
||||
{
|
||||
StepsType st = GameManager::StringToStepsType(*i);
|
||||
if( st == STEPS_TYPE_INVALID )
|
||||
if( st == StepsType_Invalid )
|
||||
LOG->Warn( "Invalid StepsType value '%s' in '%s'", i->c_str(), sStepsTypesToRemove.c_str() );
|
||||
|
||||
const vector<StepsType>::iterator iter = find( inout.begin(), inout.end(), st );
|
||||
|
||||
@@ -43,7 +43,7 @@ static void LuaStepsType(lua_State* L)
|
||||
s.Replace('-','_');
|
||||
LUA->SetGlobal( "STEPS_TYPE_"+s, st );
|
||||
}
|
||||
LUA->SetGlobal( "STEPS_TYPE_INVALID", STEPS_TYPE_INVALID );
|
||||
LUA->SetGlobal( "STEPS_TYPE_INVALID", StepsType_Invalid );
|
||||
}
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaStepsType );
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ enum StepsType
|
||||
STEPS_TYPE_POPN_NINE,
|
||||
STEPS_TYPE_LIGHTS_CABINET,
|
||||
NUM_StepsType, // leave this at the end
|
||||
STEPS_TYPE_INVALID,
|
||||
StepsType_Invalid,
|
||||
};
|
||||
#define FOREACH_StepsType( st ) FOREACH_ENUM( StepsType, NUM_StepsType, st )
|
||||
|
||||
|
||||
@@ -282,9 +282,9 @@ void GameState::Reset()
|
||||
|
||||
LIGHTSMAN->SetLightsMode( LIGHTSMODE_ATTRACT );
|
||||
|
||||
m_stEdit.Set( STEPS_TYPE_INVALID );
|
||||
m_stEdit.Set( StepsType_Invalid );
|
||||
m_pEditSourceSteps.Set( NULL );
|
||||
m_stEditSource.Set( STEPS_TYPE_INVALID );
|
||||
m_stEditSource.Set( StepsType_Invalid );
|
||||
m_iEditCourseEntryIndex.Set( -1 );
|
||||
m_sEditLocalProfileID.Set( "" );
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ static StepsType DetermineStepsType( int iPlayer, const NoteData &nd, const RStr
|
||||
return STEPS_TYPE_BEAT_SINGLE5;
|
||||
case 8: return STEPS_TYPE_BEAT_SINGLE7;
|
||||
case 9: return STEPS_TYPE_POPN_NINE;
|
||||
default: return STEPS_TYPE_INVALID;
|
||||
default: return StepsType_Invalid;
|
||||
}
|
||||
case 2: // couple/battle
|
||||
return STEPS_TYPE_DANCE_COUPLE;
|
||||
@@ -194,11 +194,11 @@ static StepsType DetermineStepsType( int iPlayer, const NoteData &nd, const RStr
|
||||
case 8: return STEPS_TYPE_BEAT_SINGLE7;
|
||||
case 12: return STEPS_TYPE_BEAT_DOUBLE5;
|
||||
case 16: return STEPS_TYPE_BEAT_DOUBLE7;
|
||||
default: return STEPS_TYPE_INVALID;
|
||||
default: return StepsType_Invalid;
|
||||
}
|
||||
default:
|
||||
LOG->UserLog( "Song file", sPath, "has an invalid #PLAYER value %d.", iPlayer );
|
||||
return STEPS_TYPE_INVALID;
|
||||
return StepsType_Invalid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ bool BMSLoader::LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNa
|
||||
{
|
||||
LOG->Trace( "Steps::LoadFromBMSFile( '%s' )", sPath.c_str() );
|
||||
|
||||
out.m_StepsType = STEPS_TYPE_INVALID;
|
||||
out.m_StepsType = StepsType_Invalid;
|
||||
|
||||
// BMS player code. Fill in below and use to determine StepsType.
|
||||
int iPlayer = -1;
|
||||
@@ -408,7 +408,7 @@ bool BMSLoader::LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNa
|
||||
out.m_StepsType = STEPS_TYPE_DANCE_SOLO;
|
||||
}
|
||||
|
||||
if( out.m_StepsType == STEPS_TYPE_INVALID )
|
||||
if( out.m_StepsType == StepsType_Invalid )
|
||||
{
|
||||
LOG->UserLog( "Song file", sPath, "has an unknown steps type" );
|
||||
return false;
|
||||
|
||||
@@ -124,7 +124,7 @@ bool DWILoader::LoadFromDWITokens(
|
||||
{
|
||||
CHECKPOINT_M( "DWILoader::LoadFromDWITokens()" );
|
||||
|
||||
out.m_StepsType = STEPS_TYPE_INVALID;
|
||||
out.m_StepsType = StepsType_Invalid;
|
||||
|
||||
if( sMode == "SINGLE" ) out.m_StepsType = STEPS_TYPE_DANCE_SINGLE;
|
||||
else if( sMode == "DOUBLE" ) out.m_StepsType = STEPS_TYPE_DANCE_DOUBLE;
|
||||
@@ -513,7 +513,7 @@ bool DWILoader::LoadFromDWIFile( const RString &sPath, Song &out )
|
||||
(iNumParams==5) ? sParams[4] : RString(""),
|
||||
*pNewNotes
|
||||
);
|
||||
if(pNewNotes->m_StepsType != STEPS_TYPE_INVALID)
|
||||
if( pNewNotes->m_StepsType != StepsType_Invalid )
|
||||
out.AddSteps( pNewNotes );
|
||||
else
|
||||
delete pNewNotes;
|
||||
|
||||
@@ -1160,7 +1160,7 @@ public:
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
}
|
||||
|
||||
if( *m_pstToFill == STEPS_TYPE_INVALID )
|
||||
if( *m_pstToFill == StepsType_Invalid )
|
||||
m_pstToFill->Set( m_vStepsTypesToShow[0] );
|
||||
}
|
||||
|
||||
|
||||
@@ -1525,7 +1525,7 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pCategoryScores )
|
||||
if( !pStepsType->GetAttrValue( "Type", str ) )
|
||||
WARN_AND_CONTINUE;
|
||||
StepsType st = GameManager::StringToStepsType( str );
|
||||
if( st == STEPS_TYPE_INVALID )
|
||||
if( st == StepsType_Invalid )
|
||||
WARN_AND_CONTINUE_M( str );
|
||||
|
||||
FOREACH_CONST_Child( pStepsType, pRadarCategory )
|
||||
@@ -1822,7 +1822,7 @@ void Profile::AddCourseRecentScore( const Course* pCourse, const Trail* pTrail,
|
||||
StepsType Profile::GetLastPlayedStepsType() const
|
||||
{
|
||||
if( m_vRecentStepsScores.empty() )
|
||||
return STEPS_TYPE_INVALID;
|
||||
return StepsType_Invalid;
|
||||
const HighScoreForASongAndSteps &h = m_vRecentStepsScores.back();
|
||||
return h.stepsID.GetStepsType();
|
||||
}
|
||||
|
||||
@@ -278,9 +278,9 @@ void ScreenOptionsEditCourseEntry::HandleScreenMessage( const ScreenMessage SM )
|
||||
if( !pSteps )
|
||||
pSteps = SongUtil::GetStepsByDifficulty( pSong, st, DIFFICULTY_INVALID, false );
|
||||
if( !pSteps )
|
||||
pSteps = SongUtil::GetStepsByDifficulty( pSong, STEPS_TYPE_INVALID, cd, false );
|
||||
pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, cd, false );
|
||||
if( !pSteps )
|
||||
pSteps = SongUtil::GetStepsByDifficulty( pSong, STEPS_TYPE_INVALID, DIFFICULTY_INVALID, false );
|
||||
pSteps = SongUtil::GetStepsByDifficulty( pSong, StepsType_Invalid, DIFFICULTY_INVALID, false );
|
||||
ASSERT( pSteps );
|
||||
|
||||
// Set up for ScreenEdit
|
||||
|
||||
@@ -167,7 +167,7 @@ void ScreenOptionsManageCourses::Init()
|
||||
|
||||
void ScreenOptionsManageCourses::BeginScreen()
|
||||
{
|
||||
if( GAMESTATE->m_stEdit == STEPS_TYPE_INVALID ||
|
||||
if( GAMESTATE->m_stEdit == StepsType_Invalid ||
|
||||
GAMESTATE->m_cdEdit == DIFFICULTY_INVALID )
|
||||
{
|
||||
SetNextCombination();
|
||||
|
||||
@@ -99,7 +99,7 @@ void SongUtil::GetSteps(
|
||||
if( !iMaxToGet )
|
||||
return;
|
||||
|
||||
const vector<Steps*> &vpSteps = st == STEPS_TYPE_INVALID ? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
const vector<Steps*> &vpSteps = st == StepsType_Invalid ? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
for( unsigned i=0; i<vpSteps.size(); i++ ) // for each of the Song's Steps
|
||||
{
|
||||
Steps* pSteps = vpSteps[i];
|
||||
@@ -149,7 +149,7 @@ Steps* SongUtil::GetOneSteps(
|
||||
|
||||
Steps* SongUtil::GetStepsByDifficulty( const Song *pSong, StepsType st, Difficulty dc, bool bIncludeAutoGen )
|
||||
{
|
||||
const vector<Steps*>& vpSteps = (st == STEPS_TYPE_INVALID)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
const vector<Steps*>& vpSteps = (st == StepsType_Invalid)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
for( unsigned i=0; i<vpSteps.size(); i++ ) // for each of the Song's Steps
|
||||
{
|
||||
Steps* pSteps = vpSteps[i];
|
||||
@@ -167,7 +167,7 @@ Steps* SongUtil::GetStepsByDifficulty( const Song *pSong, StepsType st, Difficul
|
||||
|
||||
Steps* SongUtil::GetStepsByMeter( const Song *pSong, StepsType st, int iMeterLow, int iMeterHigh )
|
||||
{
|
||||
const vector<Steps*>& vpSteps = (st == STEPS_TYPE_INVALID)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
const vector<Steps*>& vpSteps = (st == StepsType_Invalid)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
for( unsigned i=0; i<vpSteps.size(); i++ ) // for each of the Song's Steps
|
||||
{
|
||||
Steps* pSteps = vpSteps[i];
|
||||
@@ -198,7 +198,7 @@ Steps* SongUtil::GetClosestNotes( const Song *pSong, StepsType st, Difficulty dc
|
||||
{
|
||||
ASSERT( dc != DIFFICULTY_INVALID );
|
||||
|
||||
const vector<Steps*>& vpSteps = (st == STEPS_TYPE_INVALID)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
const vector<Steps*>& vpSteps = (st == StepsType_Invalid)? pSong->GetAllSteps() : pSong->GetStepsByStepsType(st);
|
||||
Steps *pClosest = NULL;
|
||||
int iClosestDistance = 999;
|
||||
for( unsigned i=0; i<vpSteps.size(); i++ ) // for each of the Song's Steps
|
||||
@@ -744,7 +744,7 @@ bool SongUtil::ValidateCurrentEditStepsDescription( const RString &sAnswer, RStr
|
||||
|
||||
// Steps name must be unique for this song.
|
||||
vector<Steps*> v;
|
||||
GetSteps( pSong, v, STEPS_TYPE_INVALID, DIFFICULTY_EDIT );
|
||||
GetSteps( pSong, v, StepsType_Invalid, DIFFICULTY_EDIT );
|
||||
FOREACH_CONST( Steps*, v, s )
|
||||
{
|
||||
if( pSteps == *s )
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace SongUtil
|
||||
void GetSteps(
|
||||
const Song *pSong,
|
||||
vector<Steps*>& arrayAddTo,
|
||||
StepsType st = STEPS_TYPE_INVALID,
|
||||
StepsType st = StepsType_Invalid,
|
||||
Difficulty dc = DIFFICULTY_INVALID,
|
||||
int iMeterLow = -1,
|
||||
int iMeterHigh = -1,
|
||||
@@ -69,7 +69,7 @@ namespace SongUtil
|
||||
);
|
||||
Steps* GetOneSteps(
|
||||
const Song *pSong,
|
||||
StepsType st = STEPS_TYPE_INVALID,
|
||||
StepsType st = StepsType_Invalid,
|
||||
Difficulty dc = DIFFICULTY_INVALID,
|
||||
int iMeterLow = -1,
|
||||
int iMeterHigh = -1,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
Steps::Steps()
|
||||
{
|
||||
m_bSavedToDisk = false;
|
||||
m_StepsType = STEPS_TYPE_INVALID;
|
||||
m_StepsType = StepsType_Invalid;
|
||||
m_LoadedFromProfile = ProfileSlot_INVALID;
|
||||
m_iHash = 0;
|
||||
m_Difficulty = DIFFICULTY_INVALID;
|
||||
|
||||
@@ -19,7 +19,7 @@ bool StepsCriteria::Matches( const Song *pSong, const Steps *pSteps ) const
|
||||
return false;
|
||||
if( m_iHighMeter != -1 && pSteps->GetMeter() > m_iHighMeter )
|
||||
return false;
|
||||
if( m_st != STEPS_TYPE_INVALID && pSteps->m_StepsType != m_st )
|
||||
if( m_st != StepsType_Invalid && pSteps->m_StepsType != m_st )
|
||||
return false;
|
||||
switch( m_Locked )
|
||||
{
|
||||
@@ -51,7 +51,7 @@ void StepsUtil::GetAllMatching( const SongCriteria &soc, const StepsCriteria &st
|
||||
|
||||
void StepsUtil::GetAllMatching( Song *pSong, const StepsCriteria &stc, vector<SongAndSteps> &out )
|
||||
{
|
||||
const vector<Steps*> &vSteps = ( stc.m_st == STEPS_TYPE_INVALID ? pSong->GetAllSteps() :
|
||||
const vector<Steps*> &vSteps = ( stc.m_st == StepsType_Invalid ? pSong->GetAllSteps() :
|
||||
pSong->GetStepsByStepsType(stc.m_st) );
|
||||
|
||||
FOREACH_CONST( Steps*, vSteps, st )
|
||||
@@ -190,7 +190,7 @@ void StepsID::FromSteps( const Steps *p )
|
||||
{
|
||||
if( p == NULL )
|
||||
{
|
||||
st = STEPS_TYPE_INVALID;
|
||||
st = StepsType_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 == STEPS_TYPE_INVALID || dc == DIFFICULTY_INVALID )
|
||||
if( st == StepsType_Invalid || dc == DIFFICULTY_INVALID )
|
||||
return NULL;
|
||||
|
||||
SongID songID;
|
||||
@@ -318,7 +318,7 @@ RString StepsID::ToString() const
|
||||
|
||||
bool StepsID::IsValid() const
|
||||
{
|
||||
return st != STEPS_TYPE_INVALID && dc != DIFFICULTY_INVALID;
|
||||
return st != StepsType_Invalid && dc != DIFFICULTY_INVALID;
|
||||
}
|
||||
|
||||
bool StepsID::operator<( const StepsID &rhs ) const
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
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 STEPS_TYPE_INVALID
|
||||
StepsType m_st; // don't filter if StepsType_Invalid
|
||||
enum Locked { Locked_Locked, Locked_Unlocked, Locked_DontCare } m_Locked;
|
||||
|
||||
StepsCriteria()
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
m_difficulty = DIFFICULTY_INVALID;
|
||||
m_iLowMeter = -1;
|
||||
m_iHighMeter = -1;
|
||||
m_st = STEPS_TYPE_INVALID;
|
||||
m_st = StepsType_Invalid;
|
||||
m_Locked = Locked_DontCare;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
m_StepsType = STEPS_TYPE_INVALID;
|
||||
m_StepsType = StepsType_Invalid;
|
||||
m_CourseDifficulty = DIFFICULTY_INVALID;
|
||||
m_iSpecifiedMeter = -1;
|
||||
m_vEntries.clear();
|
||||
|
||||
@@ -10,7 +10,7 @@ void TrailID::FromTrail( const Trail *p )
|
||||
{
|
||||
if( p == NULL )
|
||||
{
|
||||
st = STEPS_TYPE_INVALID;
|
||||
st = StepsType_Invalid;
|
||||
cd = DIFFICULTY_INVALID;
|
||||
}
|
||||
else
|
||||
@@ -24,7 +24,7 @@ Trail *TrailID::ToTrail( const Course *p, bool bAllowNull ) const
|
||||
{
|
||||
ASSERT( p );
|
||||
|
||||
if( st == STEPS_TYPE_INVALID || cd == DIFFICULTY_INVALID )
|
||||
if( st == StepsType_Invalid || cd == DIFFICULTY_INVALID )
|
||||
return NULL;
|
||||
|
||||
Trail *ret = p->GetTrail( st, cd );
|
||||
@@ -67,7 +67,7 @@ RString TrailID::ToString() const
|
||||
|
||||
bool TrailID::IsValid() const
|
||||
{
|
||||
return st != STEPS_TYPE_INVALID && cd != DIFFICULTY_INVALID;
|
||||
return st != StepsType_Invalid && cd != DIFFICULTY_INVALID;
|
||||
}
|
||||
|
||||
bool TrailID::operator<( const TrailID &rhs ) const
|
||||
|
||||
@@ -326,7 +326,7 @@ UnlockEntryStatus UnlockEntry::GetUnlockEntryStatus() const
|
||||
SongUtil::GetSteps(
|
||||
m_pSong,
|
||||
vp,
|
||||
STEPS_TYPE_INVALID,
|
||||
StepsType_Invalid,
|
||||
DIFFICULTY_HARD
|
||||
);
|
||||
FOREACH_CONST( Steps*, vp, s )
|
||||
@@ -469,11 +469,11 @@ void UnlockManager::Load()
|
||||
FOREACH_CONST( Song*, SONGMAN->GetAllSongs(), s )
|
||||
{
|
||||
// If no hard steps to play to unlock, skip
|
||||
if( SongUtil::GetOneSteps(*s, STEPS_TYPE_INVALID, DIFFICULTY_HARD) == NULL )
|
||||
if( SongUtil::GetOneSteps(*s, StepsType_Invalid, DIFFICULTY_HARD) == NULL )
|
||||
continue;
|
||||
|
||||
// If no challenge steps to unlock, skip
|
||||
if( SongUtil::GetOneSteps(*s, STEPS_TYPE_INVALID, DIFFICULTY_CHALLENGE) == NULL )
|
||||
if( SongUtil::GetOneSteps(*s, StepsType_Invalid, DIFFICULTY_CHALLENGE) == NULL )
|
||||
continue;
|
||||
|
||||
if( SONGMAN->WasLoadedFromAdditionalSongs(*s) )
|
||||
|
||||
Reference in New Issue
Block a user