From 518638028defa7304276c20ccf4eaf93639a25f2 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 19 Feb 2005 01:27:51 +0000 Subject: [PATCH] cleanup --- stepmania/src/OptionRow.h | 2 +- stepmania/src/ScreenOptions.cpp | 36 +++++++++++++-------------- stepmania/src/ScreenOptionsMaster.cpp | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/stepmania/src/OptionRow.h b/stepmania/src/OptionRow.h index 668f0f2d17..c8f4a2c0e2 100644 --- a/stepmania/src/OptionRow.h +++ b/stepmania/src/OptionRow.h @@ -42,7 +42,7 @@ public: ~OptionRow(); OptionRowDefinition m_RowDef; - enum { ROW_NORMAL, ROW_EXIT } Type; + enum { ROW_NORMAL, ROW_EXIT } m_Type; vector m_textItems; // size depends on m_bRowIsLong and which players are joined vector m_Underline[NUM_PLAYERS]; // size depends on m_bRowIsLong and which players are joined Sprite m_sprBullet; diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index d010d9e922..b246e5a446 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -157,7 +157,7 @@ void ScreenOptions::InitMenu( InputMode im, OptionRowDefinition defs[], int iNum m_Rows.push_back( new OptionRow() ); OptionRow &row = *m_Rows.back(); row.m_RowDef = defs[r]; - row.Type = OptionRow::ROW_NORMAL; + row.m_Type = OptionRow::ROW_NORMAL; if( !defs[r].choices.size() ) RageException::Throw( "Screen %s menu entry \"%s\" has no choices", @@ -398,7 +398,7 @@ void ScreenOptions::InitMenu( InputMode im, OptionRowDefinition defs[], int iNum // TRICKY: Add one more item. This will be "EXIT" m_Rows.push_back( new OptionRow() ); OptionRow &row = *m_Rows.back(); - row.Type = OptionRow::ROW_EXIT; + row.m_Type = OptionRow::ROW_EXIT; BitmapText *bt = new BitmapText; row.m_textItems.push_back( bt ); @@ -519,7 +519,7 @@ ScreenOptions::~ScreenOptions() CString ScreenOptions::GetExplanationText( int iRow ) const { - if( m_Rows[iRow]->Type == OptionRow::ROW_EXIT ) + if( m_Rows[iRow]->m_Type == OptionRow::ROW_EXIT ) return ""; CString sLineName = m_Rows[iRow]->m_RowDef.name; @@ -531,7 +531,7 @@ CString ScreenOptions::GetExplanationText( int iRow ) const CString ScreenOptions::GetExplanationTitle( int iRow ) const { - if( m_Rows[iRow]->Type == OptionRow::ROW_EXIT ) + if( m_Rows[iRow]->m_Type == OptionRow::ROW_EXIT ) return ""; CString sLineName = m_Rows[iRow]->m_RowDef.name; @@ -576,7 +576,7 @@ BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iCh { ASSERT_M( iRow < (int)m_Rows.size(), ssprintf("%i < %i", iRow, (int)m_Rows.size() ) ); OptionRow &row = *m_Rows[iRow]; - if( row.Type == OptionRow::ROW_EXIT ) + if( row.m_Type == OptionRow::ROW_EXIT ) return *row.m_textItems[0]; bool bOneChoice = row.m_RowDef.bOneChoiceForAllPlayers; @@ -618,7 +618,7 @@ void ScreenOptions::InitOptionsText() for( unsigned i=0; iIsHumanPlayer(pn) ) { COMMAND( m_sprLineHighlight[pn], "Change" ); - if( m_Rows[iRow]->Type == OptionRow::ROW_EXIT ) + if( m_Rows[iRow]->m_Type == OptionRow::ROW_EXIT ) COMMAND( m_sprLineHighlight[pn], "ChangeToExit" ); m_sprLineHighlight[pn].SetY( (float)iY ); } @@ -851,7 +851,7 @@ void ScreenOptions::UpdateEnabledDisabled() row.m_textItems[j]->SetY( row.m_fY ); } - if( row.Type == OptionRow::ROW_EXIT ) + if( row.m_Type == OptionRow::ROW_EXIT ) { bool bExitRowIsSelectedByBoth = true; FOREACH_PlayerNumber( p ) @@ -962,7 +962,7 @@ void ScreenOptions::PositionItems() vector Rows( m_Rows ); OptionRow *ExitRow = NULL; - if( (bool)SEPARATE_EXIT_ROW && Rows.back()->Type == OptionRow::ROW_EXIT ) + if( (bool)SEPARATE_EXIT_ROW && Rows.back()->m_Type == OptionRow::ROW_EXIT ) { ExitRow = &*Rows.back(); @@ -1079,7 +1079,7 @@ void ScreenOptions::OnChange( PlayerNumber pn ) /* If the last row is EXIT, and is hidden, then show MORE. */ - const bool ShowMore = m_Rows.back()->Type == OptionRow::ROW_EXIT && m_Rows.back()->m_bHidden; + const bool ShowMore = m_Rows.back()->m_Type == OptionRow::ROW_EXIT && m_Rows.back()->m_bHidden; if( m_bMoreShown != ShowMore ) { m_bMoreShown = ShowMore; @@ -1092,7 +1092,7 @@ void ScreenOptions::OnChange( PlayerNumber pn ) if( GAMESTATE->IsHumanPlayer(p) ) TweenCursor( p ); - const bool ExitSelected = m_Rows[m_iCurrentRow[pn]]->Type == OptionRow::ROW_EXIT; + const bool ExitSelected = m_Rows[m_iCurrentRow[pn]]->m_Type == OptionRow::ROW_EXIT; if( p == pn || GAMESTATE->GetNumHumanPlayers() == 1 ) { if( m_bWasOnExit[p] != ExitSelected ) @@ -1146,7 +1146,7 @@ void ScreenOptions::StartGoToNextScreen() bool ScreenOptions::AllAreOnExit() const { FOREACH_PlayerNumber( p ) - if( GAMESTATE->IsHumanPlayer(p) && m_Rows[m_iCurrentRow[p]]->Type != OptionRow::ROW_EXIT ) + if( GAMESTATE->IsHumanPlayer(p) && m_Rows[m_iCurrentRow[p]]->m_Type != OptionRow::ROW_EXIT ) return false; return true; } @@ -1190,7 +1190,7 @@ void ScreenOptions::MenuStart( PlayerNumber pn, const InputEventType selectType // If on exit, check it all players are on "Exit" - if( row.Type == OptionRow::ROW_EXIT ) + if( row.m_Type == OptionRow::ROW_EXIT ) { /* Don't accept START to go to the next screen if we're still transitioning in. */ if( AllAreOnExit() && selectType == IET_FIRST_PRESS && !IsTransitioning() ) @@ -1283,7 +1283,7 @@ void ScreenOptions::ChangeValueInRow( PlayerNumber pn, int iDelta, bool Repeat ) OptionRow &row = *m_Rows[iCurRow]; OptionRowDefinition &optrow = m_Rows[iCurRow]->m_RowDef; - const int iNumOptions = (row.Type == OptionRow::ROW_EXIT)? 1: optrow.choices.size(); + const int iNumOptions = (row.m_Type == OptionRow::ROW_EXIT)? 1: optrow.choices.size(); if( m_OptionsNavigation == NAV_THREE_KEY_MENU && iNumOptions <= 1 ) // 1 or 0 { /* There are no other options on the row; move up or down instead of left and right. @@ -1298,7 +1298,7 @@ void ScreenOptions::ChangeValueInRow( PlayerNumber pn, int iDelta, bool Repeat ) if( Repeat ) return; - if( row.Type == OptionRow::ROW_EXIT ) // EXIT is selected + if( row.m_Type == OptionRow::ROW_EXIT ) // EXIT is selected return; // don't allow a move bool bOneChanged = false; @@ -1444,7 +1444,7 @@ void ScreenOptions::MoveRow( PlayerNumber pn, int dir, bool Repeat ) int ScreenOptions::GetCurrentRow( PlayerNumber pn ) const { const int l = m_iCurrentRow[pn]; - if( m_Rows[l]->Type != OptionRow::ROW_NORMAL ) + if( m_Rows[l]->m_Type != OptionRow::ROW_NORMAL ) return -1; return l; } diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index 0fd2bc72c5..f47c9b11d6 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -878,7 +878,7 @@ void ScreenOptionsMaster::RefreshIcons() { for( unsigned i=0; iType == OptionRow::ROW_EXIT ) + if( m_Rows[i]->m_Type == OptionRow::ROW_EXIT ) continue; // skip OptionRow &row = *m_Rows[i];