diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index b66821e760..80f3cc0720 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,11 @@ ________________________________________________________________________________ StepMania 5.0 $next | 20111xxx -------------------------------------------------------------------------------- +2011/11/26 +---------- +* [ScreenEdit] Restore using F9 and F10 to adjust stops by a fixed amount. + Sorry for the delay in this. [Wolfman2000] + 2011/11/25 ---------- * [PlayerStageStats] Hitting a mine no longer gives you full combo when diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index c30a717ee7..c71d8b04c8 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -1900,30 +1900,23 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) fDelta *= 40; } -#if 0 - unsigned i; // is there a StopSegment on the current row? - const StopSegment *seg = GetAppropriateTiming().GetStopSegmentAtRow( GetRow() ); - - // a stop already exists here; change its value by the delta - if( seg->GetRow() == GetRow() ) + TimingData & timing = GetAppropriateTiming(); + StopSegment *seg = timing.GetStopSegmentAtRow( GetRow() ); + int i = timing.GetSegmentIndexAtRow(SEGMENT_STOP, GetRow()); + if (i == -1 || seg->GetRow() != GetRow()) // invalid { - float fSeconds = seg->GetPause() + fDelta; - GetAppropriateTiming().AddSegment - if( i == stops.size() ) // there is no StopSegment at the current beat - { - // create a new StopSegment if( fDelta > 0 ) - GetAppropriateTiming().AddSegment( StopSegment(GetRow(), fDelta) ); + timing.AddSegment( StopSegment(GetRow(), fDelta) ); } - else // StopSegment being modified is m_SongTiming.m_StopSegments[i] + else { - StopSegment *s = static_cast(stops[i]); - s->SetPause(s->GetPause() + fDelta); - if( s->GetPause() <= 0 ) + vector &stops = timing.GetTimingSegments(SEGMENT_STOP); + seg->SetPause(seg->GetPause() + fDelta); + if( seg->GetPause() <= 0 ) stops.erase( stops.begin()+i, stops.begin()+i+1); } -#endif + (fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play(); SetDirty( true ); } diff --git a/src/TimingData.h b/src/TimingData.h index ac6bfefc1b..299ad3dce8 100644 --- a/src/TimingData.h +++ b/src/TimingData.h @@ -360,6 +360,10 @@ public: void SortSegments( TimingSegmentType tst ); const vector &GetTimingSegments( TimingSegmentType tst ) const + { + return const_cast(this)->GetTimingSegments(tst); + } + vector &GetTimingSegments( TimingSegmentType tst ) { return m_avpTimingSegments[tst]; }