[splittiming] More SST adjustments.

This commit is contained in:
Jason Felds
2011-05-13 15:21:48 -04:00
parent e26868a2d7
commit e3cec47a41
+6 -8
View File
@@ -1472,42 +1472,40 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
break; break;
case EDIT_BUTTON_SCROLL_NEXT_MEASURE: case EDIT_BUTTON_SCROLL_NEXT_MEASURE:
{ {
float fDestinationBeat = GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat + beatsPerMeasure; float fDestinationBeat = GetBeat() + beatsPerMeasure;
fDestinationBeat = ftruncf( fDestinationBeat, (float)beatsPerMeasure ); fDestinationBeat = ftruncf( fDestinationBeat, (float)beatsPerMeasure );
ScrollTo( fDestinationBeat ); ScrollTo( fDestinationBeat );
break; break;
} }
case EDIT_BUTTON_SCROLL_PREV_MEASURE: case EDIT_BUTTON_SCROLL_PREV_MEASURE:
{ {
float fDestinationBeat = QuantizeUp( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat, (float)beatsPerMeasure ); float fDestinationBeat = QuantizeUp( GetBeat(), (float)beatsPerMeasure );
fDestinationBeat -= (float)beatsPerMeasure; fDestinationBeat -= (float)beatsPerMeasure;
ScrollTo( fDestinationBeat ); ScrollTo( fDestinationBeat );
break; break;
} }
case EDIT_BUTTON_SCROLL_NEXT: case EDIT_BUTTON_SCROLL_NEXT:
{ {
int iRow = BeatToNoteRow( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat ); int iRow = BeatToNoteRow( GetBeat() );
NoteDataUtil::GetNextEditorPosition( m_NoteDataEdit, iRow ); NoteDataUtil::GetNextEditorPosition( m_NoteDataEdit, iRow );
ScrollTo( NoteRowToBeat(iRow) ); ScrollTo( NoteRowToBeat(iRow) );
} }
break; break;
case EDIT_BUTTON_SCROLL_PREV: case EDIT_BUTTON_SCROLL_PREV:
{ {
int iRow = BeatToNoteRow( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat ); int iRow = BeatToNoteRow( GetBeat() );
NoteDataUtil::GetPrevEditorPosition( m_NoteDataEdit, iRow ); NoteDataUtil::GetPrevEditorPosition( m_NoteDataEdit, iRow );
ScrollTo( NoteRowToBeat(iRow) ); ScrollTo( NoteRowToBeat(iRow) );
} }
break; break;
case EDIT_BUTTON_LABEL_NEXT: case EDIT_BUTTON_LABEL_NEXT:
{ {
ScrollTo( GAMESTATE->m_pCurSong->m_SongTiming. ScrollTo( GetAppropriateTiming().GetNextLabelSegmentBeatAtBeat( GetBeat() ) );
GetNextLabelSegmentBeatAtBeat( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat ) );
} }
break; break;
case EDIT_BUTTON_LABEL_PREV: case EDIT_BUTTON_LABEL_PREV:
{ {
ScrollTo( GAMESTATE->m_pCurSong->m_SongTiming. ScrollTo( GetAppropriateTiming().GetPreviousLabelSegmentBeatAtBeat( GetBeat() ) );
GetPreviousLabelSegmentBeatAtBeat( GAMESTATE->m_pPlayerState[PLAYER_1]->m_Position.m_fSongBeat ) );
} }
break; break;
case EDIT_BUTTON_SNAP_NEXT: case EDIT_BUTTON_SNAP_NEXT: