mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge branch 'master' into skip-redesign
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Beatmaps.Events;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
@ -17,6 +18,7 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
public BeatmapInfo BeatmapInfo;
|
||||
public TimingInfo TimingInfo = new TimingInfo();
|
||||
public EventInfo EventInfo = new EventInfo();
|
||||
public readonly List<Color4> ComboColors = new List<Color4>
|
||||
{
|
||||
new Color4(17, 136, 170, 255),
|
||||
@ -40,6 +42,7 @@ namespace osu.Game.Beatmaps
|
||||
{
|
||||
BeatmapInfo = original?.BeatmapInfo ?? BeatmapInfo;
|
||||
TimingInfo = original?.TimingInfo ?? TimingInfo;
|
||||
EventInfo = original?.EventInfo ?? EventInfo;
|
||||
ComboColors = original?.ComboColors ?? ComboColors;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
protected DifficultyCalculator(Beatmap beatmap)
|
||||
{
|
||||
Objects = CreateBeatmapConverter().Convert(beatmap).HitObjects;
|
||||
Objects = CreateBeatmapConverter().Convert(beatmap, true).HitObjects;
|
||||
|
||||
foreach (var h in Objects)
|
||||
h.ApplyDefaults(beatmap.TimingInfo, beatmap.BeatmapInfo.Difficulty);
|
||||
|
@ -3,14 +3,11 @@
|
||||
|
||||
namespace osu.Game.Beatmaps.Events
|
||||
{
|
||||
public enum EventType
|
||||
public class BackgroundEvent : Event
|
||||
{
|
||||
Background = 0,
|
||||
Video = 1,
|
||||
Break = 2,
|
||||
Colour = 3,
|
||||
Sprite = 4,
|
||||
Sample = 5,
|
||||
Animation = 6
|
||||
/// <summary>
|
||||
/// The file name.
|
||||
/// </summary>
|
||||
public string Filename;
|
||||
}
|
||||
}
|
||||
}
|
28
osu.Game/Beatmaps/Events/BreakEvent.cs
Normal file
28
osu.Game/Beatmaps/Events/BreakEvent.cs
Normal file
@ -0,0 +1,28 @@
|
||||
// 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.Events
|
||||
{
|
||||
public class BreakEvent : Event
|
||||
{
|
||||
/// <summary>
|
||||
/// The minimum duration required for a break to have any effect.
|
||||
/// </summary>
|
||||
private const double min_break_duration = 650;
|
||||
|
||||
/// <summary>
|
||||
/// The break end time.
|
||||
/// </summary>
|
||||
public double EndTime;
|
||||
|
||||
/// <summary>
|
||||
/// The duration of the break.
|
||||
/// </summary>
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the break has any effect. Breaks that are too short are culled before they reach the EventInfo.
|
||||
/// </summary>
|
||||
public bool HasEffect => Duration >= min_break_duration;
|
||||
}
|
||||
}
|
13
osu.Game/Beatmaps/Events/Event.cs
Normal file
13
osu.Game/Beatmaps/Events/Event.cs
Normal file
@ -0,0 +1,13 @@
|
||||
// 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.Events
|
||||
{
|
||||
public abstract class Event
|
||||
{
|
||||
/// <summary>
|
||||
/// The event start time.
|
||||
/// </summary>
|
||||
public double StartTime;
|
||||
}
|
||||
}
|
33
osu.Game/Beatmaps/Events/EventInfo.cs
Normal file
33
osu.Game/Beatmaps/Events/EventInfo.cs
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Beatmaps.Events
|
||||
{
|
||||
public class EventInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// All the background events.
|
||||
/// </summary>
|
||||
public readonly List<BackgroundEvent> Backgrounds = new List<BackgroundEvent>();
|
||||
|
||||
/// <summary>
|
||||
/// All the break events.
|
||||
/// </summary>
|
||||
public readonly List<BreakEvent> Breaks = new List<BreakEvent>();
|
||||
|
||||
/// <summary>
|
||||
/// Total duration of all breaks.
|
||||
/// </summary>
|
||||
public double TotalBreakTime => Breaks.Sum(b => b.Duration);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the active background at a time.
|
||||
/// </summary>
|
||||
/// <param name="time">The time to retrieve the background at.</param>
|
||||
/// <returns>The background.</returns>
|
||||
public BackgroundEvent BackgroundAt(double time) => Backgrounds.FirstOrDefault(b => b.StartTime <= time);
|
||||
}
|
||||
}
|
@ -204,23 +204,42 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
private void handleEvents(Beatmap beatmap, string val)
|
||||
{
|
||||
if (val.StartsWith(@"//"))
|
||||
return;
|
||||
if (val.StartsWith(@" "))
|
||||
return; // TODO
|
||||
string[] split = val.Split(',');
|
||||
|
||||
EventType type;
|
||||
int intType;
|
||||
if (!int.TryParse(split[0], out intType))
|
||||
if (!Enum.TryParse(split[0], out type))
|
||||
throw new InvalidDataException($@"Unknown event type {split[0]}");
|
||||
|
||||
// Todo: Implement the rest
|
||||
switch (type)
|
||||
{
|
||||
if (!Enum.TryParse(split[0], out type))
|
||||
throw new InvalidDataException($@"Unknown event type {split[0]}");
|
||||
case EventType.Video:
|
||||
case EventType.Background:
|
||||
string filename = split[2].Trim('"');
|
||||
|
||||
beatmap.EventInfo.Backgrounds.Add(new BackgroundEvent
|
||||
{
|
||||
StartTime = double.Parse(split[1], NumberFormatInfo.InvariantInfo),
|
||||
Filename = filename
|
||||
});
|
||||
|
||||
if (type == EventType.Background)
|
||||
beatmap.BeatmapInfo.Metadata.BackgroundFile = filename;
|
||||
|
||||
break;
|
||||
case EventType.Break:
|
||||
var breakEvent = new BreakEvent
|
||||
{
|
||||
StartTime = double.Parse(split[1], NumberFormatInfo.InvariantInfo),
|
||||
EndTime = double.Parse(split[2], NumberFormatInfo.InvariantInfo)
|
||||
};
|
||||
|
||||
if (!breakEvent.HasEffect)
|
||||
return;
|
||||
|
||||
beatmap.EventInfo.Breaks.Add(breakEvent);
|
||||
break;
|
||||
}
|
||||
else
|
||||
type = (EventType)intType;
|
||||
// TODO: Parse and store the rest of the event
|
||||
if (type == EventType.Background)
|
||||
beatmap.BeatmapInfo.Metadata.BackgroundFile = split[2].Trim('"');
|
||||
}
|
||||
|
||||
private void handleTimingPoints(Beatmap beatmap, string val)
|
||||
@ -330,6 +349,9 @@ namespace osu.Game.Beatmaps.Formats
|
||||
if (string.IsNullOrEmpty(line))
|
||||
continue;
|
||||
|
||||
if (line.StartsWith(" ") || line.StartsWith("_") || line.StartsWith("//"))
|
||||
continue;
|
||||
|
||||
if (line.StartsWith(@"osu file format v"))
|
||||
{
|
||||
beatmap.BeatmapInfo.BeatmapVersion = int.Parse(line.Substring(17));
|
||||
@ -390,5 +412,16 @@ namespace osu.Game.Beatmaps.Formats
|
||||
Soft = 2,
|
||||
Drum = 3
|
||||
}
|
||||
|
||||
internal enum EventType
|
||||
{
|
||||
Background = 0,
|
||||
Video = 1,
|
||||
Break = 2,
|
||||
Colour = 3,
|
||||
Sprite = 4,
|
||||
Sample = 5,
|
||||
Animation = 6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
TextSize = 24,
|
||||
Font = @"Exo2.0-Light",
|
||||
Padding = new MarginPadding { Left = 10, Right = 10 },
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
},
|
||||
@ -116,7 +117,7 @@ namespace osu.Game.Overlays
|
||||
private void load(FrameworkConfigManager frameworkConfig)
|
||||
{
|
||||
trackSetting(frameworkConfig.GetBindable<FrameSync>(FrameworkSetting.FrameSync), v => display(v, "Frame Limiter", v.GetDescription(), "Ctrl+F7"));
|
||||
trackSetting(frameworkConfig.GetBindable<string>(FrameworkSetting.AudioDevice), v => display(v, "Audio Device", v, v));
|
||||
trackSetting(frameworkConfig.GetBindable<string>(FrameworkSetting.AudioDevice), v => display(v, "Audio Device", string.IsNullOrEmpty(v) ? "Default" : v, v));
|
||||
trackSetting(frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowLogOverlay), v => display(v, "Debug Logs", v ? "visible" : "hidden", "Ctrl+F10"));
|
||||
|
||||
Action displayResolution = delegate { display(null, "Screen Resolution", frameworkConfig.Get<int>(FrameworkSetting.Width) + "x" + frameworkConfig.Get<int>(FrameworkSetting.Height)); };
|
||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
protected override string Header => "General";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkDebugConfigManager config)
|
||||
private void load(FrameworkDebugConfigManager config, FrameworkConfigManager frameworkConfig)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
@ -20,6 +20,11 @@ namespace osu.Game.Overlays.Settings.Sections.Debug
|
||||
{
|
||||
LabelText = "Bypass caching",
|
||||
Bindable = config.GetBindable<bool>(FrameworkDebugConfig.BypassCaching)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Debug logs",
|
||||
Bindable = frameworkConfig.GetBindable<bool>(FrameworkSetting.ShowLogOverlay)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -26,19 +26,21 @@ namespace osu.Game.Rulesets.Beatmaps
|
||||
/// Converts a Beatmap using this Beatmap Converter.
|
||||
/// </summary>
|
||||
/// <param name="original">The un-converted Beatmap.</param>
|
||||
/// <param name="isForCurrentRuleset">Whether to assume the beatmap is for the current ruleset.</param>
|
||||
/// <returns>The converted Beatmap.</returns>
|
||||
public Beatmap<T> Convert(Beatmap original)
|
||||
public Beatmap<T> Convert(Beatmap original, bool isForCurrentRuleset)
|
||||
{
|
||||
// We always operate on a clone of the original beatmap, to not modify it game-wide
|
||||
return ConvertBeatmap(new Beatmap(original));
|
||||
return ConvertBeatmap(new Beatmap(original), isForCurrentRuleset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs the conversion of a Beatmap using this Beatmap Converter.
|
||||
/// </summary>
|
||||
/// <param name="original">The un-converted Beatmap.</param>
|
||||
/// <param name="isForCurrentRuleset">Whether to assume the beatmap is for the current ruleset.</param>
|
||||
/// <returns>The converted Beatmap.</returns>
|
||||
protected virtual Beatmap<T> ConvertBeatmap(Beatmap original)
|
||||
protected virtual Beatmap<T> ConvertBeatmap(Beatmap original, bool isForCurrentRuleset)
|
||||
{
|
||||
return new Beatmap<T>
|
||||
{
|
||||
|
@ -43,5 +43,10 @@ namespace osu.Game.Rulesets.Objects.Legacy.Catch
|
||||
EndTime = endTime
|
||||
};
|
||||
}
|
||||
|
||||
protected override HitObject CreateHold(Vector2 position, bool newCombo, double endTime)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
using osu.Game.Audio;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Legacy
|
||||
{
|
||||
@ -26,7 +27,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
var soundType = (LegacySoundType)int.Parse(split[4]);
|
||||
var bankInfo = new SampleBankInfo();
|
||||
|
||||
HitObject result;
|
||||
HitObject result = null;
|
||||
|
||||
if ((type & ConvertHitObjectType.Circle) > 0)
|
||||
{
|
||||
@ -140,17 +141,20 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
{
|
||||
// Note: Hold is generated by BMS converts
|
||||
|
||||
// Todo: Apparently end time is determined by samples??
|
||||
// Shouldn't need implementation until mania
|
||||
double endTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture);
|
||||
|
||||
result = new ConvertHold
|
||||
if (split.Length > 5 && !string.IsNullOrEmpty(split[5]))
|
||||
{
|
||||
Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])),
|
||||
NewCombo = combo
|
||||
};
|
||||
string[] ss = split[5].Split(':');
|
||||
endTime = Convert.ToDouble(ss[0], CultureInfo.InvariantCulture);
|
||||
readCustomSampleBanks(string.Join(":", ss.Skip(1)), bankInfo);
|
||||
}
|
||||
|
||||
result = CreateHold(new Vector2(int.Parse(split[0]), int.Parse(split[1])), combo, endTime);
|
||||
}
|
||||
else
|
||||
throw new InvalidOperationException($@"Unknown hit object type {type}");
|
||||
|
||||
if (result == null)
|
||||
throw new InvalidOperationException($@"Unknown hit object type {type}.");
|
||||
|
||||
result.StartTime = Convert.ToDouble(split[2], CultureInfo.InvariantCulture);
|
||||
result.Samples = convertSoundType(soundType, bankInfo);
|
||||
@ -214,6 +218,14 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
/// <returns>The hit object.</returns>
|
||||
protected abstract HitObject CreateSpinner(Vector2 position, double endTime);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a legacy Hold-type hit object.
|
||||
/// </summary>
|
||||
/// <param name="position">The position of the hit object.</param>
|
||||
/// <param name="newCombo">Whether the hit object creates a new combo.</param>
|
||||
/// <param name="endTime">The hold end time.</param>
|
||||
protected abstract HitObject CreateHold(Vector2 position, bool newCombo, double endTime);
|
||||
|
||||
private SampleInfoList convertSoundType(LegacySoundType type, SampleBankInfo bankInfo)
|
||||
{
|
||||
var soundTypes = new SampleInfoList
|
||||
|
@ -1,22 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Legacy
|
||||
{
|
||||
/// <summary>
|
||||
/// Legacy Hold-type, used for parsing "specials" in beatmaps.
|
||||
/// </summary>
|
||||
internal sealed class ConvertHold : HitObject, IHasPosition, IHasCombo, IHasHold
|
||||
{
|
||||
public Vector2 Position { get; set; }
|
||||
|
||||
public float X => Position.X;
|
||||
|
||||
public float Y => Position.Y;
|
||||
|
||||
public bool NewCombo { get; set; }
|
||||
}
|
||||
}
|
@ -44,5 +44,14 @@ namespace osu.Game.Rulesets.Objects.Legacy.Mania
|
||||
EndTime = endTime
|
||||
};
|
||||
}
|
||||
|
||||
protected override HitObject CreateHold(Vector2 position, bool newCombo, double endTime)
|
||||
{
|
||||
return new ConvertHold
|
||||
{
|
||||
X = position.X,
|
||||
EndTime = endTime
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
osu.Game/Rulesets/Objects/Legacy/Mania/ConvertHold.cs
Normal file
16
osu.Game/Rulesets/Objects/Legacy/Mania/ConvertHold.cs
Normal file
@ -0,0 +1,16 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Legacy.Mania
|
||||
{
|
||||
internal sealed class ConvertHold : HitObject, IHasXPosition, IHasEndTime
|
||||
{
|
||||
public float X { get; set; }
|
||||
|
||||
public double EndTime { get; set; }
|
||||
|
||||
public double Duration => EndTime - StartTime;
|
||||
}
|
||||
}
|
@ -44,5 +44,10 @@ namespace osu.Game.Rulesets.Objects.Legacy.Osu
|
||||
EndTime = endTime
|
||||
};
|
||||
}
|
||||
|
||||
protected override HitObject CreateHold(Vector2 position, bool newCombo, double endTime)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,5 +41,10 @@ namespace osu.Game.Rulesets.Objects.Legacy.Taiko
|
||||
EndTime = endTime
|
||||
};
|
||||
}
|
||||
|
||||
protected override HitObject CreateHold(Vector2 position, bool newCombo, double endTime)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,5 +8,9 @@ namespace osu.Game.Rulesets.Objects.Types
|
||||
/// </summary>
|
||||
public interface IHasHold
|
||||
{
|
||||
/// <summary>
|
||||
/// The time at which the hold ends.
|
||||
/// </summary>
|
||||
double EndTime { get; }
|
||||
}
|
||||
}
|
||||
|
@ -18,12 +18,13 @@ namespace osu.Game.Rulesets
|
||||
public abstract IEnumerable<Mod> GetModsFor(ModType type);
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to create a HitRenderer for the provided beatmap.
|
||||
/// Attempt to create a hit renderer for a beatmap
|
||||
/// </summary>
|
||||
/// <param name="beatmap"></param>
|
||||
/// <param name="beatmap">The beatmap to create the hit renderer for.</param>
|
||||
/// <param name="isForCurrentRuleset">Whether the hit renderer should assume the beatmap is for the current ruleset.</param>
|
||||
/// <exception cref="BeatmapInvalidForRulesetException">Unable to successfully load the beatmap to be usable with this ruleset.</exception>
|
||||
/// <returns></returns>
|
||||
public abstract HitRenderer CreateHitRendererWith(WorkingBeatmap beatmap);
|
||||
public abstract HitRenderer CreateHitRendererWith(WorkingBeatmap beatmap, bool isForCurrentRuleset);
|
||||
|
||||
public abstract DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap);
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Rulesets.UI
|
||||
/// </summary>
|
||||
protected abstract bool AllObjectsJudged { get; }
|
||||
|
||||
protected HitRenderer()
|
||||
internal HitRenderer()
|
||||
{
|
||||
KeyConversionInputManager = CreateKeyConversionInputManager();
|
||||
KeyConversionInputManager.RelativeSizeAxes = Axes.Both;
|
||||
@ -120,7 +120,12 @@ namespace osu.Game.Rulesets.UI
|
||||
/// </summary>
|
||||
public Beatmap<TObject> Beatmap;
|
||||
|
||||
protected HitRenderer(WorkingBeatmap beatmap)
|
||||
/// <summary>
|
||||
/// Creates a hit renderer for a beatmap.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The beatmap to create the hit renderer for.</param>
|
||||
/// <param name="isForCurrentRuleset">Whether to assume the beatmap is for the current ruleset.</param>
|
||||
internal HitRenderer(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
||||
{
|
||||
Debug.Assert(beatmap != null, "HitRenderer initialized with a null beatmap.");
|
||||
|
||||
@ -134,7 +139,7 @@ namespace osu.Game.Rulesets.UI
|
||||
throw new BeatmapInvalidForRulesetException($"{nameof(Beatmap)} can't be converted for the current ruleset.");
|
||||
|
||||
// Convert the beatmap
|
||||
Beatmap = converter.Convert(beatmap.Beatmap);
|
||||
Beatmap = converter.Convert(beatmap.Beatmap, isForCurrentRuleset);
|
||||
|
||||
// Apply defaults
|
||||
foreach (var h in Beatmap.HitObjects)
|
||||
@ -201,8 +206,13 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
private readonly List<DrawableHitObject<TObject, TJudgement>> drawableObjects = new List<DrawableHitObject<TObject, TJudgement>>();
|
||||
|
||||
protected HitRenderer(WorkingBeatmap beatmap)
|
||||
: base(beatmap)
|
||||
/// <summary>
|
||||
/// Creates a hit renderer for a beatmap.
|
||||
/// </summary>
|
||||
/// <param name="beatmap">The beatmap to create the hit renderer for.</param>
|
||||
/// <param name="isForCurrentRuleset">Whether to assume the beatmap is for the current ruleset.</param>
|
||||
protected HitRenderer(WorkingBeatmap beatmap, bool isForCurrentRuleset)
|
||||
: base(beatmap, isForCurrentRuleset)
|
||||
{
|
||||
InputManager.Add(content = new Container
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
try
|
||||
{
|
||||
HitRenderer = rulesetInstance.CreateHitRendererWith(Beatmap);
|
||||
HitRenderer = rulesetInstance.CreateHitRendererWith(Beatmap, ruleset.ID == Beatmap.BeatmapInfo.Ruleset.ID);
|
||||
}
|
||||
catch (BeatmapInvalidForRulesetException)
|
||||
{
|
||||
@ -95,7 +95,7 @@ namespace osu.Game.Screens.Play
|
||||
// let's try again forcing the beatmap's ruleset.
|
||||
ruleset = Beatmap.BeatmapInfo.Ruleset;
|
||||
rulesetInstance = ruleset.CreateInstance();
|
||||
HitRenderer = rulesetInstance.CreateHitRendererWith(Beatmap);
|
||||
HitRenderer = rulesetInstance.CreateHitRendererWith(Beatmap, true);
|
||||
}
|
||||
|
||||
if (!HitRenderer.Objects.Any())
|
||||
@ -230,18 +230,20 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
ValidForResume = false;
|
||||
|
||||
Delay(1000);
|
||||
onCompletionEvent = Schedule(delegate
|
||||
using (BeginDelayedSequence(1000))
|
||||
{
|
||||
var score = new Score
|
||||
onCompletionEvent = Schedule(delegate
|
||||
{
|
||||
Beatmap = Beatmap.BeatmapInfo,
|
||||
Ruleset = ruleset
|
||||
};
|
||||
scoreProcessor.PopulateScore(score);
|
||||
score.User = HitRenderer.Replay?.User ?? (Game as OsuGame)?.API?.LocalUser?.Value;
|
||||
Push(new Results(score));
|
||||
});
|
||||
var score = new Score
|
||||
{
|
||||
Beatmap = Beatmap.BeatmapInfo,
|
||||
Ruleset = ruleset
|
||||
};
|
||||
scoreProcessor.PopulateScore(score);
|
||||
score.User = HitRenderer.Replay?.User ?? (Game as OsuGame)?.API?.LocalUser?.Value;
|
||||
Push(new Results(score));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void onFail()
|
||||
@ -266,16 +268,18 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
Content.ScaleTo(0.7f);
|
||||
|
||||
Content.Delay(250);
|
||||
Content.FadeIn(250);
|
||||
using (Content.BeginDelayedSequence(250))
|
||||
Content.FadeIn(250);
|
||||
|
||||
Content.ScaleTo(1, 750, EasingTypes.OutQuint);
|
||||
|
||||
Delay(750);
|
||||
Schedule(() =>
|
||||
{
|
||||
decoupledClock.Start();
|
||||
});
|
||||
using (BeginDelayedSequence(750))
|
||||
Schedule(() =>
|
||||
{
|
||||
if (!pauseContainer.IsPaused)
|
||||
decoupledClock.Start();
|
||||
|
||||
});
|
||||
|
||||
pauseContainer.Alpha = 0;
|
||||
pauseContainer.FadeIn(750, EasingTypes.OutQuint);
|
||||
|
@ -198,8 +198,11 @@ namespace osu.Game.Screens.Select
|
||||
var pendingSelection = selectionChangedDebounce;
|
||||
selectionChangedDebounce = null;
|
||||
|
||||
pendingSelection?.RunTask();
|
||||
pendingSelection?.Cancel(); // cancel the already scheduled task.
|
||||
if (pendingSelection?.Completed == false)
|
||||
{
|
||||
pendingSelection?.RunTask();
|
||||
pendingSelection?.Cancel(); // cancel the already scheduled task.
|
||||
}
|
||||
|
||||
if (Beatmap == null) return;
|
||||
|
||||
|
@ -74,6 +74,10 @@
|
||||
<Compile Include="Audio\SampleInfoList.cs" />
|
||||
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
|
||||
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
|
||||
<Compile Include="Beatmaps\Events\BackgroundEvent.cs" />
|
||||
<Compile Include="Beatmaps\Events\BreakEvent.cs" />
|
||||
<Compile Include="Beatmaps\Events\Event.cs" />
|
||||
<Compile Include="Beatmaps\Events\EventInfo.cs" />
|
||||
<Compile Include="Online\API\Requests\PostMessageRequest.cs" />
|
||||
<Compile Include="Online\Chat\ErrorMessage.cs" />
|
||||
<Compile Include="Overlays\Chat\ChatTabControl.cs" />
|
||||
@ -125,6 +129,7 @@
|
||||
<Compile Include="Rulesets\Objects\Legacy\ConvertSlider.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Mania\ConvertHit.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Mania\ConvertHitObjectParser.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Mania\ConvertHold.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Mania\ConvertSlider.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Mania\ConvertSpinner.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Osu\ConvertHitObjectParser.cs" />
|
||||
@ -161,7 +166,6 @@
|
||||
<Compile Include="Rulesets\Objects\CircularArcApproximator.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Osu\ConvertHit.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\ConvertHitObjectParser.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\ConvertHold.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Osu\ConvertSlider.cs" />
|
||||
<Compile Include="Rulesets\Objects\Legacy\Osu\ConvertSpinner.cs" />
|
||||
<Compile Include="Rulesets\Objects\SliderCurve.cs" />
|
||||
@ -341,7 +345,6 @@
|
||||
<Compile Include="Beatmaps\Formats\BeatmapDecoder.cs" />
|
||||
<Compile Include="Beatmaps\Formats\OsuLegacyDecoder.cs" />
|
||||
<Compile Include="Beatmaps\IO\OszArchiveReader.cs" />
|
||||
<Compile Include="Beatmaps\Events\EventType.cs" />
|
||||
<Compile Include="Graphics\UserInterface\Volume\VolumeMeter.cs" />
|
||||
<Compile Include="Database\BeatmapSetInfo.cs" />
|
||||
<Compile Include="Database\BeatmapMetadata.cs" />
|
||||
|
Reference in New Issue
Block a user