diff --git a/stepmania/src/GrayArrow.cpp b/stepmania/src/GrayArrow.cpp index a683797959..e0e74c2f3d 100644 --- a/stepmania/src/GrayArrow.cpp +++ b/stepmania/src/GrayArrow.cpp @@ -39,7 +39,7 @@ void GrayArrow::Update( float fDeltaTime ) float fPercentIntoBeat = fmodf(GAMESTATE->m_fSongBeat,1); if( fPercentIntoBeat < 0 ) fPercentIntoBeat += 1; - int iNewState = fPercentIntoBeat<0.25f ? 0 : 1; + int iNewState = (fPercentIntoBeat<0.1f)||(fPercentIntoBeat>0.9f) ? 0 : 1; CLAMP( iNewState, 0, Sprite::GetNumStates() ); SetState( iNewState ); } diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 37d1d2dd08..d949f12a86 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -422,7 +422,7 @@ void Player::Step( int col ) for( i=0; im_pCurSong->m_fBeat0OffsetInSeconds += mean; diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 34cf8cbad5..eb8e8ec2fe 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -796,6 +796,28 @@ bool Song::IsEasy( NotesType nt ) const // Sorting ///////////////////////////////////// +int CompareSongPointersByTitle(const void *arg1, const void *arg2) +{ + const Song* pSong1 = *(const Song**)arg1; + const Song* pSong2 = *(const Song**)arg2; + + //Prefer transliterations to full titles + CString sTitle1 = pSong1->GetSortTitle(); + CString sTitle2 = pSong2->GetSortTitle(); + + int ret = sTitle1.CompareNoCase(sTitle2); + if(ret != 0) return ret; + + /* The titles are the same. Ensure we get a consistent ordering + * by comparing the unique SongFilePaths. */ + return pSong1->GetSongFilePath().CompareNoCase(pSong2->GetSongFilePath()); +} + +void SortSongPointerArrayByTitle( CArray &arraySongPointers ) +{ + qsort( arraySongPointers.GetData(), arraySongPointers.GetSize(), sizeof(Song*), CompareSongPointersByTitle ); +} + int CompareSongPointersByDifficulty(const void *arg1, const void *arg2) { const Song* pSong1 = *(const Song**)arg1; @@ -819,7 +841,7 @@ int CompareSongPointersByDifficulty(const void *arg1, const void *arg2) if( iEasiestMeter1 < iEasiestMeter2 ) return -1; else if( iEasiestMeter1 == iEasiestMeter2 ) - return 0; + return CompareSongPointersByTitle( arg1, arg2 ); else return +1; } @@ -829,28 +851,6 @@ void SortSongPointerArrayByDifficulty( CArray &arraySongPointers ) qsort( arraySongPointers.GetData(), arraySongPointers.GetSize(), sizeof(Song*), CompareSongPointersByDifficulty ); } -int CompareSongPointersByTitle(const void *arg1, const void *arg2) -{ - const Song* pSong1 = *(const Song**)arg1; - const Song* pSong2 = *(const Song**)arg2; - - //Prefer transliterations to full titles - CString sTitle1 = pSong1->GetSortTitle(); - CString sTitle2 = pSong2->GetSortTitle(); - - int ret = sTitle1.CompareNoCase(sTitle2); - if(ret != 0) return ret; - - /* The titles are the same. Ensure we get a consistent ordering - * by comparing the unique SongFilePaths. */ - return pSong1->GetSongFilePath().CompareNoCase(pSong2->GetSongFilePath()); -} - -void SortSongPointerArrayByTitle( CArray &arraySongPointers ) -{ - qsort( arraySongPointers.GetData(), arraySongPointers.GetSize(), sizeof(Song*), CompareSongPointersByTitle ); -} - int CompareSongPointersByBPM(const void *arg1, const void *arg2) { const Song* pSong1 = *(const Song**)arg1; diff --git a/stepmania/stepmania.nsi b/stepmania/stepmania.nsi index 089b15567d..01a5d6bad4 100644 --- a/stepmania/stepmania.nsi +++ b/stepmania/stepmania.nsi @@ -8,8 +8,8 @@ ; NOTE: this .NSI script is designed for NSIS v1.8+ Name "StepMania" -OutFile "stepmania300beta7rc.exe" -!define PRODUCT_NAME "StepMania 3.0 beta 7 release candidate" +OutFile "stepmania300beta6rc.exe" +!define PRODUCT_NAME "StepMania 3.0 beta 6 release candidate" ; Some default compiler settings (uncomment and change at will):