Allow converting delays to beats.

Just find a better song than Uprock to use this on.
This commit is contained in:
Jason Felds
2011-06-24 00:50:32 -04:00
parent c67e4d2349
commit 0190ac0eca
4 changed files with 27 additions and 10 deletions
+2
View File
@@ -13,6 +13,8 @@ StepMania 5.0 Preview 2 | 201106??
* [UnlockManager] Add a new unlock reward: StepsType. This is similar to * [UnlockManager] Add a new unlock reward: StepsType. This is similar to
unlocking Steps, but it is targeted for one step in one stepstype rather unlocking Steps, but it is targeted for one step in one stepstype rather
than one step in all stepstypes. This needs testing. [Wolfman2000] 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 2011/06/19
---------- ----------
+2 -1
View File
@@ -812,7 +812,8 @@ CoinMode=Coin Mode
CoinModeNoHome=Coin Mode CoinModeNoHome=Coin Mode
CoinsPerCredit=Coins Per Credit CoinsPerCredit=Coins Per Credit
Connection=Connection 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 pause=Convert selection to pause
Convert selection to delay=Convert selection to delay Convert selection to delay=Convert selection to delay
Convert selection to warp=Convert selection to Warp Segment Convert selection to warp=Convert selection to Warp Segment
+22 -9
View File
@@ -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::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, MenuRowDef(ScreenEdit::convert_pause_to_beat, "Convert pause to beats", true,
EditMode_Full, true, true, 0, NULL ), 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::undo, "Undo", true, EditMode_Practice, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::clear_clipboard, "Clear clipboard", true, MenuRowDef(ScreenEdit::clear_clipboard, "Clear clipboard", true,
EditMode_Practice, true, true, 0, NULL ) EditMode_Practice, true, true, 0, NULL )
@@ -3856,18 +3858,29 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, const vector<int> &iAns
break; break;
case convert_pause_to_beat: case convert_pause_to_beat:
{ {
// TODO: Convert both Delays and Stops at once. float fStopSeconds = GetAppropriateTiming().GetStopAtRow(GetRow());
float fStopSeconds = GetAppropriateTiming().GetStopAtRow( BeatToNoteRow( GetBeat() ) ); GetAppropriateTiming().SetStopAtBeat( GetBeat() , 0 );
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 // don't move the step from where it is, just move everything later
NoteDataUtil::InsertRows( m_NoteDataEdit, BeatToNoteRow( GetBeat() ) + 1, BeatToNoteRow(fStopBeats) ); NoteDataUtil::InsertRows( m_NoteDataEdit, GetRow() + 1, BeatToNoteRow(fStopBeats) );
GetAppropriateTiming().InsertRows( BeatToNoteRow( GetBeat() ) + 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; break;
}
case undo: case undo:
Undo(); Undo();
break; break;
+1
View File
@@ -404,6 +404,7 @@ public:
shift_pauses_forward, shift_pauses_forward,
shift_pauses_backward, shift_pauses_backward,
convert_pause_to_beat, convert_pause_to_beat,
convert_delay_to_beat,
undo, undo,
clear_clipboard, clear_clipboard,
NUM_AREA_MENU_CHOICES NUM_AREA_MENU_CHOICES