From c8468a4211b64e11b84d930d9f3818edffb6d3b2 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 4 Sep 2003 21:04:39 +0000 Subject: [PATCH] If long and bOneChoiceForAllPlayers, then only initialize one text item. Compile fix. --- stepmania/src/ScreenOptions.cpp | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index f4ff27bed8..dd74ca5465 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -178,7 +178,9 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi else bt->SetX( ITEM_X[p] ); - UpdateText( (PlayerNumber)p, j ); + /* If bOneChoiceForAllPlayers, then only initialize one text item. */ + if( optline.bOneChoiceForAllPlayers ) + break; } } @@ -257,7 +259,11 @@ void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int &iWidthOut, int & { bool bExitRow = iRow == m_iNumOptionRows; bool bLotsOfOptions = m_bRowIsLong[iRow]; - unsigned iOptionInRow = bExitRow ? 0 : bLotsOfOptions ? pn : m_iSelectedOption[pn][iRow]; + bool bOneChoice = m_OptionRow[iRow].bOneChoiceForAllPlayers; + + unsigned iOptionInRow = bExitRow? 0: + bLotsOfOptions? (bOneChoice? 0:pn): + m_iSelectedOption[pn][iRow]; ASSERT( iOptionInRow < m_textItems[iRow].size() ); BitmapText &text = *m_textItems[iRow][iOptionInRow]; @@ -488,25 +494,6 @@ void ScreenOptions::UpdateEnabledDisabled() m_textItems[i][j]->SetY( m_fRowY[i] ); } } - - /* Hide the text of all but the first active player, so we don't overdraw. */ - if( m_InputMode == INPUTMODE_TOGETHER && m_bRowIsLong[i] ) - { - bool one = false; - for( unsigned j=0; jIsHumanPlayer(j) ) - { - if(!one) - { - one=true; - continue; - } - } - m_textItems[i][j]->StopTweening(); - m_textItems[i][j]->SetDiffuse( RageColor(1,1,1,0) ); - } - } } bool bExitRowIsSelectedByBoth = true;