fix mini when not in 0..1

This commit is contained in:
Glenn Maynard
2005-10-22 23:31:12 +00:00
parent 4410080639
commit 025b671698
3 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -519,8 +519,11 @@ float ArrowEffects::GetZoom( const PlayerState* pPlayerState )
fZoom *= 0.6f;
float fMiniPercent = pPlayerState->m_CurrentPlayerOptions.m_fEffects[PlayerOptions::EFFECT_MINI];
fZoom *= SCALE( fMiniPercent, 0, 1, 1, 0.5f );
if( fMiniPercent != 0 )
{
fMiniPercent = powf( 0.5f, fMiniPercent );
fZoom *= fMiniPercent;
}
return fZoom;
}
+4 -1
View File
@@ -19,8 +19,11 @@ void NoteFieldMode::BeginDrawTrack( const PlayerState* pPlayerState, int iTrack
// TODO: Remove indexing by PlayerNumber.
float fPixelXOffsetFromCenter = s->m_ColumnInfo[pPlayerState->m_PlayerNumber][iTrack].fXOffset;
/* Allow Mini to pull tracks together, but not to push them apart. */
const float* fEffects = pPlayerState->m_CurrentPlayerOptions.m_fEffects;
fPixelXOffsetFromCenter *= SCALE( fEffects[PlayerOptions::EFFECT_MINI], 0, 1, 1, 0.5f );
float fMiniPercent = fEffects[PlayerOptions::EFFECT_MINI];
fMiniPercent = min( powf(0.5f, fMiniPercent), 1.0f );
fPixelXOffsetFromCenter *= fMiniPercent;
DISPLAY->Translate( fPixelXOffsetFromCenter, 0, 0 );
}
+1 -1
View File
@@ -496,7 +496,7 @@ void Player::Update( float fDeltaTime )
float fMiniPercent = m_pPlayerState->m_CurrentPlayerOptions.m_fEffects[PlayerOptions::EFFECT_MINI];
float fJudgmentZoom = 1 - fMiniPercent*0.25f;
float fJudgmentZoom = min( powf(0.25f, fMiniPercent), 1.0f );
if( m_pJudgment )
m_pJudgment->SetZoom( m_pJudgment->GetZoom() * fJudgmentZoom );
if( m_sprJudgmentFrame.IsLoaded() )