diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index bbd67b738e..5163221661 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -364,10 +364,10 @@ void MusicWheel::GetSongList( vector &arraySongs, SortOrder so, const RSt continue; - if(PREFSMAN->m_bOnlyPreferredDifficulties) + if( PREFSMAN->m_bOnlyPreferredDifficulties ) { // if the song has steps that fit the preferred difficulty of the default player - if(pSong->HasStepsTypeAndDifficulty(GAMESTATE->GetCurrentStyle()->m_StepsType,GAMESTATE->m_PreferredDifficulty[GAMESTATE->GetFirstHumanPlayer()]) ) + if( pSong->HasStepsTypeAndDifficulty( GAMESTATE->GetCurrentStyle()->m_StepsType,GAMESTATE->m_PreferredDifficulty[GAMESTATE->GetFirstHumanPlayer()] ) ) arraySongs.push_back( pSong ); } else diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 024eba8c8f..6238796d0c 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -759,9 +759,7 @@ void ScreenGameplay::Init() m_GiveUpTimer.SetZero(); - // friez - - if(USE_ALTERNATIVE_INPUT) // using alternative input + if( USE_ALTERNATIVE_INPUT ) // using alternative input { int iNumCols = GAMESTATE->GetCurrentStyle()->m_iColsPerPlayer; FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi ) @@ -774,17 +772,17 @@ void ScreenGameplay::Init() // Dialog::OK(GameI.ToString(INPUTMAPPER->GetInputScheme()),"DEBUG"); ThemeMetric tmpMetric; - tmpMetric.Load(m_sName,ssprintf("AltInp%s%s",GAMESTATE->GetCurrentStyle()->m_szName,GameI.ToString( INPUTMAPPER->GetInputScheme() ).c_str() ) ); + tmpMetric.Load( m_sName,ssprintf("AltInp%s%s",GAMESTATE->GetCurrentStyle()->m_szName,GameI.ToString( INPUTMAPPER->GetInputScheme() ).c_str() ) ); if(tmpMetric.GetValue() != "") { GameInput GameIAlt; - GameIAlt.FromString(INPUTMAPPER->GetInputScheme(),tmpMetric.GetValue()); + GameIAlt.FromString( INPUTMAPPER->GetInputScheme(),tmpMetric.GetValue() ); AlternateMapping tmpMap; tmpMap.inpMain = GameI; tmpMap.inpAlt = GameIAlt; - m_vAlterMap.push_back(tmpMap); + m_vAlterMap.push_back( tmpMap ); } } } @@ -2248,11 +2246,11 @@ void ScreenGameplay::Input( const InputEventPlus &input ) int iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( input.GameI ); - if(USE_ALTERNATIVE_INPUT) // using alternative input + if( USE_ALTERNATIVE_INPUT ) // using alternative input { for( unsigned int i=0; i < m_vAlterMap.size(); ++i ) { - if(m_vAlterMap[i].inpAlt == input.GameI) + if( m_vAlterMap[i].inpAlt == input.GameI ) { iCol = GAMESTATE->GetCurrentStyle()->GameInputToColumn( m_vAlterMap[i].inpMain ); } diff --git a/stepmania/src/StreamDisplay.cpp b/stepmania/src/StreamDisplay.cpp index 896c31b88f..964d5b792c 100644 --- a/stepmania/src/StreamDisplay.cpp +++ b/stepmania/src/StreamDisplay.cpp @@ -48,20 +48,20 @@ void StreamDisplay::Load( const RString &_sMetricsGroup ) { Sprite *pSpr = new Sprite; - if(m_bUsingThreePart) + if( m_bUsingThreePart ) { - pSpr->Load( THEME->GetPathG(sMetricsGroup,ssprintf("%s part%d",StreamTypeToString(st).c_str(),i) ) ); + pSpr->Load( THEME->GetPathG( sMetricsGroup,ssprintf( "%s part%d", StreamTypeToString(st).c_str(),i ) ) ); if(pSpr->GetNumStates() > 1) { - pSpr->SetAllStateDelays(THEME->GetMetricF(sMetricsGroup,ssprintf("%spart%ddelay",StreamTypeToString(st).c_str(),i))); + pSpr->SetAllStateDelays( THEME->GetMetricF( sMetricsGroup, ssprintf( "%spart%ddelay", StreamTypeToString(st).c_str(),i ) ) ); } } else - pSpr->Load( THEME->GetPathG(sMetricsGroup,StreamTypeToString(st)) ); + pSpr->Load( THEME->GetPathG( sMetricsGroup, StreamTypeToString(st) ) ); m_vpSprPill[st].push_back( pSpr ); - if(!m_bUsingThreePart) + if( !m_bUsingThreePart ) { m_transformPill.TransformItemDirect( *pSpr, -1, i, iNumPills ); float f = 1 / fTextureCoordScaleX; @@ -71,11 +71,11 @@ void StreamDisplay::Load( const RString &_sMetricsGroup ) this->AddChild( pSpr ); } - if(m_bUsingThreePart) + if( m_bUsingThreePart ) { - m_fThreePartWidth = THEME->GetMetricF(sMetricsGroup,"ThreePartWidth"); + m_fThreePartWidth = THEME->GetMetricF( sMetricsGroup, "ThreePartWidth" ); // first element positioned depending on metric width specified - m_vpSprPill[st][0]->AddX(-(m_fThreePartWidth/2 + m_vpSprPill[st][0]->GetZoomedWidth()/2)); + m_vpSprPill[st][0]->AddX( -( m_fThreePartWidth/2 + m_vpSprPill[st][0]->GetZoomedWidth()/2 ) ); } } } @@ -107,8 +107,8 @@ void StreamDisplay::Update( float fDeltaSecs ) m_fVelocity += fSpringForce * fDeltaSecs; const float fViscousForce = -m_fVelocity * 0.2f; - if(!m_bAlwaysBounce) - m_fVelocity += fViscousForce * fDeltaSecs; + if( !m_bAlwaysBounce ) + m_fVelocity += fViscousForce * fDeltaSecs; } CLAMP( m_fVelocity, -.06f, +.02f ); @@ -133,26 +133,26 @@ void StreamDisplay::Update( float fDeltaSecs ) // XXX scale by current song speed - if(!m_bUsingThreePart) // usual lifebar + if( !m_bUsingThreePart ) // usual lifebar { pSpr->SetCropRight( 1.0f - fPercentFilledThisPill ); - pSpr->SetTexCoordVelocity(-1,0); + pSpr->SetTexCoordVelocity( -1,0 ); } else // using the three-part method { - if(i==1) // middle pill + if( i==1 ) // middle pill { float fMiddleWidth = m_fThreePartWidth * m_fTrailingPercent; - pSpr->ZoomToWidth(fMiddleWidth); + pSpr->ZoomToWidth( fMiddleWidth ); - float fMiddleX = m_vpSprPill[st][0]->GetX() + (fMiddleWidth/2) + (m_vpSprPill[st][0]->GetZoomedWidth()/2); - pSpr->SetX(fMiddleX); + float fMiddleX = m_vpSprPill[st][0]->GetX() + ( fMiddleWidth/2 ) + ( m_vpSprPill[st][0]->GetZoomedWidth()/2 ); + pSpr->SetX( fMiddleX ); } else if(i!=0) // last pill { - float fEndX = m_vpSprPill[st][1]->GetX() + (m_vpSprPill[st][1]->GetZoomedWidth()/2) + (pSpr->GetZoomedWidth()/2); - pSpr->SetX(fEndX); + float fEndX = m_vpSprPill[st][1]->GetX() + ( m_vpSprPill[st][1]->GetZoomedWidth()/2 ) + ( pSpr->GetZoomedWidth()/2 ); + pSpr->SetX( fEndX ); } } // Optimization: Don't draw pills that are covered up