From 4cee9ed975f8f78fca98b4ae533f7d5ab0d10843 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 30 Dec 2002 21:57:54 +0000 Subject: [PATCH] move this function out of the header --- stepmania/src/MusicWheel.cpp | 33 +++++++++++++++++++++++++++++++++ stepmania/src/MusicWheel.h | 36 +----------------------------------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 32ab698be3..1374fd96fe 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -1229,3 +1229,36 @@ void MusicWheel::TweenOffScreen() } + +CString MusicWheel::GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so ) +{ + if( pSong == NULL ) + return ""; + + CString sTemp; + + switch( so ) + { + case SORT_GROUP: + sTemp = pSong->m_sGroupName; + return sTemp; +// case SORT_ARTIST: +// sTemp = pSong->m_sArtist; +// sTemp.MakeUpper(); +// sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : ""; +// if( IsAnInt(sTemp) ) +// sTemp = "NUM"; +// return sTemp; + case SORT_TITLE: + sTemp = pSong->GetSortTitle(); + sTemp.MakeUpper(); + sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : ""; + if( IsAnInt(sTemp) ) + sTemp = "NUM"; + return sTemp; + case SORT_BPM: + case SORT_MOST_PLAYED: + default: + return ""; + } +} diff --git a/stepmania/src/MusicWheel.h b/stepmania/src/MusicWheel.h index e8c8371a93..3b1cad5c52 100644 --- a/stepmania/src/MusicWheel.h +++ b/stepmania/src/MusicWheel.h @@ -164,41 +164,7 @@ protected: RageSoundSample m_soundStart; RageSoundSample m_soundLocked; - - - CString GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so ) - { - if( pSong == NULL ) - return ""; - - CString sTemp; - - switch( so ) - { - case SORT_GROUP: - sTemp = pSong->m_sGroupName; - return sTemp; -// case SORT_ARTIST: -// sTemp = pSong->m_sArtist; -// sTemp.MakeUpper(); -// sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : ""; -// if( IsAnInt(sTemp) ) -// sTemp = "NUM"; -// return sTemp; - case SORT_TITLE: - sTemp = pSong->GetSortTitle(); - sTemp.MakeUpper(); - sTemp = (sTemp.GetLength() > 0) ? sTemp.Left(1) : ""; - if( IsAnInt(sTemp) ) - sTemp = "NUM"; - return sTemp; - case SORT_BPM: - case SORT_MOST_PLAYED: - default: - return ""; - } - }; - + CString GetSectionNameFromSongAndSort( Song* pSong, SongSortOrder so ); }; #endif