diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index a117d9d1ca..0e6d991830 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -1,19 +1,19 @@ // 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.Framework.Screens.Testing; -using osu.Framework.Graphics; -using osu.Framework.Timing; using OpenTK; +using OpenTK.Graphics; using osu.Framework.Configuration; -using osu.Game.Modes.Objects.Drawables; -using osu.Game.Modes.Osu.Objects; -using osu.Game.Modes.Osu.Objects.Drawables; +using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.UserInterface; -using OpenTK.Graphics; +using osu.Framework.Screens.Testing; +using osu.Framework.Timing; +using osu.Game.Modes.Objects.Drawables; +using osu.Game.Modes.Osu.Objects; +using osu.Game.Modes.Osu.Objects.Drawables; +using System.Collections.Generic; namespace osu.Desktop.VisualTests.Tests { diff --git a/osu.Game/Modes/Objects/Legacy/LegacyHit.cs b/osu.Game/Modes/Objects/Legacy/LegacyHit.cs index 1e3137892f..239c8982da 100644 --- a/osu.Game/Modes/Objects/Legacy/LegacyHit.cs +++ b/osu.Game/Modes/Objects/Legacy/LegacyHit.cs @@ -7,7 +7,7 @@ using OpenTK; namespace osu.Game.Modes.Objects.Legacy { /// - /// Base Hit-type, used for parsing Beatmaps. + /// Legacy Hit-type, used for parsing Beatmaps. /// public sealed class LegacyHit : HitObject, IHasPosition, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/LegacyHold.cs b/osu.Game/Modes/Objects/Legacy/LegacyHold.cs new file mode 100644 index 0000000000..53775de124 --- /dev/null +++ b/osu.Game/Modes/Objects/Legacy/LegacyHold.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; +using osu.Game.Modes.Objects.Types; + +namespace osu.Game.Modes.Objects.Legacy +{ + /// + /// Legacy Hold-type, used for parsing "specials" in beatmaps. + /// + public sealed class LegacyHold : HitObject, IHasPosition, IHasCombo + { + public Vector2 Position { get; set; } + + public bool NewCombo { get; set; } + } +} diff --git a/osu.Game/Modes/Objects/Legacy/LegacySlider.cs b/osu.Game/Modes/Objects/Legacy/LegacySlider.cs index 6b9fded2d1..fb5b41aad9 100644 --- a/osu.Game/Modes/Objects/Legacy/LegacySlider.cs +++ b/osu.Game/Modes/Objects/Legacy/LegacySlider.cs @@ -8,7 +8,7 @@ using OpenTK; namespace osu.Game.Modes.Objects.Legacy { /// - /// Base Slider-type, used for parsing Beatmaps. + /// Legacy Slider-type, used for parsing Beatmaps. /// public sealed class LegacySlider : HitObject, IHasCurve, IHasPosition, IHasDistance, IHasRepeats, IHasCombo { diff --git a/osu.Game/Modes/Objects/Legacy/LegacySpinner.cs b/osu.Game/Modes/Objects/Legacy/LegacySpinner.cs index 7161fd2df6..8f65d5e8a1 100644 --- a/osu.Game/Modes/Objects/Legacy/LegacySpinner.cs +++ b/osu.Game/Modes/Objects/Legacy/LegacySpinner.cs @@ -6,7 +6,7 @@ using osu.Game.Modes.Objects.Types; namespace osu.Game.Modes.Objects.Legacy { /// - /// Base Spinner-type, used for parsing Beatmaps. + /// Legacy Spinner-type, used for parsing Beatmaps. /// internal class LegacySpinner : HitObject, IHasEndTime { diff --git a/osu.Game/Modes/Objects/LegacyHitObjectParser.cs b/osu.Game/Modes/Objects/LegacyHitObjectParser.cs index 5b40d0aed6..2c39700106 100644 --- a/osu.Game/Modes/Objects/LegacyHitObjectParser.cs +++ b/osu.Game/Modes/Objects/LegacyHitObjectParser.cs @@ -18,7 +18,6 @@ namespace osu.Game.Modes.Objects string[] split = text.Split(','); var type = (HitObjectType)int.Parse(split[3]); bool combo = type.HasFlag(HitObjectType.NewCombo); - type &= (HitObjectType)0xF; type &= ~HitObjectType.NewCombo; HitObject result; @@ -91,6 +90,14 @@ namespace osu.Game.Modes.Objects EndTime = Convert.ToDouble(split[5], CultureInfo.InvariantCulture) }; break; + case HitObjectType.Hold: + // Note: Hold is generated by BMS converts + result = new LegacyHold + { + Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])), + NewCombo = combo + }; + break; default: throw new InvalidOperationException($@"Unknown hit object type {type}"); } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 7b35374669..ad163b93e3 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -96,6 +96,7 @@ +