diff --git a/osu.Game.Modes.Catch/Beatmaps/CatchBeatmapProcessor.cs b/osu.Game.Modes.Catch/Beatmaps/CatchBeatmapProcessor.cs deleted file mode 100644 index 83e179dfce..0000000000 --- a/osu.Game.Modes.Catch/Beatmaps/CatchBeatmapProcessor.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Beatmaps; -using osu.Game.Modes.Beatmaps; -using osu.Game.Modes.Catch.Objects; - -namespace osu.Game.Modes.Catch.Beatmaps -{ - internal class CatchBeatmapProcessor : IBeatmapProcessor - { - public void SetDefaults(CatchBaseHit hitObject, Beatmap beatmap) - { - } - - public void PostProcess(Beatmap beatmap) - { - } - } -} diff --git a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs index 4b2a93977f..795904935d 100644 --- a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs +++ b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs @@ -24,8 +24,6 @@ namespace osu.Game.Modes.Catch.UI protected override BeatmapConverter CreateBeatmapConverter() => new CatchBeatmapConverter(); - protected override IBeatmapProcessor CreateBeatmapProcessor() => new CatchBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new CatchPlayfield(); protected override DrawableHitObject GetVisualRepresentation(CatchBaseHit h) => null; diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index b3e847a5be..dc1ea5dc23 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -48,7 +48,6 @@ - diff --git a/osu.Game.Modes.Mania/Beatmaps/ManiaBeatmapProcessor.cs b/osu.Game.Modes.Mania/Beatmaps/ManiaBeatmapProcessor.cs deleted file mode 100644 index a25f5652fc..0000000000 --- a/osu.Game.Modes.Mania/Beatmaps/ManiaBeatmapProcessor.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Beatmaps; -using osu.Game.Modes.Beatmaps; -using osu.Game.Modes.Mania.Objects; - -namespace osu.Game.Modes.Mania.Beatmaps -{ - internal class ManiaBeatmapProcessor : IBeatmapProcessor - { - public void SetDefaults(ManiaBaseHit hitObject, Beatmap beatmap) - { - } - - public void PostProcess(Beatmap beatmap) - { - } - } -} diff --git a/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs index 6bc8ab0788..ada79e992a 100644 --- a/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs +++ b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs @@ -27,8 +27,6 @@ namespace osu.Game.Modes.Mania.UI protected override BeatmapConverter CreateBeatmapConverter() => new ManiaBeatmapConverter(); - protected override IBeatmapProcessor CreateBeatmapProcessor() => new ManiaBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new ManiaPlayfield(columns); protected override DrawableHitObject GetVisualRepresentation(ManiaBaseHit h) => null; diff --git a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj index 6c666fd6ea..a8366a465f 100644 --- a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj +++ b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj @@ -48,7 +48,6 @@ - diff --git a/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs b/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs index df8fb58f9e..fd506f3493 100644 --- a/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs +++ b/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapProcessor.cs @@ -7,9 +7,9 @@ using osu.Game.Modes.Osu.Objects; namespace osu.Game.Modes.Osu.Beatmaps { - internal class OsuBeatmapProcessor : IBeatmapProcessor + internal class OsuBeatmapProcessor : BeatmapProcessor { - public void PostProcess(Beatmap beatmap) + public override void PostProcess(Beatmap beatmap) { if (beatmap.ComboColors.Count == 0) return; diff --git a/osu.Game.Modes.Osu/UI/OsuHitRenderer.cs b/osu.Game.Modes.Osu/UI/OsuHitRenderer.cs index 0f73fcdb19..a514ba6358 100644 --- a/osu.Game.Modes.Osu/UI/OsuHitRenderer.cs +++ b/osu.Game.Modes.Osu/UI/OsuHitRenderer.cs @@ -27,7 +27,7 @@ namespace osu.Game.Modes.Osu.UI protected override BeatmapConverter CreateBeatmapConverter() => new OsuBeatmapConverter(); - protected override IBeatmapProcessor CreateBeatmapProcessor() => new OsuBeatmapProcessor(); + protected override BeatmapProcessor CreateBeatmapProcessor() => new OsuBeatmapProcessor(); protected override Playfield CreatePlayfield() => new OsuPlayfield(); diff --git a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs b/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs deleted file mode 100644 index 6f162c2816..0000000000 --- a/osu.Game.Modes.Taiko/Beatmaps/TaikoBeatmapProcessor.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Game.Beatmaps; -using osu.Game.Modes.Beatmaps; -using osu.Game.Modes.Taiko.Objects; - -namespace osu.Game.Modes.Taiko.Beatmaps -{ - internal class TaikoBeatmapProcessor : IBeatmapProcessor - { - public void SetDefaults(TaikoHitObject hitObject, Beatmap beatmap) - { - } - - public void PostProcess(Beatmap beatmap) - { - } - } -} diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index 18cbd30776..48d4457a53 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -117,8 +117,6 @@ namespace osu.Game.Modes.Taiko.UI protected override BeatmapConverter CreateBeatmapConverter() => new TaikoBeatmapConverter(); - protected override IBeatmapProcessor CreateBeatmapProcessor() => new TaikoBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new TaikoPlayfield { Anchor = Anchor.CentreLeft, diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 03137802d4..ee7cb73431 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -48,7 +48,6 @@ - diff --git a/osu.Game/Modes/Beatmaps/IBeatmapProcessor.cs b/osu.Game/Modes/Beatmaps/BeatmapProcessor.cs similarity index 85% rename from osu.Game/Modes/Beatmaps/IBeatmapProcessor.cs rename to osu.Game/Modes/Beatmaps/BeatmapProcessor.cs index c40e7d1c41..ff675a4e5e 100644 --- a/osu.Game/Modes/Beatmaps/IBeatmapProcessor.cs +++ b/osu.Game/Modes/Beatmaps/BeatmapProcessor.cs @@ -10,7 +10,7 @@ namespace osu.Game.Modes.Beatmaps /// Processes a post-converted Beatmap. /// /// The type of HitObject contained in the Beatmap. - public interface IBeatmapProcessor + public class BeatmapProcessor where TObject : HitObject { /// @@ -20,6 +20,6 @@ namespace osu.Game.Modes.Beatmaps /// /// /// The Beatmap to process. - void PostProcess(Beatmap beatmap); + public virtual void PostProcess(Beatmap beatmap) { } } } diff --git a/osu.Game/Modes/UI/HitRenderer.cs b/osu.Game/Modes/UI/HitRenderer.cs index 46d05aa98f..72b67836f7 100644 --- a/osu.Game/Modes/UI/HitRenderer.cs +++ b/osu.Game/Modes/UI/HitRenderer.cs @@ -121,7 +121,7 @@ namespace osu.Game.Modes.UI RelativeSizeAxes = Axes.Both; BeatmapConverter converter = CreateBeatmapConverter(); - IBeatmapProcessor processor = CreateBeatmapProcessor(); + BeatmapProcessor processor = CreateBeatmapProcessor(); // Check if the beatmap can be converted if (!converter.CanConvert(beatmap.Beatmap)) @@ -154,18 +154,18 @@ namespace osu.Game.Modes.UI mod.Apply(this); } - /// - /// Creates a converter to convert Beatmap to a specific mode. - /// - /// The Beatmap converter. - protected abstract BeatmapConverter CreateBeatmapConverter(); - /// /// Creates a processor to perform post-processing operations /// on HitObjects in converted Beatmaps. /// /// The Beatmap processor. - protected abstract IBeatmapProcessor CreateBeatmapProcessor(); + protected virtual BeatmapProcessor CreateBeatmapProcessor() => new BeatmapProcessor(); + + /// + /// Creates a converter to convert Beatmap to a specific mode. + /// + /// The Beatmap converter. + protected abstract BeatmapConverter CreateBeatmapConverter(); } /// diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 770008be5f..9d1c3e527e 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -73,7 +73,7 @@ - +