diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index e47704f0b6..6141f7d8d5 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -401,9 +401,9 @@ void Course::GetStageInfo( if( pSong ) { 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 - pNotes = pSong->GetNotes( nt, e.difficulty ); + pNotes = pSong->GetNotes( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes ); } break; case Entry::random: @@ -421,9 +421,9 @@ void Course::GetStageInfo( continue; /* wrong group */ 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 - pNotes = pSong->GetNotes( nt, e.difficulty ); + pNotes = pSong->GetNotes( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes ); if( pNotes ) // found a match break; // stop searching @@ -450,8 +450,8 @@ void Course::GetStageInfo( Song* pSong = vSongsByMostPlayed[j]; if( pSong->m_fMusicLengthSeconds > PREFSMAN->m_fLongVerSongSeconds || pSong->m_fMusicLengthSeconds > PREFSMAN->m_fMarathonVerSongSeconds || - !pSong->GetNotes(nt, DIFFICULTY_MEDIUM) || - !pSong->GetNotes(nt, DIFFICULTY_HARD) ) + !pSong->GetNotes(nt, DIFFICULTY_MEDIUM, PREFSMAN->m_bAutogenMissingTypes) || + !pSong->GetNotes(nt, DIFFICULTY_HARD, PREFSMAN->m_bAutogenMissingTypes) ) vSongsByMostPlayed.erase( vSongsByMostPlayed.begin()+j ); } } @@ -472,9 +472,9 @@ void Course::GetStageInfo( } 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 - pNotes = pSong->GetNotes( nt, e.difficulty ); + pNotes = pSong->GetNotes( nt, e.difficulty, PREFSMAN->m_bAutogenMissingTypes ); if( pNotes == NULL ) pNotes = pSong->GetClosestNotes( nt, DIFFICULTY_MEDIUM ); @@ -495,7 +495,7 @@ void Course::GetStageInfo( if(dc < DIFFICULTY_CHALLENGE) { dc = Difficulty(dc + 1); - Notes* pNewNotes = pSong->GetNotes( nt, dc ); + Notes* pNewNotes = pSong->GetNotes( nt, dc, PREFSMAN->m_bAutogenMissingTypes ); if(pNewNotes) pNotes = pNewNotes; } diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 5724c2e2c3..dc3875dd4e 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -716,20 +716,20 @@ Notes* Song::GetNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen ) const 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 vNotes; - GetNotes( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh ); + GetNotes( vNotes, nt, DIFFICULTY_INVALID, iMeterLow, iMeterHigh, "", bIncludeAutoGen ); if( vNotes.size() == 0 ) return NULL; else return vNotes[0]; } -Notes* Song::GetNotes( NotesType nt, CString sDescription ) const +Notes* Song::GetNotes( NotesType nt, CString sDescription, bool bIncludeAutoGen ) const { vector vNotes; - GetNotes( vNotes, nt, DIFFICULTY_INVALID, -1, -1, sDescription ); + GetNotes( vNotes, nt, DIFFICULTY_INVALID, -1, -1, sDescription, bIncludeAutoGen ); if( vNotes.size() == 0 ) return NULL; 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; Notes* pNotes; - pNotes = GetNotes( nt, newDC ); + pNotes = GetNotes( nt, newDC, bIncludeAutoGen ); if( pNotes ) return pNotes; newDC = (Difficulty)(dc-1); CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); - pNotes = GetNotes( nt, newDC ); + pNotes = GetNotes( nt, newDC, bIncludeAutoGen ); if( pNotes ) return pNotes; newDC = (Difficulty)(dc+1); CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); - pNotes = GetNotes( nt, newDC ); + pNotes = GetNotes( nt, newDC, bIncludeAutoGen ); if( pNotes ) return pNotes; newDC = (Difficulty)(dc-2); CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); - pNotes = GetNotes( nt, newDC ); + pNotes = GetNotes( nt, newDC, bIncludeAutoGen ); if( pNotes ) return pNotes; newDC = (Difficulty)(dc+2); CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); - pNotes = GetNotes( nt, newDC ); + pNotes = GetNotes( nt, newDC, bIncludeAutoGen ); return pNotes; } diff --git a/stepmania/src/song.h b/stepmania/src/song.h index a1474bd6ef..a5b7443e44 100644 --- a/stepmania/src/song.h +++ b/stepmania/src/song.h @@ -228,9 +228,9 @@ public: bool SongHasNotesTypeAndDifficulty( NotesType nt, Difficulty dc ) const; void GetNotes( vector& 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, int iMeterLow, int iMeterHigh ) const; - Notes* GetNotes( NotesType nt, CString sDescription ) const; - Notes* GetClosestNotes( NotesType nt, Difficulty dc ) const; + Notes* GetNotes( NotesType nt, int iMeterLow, int iMeterHigh, bool bIncludeAutoGen = true ) const; + Notes* GetNotes( NotesType nt, CString sDescription, bool bIncludeAutoGen = true ) const; + Notes* GetClosestNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen = true ) const; void GetEdits( vector& arrayAddTo, NotesType nt, bool bIncludeAutoGen = true ) const; int GetNumTimesPlayed() const; bool IsNew() const;