From a8ed1f80c1c37ab88ac7791e2411e513007b627c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 18 Oct 2002 00:53:22 +0000 Subject: [PATCH] Pull out more common code. --- stepmania/src/ScreenEdit.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index c197303503..55e4115d69 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -349,7 +349,6 @@ void ScreenEdit::Update( float fDeltaTime ) { TransitionToEdit(); } - /* XXX: EndMarker may be -1! */ GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fEndMarker; } } @@ -1355,8 +1354,6 @@ void ScreenEdit::InputPlay( const DeviceInput& DeviceI, const InputEventType typ { case DIK_ESCAPE: TransitionToEdit(); - - GAMESTATE->m_fSongBeat = froundf( GAMESTATE->m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetSnapMode()) ); break; case DIK_F11: case DIK_F12: @@ -1398,6 +1395,9 @@ void ScreenEdit::TransitionToEdit() m_rectRecordBack.StopTweening(); m_rectRecordBack.BeginTweening( 0.5f ); m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) ); + + /* Make sure we're snapped. */ + GAMESTATE->m_fSongBeat = froundf( GAMESTATE->m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetSnapMode()) ); } void ScreenEdit::TransitionFromRecordToEdit() @@ -1411,8 +1411,6 @@ void ScreenEdit::TransitionFromRecordToEdit() m_NoteFieldEdit.ClearRange( iNoteIndexBegin, iNoteIndexEnd ); m_NoteFieldEdit.CopyRange( (NoteData*)&m_NoteFieldRecord, iNoteIndexBegin, iNoteIndexEnd, iNoteIndexBegin ); - - GAMESTATE->m_fSongBeat = froundf( GAMESTATE->m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetSnapMode()) ); }