cleanup and quiet gcc compile

This commit is contained in:
Glenn Maynard
2003-02-17 20:38:57 +00:00
parent 8bf3c01e81
commit 82cf574af6
3 changed files with 8 additions and 6 deletions
+1
View File
@@ -113,6 +113,7 @@ enum SongSortOrder {
SORT_TITLE, SORT_TITLE,
SORT_BPM, SORT_BPM,
SORT_MOST_PLAYED, SORT_MOST_PLAYED,
SORT_ROULETTE,
NUM_SORT_ORDERS NUM_SORT_ORDERS
}; };
+5 -2
View File
@@ -45,6 +45,8 @@
const int MAX_WHEEL_SOUND_SPEED = 15; const int MAX_WHEEL_SOUND_SPEED = 15;
float g_fItemSpacingY, g_fItemCurveX; // cache float g_fItemSpacingY, g_fItemCurveX; // cache
static const SongSortOrder MaxSelectableSort = SORT_MOST_PLAYED;
inline RageColor GetNextSectionColor() { inline RageColor GetNextSectionColor() {
static int i=0; static int i=0;
i = i % NUM_SECTION_COLORS; i = i % NUM_SECTION_COLORS;
@@ -141,7 +143,6 @@ MusicWheel::MusicWheel()
* the extra stage, so it knows to always display it. */ * the extra stage, so it knows to always display it. */
for( int so=0; so<NUM_SORT_ORDERS; so++ ) for( int so=0; so<NUM_SORT_ORDERS; so++ )
BuildWheelItemDatas( m_WheelItemDatas[so], SongSortOrder(so) ); BuildWheelItemDatas( m_WheelItemDatas[so], SongSortOrder(so) );
BuildWheelItemDatas( m_WheelItemDatas[SORT_ROULETTE], SongSortOrder(SORT_ROULETTE) );
// If there is no currently selected song, select one. // If there is no currently selected song, select one.
if( GAMESTATE->m_pCurSong == NULL ) if( GAMESTATE->m_pCurSong == NULL )
@@ -624,7 +625,9 @@ void MusicWheel::Update( float fDeltaTime )
CString sPrevSelectedSection = m_CurWheelItemData[m_iSelection]->m_sSectionName; CString sPrevSelectedSection = m_CurWheelItemData[m_iSelection]->m_sSectionName;
// change the sort order // change the sort order
GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+1) % NUM_SORT_ORDERS ); GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+1) );
if(GAMESTATE->m_SongSortOrder > MaxSelectableSort)
GAMESTATE->m_SongSortOrder = SongSortOrder(0);
SCREENMAN->SendMessageToTopScreen( SM_SortOrderChanged, 0 ); SCREENMAN->SendMessageToTopScreen( SM_SortOrderChanged, 0 );
SetOpenGroup(GetSectionNameFromSongAndSort( pPrevSelectedSong, GAMESTATE->m_SongSortOrder )); SetOpenGroup(GetSectionNameFromSongAndSort( pPrevSelectedSong, GAMESTATE->m_SongSortOrder ));
+1 -3
View File
@@ -39,8 +39,6 @@ const ScreenMessage SM_SortOrderChanged = ScreenMessage(SM_User+48);
enum { SORT_ROULETTE = NUM_SORT_ORDERS+1 };
struct CompareSongPointerArrayBySectionName; struct CompareSongPointerArrayBySectionName;
class MusicWheel : public ActorFrame class MusicWheel : public ActorFrame
@@ -93,7 +91,7 @@ protected:
ScrollBar m_ScrollBar; ScrollBar m_ScrollBar;
Sprite m_sprSelectionOverlay; Sprite m_sprSelectionOverlay;
vector<WheelItemData> m_WheelItemDatas[NUM_SORT_ORDERS+2]; vector<WheelItemData> m_WheelItemDatas[NUM_SORT_ORDERS];
vector<WheelItemData *> m_CurWheelItemData; vector<WheelItemData *> m_CurWheelItemData;
WheelItemDisplay m_WheelItemDisplays[NUM_WHEEL_ITEMS_TO_DRAW]; WheelItemDisplay m_WheelItemDisplays[NUM_WHEEL_ITEMS_TO_DRAW];