mirror of
https://github.com/ppy/osu
synced 2024-12-29 10:22:43 +00:00
Merge remote-tracking branch 'origin/master' into taiko_drumroll_base
Conflicts: osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj
This commit is contained in:
commit
a346191ca7
@ -144,5 +144,12 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
if (proxyable != null)
|
||||
approachContainer.Add(proxyable.ProxiedLayer.CreateProxy());
|
||||
}
|
||||
|
||||
private enum HitObjectType
|
||||
{
|
||||
Circle,
|
||||
Slider,
|
||||
Spinner
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -215,6 +215,7 @@ namespace osu.Desktop.Overlays
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.fa_upload,
|
||||
Colour = Color4.White,
|
||||
TextSize = 20
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -5,6 +5,5 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
{
|
||||
public class HitCircle : OsuHitObject
|
||||
{
|
||||
public override HitObjectType Type => HitObjectType.Circle;
|
||||
}
|
||||
}
|
||||
|
@ -36,8 +36,6 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
|
||||
public float Scale { get; set; } = 1;
|
||||
|
||||
public abstract HitObjectType Type { get; }
|
||||
|
||||
public Color4 ComboColour { get; set; }
|
||||
public virtual bool NewCombo { get; set; }
|
||||
public int ComboIndex { get; set; }
|
||||
|
@ -148,11 +148,11 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
double timeElapsed = (BaseHitObject.StartTime - previousHitObject.BaseHitObject.StartTime) / timeRate;
|
||||
double decay = Math.Pow(DECAY_BASE[(int)type], timeElapsed / 1000);
|
||||
|
||||
if (BaseHitObject.Type == HitObjectType.Spinner)
|
||||
if (BaseHitObject is Spinner)
|
||||
{
|
||||
// Do nothing for spinners
|
||||
}
|
||||
else if (BaseHitObject.Type == HitObjectType.Slider)
|
||||
else if (BaseHitObject is Slider)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@ -180,7 +180,7 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (BaseHitObject.Type == HitObjectType.Circle)
|
||||
else if (BaseHitObject is HitCircle)
|
||||
{
|
||||
addition = spacingWeight(DistanceTo(previousHitObject), type) * spacing_weight_scaling[(int)type];
|
||||
}
|
||||
|
@ -103,7 +103,5 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override HitObjectType Type => HitObjectType.Slider;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,5 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
public class SliderTick : OsuHitObject
|
||||
{
|
||||
public int RepeatIndex { get; set; }
|
||||
|
||||
public override HitObjectType Type => HitObjectType.SliderTick;
|
||||
}
|
||||
}
|
||||
|
@ -10,8 +10,6 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
public double EndTime { get; set; }
|
||||
public double Duration => EndTime - StartTime;
|
||||
|
||||
public override HitObjectType Type => HitObjectType.Spinner;
|
||||
|
||||
public override bool NewCombo => true;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Modes.Osu.Beatmaps;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using System;
|
||||
@ -26,8 +27,7 @@ namespace osu.Game.Modes.Osu
|
||||
protected override void PreprocessHitObjects()
|
||||
{
|
||||
foreach (var h in Objects)
|
||||
if (h.Type == HitObjectType.Slider)
|
||||
((Slider)h).Curve.Calculate();
|
||||
(h as IHasCurve)?.Curve?.Calculate();
|
||||
}
|
||||
|
||||
protected override double CalculateInternal(Dictionary<string, string> categoryDifficulty)
|
||||
|
@ -67,7 +67,6 @@
|
||||
<Compile Include="Objects\Drawables\Pieces\TrianglesPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\SliderBall.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\SliderBody.cs" />
|
||||
<Compile Include="Objects\HitObjectType.cs" />
|
||||
<Compile Include="Objects\OsuHitObjectDifficulty.cs" />
|
||||
<Compile Include="Objects\SliderTick.cs" />
|
||||
<Compile Include="OsuAutoReplay.cs" />
|
||||
|
@ -1,13 +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.Modes.Osu.Objects
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public enum HitObjectType
|
||||
public enum TaikoHitResult
|
||||
{
|
||||
Circle,
|
||||
Slider,
|
||||
Spinner,
|
||||
SliderTick
|
||||
Good,
|
||||
Great
|
||||
}
|
||||
}
|
@ -7,5 +7,77 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public class TaikoJudgementInfo : JudgementInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum score value.
|
||||
/// </summary>
|
||||
public const TaikoHitResult MAX_HIT_RESULT = TaikoHitResult.Great;
|
||||
|
||||
/// <summary>
|
||||
/// The score value.
|
||||
/// </summary>
|
||||
public TaikoHitResult TaikoResult;
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int ScoreValue => NumericResultForScore(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int AccuracyScoreValue => NumericResultForAccuracy(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int MaxScoreValue => NumericResultForScore(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// Whether this Judgement has a secondary hit in the case of finishers.
|
||||
/// </summary>
|
||||
public bool SecondHit;
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric score value for the combo portion of the score.
|
||||
/// For the accuracy portion of the score (including accuracy percentage), see <see cref="NumericResultForAccuracy(TaikoHitResult)"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the score value for.</param>
|
||||
/// <returns>The numeric score value.</returns>
|
||||
protected virtual int NumericResultForScore(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case TaikoHitResult.Good:
|
||||
return 100;
|
||||
case TaikoHitResult.Great:
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric score value for the accuracy portion of the score.
|
||||
/// For the combo portion of the score, see <see cref="NumericResultForScore(TaikoHitResult)"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the score value for.</param>
|
||||
/// <returns>The numeric score value.</returns>
|
||||
protected virtual int NumericResultForAccuracy(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case TaikoHitResult.Good:
|
||||
return 150;
|
||||
case TaikoHitResult.Great:
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +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 System;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects
|
||||
{
|
||||
[Flags]
|
||||
public enum TaikoHitType
|
||||
{
|
||||
None = 0,
|
||||
CentreHit = 1 << 0,
|
||||
RimHit = 1 << 1,
|
||||
DrumRoll = 1 << 2,
|
||||
DrumRollTick = 1 << 3,
|
||||
Bash = 1 << 4,
|
||||
Finisher = 1 << 5,
|
||||
|
||||
Hit = CentreHit | RimHit
|
||||
}
|
||||
}
|
@ -50,9 +50,9 @@
|
||||
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
||||
<Compile Include="Judgements\TaikoJudgementInfo.cs" />
|
||||
<Compile Include="Judgements\TaikoHitResult.cs" />
|
||||
<Compile Include="Objects\DrumRoll.cs" />
|
||||
<Compile Include="Objects\DrumRollTick.cs" />
|
||||
<Compile Include="Objects\TaikoHitType.cs" />
|
||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||
<Compile Include="Objects\Drawable\DrawableTaikoHit.cs" />
|
||||
<Compile Include="Objects\TaikoHitObject.cs" />
|
||||
|
@ -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])
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
11
osu.Game/Beatmaps/Timing/TimeSignatures.cs
Normal file
11
osu.Game/Beatmaps/Timing/TimeSignatures.cs
Normal 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
|
||||
}
|
||||
}
|
@ -1,11 +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
|
||||
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Graphics
|
||||
{
|
||||
public class TextAwesome : SpriteText
|
||||
public class TextAwesome : OsuSpriteText
|
||||
{
|
||||
//public override FontFace FontFace => (int)Icon < 0xf000 ? FontFace.OsuFont : FontFace.FontAwesome;
|
||||
|
||||
|
@ -54,6 +54,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Margin = new MarginPadding { Right = 4 },
|
||||
TextSize = 20
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -66,12 +66,14 @@ namespace osu.Game.Modes.UI
|
||||
Anchor = Anchor.Centre,
|
||||
Icon = FontAwesome.fa_osu_mod_bg,
|
||||
Shadow = true,
|
||||
TextSize = 20
|
||||
},
|
||||
modIcon = new TextAwesome
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Colour = OsuColour.Gray(84),
|
||||
TextSize = 20
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -7,6 +7,7 @@ using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using OpenTK;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Game.Modes.UI
|
||||
{
|
||||
@ -45,10 +46,16 @@ namespace osu.Game.Modes.UI
|
||||
}
|
||||
});
|
||||
|
||||
Add(HitObjects = new HitObjectContainer<DrawableHitObject<TObject, TJudgement>>
|
||||
HitObjects = new HitObjectContainer<DrawableHitObject<TObject, TJudgement>>
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Add(HitObjects);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -279,6 +279,7 @@ namespace osu.Game
|
||||
//central game mode change logic.
|
||||
if (!currentScreen.ShowOverlays)
|
||||
{
|
||||
options.State = Visibility.Hidden;
|
||||
Toolbar.State = Visibility.Hidden;
|
||||
musicController.State = Visibility.Hidden;
|
||||
chat.State = Visibility.Hidden;
|
||||
|
@ -169,6 +169,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = FontAwesome.fa_times_circle,
|
||||
TextSize = 20
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ namespace osu.Game.Overlays.Notifications
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Icon = icon,
|
||||
TextSize = 20
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -32,6 +32,7 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
Icon = Ruleset.GetRuleset(m).Icon,
|
||||
Colour = Color4.Gray,
|
||||
TextSize = 20
|
||||
});
|
||||
|
||||
Children = new Drawable[]
|
||||
|
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
{
|
||||
@ -12,9 +13,16 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
{
|
||||
protected override string Header => "Layout";
|
||||
|
||||
private OptionSlider<int> letterboxPositionX;
|
||||
private OptionSlider<int> letterboxPositionY;
|
||||
|
||||
private Bindable<bool> letterboxing;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager config)
|
||||
{
|
||||
letterboxing = config.GetBindable<bool>(FrameworkConfig.Letterboxing);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OptionLabel { Text = "Resolution: TODO dropdown" },
|
||||
@ -26,19 +34,36 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Letterboxing",
|
||||
Bindable = config.GetBindable<bool>(FrameworkConfig.Letterboxing),
|
||||
Bindable = letterboxing,
|
||||
},
|
||||
new OptionSlider<int>
|
||||
letterboxPositionX = new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Horizontal position",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionX)
|
||||
},
|
||||
new OptionSlider<int>
|
||||
letterboxPositionY = new OptionSlider<int>
|
||||
{
|
||||
LabelText = "Vertical position",
|
||||
Bindable = (BindableInt)config.GetBindable<int>(FrameworkConfig.LetterboxPositionY)
|
||||
},
|
||||
};
|
||||
|
||||
letterboxing.ValueChanged += visibilityChanged;
|
||||
letterboxing.TriggerChange();
|
||||
}
|
||||
|
||||
private void visibilityChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (letterboxing)
|
||||
{
|
||||
letterboxPositionX.Show();
|
||||
letterboxPositionY.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
letterboxPositionX.Hide();
|
||||
letterboxPositionY.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -87,6 +87,7 @@ namespace osu.Game.Overlays.Options
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = 20
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -98,6 +98,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = 20
|
||||
},
|
||||
DrawableText = new OsuSpriteText
|
||||
{
|
||||
|
@ -237,14 +237,16 @@ namespace osu.Game.Screens.Select
|
||||
Icon = FontAwesome.fa_square,
|
||||
Origin = Anchor.Centre,
|
||||
Colour = new Color4(68, 17, 136, 255),
|
||||
Rotation = 45
|
||||
Rotation = 45,
|
||||
TextSize = 20
|
||||
},
|
||||
new TextAwesome
|
||||
{
|
||||
Icon = statistic.Icon,
|
||||
Origin = Anchor.Centre,
|
||||
Colour = new Color4(255, 221, 85, 255),
|
||||
Scale = new Vector2(0.8f)
|
||||
Scale = new Vector2(0.8f),
|
||||
TextSize = 20
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ namespace osu.Game.Screens.Select
|
||||
Origin = Anchor.CentreRight,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Margin = new MarginPadding { Right = 10 },
|
||||
TextSize = 20
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -160,7 +160,7 @@ namespace osu.Game.Screens.Tournament
|
||||
|
||||
Text = "Control Panel",
|
||||
TextSize = 22f,
|
||||
Font = "Exo2.0-Boldd"
|
||||
Font = "Exo2.0-Bold"
|
||||
},
|
||||
new FillFlowContainer
|
||||
{
|
||||
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user