mirror of
https://github.com/ppy/osu
synced 2024-12-29 10:22:43 +00:00
Merge remote-tracking branch 'origin/master' into taiko_playfield_2
This commit is contained in:
commit
afcd42b06d
@ -3,7 +3,7 @@
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public enum TaikoScoreResult
|
||||
public enum TaikoHitResult
|
||||
{
|
||||
Good,
|
||||
Great
|
@ -10,32 +10,32 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
/// <summary>
|
||||
/// The maximum score value.
|
||||
/// </summary>
|
||||
public const TaikoScoreResult MAX_SCORE = TaikoScoreResult.Great;
|
||||
public const TaikoHitResult MAX_HIT_RESULT = TaikoHitResult.Great;
|
||||
|
||||
/// <summary>
|
||||
/// The score value.
|
||||
/// </summary>
|
||||
public TaikoScoreResult Score;
|
||||
public TaikoHitResult TaikoResult;
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int ScoreValue => ScoreToInt(Score);
|
||||
public int ScoreValue => NumericResultForScore(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int AccuracyScoreValue => AccuracyScoreToInt(Score);
|
||||
public int AccuracyScoreValue => NumericResultForAccuracy(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int MaxScoreValue => ScoreToInt(MAX_SCORE);
|
||||
public int MaxScoreValue => NumericResultForScore(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int MaxAccuracyScoreValue => AccuracyScoreToInt(MAX_SCORE);
|
||||
public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// Whether this Judgement has a secondary hit in the case of finishers.
|
||||
@ -43,38 +43,39 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
public bool SecondHit;
|
||||
|
||||
/// <summary>
|
||||
/// Computes the score value for the combo portion of the score.
|
||||
/// For the accuracy portion of the score (including accuracy percentage), see <see cref="AccuracyScoreToInt(TaikoScoreResult)"/>.
|
||||
/// 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 int score value.</returns>
|
||||
protected virtual int ScoreToInt(TaikoScoreResult result)
|
||||
/// <returns>The numeric score value.</returns>
|
||||
protected virtual int NumericResultForScore(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case TaikoScoreResult.Good:
|
||||
case TaikoHitResult.Good:
|
||||
return 100;
|
||||
case TaikoScoreResult.Great:
|
||||
case TaikoHitResult.Great:
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes the score value for the accurac portion of the score.
|
||||
/// 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 int score value.</returns>
|
||||
protected virtual int AccuracyScoreToInt(TaikoScoreResult result)
|
||||
/// <returns>The numeric score value.</returns>
|
||||
protected virtual int NumericResultForAccuracy(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case TaikoScoreResult.Good:
|
||||
case TaikoHitResult.Good:
|
||||
return 150;
|
||||
case TaikoScoreResult.Great:
|
||||
case TaikoHitResult.Great:
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@
|
||||
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
||||
<Compile Include="Judgements\TaikoJudgementInfo.cs" />
|
||||
<Compile Include="Judgements\TaikoScoreResult.cs" />
|
||||
<Compile Include="Judgements\TaikoHitResult.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
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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