From c61e3265bbc2e7aea740f3b8a136843422136c8c Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Tue, 18 Apr 2017 09:13:36 +0900 Subject: [PATCH] A few xmldoc additions/fixes. --- osu.Game/Beatmaps/IBeatmapConverter.cs | 4 +-- osu.Game/Modes/Objects/Legacy/Catch/Hit.cs | 2 +- .../Objects/Legacy/Catch/HitObjectParser.cs | 5 ++- osu.Game/Modes/Objects/Legacy/Catch/Slider.cs | 2 +- .../Modes/Objects/Legacy/Catch/Spinner.cs | 4 +-- .../Modes/Objects/Legacy/HitObjectParser.cs | 35 ++++++++++++++++--- osu.Game/Modes/Objects/Legacy/Mania/Hit.cs | 2 +- .../Objects/Legacy/Mania/HitObjectParser.cs | 5 ++- osu.Game/Modes/Objects/Legacy/Mania/Slider.cs | 2 +- .../Modes/Objects/Legacy/Mania/Spinner.cs | 4 +-- osu.Game/Modes/Objects/Legacy/Osu/Hit.cs | 2 +- .../Objects/Legacy/Osu/HitObjectParser.cs | 3 ++ osu.Game/Modes/Objects/Legacy/Osu/Slider.cs | 2 +- osu.Game/Modes/Objects/Legacy/Osu/Spinner.cs | 4 +-- osu.Game/Modes/Objects/Legacy/Taiko/Hit.cs | 2 +- .../Objects/Legacy/Taiko/HitObjectParser.cs | 3 ++ osu.Game/Modes/Objects/Legacy/Taiko/Slider.cs | 2 +- .../Modes/Objects/Legacy/Taiko/Spinner.cs | 4 +-- osu.Game/Modes/Objects/Types/IHasColumn.cs | 6 ++++ osu.Game/Modes/Objects/Types/IHasXPosition.cs | 3 ++ osu.Game/Modes/Objects/Types/IHasYPosition.cs | 3 ++ 21 files changed, 75 insertions(+), 24 deletions(-) diff --git a/osu.Game/Beatmaps/IBeatmapConverter.cs b/osu.Game/Beatmaps/IBeatmapConverter.cs index 815eab9c71..948e55967e 100644 --- a/osu.Game/Beatmaps/IBeatmapConverter.cs +++ b/osu.Game/Beatmaps/IBeatmapConverter.cs @@ -30,9 +30,9 @@ namespace osu.Game.Beatmaps public static class BeatmapConverterExtensions { /// - /// Checks if a Beatmap can be converted using a Beatmap Converter. + /// Checks if a Beatmap can be converted using this Beatmap Converter. /// - /// The Converter to use. + /// The Beatmap Converter. /// The Beatmap to check. /// Whether the Beatmap can be converted using . public static bool CanConvert(this IBeatmapConverter converter, Beatmap beatmap) where TObject : HitObject diff --git a/osu.Game/Modes/Objects/Legacy/Catch/Hit.cs b/osu.Game/Modes/Objects/Legacy/Catch/Hit.cs index 1b44675c37..dba7926a79 100644 --- a/osu.Game/Modes/Objects/Legacy/Catch/Hit.cs +++ b/osu.Game/Modes/Objects/Legacy/Catch/Hit.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Catch { /// - /// Legacy Hit-type, used for parsing Beatmaps. + /// Legacy osu!catch Hit-type, used for parsing Beatmaps. /// internal sealed class Hit : HitObject, IHasCombo, IHasXPosition { diff --git a/osu.Game/Modes/Objects/Legacy/Catch/HitObjectParser.cs b/osu.Game/Modes/Objects/Legacy/Catch/HitObjectParser.cs index f84b333d97..0ef4ed0646 100644 --- a/osu.Game/Modes/Objects/Legacy/Catch/HitObjectParser.cs +++ b/osu.Game/Modes/Objects/Legacy/Catch/HitObjectParser.cs @@ -1,12 +1,15 @@ // 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 OpenTK; using osu.Game.Modes.Objects.Types; +using System.Collections.Generic; namespace osu.Game.Modes.Objects.Legacy.Catch { + /// + /// A HitObjectParser to parse legacy osu!catch Beatmaps. + /// internal class HitObjectParser : Legacy.HitObjectParser { protected override HitObject CreateHit(Vector2 position, bool newCombo) diff --git a/osu.Game/Modes/Objects/Legacy/Catch/Slider.cs b/osu.Game/Modes/Objects/Legacy/Catch/Slider.cs index 9216abd18a..de71198851 100644 --- a/osu.Game/Modes/Objects/Legacy/Catch/Slider.cs +++ b/osu.Game/Modes/Objects/Legacy/Catch/Slider.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Catch { /// - /// Legacy Slider-type, used for parsing Beatmaps. + /// Legacy osu!catch Slider-type, used for parsing Beatmaps. /// internal sealed class Slider : CurvedHitObject, IHasXPosition, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Catch/Spinner.cs b/osu.Game/Modes/Objects/Legacy/Catch/Spinner.cs index c5e8f396c1..a99804a243 100644 --- a/osu.Game/Modes/Objects/Legacy/Catch/Spinner.cs +++ b/osu.Game/Modes/Objects/Legacy/Catch/Spinner.cs @@ -6,9 +6,9 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Catch { /// - /// Legacy Spinner-type, used for parsing Beatmaps. + /// Legacy osu!catch Spinner-type, used for parsing Beatmaps. /// - internal class Spinner : HitObject, IHasEndTime + internal sealed class Spinner : HitObject, IHasEndTime { public double EndTime { get; set; } diff --git a/osu.Game/Modes/Objects/Legacy/HitObjectParser.cs b/osu.Game/Modes/Objects/Legacy/HitObjectParser.cs index 6db7caeb3e..ec89a63c7a 100644 --- a/osu.Game/Modes/Objects/Legacy/HitObjectParser.cs +++ b/osu.Game/Modes/Objects/Legacy/HitObjectParser.cs @@ -11,6 +11,9 @@ using osu.Game.Audio; namespace osu.Game.Modes.Objects.Legacy { + /// + /// A HitObjectParser to parse legacy Beatmaps. + /// internal abstract class HitObjectParser : Objects.HitObjectParser { public override HitObject Parse(string text) @@ -146,10 +149,6 @@ namespace osu.Game.Modes.Objects.Legacy return result; } - protected abstract HitObject CreateHit(Vector2 position, bool newCombo); - protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, List controlPoints, double length, CurveType curveType, int repeatCount); - protected abstract HitObject CreateSpinner(Vector2 position, double endTime); - private void readCustomSampleBanks(string str, ref string normalSampleBank, ref string addSampleBank, ref int sampleVolume) { if (string.IsNullOrEmpty(str)) @@ -175,6 +174,34 @@ namespace osu.Game.Modes.Objects.Legacy sampleVolume = split.Length > 3 ? int.Parse(split[3]) : 0; } + /// + /// Creates a legacy Hit-type hit object. + /// + /// The position of the hit object. + /// Whether the hit object creates a new combo. + /// The hit object. + protected abstract HitObject CreateHit(Vector2 position, bool newCombo); + + /// + /// Creats a legacy Slider-type hit object. + /// + /// The position of the hit object. + /// Whether the hit object creates a new combo. + /// The slider control points. + /// The slider length. + /// The slider curve type. + /// The slider repeat count. + /// The hit object. + protected abstract HitObject CreateSlider(Vector2 position, bool newCombo, List controlPoints, double length, CurveType curveType, int repeatCount); + + /// + /// Creates a legacy Spinner-type hit object. + /// + /// The position of the hit object. + /// The spinner end time. + /// The hit object. + protected abstract HitObject CreateSpinner(Vector2 position, double endTime); + [Flags] private enum LegacySoundType { diff --git a/osu.Game/Modes/Objects/Legacy/Mania/Hit.cs b/osu.Game/Modes/Objects/Legacy/Mania/Hit.cs index b892434151..acf9777fbf 100644 --- a/osu.Game/Modes/Objects/Legacy/Mania/Hit.cs +++ b/osu.Game/Modes/Objects/Legacy/Mania/Hit.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Mania { /// - /// Legacy Hit-type, used for parsing Beatmaps. + /// Legacy osu!mania Hit-type, used for parsing Beatmaps. /// internal sealed class Hit : HitObject, IHasColumn, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Mania/HitObjectParser.cs b/osu.Game/Modes/Objects/Legacy/Mania/HitObjectParser.cs index 572657fe9b..7ef923633c 100644 --- a/osu.Game/Modes/Objects/Legacy/Mania/HitObjectParser.cs +++ b/osu.Game/Modes/Objects/Legacy/Mania/HitObjectParser.cs @@ -1,12 +1,15 @@ // 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 OpenTK; using osu.Game.Modes.Objects.Types; +using System.Collections.Generic; namespace osu.Game.Modes.Objects.Legacy.Mania { + /// + /// A HitObjectParser to parse legacy osu!mania Beatmaps. + /// internal class HitObjectParser : Legacy.HitObjectParser { protected override HitObject CreateHit(Vector2 position, bool newCombo) diff --git a/osu.Game/Modes/Objects/Legacy/Mania/Slider.cs b/osu.Game/Modes/Objects/Legacy/Mania/Slider.cs index cd0f4e95cb..f320ac1d59 100644 --- a/osu.Game/Modes/Objects/Legacy/Mania/Slider.cs +++ b/osu.Game/Modes/Objects/Legacy/Mania/Slider.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Mania { /// - /// Legacy Slider-type, used for parsing Beatmaps. + /// Legacy osu!mania Slider-type, used for parsing Beatmaps. /// internal sealed class Slider : CurvedHitObject, IHasColumn, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Mania/Spinner.cs b/osu.Game/Modes/Objects/Legacy/Mania/Spinner.cs index 7234ebc711..1df5907860 100644 --- a/osu.Game/Modes/Objects/Legacy/Mania/Spinner.cs +++ b/osu.Game/Modes/Objects/Legacy/Mania/Spinner.cs @@ -6,9 +6,9 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Mania { /// - /// Legacy Spinner-type, used for parsing Beatmaps. + /// Legacy osu!mania Spinner-type, used for parsing Beatmaps. /// - internal class Spinner : HitObject, IHasEndTime, IHasColumn + internal sealed class Spinner : HitObject, IHasEndTime, IHasColumn { public double EndTime { get; set; } diff --git a/osu.Game/Modes/Objects/Legacy/Osu/Hit.cs b/osu.Game/Modes/Objects/Legacy/Osu/Hit.cs index 2b59497a0a..397273391a 100644 --- a/osu.Game/Modes/Objects/Legacy/Osu/Hit.cs +++ b/osu.Game/Modes/Objects/Legacy/Osu/Hit.cs @@ -7,7 +7,7 @@ using OpenTK; namespace osu.Game.Modes.Objects.Legacy.Osu { /// - /// Legacy Hit-type, used for parsing Beatmaps. + /// Legacy osu! Hit-type, used for parsing Beatmaps. /// internal sealed class Hit : HitObject, IHasPosition, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Osu/HitObjectParser.cs b/osu.Game/Modes/Objects/Legacy/Osu/HitObjectParser.cs index 362339ffd9..d063ef8c48 100644 --- a/osu.Game/Modes/Objects/Legacy/Osu/HitObjectParser.cs +++ b/osu.Game/Modes/Objects/Legacy/Osu/HitObjectParser.cs @@ -7,6 +7,9 @@ using System.Collections.Generic; namespace osu.Game.Modes.Objects.Legacy.Osu { + /// + /// A HitObjectParser to parse legacy osu! Beatmaps. + /// internal class HitObjectParser : Legacy.HitObjectParser { protected override HitObject CreateHit(Vector2 position, bool newCombo) diff --git a/osu.Game/Modes/Objects/Legacy/Osu/Slider.cs b/osu.Game/Modes/Objects/Legacy/Osu/Slider.cs index 5f7b5306ab..24deda85bf 100644 --- a/osu.Game/Modes/Objects/Legacy/Osu/Slider.cs +++ b/osu.Game/Modes/Objects/Legacy/Osu/Slider.cs @@ -7,7 +7,7 @@ using OpenTK; namespace osu.Game.Modes.Objects.Legacy.Osu { /// - /// Legacy Slider-type, used for parsing Beatmaps. + /// Legacy osu! Slider-type, used for parsing Beatmaps. /// internal sealed class Slider : CurvedHitObject, IHasPosition, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Osu/Spinner.cs b/osu.Game/Modes/Objects/Legacy/Osu/Spinner.cs index 8da93428c4..c1c2b34b7c 100644 --- a/osu.Game/Modes/Objects/Legacy/Osu/Spinner.cs +++ b/osu.Game/Modes/Objects/Legacy/Osu/Spinner.cs @@ -7,9 +7,9 @@ using OpenTK; namespace osu.Game.Modes.Objects.Legacy.Osu { /// - /// Legacy Spinner-type, used for parsing Beatmaps. + /// Legacy osu! Spinner-type, used for parsing Beatmaps. /// - internal class Spinner : HitObject, IHasEndTime, IHasPosition + internal sealed class Spinner : HitObject, IHasEndTime, IHasPosition { public double EndTime { get; set; } diff --git a/osu.Game/Modes/Objects/Legacy/Taiko/Hit.cs b/osu.Game/Modes/Objects/Legacy/Taiko/Hit.cs index 7d0f7d88ee..73f9b67630 100644 --- a/osu.Game/Modes/Objects/Legacy/Taiko/Hit.cs +++ b/osu.Game/Modes/Objects/Legacy/Taiko/Hit.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Taiko { /// - /// Legacy Hit-type, used for parsing Beatmaps. + /// Legacy osu!taiko Hit-type, used for parsing Beatmaps. /// internal sealed class Hit : HitObject, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Taiko/HitObjectParser.cs b/osu.Game/Modes/Objects/Legacy/Taiko/HitObjectParser.cs index 6f98dad58d..80b5b9d1cb 100644 --- a/osu.Game/Modes/Objects/Legacy/Taiko/HitObjectParser.cs +++ b/osu.Game/Modes/Objects/Legacy/Taiko/HitObjectParser.cs @@ -7,6 +7,9 @@ using System.Collections.Generic; namespace osu.Game.Modes.Objects.Legacy.Taiko { + /// + /// A HitObjectParser to parse legacy osu!taiko Beatmaps. + /// internal class HitObjectParser : Legacy.HitObjectParser { protected override HitObject CreateHit(Vector2 position, bool newCombo) diff --git a/osu.Game/Modes/Objects/Legacy/Taiko/Slider.cs b/osu.Game/Modes/Objects/Legacy/Taiko/Slider.cs index ac7c7cb89e..b173101fce 100644 --- a/osu.Game/Modes/Objects/Legacy/Taiko/Slider.cs +++ b/osu.Game/Modes/Objects/Legacy/Taiko/Slider.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Taiko { /// - /// Legacy Slider-type, used for parsing Beatmaps. + /// Legacy osu!taiko Slider-type, used for parsing Beatmaps. /// internal sealed class Slider : CurvedHitObject, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/Taiko/Spinner.cs b/osu.Game/Modes/Objects/Legacy/Taiko/Spinner.cs index 62d827c435..b22f4600c9 100644 --- a/osu.Game/Modes/Objects/Legacy/Taiko/Spinner.cs +++ b/osu.Game/Modes/Objects/Legacy/Taiko/Spinner.cs @@ -6,9 +6,9 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy.Taiko { /// - /// Legacy Spinner-type, used for parsing Beatmaps. + /// Legacy osu!taiko Spinner-type, used for parsing Beatmaps. /// - internal class Spinner : HitObject, IHasEndTime + internal sealed class Spinner : HitObject, IHasEndTime { public double EndTime { get; set; } diff --git a/osu.Game/Modes/Objects/Types/IHasColumn.cs b/osu.Game/Modes/Objects/Types/IHasColumn.cs index b446d9db53..7609a26773 100644 --- a/osu.Game/Modes/Objects/Types/IHasColumn.cs +++ b/osu.Game/Modes/Objects/Types/IHasColumn.cs @@ -3,8 +3,14 @@ namespace osu.Game.Modes.Objects.Types { + /// + /// A HitObject that lies in a column space. + /// public interface IHasColumn { + /// + /// The column which this HitObject lies in. + /// int Column { get; } } } diff --git a/osu.Game/Modes/Objects/Types/IHasXPosition.cs b/osu.Game/Modes/Objects/Types/IHasXPosition.cs index 03a562c8b7..1f75625e93 100644 --- a/osu.Game/Modes/Objects/Types/IHasXPosition.cs +++ b/osu.Game/Modes/Objects/Types/IHasXPosition.cs @@ -9,6 +9,9 @@ namespace osu.Game.Modes.Objects.Types /// public interface IHasXPosition { + /// + /// The starting X-position of this HitObject. + /// float X { get; } } } diff --git a/osu.Game/Modes/Objects/Types/IHasYPosition.cs b/osu.Game/Modes/Objects/Types/IHasYPosition.cs index 38ddd3bdf5..f746acb939 100644 --- a/osu.Game/Modes/Objects/Types/IHasYPosition.cs +++ b/osu.Game/Modes/Objects/Types/IHasYPosition.cs @@ -9,6 +9,9 @@ namespace osu.Game.Modes.Objects.Types /// public interface IHasYPosition { + /// + /// The starting Y-position of this HitObject. + /// float Y { get; } } }