Holds to rolls modifier
This commit is contained in:
@@ -857,6 +857,22 @@ void NoteDataUtil::ChangeRollsToHolds( NoteData &in, int iStartIndex, int iEndIn
|
||||
}
|
||||
}
|
||||
|
||||
void NoteDataUtil::ChangeHoldsToRolls( NoteData &in, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
for( int t=0; t<in.GetNumTracks(); ++t )
|
||||
{
|
||||
NoteData::iterator begin, end;
|
||||
in.GetTapNoteRangeInclusive( t, iStartIndex, iEndIndex, begin, end );
|
||||
for( ; begin != end; ++begin )
|
||||
{
|
||||
if( begin->second.type != TapNote::hold_head ||
|
||||
begin->second.subType != TapNote::hold_head_hold )
|
||||
continue;
|
||||
begin->second.subType = TapNote::hold_head_roll;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NoteDataUtil::RemoveSimultaneousNotes( NoteData &in, int iMaxSimultaneous, int iStartIndex, int iEndIndex )
|
||||
{
|
||||
// Remove tap and hold notes so no more than iMaxSimultaneous buttons are being held at any
|
||||
@@ -1979,6 +1995,9 @@ void NoteDataUtil::TransformNoteData( NoteData &nd, const PlayerOptions &po, Ste
|
||||
if( po.m_bTransforms[PlayerOptions::TRANSFORM_FLOORED] ) NoteDataUtil::Floored( nd, iStartIndex, iEndIndex );
|
||||
if( po.m_bTransforms[PlayerOptions::TRANSFORM_TWISTER] ) NoteDataUtil::Twister( nd, iStartIndex, iEndIndex );
|
||||
|
||||
// Do this here to turn any added holds into rolls
|
||||
if( po.m_bTransforms[PlayerOptions::TRANSFORM_HOLDROLLS] ) NoteDataUtil::ChangeHoldsToRolls( ns, iStartIndex, iEndIndex );
|
||||
|
||||
// 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_LEFT] ) NoteDataUtil::Turn( nd, st, NoteDataUtil::left, iStartIndex, iEndIndex );
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace NoteDataUtil
|
||||
|
||||
void RemoveHoldNotes( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||
void ChangeRollsToHolds( NoteData &in, int iStartIndex, int iEndIndex );
|
||||
void ChangeHoldsToRolls( NoteData &in, int iStartIndex, int iEndIndex );
|
||||
void RemoveSimultaneousNotes( NoteData &inout, int iMaxSimultaneous, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||
void RemoveJumps( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||
void RemoveHands( NoteData &inout, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW );
|
||||
|
||||
@@ -188,6 +188,7 @@ void PlayerOptions::GetMods( vector<RString> &AddTo, bool bForceNoteSkin ) const
|
||||
if( m_bTransforms[TRANSFORM_PLANTED] ) AddTo.push_back( "Planted" );
|
||||
if( m_bTransforms[TRANSFORM_FLOORED] ) AddTo.push_back( "Floored" );
|
||||
if( m_bTransforms[TRANSFORM_TWISTER] ) AddTo.push_back( "Twister" );
|
||||
if( m_bTransforms[TRANSFORM_HOLDROLLS] ) AddTo.push_back( "HoldsToRolls" );
|
||||
if( m_bTransforms[TRANSFORM_NOJUMPS] ) AddTo.push_back( "NoJumps" );
|
||||
if( m_bTransforms[TRANSFORM_NOHANDS] ) AddTo.push_back( "NoHands" );
|
||||
if( m_bTransforms[TRANSFORM_NOQUADS] ) AddTo.push_back( "NoQuads" );
|
||||
@@ -356,6 +357,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
|
||||
else if( sBit == "planted" ) m_bTransforms[TRANSFORM_PLANTED] = on;
|
||||
else if( sBit == "floored" ) m_bTransforms[TRANSFORM_FLOORED] = on;
|
||||
else if( sBit == "twister" ) m_bTransforms[TRANSFORM_TWISTER] = on;
|
||||
else if( sBit == "holdrolls" ) m_bTransforms[TRANSFORM_HOLDROLLS] = on;
|
||||
else if( sBit == "nojumps" ) m_bTransforms[TRANSFORM_NOJUMPS] = on;
|
||||
else if( sBit == "nohands" ) m_bTransforms[TRANSFORM_NOHANDS] = on;
|
||||
else if( sBit == "noquads" ) m_bTransforms[TRANSFORM_NOQUADS] = on;
|
||||
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
TRANSFORM_PLANTED,
|
||||
TRANSFORM_FLOORED,
|
||||
TRANSFORM_TWISTER,
|
||||
TRANSFORM_HOLDROLLS,
|
||||
TRANSFORM_NOJUMPS,
|
||||
TRANSFORM_NOHANDS,
|
||||
TRANSFORM_NOQUADS,
|
||||
|
||||
Reference in New Issue
Block a user