mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 03:53:21 +08:00
Merge pull request #499 from smoogipooo/legacy_beatmap_flag
Add legacy beatmap flag.
This commit is contained in:
commit
6c12da54f1
@ -55,5 +55,14 @@ namespace osu.Game.Beatmaps
|
||||
/// </summary>
|
||||
/// <returns>The star difficulty.</returns>
|
||||
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.Modes;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Beatmaps.Legacy;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
@ -244,6 +245,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)
|
||||
{
|
||||
HitObjectParser parser = null;
|
||||
|
21
osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs
Normal file
21
osu.Game/Beatmaps/Legacy/LegacyBeatmap.cs
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Beatmaps.Legacy
|
||||
{
|
||||
/// <summary>
|
||||
/// A type of Beatmap loaded from a legacy .osu beatmap file (version <=15).
|
||||
/// </summary>
|
||||
public class LegacyBeatmap : Beatmap
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs a new beatmap.
|
||||
/// </summary>
|
||||
/// <param name="original">The original beatmap to use the parameters of.</param>
|
||||
internal LegacyBeatmap(Beatmap original = null)
|
||||
: base(original)
|
||||
{
|
||||
HitObjects = original?.HitObjects;
|
||||
}
|
||||
}
|
||||
}
|
@ -75,6 +75,7 @@
|
||||
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
||||
<Compile Include="Beatmaps\IBeatmapCoverter.cs" />
|
||||
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
|
||||
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
|
||||
<Compile Include="Beatmaps\Timing\TimingInfo.cs" />
|
||||
<Compile Include="Database\ScoreDatabase.cs" />
|
||||
<Compile Include="Graphics\Backgrounds\Triangles.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user