Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add scroll speed factor info for changing scroll speed multiplier in map" #192

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading