Apply m_ColumnInfo->fXOffset in GetXPos. Doing this in BeginDrawTrack makes
it hard to apply effects in the right order. (This might also be able to simplify Flip, but that's for later ...) Fix Mini scaling doesn't apply to mod adjustments. Fixes weird "Mini+Flip" and probably other combinations. (This also eliminates the need for NoteFieldMode entirely, which I've wanted to remove for a long time.)
This commit is contained in:
@@ -378,6 +378,16 @@ float ArrowEffects::GetXPos( const PlayerState* pPlayerState, int iColNum, float
|
||||
fPixelOffsetFromCenter += fEffects[PlayerOptions::EFFECT_BEAT] * fShift;
|
||||
} while(0);
|
||||
|
||||
fPixelOffsetFromCenter += pCols[iColNum].fXOffset;
|
||||
|
||||
if( fEffects[PlayerOptions::EFFECT_MINI] != 0 )
|
||||
{
|
||||
/* Allow Mini to pull tracks together, but not to push them apart. */
|
||||
float fMiniPercent = fEffects[PlayerOptions::EFFECT_MINI];
|
||||
fMiniPercent = min( powf(0.5f, fMiniPercent), 1.0f );
|
||||
fPixelOffsetFromCenter *= fMiniPercent;
|
||||
}
|
||||
|
||||
return fPixelOffsetFromCenter;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,32 +9,10 @@
|
||||
|
||||
void NoteFieldMode::BeginDrawTrack( const PlayerState* pPlayerState, int iTrack )
|
||||
{
|
||||
DISPLAY->CameraPushMatrix();
|
||||
|
||||
ASSERT( iTrack != -1 );
|
||||
|
||||
DISPLAY->PushMatrix();
|
||||
|
||||
const Style *s = GAMESTATE->GetCurrentStyle();
|
||||
// TODO: Remove indexing by PlayerNumber.
|
||||
float fPixelXOffsetFromCenter = s->m_ColumnInfo[pPlayerState->m_PlayerNumber][iTrack].fXOffset;
|
||||
|
||||
const float* fEffects = pPlayerState->m_CurrentPlayerOptions.m_fEffects;
|
||||
|
||||
/* Allow Mini to pull tracks together, but not to push them apart. */
|
||||
float fMiniPercent = fEffects[PlayerOptions::EFFECT_MINI];
|
||||
fMiniPercent = min( powf(0.5f, fMiniPercent), 1.0f );
|
||||
fPixelXOffsetFromCenter *= fMiniPercent;
|
||||
|
||||
DISPLAY->Translate( fPixelXOffsetFromCenter, 0, 0 );
|
||||
}
|
||||
|
||||
void NoteFieldMode::EndDrawTrack( int iTrack )
|
||||
{
|
||||
ASSERT( iTrack != -1 );
|
||||
|
||||
DISPLAY->PopMatrix();
|
||||
DISPLAY->CameraPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user