From d3c7ed1e61210757e4829b2c669851b5c2a3df29 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 10 Jun 2003 22:11:22 +0000 Subject: [PATCH] Alt-F11/F12 to change offset in 1ms increments (20ms is a long time!) --- stepmania/src/ScreenEdit.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index ab49b1b94b..afb844ed7b 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -505,7 +505,7 @@ void ScreenEdit::UpdateTextInfo() sText += ssprintf( "Main title:\n %s\n", m_pSong->m_sMainTitle.c_str() ); sText += ssprintf( "Tap Notes:\n %d\n", iNumTapNotes ); sText += ssprintf( "Hold Notes:\n %d\n", iNumHoldNotes ); - sText += ssprintf( "Beat 0 Offset:\n %.2f secs\n", m_pSong->m_fBeat0OffsetInSeconds ); + sText += ssprintf( "Beat 0 Offset:\n %.3f secs\n", m_pSong->m_fBeat0OffsetInSeconds ); sText += ssprintf( "Preview Start:\n %.2f secs\n", m_pSong->m_fMusicSampleStartSeconds ); sText += ssprintf( "Preview Length:\n %.2f secs\n",m_pSong->m_fMusicSampleLengthSeconds ); @@ -898,7 +898,10 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ case SDLK_F12: fOffsetDelta = +0.02f; break; default: ASSERT(0); return; } - switch( type ) + if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || + INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) + fOffsetDelta /= 20; /* 1ms */ + else switch( type ) { case IET_SLOW_REPEAT: fOffsetDelta *= 10; break; case IET_FAST_REPEAT: fOffsetDelta *= 40; break; @@ -1045,7 +1048,11 @@ void ScreenEdit::InputPlay( const DeviceInput& DeviceI, const InputEventType typ case SDLK_F12: fOffsetDelta = +0.020f; break; default: ASSERT(0); return; } - switch( type ) + + if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || + INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) + fOffsetDelta /= 20; /* 1ms */ + else switch( type ) { case IET_SLOW_REPEAT: fOffsetDelta *= 10; break; case IET_FAST_REPEAT: fOffsetDelta *= 40; break;