mirror of
https://github.com/ppy/osu.git
synced 2025-03-22 21:00:33 +08:00
Better namings for the speed change "algorithms"
This commit is contained in:
parent
cae93a1d1f
commit
441e8aced5
@ -72,7 +72,7 @@ namespace osu.Game.Configuration
|
||||
|
||||
Set(OsuSetting.FloatingComments, false);
|
||||
|
||||
Set(OsuSetting.ScrollingAlgorithm, ScrollingAlgorithmType.Global);
|
||||
Set(OsuSetting.SpeedChangeVisualisation, SpeedChangeVisualisationMethod.Sequential);
|
||||
|
||||
// Update
|
||||
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||
@ -119,6 +119,6 @@ namespace osu.Game.Configuration
|
||||
ChatDisplayHeight,
|
||||
Version,
|
||||
ShowConvertedBeatmaps,
|
||||
ScrollingAlgorithm
|
||||
SpeedChangeVisualisation
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
public enum ScrollingAlgorithmType
|
||||
public enum SpeedChangeVisualisationMethod
|
||||
{
|
||||
[Description("Global")]
|
||||
Global,
|
||||
[Description("Local")]
|
||||
Local
|
||||
[Description("Sequential")]
|
||||
Sequential,
|
||||
[Description("Overlapping")]
|
||||
Overlapping
|
||||
}
|
||||
}
|
@ -15,10 +15,10 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
{
|
||||
Children = new[]
|
||||
{
|
||||
new SettingsEnumDropdown<ScrollingAlgorithmType>
|
||||
new SettingsEnumDropdown<SpeedChangeVisualisationMethod>
|
||||
{
|
||||
LabelText = "Scrolling algorithm",
|
||||
Bindable = config.GetBindable<ScrollingAlgorithmType>(OsuSetting.ScrollingAlgorithm),
|
||||
LabelText = "Visualise speed changes as",
|
||||
Bindable = config.GetBindable<SpeedChangeVisualisationMethod>(OsuSetting.SpeedChangeVisualisation),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ using osu.Framework.Lists;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Timing;
|
||||
using osu.Game.Rulesets.UI.Scrolling.Algorithms;
|
||||
using osu.Game.Rulesets.UI.Scrolling.Visualisers;
|
||||
|
||||
namespace osu.Game.Rulesets.UI.Scrolling
|
||||
{
|
||||
@ -42,18 +42,18 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
TimeRange.ValueChanged += v => initialStateCache.Invalidate();
|
||||
}
|
||||
|
||||
private IScrollingAlgorithm scrollingAlgorithm;
|
||||
private ISpeedChangeVisualiser speedChangeVisualiser;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
switch (config.Get<ScrollingAlgorithmType>(OsuSetting.ScrollingAlgorithm))
|
||||
switch (config.Get<SpeedChangeVisualisationMethod>(OsuSetting.SpeedChangeVisualisation))
|
||||
{
|
||||
case ScrollingAlgorithmType.Global:
|
||||
scrollingAlgorithm = new GlobalScrollingAlgorithm(ControlPoints);
|
||||
case SpeedChangeVisualisationMethod.Sequential:
|
||||
speedChangeVisualiser = new SequentialSpeedChangeVisualiser(ControlPoints);
|
||||
break;
|
||||
case ScrollingAlgorithmType.Local:
|
||||
scrollingAlgorithm = new LocalScrollingAlgorithm(ControlPoints);
|
||||
case SpeedChangeVisualisationMethod.Overlapping:
|
||||
speedChangeVisualiser = new OverlappingSpeedChangeVisualiser(ControlPoints);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -101,7 +101,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
if (initialStateCache.IsValid)
|
||||
return;
|
||||
|
||||
scrollingAlgorithm.ComputeInitialStates(Objects, direction, TimeRange, DrawSize);
|
||||
speedChangeVisualiser.ComputeInitialStates(Objects, direction, TimeRange, DrawSize);
|
||||
|
||||
initialStateCache.Validate();
|
||||
}
|
||||
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
base.UpdateAfterChildrenLife();
|
||||
|
||||
// We need to calculate this as soon as possible after lifetimes so that hitobjects get the final say in their positions
|
||||
scrollingAlgorithm.ComputePositions(AliveObjects, direction, Time.Current, TimeRange, DrawSize);
|
||||
speedChangeVisualiser.ComputePositions(AliveObjects, direction, Time.Current, TimeRange, DrawSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ using System.Collections.Generic;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Visualisers
|
||||
{
|
||||
public interface IScrollingAlgorithm
|
||||
public interface ISpeedChangeVisualiser
|
||||
{
|
||||
/// <summary>
|
||||
/// Computes the states of <see cref="DrawableHitObject"/>s that are constant, such as lifetime and spatial length.
|
@ -7,15 +7,15 @@ using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Timing;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Visualisers
|
||||
{
|
||||
public class LocalScrollingAlgorithm : IScrollingAlgorithm
|
||||
public class OverlappingSpeedChangeVisualiser : ISpeedChangeVisualiser
|
||||
{
|
||||
private readonly Dictionary<DrawableHitObject, double> hitObjectPositions = new Dictionary<DrawableHitObject, double>();
|
||||
|
||||
private readonly SortedList<MultiplierControlPoint> controlPoints;
|
||||
|
||||
public LocalScrollingAlgorithm(SortedList<MultiplierControlPoint> controlPoints)
|
||||
public OverlappingSpeedChangeVisualiser(SortedList<MultiplierControlPoint> controlPoints)
|
||||
{
|
||||
this.controlPoints = controlPoints;
|
||||
}
|
@ -8,15 +8,15 @@ using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Timing;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
|
||||
namespace osu.Game.Rulesets.UI.Scrolling.Visualisers
|
||||
{
|
||||
public class GlobalScrollingAlgorithm : IScrollingAlgorithm
|
||||
public class SequentialSpeedChangeVisualiser : ISpeedChangeVisualiser
|
||||
{
|
||||
private readonly Dictionary<DrawableHitObject, double> hitObjectPositions = new Dictionary<DrawableHitObject, double>();
|
||||
|
||||
private readonly IReadOnlyList<MultiplierControlPoint> controlPoints;
|
||||
|
||||
public GlobalScrollingAlgorithm(IReadOnlyList<MultiplierControlPoint> controlPoints)
|
||||
public SequentialSpeedChangeVisualiser(IReadOnlyList<MultiplierControlPoint> controlPoints)
|
||||
{
|
||||
this.controlPoints = controlPoints;
|
||||
}
|
@ -265,7 +265,7 @@
|
||||
<Compile Include="Beatmaps\Formats\JsonBeatmapDecoder.cs" />
|
||||
<Compile Include="Beatmaps\Formats\LegacyDecoder.cs" />
|
||||
<Compile Include="Beatmaps\Formats\LegacyStoryboardDecoder.cs" />
|
||||
<Compile Include="Configuration\ScrollingAlgorithmType.cs" />
|
||||
<Compile Include="Configuration\SpeedChangeVisualisationMethod.cs" />
|
||||
<Compile Include="Database\DatabaseContextFactory.cs" />
|
||||
<Compile Include="Database\IHasPrimaryKey.cs" />
|
||||
<Compile Include="Graphics\Textures\LargeTextureStore.cs" />
|
||||
@ -318,9 +318,9 @@
|
||||
<Compile Include="Rulesets\Mods\IApplicableToBeatmapConverter.cs" />
|
||||
<Compile Include="Rulesets\Mods\IApplicableToDrawableHitObject.cs" />
|
||||
<Compile Include="Rulesets\UI\HitObjectContainer.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\Algorithms\GlobalScrollingAlgorithm.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\Algorithms\IScrollingAlgorithm.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\Algorithms\LocalScrollingAlgorithm.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\Algorithms\SequentialSpeedChangeVisualiser.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\Algorithms\ISpeedChangeVisualiser.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\Algorithms\OverlappingSpeedChangeVisualiser.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\ScrollingDirection.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\ScrollingHitObjectContainer.cs" />
|
||||
<Compile Include="Rulesets\UI\Scrolling\ScrollingPlayfield.cs" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user