Use IncludeAutogenTypes option to exclude autogen notes from random course selections
This commit is contained in:
@@ -401,9 +401,9 @@ void Course::GetStageInfo(
|
|||||||
if( pSong )
|
if( pSong )
|
||||||
{
|
{
|
||||||
if( e.difficulty == DIFFICULTY_INVALID )
|
if( e.difficulty == DIFFICULTY_INVALID )
|
||||||
pNotes = pSong->GetNotes( nt, e.low_meter, e.high_meter );
|
pNotes = pSong->GetNotes( nt, e.low_meter, e.high_meter, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
else
|
else
|
||||||
pNotes = pSong->GetNotes( nt, e.difficulty );
|
pNotes = pSong->GetNotes( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Entry::random:
|
case Entry::random:
|
||||||
@@ -421,9 +421,9 @@ void Course::GetStageInfo(
|
|||||||
continue; /* wrong group */
|
continue; /* wrong group */
|
||||||
|
|
||||||
if( e.difficulty == DIFFICULTY_INVALID )
|
if( e.difficulty == DIFFICULTY_INVALID )
|
||||||
pNotes = pSong->GetNotes( nt, e.low_meter, e.high_meter );
|
pNotes = pSong->GetNotes( nt, e.low_meter, e.high_meter, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
else
|
else
|
||||||
pNotes = pSong->GetNotes( nt, e.difficulty );
|
pNotes = pSong->GetNotes( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
|
|
||||||
if( pNotes ) // found a match
|
if( pNotes ) // found a match
|
||||||
break; // stop searching
|
break; // stop searching
|
||||||
@@ -450,8 +450,8 @@ void Course::GetStageInfo(
|
|||||||
Song* pSong = vSongsByMostPlayed[j];
|
Song* pSong = vSongsByMostPlayed[j];
|
||||||
if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fLongVerSongSeconds ||
|
if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fLongVerSongSeconds ||
|
||||||
pSong->m_fMusicLengthSeconds > PREFSMAN->m_fMarathonVerSongSeconds ||
|
pSong->m_fMusicLengthSeconds > PREFSMAN->m_fMarathonVerSongSeconds ||
|
||||||
!pSong->GetNotes(nt, DIFFICULTY_MEDIUM) ||
|
!pSong->GetNotes(nt, DIFFICULTY_MEDIUM, PREFSMAN->m_bAutogenMissingTypes) ||
|
||||||
!pSong->GetNotes(nt, DIFFICULTY_HARD) )
|
!pSong->GetNotes(nt, DIFFICULTY_HARD, PREFSMAN->m_bAutogenMissingTypes) )
|
||||||
vSongsByMostPlayed.erase( vSongsByMostPlayed.begin()+j );
|
vSongsByMostPlayed.erase( vSongsByMostPlayed.begin()+j );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,9 +472,9 @@ void Course::GetStageInfo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( e.difficulty == DIFFICULTY_INVALID )
|
if( e.difficulty == DIFFICULTY_INVALID )
|
||||||
pNotes = pSong->GetNotes( nt, e.low_meter, e.high_meter );
|
pNotes = pSong->GetNotes( nt, e.low_meter, e.high_meter, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
else
|
else
|
||||||
pNotes = pSong->GetNotes( nt, e.difficulty );
|
pNotes = pSong->GetNotes( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
|
|
||||||
if( pNotes == NULL )
|
if( pNotes == NULL )
|
||||||
pNotes = pSong->GetClosestNotes( nt, DIFFICULTY_MEDIUM );
|
pNotes = pSong->GetClosestNotes( nt, DIFFICULTY_MEDIUM );
|
||||||
@@ -495,7 +495,7 @@ void Course::GetStageInfo(
|
|||||||
if(dc < DIFFICULTY_CHALLENGE)
|
if(dc < DIFFICULTY_CHALLENGE)
|
||||||
{
|
{
|
||||||
dc = Difficulty(dc + 1);
|
dc = Difficulty(dc + 1);
|
||||||
Notes* pNewNotes = pSong->GetNotes( nt, dc );
|
Notes* pNewNotes = pSong->GetNotes( nt, dc, PREFSMAN->m_bAutogenMissingTypes );
|
||||||
if(pNewNotes)
|
if(pNewNotes)
|
||||||
pNotes = pNewNotes;
|
pNotes = pNewNotes;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -716,20 +716,20 @@ Notes* Song::GetNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen ) const
|
|||||||
return vNotes[0];
|
return vNotes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
Notes* Song::GetNotes( NotesType nt, int iMeterLow, int iMeterHigh ) const
|
Notes* Song::GetNotes( NotesType nt, int iMeterLow, int iMeterHigh, bool bIncludeAutoGen ) const
|
||||||
{
|
{
|
||||||
vector<Notes*> vNotes;
|
vector<Notes*> vNotes;
|
||||||
GetNotes( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh );
|
GetNotes( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh, "", bIncludeAutoGen );
|
||||||
if( vNotes.size() == 0 )
|
if( vNotes.size() == 0 )
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
return vNotes[0];
|
return vNotes[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
Notes* Song::GetNotes( NotesType nt, CString sDescription ) const
|
Notes* Song::GetNotes( NotesType nt, CString sDescription, bool bIncludeAutoGen ) const
|
||||||
{
|
{
|
||||||
vector<Notes*> vNotes;
|
vector<Notes*> vNotes;
|
||||||
GetNotes( vNotes, nt, DIFFICULTY_INVALID, -1, -1, sDescription );
|
GetNotes( vNotes, nt, DIFFICULTY_INVALID, -1, -1, sDescription, bIncludeAutoGen );
|
||||||
if( vNotes.size() == 0 )
|
if( vNotes.size() == 0 )
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
@@ -737,31 +737,31 @@ Notes* Song::GetNotes( NotesType nt, CString sDescription ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Notes* Song::GetClosestNotes( NotesType nt, Difficulty dc ) const
|
Notes* Song::GetClosestNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen ) const
|
||||||
{
|
{
|
||||||
Difficulty newDC = dc;
|
Difficulty newDC = dc;
|
||||||
Notes* pNotes;
|
Notes* pNotes;
|
||||||
pNotes = GetNotes( nt, newDC );
|
pNotes = GetNotes( nt, newDC, bIncludeAutoGen );
|
||||||
if( pNotes )
|
if( pNotes )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
newDC = (Difficulty)(dc-1);
|
newDC = (Difficulty)(dc-1);
|
||||||
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
||||||
pNotes = GetNotes( nt, newDC );
|
pNotes = GetNotes( nt, newDC, bIncludeAutoGen );
|
||||||
if( pNotes )
|
if( pNotes )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
newDC = (Difficulty)(dc+1);
|
newDC = (Difficulty)(dc+1);
|
||||||
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
||||||
pNotes = GetNotes( nt, newDC );
|
pNotes = GetNotes( nt, newDC, bIncludeAutoGen );
|
||||||
if( pNotes )
|
if( pNotes )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
newDC = (Difficulty)(dc-2);
|
newDC = (Difficulty)(dc-2);
|
||||||
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
||||||
pNotes = GetNotes( nt, newDC );
|
pNotes = GetNotes( nt, newDC, bIncludeAutoGen );
|
||||||
if( pNotes )
|
if( pNotes )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
newDC = (Difficulty)(dc+2);
|
newDC = (Difficulty)(dc+2);
|
||||||
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 );
|
||||||
pNotes = GetNotes( nt, newDC );
|
pNotes = GetNotes( nt, newDC, bIncludeAutoGen );
|
||||||
return pNotes;
|
return pNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -228,9 +228,9 @@ public:
|
|||||||
bool SongHasNotesTypeAndDifficulty( NotesType nt, Difficulty dc ) const;
|
bool SongHasNotesTypeAndDifficulty( NotesType nt, Difficulty dc ) const;
|
||||||
void GetNotes( vector<Notes*>& arrayAddTo, NotesType nt, Difficulty dc = DIFFICULTY_INVALID, int iMeterLow = -1, int iMeterHigh = -1, CString sDescription = "", bool bIncludeAutoGen = true ) const;
|
void GetNotes( vector<Notes*>& arrayAddTo, NotesType nt, Difficulty dc = DIFFICULTY_INVALID, int iMeterLow = -1, int iMeterHigh = -1, CString sDescription = "", bool bIncludeAutoGen = true ) const;
|
||||||
Notes* GetNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen = true ) const;
|
Notes* GetNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen = true ) const;
|
||||||
Notes* GetNotes( NotesType nt, int iMeterLow, int iMeterHigh ) const;
|
Notes* GetNotes( NotesType nt, int iMeterLow, int iMeterHigh, bool bIncludeAutoGen = true ) const;
|
||||||
Notes* GetNotes( NotesType nt, CString sDescription ) const;
|
Notes* GetNotes( NotesType nt, CString sDescription, bool bIncludeAutoGen = true ) const;
|
||||||
Notes* GetClosestNotes( NotesType nt, Difficulty dc ) const;
|
Notes* GetClosestNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen = true ) const;
|
||||||
void GetEdits( vector<Notes*>& arrayAddTo, NotesType nt, bool bIncludeAutoGen = true ) const;
|
void GetEdits( vector<Notes*>& arrayAddTo, NotesType nt, bool bIncludeAutoGen = true ) const;
|
||||||
int GetNumTimesPlayed() const;
|
int GetNumTimesPlayed() const;
|
||||||
bool IsNew() const;
|
bool IsNew() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user