From 2ea63c81fcfdd2c29f6d3f560122aa25d85d1b60 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 10 Jun 2003 22:14:09 +0000 Subject: [PATCH] sync up gameplay offset control with editor --- stepmania/src/ScreenGameplay.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 7e14943b41..27176b391d 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1204,12 +1204,18 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ case SDLK_F12: fOffsetDelta = +0.02f; break; default: ASSERT(0); return; } - if( type == IET_FAST_REPEAT ) - fOffsetDelta *= 10; + 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; + } GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds += fOffsetDelta; - m_textDebug.SetText( ssprintf("Offset = %f", GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds) ); + m_textDebug.SetText( ssprintf("Offset = %.3f", GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds) ); m_textDebug.SetDiffuse( RageColor(1,1,1,1) ); m_textDebug.StopTweening(); m_textDebug.BeginTweening( 3 ); // sleep