From 8479880d44c74c8a478151db63facb2d32fbde73 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 13:33:39 +0900 Subject: [PATCH 01/11] Move SliderVelocityAt into TimingInfo, fix xmldoc. --- osu.Game/Beatmaps/Beatmap.cs | 15 --------------- osu.Game/Beatmaps/Timing/TimingInfo.cs | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index fc8bb751f9..f80973a33c 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -43,21 +43,6 @@ namespace osu.Game.Beatmaps TimingInfo = original?.TimingInfo ?? TimingInfo; ComboColors = original?.ComboColors ?? ComboColors; } - - /// - /// Finds the slider velocity at a time. - /// - /// The time to find the slider velocity at. - /// The slider velocity in positional length units. - public double SliderVelocityAt(double time) - { - double scoringDistance = 100 * BeatmapInfo.Difficulty.SliderMultiplier; - double beatDistance = TimingInfo.BeatDistanceAt(time); - - if (beatDistance > 0) - return scoringDistance / beatDistance * 1000; - return scoringDistance; - } } /// diff --git a/osu.Game/Beatmaps/Timing/TimingInfo.cs b/osu.Game/Beatmaps/Timing/TimingInfo.cs index f245a6b1aa..0e47ba983b 100644 --- a/osu.Game/Beatmaps/Timing/TimingInfo.cs +++ b/osu.Game/Beatmaps/Timing/TimingInfo.cs @@ -102,5 +102,21 @@ namespace osu.Game.Beatmaps.Timing return timingPoint ?? ControlPoint.Default; } + + /// + /// Finds the slider velocity at a time. + /// + /// The time to find the slider velocity at. + /// The slider velocity in milliseconds. + public double SliderVelocityAt(double time) + { + const double base_scoring_distance = 100; + + double beatDistance = BeatDistanceAt(time); + + if (beatDistance > 0) + return base_scoring_distance / beatDistance * 1000; + return base_scoring_distance; + } } } \ No newline at end of file From 28240fb3b5f30ac5139a63f8b0e06a88b501a0ff Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 13:33:48 +0900 Subject: [PATCH 02/11] Rename TaikoBaseHit -> TaikoHitObject. --- osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs | 8 ++++---- osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs | 6 +++--- .../Objects/Drawable/DrawableTaikoHit.cs | 4 ++-- .../Objects/{TaikoBaseHit.cs => TaikoHitObject.cs} | 2 +- osu.Game.Modes.Taiko/TaikoDifficultyCalculator.cs | 4 ++-- osu.Game.Modes.Taiko/TaikoScoreProcessor.cs | 4 ++-- osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 10 +++++----- osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs | 2 +- osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) rename osu.Game.Modes.Taiko/Objects/{TaikoBaseHit.cs => TaikoHitObject.cs} (85%) diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs index 3230010fda..d78c347f22 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapConverter.cs @@ -7,13 +7,13 @@ using System.Collections.Generic; namespace osu.Game.Modes.Taiko.Beatmaps { - internal class TaikoBeatmapConverter : IBeatmapConverter + internal class TaikoBeatmapConverter : IBeatmapConverter { - public Beatmap Convert(Beatmap original) + public Beatmap Convert(Beatmap original) { - return new Beatmap(original) + return new Beatmap(original) { - HitObjects = new List() // Todo: Implement + HitObjects = new List() // Todo: Implement }; } } diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs index 9a244cd23e..84bc470e55 100644 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs +++ b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs @@ -6,13 +6,13 @@ using osu.Game.Modes.Taiko.Objects; namespace osu.Game.Modes.Taiko.Beatmaps { - internal class TaikoBeatmapProcessor : IBeatmapProcessor + internal class TaikoBeatmapProcessor : IBeatmapProcessor { - public void SetDefaults(TaikoBaseHit hitObject, Beatmap beatmap) + public void SetDefaults(TaikoHitObject hitObject, Beatmap beatmap) { } - public void PostProcess(Beatmap beatmap) + public void PostProcess(Beatmap beatmap) { } } diff --git a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs index a54108afda..760977ef5b 100644 --- a/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs @@ -12,9 +12,9 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable { internal class DrawableTaikoHit : Sprite { - private TaikoBaseHit h; + private TaikoHitObject h; - public DrawableTaikoHit(TaikoBaseHit h) + public DrawableTaikoHit(TaikoHitObject h) { this.h = h; diff --git a/osu.Game.Modes.Taiko/Objects/TaikoBaseHit.cs b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs similarity index 85% rename from osu.Game.Modes.Taiko/Objects/TaikoBaseHit.cs rename to osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs index 4077c1933a..a5f488e076 100644 --- a/osu.Game.Modes.Taiko/Objects/TaikoBaseHit.cs +++ b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs @@ -5,7 +5,7 @@ using osu.Game.Modes.Objects; namespace osu.Game.Modes.Taiko.Objects { - public class TaikoBaseHit : HitObject + public class TaikoHitObject : HitObject { public float Scale = 1; diff --git a/osu.Game.Modes.Taiko/TaikoDifficultyCalculator.cs b/osu.Game.Modes.Taiko/TaikoDifficultyCalculator.cs index 4a133ea896..93dfc3d651 100644 --- a/osu.Game.Modes.Taiko/TaikoDifficultyCalculator.cs +++ b/osu.Game.Modes.Taiko/TaikoDifficultyCalculator.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; namespace osu.Game.Modes.Taiko { - public class TaikoDifficultyCalculator : DifficultyCalculator + public class TaikoDifficultyCalculator : DifficultyCalculator { public TaikoDifficultyCalculator(Beatmap beatmap) : base(beatmap) { @@ -19,6 +19,6 @@ namespace osu.Game.Modes.Taiko return 0; } - protected override IBeatmapConverter CreateBeatmapConverter() => new TaikoBeatmapConverter(); + protected override IBeatmapConverter CreateBeatmapConverter() => new TaikoBeatmapConverter(); } } \ No newline at end of file diff --git a/osu.Game.Modes.Taiko/TaikoScoreProcessor.cs b/osu.Game.Modes.Taiko/TaikoScoreProcessor.cs index 1e5c70cd2e..849c0fa894 100644 --- a/osu.Game.Modes.Taiko/TaikoScoreProcessor.cs +++ b/osu.Game.Modes.Taiko/TaikoScoreProcessor.cs @@ -7,13 +7,13 @@ using osu.Game.Modes.UI; namespace osu.Game.Modes.Taiko { - internal class TaikoScoreProcessor : ScoreProcessor + internal class TaikoScoreProcessor : ScoreProcessor { public TaikoScoreProcessor() { } - public TaikoScoreProcessor(HitRenderer hitRenderer) + public TaikoScoreProcessor(HitRenderer hitRenderer) : base(hitRenderer) { } diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index 385b0915f4..80e42cb976 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -10,7 +10,7 @@ using osu.Game.Modes.UI; namespace osu.Game.Modes.Taiko.UI { - public class TaikoHitRenderer : HitRenderer + public class TaikoHitRenderer : HitRenderer { public TaikoHitRenderer(WorkingBeatmap beatmap) : base(beatmap) @@ -19,12 +19,12 @@ namespace osu.Game.Modes.Taiko.UI public override ScoreProcessor CreateScoreProcessor() => new TaikoScoreProcessor(this); - protected override IBeatmapConverter CreateBeatmapConverter() => new TaikoBeatmapConverter(); + protected override IBeatmapConverter CreateBeatmapConverter() => new TaikoBeatmapConverter(); - protected override IBeatmapProcessor CreateBeatmapProcessor() => new TaikoBeatmapProcessor(); + protected override IBeatmapProcessor CreateBeatmapProcessor() => new TaikoBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new TaikoPlayfield(); + protected override Playfield CreatePlayfield() => new TaikoPlayfield(); - protected override DrawableHitObject GetVisualRepresentation(TaikoBaseHit h) => null; + protected override DrawableHitObject GetVisualRepresentation(TaikoHitObject h) => null; } } diff --git a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs index d80aa94fa1..f3ae600501 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs @@ -13,7 +13,7 @@ using osu.Game.Modes.Taiko.Judgements; namespace osu.Game.Modes.Taiko.UI { - public class TaikoPlayfield : Playfield + public class TaikoPlayfield : Playfield { public TaikoPlayfield() { diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index bc38781b01..7ea6dfeadb 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -52,7 +52,7 @@ - + From b399c6adbb65dcf7a4a6442c2de5e49be8b9d18c Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 13:38:17 +0900 Subject: [PATCH 03/11] Implement TaikoHitObject. --- .../Objects/TaikoHitObject.cs | 73 +++++++++++++++++-- osu.Game.Modes.Taiko/Objects/TaikoHitType.cs | 21 ++++++ .../osu.Game.Modes.Taiko.csproj | 1 + 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 osu.Game.Modes.Taiko/Objects/TaikoHitType.cs diff --git a/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs index a5f488e076..b46a633647 100644 --- a/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs +++ b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs @@ -1,20 +1,77 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Beatmaps.Samples; +using osu.Game.Beatmaps.Timing; +using osu.Game.Database; using osu.Game.Modes.Objects; namespace osu.Game.Modes.Taiko.Objects { public class TaikoHitObject : HitObject { - public float Scale = 1; + /// + /// HitCircle radius. + /// + public const float CIRCLE_RADIUS = 64; - public TaikoColour Type; - } + /// + /// The hit window that results in a "GREAT" hit. + /// + public double HitWindowGreat = 35; - public enum TaikoColour - { - Red, - Blue + /// + /// The hit window that results in a "GOOD" hit. + /// + public double HitWindowGood = 80; + + /// + /// The hit window that results in a "MISS". + /// + public double HitWindowMiss = 95; + + /// + /// The time to scroll in the HitObject. + /// + public double PreEmpt; + + /// + /// Whether this HitObject is in Kiai time. + /// + public bool Kiai; + + /// + /// The type of HitObject. + /// + public virtual TaikoHitType Type + { + get + { + SampleType st = Sample?.Type ?? SampleType.None; + + return + // Centre/Rim + ((st & ~(SampleType.Finish | SampleType.Normal)) == 0 ? TaikoHitType.CentreHit : TaikoHitType.RimHit) + // Finisher + | ((st & SampleType.Finish) > 0 ? TaikoHitType.Finisher : TaikoHitType.None); + } + } + + public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) + { + base.ApplyDefaults(timing, difficulty); + + PreEmpt = 600 / (timing.SliderVelocityAt(StartTime) * difficulty.SliderMultiplier) * 1000; + + ControlPoint overridePoint; + Kiai = timing.TimingPointAt(StartTime, out overridePoint).KiaiMode; + + if (overridePoint != null) + Kiai |= overridePoint.KiaiMode; + + HitWindowGreat = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 50, 35, 20); + HitWindowGood = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 120, 80, 50); + HitWindowMiss = BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 135, 95, 70); + } } -} +} \ No newline at end of file diff --git a/osu.Game.Modes.Taiko/Objects/TaikoHitType.cs b/osu.Game.Modes.Taiko/Objects/TaikoHitType.cs new file mode 100644 index 0000000000..adf3a67246 --- /dev/null +++ b/osu.Game.Modes.Taiko/Objects/TaikoHitType.cs @@ -0,0 +1,21 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; + +namespace osu.Game.Modes.Taiko.Objects +{ + [Flags] + public enum TaikoHitType + { + None = 0, + CentreHit = 1 << 0, + RimHit = 1 << 1, + DrumRoll = 1 << 2, + DrumRollTick = 1 << 3, + Bash = 1 << 4, + Finisher = 1 << 5, + + Hit = CentreHit | RimHit + } +} \ No newline at end of file diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 7ea6dfeadb..0e9e6a56b4 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -50,6 +50,7 @@ + From 862c4c408f9acc2b0c7e4d8202e19c1b9b2d4584 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 14:24:46 +0900 Subject: [PATCH 04/11] Add legacy beatmap flag. --- osu.Game/Beatmaps/Beatmap.cs | 9 +++++++++ osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs | 11 +++++++++++ osu.Game/Beatmaps/Legacy/IIsLegacy.cs | 9 +++++++++ osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 17 +++++++++++++++++ osu.Game/osu.Game.csproj | 2 ++ 5 files changed, 48 insertions(+) create mode 100644 osu.Game/Beatmaps/Legacy/IIsLegacy.cs create mode 100644 osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index fc8bb751f9..feeaa5617a 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -70,5 +70,14 @@ namespace osu.Game.Beatmaps /// /// The star difficulty. public double CalculateStarDifficulty() => Ruleset.GetRuleset(BeatmapInfo.Mode).CreateDifficultyCalculator(this).Calculate(); + + /// + /// Constructs a new beatmap. + /// + /// The original beatmap to use the parameters of. + public Beatmap(Beatmap original = null) + : base(original) + { + } } } diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index e7ede36b4b..979156ac96 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -10,6 +10,7 @@ using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Timing; using osu.Game.Modes; using osu.Game.Modes.Objects; +using osu.Game.Beatmaps.Legacy; namespace osu.Game.Beatmaps.Formats { @@ -242,6 +243,16 @@ namespace osu.Game.Beatmaps.Formats } } + protected override Beatmap ParseFile(TextReader stream) + { + return new LegacyBeatmap(base.ParseFile(stream)); + } + + public override Beatmap Decode(TextReader stream) + { + return new LegacyBeatmap(base.Decode(stream)); + } + protected override void ParseFile(TextReader stream, Beatmap beatmap) { HitObjectParser parser = null; diff --git a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs new file mode 100644 index 0000000000..23ab9f4bc4 --- /dev/null +++ b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs @@ -0,0 +1,9 @@ +namespace osu.Game.Beatmaps.Legacy +{ + /// + /// A Beatmap that was loaded from a legacy .osu beatmap file (version <=15). + /// + public interface IIsLegacy + { + } +} diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs new file mode 100644 index 0000000000..00aeeb2b49 --- /dev/null +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -0,0 +1,17 @@ +namespace osu.Game.Beatmaps.Legacy +{ + /// + /// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15). + /// + internal class LegacyBeatmap : Beatmap, IIsLegacy + { + /// + /// Constructs a new beatmap. + /// + /// The original beatmap to use the parameters of. + public LegacyBeatmap(Beatmap original = null) + : base(original) + { + } + } +} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 80d5c906e0..c0f11dbcb9 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -75,7 +75,9 @@ + + From 67c9bb37fd8294a5f6229e856c00cfecf5335cd9 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 14:51:09 +0900 Subject: [PATCH 05/11] Add license headers. --- osu.Game/Beatmaps/Legacy/IIsLegacy.cs | 5 ++++- osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs index 23ab9f4bc4..3babd3e66f 100644 --- a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs +++ b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs @@ -1,4 +1,7 @@ -namespace osu.Game.Beatmaps.Legacy +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Beatmaps.Legacy { /// /// A Beatmap that was loaded from a legacy .osu beatmap file (version <=15). diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index 00aeeb2b49..d0386e7560 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -1,4 +1,7 @@ -namespace osu.Game.Beatmaps.Legacy +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +namespace osu.Game.Beatmaps.Legacy { /// /// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15). From 74a1837a05f71d6a5f90bf681e4fd8b68b9fc535 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 14:56:50 +0900 Subject: [PATCH 06/11] Fix nullref. --- osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index d0386e7560..45c5665494 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -15,6 +15,7 @@ namespace osu.Game.Beatmaps.Legacy public LegacyBeatmap(Beatmap original = null) : base(original) { + HitObjects = original?.HitObjects ?? null; } } } From cce1ae055fc979a57642e48434ec40894e9c9d95 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Fri, 17 Mar 2017 15:30:19 +0900 Subject: [PATCH 07/11] Make DrawableHitObject expires explicit. --- osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs | 3 +++ osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs | 2 ++ osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs | 2 ++ osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs | 7 ++----- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs index c0ff0e520a..20bb937b76 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs @@ -128,9 +128,11 @@ namespace osu.Game.Modes.Osu.Objects.Drawables case ArmedState.Idle: Delay(duration + TIME_PREEMPT); FadeOut(TIME_FADEOUT); + Expire(true); break; case ArmedState.Miss: FadeOut(TIME_FADEOUT / 5); + Expire(); break; case ArmedState.Hit: const double flash_in = 40; @@ -150,6 +152,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables FadeOut(800); ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad); + Expire(); break; } } diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs index 5df2e26bc3..a2a52c7d94 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs @@ -168,6 +168,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables ball.FadeOut(160); FadeOut(800); + + Expire(); } public Drawable ProxiedLayer => initialCircle.ApproachCircle; diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs index 97df378f86..77bfb97ad4 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs @@ -146,9 +146,11 @@ namespace osu.Game.Modes.Osu.Objects.Drawables { case ArmedState.Hit: ScaleTo(Scale * 1.2f, 320, EasingTypes.Out); + Expire(); break; case ArmedState.Miss: ScaleTo(Scale * 0.8f, 320, EasingTypes.In); + Expire(); break; } } diff --git a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index 41c807ba9e..3ff30bd90e 100644 --- a/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -34,12 +34,11 @@ namespace osu.Game.Modes.Objects.Drawables set { - if (state == value) return; + if (state == value) + return; state = value; UpdateState(state); - if (IsLoaded) - Expire(); if (State == ArmedState.Hit) PlaySample(); @@ -63,8 +62,6 @@ namespace osu.Game.Modes.Objects.Drawables //force application of the state that was set before we loaded. UpdateState(State); - - Expire(true); } } From 26b0bb02d80dfb49ac00435d029f0693bd15aa75 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 18 Mar 2017 18:32:54 +0900 Subject: [PATCH 08/11] Remove IIsLegacy, expose LegacyBeatmap without a public constructor. --- osu.Game/Beatmaps/Legacy/IIsLegacy.cs | 12 ------------ osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 4 ++-- osu.Game/osu.Game.csproj | 1 - 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 osu.Game/Beatmaps/Legacy/IIsLegacy.cs diff --git a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs b/osu.Game/Beatmaps/Legacy/IIsLegacy.cs deleted file mode 100644 index 3babd3e66f..0000000000 --- a/osu.Game/Beatmaps/Legacy/IIsLegacy.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -namespace osu.Game.Beatmaps.Legacy -{ - /// - /// A Beatmap that was loaded from a legacy .osu beatmap file (version <=15). - /// - public interface IIsLegacy - { - } -} diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index 45c5665494..dd40af925a 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -6,13 +6,13 @@ namespace osu.Game.Beatmaps.Legacy /// /// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15). /// - internal class LegacyBeatmap : Beatmap, IIsLegacy + public class LegacyBeatmap : Beatmap { /// /// Constructs a new beatmap. /// /// The original beatmap to use the parameters of. - public LegacyBeatmap(Beatmap original = null) + internal LegacyBeatmap(Beatmap original = null) : base(original) { HitObjects = original?.HitObjects ?? null; diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index c0f11dbcb9..1f14615b62 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -77,7 +77,6 @@ - From b68b017a49e2b4a70a5bdbdc9cf9485d9638d1ce Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 18 Mar 2017 18:38:51 +0900 Subject: [PATCH 09/11] What even was this lol. --- osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs index dd40af925a..0b8b13f902 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs @@ -15,7 +15,7 @@ namespace osu.Game.Beatmaps.Legacy internal LegacyBeatmap(Beatmap original = null) : base(original) { - HitObjects = original?.HitObjects ?? null; + HitObjects = original?.HitObjects; } } } From 4b3308fd1db21a5a4aad7f68258e00bd4ff8a641 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Sat, 18 Mar 2017 18:40:26 +0900 Subject: [PATCH 10/11] Remove TaikoHitObject Type, we won't be using this going forward. --- osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs index b46a633647..4c55839ef0 100644 --- a/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs +++ b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs @@ -40,23 +40,6 @@ namespace osu.Game.Modes.Taiko.Objects /// public bool Kiai; - /// - /// The type of HitObject. - /// - public virtual TaikoHitType Type - { - get - { - SampleType st = Sample?.Type ?? SampleType.None; - - return - // Centre/Rim - ((st & ~(SampleType.Finish | SampleType.Normal)) == 0 ? TaikoHitType.CentreHit : TaikoHitType.RimHit) - // Finisher - | ((st & SampleType.Finish) > 0 ? TaikoHitType.Finisher : TaikoHitType.None); - } - } - public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty) { base.ApplyDefaults(timing, difficulty); From 73ffbf81423970358f210231bbd7e3ad66f92163 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 19 Mar 2017 11:52:16 +0900 Subject: [PATCH 11/11] Remove unnecessary using. --- osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs index 4c55839ef0..61d8ed5f01 100644 --- a/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs +++ b/osu.Game.Modes.Taiko/Objects/TaikoHitObject.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Timing; using osu.Game.Database; using osu.Game.Modes.Objects;