Merge branch 'master' into song-select-loading-reoptimisation

This commit is contained in:
Dan Balasescu
2017-03-18 01:25:22 +09:00
committed by GitHub
11 changed files with 117 additions and 92 deletions

View File

@ -197,7 +197,7 @@ namespace osu.Game.Beatmaps.Formats
if (split.Length > 2)
{
//int kiaiFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0;
int effectFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0;
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
cp = new ControlPoint
{
@ -205,6 +205,8 @@ namespace osu.Game.Beatmaps.Formats
BeatLength = beatLength > 0 ? beatLength : 0,
VelocityAdjustment = beatLength < 0 ? -beatLength / 100.0 : 1,
TimingChange = split.Length <= 6 || split[6][0] == '1',
KiaiMode = (effectFlags & 1) > 0,
OmitFirstBarLine = (effectFlags & 8) > 0
};
}

View File

@ -8,17 +8,10 @@ namespace osu.Game.Beatmaps
/// <summary>
/// Processes a post-converted Beatmap.
/// </summary>
/// <typeparam name="T">The type of HitObject contained in the Beatmap.</typeparam>
public interface IBeatmapProcessor<T>
where T : HitObject
/// <typeparam name="TObject">The type of HitObject contained in the Beatmap.</typeparam>
public interface IBeatmapProcessor<TObject>
where TObject : HitObject
{
/// <summary>
/// Sets default values for a HitObject.
/// </summary>
/// <param name="hitObject">The HitObject to set default values for.</param>
/// <param name="beatmap">The Beatmap to extract the default values from.</param>
void SetDefaults(T hitObject, Beatmap<T> beatmap);
/// <summary>
/// Post-processes a Beatmap to add mode-specific components that aren't added during conversion.
/// <para>
@ -26,6 +19,6 @@ namespace osu.Game.Beatmaps
/// </para>
/// </summary>
/// <param name="beatmap">The Beatmap to process.</param>
void PostProcess(Beatmap<T> beatmap);
void PostProcess(Beatmap<TObject> beatmap);
}
}

View File

@ -16,6 +16,7 @@ namespace osu.Game.Beatmaps.Timing
public double VelocityAdjustment;
public bool TimingChange;
public bool KiaiMode;
public bool OmitFirstBarLine;
}