From e2136499e12e5958ccf99eef7efaa24640cd48aa Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 11 Jan 2004 06:34:30 +0000 Subject: [PATCH] add "nojumps" --- stepmania/Themes/default/metrics.ini | 7 ++++--- stepmania/src/NoteDataUtil.cpp | 14 ++++++++++++-- stepmania/src/NoteDataUtil.h | 2 ++ stepmania/src/PlayerOptions.cpp | 2 ++ stepmania/src/PlayerOptions.h | 1 + stepmania/src/ScreenEdit.cpp | 3 ++- stepmania/src/ScreenEdit.h | 2 +- stepmania/src/ScreenOptionsMaster.cpp | 4 ++-- 8 files changed, 26 insertions(+), 9 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 78c8094014..e72b72e4e3 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -4056,13 +4056,14 @@ Scroll,2=mod,reverse;name,Reverse Scroll,3=mod,split;name,Split Scroll,4=mod,alternate;name,Alternate -Holds=5 -HoldsDefault=mod,no noholds,no planted,no twister,no nohands +Holds=6 +HoldsDefault=mod,no noholds,no planted,no twister,no nojumps,no nohands Holds,1=mod,noholds;name,Off Holds,2=name,On Holds,3=mod,planted;name,Planted Holds,4=mod,twister;name,Twister -Holds,5=mod,nohands;name,NoHands +Holds,5=mod,nojumps;name,NoJumps +Holds,6=mod,nohands;name,NoHands Mines=3 MinesDefault=mod,no nomines,no mines diff --git a/stepmania/src/NoteDataUtil.cpp b/stepmania/src/NoteDataUtil.cpp index a228e857a6..88beeeb083 100644 --- a/stepmania/src/NoteDataUtil.cpp +++ b/stepmania/src/NoteDataUtil.cpp @@ -369,7 +369,7 @@ void NoteDataUtil::RemoveHoldNotes(NoteData &in, float fStartBeat, float fEndBea } -void NoteDataUtil::RemoveHands(NoteData &in, float fStartBeat, float fEndBeat) +void NoteDataUtil::RemoveSimultaneousNotes(NoteData &in, int iMaxSimultaneous, float fStartBeat, float fEndBeat) { int iStartIndex = BeatToNoteRow( fStartBeat ); int iEndIndex = BeatToNoteRow( fEndBeat ); @@ -385,7 +385,7 @@ void NoteDataUtil::RemoveHands(NoteData &in, float fStartBeat, float fEndBeat) // remove the first tap note or the first hold note that starts on this row int iTotalTracksPressed = in.GetNumTracksWithTap(r) + viTracksHeld.size(); - int iTracksToRemove = max( 0, iTotalTracksPressed - 2 ); + int iTracksToRemove = max( 0, iTotalTracksPressed - iMaxSimultaneous ); for( int t=0; iTracksToRemove>0 && t2","Compress 4->3","Expand 3->4","Expand 2->3","Expand 2x" } }, { "Play selection", true, 0, { NULL } }, @@ -1588,6 +1588,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) case planted: NoteDataUtil::Planted( m_NoteFieldEdit, fBeginBeat, fEndBeat ); break; case stomp: NoteDataUtil::Stomp( m_NoteFieldEdit, st, fBeginBeat, fEndBeat ); break; case twister: NoteDataUtil::Twister( m_NoteFieldEdit, fBeginBeat, fEndBeat ); break; + case nojumps: NoteDataUtil::RemoveJumps( m_NoteFieldEdit, fBeginBeat, fEndBeat ); break; case nohands: NoteDataUtil::RemoveHands( m_NoteFieldEdit, fBeginBeat, fEndBeat ); break; default: ASSERT(0); } diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index 0ee972c3bf..583d656512 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -133,7 +133,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, nohands, NUM_TRANSFORM_TYPES }; + enum TransformType { noholds, nomines, little, wide, big, quick, skippy, mines, echo, planted, stomp, twister, nojumps, nohands, NUM_TRANSFORM_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 }; diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index f9dbdc0384..fa12cfb085 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -586,8 +586,8 @@ void ScreenOptionsMaster::ExportOptions() const OptionRowHandler &hand = OptionRowHandlers[row]; if( hand.type == ROW_LIST ) { - const int sel = m_Rows[row]->GetOneSharedSelection(); - const ModeChoice &mc = hand.ListEntries[sel]; + const int choice = m_Rows[row]->m_iChoiceWithFocus[0]; + const ModeChoice &mc = hand.ListEntries[choice]; if( mc.m_sScreen != "" ) m_NextScreen = mc.m_sScreen; }