Add routine helper: switch notes' player.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<int> &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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -407,6 +407,7 @@ public:
|
||||
convert_to_delay,
|
||||
convert_to_warp,
|
||||
convert_to_fake,
|
||||
routine_invert_notes,
|
||||
NUM_ALTER_MENU_CHOICES
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user