alt- for finer bpm adjustment
This commit is contained in:
@@ -823,7 +823,10 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
case SDLK_F8: fDeltaBPM = + 0.020f; break;
|
case SDLK_F8: fDeltaBPM = + 0.020f; break;
|
||||||
default: ASSERT(0); return;
|
default: ASSERT(0); return;
|
||||||
}
|
}
|
||||||
switch( type )
|
if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) ||
|
||||||
|
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) )
|
||||||
|
fDeltaBPM /= 2; /* .010 */
|
||||||
|
else switch( type )
|
||||||
{
|
{
|
||||||
case IET_SLOW_REPEAT: fDeltaBPM *= 10; break;
|
case IET_SLOW_REPEAT: fDeltaBPM *= 10; break;
|
||||||
case IET_FAST_REPEAT: fDeltaBPM *= 40; break;
|
case IET_FAST_REPEAT: fDeltaBPM *= 40; break;
|
||||||
@@ -842,7 +845,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
}
|
}
|
||||||
else // BPMSegment being modified is m_BPMSegments[i]
|
else // BPMSegment being modified is m_BPMSegments[i]
|
||||||
{
|
{
|
||||||
if( i > 0 && fabsf(m_pSong->m_BPMSegments[i-1].m_fBPM - fNewBPM) < 0.025f )
|
if( i > 0 && fabsf(m_pSong->m_BPMSegments[i-1].m_fBPM - fNewBPM) < 0.009f )
|
||||||
m_pSong->m_BPMSegments.erase( m_pSong->m_BPMSegments.begin()+i,
|
m_pSong->m_BPMSegments.erase( m_pSong->m_BPMSegments.begin()+i,
|
||||||
m_pSong->m_BPMSegments.begin()+i+1);
|
m_pSong->m_BPMSegments.begin()+i+1);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1177,17 +1177,20 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
float fOffsetDelta;
|
float fOffsetDelta;
|
||||||
switch( DeviceI.button )
|
switch( DeviceI.button )
|
||||||
{
|
{
|
||||||
case SDLK_F9: fOffsetDelta = -0.025f; break;
|
case SDLK_F9: fOffsetDelta = -0.020f; break;
|
||||||
case SDLK_F10: fOffsetDelta = +0.025f; break;
|
case SDLK_F10: fOffsetDelta = +0.020f; break;
|
||||||
default: ASSERT(0); return;
|
default: ASSERT(0); return;
|
||||||
}
|
}
|
||||||
if( type == IET_FAST_REPEAT )
|
if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) ||
|
||||||
|
INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) )
|
||||||
|
fOffsetDelta /= 2; /* .010 */
|
||||||
|
else if( type == IET_FAST_REPEAT )
|
||||||
fOffsetDelta *= 10;
|
fOffsetDelta *= 10;
|
||||||
BPMSegment& seg = GAMESTATE->m_pCurSong->GetBPMSegmentAtBeat( GAMESTATE->m_fSongBeat );
|
BPMSegment& seg = GAMESTATE->m_pCurSong->GetBPMSegmentAtBeat( GAMESTATE->m_fSongBeat );
|
||||||
|
|
||||||
seg.m_fBPM += fOffsetDelta;
|
seg.m_fBPM += fOffsetDelta;
|
||||||
|
|
||||||
m_textDebug.SetText( ssprintf("Cur BPM = %f", seg.m_fBPM) );
|
m_textDebug.SetText( ssprintf("Cur BPM = %.2f", seg.m_fBPM) );
|
||||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
m_textDebug.StopTweening();
|
m_textDebug.StopTweening();
|
||||||
m_textDebug.BeginTweening( 3 ); // sleep
|
m_textDebug.BeginTweening( 3 ); // sleep
|
||||||
|
|||||||
Reference in New Issue
Block a user