From 65df309d327bd597090a389101fb8fe63e6a2735 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 31 Dec 2003 07:49:30 +0000 Subject: [PATCH] add collapse left transform --- stepmania/src/NoteDataUtil.cpp | 19 +++++++++++++++++++ stepmania/src/NoteDataUtil.h | 1 + stepmania/src/ScreenEdit.cpp | 3 ++- stepmania/src/ScreenEdit.h | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index 41fec4c507..ffca1f57b4 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -1110,6 +1110,25 @@ void NoteDataUtil::CollapseToOne( NoteData &in ) in.Convert2sAnd3sToHoldNotes(); } +void NoteDataUtil::CollapseLeft( NoteData &in ) +{ + in.ConvertHoldNotesTo2sAnd3s(); + int max_row = in.GetLastRow(); + for( int r=0; r<=max_row; r++ ) + { + int iNumTracksFilled = 0; + for( int t=0; t2","Compress 4->3","Expand 3->4","Expand 2->3","Expand 2x" } }, { "Play selection", true, 0, { NULL } }, { "Record in selection", true, 0, { NULL } }, @@ -1608,6 +1608,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) case clear_left: NoteDataUtil::ClearLeft( m_Clipboard ); break; case clear_right: NoteDataUtil::ClearRight( m_Clipboard ); break; case collapse_to_one: NoteDataUtil::CollapseToOne( m_Clipboard ); break; + case collapse_left: NoteDataUtil::CollapseLeft( m_Clipboard ); break; case shift_left: NoteDataUtil::ShiftLeft( m_Clipboard ); break; case shift_right: NoteDataUtil::ShiftRight( m_Clipboard ); break; default: ASSERT(0); diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index 8b6b2b2b64..2da288840f 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -134,7 +134,7 @@ public: void HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ); enum TurnType { left, right, mirror, shuffle, super_shuffle, NUM_TURN_TYPES }; enum TransformType { noholds, nomines, little, wide, big, quick, skippy, mines, echo, planted, stomp, twister, NUM_TRANSFORM_TYPES }; - enum AlterType { backwards, swap_sides, copy_left_to_right, copy_right_to_left, clear_left, clear_right, collapse_to_one, shift_left, shift_right, NUM_ALTER_TYPES }; + enum AlterType { backwards, swap_sides, copy_left_to_right, copy_right_to_left, clear_left, clear_right, collapse_to_one, collapse_left, shift_left, shift_right, NUM_ALTER_TYPES }; // MD 11/02/03 - added additional tempo adjusts which make "sense" enum TempoType { compress_2x, compress_3_2, compress_4_3, expand_4_3, expand_3_2, expand_2x, NUM_TEMPO_TYPES };