diff --git a/osu-framework b/osu-framework index 28fbd0711c..d997b34da4 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 28fbd0711c09d3b06b51fc728b025f83ded2f0f8 +Subproject commit d997b34da4556e4fcfc2de5413ded92c6ee9bec1 diff --git a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs index 83306187bd..61446a31b6 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs @@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Mania.UI // Generate the bar lines double lastObjectTime = (Objects.LastOrDefault() as IHasEndTime)?.EndTime ?? Objects.LastOrDefault()?.StartTime ?? double.MaxValue; - List timingPoints = Beatmap.ControlPointInfo.TimingPoints; + var timingPoints = Beatmap.ControlPointInfo.TimingPoints; var barLines = new List(); for (int i = 0; i < timingPoints.Count; i++) diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index ec1b146328..5449466f2e 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -10,7 +10,6 @@ using System.Linq; using osu.Game.Audio; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; -using osu.Framework.Extensions.IEnumerableExtensions; namespace osu.Game.Rulesets.Osu.Objects { diff --git a/osu.Game.Tests/Beatmaps/Formats/OsuJsonDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/OsuJsonDecoderTest.cs index 8fd7645287..7143550ee2 100644 --- a/osu.Game.Tests/Beatmaps/Formats/OsuJsonDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/OsuJsonDecoderTest.cs @@ -140,19 +140,19 @@ namespace osu.Game.Tests.Beatmaps.Formats } /// - /// Reads a .osu file first with a , serializes the resulting to JSON + /// Reads a .osu file first with a , serializes the resulting to JSON /// and then deserializes the result back into a through an . /// /// The .osu file to decode. - /// The after being decoded by an . + /// The after being decoded by an . private Beatmap decodeAsJson(string filename) => decode(filename).jsonDecoded; /// - /// Reads a .osu file first with a , serializes the resulting to JSON + /// Reads a .osu file first with a , serializes the resulting to JSON /// and then deserializes the result back into a through an . /// /// The .osu file to decode. - /// The after being decoded by an . + /// The after being decoded by an . private (Beatmap legacyDecoded, Beatmap jsonDecoded) decode(string filename) { using (var stream = Resource.OpenResource(filename)) diff --git a/osu.Game.Tests/Visual/TestCaseBeatSyncedContainer.cs b/osu.Game.Tests/Visual/TestCaseBeatSyncedContainer.cs index d99485f3a2..771148827d 100644 --- a/osu.Game.Tests/Visual/TestCaseBeatSyncedContainer.cs +++ b/osu.Game.Tests/Visual/TestCaseBeatSyncedContainer.cs @@ -2,7 +2,6 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Collections.Generic; using osu.Framework.Audio.Track; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; @@ -14,6 +13,7 @@ using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; using osu.Game.Overlays; using OpenTK.Graphics; +using osu.Framework.Lists; namespace osu.Game.Tests.Visual { @@ -137,7 +137,7 @@ namespace osu.Game.Tests.Visual }; } - private List timingPoints => Beatmap.Value.Beatmap.ControlPointInfo.TimingPoints; + private SortedList timingPoints => Beatmap.Value.Beatmap.ControlPointInfo.TimingPoints; private TimingControlPoint getNextTimingPoint(TimingControlPoint current) { if (timingPoints[timingPoints.Count - 1] == current) diff --git a/osu.Game/Audio/SampleInfo.cs b/osu.Game/Audio/SampleInfo.cs index 2cde4e01ad..8242ee14df 100644 --- a/osu.Game/Audio/SampleInfo.cs +++ b/osu.Game/Audio/SampleInfo.cs @@ -2,8 +2,6 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using Newtonsoft.Json; -using osu.Game.Beatmaps.ControlPoints; namespace osu.Game.Audio { diff --git a/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs b/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs index 652ae42979..64b9b837b6 100644 --- a/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs +++ b/osu.Game/Beatmaps/ControlPoints/ControlPointInfo.cs @@ -5,35 +5,36 @@ using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; +using osu.Framework.Lists; namespace osu.Game.Beatmaps.ControlPoints { [Serializable] public class ControlPointInfo { - [JsonProperty] /// /// All timing points. /// - public List TimingPoints { get; private set; } = new List(); - [JsonProperty] + public SortedList TimingPoints { get; private set; } = new SortedList(Comparer.Default); + /// /// All difficulty points. /// - public List DifficultyPoints { get; private set; } = new List(); - [JsonProperty] + public SortedList DifficultyPoints { get; private set; } = new SortedList(Comparer.Default); + /// /// All sound points. /// - public List SoundPoints { get; private set; } = new List(); - [JsonProperty] + public SortedList SoundPoints { get; private set; } = new SortedList(Comparer.Default); + /// /// All effect points. /// - public List EffectPoints { get; private set; } = new List(); + [JsonProperty] + public SortedList EffectPoints { get; private set; } = new SortedList(Comparer.Default); /// /// Finds the difficulty control point that is active at . @@ -91,7 +92,7 @@ namespace osu.Game.Beatmaps.ControlPoints /// The time to find the control point at. /// The control point to use when is before any control points. If null, a new control point will be constructed. /// The active control point at . - private T binarySearch(List list, double time, T prePoint = null) + private T binarySearch(SortedList list, double time, T prePoint = null) where T : ControlPoint, new() { if (list == null)