From 35ddca78f53e4bcd8c3ff625e74e11e96c771751 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Mon, 13 Mar 2017 14:50:55 +0900 Subject: [PATCH] Remove old, unused hit object converters (will be re-implemented through IBeatmapConverter). --- .../Objects/CatchConverter.cs | 40 ---------------- .../osu.Game.Modes.Catch.csproj | 1 - .../Objects/ManiaConverter.cs | 48 ------------------- .../osu.Game.Modes.Mania.csproj | 1 - .../Objects/TaikoConverter.cs | 39 --------------- .../osu.Game.Modes.Taiko.csproj | 1 - osu.Game/Modes/Objects/HitObjectConverter.cs | 25 ---------- osu.Game/osu.Game.csproj | 1 - 8 files changed, 156 deletions(-) delete mode 100644 osu.Game.Modes.Catch/Objects/CatchConverter.cs delete mode 100644 osu.Game.Modes.Mania/Objects/ManiaConverter.cs delete mode 100644 osu.Game.Modes.Taiko/Objects/TaikoConverter.cs delete mode 100644 osu.Game/Modes/Objects/HitObjectConverter.cs diff --git a/osu.Game.Modes.Catch/Objects/CatchConverter.cs b/osu.Game.Modes.Catch/Objects/CatchConverter.cs deleted file mode 100644 index 31ddc73f61..0000000000 --- a/osu.Game.Modes.Catch/Objects/CatchConverter.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.Collections.Generic; -using osu.Game.Modes.Objects; -using osu.Game.Modes.Osu.Objects; -using osu.Game.Beatmaps; - -namespace osu.Game.Modes.Catch.Objects -{ - internal class CatchConverter : HitObjectConverter - { - public override List Convert(Beatmap beatmap) - { - List output = new List(); - - foreach (HitObject i in beatmap.HitObjects) - { - CatchBaseHit h = i as CatchBaseHit; - - if (h == null) - { - OsuHitObject o = i as OsuHitObject; - - if (o == null) throw new HitObjectConvertException(@"Catch", i); - - h = new Fruit - { - StartTime = o.StartTime, - Position = o.Position.X, - }; - } - - output.Add(h); - } - - return output; - } - } -} diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index 10abb312fc..4646d0cd6c 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -50,7 +50,6 @@ - diff --git a/osu.Game.Modes.Mania/Objects/ManiaConverter.cs b/osu.Game.Modes.Mania/Objects/ManiaConverter.cs deleted file mode 100644 index 7e1183c0e3..0000000000 --- a/osu.Game.Modes.Mania/Objects/ManiaConverter.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using System.Collections.Generic; -using osu.Game.Modes.Objects; -using osu.Game.Modes.Osu.Objects; -using osu.Game.Beatmaps; - -namespace osu.Game.Modes.Mania.Objects -{ - internal class ManiaConverter : HitObjectConverter - { - private readonly int columns; - - public ManiaConverter(int columns) - { - this.columns = columns; - } - - public override List Convert(Beatmap beatmap) - { - List output = new List(); - - foreach (HitObject i in beatmap.HitObjects) - { - ManiaBaseHit h = i as ManiaBaseHit; - - if (h == null) - { - OsuHitObject o = i as OsuHitObject; - - if (o == null) throw new HitObjectConvertException(@"Mania", i); - - h = new Note - { - StartTime = o.StartTime, - Column = (int)Math.Round(o.Position.X / 512 * columns) - }; - } - - output.Add(h); - } - - return output; - } - } -} diff --git a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj index 66e46f9e48..88bf879bcc 100644 --- a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj +++ b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj @@ -52,7 +52,6 @@ - diff --git a/osu.Game.Modes.Taiko/Objects/TaikoConverter.cs b/osu.Game.Modes.Taiko/Objects/TaikoConverter.cs deleted file mode 100644 index 3a0e07e390..0000000000 --- a/osu.Game.Modes.Taiko/Objects/TaikoConverter.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.Collections.Generic; -using osu.Game.Modes.Objects; -using osu.Game.Modes.Osu.Objects; -using osu.Game.Beatmaps; - -namespace osu.Game.Modes.Taiko.Objects -{ - internal class TaikoConverter : HitObjectConverter - { - public override List Convert(Beatmap beatmap) - { - List output = new List(); - - foreach (HitObject i in beatmap.HitObjects) - { - TaikoBaseHit h = i as TaikoBaseHit; - - if (h == null) - { - OsuHitObject o = i as OsuHitObject; - - if (o == null) throw new HitObjectConvertException(@"Taiko", i); - - h = new TaikoBaseHit - { - StartTime = o.StartTime, - }; - } - - output.Add(h); - } - - return output; - } - } -} diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj index 0089e84532..2cc45682ef 100644 --- a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -51,7 +51,6 @@ - diff --git a/osu.Game/Modes/Objects/HitObjectConverter.cs b/osu.Game/Modes/Objects/HitObjectConverter.cs deleted file mode 100644 index d7c6113af1..0000000000 --- a/osu.Game/Modes/Objects/HitObjectConverter.cs +++ /dev/null @@ -1,25 +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 System; -using System.Collections.Generic; - -namespace osu.Game.Modes.Objects -{ - public abstract class HitObjectConverter - where T : HitObject - { - public abstract List Convert(Beatmap beatmap); - } - - public class HitObjectConvertException : Exception - { - public HitObject Input { get; } - public HitObjectConvertException(string modeName, HitObject input) - : base($@"Can't convert from {input.GetType().Name} to {modeName} HitObject!") - { - Input = input; - } - } -} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 3d4a763cb8..cc1b6a2832 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -114,7 +114,6 @@ -