Add routine helper: switch notes' player.

This commit is contained in:
Jason Felds
2011-07-04 17:30:36 -04:00
parent 72b468b22b
commit 5ea7adad66
4 changed files with 33 additions and 0 deletions
+6
View File
@@ -8,6 +8,12 @@ ________________________________________________________________________________
StepMania 5.0 ????????? | 20110??? 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 2011/07/03
---------- ----------
* [ScreenEdit] Fix a crash if one tries to remove an attack that doesn't * [ScreenEdit] Fix a crash if one tries to remove an attack that doesn't
+1
View File
@@ -914,6 +914,7 @@ Insert=Insert
Insert Credit=Insert Credit Insert Credit=Insert Credit
Insert beat and shift down=Insert beat and shift down Insert beat and shift down=Insert beat and shift down
Insert Entry=Insert Entry Insert Entry=Insert Entry
Invert notes' player=Invert player notes (routine only)
Jumps=Jumps Jumps=Jumps
Key Joy Mappings=Config Key/Joy Mappings Key Joy Mappings=Config Key/Joy Mappings
Language=Language Language=Language
+25
View File
@@ -566,6 +566,8 @@ static MenuDef g_AlterMenu(
MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true, MenuRowDef(ScreenEdit::convert_to_warp, "Convert selection to warp", true,
EditMode_Full, true, true, 0, NULL ), EditMode_Full, true, true, 0, NULL ),
MenuRowDef(ScreenEdit::convert_to_fake, "Convert selection to fake", true, 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 ) EditMode_Full, true, true, 0, NULL )
); );
@@ -1757,6 +1759,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
} }
else else
{ {
g_AlterMenu.rows[routine_invert_notes].bEnabled = (m_InputPlayerNumber != PLAYER_INVALID);
EditMiniMenu(&g_AlterMenu, SM_BackFromAlterMenu); EditMiniMenu(&g_AlterMenu, SM_BackFromAlterMenu);
} }
break; break;
@@ -4057,6 +4060,28 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
SetDirty(true); SetDirty(true);
break; 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;
}
} }
+1
View File
@@ -407,6 +407,7 @@ public:
convert_to_delay, convert_to_delay,
convert_to_warp, convert_to_warp,
convert_to_fake, convert_to_fake,
routine_invert_notes,
NUM_ALTER_MENU_CHOICES NUM_ALTER_MENU_CHOICES
}; };