From c45fd9fd331874a1440ca78e0ef515c3a434350a Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Thu, 24 Mar 2005 23:03:12 +0000 Subject: [PATCH] only shift in Double and Couple, not Single --- stepmania/src/ScreenEdit.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index e220f4a1f2..d68fde0e2c 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -795,6 +795,20 @@ void ScreenEdit::Input( const DeviceInput& DeviceI, const InputEventType type, c UpdateTextInfo(); } +static void ShiftToRightSide( int &iCol, int iNumTracks ) +{ + switch( GAMESTATE->GetCurrentStyle()->m_StyleType ) + { + case ONE_PLAYER_ONE_SIDE: + break; + case TWO_PLAYERS_TWO_SIDES: + case ONE_PLAYER_TWO_SIDES: + iCol += iNumTracks/2; + break; + default: + ASSERT(0); + } +} void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI, EditButton EditB ) { @@ -830,7 +844,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ // Alt + number = input to right half if( EditIsBeingPressed(EDIT_BUTTON_RIGHT_SIDE) ) - iCol += m_NoteDataEdit.GetNumTracks()/2; + ShiftToRightSide( iCol, m_NoteDataEdit.GetNumTracks() ); const float fSongBeat = GAMESTATE->m_fSongBeat; @@ -949,7 +963,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ // Ctrl + number = input to right half if( EditIsBeingPressed(EDIT_BUTTON_RIGHT_SIDE) ) - iCol += m_NoteDataEdit.GetNumTracks()/2; + ShiftToRightSide( iCol, m_NoteDataEdit.GetNumTracks() ); if( iCol >= m_NoteDataEdit.GetNumTracks() ) continue; // skip