From 4da30c6940a279b45ea4dd86ecf781793fb54618 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 19:05:30 +0900 Subject: [PATCH 01/36] Fix missing conversion case --- .../Patterns/Legacy/DistanceObjectPatternGenerator.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs index a102781e70..29b8aaa51b 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs @@ -396,13 +396,15 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy // Create the hold note addToPattern(pattern, holdColumn, startTime, endTime); - int noteCount = 1; + int noteCount; if (ConversionDifficulty > 6.5) noteCount = GetRandomNoteCount(0.63, 0); else if (ConversionDifficulty > 4) noteCount = GetRandomNoteCount(TotalColumns < 6 ? 0.12 : 0.45, 0); else if (ConversionDifficulty > 2.5) noteCount = GetRandomNoteCount(TotalColumns < 6 ? 0 : 0.24, 0); + else + noteCount = 0; noteCount = Math.Min(TotalColumns - 1, noteCount); bool ignoreHead = !sampleInfoListAt(startTime).Any(s => s.Name == SampleInfo.HIT_WHISTLE || s.Name == SampleInfo.HIT_FINISH || s.Name == SampleInfo.HIT_CLAP); From 2bd58e54213e89088fba3754feb8b0b9c2814c58 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 19:06:43 +0900 Subject: [PATCH 02/36] Re-order RNG call to match osu-stable --- .../Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs index 29b8aaa51b..ce2c679bf3 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs @@ -396,6 +396,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy // Create the hold note addToPattern(pattern, holdColumn, startTime, endTime); + int nextColumn = Random.Next(RandomStart, TotalColumns); int noteCount; if (ConversionDifficulty > 6.5) noteCount = GetRandomNoteCount(0.63, 0); @@ -408,7 +409,6 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy noteCount = Math.Min(TotalColumns - 1, noteCount); bool ignoreHead = !sampleInfoListAt(startTime).Any(s => s.Name == SampleInfo.HIT_WHISTLE || s.Name == SampleInfo.HIT_FINISH || s.Name == SampleInfo.HIT_CLAP); - int nextColumn = Random.Next(RandomStart, TotalColumns); var rowPattern = new Pattern(); for (int i = 0; i <= spanCount; i++) From dfeee79a249a2b4c9df4abefd562d92314ac96e3 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 19:35:35 +0900 Subject: [PATCH 03/36] Fix incorrect probability --- .../Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs index c4ef23a982..98d79d3f5c 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs @@ -356,7 +356,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy break; case 3: centreProbability = Math.Max(centreProbability, 0.03); - p2 = Math.Max(p2, 0.1); + p2 = 0; p3 = 0; break; case 4: From 675c7d0dfd301bcb2b8500541cb3f21c0d5777d0 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 19:35:57 +0900 Subject: [PATCH 04/36] Invert Max/Mins --- .../Legacy/DistanceObjectPatternGenerator.cs | 12 +++++------ .../Legacy/HitObjectPatternGenerator.cs | 20 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs index ce2c679bf3..c7d7fc9a07 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs @@ -305,19 +305,19 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy p4 = 0; break; case 3: - p2 = Math.Max(p2, 0.1); + p2 = Math.Min(p2, 0.1); p3 = 0; p4 = 0; break; case 4: - p2 = Math.Max(p2, 0.3); - p3 = Math.Max(p3, 0.04); + p2 = Math.Min(p2, 0.3); + p3 = Math.Min(p3, 0.04); p4 = 0; break; case 5: - p2 = Math.Max(p2, 0.34); - p3 = Math.Max(p3, 0.1); - p4 = Math.Max(p4, 0.03); + p2 = Math.Min(p2, 0.34); + p3 = Math.Min(p3, 0.1); + p4 = Math.Min(p4, 0.03); break; } diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs index 98d79d3f5c..c2ec4d9645 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs @@ -308,20 +308,20 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy p5 = 0; break; case 3: - p2 = Math.Max(p2, 0.1); + p2 = Math.Min(p2, 0.1); p3 = 0; p4 = 0; p5 = 0; break; case 4: - p2 = Math.Max(p2, 0.23); - p3 = Math.Max(p3, 0.04); + p2 = Math.Min(p2, 0.23); + p3 = Math.Min(p3, 0.04); p4 = 0; p5 = 0; break; case 5: - p3 = Math.Max(p3, 0.15); - p4 = Math.Max(p4, 0.03); + p3 = Math.Min(p3, 0.15); + p4 = Math.Min(p4, 0.03); p5 = 0; break; } @@ -355,23 +355,23 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy p3 = 0; break; case 3: - centreProbability = Math.Max(centreProbability, 0.03); + centreProbability = Math.Min(centreProbability, 0.03); p2 = 0; p3 = 0; break; case 4: centreProbability = 0; - p2 = Math.Max(p2 * 2, 0.2); + p2 = Math.Min(p2 * 2, 0.2); p3 = 0; break; case 5: - centreProbability = Math.Max(centreProbability, 0.03); + centreProbability = Math.Min(centreProbability, 0.03); p3 = 0; break; case 6: centreProbability = 0; - p2 = Math.Max(p2 * 2, 0.5); - p3 = Math.Max(p3 * 2, 0.15); + p2 = Math.Min(p2 * 2, 0.5); + p3 = Math.Min(p3 * 2, 0.15); break; } From 356d353cead3f2568bba01f68a2fcd3ba72d11ce Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 20:14:06 +0900 Subject: [PATCH 05/36] Fix ConversionDifficulty never actually being calculated --- .../Beatmaps/ManiaBeatmapConverter.cs | 15 +++++------ .../Legacy/DistanceObjectPatternGenerator.cs | 5 ++-- .../Legacy/EndTimeObjectPatternGenerator.cs | 5 ++-- .../Legacy/HitObjectPatternGenerator.cs | 5 ++-- .../Patterns/Legacy/PatternGenerator.cs | 27 ++++++++++++------- 5 files changed, 34 insertions(+), 23 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs index 9922d4c8ad..595027f3ca 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs @@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps yield break; } - var objects = IsForCurrentRuleset ? generateSpecific(original) : generateConverted(original); + var objects = IsForCurrentRuleset ? generateSpecific(original) : generateConverted(original, beatmap); if (objects == null) yield break; @@ -125,26 +125,25 @@ namespace osu.Game.Rulesets.Mania.Beatmaps /// Method that generates hit objects for non-osu!mania beatmaps. /// /// The original hit object. + /// The original beatmap. This is used /// The hit objects generated. - private IEnumerable generateConverted(HitObject original) + private IEnumerable generateConverted(HitObject original, Beatmap originalBeatmap) { var endTimeData = original as IHasEndTime; var distanceData = original as IHasDistance; var positionData = original as IHasPosition; - // Following lines currently commented out to appease resharper - Patterns.PatternGenerator conversion = null; if (distanceData != null) - conversion = new DistanceObjectPatternGenerator(random, original, beatmap, lastPattern); + conversion = new DistanceObjectPatternGenerator(random, original, beatmap, lastPattern, originalBeatmap); else if (endTimeData != null) - conversion = new EndTimeObjectPatternGenerator(random, original, beatmap); + conversion = new EndTimeObjectPatternGenerator(random, original, beatmap, originalBeatmap); else if (positionData != null) { computeDensity(original.StartTime); - conversion = new HitObjectPatternGenerator(random, original, beatmap, lastPattern, lastTime, lastPosition, density, lastStair); + conversion = new HitObjectPatternGenerator(random, original, beatmap, lastPattern, lastTime, lastPosition, density, lastStair, originalBeatmap); recordNote(original.StartTime, positionData.Position); } @@ -167,7 +166,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps private class SpecificBeatmapPatternGenerator : Patterns.Legacy.PatternGenerator { public SpecificBeatmapPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern) - : base(random, hitObject, beatmap, previousPattern) + : base(random, hitObject, beatmap, previousPattern, null) { } diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs index c7d7fc9a07..a3d784b28a 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using osu.Game.Audio; +using osu.Game.Beatmaps; using osu.Game.Rulesets.Mania.MathUtils; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Types; @@ -29,8 +30,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy private PatternType convertType; - public DistanceObjectPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern) - : base(random, hitObject, beatmap, previousPattern) + public DistanceObjectPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern, Beatmap originalBeatmap) + : base(random, hitObject, beatmap, previousPattern, originalBeatmap) { convertType = PatternType.None; if (Beatmap.ControlPointInfo.EffectPointAt(hitObject.StartTime).KiaiMode) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/EndTimeObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/EndTimeObjectPatternGenerator.cs index 278a4c4aab..ffbabba75a 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/EndTimeObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/EndTimeObjectPatternGenerator.cs @@ -7,6 +7,7 @@ using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Types; using System.Linq; using osu.Game.Audio; +using osu.Game.Beatmaps; using osu.Game.Rulesets.Mania.Objects; namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy @@ -15,8 +16,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy { private readonly double endTime; - public EndTimeObjectPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap) - : base(random, hitObject, beatmap, new Pattern()) + public EndTimeObjectPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Beatmap originalBeatmap) + : base(random, hitObject, beatmap, new Pattern(), originalBeatmap) { var endtimeData = HitObject as IHasEndTime; diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs index c2ec4d9645..e126534c54 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitObjectPatternGenerator.cs @@ -5,6 +5,7 @@ using System; using System.Linq; using OpenTK; using osu.Game.Audio; +using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Rulesets.Mania.MathUtils; using osu.Game.Rulesets.Mania.Objects; @@ -19,8 +20,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy private readonly PatternType convertType; - public HitObjectPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern, double previousTime, Vector2 previousPosition, double density, PatternType lastStair) - : base(random, hitObject, beatmap, previousPattern) + public HitObjectPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern, double previousTime, Vector2 previousPosition, double density, PatternType lastStair, Beatmap originalBeatmap) + : base(random, hitObject, beatmap, previousPattern, originalBeatmap) { if (previousTime > hitObject.StartTime) throw new ArgumentOutOfRangeException(nameof(previousTime)); if (density < 0) throw new ArgumentOutOfRangeException(nameof(density)); diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/PatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/PatternGenerator.cs index 5f98749f0c..501950cdcd 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/PatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/PatternGenerator.cs @@ -25,14 +25,20 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy /// protected readonly FastRandom Random; - protected PatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern) + /// + /// The beatmap which is being converted from. + /// + protected readonly Beatmap OriginalBeatmap; + + protected PatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern, Beatmap originalBeatmap) : base(hitObject, beatmap, previousPattern) { if (random == null) throw new ArgumentNullException(nameof(random)); - if (beatmap == null) throw new ArgumentNullException(nameof(beatmap)); - if (previousPattern == null) throw new ArgumentNullException(nameof(previousPattern)); + if (originalBeatmap == null) throw new ArgumentNullException(nameof(originalBeatmap)); Random = random; + OriginalBeatmap = originalBeatmap; + RandomStart = TotalColumns == 8 ? 1 : 0; } @@ -94,17 +100,20 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy if (conversionDifficulty != null) return conversionDifficulty.Value; - HitObject lastObject = Beatmap.HitObjects.LastOrDefault(); - HitObject firstObject = Beatmap.HitObjects.FirstOrDefault(); + HitObject lastObject = OriginalBeatmap.HitObjects.LastOrDefault(); + HitObject firstObject = OriginalBeatmap.HitObjects.FirstOrDefault(); double drainTime = (lastObject?.StartTime ?? 0) - (firstObject?.StartTime ?? 0); - drainTime -= Beatmap.TotalBreakTime; + drainTime -= OriginalBeatmap.TotalBreakTime; if (drainTime == 0) - drainTime = 10000; + drainTime = 10000000; - BeatmapDifficulty difficulty = Beatmap.BeatmapInfo.BaseDifficulty; - conversionDifficulty = ((difficulty.DrainRate + MathHelper.Clamp(difficulty.ApproachRate, 4, 7)) / 1.5 + Beatmap.HitObjects.Count / drainTime * 9f) / 38f * 5f / 1.15; + // We need this in seconds + drainTime /= 1000; + + BeatmapDifficulty difficulty = OriginalBeatmap.BeatmapInfo.BaseDifficulty; + conversionDifficulty = ((difficulty.DrainRate + MathHelper.Clamp(difficulty.ApproachRate, 4, 7)) / 1.5 + OriginalBeatmap.HitObjects.Count / drainTime * 9f) / 38f * 5f / 1.15; conversionDifficulty = Math.Min(conversionDifficulty.Value, 12); return conversionDifficulty.Value; From 4be478d38eccc878596b46771ba78ca90fd8671c Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 20:14:34 +0900 Subject: [PATCH 06/36] Fix LowProbability conversions happening during kiai time --- .../Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs index a3d784b28a..28cf119833 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/DistanceObjectPatternGenerator.cs @@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy : base(random, hitObject, beatmap, previousPattern, originalBeatmap) { convertType = PatternType.None; - if (Beatmap.ControlPointInfo.EffectPointAt(hitObject.StartTime).KiaiMode) + if (!Beatmap.ControlPointInfo.EffectPointAt(hitObject.StartTime).KiaiMode) convertType = PatternType.LowProbability; var distanceData = hitObject as IHasDistance; From 27a510aad8bf7715e59a29cb2df4c351787f4cfb Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 20:16:11 +0900 Subject: [PATCH 07/36] The endtime-object pattern is never checked against --- osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs index 595027f3ca..2dd3468df0 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs @@ -152,10 +152,9 @@ namespace osu.Game.Rulesets.Mania.Beatmaps return null; Pattern newPattern = conversion.Generate(); - lastPattern = newPattern; - var stairPatternGenerator = conversion as HitObjectPatternGenerator; - lastStair = stairPatternGenerator?.StairType ?? lastStair; + lastPattern = conversion is EndTimeObjectPatternGenerator ? lastPattern : newPattern; + lastStair = (conversion as HitObjectPatternGenerator)?.StairType ?? lastStair; return newPattern.HitObjects; } From 02265ad686625583982e19142bcd4f82ae31955b Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 5 Mar 2018 20:16:54 +0900 Subject: [PATCH 08/36] Enable mania's basic conversion testcase --- osu.Game.Rulesets.Mania/Tests/ManiaBeatmapConversionTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/Tests/ManiaBeatmapConversionTest.cs b/osu.Game.Rulesets.Mania/Tests/ManiaBeatmapConversionTest.cs index 2095addc72..9d55ab643d 100644 --- a/osu.Game.Rulesets.Mania/Tests/ManiaBeatmapConversionTest.cs +++ b/osu.Game.Rulesets.Mania/Tests/ManiaBeatmapConversionTest.cs @@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Mania.Tests private bool isForCurrentRuleset; [NonParallelizable] - [TestCase("basic", false), Ignore("See: https://github.com/ppy/osu/issues/2150")] + [TestCase("basic", false)] public void Test(string name, bool isForCurrentRuleset) { this.isForCurrentRuleset = isForCurrentRuleset; From bd952ce370453f7e63ae18153dc56f9098db5c7e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Mar 2018 18:20:20 +0900 Subject: [PATCH 09/36] Allow skinnable drawables to be of non-restricted size --- osu.Game/Skinning/LegacySkin.cs | 10 +++------ osu.Game/Skinning/SkinnableDrawable.cs | 29 ++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index 17fe6369a7..f03d1ce632 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -32,12 +32,7 @@ namespace osu.Game.Skinning var texture = textures.Get(componentName); if (texture == null) return null; - return new Sprite - { - RelativeSizeAxes = Axes.Both, - FillMode = FillMode.Fit, - Texture = texture, - }; + return new Sprite { Texture = texture }; } public override SampleChannel GetSample(string sampleName) => samples.Get(sampleName); @@ -48,7 +43,8 @@ namespace osu.Game.Skinning private readonly IResourceStore underlyingStore; private string getPathForFile(string filename) => - skin.Files.FirstOrDefault(f => string.Equals(Path.GetFileNameWithoutExtension(f.Filename), filename.Split('/').Last(), StringComparison.InvariantCultureIgnoreCase))?.FileInfo.StoragePath; + skin.Files.FirstOrDefault(f => string.Equals(Path.GetFileNameWithoutExtension(f.Filename), filename.Split('/').Last(), StringComparison.InvariantCultureIgnoreCase))?.FileInfo + .StoragePath; public LegacySkinResourceStore(SkinInfo skin, IResourceStore underlyingStore) { diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs index cd669778a6..a5f22f60a2 100644 --- a/osu.Game/Skinning/SkinnableDrawable.cs +++ b/osu.Game/Skinning/SkinnableDrawable.cs @@ -3,13 +3,14 @@ using System; using osu.Framework.Graphics; +using OpenTK; namespace osu.Game.Skinning { public class SkinnableDrawable : SkinnableDrawable { - public SkinnableDrawable(string name, Func defaultImplementation, bool fallback = true) - : base(name, defaultImplementation, fallback) + public SkinnableDrawable(string name, Func defaultImplementation, bool fallback = true, bool restrictSize = true) + : base(name, defaultImplementation, fallback, restrictSize) { } } @@ -21,10 +22,16 @@ namespace osu.Game.Skinning private readonly string componentName; - public SkinnableDrawable(string name, Func defaultImplementation, bool fallback = true) : base(fallback) + /// + /// Whether a user-skin drawable should be limited to the size of our parent. + /// + public readonly bool RestrictSize; + + public SkinnableDrawable(string name, Func defaultImplementation, bool fallback = true, bool restrictSize = true) : base(fallback) { componentName = name; createDefault = defaultImplementation; + RestrictSize = restrictSize; RelativeSizeAxes = Axes.Both; } @@ -32,11 +39,25 @@ namespace osu.Game.Skinning protected override void SkinChanged(Skin skin, bool allowFallback) { var drawable = skin.GetDrawableComponent(componentName); - if (drawable == null && allowFallback) + if (drawable != null) + { + if (RestrictSize) + { + drawable.RelativeSizeAxes = Axes.Both; + drawable.Size = Vector2.One; + drawable.FillMode = FillMode.Fit; + } + } + else if (allowFallback) drawable = createDefault(componentName); if (drawable != null) + { + drawable.Origin = Anchor.Centre; + drawable.Anchor = Anchor.Centre; + InternalChild = drawable; + } else ClearInternal(); } From 05eb6786548780dd2231f24c466ba84411de1fa2 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Mar 2018 18:20:35 +0900 Subject: [PATCH 10/36] Add skin support for judgements --- .../Objects/Drawables/DrawableOsuJudgement.cs | 2 +- .../Rulesets/Judgements/DrawableJudgement.cs | 42 ++++++++++++------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs index 716f4b629b..6d6cae9ca5 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs @@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables protected override void LoadComplete() { if (Judgement.Result != HitResult.Miss) - JudgementText.TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint); + JudgementText?.TransformSpacingTo(new Vector2(14, 0), 1800, Easing.OutQuint); base.LoadComplete(); } diff --git a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs index c1bf55b214..4664517312 100644 --- a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs +++ b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs @@ -10,6 +10,8 @@ using osu.Framework.Graphics.Sprites; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Rulesets.Scoring; +using osu.Game.Skinning; +using OpenTK.Graphics; namespace osu.Game.Rulesets.Judgements { @@ -18,9 +20,11 @@ namespace osu.Game.Rulesets.Judgements /// public class DrawableJudgement : Container { + private const float judgement_size = 80; + protected readonly Judgement Judgement; - protected readonly SpriteText JudgementText; + protected SpriteText JudgementText; /// /// Creates a drawable which visualises a . @@ -30,31 +34,37 @@ namespace osu.Game.Rulesets.Judgements { Judgement = judgement; - AutoSizeAxes = Axes.Both; - - Children = new[] - { - JudgementText = new OsuSpriteText - { - Origin = Anchor.Centre, - Anchor = Anchor.Centre, - Text = judgement.Result.GetDescription().ToUpper(), - Font = @"Venera", - Scale = new Vector2(0.85f, 1), - TextSize = 12 - } - }; + Size = new Vector2(judgement_size); } [BackgroundDependencyLoader] private void load(OsuColour colours) { + string legacyName = string.Empty; switch (Judgement.Result) { case HitResult.Miss: - Colour = colours.Red; + legacyName = "hit0"; + break; + case HitResult.Meh: + legacyName = "hit50"; + break; + case HitResult.Good: + legacyName = "hit100"; + break; + case HitResult.Great: + legacyName = "hit300"; break; } + + Child = new SkinnableDrawable($"Play/osu/{legacyName}", _ => JudgementText = new OsuSpriteText + { + Text = Judgement.Result.GetDescription().ToUpper(), + Font = @"Venera", + Colour = Judgement.Result == HitResult.Miss ? colours.Red : Color4.White, + Scale = new Vector2(0.85f, 1), + TextSize = 12 + }, restrictSize: false); } protected override void LoadComplete() From f2d7621df3a05a662819a4c83c7c5a598f6cff0f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Mar 2018 18:20:52 +0900 Subject: [PATCH 11/36] Add skin support for explode/flash layers Basically to hide them for legacy skins, though. --- .../Objects/Drawables/Pieces/ExplodePiece.cs | 14 ++++++-------- .../Objects/Drawables/Pieces/FlashPiece.cs | 12 ++++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/ExplodePiece.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/ExplodePiece.cs index 9be951e29c..76ed89be67 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/ExplodePiece.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/ExplodePiece.cs @@ -3,6 +3,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Game.Skinning; using OpenTK; namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces @@ -19,15 +20,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces Blending = BlendingMode.Additive; Alpha = 0; - Children = new Drawable[] + Child = new SkinnableDrawable("Play/osu/hitcircle-explode", _ => new TrianglesPiece { - new TrianglesPiece - { - Blending = BlendingMode.Additive, - RelativeSizeAxes = Axes.Both, - Alpha = 0.2f, - } - }; + Blending = BlendingMode.Additive, + RelativeSizeAxes = Axes.Both, + Alpha = 0.2f, + }, false); } } } diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/FlashPiece.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/FlashPiece.cs index 56faa335b1..921d24f69d 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/FlashPiece.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/FlashPiece.cs @@ -5,6 +5,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using OpenTK; using osu.Framework.Graphics.Shapes; +using osu.Game.Skinning; namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces { @@ -14,22 +15,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces { Size = new Vector2(128); - Masking = true; - CornerRadius = Size.X / 2; - Anchor = Anchor.Centre; Origin = Anchor.Centre; Blending = BlendingMode.Additive; Alpha = 0; - Children = new Drawable[] + Child = new SkinnableDrawable("Play/osu/hitcircle-flash", name => new CircularContainer { - new Box + Masking = true, + RelativeSizeAxes = Axes.Both, + Child = new Box { RelativeSizeAxes = Axes.Both } - }; + }, false); } } } From fe3ab94afbfc84665e28fa8df731a507d6a3656c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 7 Mar 2018 19:19:56 +0900 Subject: [PATCH 12/36] Fix mania judgement regression --- osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs b/osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs index 8a03f5a785..ab3c5bcbb8 100644 --- a/osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs +++ b/osu.Game.Rulesets.Mania/UI/DrawableManiaJudgement.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Rulesets.Judgements; @@ -11,7 +12,13 @@ namespace osu.Game.Rulesets.Mania.UI public DrawableManiaJudgement(Judgement judgement) : base(judgement) { - JudgementText.TextSize = 25; + } + + [BackgroundDependencyLoader] + private void load() + { + if (JudgementText != null) + JudgementText.TextSize = 25; } protected override void LoadComplete() From 3b766b8ec869c7503ea79c130c09a4608d58785d Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 9 Mar 2018 23:11:48 +0900 Subject: [PATCH 13/36] Make CaptureBox account for changes in hitobject states --- osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs index 269dd79bf7..6702678448 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs @@ -42,6 +42,13 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection private void load(OsuColour colours) { BorderColour = colours.Yellow; + } + + protected override void Update() + { + base.Update(); + + // Todo: We might need to optimise this // Move the rectangle to cover the hitobjects var topLeft = new Vector2(float.MaxValue, float.MaxValue); From 4a48136e4f558ca4cba581534de4c256be5e434b Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 9 Mar 2018 23:12:34 +0900 Subject: [PATCH 14/36] Make hitobject positions adjustable --- .../Selection/Overlays/HitCircleOverlay.cs | 2 ++ .../Selection/Overlays/SliderOverlay.cs | 11 +++++---- .../Objects/Drawables/DrawableHitCircle.cs | 2 ++ .../Objects/Drawables/DrawableSlider.cs | 6 +++-- .../Objects/Drawables/DrawableSliderHead.cs | 14 +++++++++++ .../Objects/Drawables/DrawableSliderTail.cs | 4 +++- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 24 +++++++++++++++++-- osu.Game.Rulesets.Osu/Objects/Slider.cs | 4 ++-- osu.Game.Rulesets.Osu/Objects/SliderCircle.cs | 19 +++++++++++++++ .../osu.Game.Rulesets.Osu.csproj | 2 ++ .../Edit/Layers/Selection/HitObjectOverlay.cs | 18 ++++++++++++++ .../Edit/Types/IHasEditablePosition.cs | 12 ++++++++++ osu.Game/osu.Game.csproj | 1 + 13 files changed, 108 insertions(+), 11 deletions(-) create mode 100644 osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderHead.cs create mode 100644 osu.Game.Rulesets.Osu/Objects/SliderCircle.cs create mode 100644 osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs index 4e64783840..ea5104af18 100644 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs @@ -22,6 +22,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays Scale = hitCircle.Scale; AddInternal(new RingPiece()); + + hitCircle.HitObject.PositionChanged += _ => Position = hitCircle.Position; } [BackgroundDependencyLoader] diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs index a035a683e9..f63d8f0c62 100644 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs @@ -22,18 +22,22 @@ namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays { this.slider = slider; - var obj = (Slider)slider.HitObject; + Position = slider.Position; + + var sliderObject = (Slider)slider.HitObject; InternalChildren = new Drawable[] { - body = new SliderBody(obj) + body = new SliderBody(sliderObject) { AccentColour = Color4.Transparent, - PathWidth = obj.Scale * 64 + PathWidth = sliderObject.Scale * 64 }, new SliderCircleOverlay(slider.HeadCircle, slider), new SliderCircleOverlay(slider.TailCircle, slider), }; + + sliderObject.PositionChanged += _ => Position = slider.Position; } [BackgroundDependencyLoader] @@ -46,7 +50,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays { base.Update(); - Position = slider.Position; Size = slider.Size; OriginPosition = slider.OriginPosition; diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs index 959c87bbba..d70b26e181 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableHitCircle.cs @@ -66,6 +66,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables //may not be so correct Size = circle.DrawSize; + + HitObject.PositionChanged += _ => Position = HitObject.StackedPosition; } protected override void CheckForJudgements(bool userTriggered, double timeOffset) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index f715ed075c..3fa047a780 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -55,8 +55,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables AlwaysPresent = true, Alpha = 0 }, - HeadCircle = new DrawableHitCircle(s.HeadCircle) { Position = s.TailCircle.Position - s.Position }, - TailCircle = new DrawableSliderTail(s.TailCircle) { Position = s.TailCircle.Position - s.Position } + HeadCircle = new DrawableSliderHead(s, s.HeadCircle), + TailCircle = new DrawableSliderTail(s, s.TailCircle) }; components.Add(Body); @@ -84,6 +84,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables components.Add(drawableRepeatPoint); AddNested(drawableRepeatPoint); } + + HitObject.PositionChanged += _ => Position = HitObject.StackedPosition; } [BackgroundDependencyLoader] diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderHead.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderHead.cs new file mode 100644 index 0000000000..dd31790ee0 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderHead.cs @@ -0,0 +1,14 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Rulesets.Osu.Objects.Drawables +{ + public class DrawableSliderHead : DrawableHitCircle + { + public DrawableSliderHead(Slider slider, HitCircle h) + : base(h) + { + Position = HitObject.Position - slider.Position; + } + } +} diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs index b907aea8c3..b277e7df7a 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTail.cs @@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables public bool Tracking { get; set; } - public DrawableSliderTail(HitCircle hitCircle) + public DrawableSliderTail(Slider slider, HitCircle hitCircle) : base(hitCircle) { Origin = Anchor.Centre; @@ -25,6 +25,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables FillMode = FillMode.Fit; AlwaysPresent = true; + + Position = HitObject.Position - slider.Position; } protected override void CheckForJudgements(bool userTriggered, double timeOffset) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index 9b9d88f0f6..93eaf70589 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -1,23 +1,41 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; using osu.Game.Beatmaps; using osu.Game.Rulesets.Objects; using OpenTK; using osu.Game.Rulesets.Objects.Types; using OpenTK.Graphics; using osu.Game.Beatmaps.ControlPoints; +using osu.Game.Rulesets.Edit.Types; namespace osu.Game.Rulesets.Osu.Objects { - public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition + public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition, IHasEditablePosition { public const double OBJECT_RADIUS = 64; + public event Action PositionChanged; + public double TimePreempt = 600; public double TimeFadein = 400; - public Vector2 Position { get; set; } + private Vector2 position; + + public Vector2 Position + { + get => position; + set + { + if (position == value) + return; + position = value; + + PositionChanged?.Invoke(value); + } + } + public float X => Position.X; public float Y => Position.Y; @@ -48,5 +66,7 @@ namespace osu.Game.Rulesets.Osu.Objects Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2; } + + public virtual void SetPosition(Vector2 offset) => Position += offset; } } diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index 76439ca530..a633e3957e 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Osu.Objects private void createSliderEnds() { - HeadCircle = new HitCircle + HeadCircle = new SliderCircle(this) { StartTime = StartTime, Position = Position, @@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.Osu.Objects SampleControlPoint = SampleControlPoint }; - TailCircle = new HitCircle + TailCircle = new SliderCircle(this) { StartTime = EndTime, Position = EndPosition, diff --git a/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs b/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs new file mode 100644 index 0000000000..31ea67bbe0 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs @@ -0,0 +1,19 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; + +namespace osu.Game.Rulesets.Osu.Objects +{ + public class SliderCircle : HitCircle + { + private readonly Slider slider; + + public SliderCircle(Slider slider) + { + this.slider = slider; + } + + public override void SetPosition(Vector2 offset) => slider.SetPosition(offset); + } +} diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj index 8e8a01b009..d6fe87660f 100644 --- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj +++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj @@ -87,6 +87,7 @@ + @@ -117,6 +118,7 @@ + diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs index 543dd2cc54..803e86ae77 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs @@ -2,6 +2,8 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics.Containers; +using osu.Framework.Input; +using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; namespace osu.Game.Rulesets.Edit.Layers.Selection @@ -19,6 +21,22 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection State = Visibility.Visible; } + protected override bool OnDragStart(InputState state) => hitObject.HitObject is IHasEditablePosition; + + protected override bool OnDrag(InputState state) + { + switch (hitObject.HitObject) + { + case IHasEditablePosition editablePosition: + editablePosition.SetPosition(state.Mouse.Delta); + break; + } + + return true; + } + + protected override bool OnDragEnd(InputState state) => true; + protected override void PopIn() => Alpha = 1; protected override void PopOut() => Alpha = 0; } diff --git a/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs b/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs new file mode 100644 index 0000000000..79694e37a7 --- /dev/null +++ b/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs @@ -0,0 +1,12 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; + +namespace osu.Game.Rulesets.Edit.Types +{ + public interface IHasEditablePosition + { + void SetPosition(Vector2 offset); + } +} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index d10f0085cc..aee38d85bc 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -365,6 +365,7 @@ + From ad72d3816b7e90f648ff1509b1ebf1446e44b3d2 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Fri, 9 Mar 2018 23:43:50 +0900 Subject: [PATCH 15/36] Allow dragging anywhere in a capture box to move objects --- osu.Game/Rulesets/Edit/HitObjectComposer.cs | 1 + .../Edit/Layers/Selection/CaptureBox.cs | 19 ++++++++++++ .../Edit/Layers/Selection/HitObjectOverlay.cs | 31 ++----------------- .../Layers/Selection/HitObjectOverlayLayer.cs | 29 ++++++++++++++--- .../Edit/Layers/Selection/SelectionLayer.cs | 6 ++++ 5 files changed, 53 insertions(+), 33 deletions(-) diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs index e6a51cc39b..383adca136 100644 --- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs @@ -108,6 +108,7 @@ namespace osu.Game.Rulesets.Edit selectionLayer.ObjectSelected += hitObjectOverlayLayer.AddOverlay; selectionLayer.ObjectDeselected += hitObjectOverlayLayer.RemoveOverlay; + selectionLayer.SelectionMovementRequested += hitObjectOverlayLayer.MoveObjects; toolboxCollection.Items = new[] { new RadioButton("Select", () => setCompositionTool(null)) } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs index 6702678448..1454c78014 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs @@ -1,11 +1,13 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; +using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Rulesets.Objects.Drawables; using OpenTK; @@ -17,6 +19,11 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// public class CaptureBox : VisibilityContainer { + /// + /// Invoked when the captured s should be moved. + /// + public event Action MovementRequested; + private readonly IDrawable captureArea; private readonly IReadOnlyList capturedObjects; @@ -67,6 +74,18 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection Position = topLeft; } + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; + + protected override bool OnDragStart(InputState state) => true; + + protected override bool OnDrag(InputState state) + { + MovementRequested?.Invoke(state.Mouse.Delta); + return true; + } + + protected override bool OnDragEnd(InputState state) => true; + public override bool DisposeOnDeathRemoval => true; protected override void PopIn() => this.FadeIn(); diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs index 803e86ae77..8c58275943 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs @@ -2,42 +2,17 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics.Containers; -using osu.Framework.Input; -using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; namespace osu.Game.Rulesets.Edit.Layers.Selection { - public class HitObjectOverlay : OverlayContainer + public class HitObjectOverlay : Container { - // ReSharper disable once NotAccessedField.Local - // This will be used later to handle drag movement, etc - private readonly DrawableHitObject hitObject; + public readonly DrawableHitObject HitObject; public HitObjectOverlay(DrawableHitObject hitObject) { - this.hitObject = hitObject; - - State = Visibility.Visible; + HitObject = hitObject; } - - protected override bool OnDragStart(InputState state) => hitObject.HitObject is IHasEditablePosition; - - protected override bool OnDrag(InputState state) - { - switch (hitObject.HitObject) - { - case IHasEditablePosition editablePosition: - editablePosition.SetPosition(state.Mouse.Delta); - break; - } - - return true; - } - - protected override bool OnDragEnd(InputState state) => true; - - protected override void PopIn() => Alpha = 1; - protected override void PopOut() => Alpha = 0; } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs index 0b6e63d1fe..bb8496e9c6 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs @@ -1,20 +1,25 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Collections.Generic; +using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Input; +using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; +using OpenTK; namespace osu.Game.Rulesets.Edit.Layers.Selection { public class HitObjectOverlayLayer : CompositeDrawable { - private readonly Dictionary existingOverlays = new Dictionary(); + private readonly Container overlayContainer; public HitObjectOverlayLayer() { RelativeSizeAxes = Axes.Both; + + InternalChild = overlayContainer = new Container { RelativeSizeAxes = Axes.Both }; } /// @@ -27,8 +32,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection if (overlay == null) return; - existingOverlays[hitObject] = overlay; - AddInternal(overlay); + overlayContainer.Add(overlay); } /// @@ -37,13 +41,28 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// The to remove the overlay for. public void RemoveOverlay(DrawableHitObject hitObject) { - if (!existingOverlays.TryGetValue(hitObject, out var existing)) + var existing = overlayContainer.FirstOrDefault(h => h.HitObject == hitObject); + if (existing == null) return; existing.Hide(); existing.Expire(); } + public void MoveObjects(Vector2 offset) + { + // Todo: Various forms of snapping + foreach (var hitObject in overlayContainer.Select(o => o.HitObject.HitObject)) + { + switch (hitObject) + { + case IHasEditablePosition editablePosition: + editablePosition.SetPosition(offset); + break; + } + } + } + /// /// Creates a for a specific . /// diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs index 3895d34d7f..0383b933ab 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs @@ -27,6 +27,11 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// public event Action ObjectDeselected; + /// + /// Invoked when the selected s should be moved. + /// + public event Action SelectionMovementRequested; + private readonly Playfield playfield; public SelectionLayer(Playfield playfield) @@ -192,6 +197,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection return; AddInternal(captureBox = new CaptureBox(this, selectedHitObjects.ToList())); + captureBox.MovementRequested += v => SelectionMovementRequested?.Invoke(v); } } } From 376f6eec58afb79c510ad46ed0e7e8d0c9bd9955 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Sat, 10 Mar 2018 00:02:13 +0900 Subject: [PATCH 16/36] SetPosition -> OffsetPosition --- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 2 +- osu.Game.Rulesets.Osu/Objects/SliderCircle.cs | 2 +- .../Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs | 2 +- osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index 93eaf70589..339ad61b17 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -67,6 +67,6 @@ namespace osu.Game.Rulesets.Osu.Objects Scale = (1.0f - 0.7f * (difficulty.CircleSize - 5) / 5) / 2; } - public virtual void SetPosition(Vector2 offset) => Position += offset; + public virtual void OffsetPosition(Vector2 offset) => Position += offset; } } diff --git a/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs b/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs index 31ea67bbe0..1e83d02735 100644 --- a/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs +++ b/osu.Game.Rulesets.Osu/Objects/SliderCircle.cs @@ -14,6 +14,6 @@ namespace osu.Game.Rulesets.Osu.Objects this.slider = slider; } - public override void SetPosition(Vector2 offset) => slider.SetPosition(offset); + public override void OffsetPosition(Vector2 offset) => slider.OffsetPosition(offset); } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs index bb8496e9c6..d391855f7a 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs @@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection switch (hitObject) { case IHasEditablePosition editablePosition: - editablePosition.SetPosition(offset); + editablePosition.OffsetPosition(state.Mouse.Delta); break; } } diff --git a/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs b/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs index 79694e37a7..3530dba8f4 100644 --- a/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs +++ b/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs @@ -7,6 +7,6 @@ namespace osu.Game.Rulesets.Edit.Types { public interface IHasEditablePosition { - void SetPosition(Vector2 offset); + void OffsetPosition(Vector2 offset); } } From 0e8fbc47b7610a8fc2f69e2a3aa47372c63d9b1f Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Sat, 10 Mar 2018 00:02:51 +0900 Subject: [PATCH 17/36] Give HitObjectOverlayLayer full input state information --- osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs | 4 ++-- .../Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs | 3 +-- osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs index 1454c78014..970481032b 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs @@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// /// Invoked when the captured s should be moved. /// - public event Action MovementRequested; + public event Action MovementRequested; private readonly IDrawable captureArea; private readonly IReadOnlyList capturedObjects; @@ -80,7 +80,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection protected override bool OnDrag(InputState state) { - MovementRequested?.Invoke(state.Mouse.Delta); + MovementRequested?.Invoke(state); return true; } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs index d391855f7a..438ba5e76d 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs @@ -7,7 +7,6 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Input; using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; -using OpenTK; namespace osu.Game.Rulesets.Edit.Layers.Selection { @@ -49,7 +48,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection existing.Expire(); } - public void MoveObjects(Vector2 offset) + public void MoveObjects(InputState state) { // Todo: Various forms of snapping foreach (var hitObject in overlayContainer.Select(o => o.HitObject.HitObject)) diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs index 0383b933ab..ca6c1c122a 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs @@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// /// Invoked when the selected s should be moved. /// - public event Action SelectionMovementRequested; + public event Action SelectionMovementRequested; private readonly Playfield playfield; From 4103c66cff25829c6acc0f9feb5ce5cff4060daa Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Sat, 10 Mar 2018 00:48:57 +0900 Subject: [PATCH 18/36] Move selection overlay to HitObjectOverlayLayer for extensibility --- .../Visual/TestCaseEditorSelectionLayer.cs | 2 +- osu.Game/Rulesets/Edit/HitObjectComposer.cs | 3 +- .../Layers/Selection/HitObjectOverlayLayer.cs | 28 ++++++++------- .../Edit/Layers/Selection/SelectionLayer.cs | 26 +++++++------- .../{CaptureBox.cs => SelectionOverlay.cs} | 35 ++++++++++--------- osu.Game/osu.Game.csproj | 2 +- 6 files changed, 50 insertions(+), 46 deletions(-) rename osu.Game/Rulesets/Edit/Layers/Selection/{CaptureBox.cs => SelectionOverlay.cs} (68%) diff --git a/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs b/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs index 8d12dfc517..dc8a13d044 100644 --- a/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs +++ b/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs @@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual { typeof(SelectionBox), typeof(SelectionLayer), - typeof(CaptureBox), + typeof(SelectionOverlay), typeof(HitObjectComposer), typeof(OsuHitObjectComposer), typeof(HitObjectOverlayLayer), diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs index 383adca136..914640622b 100644 --- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs @@ -108,7 +108,8 @@ namespace osu.Game.Rulesets.Edit selectionLayer.ObjectSelected += hitObjectOverlayLayer.AddOverlay; selectionLayer.ObjectDeselected += hitObjectOverlayLayer.RemoveOverlay; - selectionLayer.SelectionMovementRequested += hitObjectOverlayLayer.MoveObjects; + selectionLayer.SelectionCleared += hitObjectOverlayLayer.RemoveSelectionOverlay; + selectionLayer.SelectionFinished += hitObjectOverlayLayer.AddSelectionOverlay; toolboxCollection.Items = new[] { new RadioButton("Select", () => setCompositionTool(null)) } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs index 438ba5e76d..24d594f59a 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs @@ -1,11 +1,10 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Collections.Generic; using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Input; -using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; namespace osu.Game.Rulesets.Edit.Layers.Selection @@ -48,18 +47,14 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection existing.Expire(); } - public void MoveObjects(InputState state) + private SelectionOverlay currentSelectionOverlay; + + public void AddSelectionOverlay() => AddInternal(currentSelectionOverlay = CreateSelectionOverlay(overlayContainer)); + + public void RemoveSelectionOverlay() { - // Todo: Various forms of snapping - foreach (var hitObject in overlayContainer.Select(o => o.HitObject.HitObject)) - { - switch (hitObject) - { - case IHasEditablePosition editablePosition: - editablePosition.OffsetPosition(state.Mouse.Delta); - break; - } - } + currentSelectionOverlay?.Hide(); + currentSelectionOverlay?.Expire(); } /// @@ -67,5 +62,12 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// /// The to create the overlay for. protected virtual HitObjectOverlay CreateOverlayFor(DrawableHitObject hitObject) => null; + + /// + /// Creates a which outlines s + /// and handles all hitobject movement/pattern adjustments. + /// + /// The overlays. + protected virtual SelectionOverlay CreateSelectionOverlay(IReadOnlyList overlays) => new SelectionOverlay(overlays); } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs index ca6c1c122a..2f8b9165c4 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs @@ -28,9 +28,14 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection public event Action ObjectDeselected; /// - /// Invoked when the selected s should be moved. + /// Invoked when the selection has been cleared. /// - public event Action SelectionMovementRequested; + public event Action SelectionCleared; + + /// + /// Invoked when the user has finished selecting all s. + /// + public event Action SelectionFinished; private readonly Playfield playfield; @@ -42,7 +47,6 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection } private SelectionBox selectionBox; - private CaptureBox captureBox; private readonly HashSet selectedHitObjects = new HashSet(); @@ -100,7 +104,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection if (!select(hitObject)) return; - clearCapture(); + clearSelection(); finishSelection(); } @@ -127,7 +131,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection if (!deselect(hitObject)) return; - clearCapture(); + clearSelection(); finishSelection(); } @@ -153,7 +157,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection selectedHitObjects.ForEach(h => ObjectDeselected?.Invoke(h)); selectedHitObjects.Clear(); - clearCapture(); + clearSelection(); } /// @@ -185,19 +189,13 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection select(target); } - private void clearCapture() - { - captureBox?.Hide(); - captureBox?.Expire(); - } + private void clearSelection() => SelectionCleared?.Invoke(); private void finishSelection() { if (selectedHitObjects.Count == 0) return; - - AddInternal(captureBox = new CaptureBox(this, selectedHitObjects.ToList())); - captureBox.MovementRequested += v => SelectionMovementRequested?.Invoke(v); + SelectionFinished?.Invoke(); } } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs similarity index 68% rename from osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs rename to osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs index 970481032b..c20769a912 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/CaptureBox.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs @@ -1,14 +1,15 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Input; using osu.Game.Graphics; +using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; using OpenTK; @@ -17,20 +18,13 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// /// A box which encloses s. /// - public class CaptureBox : VisibilityContainer + public class SelectionOverlay : VisibilityContainer { - /// - /// Invoked when the captured s should be moved. - /// - public event Action MovementRequested; + private readonly IReadOnlyList overlays; - private readonly IDrawable captureArea; - private readonly IReadOnlyList capturedObjects; - - public CaptureBox(IDrawable captureArea, IReadOnlyList capturedObjects) + public SelectionOverlay(IReadOnlyList overlays) { - this.captureArea = captureArea; - this.capturedObjects = capturedObjects; + this.overlays = overlays; Masking = true; BorderThickness = SelectionBox.BORDER_RADIUS; @@ -61,10 +55,10 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection var topLeft = new Vector2(float.MaxValue, float.MaxValue); var bottomRight = new Vector2(float.MinValue, float.MinValue); - foreach (var obj in capturedObjects) + foreach (var obj in overlays) { - topLeft = Vector2.ComponentMin(topLeft, captureArea.ToLocalSpace(obj.SelectionQuad.TopLeft)); - bottomRight = Vector2.ComponentMax(bottomRight, captureArea.ToLocalSpace(obj.SelectionQuad.BottomRight)); + topLeft = Vector2.ComponentMin(topLeft, Parent.ToLocalSpace(obj.HitObject.SelectionQuad.TopLeft)); + bottomRight = Vector2.ComponentMax(bottomRight, Parent.ToLocalSpace(obj.HitObject.SelectionQuad.BottomRight)); } topLeft -= new Vector2(5); @@ -80,7 +74,16 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection protected override bool OnDrag(InputState state) { - MovementRequested?.Invoke(state); + // Todo: Various forms of snapping + foreach (var hitObject in overlays.Select(o => o.HitObject.HitObject)) + { + switch (hitObject) + { + case IHasEditablePosition editablePosition: + editablePosition.OffsetPosition(state.Mouse.Delta); + break; + } + } return true; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index aee38d85bc..fa99ae616a 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -362,7 +362,7 @@ - + From 92b302971f3f04ef3a852aab3098dca1a49563ab Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Sat, 10 Mar 2018 01:23:53 +0900 Subject: [PATCH 19/36] Trim whitespace --- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index 339ad61b17..574063d4a5 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Objects if (position == value) return; position = value; - + PositionChanged?.Invoke(value); } } From 1447ca55a3a128a3adb0fee0206178893640e256 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 12 Mar 2018 11:02:02 +0900 Subject: [PATCH 20/36] Add xmldoc, make restrictSize private --- osu.Game/Skinning/SkinnableDrawable.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs index a5f22f60a2..81abc9e80c 100644 --- a/osu.Game/Skinning/SkinnableDrawable.cs +++ b/osu.Game/Skinning/SkinnableDrawable.cs @@ -22,16 +22,20 @@ namespace osu.Game.Skinning private readonly string componentName; - /// - /// Whether a user-skin drawable should be limited to the size of our parent. - /// - public readonly bool RestrictSize; + private readonly bool restrictSize; + /// + /// + /// + /// The namespace-complete resource name for this skinnable element. + /// A function to create the default skin implementation of this element. + /// Whther to fallback to the default implementation when a custom skin is specified but not implementation is present. + /// Whether a user-skin drawable should be limited to the size of our parent. public SkinnableDrawable(string name, Func defaultImplementation, bool fallback = true, bool restrictSize = true) : base(fallback) { componentName = name; createDefault = defaultImplementation; - RestrictSize = restrictSize; + this.restrictSize = restrictSize; RelativeSizeAxes = Axes.Both; } @@ -41,7 +45,7 @@ namespace osu.Game.Skinning var drawable = skin.GetDrawableComponent(componentName); if (drawable != null) { - if (RestrictSize) + if (restrictSize) { drawable.RelativeSizeAxes = Axes.Both; drawable.Size = Vector2.One; From c70be29edacbdebb10dd874d15cd6dda145ef5ca Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 12 Mar 2018 11:30:13 +0900 Subject: [PATCH 21/36] Move legacy conversion to LegacySkin --- .../Rulesets/Judgements/DrawableJudgement.cs | 19 +------------------ osu.Game/Skinning/LegacySkin.cs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs index 4664517312..8639812aff 100644 --- a/osu.Game/Rulesets/Judgements/DrawableJudgement.cs +++ b/osu.Game/Rulesets/Judgements/DrawableJudgement.cs @@ -40,24 +40,7 @@ namespace osu.Game.Rulesets.Judgements [BackgroundDependencyLoader] private void load(OsuColour colours) { - string legacyName = string.Empty; - switch (Judgement.Result) - { - case HitResult.Miss: - legacyName = "hit0"; - break; - case HitResult.Meh: - legacyName = "hit50"; - break; - case HitResult.Good: - legacyName = "hit100"; - break; - case HitResult.Great: - legacyName = "hit300"; - break; - } - - Child = new SkinnableDrawable($"Play/osu/{legacyName}", _ => JudgementText = new OsuSpriteText + Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText { Text = Judgement.Result.GetDescription().ToUpper(), Font = @"Venera", diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index f03d1ce632..2caeed8480 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -29,6 +29,22 @@ namespace osu.Game.Skinning public override Drawable GetDrawableComponent(string componentName) { + switch (componentName) + { + case "Play/Miss": + componentName = "hit0"; + break; + case "Play/Meh": + componentName = "hit50"; + break; + case "Play/Good": + componentName = "hit100"; + break; + case "Play/Great": + componentName = "hit300"; + break; + } + var texture = textures.Get(componentName); if (texture == null) return null; From 212142429f7ff0e6322c8b404a1ff90114458022 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 12 Mar 2018 17:25:34 +0900 Subject: [PATCH 22/36] Derive from IHasPosition --- osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs | 2 +- osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs index 574063d4a5..d9aed23414 100644 --- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs @@ -12,7 +12,7 @@ using osu.Game.Rulesets.Edit.Types; namespace osu.Game.Rulesets.Osu.Objects { - public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition, IHasEditablePosition + public abstract class OsuHitObject : HitObject, IHasCombo, IHasEditablePosition { public const double OBJECT_RADIUS = 64; diff --git a/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs b/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs index 3530dba8f4..fa101ed835 100644 --- a/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs +++ b/osu.Game/Rulesets/Edit/Types/IHasEditablePosition.cs @@ -1,11 +1,12 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Rulesets.Objects.Types; using OpenTK; namespace osu.Game.Rulesets.Edit.Types { - public interface IHasEditablePosition + public interface IHasEditablePosition : IHasPosition { void OffsetPosition(Vector2 offset); } From 8c4bcb4a04a8c45598c92c56f5ee65e6f7a2f761 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 12 Mar 2018 17:33:10 +0900 Subject: [PATCH 23/36] Only accept drag movement on the overlays --- .../Edit/Layers/Selection/Overlays/SliderOverlay.cs | 3 +++ osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs index f63d8f0c62..d478130868 100644 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs @@ -8,6 +8,7 @@ using osu.Game.Rulesets.Edit.Layers.Selection; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces; +using OpenTK; using OpenTK.Graphics; namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays @@ -56,5 +57,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays // Need to cause one update body.UpdateProgress(0); } + + public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => body.ReceiveMouseInputAt(screenSpacePos); } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs index c20769a912..c3bb5911f8 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs +++ b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs @@ -68,6 +68,8 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection Position = topLeft; } + public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => overlays.Any(o => o.ReceiveMouseInputAt(screenSpacePos)); + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnDragStart(InputState state) => true; From 7406cb290f655bb4953549fb6510eb13241df94e Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 12 Mar 2018 19:41:09 +0900 Subject: [PATCH 24/36] Split out test beatmap from TestCasePlayer into instantiable class --- .../Tests/TestCaseBananaShower.cs | 8 +- .../Tests/TestCaseCatchStacker.cs | 9 +- .../Tests/TestCaseHyperdash.cs | 5 +- osu.Game/Tests/Beatmaps/TestBeatmap.cs | 725 ++++++++++++++++++ osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs | 7 +- osu.Game/Tests/Visual/TestCasePlayer.cs | 711 +---------------- osu.Game/osu.Game.csproj | 1 + 7 files changed, 744 insertions(+), 722 deletions(-) create mode 100644 osu.Game/Tests/Beatmaps/TestBeatmap.cs diff --git a/osu.Game.Rulesets.Catch/Tests/TestCaseBananaShower.cs b/osu.Game.Rulesets.Catch/Tests/TestCaseBananaShower.cs index ecae154075..ec9dd15673 100644 --- a/osu.Game.Rulesets.Catch/Tests/TestCaseBananaShower.cs +++ b/osu.Game.Rulesets.Catch/Tests/TestCaseBananaShower.cs @@ -28,16 +28,14 @@ namespace osu.Game.Rulesets.Catch.Tests { } - protected override Beatmap CreateBeatmap() + protected override Beatmap CreateBeatmap(Ruleset ruleset) { var beatmap = new Beatmap { BeatmapInfo = new BeatmapInfo { - BaseDifficulty = new BeatmapDifficulty - { - CircleSize = 6, - } + BaseDifficulty = new BeatmapDifficulty { CircleSize = 6 }, + Ruleset = ruleset.RulesetInfo } }; diff --git a/osu.Game.Rulesets.Catch/Tests/TestCaseCatchStacker.cs b/osu.Game.Rulesets.Catch/Tests/TestCaseCatchStacker.cs index 518845208c..8e5843f40a 100644 --- a/osu.Game.Rulesets.Catch/Tests/TestCaseCatchStacker.cs +++ b/osu.Game.Rulesets.Catch/Tests/TestCaseCatchStacker.cs @@ -15,19 +15,18 @@ namespace osu.Game.Rulesets.Catch.Tests { } - protected override Beatmap CreateBeatmap() + protected override Beatmap CreateBeatmap(Ruleset ruleset) { var beatmap = new Beatmap { BeatmapInfo = new BeatmapInfo { - BaseDifficulty = new BeatmapDifficulty - { - CircleSize = 6, - } + BaseDifficulty = new BeatmapDifficulty { CircleSize = 6 }, + Ruleset = ruleset.RulesetInfo } }; + for (int i = 0; i < 512; i++) beatmap.HitObjects.Add(new Fruit { X = 0.5f + i / 2048f * (i % 10 - 5), StartTime = i * 100, NewCombo = i % 8 == 0 }); diff --git a/osu.Game.Rulesets.Catch/Tests/TestCaseHyperdash.cs b/osu.Game.Rulesets.Catch/Tests/TestCaseHyperdash.cs index c01791a923..7564adea8c 100644 --- a/osu.Game.Rulesets.Catch/Tests/TestCaseHyperdash.cs +++ b/osu.Game.Rulesets.Catch/Tests/TestCaseHyperdash.cs @@ -15,9 +15,10 @@ namespace osu.Game.Rulesets.Catch.Tests { } - protected override Beatmap CreateBeatmap() + protected override Beatmap CreateBeatmap(Ruleset ruleset) { - var beatmap = new Beatmap(); + var beatmap = new Beatmap { BeatmapInfo = { Ruleset = ruleset.RulesetInfo } }; + for (int i = 0; i < 512; i++) if (i % 5 < 3) diff --git a/osu.Game/Tests/Beatmaps/TestBeatmap.cs b/osu.Game/Tests/Beatmaps/TestBeatmap.cs new file mode 100644 index 0000000000..a29ee03975 --- /dev/null +++ b/osu.Game/Tests/Beatmaps/TestBeatmap.cs @@ -0,0 +1,725 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System.IO; +using System.Text; +using osu.Game.Beatmaps; +using osu.Game.Rulesets; +using Decoder = osu.Game.Beatmaps.Formats.Decoder; + +namespace osu.Game.Tests.Beatmaps +{ + public class TestBeatmap : Beatmap + { + public TestBeatmap(RulesetInfo ruleset) + : base(createTestBeatmap()) + { + BeatmapInfo.Ruleset = ruleset; + } + + private static Beatmap testBeatmapCache; + private static Beatmap createTestBeatmap() + { + if (testBeatmapCache != null) + return testBeatmapCache; + + using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(test_beatmap_data))) + using (var reader = new StreamReader(stream)) + return testBeatmapCache = Decoder.GetDecoder(reader).DecodeBeatmap(reader); + } + + private const string test_beatmap_data = +@"osu file format v14 + +[General] +AudioLeadIn: 500 +PreviewTime: 53498 +Countdown: 0 +SampleSet: Soft +StackLeniency: 0.7 +Mode: 0 +LetterboxInBreaks: 0 +WidescreenStoryboard: 1 + +[Editor] +DistanceSpacing: 1.2 +BeatDivisor: 4 +GridSize: 4 +TimelineZoom: 1 + +[Metadata] +Title:My Love +TitleUnicode:My Love +Artist:Kuba Oms +ArtistUnicode:Kuba Oms +Creator:W h i t e +Version:Hard +Source:ADHD +Tags:Monthly Beatmapping Contest Electronic folk pop w_h_i_t_e +BeatmapID:397534 +BeatmapSetID:163112 + +[Difficulty] +HPDrainRate:5 +CircleSize:4 +OverallDifficulty:6 +ApproachRate:7 +SliderMultiplier:1.44 +SliderTickRate:2 + +[Events] +//Break Periods +2,69870,83770 +2,152170,158770 +//Storyboard Layer 0 (Background) +//Storyboard Layer 1 (Fail) +//Storyboard Layer 2 (Pass) +//Storyboard Layer 3 (Foreground) +//Storyboard Sound Samples + +[TimingPoints] +2170,468.75,4,2,0,40,1,0 +4045,-100,4,2,0,30,0,0 +4162,-100,4,2,0,40,0,0 +5920,-100,4,2,0,30,0,0 +6037,-100,4,2,0,40,0,0 +7795,-100,4,2,0,30,0,0 +7912,-100,4,2,0,40,0,0 +9670,-100,4,2,0,40,0,0 +9787,-100,4,2,0,50,0,0 +11545,-100,4,2,0,40,0,0 +11662,-100,4,2,0,50,0,0 +13420,-100,4,2,0,40,0,0 +13537,-100,4,2,0,50,0,0 +15295,-100,4,2,0,40,0,0 +15412,-100,4,2,0,50,0,0 +17170,-100,4,2,0,40,0,0 +17287,-100,4,2,0,50,0,0 +19045,-100,4,2,0,40,0,0 +19162,-100,4,2,0,50,0,0 +20920,-100,4,2,0,40,0,0 +21037,-100,4,2,0,50,0,0 +22795,-100,4,2,0,40,0,0 +22912,-100,4,2,0,50,0,0 +24670,-100,4,2,0,70,0,0 +37560,-200,4,2,0,30,0,0 +38263,-200,4,2,0,5,0,0 +38966,-100,4,2,0,30,0,0 +39670,-100,4,2,0,70,0,0 +53732,-100,4,2,0,40,0,0 +54670,-100,4,2,0,80,0,1 +55138,-100,4,2,0,60,0,1 +55255,-100,4,2,0,80,0,1 +56076,-100,4,2,0,60,0,1 +56193,-100,4,2,0,80,0,1 +57013,-100,4,2,0,60,0,1 +57130,-100,4,2,0,80,0,1 +57951,-100,4,2,0,60,0,1 +58068,-100,4,2,0,80,0,1 +58888,-100,4,2,0,60,0,1 +59005,-100,4,2,0,80,0,1 +59826,-100,4,2,0,60,0,1 +59943,-100,4,2,0,80,0,1 +60763,-100,4,2,0,60,0,1 +60880,-100,4,2,0,80,0,1 +61701,-100,4,2,0,60,0,1 +61818,-100,4,2,0,80,0,1 +62638,-100,4,2,0,60,0,1 +62755,-100,4,2,0,80,0,1 +63576,-100,4,2,0,60,0,1 +63693,-100,4,2,0,80,0,1 +64513,-100,4,2,0,60,0,1 +64630,-100,4,2,0,80,0,1 +65451,-100,4,2,0,60,0,1 +65568,-100,4,2,0,80,0,1 +66388,-100,4,2,0,60,0,1 +66505,-100,4,2,0,80,0,1 +67326,-100,4,2,0,60,0,1 +67443,-100,4,2,0,80,0,1 +68263,-100,4,2,0,60,0,1 +68380,-100,4,2,0,80,0,1 +69201,-100,4,2,0,60,0,1 +69318,-100,4,2,0,80,0,1 +69670,-100,4,2,0,70,0,0 +84670,-100,4,2,0,70,0,0 +97560,-200,4,2,0,70,0,0 +97795,-200,4,2,0,30,0,0 +98966,-100,4,2,0,30,0,0 +99670,-100,4,2,0,70,0,0 +113732,-100,4,2,0,40,0,0 +114670,-100,4,2,0,80,0,1 +115138,-100,4,2,0,60,0,1 +115255,-100,4,2,0,80,0,1 +116076,-100,4,2,0,60,0,1 +116193,-100,4,2,0,80,0,1 +117013,-100,4,2,0,60,0,1 +117130,-100,4,2,0,80,0,1 +117951,-100,4,2,0,60,0,1 +118068,-100,4,2,0,80,0,1 +118888,-100,4,2,0,60,0,1 +119005,-100,4,2,0,80,0,1 +119826,-100,4,2,0,60,0,1 +119943,-100,4,2,0,80,0,1 +120763,-100,4,2,0,60,0,1 +120880,-100,4,2,0,80,0,1 +121701,-100,4,2,0,60,0,1 +121818,-100,4,2,0,80,0,1 +122638,-100,4,2,0,60,0,1 +122755,-100,4,2,0,80,0,1 +123576,-100,4,2,0,60,0,1 +123693,-100,4,2,0,80,0,1 +124513,-100,4,2,0,60,0,1 +124630,-100,4,2,0,80,0,1 +125451,-100,4,2,0,60,0,1 +125568,-100,4,2,0,80,0,1 +126388,-100,4,2,0,60,0,1 +126505,-100,4,2,0,80,0,1 +127326,-100,4,2,0,60,0,1 +127443,-100,4,2,0,80,0,1 +128263,-100,4,2,0,60,0,1 +128380,-100,4,2,0,80,0,1 +129201,-100,4,2,0,60,0,1 +129318,-100,4,2,0,80,0,1 +129670,-200,4,2,0,40,0,0 +144670,-133.333333333333,4,2,0,40,0,0 +159670,-133.333333333333,4,2,0,40,0,0 +163420,-133.333333333333,4,2,0,45,0,0 +163888,-125,4,2,0,50,0,0 +164357,-117.647058823529,4,2,0,55,0,0 +164826,-111.111111111111,4,2,0,60,0,0 +165295,-105.263157894737,4,2,0,65,0,0 +165763,-100,4,2,0,70,0,0 +166232,-100,4,2,0,40,0,0 +167170,-100,4,2,0,80,0,1 +167638,-100,4,2,0,60,0,1 +167755,-100,4,2,0,80,0,1 +168576,-100,4,2,0,60,0,1 +168693,-100,4,2,0,80,0,1 +169513,-100,4,2,0,60,0,1 +169630,-100,4,2,0,80,0,1 +170451,-100,4,2,0,60,0,1 +170568,-100,4,2,0,80,0,1 +171388,-100,4,2,0,60,0,1 +171505,-100,4,2,0,80,0,1 +172326,-100,4,2,0,60,0,1 +172443,-100,4,2,0,80,0,1 +173263,-100,4,2,0,60,0,1 +173380,-100,4,2,0,80,0,1 +174201,-100,4,2,0,60,0,1 +174318,-100,4,2,0,80,0,1 +175138,-100,4,2,0,60,0,1 +175255,-100,4,2,0,80,0,1 +176076,-100,4,2,0,60,0,1 +176193,-100,4,2,0,80,0,1 +177013,-100,4,2,0,60,0,1 +177130,-100,4,2,0,80,0,1 +177951,-100,4,2,0,60,0,1 +178068,-100,4,2,0,80,0,1 +178888,-100,4,2,0,60,0,1 +179005,-100,4,2,0,80,0,1 +179826,-100,4,2,0,60,0,1 +179943,-100,4,2,0,80,0,1 +180763,-100,4,2,0,60,0,1 +180880,-100,4,2,0,80,0,1 +180998,-100,4,2,0,80,0,0 +181466,-100,4,2,0,60,0,0 +181584,-100,4,2,0,80,0,0 +181935,-100,4,2,0,80,0,0 +182170,-100,4,2,0,80,0,1 +182638,-100,4,2,0,60,0,1 +182755,-100,4,2,0,80,0,1 +183576,-100,4,2,0,60,0,1 +183693,-100,4,2,0,80,0,1 +184513,-100,4,2,0,60,0,1 +184630,-100,4,2,0,80,0,1 +185451,-100,4,2,0,60,0,1 +185568,-100,4,2,0,80,0,1 +186388,-100,4,2,0,60,0,1 +186505,-100,4,2,0,80,0,1 +187326,-100,4,2,0,60,0,1 +187443,-100,4,2,0,80,0,1 +188263,-100,4,2,0,60,0,1 +188380,-100,4,2,0,80,0,1 +189201,-100,4,2,0,60,0,1 +189318,-100,4,2,0,80,0,1 +190138,-100,4,2,0,60,0,1 +190255,-100,4,2,0,80,0,1 +191076,-100,4,2,0,60,0,1 +191193,-100,4,2,0,80,0,1 +192013,-100,4,2,0,60,0,1 +192130,-100,4,2,0,80,0,1 +192951,-100,4,2,0,60,0,1 +193068,-100,4,2,0,80,0,1 +193888,-100,4,2,0,60,0,1 +194005,-100,4,2,0,80,0,1 +194826,-100,4,2,0,60,0,1 +194943,-100,4,2,0,80,0,1 +195295,-100,4,2,0,50,0,1 +195529,-100,4,2,0,52,0,1 +195646,-100,4,2,0,54,0,1 +195763,-100,4,2,0,56,0,1 +195880,-100,4,2,0,58,0,1 +195998,-100,4,2,0,60,0,1 +196115,-100,4,2,0,62,0,1 +196232,-100,4,2,0,64,0,1 +196349,-100,4,2,0,68,0,1 +196466,-100,4,2,0,70,0,1 +196584,-100,4,2,0,72,0,1 +196701,-100,4,2,0,74,0,1 +196818,-100,4,2,0,76,0,1 +196935,-100,4,2,0,78,0,1 +197052,-100,4,2,0,80,0,1 +197170,-100,4,2,0,80,0,0 +197873,-100,4,2,0,60,0,0 +197990,-100,4,2,0,80,0,0 +198341,-100,4,2,0,60,0,0 +199045,-100,4,2,0,80,0,0 +199279,-100,4,2,0,60,0,0 +199630,-100,4,2,0,80,0,0 +200216,-100,4,2,0,60,0,0 +200334,-100,4,2,0,80,0,0 +201623,-100,4,2,0,60,0,0 +201740,-100,4,2,0,80,0,0 +202326,-100,4,2,0,60,0,0 +202443,-100,4,2,0,80,0,0 +203029,-100,4,2,0,60,0,0 +203498,-100,4,2,0,80,0,0 +203966,-100,4,2,0,60,0,0 +204201,-100,4,2,0,80,0,0 +205373,-100,4,2,0,60,0,0 +205490,-100,4,2,0,80,0,0 +205841,-100,4,2,0,60,0,0 +206076,-100,4,2,0,60,0,0 +206545,-100,4,2,0,80,0,0 +206779,-100,4,2,0,60,0,0 +207130,-100,4,2,0,80,0,0 +207716,-100,4,2,0,60,0,0 +207951,-100,4,2,0,80,0,0 +209123,-100,4,2,0,60,0,0 +209240,-100,4,2,0,80,0,0 +209826,-100,4,2,0,60,0,0 +209943,-100,4,2,0,80,0,0 +210529,-100,4,2,0,60,0,0 +210880,-100,4,2,0,80,0,0 +211232,-100,4,2,0,60,0,0 +211701,-100,4,2,0,70,0,0 +212170,-100,4,2,0,80,0,0 +212873,-100,4,2,0,60,0,0 +212990,-100,4,2,0,80,0,0 +213341,-100,4,2,0,60,0,0 +213576,-100,4,2,0,60,0,0 +214045,-100,4,2,0,80,0,0 +214279,-100,4,2,0,60,0,0 +214630,-100,4,2,0,80,0,0 +215216,-100,4,2,0,60,0,0 +215451,-100,4,2,0,80,0,0 +216623,-100,4,2,0,60,0,0 +216740,-100,4,2,0,80,0,0 +217326,-100,4,2,0,60,0,0 +217443,-100,4,2,0,80,0,0 +218029,-100,4,2,0,60,0,0 +218498,-100,4,2,0,80,0,0 +218732,-100,4,2,0,50,0,0 +219670,-100,4,2,0,70,0,0 +220138,-100,4,2,0,65,0,0 +220373,-100,4,2,0,45,0,0 +220490,-100,4,2,0,65,0,0 +220607,-100,4,2,0,60,0,0 +220841,-100,4,2,0,35,0,0 +221076,-100,4,2,0,35,0,0 +221545,-100,4,2,0,50,0,0 +221779,-100,4,2,0,30,0,0 +222013,-111.111111111111,4,2,0,25,0,0 +222130,-111.111111111111,4,2,0,40,0,0 +222482,-125,4,2,0,40,0,0 +222716,-125,4,2,0,20,0,0 +222951,-100,4,2,0,15,0,0 +223420,-100,4,2,0,30,0,0 +224357,-100,4,2,0,25,0,0 +225295,-100,4,2,0,20,0,0 +226232,-100,4,2,0,15,0,0 +226701,-100,4,2,0,10,0,0 +227170,-100,4,2,0,5,0,0 + + +[Colours] + Combo1 : 17,254,176 +Combo2 : 173,255,95 +Combo3 : 255,88,100 +Combo4 : 255,94,55 + +[HitObjects] +320,256,2170,6,0,P|256:284|192:256,1,144,4|0,0:0|0:0,0:0:0:0: +144,184,2873,1,0,0:0:0:0: +108,260,3107,2,0,P|112:296|100:336,1,72 +28,288,3576,2,0,P|24:252|36:212,1,72,0|0,0:0|0:0,0:0:0:0: +76,140,4045,6,0,L|220:136,1,144,4|0,0:0|0:0,0:0:0:0: +292,88,4748,1,0,0:0:0:0: +292,88,4982,2,0,P|304:120|300:168,1,72 +388,168,5451,2,0,P|396:133|416:103,1,72,0|0,0:0|0:0,0:0:0:0: +472,172,5920,6,0,B|470:200|457:222|457:222|488:256|476:308,1,144,4|0,0:0|0:0,0:0:0:0: +396,280,6623,1,0,0:0:0:0: +324,328,6857,2,0,P|288:332|252:324,1,72 +180,280,7326,2,0,L|108:284,1,72,0|0,0:0|0:0,0:0:0:0: +256,192,7795,12,0,9670,0:0:0:0: +428,212,10138,1,0,0:0:0:0: +292,320,10607,1,0,0:0:0:0: +184,184,11076,2,0,L|112:180,1,72,0|0,0:0|0:0,0:0:0:0: +24,172,11545,5,6,0:0:0:0: +160,280,12013,1,0,0:0:0:0: +268,144,12482,1,0,0:0:0:0: +132,36,12951,2,0,L|204:32,1,72,0|0,0:0|0:0,0:0:0:0: +284,60,13420,6,0,P|340:100|344:180,2,144,6|0|0,0:0|0:0|0:0,0:0:0:0: +268,144,14591,1,0,0:0:0:0: +284,228,14826,2,0,P|316:248|364:252,1,72,0|0,0:0|0:0,0:0:0:0: +436,248,15295,6,0,P|372:272|344:340,1,144,6|2,0:0|0:0,0:0:0:0: +168,338,16232,2,0,P|141:273|76:248,1,144,2|2,0:0|0:0,0:0:0:0: +4,296,16935,1,0,0:0:0:0: +80,336,17170,5,6,0:0:0:0: +44,168,17638,1,0,0:0:0:0: +212,128,18107,1,0,0:0:0:0: +248,296,18576,2,0,P|284:288|320:292,1,72,0|0,0:0|0:0,0:0:0:0: +400,324,19045,5,6,0:0:0:0: +280,200,19513,1,0,0:0:0:0: +368,52,19982,1,0,0:0:0:0: +488,176,20451,2,0,P|452:168|416:172,1,72,0|0,0:0|0:0,0:0:0:0: +336,200,20920,6,0,P|284:216|200:192,1,144,6|0,0:0|0:0,0:0:0:0: +200,192,21857,2,0,L|204:264,1,72,0|0,0:3|0:0,0:0:0:0: +117,244,22326,2,0,L|120:172,1,72,0|0,0:0|0:0,0:0:0:0: +40,152,22795,6,0,L|28:296,2,144,6|0|0,0:0|0:0|0:0,0:0:0:0: +152,24,24201,1,0,0:0:0:0: +220,76,24435,1,0,3:0:0:0: +304,56,24670,6,0,P|288:120|296:196,1,144,4|2,0:3|0:3,0:0:0:0: +344,268,25373,1,0,0:0:0:0: +416,316,25607,2,0,P|452:312|508:316,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +244,344,26545,6,0,P|176:356|108:328,1,144,4|2,0:3|0:3,0:0:0:0: +60,256,27248,1,0,0:0:0:0: +36,172,27482,2,0,L|40:100,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +188,252,28420,6,0,P|192:184|196:100,1,144,4|2,0:3|0:3,0:0:0:0: +140,40,29123,1,0,0:0:0:0: +140,40,29357,2,0,B|172:16|220:24|220:24|288:36,1,144,0|2,0:0|0:3,0:0:0:0: +364,52,30060,1,0,0:0:0:0: +308,116,30295,6,0,B|300:168|300:168|328:256,1,144,4|2,0:3|0:3,0:0:0:0: +340,340,30998,1,0,0:0:0:0: +260,308,31232,2,0,L|188:304,1,72,0|2,0:0|0:3,0:0:0:0: +100,296,31701,1,2,0:3:0:0: +136,374,31935,1,0,0:0:0:0: +152,224,32170,6,0,P|160:152|132:88,1,144,4|2,0:3|0:3,0:0:0:0: +56,48,32873,1,0,0:0:0:0: +60,136,33107,2,0,L|56:208,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +224,76,34045,6,0,P|289:104|360:96,1,144,4|2,0:3|0:3,0:0:0:0: +432,48,34748,1,0,0:0:0:0: +440,132,34982,2,0,B|432:156|432:156|436:204,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +448,304,35920,6,0,B|412:315|380:292|380:292|348:269|312:280,1,144,4|2,0:3|0:3,0:0:0:0: +332,364,36623,1,0,0:0:0:0: +247,339,36857,2,0,P|230:308|225:273,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +312,280,37560,6,0,L|316:172,1,108 +134,35,38966,5,0,0:0:0:0: +72,96,39201,2,0,P|119:119|171:111,1,108,0|0,0:0|0:0,0:0:0:0: +192,100,39670,6,0,L|200:172,1,72,4|2,0:0|0:0,0:0:0:0: +147,240,40138,2,0,P|133:272|132:308,1,72,0|2,1:0|0:0,0:0:0:0: +216,292,40607,2,0,B|260:308|260:308|356:292,1,144,4|0,2:3|1:0,1:0:0:0: +356,292,41310,1,2,0:0:0:0: +436,327,41545,6,0,P|441:292|435:257,1,72,4|2,0:3|0:0,0:0:0:0: +364,204,42013,2,0,P|336:144|352:68,1,144,0|4,1:0|2:3,1:0:0:0: +404,0,42716,1,2,0:0:0:0: +440,80,42951,2,0,B|464:84|464:84|512:80,1,72,0|2,1:0|0:0,0:0:0:0: +351,71,43420,6,0,B|296:68|296:68|268:76|268:76|196:72,1,144,4|0,2:3|1:0,1:0:0:0: +120,68,44123,1,2,0:0:0:0: +160,144,44357,2,0,P|172:180|168:232,1,72,4|2,0:3|0:0,0:0:0:0: +76,264,44826,2,0,P|76:228|88:194,1,72,0|2,1:0|0:0,0:0:0:0: +160,144,45295,5,4,0:3:0:0: +244,164,45529,1,2,0:0:0:0: +268,248,45763,2,0,L|344:252,1,72,0|2,1:0|0:0,0:0:0:0: +408,156,46232,2,0,L|336:159,1,72,4|2,0:3|0:0,0:0:0:0: +212,72,46701,2,0,L|288:76,1,72,0|2,1:0|0:0,0:0:0:0: +400,72,47170,6,0,P|464:96|488:172,1,144,4|0,2:0|1:0,1:0:0:0: +476,248,47873,1,2,0:0:0:0: +436,324,48107,2,0,L|284:320,1,144,4|0,2:3|1:0,1:0:0:0: +204,316,48810,1,2,0:0:0:0: +127,355,49045,6,0,P|120:321|124:285,1,72,4|2,0:3|0:0,0:0:0:0: +192,232,49513,2,0,L|335:228,1,144,0|4,1:0|2:3,1:0:0:0: +412,188,50216,1,2,0:0:0:0: +444,108,50451,2,0,P|452:72|448:36,1,72,0|2,1:0|0:0,0:0:0:0: +368,68,50920,6,0,B|332:79|300:56|300:56|268:33|232:44,1,144,4|0,2:3|1:0,1:0:0:0: +152,76,51623,1,2,0:0:0:0: +76,116,51857,2,0,L|80:268,1,144,4|0,2:3|1:0,1:0:0:0: +80,260,52560,1,2,0:0:0:0: +8,308,52795,6,0,P|34:334|69:346,1,72,4|2,0:3|0:0,0:0:0:0: +148,312,53263,2,0,P|163:278|162:241,1,72,0|2,1:0|0:0,0:0:0:0: +156,156,53732,5,0,3:0:0:0: +156,156,53966,1,2,0:0:0:0: +236,196,54201,2,0,L|312:192,1,72,8|0,0:3|0:0,0:0:0:0: +368,256,54670,6,0,P|392:216|352:116,1,144,4|2,0:0|1:2,0:0:0:0: +288,92,55373,1,0,0:0:0:0: +360,40,55607,2,0,L|432:36,1,72,4|0,0:3|3:0,0:0:0:0: +288,92,56076,2,0,L|216:88,1,72,2|0,1:2|0:0,0:0:0:0: +132,72,56545,6,0,P|172:88|200:184,1,144,4|2,0:3|1:2,0:0:0:0: +143,241,57248,1,0,0:0:0:0: +65,202,57482,2,0,P|87:174|119:157,1,72,4|0,0:3|3:0,0:0:0:0: +132,324,57951,2,0,P|98:312|72:288,1,72,2|0,1:2|0:0,0:0:0:0: +143,241,58420,6,0,L|288:240,1,144,4|2,0:3|1:2,0:0:0:0: +372,240,59123,1,0,0:0:0:0: +330,314,59357,2,0,P|318:350|322:390,1,72,4|0,0:3|3:0,0:0:0:0: +452,264,59826,2,0,P|453:228|442:194,1,72,2|0,1:2|0:0,0:0:0:0: +384,128,60295,6,0,B|336:144|336:144|244:128,1,144,4|2,0:3|1:2,0:0:0:0: +164,160,60998,2,0,P|160:116|168:88,1,72,0|4,0:0|0:3,0:0:0:0: +244,128,61466,2,0,P|248:172|240:200,1,72,0|2,3:0|1:2,0:0:0:0: +168,248,61935,1,0,0:0:0:0: +120,320,62170,6,0,P|196:328|252:272,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: +80,244,63341,1,0,3:0:0:0: +100,160,63576,2,0,L|24:156,1,72,2|0,1:2|0:0,0:0:0:0: +180,128,64045,6,0,P|249:138|304:94,1,144,4|2,0:3|1:2,0:0:0:0: +226,57,64748,1,0,0:0:0:0: +304,94,64982,2,0,L|300:166,1,72,4|0,0:3|3:0,0:0:0:0: +377,203,65451,2,0,L|388:132,1,72,2|0,1:2|0:0,0:0:0:0: +468,180,65920,6,0,L|432:328,1,144,4|2,0:3|1:2,0:0:0:0: +276,252,66857,2,0,P|208:248|140:280,1,144,4|2,0:3|1:2,0:0:0:0: +84,344,67560,1,0,0:0:0:0: +56,260,67795,6,0,L|52:188,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +168,128,68732,2,0,L|172:56,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +244,168,69435,1,0,0:0:0:0: +332,164,69670,1,4,0:3:0:0: +208,328,84670,6,0,P|224:264|216:188,1,144,4|2,0:3|0:3,0:0:0:0: +168,116,85373,1,0,0:0:0:0: +96,68,85607,2,0,P|60:72|4:68,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +268,40,86545,6,0,P|336:28|404:56,1,144,4|2,0:3|0:3,0:0:0:0: +452,128,87248,1,0,0:0:0:0: +476,212,87482,2,0,L|472:284,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +324,132,88420,6,0,P|320:200|316:284,1,144,4|2,0:3|0:3,0:0:0:0: +372,344,89123,1,0,0:0:0:0: +372,344,89357,2,0,B|340:368|292:360|292:360|224:348,1,144,0|2,0:0|0:3,0:0:0:0: +148,332,90060,1,0,0:0:0:0: +204,268,90295,6,0,B|212:216|212:216|184:128,1,144,4|2,0:3|0:3,0:0:0:0: +172,44,90998,1,0,0:0:0:0: +252,76,91232,2,0,L|324:80,1,72,0|2,0:0|0:3,0:0:0:0: +412,88,91701,1,2,0:3:0:0: +377,9,91935,1,0,0:0:0:0: +360,160,92170,6,0,P|352:232|380:296,1,144,4|2,0:3|0:3,0:0:0:0: +456,336,92873,1,0,0:0:0:0: +452,248,93107,2,0,L|456:176,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +288,308,94045,6,0,P|223:280|152:288,1,144,4|2,0:3|0:3,0:0:0:0: +80,336,94748,1,0,0:0:0:0: +72,252,94982,2,0,B|80:228|80:228|76:180,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +64,80,95920,6,0,B|100:69|132:92|132:92|164:115|200:104,1,144,4|2,0:3|0:3,0:0:0:0: +180,20,96623,1,0,0:0:0:0: +265,45,96857,2,0,P|282:76|287:111,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: +200,104,97560,1,0,0:0:0:0: +200,104,97677,1,0,0:0:0:0: +200,104,97795,6,0,B|196:142|217:166|217:166|176:180|160:220,1,144,4|0,0:3|0:0,0:0:0:0: +240,248,98966,5,0,0:0:0:0: +202,325,99201,2,0,P|254:333|301:309,1,108,0|0,0:0|0:0,0:0:0:0: +315,292,99670,6,0,L|323:220,1,72,4|2,0:0|0:0,0:0:0:0: +365,144,100138,2,0,P|379:112|380:76,1,72,0|2,1:0|0:0,0:0:0:0: +296,92,100607,2,0,B|252:76|252:76|156:92,1,144,4|0,2:3|1:0,1:0:0:0: +156,92,101310,1,2,0:0:0:0: +76,57,101545,6,0,P|71:92|77:127,1,72,4|2,0:3|0:0,0:0:0:0: +148,180,102013,2,0,P|176:240|160:316,1,144,0|4,1:0|2:3,1:0:0:0: +108,384,102716,1,2,0:0:0:0: +72,304,102951,2,0,B|48:300|48:300|0:304,1,72,0|2,1:0|0:0,0:0:0:0: +161,313,103420,6,0,B|216:316|216:316|244:308|244:308|316:312,1,144,4|0,2:3|1:0,1:0:0:0: +392,316,104123,1,2,0:0:0:0: +352,240,104357,2,0,P|340:204|344:152,1,72,4|2,0:3|0:0,0:0:0:0: +436,120,104826,2,0,P|436:156|424:190,1,72,0|2,1:0|0:0,0:0:0:0: +352,240,105295,5,4,0:3:0:0: +268,220,105529,1,2,0:0:0:0: +244,136,105763,2,0,L|168:132,1,72,0|2,1:0|0:0,0:0:0:0: +104,228,106232,2,0,L|176:225,1,72,4|2,0:3|0:0,0:0:0:0: +300,312,106701,2,0,L|224:308,1,72,0|2,1:0|0:0,0:0:0:0: +112,312,107170,6,0,P|48:288|24:212,1,144,4|0,2:0|1:0,1:0:0:0: +36,136,107873,1,2,0:0:0:0: +76,60,108107,2,0,L|228:64,1,144,4|0,2:3|1:0,1:0:0:0: +308,68,108810,1,2,0:0:0:0: +385,29,109045,6,0,P|392:63|388:99,1,72,4|2,0:3|0:0,0:0:0:0: +320,152,109513,2,0,L|177:156,1,144,0|4,1:0|2:3,1:0:0:0: +100,196,110216,1,2,0:0:0:0: +68,276,110451,2,0,P|60:312|64:348,1,72,0|2,1:0|0:0,0:0:0:0: +144,316,110920,6,0,B|180:305|212:328|212:328|244:351|280:340,1,144,4|0,2:3|1:0,1:0:0:0: +360,308,111623,1,2,0:0:0:0: +436,268,111857,2,0,L|432:116,1,144,4|0,2:3|1:0,1:0:0:0: +432,124,112560,1,2,0:0:0:0: +504,76,112795,6,0,P|478:50|443:38,1,72,4|2,0:3|0:0,0:0:0:0: +364,72,113263,2,0,P|349:106|350:143,1,72,0|2,1:0|0:0,0:0:0:0: +356,228,113732,5,0,3:0:0:0: +356,228,113966,1,2,0:0:0:0: +276,188,114201,2,0,L|200:192,1,72,8|0,0:3|0:0,0:0:0:0: +144,128,114670,6,0,P|120:168|160:268,1,144,4|2,0:0|1:2,0:0:0:0: +224,292,115373,1,0,0:0:0:0: +152,344,115607,2,0,L|80:348,1,72,4|0,0:3|3:0,0:0:0:0: +224,292,116076,2,0,L|296:296,1,72,2|0,1:2|0:0,0:0:0:0: +380,312,116545,6,0,P|340:296|312:200,1,144,4|2,0:3|1:2,0:0:0:0: +369,143,117248,1,0,0:0:0:0: +447,182,117482,2,0,P|425:210|393:227,1,72,4|0,0:3|3:0,0:0:0:0: +380,60,117951,2,0,P|414:72|440:96,1,72,2|0,1:2|0:0,0:0:0:0: +369,143,118420,6,0,L|224:144,1,144,4|2,0:3|1:2,0:0:0:0: +140,144,119123,1,0,0:0:0:0: +182,70,119357,2,0,P|194:34|190:-6,1,72,4|0,0:3|3:0,0:0:0:0: +60,120,119826,2,0,P|59:156|70:190,1,72,2|0,1:2|0:0,0:0:0:0: +128,256,120295,6,0,B|176:240|176:240|268:256,1,144,4|2,0:3|1:2,0:0:0:0: +348,224,120998,2,0,P|352:268|344:296,1,72,0|4,0:0|0:3,0:0:0:0: +268,256,121466,2,0,P|264:212|272:184,1,72,0|2,3:0|1:2,0:0:0:0: +344,136,121935,1,0,0:0:0:0: +392,64,122170,6,0,P|316:56|260:112,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: +432,140,123341,1,0,3:0:0:0: +412,224,123576,2,0,L|488:228,1,72,2|0,1:2|0:0,0:0:0:0: +332,256,124045,6,0,P|263:246|208:290,1,144,4|2,0:3|1:2,0:0:0:0: +286,327,124748,1,0,0:0:0:0: +208,290,124982,2,0,L|212:218,1,72,4|0,0:3|3:0,0:0:0:0: +135,181,125451,2,0,L|124:252,1,72,2|0,1:2|0:0,0:0:0:0: +44,204,125920,6,0,L|80:56,1,144,4|2,0:3|1:2,0:0:0:0: +236,132,126857,2,0,P|304:136|372:104,1,144,4|2,0:3|1:2,0:0:0:0: +428,40,127560,1,0,0:0:0:0: +456,124,127795,6,0,L|460:196,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +344,256,128732,2,0,L|340:328,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +268,216,129435,1,0,0:0:0:0: +180,220,129670,5,4,2:0:0:0: +256,40,130373,1,2,0:0:0:0: +64,68,131076,1,2,0:0:0:0: +92,136,131310,1,0,0:0:0:0: +64,204,131545,6,0,L|60:288,1,72 +31,343,132248,2,0,P|86:345|127:309,1,108 +332,220,133420,5,2,0:0:0:0: +256,40,134123,1,2,0:0:0:0: +448,68,134826,1,2,0:0:0:0: +420,136,135060,1,0,0:0:0:0: +448,204,135295,6,0,L|452:288,1,72,2|0,0:0|0:0,0:0:0:0: +480,343,135998,2,0,P|426:345|385:309,1,108 +256,192,137170,5,2,0:0:0:0: +156,360,137873,1,2,0:0:0:0: +356,360,138576,2,0,L|352:308,1,36,2|0,0:0|0:0,0:0:0:0: +304,268,139045,6,0,P|336:253|372:252,1,72 +448,260,139748,2,0,L|444:152,1,108 +256,192,140920,5,2,0:0:0:0: +356,24,141623,1,2,0:0:0:0: +156,24,142326,2,0,L|160:72,1,36,2|0,0:0|0:0,0:0:0:0: +208,116,142795,6,0,P|176:131|140:132,1,72,2|0,0:0|0:0,0:0:0:0: +64,124,143498,2,0,L|68:232,1,108 +68,232,144670,5,4,0:3:0:0: +216,320,145138,1,4,0:3:0:0: +304,172,145607,1,4,0:3:0:0: +156,84,146075,1,4,0:3:0:0: +296,320,146545,5,4,0:3:0:0: +208,172,147013,1,4,0:3:0:0: +356,84,147482,1,4,0:3:0:0: +444,232,147950,1,4,0:3:0:0: +296,320,148420,6,0,P|252:328|192:296,2,108.000004119873,4|4|4,0:3|0:3|0:3,0:0:0:0: +260,248,149591,1,0,0:0:0:0: +320,196,149826,2,0,L|316:140,1,54.0000020599366,4|0,0:3|0:0,0:0:0:0: +120,236,159670,6,0,L|176:232,1,54.0000020599366,4|0,0:3|0:0,0:0:0:0: +160,152,160138,2,0,L|104:156,1,54.0000020599366,2|0,0:0|0:0,0:0:0:0: +240,180,160607,2,0,P|292:188|344:172,1,108.000004119873,4|2,0:3|0:0,3:0:0:0: +408,120,161310,1,0,3:0:0:0: +424,200,161545,6,0,L|420:256,1,54.0000020599366,4|0,0:3|0:0,0:0:0:0: +376,320,162013,2,0,P|396:328|480:304,2,108.000004119873,2|6|2,2:0|0:3|2:0,3:0:0:0: +312,268,163185,1,0,0:0:0:0: +296,348,163420,6,0,L|240:344,1,54.0000020599366,4|0,3:0|3:0,0:0:0:0: +160,320,163888,2,0,L|100:316,1,57.6,4|0,3:0|3:0,0:0:0:0: +64,232,164357,6,0,L|128:228,1,61.2000011672974,4|0,3:0|3:0,0:0:0:0: +204,200,164825,2,0,L|268:196,1,61.2000011672974,4|0,3:0|3:0,0:0:0:0: +232,108,165295,6,0,L|164:104,1,68.399998173523,4|0,3:0|3:0,0:0:0:0: +80,84,165763,2,0,L|4:80,1,72,4|0,3:0|3:0,0:0:0:0: +324,120,167170,6,0,P|388:128|456:92,1,144,4|2,0:0|1:2,0:0:0:0: +496,168,167873,1,0,0:0:0:0: +496,168,168107,2,0,P|484:204|488:256,1,72,4|0,0:3|3:0,0:0:0:0: +408,296,168576,2,0,P|398:261|378:231,1,72,2|0,1:2|0:0,0:0:0:0: +296,200,169045,6,0,B|228:228|156:204,1,144,4|2,0:3|1:2,0:0:0:0: +84,156,169748,1,0,0:0:0:0: +80,244,169982,2,0,L|76:316,1,72,4|0,0:3|3:0,0:0:0:0: +170,274,170451,2,0,L|156:204,1,72,2|0,1:2|0:0,0:0:0:0: +216,140,170920,6,0,L|284:276,1,144,4|2,0:3|1:2,0:0:0:0: +320,344,171623,1,0,0:0:0:0: +372,276,171857,2,0,P|366:240|349:207,1,72,4|0,0:3|3:0,0:0:0:0: +312,132,172326,2,0,L|276:60,1,72,2|0,1:2|0:0,0:0:0:0: +208,20,172795,6,0,P|272:36|348:12,1,144,4|2,0:3|1:2,0:0:0:0: +424,48,173498,2,0,L|412:132,1,72,0|4,0:0|0:3,0:0:0:0: +484,168,173966,2,0,L|472:252,1,72,0|2,3:0|1:2,0:0:0:0: +400,280,174435,1,0,0:0:0:0: +346,348,174670,6,0,P|414:363|472:324,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: +312,268,175841,1,0,3:0:0:0: +256,336,176076,2,0,L|184:332,1,72,2|0,1:2|0:0,0:0:0:0: +80,244,176545,6,0,B|140:248|140:248|164:244|164:244|223:247,1,144,4|2,0:3|1:2,0:0:0:0: +312,268,177248,1,0,0:0:0:0: +224,247,177482,2,0,P|240:215|272:187,1,72,4|0,0:3|3:0,0:0:0:0: +204,131,177951,2,0,P|233:111|275:103,1,72,2|0,1:2|0:0,0:0:0:0: +240,23,178420,6,0,B|280:15|316:35|316:35|376:71,1,144,4|2,0:3|1:2,0:0:0:0: +399,236,179357,2,0,B|359:244|323:224|323:224|263:188,1,144,4|2,0:3|1:2,0:0:0:0: +204,132,180060,1,0,0:0:0:0: +184,216,180295,6,0,L|188:288,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +120,156,180998,1,0,0:0:0:0: +56,96,181232,2,0,L|60:24,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: +36,180,181935,1,0,0:0:0:0: +100,240,182170,6,0,P|144:300|116:380,2,144,4|2|4,0:0|1:2|0:3,0:0:0:0: +60,316,183341,1,0,0:0:0:0: +220,352,183576,2,0,L|308:348,1,72,2|0,1:2|0:0,0:0:0:0: +396,264,184045,6,0,B|336:268|336:268|312:264|312:264|253:267,1,144,4|2,0:3|1:2,0:0:0:0: +253,267,184748,1,0,0:0:0:0: +268,180,184982,2,0,L|339:177,1,72,4|0,0:3|0:0,0:0:0:0: +164,280,185451,2,0,L|92:282,1,72,2|0,1:2|0:0,0:0:0:0: +52,208,185920,6,0,P|8:268|32:344,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: +140,212,187091,1,0,0:0:0:0: +92,284,187326,2,0,P|104:316|100:368,1,72,2|0,1:2|0:0,0:0:0:0: +52,208,187795,6,0,P|48:136|76:72,1,144,4|2,0:3|1:2,0:0:0:0: +160,52,188498,2,0,P|188:28|220:16,1,72,0|4,0:0|0:3,0:0:0:0: +232,100,188966,2,0,P|268:93|301:98,1,72,0|2,0:0|1:2,0:0:0:0: +372,152,189435,1,0,0:0:0:0: +420,224,189670,6,0,P|428:296|400:360,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: +372,152,190841,1,0,0:0:0:0: +392,68,191076,2,0,L|465:64,1,72,2|0,1:2|0:0,0:0:0:0: +304,92,191545,6,0,P|236:104|168:76,1,144,4|2,0:3|1:2,0:0:0:0: +108,12,192248,1,0,0:0:0:0: +168,76,192482,2,0,L|172:152,1,72,4|0,0:3|0:0,0:0:0:0: +80,136,192951,2,0,L|101:204,1,72,2|0,1:2|0:0,0:0:0:0: +12,220,193420,6,0,B|50:279|50:279|80:300|120:292,1,144,4|2,0:3|1:2,0:0:0:0: +284,232,194357,2,0,B|320:221|352:244|352:244|384:267|420:256,1,144,4|2,0:3|1:2,0:0:0:0: +488,200,195060,1,0,0:0:0:0: +507,284,195295,6,0,P|492:315|464:338,1,72,4|0,0:0|0:0,0:0:0:0: +380,356,195763,2,0,L|236:352,1,144,0|4,1:0|0:3,0:0:0:0: +152,328,196466,1,0,3:0:0:0: +64,336,196701,2,0,P|29:325|4:300,1,72,0|0,1:0|0:0,0:0:0:0: +76,252,197170,6,0,P|108:188|96:116,1,144,4|0,0:0|1:0,0:0:0:0: +36,56,197873,1,2,0:0:0:0: +120,32,198107,2,0,L|192:28,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +248,152,199045,6,0,P|280:168|304:196,1,72,4|2,0:3|0:0,0:0:0:0: +336,277,199513,2,0,P|306:296|269:303,1,72,2|0,1:2|0:0,0:0:0:0: +183,290,199982,2,0,P|180:254|193:219,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: +436,252,200920,6,0,P|404:188|416:116,1,144,4|0,0:3|1:0,0:0:0:0: +476,56,201623,1,2,0:0:0:0: +392,32,201857,2,0,L|320:28,2,72,4|0|2,0:3|0:0|1:2,0:0:0:0: +264,152,202795,6,0,P|232:168|208:196,1,72,4|2,0:3|0:0,0:0:0:0: +176,277,203263,2,0,P|205:296|242:303,1,72,2|0,1:2|0:0,0:0:0:0: +329,290,203732,2,0,P|331:254|318:219,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: +72,324,204670,6,0,B|60:272|60:272|76:180,1,144,4|0,0:0|1:0,0:0:0:0: +92,96,205373,1,2,0:0:0:0: +8,124,205607,2,0,P|5:88|14:53,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +168,192,206545,6,0,P|200:174|237:173,1,72,4|2,0:3|0:0,0:0:0:0: +320,160,207013,2,0,P|318:196|301:229,1,72,2|0,1:2|0:0,0:0:0:0: +272,307,207482,2,0,P|240:287|221:256,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: +440,324,208420,6,0,B|452:272|452:272|436:180,1,144,4|0,0:3|1:0,0:0:0:0: +420,96,209123,1,2,0:0:0:0: +504,124,209357,2,0,P|507:88|498:53,2,72,4|0|2,0:3|0:0|1:2,0:0:0:0: +344,192,210295,6,0,P|311:174|274:173,1,72,4|2,0:3|0:0,0:0:0:0: +190,156,210763,2,0,P|191:192|208:225,1,72,2|0,1:2|0:0,0:0:0:0: +288,256,211232,1,4,0:3:0:0: +132,332,211701,1,0,1:0:0:0: +28,192,212170,6,0,P|16:120|44:56,1,144,4|0,0:0|1:0,0:0:0:0: +120,16,212873,1,2,0:0:0:0: +204,32,213107,2,0,L|304:28,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +192,204,214045,6,0,P|196:240|216:272,1,72,4|2,0:3|0:0,0:0:0:0: +298,241,214513,2,0,P|327:219|345:186,1,72,6|0,1:2|0:0,0:0:0:0: +280,132,214982,2,0,P|246:117|209:118,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: +484,192,215920,6,0,P|496:120|468:56,1,144,4|0,0:3|1:0,0:0:0:0: +392,16,216623,1,2,0:0:0:0: +308,32,216857,2,0,L|208:28,2,72,4|0|2,0:3|0:0|1:2,0:0:0:0: +320,204,217795,6,0,P|316:240|296:272,1,72,4|2,0:3|0:0,0:0:0:0: +213,241,218263,2,0,P|184:219|166:186,1,72,2|0,1:2|0:0,0:0:0:0: +232,132,218732,2,0,B|260:112|300:116|300:116|384:128,1,144,4|0,0:3|1:0,0:0:0:0: +348,336,219670,6,0,B|320:356|280:352|280:352|196:340,1,144,4|0,0:0|1:0,0:0:0:0: +124,328,220373,1,2,0:0:0:0: +54,276,220607,2,0,P|41:308|39:345,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: +156,80,221545,6,0,L|251:94,1,72,4|2,0:3|0:0,0:0:0:0: +212,169,222013,2,0,L|148:160,1,64.799998022461,2|0,1:2|0:0,0:0:0:0: +140,240,222482,2,0,L|216:252,2,57.6,4|2|0,0:3|0:0|1:0,0:0:0:0: +256,192,223420,12,0,227170,0:0:0:0: +"; + } +} diff --git a/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs index af482dc250..68bb3f6dd9 100644 --- a/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs @@ -4,11 +4,17 @@ using osu.Framework.Audio.Track; using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps; +using osu.Game.Rulesets; namespace osu.Game.Tests.Beatmaps { public class TestWorkingBeatmap : WorkingBeatmap { + public TestWorkingBeatmap(RulesetInfo ruleset) + : this(new TestBeatmap(ruleset)) + { + } + public TestWorkingBeatmap(Beatmap beatmap) : base(beatmap.BeatmapInfo) { @@ -16,7 +22,6 @@ namespace osu.Game.Tests.Beatmaps } private readonly Beatmap beatmap; - protected override Beatmap GetBeatmap() => beatmap; protected override Texture GetBackground() => null; protected override Track GetTrack() => new TrackVirtual(); diff --git a/osu.Game/Tests/Visual/TestCasePlayer.cs b/osu.Game/Tests/Visual/TestCasePlayer.cs index d835adb54f..b7c66a37e5 100644 --- a/osu.Game/Tests/Visual/TestCasePlayer.cs +++ b/osu.Game/Tests/Visual/TestCasePlayer.cs @@ -1,9 +1,7 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.IO; using System.Linq; -using System.Text; using osu.Framework.Allocation; using osu.Framework.Graphics.Shapes; using osu.Game.Beatmaps; @@ -59,24 +57,13 @@ namespace osu.Game.Tests.Visual } } - protected virtual Beatmap CreateBeatmap() - { - Beatmap beatmap; - - using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(test_beatmap_data))) - using (var reader = new StreamReader(stream)) - beatmap = Game.Beatmaps.Formats.Decoder.GetDecoder(reader).Decode(reader); - - return beatmap; - } + protected virtual Beatmap CreateBeatmap(Ruleset ruleset) => new TestBeatmap(ruleset.RulesetInfo); private Player loadPlayerFor(RulesetInfo ri) => loadPlayerFor(ri.CreateInstance()); private Player loadPlayerFor(Ruleset r) { - var beatmap = CreateBeatmap(); - - beatmap.BeatmapInfo.Ruleset = r.RulesetInfo; + var beatmap = CreateBeatmap(r); working = new TestWorkingBeatmap(beatmap); working.Mods.Value = new[] { r.GetAllMods().First(m => m is ModNoFail) }; @@ -107,699 +94,5 @@ namespace osu.Game.Tests.Visual AllowLeadIn = false, AllowResults = false, }; - - private const string test_beatmap_data = - @"osu file format v14 - -[General] -AudioLeadIn: 500 -PreviewTime: 53498 -Countdown: 0 -SampleSet: Soft -StackLeniency: 0.7 -Mode: 0 -LetterboxInBreaks: 0 -WidescreenStoryboard: 1 - -[Editor] -DistanceSpacing: 1.2 -BeatDivisor: 4 -GridSize: 4 -TimelineZoom: 1 - -[Metadata] -Title:My Love -TitleUnicode:My Love -Artist:Kuba Oms -ArtistUnicode:Kuba Oms -Creator:W h i t e -Version:Hard -Source:ADHD -Tags:Monthly Beatmapping Contest Electronic folk pop w_h_i_t_e -BeatmapID:397534 -BeatmapSetID:163112 - -[Difficulty] -HPDrainRate:5 -CircleSize:4 -OverallDifficulty:6 -ApproachRate:7 -SliderMultiplier:1.44 -SliderTickRate:2 - -[Events] -//Break Periods -2,69870,83770 -2,152170,158770 -//Storyboard Layer 0 (Background) -//Storyboard Layer 1 (Fail) -//Storyboard Layer 2 (Pass) -//Storyboard Layer 3 (Foreground) -//Storyboard Sound Samples - -[TimingPoints] -2170,468.75,4,2,0,40,1,0 -4045,-100,4,2,0,30,0,0 -4162,-100,4,2,0,40,0,0 -5920,-100,4,2,0,30,0,0 -6037,-100,4,2,0,40,0,0 -7795,-100,4,2,0,30,0,0 -7912,-100,4,2,0,40,0,0 -9670,-100,4,2,0,40,0,0 -9787,-100,4,2,0,50,0,0 -11545,-100,4,2,0,40,0,0 -11662,-100,4,2,0,50,0,0 -13420,-100,4,2,0,40,0,0 -13537,-100,4,2,0,50,0,0 -15295,-100,4,2,0,40,0,0 -15412,-100,4,2,0,50,0,0 -17170,-100,4,2,0,40,0,0 -17287,-100,4,2,0,50,0,0 -19045,-100,4,2,0,40,0,0 -19162,-100,4,2,0,50,0,0 -20920,-100,4,2,0,40,0,0 -21037,-100,4,2,0,50,0,0 -22795,-100,4,2,0,40,0,0 -22912,-100,4,2,0,50,0,0 -24670,-100,4,2,0,70,0,0 -37560,-200,4,2,0,30,0,0 -38263,-200,4,2,0,5,0,0 -38966,-100,4,2,0,30,0,0 -39670,-100,4,2,0,70,0,0 -53732,-100,4,2,0,40,0,0 -54670,-100,4,2,0,80,0,1 -55138,-100,4,2,0,60,0,1 -55255,-100,4,2,0,80,0,1 -56076,-100,4,2,0,60,0,1 -56193,-100,4,2,0,80,0,1 -57013,-100,4,2,0,60,0,1 -57130,-100,4,2,0,80,0,1 -57951,-100,4,2,0,60,0,1 -58068,-100,4,2,0,80,0,1 -58888,-100,4,2,0,60,0,1 -59005,-100,4,2,0,80,0,1 -59826,-100,4,2,0,60,0,1 -59943,-100,4,2,0,80,0,1 -60763,-100,4,2,0,60,0,1 -60880,-100,4,2,0,80,0,1 -61701,-100,4,2,0,60,0,1 -61818,-100,4,2,0,80,0,1 -62638,-100,4,2,0,60,0,1 -62755,-100,4,2,0,80,0,1 -63576,-100,4,2,0,60,0,1 -63693,-100,4,2,0,80,0,1 -64513,-100,4,2,0,60,0,1 -64630,-100,4,2,0,80,0,1 -65451,-100,4,2,0,60,0,1 -65568,-100,4,2,0,80,0,1 -66388,-100,4,2,0,60,0,1 -66505,-100,4,2,0,80,0,1 -67326,-100,4,2,0,60,0,1 -67443,-100,4,2,0,80,0,1 -68263,-100,4,2,0,60,0,1 -68380,-100,4,2,0,80,0,1 -69201,-100,4,2,0,60,0,1 -69318,-100,4,2,0,80,0,1 -69670,-100,4,2,0,70,0,0 -84670,-100,4,2,0,70,0,0 -97560,-200,4,2,0,70,0,0 -97795,-200,4,2,0,30,0,0 -98966,-100,4,2,0,30,0,0 -99670,-100,4,2,0,70,0,0 -113732,-100,4,2,0,40,0,0 -114670,-100,4,2,0,80,0,1 -115138,-100,4,2,0,60,0,1 -115255,-100,4,2,0,80,0,1 -116076,-100,4,2,0,60,0,1 -116193,-100,4,2,0,80,0,1 -117013,-100,4,2,0,60,0,1 -117130,-100,4,2,0,80,0,1 -117951,-100,4,2,0,60,0,1 -118068,-100,4,2,0,80,0,1 -118888,-100,4,2,0,60,0,1 -119005,-100,4,2,0,80,0,1 -119826,-100,4,2,0,60,0,1 -119943,-100,4,2,0,80,0,1 -120763,-100,4,2,0,60,0,1 -120880,-100,4,2,0,80,0,1 -121701,-100,4,2,0,60,0,1 -121818,-100,4,2,0,80,0,1 -122638,-100,4,2,0,60,0,1 -122755,-100,4,2,0,80,0,1 -123576,-100,4,2,0,60,0,1 -123693,-100,4,2,0,80,0,1 -124513,-100,4,2,0,60,0,1 -124630,-100,4,2,0,80,0,1 -125451,-100,4,2,0,60,0,1 -125568,-100,4,2,0,80,0,1 -126388,-100,4,2,0,60,0,1 -126505,-100,4,2,0,80,0,1 -127326,-100,4,2,0,60,0,1 -127443,-100,4,2,0,80,0,1 -128263,-100,4,2,0,60,0,1 -128380,-100,4,2,0,80,0,1 -129201,-100,4,2,0,60,0,1 -129318,-100,4,2,0,80,0,1 -129670,-200,4,2,0,40,0,0 -144670,-133.333333333333,4,2,0,40,0,0 -159670,-133.333333333333,4,2,0,40,0,0 -163420,-133.333333333333,4,2,0,45,0,0 -163888,-125,4,2,0,50,0,0 -164357,-117.647058823529,4,2,0,55,0,0 -164826,-111.111111111111,4,2,0,60,0,0 -165295,-105.263157894737,4,2,0,65,0,0 -165763,-100,4,2,0,70,0,0 -166232,-100,4,2,0,40,0,0 -167170,-100,4,2,0,80,0,1 -167638,-100,4,2,0,60,0,1 -167755,-100,4,2,0,80,0,1 -168576,-100,4,2,0,60,0,1 -168693,-100,4,2,0,80,0,1 -169513,-100,4,2,0,60,0,1 -169630,-100,4,2,0,80,0,1 -170451,-100,4,2,0,60,0,1 -170568,-100,4,2,0,80,0,1 -171388,-100,4,2,0,60,0,1 -171505,-100,4,2,0,80,0,1 -172326,-100,4,2,0,60,0,1 -172443,-100,4,2,0,80,0,1 -173263,-100,4,2,0,60,0,1 -173380,-100,4,2,0,80,0,1 -174201,-100,4,2,0,60,0,1 -174318,-100,4,2,0,80,0,1 -175138,-100,4,2,0,60,0,1 -175255,-100,4,2,0,80,0,1 -176076,-100,4,2,0,60,0,1 -176193,-100,4,2,0,80,0,1 -177013,-100,4,2,0,60,0,1 -177130,-100,4,2,0,80,0,1 -177951,-100,4,2,0,60,0,1 -178068,-100,4,2,0,80,0,1 -178888,-100,4,2,0,60,0,1 -179005,-100,4,2,0,80,0,1 -179826,-100,4,2,0,60,0,1 -179943,-100,4,2,0,80,0,1 -180763,-100,4,2,0,60,0,1 -180880,-100,4,2,0,80,0,1 -180998,-100,4,2,0,80,0,0 -181466,-100,4,2,0,60,0,0 -181584,-100,4,2,0,80,0,0 -181935,-100,4,2,0,80,0,0 -182170,-100,4,2,0,80,0,1 -182638,-100,4,2,0,60,0,1 -182755,-100,4,2,0,80,0,1 -183576,-100,4,2,0,60,0,1 -183693,-100,4,2,0,80,0,1 -184513,-100,4,2,0,60,0,1 -184630,-100,4,2,0,80,0,1 -185451,-100,4,2,0,60,0,1 -185568,-100,4,2,0,80,0,1 -186388,-100,4,2,0,60,0,1 -186505,-100,4,2,0,80,0,1 -187326,-100,4,2,0,60,0,1 -187443,-100,4,2,0,80,0,1 -188263,-100,4,2,0,60,0,1 -188380,-100,4,2,0,80,0,1 -189201,-100,4,2,0,60,0,1 -189318,-100,4,2,0,80,0,1 -190138,-100,4,2,0,60,0,1 -190255,-100,4,2,0,80,0,1 -191076,-100,4,2,0,60,0,1 -191193,-100,4,2,0,80,0,1 -192013,-100,4,2,0,60,0,1 -192130,-100,4,2,0,80,0,1 -192951,-100,4,2,0,60,0,1 -193068,-100,4,2,0,80,0,1 -193888,-100,4,2,0,60,0,1 -194005,-100,4,2,0,80,0,1 -194826,-100,4,2,0,60,0,1 -194943,-100,4,2,0,80,0,1 -195295,-100,4,2,0,50,0,1 -195529,-100,4,2,0,52,0,1 -195646,-100,4,2,0,54,0,1 -195763,-100,4,2,0,56,0,1 -195880,-100,4,2,0,58,0,1 -195998,-100,4,2,0,60,0,1 -196115,-100,4,2,0,62,0,1 -196232,-100,4,2,0,64,0,1 -196349,-100,4,2,0,68,0,1 -196466,-100,4,2,0,70,0,1 -196584,-100,4,2,0,72,0,1 -196701,-100,4,2,0,74,0,1 -196818,-100,4,2,0,76,0,1 -196935,-100,4,2,0,78,0,1 -197052,-100,4,2,0,80,0,1 -197170,-100,4,2,0,80,0,0 -197873,-100,4,2,0,60,0,0 -197990,-100,4,2,0,80,0,0 -198341,-100,4,2,0,60,0,0 -199045,-100,4,2,0,80,0,0 -199279,-100,4,2,0,60,0,0 -199630,-100,4,2,0,80,0,0 -200216,-100,4,2,0,60,0,0 -200334,-100,4,2,0,80,0,0 -201623,-100,4,2,0,60,0,0 -201740,-100,4,2,0,80,0,0 -202326,-100,4,2,0,60,0,0 -202443,-100,4,2,0,80,0,0 -203029,-100,4,2,0,60,0,0 -203498,-100,4,2,0,80,0,0 -203966,-100,4,2,0,60,0,0 -204201,-100,4,2,0,80,0,0 -205373,-100,4,2,0,60,0,0 -205490,-100,4,2,0,80,0,0 -205841,-100,4,2,0,60,0,0 -206076,-100,4,2,0,60,0,0 -206545,-100,4,2,0,80,0,0 -206779,-100,4,2,0,60,0,0 -207130,-100,4,2,0,80,0,0 -207716,-100,4,2,0,60,0,0 -207951,-100,4,2,0,80,0,0 -209123,-100,4,2,0,60,0,0 -209240,-100,4,2,0,80,0,0 -209826,-100,4,2,0,60,0,0 -209943,-100,4,2,0,80,0,0 -210529,-100,4,2,0,60,0,0 -210880,-100,4,2,0,80,0,0 -211232,-100,4,2,0,60,0,0 -211701,-100,4,2,0,70,0,0 -212170,-100,4,2,0,80,0,0 -212873,-100,4,2,0,60,0,0 -212990,-100,4,2,0,80,0,0 -213341,-100,4,2,0,60,0,0 -213576,-100,4,2,0,60,0,0 -214045,-100,4,2,0,80,0,0 -214279,-100,4,2,0,60,0,0 -214630,-100,4,2,0,80,0,0 -215216,-100,4,2,0,60,0,0 -215451,-100,4,2,0,80,0,0 -216623,-100,4,2,0,60,0,0 -216740,-100,4,2,0,80,0,0 -217326,-100,4,2,0,60,0,0 -217443,-100,4,2,0,80,0,0 -218029,-100,4,2,0,60,0,0 -218498,-100,4,2,0,80,0,0 -218732,-100,4,2,0,50,0,0 -219670,-100,4,2,0,70,0,0 -220138,-100,4,2,0,65,0,0 -220373,-100,4,2,0,45,0,0 -220490,-100,4,2,0,65,0,0 -220607,-100,4,2,0,60,0,0 -220841,-100,4,2,0,35,0,0 -221076,-100,4,2,0,35,0,0 -221545,-100,4,2,0,50,0,0 -221779,-100,4,2,0,30,0,0 -222013,-111.111111111111,4,2,0,25,0,0 -222130,-111.111111111111,4,2,0,40,0,0 -222482,-125,4,2,0,40,0,0 -222716,-125,4,2,0,20,0,0 -222951,-100,4,2,0,15,0,0 -223420,-100,4,2,0,30,0,0 -224357,-100,4,2,0,25,0,0 -225295,-100,4,2,0,20,0,0 -226232,-100,4,2,0,15,0,0 -226701,-100,4,2,0,10,0,0 -227170,-100,4,2,0,5,0,0 - - -[Colours] - Combo1 : 17,254,176 -Combo2 : 173,255,95 -Combo3 : 255,88,100 -Combo4 : 255,94,55 - -[HitObjects] -320,256,2170,6,0,P|256:284|192:256,1,144,4|0,0:0|0:0,0:0:0:0: -144,184,2873,1,0,0:0:0:0: -108,260,3107,2,0,P|112:296|100:336,1,72 -28,288,3576,2,0,P|24:252|36:212,1,72,0|0,0:0|0:0,0:0:0:0: -76,140,4045,6,0,L|220:136,1,144,4|0,0:0|0:0,0:0:0:0: -292,88,4748,1,0,0:0:0:0: -292,88,4982,2,0,P|304:120|300:168,1,72 -388,168,5451,2,0,P|396:133|416:103,1,72,0|0,0:0|0:0,0:0:0:0: -472,172,5920,6,0,B|470:200|457:222|457:222|488:256|476:308,1,144,4|0,0:0|0:0,0:0:0:0: -396,280,6623,1,0,0:0:0:0: -324,328,6857,2,0,P|288:332|252:324,1,72 -180,280,7326,2,0,L|108:284,1,72,0|0,0:0|0:0,0:0:0:0: -256,192,7795,12,0,9670,0:0:0:0: -428,212,10138,1,0,0:0:0:0: -292,320,10607,1,0,0:0:0:0: -184,184,11076,2,0,L|112:180,1,72,0|0,0:0|0:0,0:0:0:0: -24,172,11545,5,6,0:0:0:0: -160,280,12013,1,0,0:0:0:0: -268,144,12482,1,0,0:0:0:0: -132,36,12951,2,0,L|204:32,1,72,0|0,0:0|0:0,0:0:0:0: -284,60,13420,6,0,P|340:100|344:180,2,144,6|0|0,0:0|0:0|0:0,0:0:0:0: -268,144,14591,1,0,0:0:0:0: -284,228,14826,2,0,P|316:248|364:252,1,72,0|0,0:0|0:0,0:0:0:0: -436,248,15295,6,0,P|372:272|344:340,1,144,6|2,0:0|0:0,0:0:0:0: -168,338,16232,2,0,P|141:273|76:248,1,144,2|2,0:0|0:0,0:0:0:0: -4,296,16935,1,0,0:0:0:0: -80,336,17170,5,6,0:0:0:0: -44,168,17638,1,0,0:0:0:0: -212,128,18107,1,0,0:0:0:0: -248,296,18576,2,0,P|284:288|320:292,1,72,0|0,0:0|0:0,0:0:0:0: -400,324,19045,5,6,0:0:0:0: -280,200,19513,1,0,0:0:0:0: -368,52,19982,1,0,0:0:0:0: -488,176,20451,2,0,P|452:168|416:172,1,72,0|0,0:0|0:0,0:0:0:0: -336,200,20920,6,0,P|284:216|200:192,1,144,6|0,0:0|0:0,0:0:0:0: -200,192,21857,2,0,L|204:264,1,72,0|0,0:3|0:0,0:0:0:0: -117,244,22326,2,0,L|120:172,1,72,0|0,0:0|0:0,0:0:0:0: -40,152,22795,6,0,L|28:296,2,144,6|0|0,0:0|0:0|0:0,0:0:0:0: -152,24,24201,1,0,0:0:0:0: -220,76,24435,1,0,3:0:0:0: -304,56,24670,6,0,P|288:120|296:196,1,144,4|2,0:3|0:3,0:0:0:0: -344,268,25373,1,0,0:0:0:0: -416,316,25607,2,0,P|452:312|508:316,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -244,344,26545,6,0,P|176:356|108:328,1,144,4|2,0:3|0:3,0:0:0:0: -60,256,27248,1,0,0:0:0:0: -36,172,27482,2,0,L|40:100,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -188,252,28420,6,0,P|192:184|196:100,1,144,4|2,0:3|0:3,0:0:0:0: -140,40,29123,1,0,0:0:0:0: -140,40,29357,2,0,B|172:16|220:24|220:24|288:36,1,144,0|2,0:0|0:3,0:0:0:0: -364,52,30060,1,0,0:0:0:0: -308,116,30295,6,0,B|300:168|300:168|328:256,1,144,4|2,0:3|0:3,0:0:0:0: -340,340,30998,1,0,0:0:0:0: -260,308,31232,2,0,L|188:304,1,72,0|2,0:0|0:3,0:0:0:0: -100,296,31701,1,2,0:3:0:0: -136,374,31935,1,0,0:0:0:0: -152,224,32170,6,0,P|160:152|132:88,1,144,4|2,0:3|0:3,0:0:0:0: -56,48,32873,1,0,0:0:0:0: -60,136,33107,2,0,L|56:208,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -224,76,34045,6,0,P|289:104|360:96,1,144,4|2,0:3|0:3,0:0:0:0: -432,48,34748,1,0,0:0:0:0: -440,132,34982,2,0,B|432:156|432:156|436:204,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -448,304,35920,6,0,B|412:315|380:292|380:292|348:269|312:280,1,144,4|2,0:3|0:3,0:0:0:0: -332,364,36623,1,0,0:0:0:0: -247,339,36857,2,0,P|230:308|225:273,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -312,280,37560,6,0,L|316:172,1,108 -134,35,38966,5,0,0:0:0:0: -72,96,39201,2,0,P|119:119|171:111,1,108,0|0,0:0|0:0,0:0:0:0: -192,100,39670,6,0,L|200:172,1,72,4|2,0:0|0:0,0:0:0:0: -147,240,40138,2,0,P|133:272|132:308,1,72,0|2,1:0|0:0,0:0:0:0: -216,292,40607,2,0,B|260:308|260:308|356:292,1,144,4|0,2:3|1:0,1:0:0:0: -356,292,41310,1,2,0:0:0:0: -436,327,41545,6,0,P|441:292|435:257,1,72,4|2,0:3|0:0,0:0:0:0: -364,204,42013,2,0,P|336:144|352:68,1,144,0|4,1:0|2:3,1:0:0:0: -404,0,42716,1,2,0:0:0:0: -440,80,42951,2,0,B|464:84|464:84|512:80,1,72,0|2,1:0|0:0,0:0:0:0: -351,71,43420,6,0,B|296:68|296:68|268:76|268:76|196:72,1,144,4|0,2:3|1:0,1:0:0:0: -120,68,44123,1,2,0:0:0:0: -160,144,44357,2,0,P|172:180|168:232,1,72,4|2,0:3|0:0,0:0:0:0: -76,264,44826,2,0,P|76:228|88:194,1,72,0|2,1:0|0:0,0:0:0:0: -160,144,45295,5,4,0:3:0:0: -244,164,45529,1,2,0:0:0:0: -268,248,45763,2,0,L|344:252,1,72,0|2,1:0|0:0,0:0:0:0: -408,156,46232,2,0,L|336:159,1,72,4|2,0:3|0:0,0:0:0:0: -212,72,46701,2,0,L|288:76,1,72,0|2,1:0|0:0,0:0:0:0: -400,72,47170,6,0,P|464:96|488:172,1,144,4|0,2:0|1:0,1:0:0:0: -476,248,47873,1,2,0:0:0:0: -436,324,48107,2,0,L|284:320,1,144,4|0,2:3|1:0,1:0:0:0: -204,316,48810,1,2,0:0:0:0: -127,355,49045,6,0,P|120:321|124:285,1,72,4|2,0:3|0:0,0:0:0:0: -192,232,49513,2,0,L|335:228,1,144,0|4,1:0|2:3,1:0:0:0: -412,188,50216,1,2,0:0:0:0: -444,108,50451,2,0,P|452:72|448:36,1,72,0|2,1:0|0:0,0:0:0:0: -368,68,50920,6,0,B|332:79|300:56|300:56|268:33|232:44,1,144,4|0,2:3|1:0,1:0:0:0: -152,76,51623,1,2,0:0:0:0: -76,116,51857,2,0,L|80:268,1,144,4|0,2:3|1:0,1:0:0:0: -80,260,52560,1,2,0:0:0:0: -8,308,52795,6,0,P|34:334|69:346,1,72,4|2,0:3|0:0,0:0:0:0: -148,312,53263,2,0,P|163:278|162:241,1,72,0|2,1:0|0:0,0:0:0:0: -156,156,53732,5,0,3:0:0:0: -156,156,53966,1,2,0:0:0:0: -236,196,54201,2,0,L|312:192,1,72,8|0,0:3|0:0,0:0:0:0: -368,256,54670,6,0,P|392:216|352:116,1,144,4|2,0:0|1:2,0:0:0:0: -288,92,55373,1,0,0:0:0:0: -360,40,55607,2,0,L|432:36,1,72,4|0,0:3|3:0,0:0:0:0: -288,92,56076,2,0,L|216:88,1,72,2|0,1:2|0:0,0:0:0:0: -132,72,56545,6,0,P|172:88|200:184,1,144,4|2,0:3|1:2,0:0:0:0: -143,241,57248,1,0,0:0:0:0: -65,202,57482,2,0,P|87:174|119:157,1,72,4|0,0:3|3:0,0:0:0:0: -132,324,57951,2,0,P|98:312|72:288,1,72,2|0,1:2|0:0,0:0:0:0: -143,241,58420,6,0,L|288:240,1,144,4|2,0:3|1:2,0:0:0:0: -372,240,59123,1,0,0:0:0:0: -330,314,59357,2,0,P|318:350|322:390,1,72,4|0,0:3|3:0,0:0:0:0: -452,264,59826,2,0,P|453:228|442:194,1,72,2|0,1:2|0:0,0:0:0:0: -384,128,60295,6,0,B|336:144|336:144|244:128,1,144,4|2,0:3|1:2,0:0:0:0: -164,160,60998,2,0,P|160:116|168:88,1,72,0|4,0:0|0:3,0:0:0:0: -244,128,61466,2,0,P|248:172|240:200,1,72,0|2,3:0|1:2,0:0:0:0: -168,248,61935,1,0,0:0:0:0: -120,320,62170,6,0,P|196:328|252:272,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: -80,244,63341,1,0,3:0:0:0: -100,160,63576,2,0,L|24:156,1,72,2|0,1:2|0:0,0:0:0:0: -180,128,64045,6,0,P|249:138|304:94,1,144,4|2,0:3|1:2,0:0:0:0: -226,57,64748,1,0,0:0:0:0: -304,94,64982,2,0,L|300:166,1,72,4|0,0:3|3:0,0:0:0:0: -377,203,65451,2,0,L|388:132,1,72,2|0,1:2|0:0,0:0:0:0: -468,180,65920,6,0,L|432:328,1,144,4|2,0:3|1:2,0:0:0:0: -276,252,66857,2,0,P|208:248|140:280,1,144,4|2,0:3|1:2,0:0:0:0: -84,344,67560,1,0,0:0:0:0: -56,260,67795,6,0,L|52:188,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -168,128,68732,2,0,L|172:56,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -244,168,69435,1,0,0:0:0:0: -332,164,69670,1,4,0:3:0:0: -208,328,84670,6,0,P|224:264|216:188,1,144,4|2,0:3|0:3,0:0:0:0: -168,116,85373,1,0,0:0:0:0: -96,68,85607,2,0,P|60:72|4:68,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -268,40,86545,6,0,P|336:28|404:56,1,144,4|2,0:3|0:3,0:0:0:0: -452,128,87248,1,0,0:0:0:0: -476,212,87482,2,0,L|472:284,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -324,132,88420,6,0,P|320:200|316:284,1,144,4|2,0:3|0:3,0:0:0:0: -372,344,89123,1,0,0:0:0:0: -372,344,89357,2,0,B|340:368|292:360|292:360|224:348,1,144,0|2,0:0|0:3,0:0:0:0: -148,332,90060,1,0,0:0:0:0: -204,268,90295,6,0,B|212:216|212:216|184:128,1,144,4|2,0:3|0:3,0:0:0:0: -172,44,90998,1,0,0:0:0:0: -252,76,91232,2,0,L|324:80,1,72,0|2,0:0|0:3,0:0:0:0: -412,88,91701,1,2,0:3:0:0: -377,9,91935,1,0,0:0:0:0: -360,160,92170,6,0,P|352:232|380:296,1,144,4|2,0:3|0:3,0:0:0:0: -456,336,92873,1,0,0:0:0:0: -452,248,93107,2,0,L|456:176,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -288,308,94045,6,0,P|223:280|152:288,1,144,4|2,0:3|0:3,0:0:0:0: -80,336,94748,1,0,0:0:0:0: -72,252,94982,2,0,B|80:228|80:228|76:180,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -64,80,95920,6,0,B|100:69|132:92|132:92|164:115|200:104,1,144,4|2,0:3|0:3,0:0:0:0: -180,20,96623,1,0,0:0:0:0: -265,45,96857,2,0,P|282:76|287:111,2,72,0|0|2,0:0|0:0|0:3,0:0:0:0: -200,104,97560,1,0,0:0:0:0: -200,104,97677,1,0,0:0:0:0: -200,104,97795,6,0,B|196:142|217:166|217:166|176:180|160:220,1,144,4|0,0:3|0:0,0:0:0:0: -240,248,98966,5,0,0:0:0:0: -202,325,99201,2,0,P|254:333|301:309,1,108,0|0,0:0|0:0,0:0:0:0: -315,292,99670,6,0,L|323:220,1,72,4|2,0:0|0:0,0:0:0:0: -365,144,100138,2,0,P|379:112|380:76,1,72,0|2,1:0|0:0,0:0:0:0: -296,92,100607,2,0,B|252:76|252:76|156:92,1,144,4|0,2:3|1:0,1:0:0:0: -156,92,101310,1,2,0:0:0:0: -76,57,101545,6,0,P|71:92|77:127,1,72,4|2,0:3|0:0,0:0:0:0: -148,180,102013,2,0,P|176:240|160:316,1,144,0|4,1:0|2:3,1:0:0:0: -108,384,102716,1,2,0:0:0:0: -72,304,102951,2,0,B|48:300|48:300|0:304,1,72,0|2,1:0|0:0,0:0:0:0: -161,313,103420,6,0,B|216:316|216:316|244:308|244:308|316:312,1,144,4|0,2:3|1:0,1:0:0:0: -392,316,104123,1,2,0:0:0:0: -352,240,104357,2,0,P|340:204|344:152,1,72,4|2,0:3|0:0,0:0:0:0: -436,120,104826,2,0,P|436:156|424:190,1,72,0|2,1:0|0:0,0:0:0:0: -352,240,105295,5,4,0:3:0:0: -268,220,105529,1,2,0:0:0:0: -244,136,105763,2,0,L|168:132,1,72,0|2,1:0|0:0,0:0:0:0: -104,228,106232,2,0,L|176:225,1,72,4|2,0:3|0:0,0:0:0:0: -300,312,106701,2,0,L|224:308,1,72,0|2,1:0|0:0,0:0:0:0: -112,312,107170,6,0,P|48:288|24:212,1,144,4|0,2:0|1:0,1:0:0:0: -36,136,107873,1,2,0:0:0:0: -76,60,108107,2,0,L|228:64,1,144,4|0,2:3|1:0,1:0:0:0: -308,68,108810,1,2,0:0:0:0: -385,29,109045,6,0,P|392:63|388:99,1,72,4|2,0:3|0:0,0:0:0:0: -320,152,109513,2,0,L|177:156,1,144,0|4,1:0|2:3,1:0:0:0: -100,196,110216,1,2,0:0:0:0: -68,276,110451,2,0,P|60:312|64:348,1,72,0|2,1:0|0:0,0:0:0:0: -144,316,110920,6,0,B|180:305|212:328|212:328|244:351|280:340,1,144,4|0,2:3|1:0,1:0:0:0: -360,308,111623,1,2,0:0:0:0: -436,268,111857,2,0,L|432:116,1,144,4|0,2:3|1:0,1:0:0:0: -432,124,112560,1,2,0:0:0:0: -504,76,112795,6,0,P|478:50|443:38,1,72,4|2,0:3|0:0,0:0:0:0: -364,72,113263,2,0,P|349:106|350:143,1,72,0|2,1:0|0:0,0:0:0:0: -356,228,113732,5,0,3:0:0:0: -356,228,113966,1,2,0:0:0:0: -276,188,114201,2,0,L|200:192,1,72,8|0,0:3|0:0,0:0:0:0: -144,128,114670,6,0,P|120:168|160:268,1,144,4|2,0:0|1:2,0:0:0:0: -224,292,115373,1,0,0:0:0:0: -152,344,115607,2,0,L|80:348,1,72,4|0,0:3|3:0,0:0:0:0: -224,292,116076,2,0,L|296:296,1,72,2|0,1:2|0:0,0:0:0:0: -380,312,116545,6,0,P|340:296|312:200,1,144,4|2,0:3|1:2,0:0:0:0: -369,143,117248,1,0,0:0:0:0: -447,182,117482,2,0,P|425:210|393:227,1,72,4|0,0:3|3:0,0:0:0:0: -380,60,117951,2,0,P|414:72|440:96,1,72,2|0,1:2|0:0,0:0:0:0: -369,143,118420,6,0,L|224:144,1,144,4|2,0:3|1:2,0:0:0:0: -140,144,119123,1,0,0:0:0:0: -182,70,119357,2,0,P|194:34|190:-6,1,72,4|0,0:3|3:0,0:0:0:0: -60,120,119826,2,0,P|59:156|70:190,1,72,2|0,1:2|0:0,0:0:0:0: -128,256,120295,6,0,B|176:240|176:240|268:256,1,144,4|2,0:3|1:2,0:0:0:0: -348,224,120998,2,0,P|352:268|344:296,1,72,0|4,0:0|0:3,0:0:0:0: -268,256,121466,2,0,P|264:212|272:184,1,72,0|2,3:0|1:2,0:0:0:0: -344,136,121935,1,0,0:0:0:0: -392,64,122170,6,0,P|316:56|260:112,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: -432,140,123341,1,0,3:0:0:0: -412,224,123576,2,0,L|488:228,1,72,2|0,1:2|0:0,0:0:0:0: -332,256,124045,6,0,P|263:246|208:290,1,144,4|2,0:3|1:2,0:0:0:0: -286,327,124748,1,0,0:0:0:0: -208,290,124982,2,0,L|212:218,1,72,4|0,0:3|3:0,0:0:0:0: -135,181,125451,2,0,L|124:252,1,72,2|0,1:2|0:0,0:0:0:0: -44,204,125920,6,0,L|80:56,1,144,4|2,0:3|1:2,0:0:0:0: -236,132,126857,2,0,P|304:136|372:104,1,144,4|2,0:3|1:2,0:0:0:0: -428,40,127560,1,0,0:0:0:0: -456,124,127795,6,0,L|460:196,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -344,256,128732,2,0,L|340:328,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -268,216,129435,1,0,0:0:0:0: -180,220,129670,5,4,2:0:0:0: -256,40,130373,1,2,0:0:0:0: -64,68,131076,1,2,0:0:0:0: -92,136,131310,1,0,0:0:0:0: -64,204,131545,6,0,L|60:288,1,72 -31,343,132248,2,0,P|86:345|127:309,1,108 -332,220,133420,5,2,0:0:0:0: -256,40,134123,1,2,0:0:0:0: -448,68,134826,1,2,0:0:0:0: -420,136,135060,1,0,0:0:0:0: -448,204,135295,6,0,L|452:288,1,72,2|0,0:0|0:0,0:0:0:0: -480,343,135998,2,0,P|426:345|385:309,1,108 -256,192,137170,5,2,0:0:0:0: -156,360,137873,1,2,0:0:0:0: -356,360,138576,2,0,L|352:308,1,36,2|0,0:0|0:0,0:0:0:0: -304,268,139045,6,0,P|336:253|372:252,1,72 -448,260,139748,2,0,L|444:152,1,108 -256,192,140920,5,2,0:0:0:0: -356,24,141623,1,2,0:0:0:0: -156,24,142326,2,0,L|160:72,1,36,2|0,0:0|0:0,0:0:0:0: -208,116,142795,6,0,P|176:131|140:132,1,72,2|0,0:0|0:0,0:0:0:0: -64,124,143498,2,0,L|68:232,1,108 -68,232,144670,5,4,0:3:0:0: -216,320,145138,1,4,0:3:0:0: -304,172,145607,1,4,0:3:0:0: -156,84,146075,1,4,0:3:0:0: -296,320,146545,5,4,0:3:0:0: -208,172,147013,1,4,0:3:0:0: -356,84,147482,1,4,0:3:0:0: -444,232,147950,1,4,0:3:0:0: -296,320,148420,6,0,P|252:328|192:296,2,108.000004119873,4|4|4,0:3|0:3|0:3,0:0:0:0: -260,248,149591,1,0,0:0:0:0: -320,196,149826,2,0,L|316:140,1,54.0000020599366,4|0,0:3|0:0,0:0:0:0: -120,236,159670,6,0,L|176:232,1,54.0000020599366,4|0,0:3|0:0,0:0:0:0: -160,152,160138,2,0,L|104:156,1,54.0000020599366,2|0,0:0|0:0,0:0:0:0: -240,180,160607,2,0,P|292:188|344:172,1,108.000004119873,4|2,0:3|0:0,3:0:0:0: -408,120,161310,1,0,3:0:0:0: -424,200,161545,6,0,L|420:256,1,54.0000020599366,4|0,0:3|0:0,0:0:0:0: -376,320,162013,2,0,P|396:328|480:304,2,108.000004119873,2|6|2,2:0|0:3|2:0,3:0:0:0: -312,268,163185,1,0,0:0:0:0: -296,348,163420,6,0,L|240:344,1,54.0000020599366,4|0,3:0|3:0,0:0:0:0: -160,320,163888,2,0,L|100:316,1,57.6,4|0,3:0|3:0,0:0:0:0: -64,232,164357,6,0,L|128:228,1,61.2000011672974,4|0,3:0|3:0,0:0:0:0: -204,200,164825,2,0,L|268:196,1,61.2000011672974,4|0,3:0|3:0,0:0:0:0: -232,108,165295,6,0,L|164:104,1,68.399998173523,4|0,3:0|3:0,0:0:0:0: -80,84,165763,2,0,L|4:80,1,72,4|0,3:0|3:0,0:0:0:0: -324,120,167170,6,0,P|388:128|456:92,1,144,4|2,0:0|1:2,0:0:0:0: -496,168,167873,1,0,0:0:0:0: -496,168,168107,2,0,P|484:204|488:256,1,72,4|0,0:3|3:0,0:0:0:0: -408,296,168576,2,0,P|398:261|378:231,1,72,2|0,1:2|0:0,0:0:0:0: -296,200,169045,6,0,B|228:228|156:204,1,144,4|2,0:3|1:2,0:0:0:0: -84,156,169748,1,0,0:0:0:0: -80,244,169982,2,0,L|76:316,1,72,4|0,0:3|3:0,0:0:0:0: -170,274,170451,2,0,L|156:204,1,72,2|0,1:2|0:0,0:0:0:0: -216,140,170920,6,0,L|284:276,1,144,4|2,0:3|1:2,0:0:0:0: -320,344,171623,1,0,0:0:0:0: -372,276,171857,2,0,P|366:240|349:207,1,72,4|0,0:3|3:0,0:0:0:0: -312,132,172326,2,0,L|276:60,1,72,2|0,1:2|0:0,0:0:0:0: -208,20,172795,6,0,P|272:36|348:12,1,144,4|2,0:3|1:2,0:0:0:0: -424,48,173498,2,0,L|412:132,1,72,0|4,0:0|0:3,0:0:0:0: -484,168,173966,2,0,L|472:252,1,72,0|2,3:0|1:2,0:0:0:0: -400,280,174435,1,0,0:0:0:0: -346,348,174670,6,0,P|414:363|472:324,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: -312,268,175841,1,0,3:0:0:0: -256,336,176076,2,0,L|184:332,1,72,2|0,1:2|0:0,0:0:0:0: -80,244,176545,6,0,B|140:248|140:248|164:244|164:244|223:247,1,144,4|2,0:3|1:2,0:0:0:0: -312,268,177248,1,0,0:0:0:0: -224,247,177482,2,0,P|240:215|272:187,1,72,4|0,0:3|3:0,0:0:0:0: -204,131,177951,2,0,P|233:111|275:103,1,72,2|0,1:2|0:0,0:0:0:0: -240,23,178420,6,0,B|280:15|316:35|316:35|376:71,1,144,4|2,0:3|1:2,0:0:0:0: -399,236,179357,2,0,B|359:244|323:224|323:224|263:188,1,144,4|2,0:3|1:2,0:0:0:0: -204,132,180060,1,0,0:0:0:0: -184,216,180295,6,0,L|188:288,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -120,156,180998,1,0,0:0:0:0: -56,96,181232,2,0,L|60:24,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: -36,180,181935,1,0,0:0:0:0: -100,240,182170,6,0,P|144:300|116:380,2,144,4|2|4,0:0|1:2|0:3,0:0:0:0: -60,316,183341,1,0,0:0:0:0: -220,352,183576,2,0,L|308:348,1,72,2|0,1:2|0:0,0:0:0:0: -396,264,184045,6,0,B|336:268|336:268|312:264|312:264|253:267,1,144,4|2,0:3|1:2,0:0:0:0: -253,267,184748,1,0,0:0:0:0: -268,180,184982,2,0,L|339:177,1,72,4|0,0:3|0:0,0:0:0:0: -164,280,185451,2,0,L|92:282,1,72,2|0,1:2|0:0,0:0:0:0: -52,208,185920,6,0,P|8:268|32:344,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: -140,212,187091,1,0,0:0:0:0: -92,284,187326,2,0,P|104:316|100:368,1,72,2|0,1:2|0:0,0:0:0:0: -52,208,187795,6,0,P|48:136|76:72,1,144,4|2,0:3|1:2,0:0:0:0: -160,52,188498,2,0,P|188:28|220:16,1,72,0|4,0:0|0:3,0:0:0:0: -232,100,188966,2,0,P|268:93|301:98,1,72,0|2,0:0|1:2,0:0:0:0: -372,152,189435,1,0,0:0:0:0: -420,224,189670,6,0,P|428:296|400:360,2,144,4|2|4,0:3|1:2|0:3,0:0:0:0: -372,152,190841,1,0,0:0:0:0: -392,68,191076,2,0,L|465:64,1,72,2|0,1:2|0:0,0:0:0:0: -304,92,191545,6,0,P|236:104|168:76,1,144,4|2,0:3|1:2,0:0:0:0: -108,12,192248,1,0,0:0:0:0: -168,76,192482,2,0,L|172:152,1,72,4|0,0:3|0:0,0:0:0:0: -80,136,192951,2,0,L|101:204,1,72,2|0,1:2|0:0,0:0:0:0: -12,220,193420,6,0,B|50:279|50:279|80:300|120:292,1,144,4|2,0:3|1:2,0:0:0:0: -284,232,194357,2,0,B|320:221|352:244|352:244|384:267|420:256,1,144,4|2,0:3|1:2,0:0:0:0: -488,200,195060,1,0,0:0:0:0: -507,284,195295,6,0,P|492:315|464:338,1,72,4|0,0:0|0:0,0:0:0:0: -380,356,195763,2,0,L|236:352,1,144,0|4,1:0|0:3,0:0:0:0: -152,328,196466,1,0,3:0:0:0: -64,336,196701,2,0,P|29:325|4:300,1,72,0|0,1:0|0:0,0:0:0:0: -76,252,197170,6,0,P|108:188|96:116,1,144,4|0,0:0|1:0,0:0:0:0: -36,56,197873,1,2,0:0:0:0: -120,32,198107,2,0,L|192:28,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -248,152,199045,6,0,P|280:168|304:196,1,72,4|2,0:3|0:0,0:0:0:0: -336,277,199513,2,0,P|306:296|269:303,1,72,2|0,1:2|0:0,0:0:0:0: -183,290,199982,2,0,P|180:254|193:219,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: -436,252,200920,6,0,P|404:188|416:116,1,144,4|0,0:3|1:0,0:0:0:0: -476,56,201623,1,2,0:0:0:0: -392,32,201857,2,0,L|320:28,2,72,4|0|2,0:3|0:0|1:2,0:0:0:0: -264,152,202795,6,0,P|232:168|208:196,1,72,4|2,0:3|0:0,0:0:0:0: -176,277,203263,2,0,P|205:296|242:303,1,72,2|0,1:2|0:0,0:0:0:0: -329,290,203732,2,0,P|331:254|318:219,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: -72,324,204670,6,0,B|60:272|60:272|76:180,1,144,4|0,0:0|1:0,0:0:0:0: -92,96,205373,1,2,0:0:0:0: -8,124,205607,2,0,P|5:88|14:53,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -168,192,206545,6,0,P|200:174|237:173,1,72,4|2,0:3|0:0,0:0:0:0: -320,160,207013,2,0,P|318:196|301:229,1,72,2|0,1:2|0:0,0:0:0:0: -272,307,207482,2,0,P|240:287|221:256,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: -440,324,208420,6,0,B|452:272|452:272|436:180,1,144,4|0,0:3|1:0,0:0:0:0: -420,96,209123,1,2,0:0:0:0: -504,124,209357,2,0,P|507:88|498:53,2,72,4|0|2,0:3|0:0|1:2,0:0:0:0: -344,192,210295,6,0,P|311:174|274:173,1,72,4|2,0:3|0:0,0:0:0:0: -190,156,210763,2,0,P|191:192|208:225,1,72,2|0,1:2|0:0,0:0:0:0: -288,256,211232,1,4,0:3:0:0: -132,332,211701,1,0,1:0:0:0: -28,192,212170,6,0,P|16:120|44:56,1,144,4|0,0:0|1:0,0:0:0:0: -120,16,212873,1,2,0:0:0:0: -204,32,213107,2,0,L|304:28,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -192,204,214045,6,0,P|196:240|216:272,1,72,4|2,0:3|0:0,0:0:0:0: -298,241,214513,2,0,P|327:219|345:186,1,72,6|0,1:2|0:0,0:0:0:0: -280,132,214982,2,0,P|246:117|209:118,2,72,4|2|0,0:3|0:0|1:0,0:0:0:0: -484,192,215920,6,0,P|496:120|468:56,1,144,4|0,0:3|1:0,0:0:0:0: -392,16,216623,1,2,0:0:0:0: -308,32,216857,2,0,L|208:28,2,72,4|0|2,0:3|0:0|1:2,0:0:0:0: -320,204,217795,6,0,P|316:240|296:272,1,72,4|2,0:3|0:0,0:0:0:0: -213,241,218263,2,0,P|184:219|166:186,1,72,2|0,1:2|0:0,0:0:0:0: -232,132,218732,2,0,B|260:112|300:116|300:116|384:128,1,144,4|0,0:3|1:0,0:0:0:0: -348,336,219670,6,0,B|320:356|280:352|280:352|196:340,1,144,4|0,0:0|1:0,0:0:0:0: -124,328,220373,1,2,0:0:0:0: -54,276,220607,2,0,P|41:308|39:345,2,72,4|2|2,0:3|0:0|1:2,0:0:0:0: -156,80,221545,6,0,L|251:94,1,72,4|2,0:3|0:0,0:0:0:0: -212,169,222013,2,0,L|148:160,1,64.799998022461,2|0,1:2|0:0,0:0:0:0: -140,240,222482,2,0,L|216:252,2,57.6,4|2|0,0:3|0:0|1:0,0:0:0:0: -256,192,223420,12,0,227170,0:0:0:0: -"; } } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 1d3baa6c0d..3d89c859c4 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -896,6 +896,7 @@ + From b91524dbba0bdbfc1436dd1d1a140e296f518137 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 12 Mar 2018 18:32:58 +0900 Subject: [PATCH 25/36] Give TestWorkingBeatmap's track a valid length --- osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs index 68bb3f6dd9..02a5c8a5fc 100644 --- a/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs @@ -1,10 +1,12 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Linq; using osu.Framework.Audio.Track; using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps; using osu.Game.Rulesets; +using osu.Game.Rulesets.Objects.Types; namespace osu.Game.Tests.Beatmaps { @@ -24,6 +26,21 @@ namespace osu.Game.Tests.Beatmaps private readonly Beatmap beatmap; protected override Beatmap GetBeatmap() => beatmap; protected override Texture GetBackground() => null; - protected override Track GetTrack() => new TrackVirtual(); + + protected override Track GetTrack() + { + var lastObject = beatmap.HitObjects.LastOrDefault(); + if (lastObject != null) + return new TestTrack(((lastObject as IHasEndTime)?.EndTime ?? lastObject.StartTime) + 1000); + return new TrackVirtual(); + } + + private class TestTrack : TrackVirtual + { + public TestTrack(double length) + { + Length = length; + } + } } } From 13c20438ef93cd225005dcc47eef687b5556915e Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 12 Mar 2018 19:41:51 +0900 Subject: [PATCH 26/36] Fix build issues --- osu.Game/Tests/Beatmaps/TestBeatmap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Tests/Beatmaps/TestBeatmap.cs b/osu.Game/Tests/Beatmaps/TestBeatmap.cs index a29ee03975..3b43459428 100644 --- a/osu.Game/Tests/Beatmaps/TestBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestBeatmap.cs @@ -25,7 +25,7 @@ namespace osu.Game.Tests.Beatmaps using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(test_beatmap_data))) using (var reader = new StreamReader(stream)) - return testBeatmapCache = Decoder.GetDecoder(reader).DecodeBeatmap(reader); + return testBeatmapCache = Decoder.GetDecoder(reader).Decode(reader); } private const string test_beatmap_data = From d2859d779d1de3b51cbb35edec81b98e2dea492e Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 12 Mar 2018 19:38:23 +0900 Subject: [PATCH 27/36] Create a base TestCaseEditor for rulests to derive --- osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs | 16 ++++++ .../osu.Game.Rulesets.Osu.csproj | 1 + osu.Game.Tests/Visual/TestCaseEditor.cs | 49 ------------------- osu.Game.Tests/osu.Game.Tests.csproj | 1 - osu.Game/Tests/Visual/TestCaseEditor.cs | 33 +++++++++++++ osu.Game/osu.Game.csproj | 1 + 6 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs delete mode 100644 osu.Game.Tests/Visual/TestCaseEditor.cs create mode 100644 osu.Game/Tests/Visual/TestCaseEditor.cs diff --git a/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs b/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs new file mode 100644 index 0000000000..501992def3 --- /dev/null +++ b/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs @@ -0,0 +1,16 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using NUnit.Framework; + +namespace osu.Game.Rulesets.Osu.Tests +{ + [TestFixture] + public class TestCaseEditor : Game.Tests.Visual.TestCaseEditor + { + public TestCaseEditor() + : base(new OsuRuleset()) + { + } + } +} diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj index 92cac71ad3..b4c5654de4 100644 --- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj +++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj @@ -130,6 +130,7 @@ + diff --git a/osu.Game.Tests/Visual/TestCaseEditor.cs b/osu.Game.Tests/Visual/TestCaseEditor.cs deleted file mode 100644 index c626ca8e7f..0000000000 --- a/osu.Game.Tests/Visual/TestCaseEditor.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using System.Collections.Generic; -using NUnit.Framework; -using osu.Framework.Allocation; -using osu.Game.Beatmaps; -using osu.Game.Screens.Edit; -using osu.Game.Screens.Edit.Screens; - -namespace osu.Game.Tests.Visual -{ - [TestFixture] - public class TestCaseEditor : OsuTestCase - { - public override IReadOnlyList RequiredTypes => new[] { typeof(Editor), typeof(EditorScreen) }; - - private readonly Random rng; - - private BeatmapManager beatmaps; - private OsuGameBase osuGame; - - public TestCaseEditor() - { - rng = new Random(1337); - - Add(new Editor()); - AddStep("Next beatmap", nextBeatmap); - } - - [BackgroundDependencyLoader] - private void load(OsuGameBase osuGame, BeatmapManager beatmaps) - { - this.osuGame = osuGame; - this.beatmaps = beatmaps; - } - - private void nextBeatmap() - { - var sets = beatmaps.GetAllUsableBeatmapSets(); - if (sets.Count == 0) - return; - - BeatmapInfo info = sets[rng.Next(0, sets.Count)].Beatmaps[0]; - osuGame.Beatmap.Value = beatmaps.GetWorkingBeatmap(info); - } - } -} diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index 1cfa7bc111..ed9580211b 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -126,7 +126,6 @@ - diff --git a/osu.Game/Tests/Visual/TestCaseEditor.cs b/osu.Game/Tests/Visual/TestCaseEditor.cs new file mode 100644 index 0000000000..76eae7acea --- /dev/null +++ b/osu.Game/Tests/Visual/TestCaseEditor.cs @@ -0,0 +1,33 @@ +// Copyright (c) 2007-2018 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Collections.Generic; +using osu.Framework.Allocation; +using osu.Game.Rulesets; +using osu.Game.Screens.Edit; +using osu.Game.Screens.Edit.Screens; +using osu.Game.Tests.Beatmaps; + +namespace osu.Game.Tests.Visual +{ + public abstract class TestCaseEditor : OsuTestCase + { + public override IReadOnlyList RequiredTypes => new[] { typeof(Editor), typeof(EditorScreen) }; + + private readonly Ruleset ruleset; + + protected TestCaseEditor(Ruleset ruleset) + { + this.ruleset = ruleset; + } + + [BackgroundDependencyLoader] + private void load(OsuGameBase osuGame) + { + osuGame.Beatmap.Value = new TestWorkingBeatmap(ruleset.RulesetInfo); + + Child = new Editor(); + } + } +} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 3d89c859c4..c99ccd6945 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -902,6 +902,7 @@ + From 3354849cc9c05eb47d58abf570935f1fbf36865a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 12 Mar 2018 22:01:18 +0900 Subject: [PATCH 28/36] Fix code formatting regression --- osu.Game/Skinning/LegacySkin.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index 2caeed8480..5525cc483e 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -58,9 +58,14 @@ namespace osu.Game.Skinning private readonly SkinInfo skin; private readonly IResourceStore underlyingStore; - private string getPathForFile(string filename) => - skin.Files.FirstOrDefault(f => string.Equals(Path.GetFileNameWithoutExtension(f.Filename), filename.Split('/').Last(), StringComparison.InvariantCultureIgnoreCase))?.FileInfo - .StoragePath; + private string getPathForFile(string filename) + { + string lastPiece = filename.Split('/').Last(); + + var file = skin.Files.FirstOrDefault(f => + string.Equals(Path.GetFileNameWithoutExtension(f.Filename), lastPiece, StringComparison.InvariantCultureIgnoreCase)); + return file?.FileInfo.StoragePath; + } public LegacySkinResourceStore(SkinInfo skin, IResourceStore underlyingStore) { From 706c26c32b1f4a1912b119b7804a6f6a57b32c64 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 13 Mar 2018 09:27:28 +0900 Subject: [PATCH 29/36] Remove extra whitespace --- osu.Game/Tests/Beatmaps/TestBeatmap.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Tests/Beatmaps/TestBeatmap.cs b/osu.Game/Tests/Beatmaps/TestBeatmap.cs index 3b43459428..6d80ebffd4 100644 --- a/osu.Game/Tests/Beatmaps/TestBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestBeatmap.cs @@ -341,9 +341,8 @@ SliderTickRate:2 226701,-100,4,2,0,10,0,0 227170,-100,4,2,0,5,0,0 - [Colours] - Combo1 : 17,254,176 +Combo1 : 17,254,176 Combo2 : 173,255,95 Combo3 : 255,88,100 Combo4 : 255,94,55 From 6ecd2afd2420cea1b11e7b704eb13a4ba68ed9d6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 13 Mar 2018 12:59:41 +0900 Subject: [PATCH 30/36] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 59004b46f2..d29c8365ba 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 59004b46f2c96ac02fec712e66f9f96fe252f2fa +Subproject commit d29c8365ba3cf7924b57cf22341f4af55658764c From e32eec9259ae7d463070e1e8da06402b50afa173 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 13 Mar 2018 15:22:46 +0900 Subject: [PATCH 31/36] No more caching --- osu.Game/Tests/Beatmaps/TestBeatmap.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/osu.Game/Tests/Beatmaps/TestBeatmap.cs b/osu.Game/Tests/Beatmaps/TestBeatmap.cs index 6d80ebffd4..7dc6079959 100644 --- a/osu.Game/Tests/Beatmaps/TestBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestBeatmap.cs @@ -17,15 +17,11 @@ namespace osu.Game.Tests.Beatmaps BeatmapInfo.Ruleset = ruleset; } - private static Beatmap testBeatmapCache; private static Beatmap createTestBeatmap() { - if (testBeatmapCache != null) - return testBeatmapCache; - using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(test_beatmap_data))) using (var reader = new StreamReader(stream)) - return testBeatmapCache = Decoder.GetDecoder(reader).Decode(reader); + return Decoder.GetDecoder(reader).Decode(reader); } private const string test_beatmap_data = From 0c705b0397d192b4ee7ca2e6242dc26c9db4fae5 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 13 Mar 2018 15:57:05 +0900 Subject: [PATCH 32/36] Rename to EditorTestCase --- osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs | 3 ++- .../Tests/Visual/{TestCaseEditor.cs => EditorTestCase.cs} | 4 ++-- osu.Game/osu.Game.csproj | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) rename osu.Game/Tests/Visual/{TestCaseEditor.cs => EditorTestCase.cs} (85%) diff --git a/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs b/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs index 501992def3..a11f32935e 100644 --- a/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs +++ b/osu.Game.Rulesets.Osu/Tests/TestCaseEditor.cs @@ -2,11 +2,12 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using NUnit.Framework; +using osu.Game.Tests.Visual; namespace osu.Game.Rulesets.Osu.Tests { [TestFixture] - public class TestCaseEditor : Game.Tests.Visual.TestCaseEditor + public class TestCaseEditor : EditorTestCase { public TestCaseEditor() : base(new OsuRuleset()) diff --git a/osu.Game/Tests/Visual/TestCaseEditor.cs b/osu.Game/Tests/Visual/EditorTestCase.cs similarity index 85% rename from osu.Game/Tests/Visual/TestCaseEditor.cs rename to osu.Game/Tests/Visual/EditorTestCase.cs index 76eae7acea..ed2b47ae39 100644 --- a/osu.Game/Tests/Visual/TestCaseEditor.cs +++ b/osu.Game/Tests/Visual/EditorTestCase.cs @@ -11,13 +11,13 @@ using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual { - public abstract class TestCaseEditor : OsuTestCase + public abstract class EditorTestCase : OsuTestCase { public override IReadOnlyList RequiredTypes => new[] { typeof(Editor), typeof(EditorScreen) }; private readonly Ruleset ruleset; - protected TestCaseEditor(Ruleset ruleset) + protected EditorTestCase(Ruleset ruleset) { this.ruleset = ruleset; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index c99ccd6945..7214a31639 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -902,7 +902,7 @@ - + From e97349fd63a96c26a36b0d7fe239ecf6ad51baa1 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 13 Mar 2018 16:00:56 +0900 Subject: [PATCH 33/36] Derive ScreenTestCase + use LoadComponentAsync --- osu.Game/Tests/Visual/EditorTestCase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Tests/Visual/EditorTestCase.cs b/osu.Game/Tests/Visual/EditorTestCase.cs index ed2b47ae39..982a3c5d73 100644 --- a/osu.Game/Tests/Visual/EditorTestCase.cs +++ b/osu.Game/Tests/Visual/EditorTestCase.cs @@ -11,7 +11,7 @@ using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual { - public abstract class EditorTestCase : OsuTestCase + public abstract class EditorTestCase : ScreenTestCase { public override IReadOnlyList RequiredTypes => new[] { typeof(Editor), typeof(EditorScreen) }; @@ -27,7 +27,7 @@ namespace osu.Game.Tests.Visual { osuGame.Beatmap.Value = new TestWorkingBeatmap(ruleset.RulesetInfo); - Child = new Editor(); + LoadComponentAsync(new Editor(), LoadScreen); } } } From ba44813c0007ac4d0099fc2466a40d1b3c8d1534 Mon Sep 17 00:00:00 2001 From: vperus Date: Tue, 13 Mar 2018 12:05:52 +0200 Subject: [PATCH 34/36] Fixed exit from game save username instead of email. Resolve #2156 --- osu.Game/Online/API/APIAccess.cs | 1 - osu.Game/Overlays/Toolbar/ToolbarUserButton.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Online/API/APIAccess.cs b/osu.Game/Online/API/APIAccess.cs index 1325179e0d..bab53cb462 100644 --- a/osu.Game/Online/API/APIAccess.cs +++ b/osu.Game/Online/API/APIAccess.cs @@ -125,7 +125,6 @@ namespace osu.Game.Online.API userReq.Success += u => { LocalUser.Value = u; - Username = LocalUser.Value.Username; failureCount = 0; //we're connected! diff --git a/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs b/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs index c2dfea9a08..16586adc0c 100644 --- a/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs +++ b/osu.Game/Overlays/Toolbar/ToolbarUserButton.cs @@ -55,7 +55,7 @@ namespace osu.Game.Overlays.Toolbar avatar.User = new User(); break; case APIState.Online: - Text = api.Username; + Text = api.LocalUser.Value.Username; avatar.User = api.LocalUser; break; } From 9e09d434dd8088ec1f8f40f98a6de1c46d5d6c0d Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 14 Mar 2018 11:27:14 +0900 Subject: [PATCH 35/36] Fix argument null exception in ManiaBeatmapConverter --- .../Beatmaps/ManiaBeatmapConverter.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs index 2dd3468df0..4734e40803 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs @@ -77,7 +77,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps yield break; } - var objects = IsForCurrentRuleset ? generateSpecific(original) : generateConverted(original, beatmap); + var objects = IsForCurrentRuleset ? generateSpecific(original, beatmap) : generateConverted(original, beatmap); if (objects == null) yield break; @@ -110,10 +110,11 @@ namespace osu.Game.Rulesets.Mania.Beatmaps /// Method that generates hit objects for osu!mania specific beatmaps. /// /// The original hit object. + /// The original beatmap. This is used to look-up any values dependent on a fully-loaded beatmap. /// The hit objects generated. - private IEnumerable generateSpecific(HitObject original) + private IEnumerable generateSpecific(HitObject original, Beatmap originalBeatmap) { - var generator = new SpecificBeatmapPatternGenerator(random, original, beatmap, lastPattern); + var generator = new SpecificBeatmapPatternGenerator(random, original, beatmap, lastPattern, originalBeatmap); Pattern newPattern = generator.Generate(); lastPattern = newPattern; @@ -125,7 +126,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps /// Method that generates hit objects for non-osu!mania beatmaps. /// /// The original hit object. - /// The original beatmap. This is used + /// The original beatmap. This is used to look-up any values dependent on a fully-loaded beatmap. /// The hit objects generated. private IEnumerable generateConverted(HitObject original, Beatmap originalBeatmap) { @@ -164,8 +165,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps /// private class SpecificBeatmapPatternGenerator : Patterns.Legacy.PatternGenerator { - public SpecificBeatmapPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern) - : base(random, hitObject, beatmap, previousPattern, null) + public SpecificBeatmapPatternGenerator(FastRandom random, HitObject hitObject, ManiaBeatmap beatmap, Pattern previousPattern, Beatmap originalBeatmap) + : base(random, hitObject, beatmap, previousPattern, originalBeatmap) { } From 81f82d98a14a3b09f412e49891da0c46e51515ea Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 14 Mar 2018 15:18:21 +0900 Subject: [PATCH 36/36] Rework a lot of naming and structure --- .../Selection/OsuHitObjectOverlayLayer.cs | 26 ---------- .../{HitCircleOverlay.cs => HitCircleMask.cs} | 6 +-- ...erCircleOverlay.cs => SliderCircleMask.cs} | 10 ++-- .../{SliderOverlay.cs => SliderMask.cs} | 10 ++-- .../Edit/OsuHitObjectComposer.cs | 18 +++++-- .../osu.Game.Rulesets.Osu.csproj | 7 ++- .../Visual/TestCaseEditorSelectionLayer.cs | 17 +++--- osu.Game/Rulesets/Edit/HitObjectComposer.cs | 34 +++++++----- .../HitObjectOverlay.cs => HitObjectMask.cs} | 9 ++-- .../Edit/Layers/Selection/SelectionBox.cs | 49 ----------------- .../Screens/Compose}/Layers/BorderLayer.cs | 2 +- .../Compose/Layers/HitObjectMaskLayer.cs} | 37 +++++-------- .../Screens/Compose/Layers/SelectionBox.cs} | 15 +++--- .../Screens/Compose/Layers}/SelectionLayer.cs | 52 ++++++++++++++++--- osu.Game/Screens/Edit/Screens/EditorScreen.cs | 3 ++ osu.Game/osu.Game.csproj | 11 ++-- 16 files changed, 141 insertions(+), 165 deletions(-) delete mode 100644 osu.Game.Rulesets.Osu/Edit/Layers/Selection/OsuHitObjectOverlayLayer.cs rename osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/{HitCircleOverlay.cs => HitCircleMask.cs} (82%) rename osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/{SliderCircleOverlay.cs => SliderCircleMask.cs} (73%) rename osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/{SliderOverlay.cs => SliderMask.cs} (82%) rename osu.Game/Rulesets/Edit/{Layers/Selection/HitObjectOverlay.cs => HitObjectMask.cs} (56%) delete mode 100644 osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs rename osu.Game/{Rulesets/Edit => Screens/Edit/Screens/Compose}/Layers/BorderLayer.cs (92%) rename osu.Game/{Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs => Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs} (51%) rename osu.Game/{Rulesets/Edit/Layers/Selection/SelectionOverlay.cs => Screens/Edit/Screens/Compose/Layers/SelectionBox.cs} (83%) rename osu.Game/{Rulesets/Edit/Layers/Selection => Screens/Edit/Screens/Compose/Layers}/SelectionLayer.cs (78%) diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/OsuHitObjectOverlayLayer.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/OsuHitObjectOverlayLayer.cs deleted file mode 100644 index e0d1b34ca5..0000000000 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/OsuHitObjectOverlayLayer.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Rulesets.Edit.Layers.Selection; -using osu.Game.Rulesets.Objects.Drawables; -using osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays; -using osu.Game.Rulesets.Osu.Objects.Drawables; - -namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection -{ - public class OsuHitObjectOverlayLayer : HitObjectOverlayLayer - { - protected override HitObjectOverlay CreateOverlayFor(DrawableHitObject hitObject) - { - switch (hitObject) - { - case DrawableHitCircle circle: - return new HitCircleOverlay(circle); - case DrawableSlider slider: - return new SliderOverlay(slider); - } - - return base.CreateOverlayFor(hitObject); - } - } -} diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleMask.cs similarity index 82% rename from osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs rename to osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleMask.cs index ea5104af18..b48dd73bb5 100644 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/HitCircleMask.cs @@ -4,15 +4,15 @@ using osu.Framework.Graphics; using osu.Framework.Allocation; using osu.Game.Graphics; -using osu.Game.Rulesets.Edit.Layers.Selection; +using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces; namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays { - public class HitCircleOverlay : HitObjectOverlay + public class HitCircleMask : HitObjectMask { - public HitCircleOverlay(DrawableHitCircle hitCircle) + public HitCircleMask(DrawableHitCircle hitCircle) : base(hitCircle) { Origin = Anchor.Centre; diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderCircleOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderCircleMask.cs similarity index 73% rename from osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderCircleOverlay.cs rename to osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderCircleMask.cs index 3c7f8a067b..2de8c2f64e 100644 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderCircleOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderCircleMask.cs @@ -4,28 +4,28 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Graphics; -using osu.Game.Rulesets.Edit.Layers.Selection; +using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces; using OpenTK; namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays { - public class SliderCircleOverlay : HitObjectOverlay + public class SliderCircleMask : HitObjectMask { - public SliderCircleOverlay(DrawableHitCircle sliderHead, DrawableSlider slider) + public SliderCircleMask(DrawableHitCircle sliderHead, DrawableSlider slider) : this(sliderHead, sliderHead.Position, slider) { } - public SliderCircleOverlay(DrawableSliderTail sliderTail, DrawableSlider slider) + public SliderCircleMask(DrawableSliderTail sliderTail, DrawableSlider slider) : this(sliderTail, sliderTail.Position, slider) { } private readonly DrawableOsuHitObject hitObject; - private SliderCircleOverlay(DrawableOsuHitObject hitObject, Vector2 position, DrawableSlider slider) + private SliderCircleMask(DrawableOsuHitObject hitObject, Vector2 position, DrawableSlider slider) : base(hitObject) { this.hitObject = hitObject; diff --git a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderMask.cs similarity index 82% rename from osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs rename to osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderMask.cs index d478130868..53f02617cd 100644 --- a/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Layers/Selection/Overlays/SliderMask.cs @@ -4,7 +4,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Graphics; -using osu.Game.Rulesets.Edit.Layers.Selection; +using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces; @@ -13,12 +13,12 @@ using OpenTK.Graphics; namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays { - public class SliderOverlay : HitObjectOverlay + public class SliderMask : HitObjectMask { private readonly SliderBody body; private readonly DrawableSlider slider; - public SliderOverlay(DrawableSlider slider) + public SliderMask(DrawableSlider slider) : base(slider) { this.slider = slider; @@ -34,8 +34,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays AccentColour = Color4.Transparent, PathWidth = sliderObject.Scale * 64 }, - new SliderCircleOverlay(slider.HeadCircle, slider), - new SliderCircleOverlay(slider.TailCircle, slider), + new SliderCircleMask(slider.HeadCircle, slider), + new SliderCircleMask(slider.TailCircle, slider), }; sliderObject.PositionChanged += _ => Position = slider.Position; diff --git a/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs b/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs index 70d49a6b4f..026c85d909 100644 --- a/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs +++ b/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs @@ -5,10 +5,11 @@ using System.Collections.Generic; using osu.Framework.Graphics; using osu.Game.Beatmaps; using osu.Game.Rulesets.Edit; -using osu.Game.Rulesets.Edit.Layers.Selection; using osu.Game.Rulesets.Edit.Tools; -using osu.Game.Rulesets.Osu.Edit.Layers.Selection; +using osu.Game.Rulesets.Objects.Drawables; +using osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays; using osu.Game.Rulesets.Osu.Objects; +using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.UI; using osu.Game.Rulesets.UI; @@ -32,6 +33,17 @@ namespace osu.Game.Rulesets.Osu.Edit protected override ScalableContainer CreateLayerContainer() => new ScalableContainer(OsuPlayfield.BASE_SIZE.X) { RelativeSizeAxes = Axes.Both }; - protected override HitObjectOverlayLayer CreateHitObjectOverlayLayer() => new OsuHitObjectOverlayLayer(); + public override HitObjectMask CreateMaskFor(DrawableHitObject hitObject) + { + switch (hitObject) + { + case DrawableHitCircle circle: + return new HitCircleMask(circle); + case DrawableSlider slider: + return new SliderMask(slider); + } + + return base.CreateMaskFor(hitObject); + } } } diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj index d6fe87660f..b8f56c1f5d 100644 --- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj +++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj @@ -64,10 +64,9 @@ - - - - + + + diff --git a/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs b/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs index dc8a13d044..a7e104dd81 100644 --- a/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs +++ b/osu.Game.Tests/Visual/TestCaseEditorSelectionLayer.cs @@ -8,13 +8,12 @@ using osu.Framework.Allocation; using OpenTK; using osu.Game.Beatmaps; using osu.Game.Rulesets.Edit; -using osu.Game.Rulesets.Edit.Layers.Selection; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu.Edit; -using osu.Game.Rulesets.Osu.Edit.Layers.Selection; using osu.Game.Rulesets.Osu.Edit.Layers.Selection.Overlays; using osu.Game.Rulesets.Osu.Objects; +using osu.Game.Screens.Edit.Screens.Compose.Layers; using osu.Game.Tests.Beatmaps; namespace osu.Game.Tests.Visual @@ -24,17 +23,15 @@ namespace osu.Game.Tests.Visual { public override IReadOnlyList RequiredTypes => new[] { - typeof(SelectionBox), typeof(SelectionLayer), - typeof(SelectionOverlay), + typeof(SelectionBox), typeof(HitObjectComposer), typeof(OsuHitObjectComposer), - typeof(HitObjectOverlayLayer), - typeof(OsuHitObjectOverlayLayer), - typeof(HitObjectOverlay), - typeof(HitCircleOverlay), - typeof(SliderOverlay), - typeof(SliderCircleOverlay) + typeof(HitObjectMaskLayer), + typeof(HitObjectMask), + typeof(HitCircleMask), + typeof(SliderMask), + typeof(SliderCircleMask) }; [BackgroundDependencyLoader] diff --git a/osu.Game/Rulesets/Edit/HitObjectComposer.cs b/osu.Game/Rulesets/Edit/HitObjectComposer.cs index 914640622b..3dd8d503ed 100644 --- a/osu.Game/Rulesets/Edit/HitObjectComposer.cs +++ b/osu.Game/Rulesets/Edit/HitObjectComposer.cs @@ -10,10 +10,10 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Logging; using osu.Framework.Timing; using osu.Game.Beatmaps; -using osu.Game.Rulesets.Edit.Layers; -using osu.Game.Rulesets.Edit.Layers.Selection; using osu.Game.Rulesets.Edit.Tools; +using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.UI; +using osu.Game.Screens.Edit.Screens.Compose.Layers; using osu.Game.Screens.Edit.Screens.Compose.RadioButtons; namespace osu.Game.Rulesets.Edit @@ -49,7 +49,7 @@ namespace osu.Game.Rulesets.Edit return; } - HitObjectOverlayLayer hitObjectOverlayLayer = CreateHitObjectOverlayLayer(); + HitObjectMaskLayer hitObjectMaskLayer = new HitObjectMaskLayer(this); SelectionLayer selectionLayer = new SelectionLayer(rulesetContainer.Playfield); var layerBelowRuleset = new BorderLayer @@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Edit layerAboveRuleset.Children = new Drawable[] { selectionLayer, // Below object overlays for input - hitObjectOverlayLayer, + hitObjectMaskLayer, selectionLayer.CreateProxy() // Proxy above object overlays for selections }; @@ -106,10 +106,10 @@ namespace osu.Game.Rulesets.Edit } }; - selectionLayer.ObjectSelected += hitObjectOverlayLayer.AddOverlay; - selectionLayer.ObjectDeselected += hitObjectOverlayLayer.RemoveOverlay; - selectionLayer.SelectionCleared += hitObjectOverlayLayer.RemoveSelectionOverlay; - selectionLayer.SelectionFinished += hitObjectOverlayLayer.AddSelectionOverlay; + selectionLayer.ObjectSelected += hitObjectMaskLayer.AddOverlay; + selectionLayer.ObjectDeselected += hitObjectMaskLayer.RemoveOverlay; + selectionLayer.SelectionCleared += hitObjectMaskLayer.RemoveSelectionOverlay; + selectionLayer.SelectionFinished += hitObjectMaskLayer.AddSelectionOverlay; toolboxCollection.Items = new[] { new RadioButton("Select", () => setCompositionTool(null)) } @@ -140,14 +140,22 @@ namespace osu.Game.Rulesets.Edit protected abstract IReadOnlyList CompositionTools { get; } + /// + /// Creates a for a specific . + /// + /// The to create the overlay for. + public virtual HitObjectMask CreateMaskFor(DrawableHitObject hitObject) => null; + + /// + /// Creates a which outlines s + /// and handles all hitobject movement/pattern adjustments. + /// + /// The overlays. + public virtual SelectionBox CreateSelectionOverlay(IReadOnlyList overlays) => new SelectionBox(overlays); + /// /// Creates a which provides a layer above or below the . /// protected virtual ScalableContainer CreateLayerContainer() => new ScalableContainer { RelativeSizeAxes = Axes.Both }; - - /// - /// Creates the which overlays selected s. - /// - protected virtual HitObjectOverlayLayer CreateHitObjectOverlayLayer() => new HitObjectOverlayLayer(); } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs b/osu.Game/Rulesets/Edit/HitObjectMask.cs similarity index 56% rename from osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs rename to osu.Game/Rulesets/Edit/HitObjectMask.cs index 8c58275943..051b42fec6 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlay.cs +++ b/osu.Game/Rulesets/Edit/HitObjectMask.cs @@ -4,13 +4,16 @@ using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Objects.Drawables; -namespace osu.Game.Rulesets.Edit.Layers.Selection +namespace osu.Game.Rulesets.Edit { - public class HitObjectOverlay : Container + /// + /// A mask placed above a adding editing functionality. + /// + public class HitObjectMask : Container { public readonly DrawableHitObject HitObject; - public HitObjectOverlay(DrawableHitObject hitObject) + public HitObjectMask(DrawableHitObject hitObject) { HitObject = hitObject; } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs b/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs deleted file mode 100644 index 1c25846ee3..0000000000 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionBox.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2007-2018 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Graphics.Shapes; -using OpenTK.Graphics; - -namespace osu.Game.Rulesets.Edit.Layers.Selection -{ - /// - /// A box that represents a drag selection. - /// - public class SelectionBox : VisibilityContainer - { - public const float BORDER_RADIUS = 2; - - /// - /// Creates a new . - /// - public SelectionBox() - { - Masking = true; - BorderColour = Color4.White; - BorderThickness = BORDER_RADIUS; - - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Alpha = 0.1f - }; - } - - public void SetDragRectangle(RectangleF rectangle) - { - var topLeft = Parent.ToLocalSpace(rectangle.TopLeft); - var bottomRight = Parent.ToLocalSpace(rectangle.BottomRight); - - Position = topLeft; - Size = bottomRight - topLeft; - } - - public override bool DisposeOnDeathRemoval => true; - - protected override void PopIn() => this.FadeIn(250, Easing.OutQuint); - protected override void PopOut() => this.FadeOut(250, Easing.OutQuint); - } -} diff --git a/osu.Game/Rulesets/Edit/Layers/BorderLayer.cs b/osu.Game/Screens/Edit/Screens/Compose/Layers/BorderLayer.cs similarity index 92% rename from osu.Game/Rulesets/Edit/Layers/BorderLayer.cs rename to osu.Game/Screens/Edit/Screens/Compose/Layers/BorderLayer.cs index 54c30b8d89..49cf078d36 100644 --- a/osu.Game/Rulesets/Edit/Layers/BorderLayer.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Layers/BorderLayer.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using OpenTK.Graphics; -namespace osu.Game.Rulesets.Edit.Layers +namespace osu.Game.Screens.Edit.Screens.Compose.Layers { public class BorderLayer : Container { diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs b/osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs similarity index 51% rename from osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs rename to osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs index 24d594f59a..63b5538ad7 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/HitObjectOverlayLayer.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Layers/HitObjectMaskLayer.cs @@ -1,23 +1,25 @@ // Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Collections.Generic; using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Objects.Drawables; -namespace osu.Game.Rulesets.Edit.Layers.Selection +namespace osu.Game.Screens.Edit.Screens.Compose.Layers { - public class HitObjectOverlayLayer : CompositeDrawable + public class HitObjectMaskLayer : CompositeDrawable { - private readonly Container overlayContainer; + private readonly HitObjectComposer composer; + private readonly Container overlayContainer; - public HitObjectOverlayLayer() + public HitObjectMaskLayer(HitObjectComposer composer) { + this.composer = composer; RelativeSizeAxes = Axes.Both; - InternalChild = overlayContainer = new Container { RelativeSizeAxes = Axes.Both }; + InternalChild = overlayContainer = new Container { RelativeSizeAxes = Axes.Both }; } /// @@ -26,7 +28,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection /// The to create an overlay for. public void AddOverlay(DrawableHitObject hitObject) { - var overlay = CreateOverlayFor(hitObject); + var overlay = composer.CreateMaskFor(hitObject); if (overlay == null) return; @@ -47,27 +49,14 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection existing.Expire(); } - private SelectionOverlay currentSelectionOverlay; + private SelectionBox currentSelectionBox; - public void AddSelectionOverlay() => AddInternal(currentSelectionOverlay = CreateSelectionOverlay(overlayContainer)); + public void AddSelectionOverlay() => AddInternal(currentSelectionBox = composer.CreateSelectionOverlay(overlayContainer)); public void RemoveSelectionOverlay() { - currentSelectionOverlay?.Hide(); - currentSelectionOverlay?.Expire(); + currentSelectionBox?.Hide(); + currentSelectionBox?.Expire(); } - - /// - /// Creates a for a specific . - /// - /// The to create the overlay for. - protected virtual HitObjectOverlay CreateOverlayFor(DrawableHitObject hitObject) => null; - - /// - /// Creates a which outlines s - /// and handles all hitobject movement/pattern adjustments. - /// - /// The overlays. - protected virtual SelectionOverlay CreateSelectionOverlay(IReadOnlyList overlays) => new SelectionOverlay(overlays); } } diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs b/osu.Game/Screens/Edit/Screens/Compose/Layers/SelectionBox.cs similarity index 83% rename from osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs rename to osu.Game/Screens/Edit/Screens/Compose/Layers/SelectionBox.cs index c3bb5911f8..0e5d824559 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionOverlay.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Layers/SelectionBox.cs @@ -9,25 +9,28 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Input; using osu.Game.Graphics; +using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Edit.Types; using osu.Game.Rulesets.Objects.Drawables; using OpenTK; -namespace osu.Game.Rulesets.Edit.Layers.Selection +namespace osu.Game.Screens.Edit.Screens.Compose.Layers { /// - /// A box which encloses s. + /// A box which surrounds s and provides interactive handles, context menus etc. /// - public class SelectionOverlay : VisibilityContainer + public class SelectionBox : VisibilityContainer { - private readonly IReadOnlyList overlays; + private readonly IReadOnlyList overlays; - public SelectionOverlay(IReadOnlyList overlays) + public const float BORDER_RADIUS = 2; + + public SelectionBox(IReadOnlyList overlays) { this.overlays = overlays; Masking = true; - BorderThickness = SelectionBox.BORDER_RADIUS; + BorderThickness = BORDER_RADIUS; InternalChild = new Box { diff --git a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs b/osu.Game/Screens/Edit/Screens/Compose/Layers/SelectionLayer.cs similarity index 78% rename from osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs rename to osu.Game/Screens/Edit/Screens/Compose/Layers/SelectionLayer.cs index 2f8b9165c4..8c66007bb7 100644 --- a/osu.Game/Rulesets/Edit/Layers/Selection/SelectionLayer.cs +++ b/osu.Game/Screens/Edit/Screens/Compose/Layers/SelectionLayer.cs @@ -8,12 +8,14 @@ using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Shapes; using osu.Framework.Input; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.UI; using OpenTK; +using OpenTK.Graphics; -namespace osu.Game.Rulesets.Edit.Layers.Selection +namespace osu.Game.Screens.Edit.Screens.Compose.Layers { public class SelectionLayer : CompositeDrawable { @@ -46,7 +48,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection RelativeSizeAxes = Axes.Both; } - private SelectionBox selectionBox; + private DragBox dragBox; private readonly HashSet selectedHitObjects = new HashSet(); @@ -58,20 +60,20 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection protected override bool OnDragStart(InputState state) { - AddInternal(selectionBox = new SelectionBox()); + AddInternal(dragBox = new DragBox()); return true; } protected override bool OnDrag(InputState state) { - selectionBox.Show(); + dragBox.Show(); var dragPosition = state.Mouse.NativeState.Position; var dragStartPosition = state.Mouse.NativeState.PositionMouseDown ?? dragPosition; var screenSpaceDragQuad = new Quad(dragStartPosition.X, dragStartPosition.Y, dragPosition.X - dragStartPosition.X, dragPosition.Y - dragStartPosition.Y); - selectionBox.SetDragRectangle(screenSpaceDragQuad.AABBFloat); + dragBox.SetDragRectangle(screenSpaceDragQuad.AABBFloat); selectQuad(screenSpaceDragQuad); return true; @@ -79,8 +81,8 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection protected override bool OnDragEnd(InputState state) { - selectionBox.Hide(); - selectionBox.Expire(); + dragBox.Hide(); + dragBox.Expire(); finishSelection(); @@ -197,5 +199,41 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection return; SelectionFinished?.Invoke(); } + + /// + /// A box that represents a drag selection. + /// + private class DragBox : VisibilityContainer + { + /// + /// Creates a new . + /// + public DragBox() + { + Masking = true; + BorderColour = Color4.White; + BorderThickness = SelectionBox.BORDER_RADIUS; + + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Alpha = 0.1f + }; + } + + public void SetDragRectangle(RectangleF rectangle) + { + var topLeft = Parent.ToLocalSpace(rectangle.TopLeft); + var bottomRight = Parent.ToLocalSpace(rectangle.BottomRight); + + Position = topLeft; + Size = bottomRight - topLeft; + } + + public override bool DisposeOnDeathRemoval => true; + + protected override void PopIn() => this.FadeIn(250, Easing.OutQuint); + protected override void PopOut() => this.FadeOut(250, Easing.OutQuint); + } } } diff --git a/osu.Game/Screens/Edit/Screens/EditorScreen.cs b/osu.Game/Screens/Edit/Screens/EditorScreen.cs index 2e654b4373..009830502e 100644 --- a/osu.Game/Screens/Edit/Screens/EditorScreen.cs +++ b/osu.Game/Screens/Edit/Screens/EditorScreen.cs @@ -8,6 +8,9 @@ using osu.Game.Beatmaps; namespace osu.Game.Screens.Edit.Screens { + /// + /// TODO: eventually make this inherit Screen and add a local scren stack inside the Editor. + /// public class EditorScreen : Container { public readonly Bindable Beatmap = new Bindable(); diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index fa99ae616a..14d2381640 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -361,10 +361,7 @@ - - - - + @@ -379,6 +376,10 @@ + + + + @@ -393,8 +394,6 @@ - -