diff --git a/osu.Game.Modes.Catch/Beatmaps/CatchBeatmapConverter.cs b/osu.Game.Modes.Catch/Beatmaps/CatchBeatmapConverter.cs new file mode 100644 index 0000000000..6460751570 --- /dev/null +++ b/osu.Game.Modes.Catch/Beatmaps/CatchBeatmapConverter.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 osu.Game.Beatmaps; +using osu.Game.Modes.Catch.Objects; +using System.Collections.Generic; + +namespace osu.Game.Modes.Catch.Beatmaps +{ + internal class CatchBeatmapConverter : IBeatmapConverter + { + public Beatmap Convert(Beatmap original) + { + return new Beatmap(original) + { + HitObjects = new List() // Todo: Convert HitObjects + }; + } + } +} diff --git a/osu.Game.Modes.Catch/CatchDifficultyCalculator.cs b/osu.Game.Modes.Catch/CatchDifficultyCalculator.cs index ccc4097d59..53c6f5c2ce 100644 --- a/osu.Game.Modes.Catch/CatchDifficultyCalculator.cs +++ b/osu.Game.Modes.Catch/CatchDifficultyCalculator.cs @@ -2,26 +2,23 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; +using osu.Game.Modes.Catch.Beatmaps; using osu.Game.Modes.Catch.Objects; -using osu.Game.Modes.Objects; -using System; using System.Collections.Generic; namespace osu.Game.Modes.Catch { public class CatchDifficultyCalculator : DifficultyCalculator { - protected override PlayMode PlayMode => PlayMode.Catch; - public CatchDifficultyCalculator(Beatmap beatmap) : base(beatmap) { } - protected override HitObjectConverter Converter => new CatchConverter(); - - protected override double CalculateInternal(Dictionary categoryDifficulty) + protected override double CalculateInternal(Dictionary categoryDifficulty) { return 0; } + + protected override IBeatmapConverter CreateBeatmapConverter() => new CatchBeatmapConverter(); } } \ No newline at end of file diff --git a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs index ed0c8b4747..1537227d8f 100644 --- a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs +++ b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs @@ -2,8 +2,8 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; +using osu.Game.Modes.Catch.Beatmaps; using osu.Game.Modes.Catch.Objects; -using osu.Game.Modes.Objects; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.UI; @@ -16,7 +16,7 @@ namespace osu.Game.Modes.Catch.UI { } - protected override HitObjectConverter Converter => new CatchConverter(); + protected override IBeatmapConverter CreateBeatmapConverter() => new CatchBeatmapConverter(); protected override Playfield CreatePlayfield() => new CatchPlayfield(); diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index 663d12bb4d..10abb312fc 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -47,6 +47,7 @@ + diff --git a/osu.Game.Modes.Mania/Beatmaps/ManiaBeatmapConverter.cs b/osu.Game.Modes.Mania/Beatmaps/ManiaBeatmapConverter.cs new file mode 100644 index 0000000000..0f42da4ac8 --- /dev/null +++ b/osu.Game.Modes.Mania/Beatmaps/ManiaBeatmapConverter.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 osu.Game.Beatmaps; +using osu.Game.Modes.Mania.Objects; +using System.Collections.Generic; + +namespace osu.Game.Modes.Mania.Beatmaps +{ + internal class ManiaBeatmapConverter : IBeatmapConverter + { + public Beatmap Convert(Beatmap original) + { + return new Beatmap(original) + { + HitObjects = new List() // Todo: Implement + }; + } + } +} diff --git a/osu.Game.Modes.Mania/ManiaDifficultyCalculator.cs b/osu.Game.Modes.Mania/ManiaDifficultyCalculator.cs index 975b78c215..02a5a3acdc 100644 --- a/osu.Game.Modes.Mania/ManiaDifficultyCalculator.cs +++ b/osu.Game.Modes.Mania/ManiaDifficultyCalculator.cs @@ -2,29 +2,24 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; +using osu.Game.Modes.Mania.Beatmaps; using osu.Game.Modes.Mania.Objects; -using osu.Game.Modes.Objects; -using System; using System.Collections.Generic; namespace osu.Game.Modes.Mania { public class ManiaDifficultyCalculator : DifficultyCalculator { - protected override PlayMode PlayMode => PlayMode.Mania; - - private int columns; - - public ManiaDifficultyCalculator(Beatmap beatmap, int columns = 5) : base(beatmap) + public ManiaDifficultyCalculator(Beatmap beatmap) + : base(beatmap) { - this.columns = columns; } - protected override HitObjectConverter Converter => new ManiaConverter(columns); - - protected override double CalculateInternal(Dictionary categoryDifficulty) + protected override double CalculateInternal(Dictionary categoryDifficulty) { return 0; } + + protected override IBeatmapConverter CreateBeatmapConverter() => new ManiaBeatmapConverter(); } } \ No newline at end of file diff --git a/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs index 82dd2f2eeb..911742b222 100644 --- a/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs +++ b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs @@ -2,8 +2,8 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; +using osu.Game.Modes.Mania.Beatmaps; using osu.Game.Modes.Mania.Objects; -using osu.Game.Modes.Objects; using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.UI; @@ -19,7 +19,7 @@ namespace osu.Game.Modes.Mania.UI this.columns = columns; } - protected override HitObjectConverter Converter => new ManiaConverter(columns); + protected override IBeatmapConverter CreateBeatmapConverter() => new ManiaBeatmapConverter(); protected override Playfield CreatePlayfield() => new ManiaPlayfield(columns); diff --git a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj index 354f0b8541..66e46f9e48 100644 --- a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj +++ b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj @@ -47,6 +47,7 @@ + @@ -85,6 +86,7 @@ +