From a511451e4bdcaaf90ace3574ea09e7fa0adba652 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 24 Nov 2003 02:49:30 +0000 Subject: [PATCH] simplify --- stepmania/src/LyricDisplay.cpp | 3 +-- stepmania/src/ScreenSelectDifficultyEX.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stepmania/src/LyricDisplay.cpp b/stepmania/src/LyricDisplay.cpp index 3b72a41af4..418e2292bf 100644 --- a/stepmania/src/LyricDisplay.cpp +++ b/stepmania/src/LyricDisplay.cpp @@ -94,8 +94,7 @@ void LyricDisplay::Update( float fDeltaTime ) * "Diffuse=1,1,1,0;linear,.2;Diffuse=1,1,1,1;linear,.2;LyricDiffuse" */ - float fZoom = 1.0f; - fZoom = min(fZoom, float(SCREEN_WIDTH)/(m_textLyrics[i].GetWidestLineWidthInSourcePixels()+1) ); + const float fZoom = min( 1.0f, float(SCREEN_WIDTH)/(m_textLyrics[i].GetZoomedWidth()+1) ); m_textLyrics[i].StopTweening(); m_textLyrics[i].SetZoomX(fZoom); diff --git a/stepmania/src/ScreenSelectDifficultyEX.cpp b/stepmania/src/ScreenSelectDifficultyEX.cpp index 5e818fe242..4d6aff1d39 100644 --- a/stepmania/src/ScreenSelectDifficultyEX.cpp +++ b/stepmania/src/ScreenSelectDifficultyEX.cpp @@ -269,7 +269,7 @@ void ScreenSelectDifficultyEX::SetAllPlayersSelection( int iChoice, bool bSwitch m_sprPicture[p].Load( THEME->GetPathToG(sPictureFile) ); int iDiffIndex = GetSelectionIndex((PlayerNumber)p); - m_sprHighlight[p].SetBarWidth( int(20 + m_sprDifficulty[iDiffIndex].GetZoomedWidth() + (m_textDifficultyText[iDiffIndex].GetWidestLineWidthInSourcePixels() / 2)) ); + m_sprHighlight[p].SetBarWidth( int(20 + m_sprDifficulty[iDiffIndex].GetZoomedWidth() + (m_textDifficultyText[iDiffIndex].GetZoomedWidth() / 2)) ); m_sprHighlight[p].SetXY( DIFFICULTYSPRITE_X(m_iChoice[p]) + 35, DIFFICULTYSPRITE_Y(m_iChoice[p]) ); } @@ -311,7 +311,7 @@ void ScreenSelectDifficultyEX::Change( PlayerNumber pn, int iNewChoice ) m_sprPicture[p].Load( THEME->GetPathToG(sPictureFile) ); int iDiffIndex = GetSelectionIndex((PlayerNumber)p); - m_sprHighlight[p].SetBarWidth( int( 20 + m_sprDifficulty[iDiffIndex].GetZoomedWidth() + (m_textDifficultyText[iDiffIndex].GetWidestLineWidthInSourcePixels() /2 )) ); + m_sprHighlight[p].SetBarWidth( int( 20 + m_sprDifficulty[iDiffIndex].GetZoomedWidth() + (m_textDifficultyText[iDiffIndex].GetZoomedWidth() /2 )) ); m_sprHighlight[p].SetXY( DIFFICULTYSPRITE_X(m_iChoice[p]) + 30, DIFFICULTYSPRITE_Y(m_iChoice[p]) ); }