Parse time signature from legacy beatmap control points.

This commit is contained in:
smoogipooo 2017-03-21 21:18:08 +09:00
parent 7cbc5b24c8
commit a272675705
4 changed files with 15 additions and 8 deletions

View File

@ -207,7 +207,8 @@ namespace osu.Game.Beatmaps.Formats
VelocityAdjustment = beatLength < 0 ? -beatLength / 100.0 : 1,
TimingChange = split.Length <= 6 || split[6][0] == '1',
KiaiMode = (effectFlags & 1) > 0,
OmitFirstBarLine = (effectFlags & 8) > 0
OmitFirstBarLine = (effectFlags & 8) > 0,
TimeSignature = (TimeSignatures)int.Parse(split[2])
};
}

View File

@ -11,18 +11,12 @@ namespace osu.Game.Beatmaps.Timing
TimingChange = true,
};
public TimeSignatures TimeSignature;
public double Time;
public double BeatLength;
public double VelocityAdjustment;
public bool TimingChange;
public bool KiaiMode;
public bool OmitFirstBarLine;
}
internal enum TimeSignatures
{
SimpleQuadruple = 4,
SimpleTriple = 3
}
}

View File

@ -0,0 +1,11 @@
// 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.Timing
{
public enum TimeSignatures
{
SimpleQuadruple = 4,
SimpleTriple = 3
}
}

View File

@ -76,6 +76,7 @@
<Compile Include="Beatmaps\IBeatmapCoverter.cs" />
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
<Compile Include="Beatmaps\Timing\TimeSignatures.cs" />
<Compile Include="Beatmaps\Timing\TimingInfo.cs" />
<Compile Include="Database\ScoreDatabase.cs" />
<Compile Include="Graphics\Backgrounds\Triangles.cs" />