From 519b9bec3ac7cd45eb39e8048b57509d245b6dd7 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 2 Mar 2005 04:48:14 +0000 Subject: [PATCH] add suffix to machine rank --- stepmania/src/ScreenSelectMusic.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 1a87ec889d..19a5d3626f 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -1495,7 +1495,18 @@ void ScreenSelectMusic::AfterMusicChange() const vector best = SONGMAN->GetBestSongs( PROFILE_SLOT_MACHINE ); const int index = FindIndex( best.begin(), best.end(), pSong ); if( index != -1 ) - m_MachineRank.SetText( ssprintf("%i", index+1) ); + { + CString sSuffix; + int iDisplay = index+1; + switch( iDisplay%10 ) + { + case 1: sSuffix = "st"; break; + case 2: sSuffix = "nd"; break; + case 3: sSuffix = "rd"; break; + default: sSuffix = "th"; break; + } + m_MachineRank.SetText( ssprintf("%i", iDisplay) + sSuffix ); + } m_DifficultyDisplay.SetDifficulties( pSong, GAMESTATE->GetCurrentStyle()->m_StepsType );