Allow converting delays to beats.
Just find a better song than Uprock to use this on.
This commit is contained in:
@@ -13,6 +13,8 @@ StepMania 5.0 Preview 2 | 201106??
|
||||
* [UnlockManager] Add a new unlock reward: StepsType. This is similar to
|
||||
unlocking Steps, but it is targeted for one step in one stepstype rather
|
||||
than one step in all stepstypes. This needs testing. [Wolfman2000]
|
||||
* [ScreenEdit] Add the option to convert delays to beats. Just find a better
|
||||
song to use this on besides Uprock. [Wolfman2000]
|
||||
|
||||
2011/06/19
|
||||
----------
|
||||
|
||||
@@ -812,7 +812,8 @@ CoinMode=Coin Mode
|
||||
CoinModeNoHome=Coin Mode
|
||||
CoinsPerCredit=Coins Per Credit
|
||||
Connection=Connection
|
||||
Convert pause to beats=Convert pause to beats
|
||||
Convert pause to beats=Convert stop to beats
|
||||
Convert delay to beats=Convert delay to beats
|
||||
Convert selection to pause=Convert selection to pause
|
||||
Convert selection to delay=Convert selection to delay
|
||||
Convert selection to warp=Convert selection to Warp Segment
|
||||
|
||||
+22
-9
@@ -569,6 +569,8 @@ static MenuDef g_AreaMenu(
|
||||
MenuRowDef( ScreenEdit::shift_pauses_backward, "Shift all timing changes up", true, EditMode_Full, true, true, 0, NULL ),
|
||||
MenuRowDef(ScreenEdit::convert_pause_to_beat, "Convert pause to beats", true,
|
||||
EditMode_Full, true, true, 0, NULL ),
|
||||
MenuRowDef(ScreenEdit::convert_delay_to_beat, "Convert delay to beats", true,
|
||||
EditMode_Full, true, true, 0, NULL ),
|
||||
MenuRowDef( ScreenEdit::undo, "Undo", true, EditMode_Practice, true, true, 0, NULL ),
|
||||
MenuRowDef(ScreenEdit::clear_clipboard, "Clear clipboard", true,
|
||||
EditMode_Practice, true, true, 0, NULL )
|
||||
@@ -3856,18 +3858,29 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector<int> &iAns
|
||||
break;
|
||||
|
||||
case convert_pause_to_beat:
|
||||
{
|
||||
// TODO: Convert both Delays and Stops at once.
|
||||
float fStopSeconds = GetAppropriateTiming().GetStopAtRow( BeatToNoteRow( GetBeat() ) );
|
||||
GetAppropriateTiming().SetStopAtBeat( GetBeat() , 0 );
|
||||
{
|
||||
float fStopSeconds = GetAppropriateTiming().GetStopAtRow(GetRow());
|
||||
GetAppropriateTiming().SetStopAtBeat( GetBeat() , 0 );
|
||||
|
||||
float fStopBeats = fStopSeconds * GetAppropriateTiming().GetBPMAtBeat( GetBeat() ) / 60;
|
||||
float fStopBeats = fStopSeconds * GetAppropriateTiming().GetBPMAtBeat( GetBeat() ) / 60;
|
||||
|
||||
// don't move the step from where it is, just move everything later
|
||||
NoteDataUtil::InsertRows( m_NoteDataEdit, BeatToNoteRow( GetBeat() ) + 1, BeatToNoteRow(fStopBeats) );
|
||||
GetAppropriateTiming().InsertRows( BeatToNoteRow( GetBeat() ) + 1, BeatToNoteRow(fStopBeats) );
|
||||
}
|
||||
// don't move the step from where it is, just move everything later
|
||||
NoteDataUtil::InsertRows( m_NoteDataEdit, GetRow() + 1, BeatToNoteRow(fStopBeats) );
|
||||
GetAppropriateTiming().InsertRows( GetRow() + 1, BeatToNoteRow(fStopBeats) );
|
||||
}
|
||||
break;
|
||||
case convert_delay_to_beat:
|
||||
{
|
||||
TimingData &timing = GetAppropriateTiming();
|
||||
float pause = timing.GetDelayAtRow(GetRow());
|
||||
timing.SetDelayAtRow(GetRow(), 0);
|
||||
|
||||
float pauseBeats = pause * timing.GetBPMAtBeat(GetBeat()) / 60;
|
||||
|
||||
NoteDataUtil::InsertRows(m_NoteDataEdit, GetRow(), BeatToNoteRow(pauseBeats));
|
||||
timing.InsertRows(GetRow(), BeatToNoteRow(pauseBeats));
|
||||
break;
|
||||
}
|
||||
case undo:
|
||||
Undo();
|
||||
break;
|
||||
|
||||
@@ -404,6 +404,7 @@ public:
|
||||
shift_pauses_forward,
|
||||
shift_pauses_backward,
|
||||
convert_pause_to_beat,
|
||||
convert_delay_to_beat,
|
||||
undo,
|
||||
clear_clipboard,
|
||||
NUM_AREA_MENU_CHOICES
|
||||
|
||||
Reference in New Issue
Block a user