Skip to content

Commit

Permalink
Merge pull request #192 from Quaver/revert-170-scroll-speed-factor
Browse files Browse the repository at this point in the history
Revert "Add scroll speed factor info for changing scroll speed multiplier in map"
  • Loading branch information
Swan authored Nov 5, 2024
2 parents 6f69d51 + e557e09 commit 75f221f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 149 deletions.
17 changes: 0 additions & 17 deletions Quaver.API/Helpers/MathHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,5 @@ public static T Clamp<T>(this T val, T min, T max) where T : IComparable<T>
if (val.CompareTo(min) < 0) return min;
return val.CompareTo(max) > 0 ? max : val;
}

/// <summary>
/// Mirrors the first <see cref="bits"/> bits of <see cref="x"/>.
/// https://stackoverflow.com/a/4245986/23723435
/// </summary>
/// <param name="x"></param>
/// <param name="bits"></param>
/// <returns></returns>
public static uint Reverse(uint x, int bits)
{
x = ((x & 0x55555555) << 1) | ((x & 0xAAAAAAAA) >> 1); // Swap _<>_
x = ((x & 0x33333333) << 2) | ((x & 0xCCCCCCCC) >> 2); // Swap __<>__
x = ((x & 0x0F0F0F0F) << 4) | ((x & 0xF0F0F0F0) >> 4); // Swap ____<>____
x = ((x & 0x00FF00FF) << 8) | ((x & 0xFF00FF00) >> 8); // Swap ...
x = ((x & 0x0000FFFF) << 16) | ((x & 0xFFFF0000) >> 16); // Swap ...
return x >> (32 - bits);
}
}
}
18 changes: 0 additions & 18 deletions Quaver.API/Maps/Qua.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ public List<SliderVelocityInfo> SliderVelocities
private set => DefaultScrollGroup.ScrollVelocities = value;
}

/// <summary>
/// Scroll Speed Factor .qua data
/// </summary>
public List<ScrollSpeedFactorInfo> ScrollSpeedFactors { get; private set; } = new List<ScrollSpeedFactorInfo>();

/// <summary>
/// HitObject .qua data
/// </summary>
Expand Down Expand Up @@ -263,7 +258,6 @@ public bool EqualByValue(Qua other) =>
Genre == other.Genre &&
TimingPoints.SequenceEqual(other.TimingPoints, TimingPointInfo.ByValueComparer) &&
SliderVelocities.SequenceEqual(other.SliderVelocities, SliderVelocityInfo.ByValueComparer) &&
ScrollSpeedFactors.SequenceEqual(other.ScrollSpeedFactors, ScrollSpeedFactorInfo.ByValueComparer) &&
InitialScrollVelocity == other.InitialScrollVelocity &&
CompareTimingGroups(other.TimingGroups) &&
BPMDoesNotAffectScrollVelocity == other.BPMDoesNotAffectScrollVelocity &&
Expand Down Expand Up @@ -495,7 +489,6 @@ public void Sort()
SortSoundEffects();
SortTimingPoints();
SortSliderVelocities();
SortScrollSpeedFactors();
}

/// <summary>
Expand Down Expand Up @@ -637,13 +630,6 @@ public TimingPointInfo GetTimingPointAt(double time)
public SliderVelocityInfo GetScrollVelocityAt(double time, string timingGroupId = DefaultScrollGroupId) =>
((ScrollGroup)TimingGroups[timingGroupId]).GetScrollVelocityAt(time);

/// <summary>
/// Gets a scroll velocity at a particular time in the map
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public ScrollSpeedFactorInfo GetScrollSpeedFactorAt(double time) => ScrollSpeedFactors.AtTime((float)time);

/// <summary>
/// Finds the length of a timing point.
/// </summary>
Expand Down Expand Up @@ -1033,10 +1019,6 @@ public void MirrorHitObjects()
/// </summary>
public void SortBookmarks() => Bookmarks.HybridSort();

/// <summary>
/// </summary>
public void SortScrollSpeedFactors() => ScrollSpeedFactors.HybridSort();

/// <summary>
/// </summary>
public void SortHitObjects() => HitObjects.HybridSort();
Expand Down
114 changes: 0 additions & 114 deletions Quaver.API/Maps/Structures/ScrollSpeedFactorInfo.cs

This file was deleted.

0 comments on commit 75f221f

Please sign in to comment.