mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge remote-tracking branch 'upstream/master' into replay
# Conflicts: # osu.Desktop.VisualTests/Tests/TestCasePlayer.cs # osu.Desktop/OsuGameDesktop.cs # osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs # osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs # osu.Game/Database/BeatmapDatabase.cs # osu.Game/Graphics/Cursor/OsuCursorContainer.cs # osu.Game/IPC/BeatmapImporter.cs # osu.Game/Modes/Mod.cs # osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs # osu.Game/Modes/UI/Playfield.cs # osu.Game/Screens/Play/Player.cs # osu.Game/Screens/Play/PlayerInputManager.cs
This commit is contained in:
@ -37,7 +37,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
protected abstract HitObjectConverter<T> Converter { get; }
|
||||
|
||||
public DifficultyCalculator(Beatmap beatmap)
|
||||
protected DifficultyCalculator(Beatmap beatmap)
|
||||
{
|
||||
Objects = Converter.Convert(beatmap);
|
||||
PreprocessHitObjects();
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
class BeatmapBackgroundSprite : Sprite
|
||||
internal class BeatmapBackgroundSprite : Sprite
|
||||
{
|
||||
private readonly WorkingBeatmap working;
|
||||
|
||||
|
@ -10,7 +10,7 @@ using osu.Game.Database;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
class BeatmapGroup : IStateful<BeatmapGroupState>
|
||||
internal class BeatmapGroup : IStateful<BeatmapGroupState>
|
||||
{
|
||||
public BeatmapPanel SelectedPanel;
|
||||
|
||||
|
@ -18,7 +18,7 @@ using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
class BeatmapPanel : Panel
|
||||
internal class BeatmapPanel : Panel
|
||||
{
|
||||
public BeatmapInfo Beatmap;
|
||||
private Sprite background;
|
||||
|
@ -17,7 +17,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
class BeatmapSetHeader : Panel
|
||||
internal class BeatmapSetHeader : Panel
|
||||
{
|
||||
public Action<BeatmapSetHeader> GainedSelection;
|
||||
private SpriteText title, artist;
|
||||
@ -96,7 +96,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
|
||||
class PanelBackground : BufferedContainer
|
||||
private class PanelBackground : BufferedContainer
|
||||
{
|
||||
private readonly WorkingBeatmap working;
|
||||
|
||||
@ -160,7 +160,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
FillMode = FillMode.Fill,
|
||||
}.LoadAsync(game, (bg) =>
|
||||
}.LoadAsync(game, bg =>
|
||||
{
|
||||
Add(bg);
|
||||
ForceRedraw();
|
||||
|
@ -12,7 +12,7 @@ using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
class DifficultyIcon : Container
|
||||
internal class DifficultyIcon : Container
|
||||
{
|
||||
private readonly BeatmapInfo beatmap;
|
||||
private OsuColour palette;
|
||||
@ -50,7 +50,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
};
|
||||
}
|
||||
|
||||
enum DifficultyRating
|
||||
private enum DifficultyRating
|
||||
{
|
||||
Easy,
|
||||
Normal,
|
||||
|
@ -12,7 +12,7 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
|
||||
namespace osu.Game.Beatmaps.Drawables
|
||||
{
|
||||
class Panel : Container, IStateful<PanelSelectedState>
|
||||
internal class Panel : Container, IStateful<PanelSelectedState>
|
||||
{
|
||||
public const float MAX_HEIGHT = 80;
|
||||
|
||||
@ -115,7 +115,7 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
enum PanelSelectedState
|
||||
internal enum PanelSelectedState
|
||||
{
|
||||
Hidden,
|
||||
NotSelected,
|
||||
|
@ -17,8 +17,9 @@ namespace osu.Game.Beatmaps.Formats
|
||||
|
||||
public static BeatmapDecoder GetDecoder(TextReader stream)
|
||||
{
|
||||
var line = stream.ReadLine().Trim();
|
||||
if (!decoders.ContainsKey(line))
|
||||
var line = stream.ReadLine()?.Trim();
|
||||
|
||||
if (line == null || !decoders.ContainsKey(line))
|
||||
throw new IOException(@"Unknown file format");
|
||||
return (BeatmapDecoder)Activator.CreateInstance(decoders[line]);
|
||||
}
|
||||
|
@ -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 kiaiFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0;
|
||||
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
||||
cp = new ControlPoint
|
||||
{
|
||||
@ -219,15 +219,18 @@ namespace osu.Game.Beatmaps.Formats
|
||||
throw new InvalidOperationException($@"Color specified in incorrect format (should be R,G,B): {val}");
|
||||
byte r, g, b;
|
||||
if (!byte.TryParse(split[0], out r) || !byte.TryParse(split[1], out g) || !byte.TryParse(split[2], out b))
|
||||
throw new InvalidOperationException($@"Color must be specified with 8-bit integer components");
|
||||
throw new InvalidOperationException(@"Color must be specified with 8-bit integer components");
|
||||
// Note: the combo index specified in the beatmap is discarded
|
||||
beatmap.ComboColors.Add(new Color4
|
||||
if (key.StartsWith(@"Combo"))
|
||||
{
|
||||
R = r / 255f,
|
||||
G = g / 255f,
|
||||
B = b / 255f,
|
||||
A = 1f,
|
||||
});
|
||||
beatmap.ComboColors.Add(new Color4
|
||||
{
|
||||
R = r / 255f,
|
||||
G = g / 255f,
|
||||
B = b / 255f,
|
||||
A = 1f,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ParseFile(TextReader stream, Beatmap beatmap)
|
||||
@ -235,10 +238,9 @@ namespace osu.Game.Beatmaps.Formats
|
||||
HitObjectParser parser = null;
|
||||
|
||||
var section = Section.None;
|
||||
string line;
|
||||
while (true)
|
||||
{
|
||||
line = stream.ReadLine();
|
||||
var line = stream.ReadLine();
|
||||
if (line == null)
|
||||
break;
|
||||
if (string.IsNullOrEmpty(line))
|
||||
|
@ -15,7 +15,8 @@ namespace osu.Game.Beatmaps.Timing
|
||||
public double BeatLength;
|
||||
public double VelocityAdjustment;
|
||||
public bool TimingChange;
|
||||
|
||||
public bool KiaiMode;
|
||||
|
||||
}
|
||||
|
||||
internal enum TimeSignatures
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace osu.Game.Beatmaps.Timing
|
||||
{
|
||||
class TimingChange : ControlPoint
|
||||
internal class TimingChange : ControlPoint
|
||||
{
|
||||
public TimingChange(double beatLength)
|
||||
{
|
||||
|
Reference in New Issue
Block a user