Add LR and UD Mirror.
Adds a left-right and up-down mirror for 4-panel and solo modes.
This commit is contained in:
@@ -98,6 +98,8 @@ static const OptionColumnEntry g_OptionColumnEntries[] =
|
||||
{"RandomVanish",2},
|
||||
//--------------------//
|
||||
{"Mirror", 3},
|
||||
{"LRMirror", 3},
|
||||
{"UDMirror", 3},
|
||||
{"Left", 3},
|
||||
{"Right", 3},
|
||||
{"Shuffle", 3},
|
||||
|
||||
@@ -1375,6 +1375,56 @@ static void GetTrackMapping( StepsType st, NoteDataUtil::TrackMapping tt, int Nu
|
||||
|
||||
switch( tt )
|
||||
{
|
||||
case NoteDataUtil::lrmirror:
|
||||
switch( st )
|
||||
{
|
||||
case StepsType_dance_single:
|
||||
iTakeFromTrack[0] = 3;
|
||||
iTakeFromTrack[3] = 0;
|
||||
break;
|
||||
case StepsType_dance_double:
|
||||
iTakeFromTrack[0] = 7;
|
||||
iTakeFromTrack[1] = 5;
|
||||
iTakeFromTrack[2] = 6;
|
||||
iTakeFromTrack[3] = 4;
|
||||
iTakeFromTrack[4] = 3;
|
||||
iTakeFromTrack[5] = 1;
|
||||
iTakeFromTrack[6] = 2;
|
||||
iTakeFromTrack[7] = 0;
|
||||
break;
|
||||
case StepsType_dance_solo:
|
||||
iTakeFromTrack[0] = 5;
|
||||
iTakeFromTrack[1] = 4;
|
||||
iTakeFromTrack[4] = 1;
|
||||
iTakeFromTrack[5] = 0;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
case NoteDataUtil::udmirror:
|
||||
switch( st )
|
||||
{
|
||||
case StepsType_dance_single:
|
||||
iTakeFromTrack[1] = 2;
|
||||
iTakeFromTrack[2] = 1;
|
||||
break;
|
||||
case StepsType_dance_double:
|
||||
iTakeFromTrack[0] = 0;
|
||||
iTakeFromTrack[1] = 2;
|
||||
iTakeFromTrack[2] = 1;
|
||||
iTakeFromTrack[3] = 3;
|
||||
iTakeFromTrack[4] = 4;
|
||||
iTakeFromTrack[5] = 6;
|
||||
iTakeFromTrack[6] = 5;
|
||||
iTakeFromTrack[7] = 7;
|
||||
break;
|
||||
case StepsType_dance_solo:
|
||||
iTakeFromTrack[2] = 3;
|
||||
iTakeFromTrack[3] = 2;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
case NoteDataUtil::left:
|
||||
case NoteDataUtil::right:
|
||||
// Is there a way to do this without handling each StepsType? -Chris
|
||||
@@ -2955,6 +3005,8 @@ void NoteDataUtil::TransformNoteData( NoteData &nd, TimingData const& timing_dat
|
||||
|
||||
// Apply turns and shuffles last so that they affect inserts.
|
||||
if( po.m_bTurns[PlayerOptions::TURN_MIRROR] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::mirror, iStartIndex, iEndIndex );
|
||||
if( po.m_bTurns[PlayerOptions::TURN_LRMIRROR] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::lrmirror, iStartIndex, iEndIndex );
|
||||
if( po.m_bTurns[PlayerOptions::TURN_UDMIRROR] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::udmirror, iStartIndex, iEndIndex );
|
||||
if( po.m_bTurns[PlayerOptions::TURN_BACKWARDS] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::backwards, iStartIndex, iEndIndex );
|
||||
if( po.m_bTurns[PlayerOptions::TURN_LEFT] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::left, iStartIndex, iEndIndex );
|
||||
if( po.m_bTurns[PlayerOptions::TURN_RIGHT] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::right, iStartIndex, iEndIndex );
|
||||
|
||||
@@ -105,6 +105,8 @@ namespace NoteDataUtil
|
||||
left, /**< The NoteData is arranged as if the player was facing to the left. */
|
||||
right, /**< The NoteData is arranged as if the player was facing to the right. */
|
||||
mirror, /**< The NoteData is arranged as if facing a straight mirror. */
|
||||
lrmirror, /**< The NoteData is arranged so that the left and right columns are flipped. */
|
||||
udmirror, /**< The NoteData is arranged so that the up and down columns are flipped. */
|
||||
backwards, /**< The NoteData is arranged as if the player was facing backwards.
|
||||
This is NOT always the same as mirror. */
|
||||
shuffle,
|
||||
|
||||
@@ -490,6 +490,8 @@ void PlayerOptions::GetMods( std::vector<RString> &AddTo, bool bForceNoteSkin )
|
||||
AddPart( AddTo, m_fRandomSpeed, "RandomSpeed" );
|
||||
|
||||
if( m_bTurns[TURN_MIRROR] ) AddTo.push_back( "Mirror" );
|
||||
if( m_bTurns[TURN_LRMIRROR] ) AddTo.push_back( "LRMirror" );
|
||||
if( m_bTurns[TURN_UDMIRROR] ) AddTo.push_back( "UDMirror" );
|
||||
if( m_bTurns[TURN_BACKWARDS] ) AddTo.push_back( "Backwards" );
|
||||
if( m_bTurns[TURN_LEFT] ) AddTo.push_back( "Left" );
|
||||
if( m_bTurns[TURN_RIGHT] ) AddTo.push_back( "Right" );
|
||||
@@ -1026,6 +1028,8 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "randomvanish" ) SET_FLOAT( fAppearances[APPEARANCE_RANDOMVANISH] )
|
||||
else if( sBit == "turn" && !on ) ZERO( m_bTurns ); /* "no turn" */
|
||||
else if( sBit == "mirror" ) m_bTurns[TURN_MIRROR] = on;
|
||||
else if( sBit == "lrmirror" ) m_bTurns[TURN_LRMIRROR] = on;
|
||||
else if( sBit == "udmirror" ) m_bTurns[TURN_UDMIRROR] = on;
|
||||
else if( sBit == "backwards" ) m_bTurns[TURN_BACKWARDS] = on;
|
||||
else if( sBit == "left" ) m_bTurns[TURN_LEFT] = on;
|
||||
else if( sBit == "right" ) m_bTurns[TURN_RIGHT] = on;
|
||||
@@ -2009,6 +2013,8 @@ public:
|
||||
BOOL_INTERFACE(Cosecant, Cosecant);
|
||||
BOOL_INTERFACE(TurnNone, Turns[PlayerOptions::TURN_NONE]);
|
||||
BOOL_INTERFACE(Mirror, Turns[PlayerOptions::TURN_MIRROR]);
|
||||
BOOL_INTERFACE(LRMirror, Turns[PlayerOptions::TURN_LRMIRROR]);
|
||||
BOOL_INTERFACE(UDMirror, Turns[PlayerOptions::TURN_UDMIRROR]);
|
||||
BOOL_INTERFACE(Backwards, Turns[PlayerOptions::TURN_BACKWARDS]);
|
||||
BOOL_INTERFACE(Left, Turns[PlayerOptions::TURN_LEFT]);
|
||||
BOOL_INTERFACE(Right, Turns[PlayerOptions::TURN_RIGHT]);
|
||||
@@ -2555,6 +2561,8 @@ public:
|
||||
ADD_METHOD(RandomSpeed);
|
||||
ADD_METHOD(TurnNone);
|
||||
ADD_METHOD(Mirror);
|
||||
ADD_METHOD(LRMirror);
|
||||
ADD_METHOD(UDMirror);
|
||||
ADD_METHOD(Backwards);
|
||||
ADD_METHOD(Left);
|
||||
ADD_METHOD(Right);
|
||||
|
||||
@@ -290,6 +290,8 @@ public:
|
||||
enum Turn {
|
||||
TURN_NONE=0, /**< No turning of the arrows is performed. */
|
||||
TURN_MIRROR, /**< The arrows are mirrored from their normal position. */
|
||||
TURN_LRMIRROR, /**< The left and right arrows are mirrored from their normal position. */
|
||||
TURN_UDMIRROR, /**< The up and down arrows are mirrored from their normal position. */
|
||||
TURN_BACKWARDS, /**< The arrows are turned 180 degrees. This does NOT always equal mirror. */
|
||||
TURN_LEFT, /**< The arrows are turned 90 degrees to the left. */
|
||||
TURN_RIGHT, /**< The arrows are turned 90 degress to the right. */
|
||||
|
||||
+3
-1
@@ -846,7 +846,7 @@ static MenuDef g_AlterMenu(
|
||||
EditMode_Practice, true, true, 0,
|
||||
"4th","8th","12th","16th","24th","32nd","48th","64th","192nd"),
|
||||
MenuRowDef(ScreenEdit::turn, "Turn", true,
|
||||
EditMode_Practice, true, true, 0, "Left","Right","Mirror","Backwards","Shuffle","SuperShuffle","HyperShuffle" ),
|
||||
EditMode_Practice, true, true, 0, "Left","Right","Mirror","LRMirror","UDMirror","Backwards","Shuffle","SuperShuffle","HyperShuffle" ),
|
||||
MenuRowDef(ScreenEdit::transform, "Transform", true,
|
||||
EditMode_Practice, true, true, 0, "NoHolds","NoMines","Little","Wide",
|
||||
"Big","Quick","Skippy","Mines","Echo","Stomp","Planted","Floored",
|
||||
@@ -5168,6 +5168,8 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const std::vector<int>
|
||||
case left: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::left ); break;
|
||||
case right: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::right ); break;
|
||||
case mirror: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::mirror ); break;
|
||||
case lrmirror: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::lrmirror ); break;
|
||||
case udmirror: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::udmirror ); break;
|
||||
case turn_backwards: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::backwards ); break;
|
||||
case shuffle: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::shuffle ); break;
|
||||
case super_shuffle: NoteDataUtil::Turn( m_Clipboard, st, NoteDataUtil::super_shuffle ); break;
|
||||
|
||||
@@ -485,6 +485,8 @@ public:
|
||||
left, /**< Turn the notes as if you were facing to the left. */
|
||||
right, /**< Turn the notes as if you were facing to the right. */
|
||||
mirror, /**< Flip the notes vertically. */
|
||||
lrmirror, /**< Swap the left and right columns. */
|
||||
udmirror, /**< Swap the up and down columns. */
|
||||
turn_backwards, /**< Turn the notes as if you were facing away from the machine. */
|
||||
shuffle, /**< Replace one column with another column. */
|
||||
super_shuffle, /**< Replace each note individually. */
|
||||
|
||||
@@ -359,6 +359,8 @@ void StatsManager::SavePadmissScore( const StageStats *pSS, PlayerNumber pn )
|
||||
|
||||
XNode *turns = mods->AppendChild( "Turns" );
|
||||
ADD_BOOLEAN_OPTION( turns, TURN_MIRROR, opts.m_bTurns );
|
||||
ADD_BOOLEAN_OPTION( turns, TURN_LRMIRROR, opts.m_bTurns );
|
||||
ADD_BOOLEAN_OPTION( turns, TURN_UDMIRROR, opts.m_bTurns );
|
||||
ADD_BOOLEAN_OPTION( turns, TURN_BACKWARDS, opts.m_bTurns );
|
||||
ADD_BOOLEAN_OPTION( turns, TURN_LEFT, opts.m_bTurns );
|
||||
ADD_BOOLEAN_OPTION( turns, TURN_RIGHT, opts.m_bTurns );
|
||||
|
||||
Reference in New Issue
Block a user