mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Merge branch 'legacy_beatmap_flag' into taiko_conversion
This commit is contained in:
@ -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;
|
||||
|
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\IBeatmapCoverter.cs" />
|
||||
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
|
||||
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
|
||||
<Compile Include="Beatmaps\Timing\TimingInfo.cs" />
|
||||
<Compile Include="Beatmaps\Legacy\IIsLegacy.cs" />
|
||||
<Compile Include="Database\ScoreDatabase.cs" />
|
||||
<Compile Include="Graphics\Backgrounds\Triangles.cs" />
|
||||
<Compile Include="Graphics\Cursor\CursorTrail.cs" />
|
||||
|
Reference in New Issue
Block a user