Add nITG's new Move modifiers (#1411)
* Implemented NITG's MoveX/Y/Z modifiers Added modifiers: MoveX1-n: Moves a column in the x direction, 100% = move left one arrow size. MoveY1-n: Moves a column in the y direction MoveZ1-n: Moves a column in the z direction.
This commit is contained in:
@@ -76,6 +76,10 @@ void PlayerOptions::Init()
|
||||
ZERO( m_bTransforms );
|
||||
m_bMuteOnError = false;
|
||||
m_sNoteSkin = "";
|
||||
ZERO( m_fMovesX ); ONE( m_SpeedfMovesX );
|
||||
ZERO( m_fMovesY ); ONE( m_SpeedfMovesY );
|
||||
ZERO( m_fMovesZ ); ONE( m_SpeedfMovesZ );
|
||||
|
||||
}
|
||||
|
||||
void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
@@ -110,6 +114,12 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
APPROACH( fSkew );
|
||||
APPROACH( fPassmark );
|
||||
APPROACH( fRandomSpeed );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fMovesX[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fMovesY[i] );
|
||||
for( int i=0; i<16; i++)
|
||||
APPROACH( fMovesZ[i] );
|
||||
|
||||
DO_COPY( m_bSetScrollSpeed );
|
||||
for( int i=0; i<NUM_TURNS; i++ )
|
||||
@@ -226,6 +236,17 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
AddPart( AddTo, m_fEffects[EFFECT_XMODE], "XMode" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_TWIRL], "Twirl" );
|
||||
AddPart( AddTo, m_fEffects[EFFECT_ROLL], "Roll" );
|
||||
|
||||
for( int i=0; i<16; i++)
|
||||
{
|
||||
RString s = ssprintf( "MoveX%d", i+1 );
|
||||
|
||||
AddPart( AddTo, m_fMovesX[i], s );
|
||||
s = ssprintf( "MoveY%d", i+1 );
|
||||
AddPart( AddTo, m_fMovesY[i], s );
|
||||
s = ssprintf( "MoveZ%d", i+1 );
|
||||
AddPart( AddTo, m_fMovesZ[i], s );
|
||||
}
|
||||
|
||||
AddPart( AddTo, m_fAppearances[APPEARANCE_HIDDEN], "Hidden" );
|
||||
AddPart( AddTo, m_fAppearances[APPEARANCE_HIDDEN_OFFSET], "HiddenOffset" );
|
||||
@@ -565,6 +586,20 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
}
|
||||
else if( sBit == "muteonerror" ) m_bMuteOnError = on;
|
||||
else if( sBit == "random" ) ChooseRandomModifiers();
|
||||
|
||||
else if( sBit.find("move") != sBit.npos)
|
||||
{
|
||||
for (int i=0; i<16; i++)
|
||||
{
|
||||
RString s = ssprintf( "movex%d", i+1 );
|
||||
if( sBit == s) SET_FLOAT( fMovesX[i] )
|
||||
s = ssprintf( "movey%d", i+1 );
|
||||
if( sBit == s) SET_FLOAT( fMovesY[i] )
|
||||
s = ssprintf( "movez%d", i+1 );
|
||||
if( sBit == s) SET_FLOAT( fMovesZ[i] )
|
||||
}
|
||||
}
|
||||
|
||||
// deprecated mods/left in for compatibility
|
||||
else if( sBit == "converge" ) SET_FLOAT( fScrolls[SCROLL_CENTERED] )
|
||||
// end of the list
|
||||
@@ -811,6 +846,12 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
||||
COMPARE(m_bTurns[i]);
|
||||
for( int i = 0; i < PlayerOptions::NUM_TRANSFORMS; ++i )
|
||||
COMPARE(m_bTransforms[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fMovesX[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fMovesY[i]);
|
||||
for( int i = 0; i < 16; ++i )
|
||||
COMPARE(m_fMovesZ[i]);
|
||||
#undef COMPARE
|
||||
return true;
|
||||
}
|
||||
@@ -869,6 +910,18 @@ PlayerOptions& PlayerOptions::operator=(PlayerOptions const& other)
|
||||
{
|
||||
CPY(m_bTransforms[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY(m_fMovesX[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY(m_fMovesY[i]);
|
||||
}
|
||||
for( int i = 0; i < 16; ++i )
|
||||
{
|
||||
CPY(m_fMovesZ[i]);
|
||||
}
|
||||
#undef CPY
|
||||
#undef CPY_SPEED
|
||||
return *this;
|
||||
@@ -1144,6 +1197,11 @@ public:
|
||||
FLOAT_INTERFACE(Tilt, PerspectiveTilt, true);
|
||||
FLOAT_INTERFACE(Passmark, Passmark, true); // Passmark is not sanity checked to the [0, 1] range because LifeMeterBar::IsFailing is the only thing that uses it, and it's used in a <= test. Any theme passing a value outside the [0, 1] range probably expects the result they get. -Kyz
|
||||
FLOAT_INTERFACE(RandomSpeed, RandomSpeed, true);
|
||||
|
||||
MULTICOL_FLOAT_INTERFACE(MoveX, MovesX, true);
|
||||
MULTICOL_FLOAT_INTERFACE(MoveY, MovesY, true);
|
||||
MULTICOL_FLOAT_INTERFACE(MoveZ, MovesZ, true);
|
||||
|
||||
BOOL_INTERFACE(TurnNone, Turns[PlayerOptions::TURN_NONE]);
|
||||
BOOL_INTERFACE(Mirror, Turns[PlayerOptions::TURN_MIRROR]);
|
||||
BOOL_INTERFACE(Backwards, Turns[PlayerOptions::TURN_BACKWARDS]);
|
||||
@@ -1567,6 +1625,11 @@ public:
|
||||
ADD_METHOD(NoQuads);
|
||||
ADD_METHOD(NoStretch);
|
||||
ADD_METHOD(MuteOnError);
|
||||
|
||||
ADD_MULTICOL_METHOD(MoveX);
|
||||
ADD_MULTICOL_METHOD(MoveY);
|
||||
ADD_MULTICOL_METHOD(MoveZ);
|
||||
|
||||
|
||||
ADD_METHOD(NoteSkin);
|
||||
ADD_METHOD(FailSetting);
|
||||
|
||||
Reference in New Issue
Block a user