mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 16:33:21 +08:00
Add legacy beatmap flag.
This commit is contained in:
parent
163a21a7bf
commit
862c4c408f
@ -70,5 +70,14 @@ namespace osu.Game.Beatmaps
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>The star difficulty.</returns>
|
/// <returns>The star difficulty.</returns>
|
||||||
public double CalculateStarDifficulty() => Ruleset.GetRuleset(BeatmapInfo.Mode).CreateDifficultyCalculator(this).Calculate();
|
public double CalculateStarDifficulty() => Ruleset.GetRuleset(BeatmapInfo.Mode).CreateDifficultyCalculator(this).Calculate();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new beatmap.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="original">The original beatmap to use the parameters of.</param>
|
||||||
|
public Beatmap(Beatmap original = null)
|
||||||
|
: base(original)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ using osu.Game.Beatmaps.Samples;
|
|||||||
using osu.Game.Beatmaps.Timing;
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using osu.Game.Modes.Objects;
|
using osu.Game.Modes.Objects;
|
||||||
|
using osu.Game.Beatmaps.Legacy;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Formats
|
namespace osu.Game.Beatmaps.Formats
|
||||||
{
|
{
|
||||||
@ -242,6 +243,16 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override Beatmap ParseFile(TextReader stream)
|
||||||
|
{
|
||||||
|
return new LegacyBeatmap(base.ParseFile(stream));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Beatmap Decode(TextReader stream)
|
||||||
|
{
|
||||||
|
return new LegacyBeatmap(base.Decode(stream));
|
||||||
|
}
|
||||||
|
|
||||||
protected override void ParseFile(TextReader stream, Beatmap beatmap)
|
protected override void ParseFile(TextReader stream, Beatmap beatmap)
|
||||||
{
|
{
|
||||||
HitObjectParser parser = null;
|
HitObjectParser parser = null;
|
||||||
|
9
osu.Game/Beatmaps/Legacy/IIsLegacy.cs
Normal file
9
osu.Game/Beatmaps/Legacy/IIsLegacy.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace osu.Game.Beatmaps.Legacy
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A Beatmap that was loaded from a legacy .osu beatmap file (version <=15).
|
||||||
|
/// </summary>
|
||||||
|
public interface IIsLegacy
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
17
osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs
Normal file
17
osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
namespace osu.Game.Beatmaps.Legacy
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15).
|
||||||
|
/// </summary>
|
||||||
|
internal class LegacyBeatmap : Beatmap, IIsLegacy
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs a new beatmap.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="original">The original beatmap to use the parameters of.</param>
|
||||||
|
public LegacyBeatmap(Beatmap original = null)
|
||||||
|
: base(original)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -75,7 +75,9 @@
|
|||||||
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
||||||
<Compile Include="Beatmaps\IBeatmapCoverter.cs" />
|
<Compile Include="Beatmaps\IBeatmapCoverter.cs" />
|
||||||
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
|
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
|
||||||
|
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
|
||||||
<Compile Include="Beatmaps\Timing\TimingInfo.cs" />
|
<Compile Include="Beatmaps\Timing\TimingInfo.cs" />
|
||||||
|
<Compile Include="Beatmaps\Legacy\IIsLegacy.cs" />
|
||||||
<Compile Include="Database\ScoreDatabase.cs" />
|
<Compile Include="Database\ScoreDatabase.cs" />
|
||||||
<Compile Include="Graphics\Backgrounds\Triangles.cs" />
|
<Compile Include="Graphics\Backgrounds\Triangles.cs" />
|
||||||
<Compile Include="Graphics\Cursor\CursorTrail.cs" />
|
<Compile Include="Graphics\Cursor\CursorTrail.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user