diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index a9d42a6c3b..a09899a588 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -8,6 +8,12 @@ ________________________________________________________________________________ StepMania 5.0 ????????? | 20110??? -------------------------------------------------------------------------------- +2011/07/04 +---------- +* [ScreenEdit] Add a function to switch the notes the routine players have to + hit. In simple terms, Player 1's notes are now Player 2's and vice~versa. + Check it out in the Alter Menu. [Wolfman2000] + 2011/07/03 ---------- * [ScreenEdit] Fix a crash if one tries to remove an attack that doesn't diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index adbb6deadc..7a46bb0da3 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -914,6 +914,7 @@ Insert=Insert Insert Credit=Insert Credit Insert beat and shift down=Insert beat and shift down Insert Entry=Insert Entry +Invert notes' player=Invert player notes (routine only) Jumps=Jumps Key Joy Mappings=Config Key/Joy Mappings Language=Language diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index a1af3713a6..e5d049f605 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -566,6 +566,8 @@ static MenuDef g_AlterMenu( MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true, EditMode_Full, true, true, 0, NULL ), MenuRowDef(ScreenEdit::convert_to_fake, "Convert selection to fake", true, + EditMode_Full, true, true, 0, NULL ), + MenuRowDef(ScreenEdit::routine_invert_notes, "Invert notes' player", true, EditMode_Full, true, true, 0, NULL ) ); @@ -1757,6 +1759,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) } else { + g_AlterMenu.rows[routine_invert_notes].bEnabled = (m_InputPlayerNumber != PLAYER_INVALID); EditMiniMenu(&g_AlterMenu, SM_BackFromAlterMenu); } break; @@ -4057,6 +4060,28 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector &iAn SetDirty(true); break; } + case routine_invert_notes: + { + NoteData &nd = this->m_NoteDataEdit; + NoteField &nf = this->m_NoteFieldEdit; + FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE(nd, r, + nf.m_iBeginMarker, + nf.m_iEndMarker) + { + for (int t = 0; t < nd.GetNumTracks(); t++) + { + const TapNote &tn = nd.GetTapNote(t, r); + if (tn.type != TapNote::empty) + { + TapNote nTap = tn; + nTap.pn = (tn.pn == PLAYER_1 ? + PLAYER_2 : PLAYER_1); + m_NoteDataEdit.SetTapNote(t, r, nTap); + } + } + } + break; + } } diff --git a/src/ScreenEdit.h b/src/ScreenEdit.h index a2392a83e6..283a19e631 100644 --- a/src/ScreenEdit.h +++ b/src/ScreenEdit.h @@ -407,6 +407,7 @@ public: convert_to_delay, convert_to_warp, convert_to_fake, + routine_invert_notes, NUM_ALTER_MENU_CHOICES };