Skip to content

Commit

Permalink
Merge pull request #1392 from andy840119/remove-saiten-wording
Browse files Browse the repository at this point in the history
Rename from `Saiten` to `Scoring`.
  • Loading branch information
andy840119 authored Jun 19, 2022
2 parents 4a61949 + 529c5e0 commit a82f59c
Show file tree
Hide file tree
Showing 31 changed files with 217 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public TestSceneKaraokeModPerfect()
{
}

// TODO : test case = false will be added after saiten system is implemented.
[Ignore("Saiten should judgement by note, not lyric.")]
// TODO : test case = false will be added after scoring system is implemented.
[Ignore("Scoring should judgement by note, not lyric.")]
public void TestLyric(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestData(new Lyric
{
StartTime = 1000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace osu.Game.Rulesets.Karaoke.Tests.Ranking
{
public class TestSceneSaitenResultGraph : OsuTestScene
public class TestSceneScoringResultGraph : OsuTestScene
{
[Test]
public void TestManyDistributedEvents()
Expand All @@ -33,7 +33,7 @@ private void createTest(ScoreInfo score, IBeatmap beatmap) => AddStep("create te
RelativeSizeAxes = Axes.Both,
Colour = Color4Extensions.FromHex("#333")
},
new SaitenResultGraph(score, beatmap)
new ScoringResultGraph(score, beatmap)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public void TestPositionAtNote(double scale, float expected)
[TestCase(0f, 0)]
[TestCase(1f, -21f)]
[TestCase(-1f, 21f)]
public void TestPositionAtSaitenAction(float scale, float expected)
public void TestPositionAtScoringAction(float scale, float expected)
{
var calculator = new NotePositionCalculator(default_columns, default_column_height, default_spacing);
var action = new KaraokeSaitenAction
var action = new KaraokeScoringAction
{
Scale = scale
};
Expand Down
10 changes: 5 additions & 5 deletions osu.Game.Rulesets.Karaoke.Tests/UI/TestSceneNotePlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected override void LoadComplete()
createNote(2800, 100, 4);
createBar(true, 2900);
});
AddStep("saiten", () =>
AddStep("scoring", () =>
{
createBar(true);
createNote(2000, 100, 4, true);
Expand All @@ -106,7 +106,7 @@ protected override void LoadComplete()
AddStep("major bar", () => createBar(true));
}

private void createNote(double increaseTime = 2000, double duration = 1000, int tone = 0, bool saiten = false)
private void createNote(double increaseTime = 2000, double duration = 1000, int tone = 0, bool scoring = false)
{
notePlayfields.ForEach(x =>
{
Expand All @@ -124,11 +124,11 @@ private void createNote(double increaseTime = 2000, double duration = 1000, int
x.Add(new DrawableNote(note));
});

if (saiten)
createSaitenPath(increaseTime, duration, tone);
if (scoring)
createScoringPath(increaseTime, duration, tone);
}

private void createSaitenPath(double increaseTime = 2000, double duration = 1000, int scale = 0)
private void createScoringPath(double increaseTime = 2000, double duration = 1000, int scale = 0)
{
notePlayfields.ForEach(x =>
{
Expand Down
39 changes: 0 additions & 39 deletions osu.Game.Rulesets.Karaoke.Tests/UI/TestSceneSaitenStatus.cs

This file was deleted.

39 changes: 39 additions & 0 deletions osu.Game.Rulesets.Karaoke.Tests/UI/TestSceneScoringStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Karaoke.UI.Components;
using osu.Game.Tests.Visual;

namespace osu.Game.Rulesets.Karaoke.Tests.UI
{
[TestFixture]
public class TestSceneScoringStatus : OsuTestScene
{
[TestCase(ScoringStatusMode.AndroidMicrophonePermissionDeclined)]
[TestCase(ScoringStatusMode.AndroidDoesNotSupported)]
[TestCase(ScoringStatusMode.IOSMicrophonePermissionDeclined)]
[TestCase(ScoringStatusMode.IOSDoesNotSupported)]
[TestCase(ScoringStatusMode.OSXMicrophonePermissionDeclined)]
[TestCase(ScoringStatusMode.OSXDoesNotSupported)]
[TestCase(ScoringStatusMode.WindowsMicrophonePermissionDeclined)]
[TestCase(ScoringStatusMode.NoMicrophoneDevice)]
[TestCase(ScoringStatusMode.NotScoring)]
[TestCase(ScoringStatusMode.AutoPlay)]
[TestCase(ScoringStatusMode.Edit)]
[TestCase(ScoringStatusMode.Scoring)]
[TestCase(ScoringStatusMode.NotInitialized)]
public void TestMode(ScoringStatusMode mode)
{
AddStep("create mod display", () =>
{
Child = new ScoringStatus(mode)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre
};
});
}
}
}
3 changes: 0 additions & 3 deletions osu.Game.Rulesets.Karaoke.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,6 @@ private void load()
<s:Boolean x:Key="/Default/UserDictionary/Words/=Romanised/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ruleset/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rulesets/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Saiten/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Saitenable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Saitening/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=ruleset_0027s/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Scorable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sekaini/@EntryIndexedValue">True</s:Boolean>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ protected override void InitialiseDefaults()
SetDefault(KaraokeRulesetSetting.Pitch, 0, -10, 10);
SetDefault(KaraokeRulesetSetting.OverrideVocalPitchAtGameplay, false);
SetDefault(KaraokeRulesetSetting.VocalPitch, 0, -10, 10);
SetDefault(KaraokeRulesetSetting.OverrideSaitenPitchAtGameplay, false);
SetDefault(KaraokeRulesetSetting.SaitenPitch, 0, -10, 10);
SetDefault(KaraokeRulesetSetting.OverrideScoringPitchAtGameplay, false);
SetDefault(KaraokeRulesetSetting.ScoringPitch, 0, -10, 10);

// Playback
SetDefault(KaraokeRulesetSetting.OverridePlaybackSpeedAtGameplay, false);
Expand Down Expand Up @@ -147,8 +147,8 @@ public enum KaraokeRulesetSetting
Pitch,
OverrideVocalPitchAtGameplay,
VocalPitch,
OverrideSaitenPitchAtGameplay,
SaitenPitch,
OverrideScoringPitchAtGameplay,
ScoringPitch,

// Playback
OverridePlaybackSpeedAtGameplay,
Expand Down
16 changes: 8 additions & 8 deletions osu.Game.Rulesets.Karaoke/Configuration/KaraokeSessionStatics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public KaraokeSessionStatics(KaraokeRulesetConfigManager config, IBeatmap beatma
int vocalPitchValue = getValue<int>(KaraokeRulesetSetting.VocalPitch);
SetDefault(KaraokeRulesetSession.VocalPitch, overrideVocalPitch ? vocalPitchValue : 0, -10, 10);

bool overrideSaitenPitch = getValue<bool>(KaraokeRulesetSetting.OverrideSaitenPitchAtGameplay);
int saitenPitchValue = getValue<int>(KaraokeRulesetSetting.SaitenPitch);
SetDefault(KaraokeRulesetSession.SaitenPitch, overrideSaitenPitch ? saitenPitchValue : 0, -8, 8);
bool overrideScoringPitch = getValue<bool>(KaraokeRulesetSetting.OverrideScoringPitchAtGameplay);
int scoringPitchValue = getValue<int>(KaraokeRulesetSetting.ScoringPitch);
SetDefault(KaraokeRulesetSession.ScoringPitch, overrideScoringPitch ? scoringPitchValue : 0, -8, 8);

// Playback
bool overridePlaybackSpeed = getValue<bool>(KaraokeRulesetSetting.OverridePlaybackSpeedAtGameplay);
Expand All @@ -54,8 +54,8 @@ public KaraokeSessionStatics(KaraokeRulesetConfigManager config, IBeatmap beatma
// Practice
SetDefault<Lyric[]>(KaraokeRulesetSession.SingingLyrics, null);

// Saiten status
SetDefault(KaraokeRulesetSession.SaitenStatus, SaitenStatusMode.NotInitialized);
// Scoring status
SetDefault(KaraokeRulesetSession.ScoringStatus, ScoringStatusMode.NotInitialized);
}

private T getValue<T>(KaraokeRulesetSetting setting) => rulesetConfigManager.Get<T>(setting);
Expand All @@ -74,15 +74,15 @@ public enum KaraokeRulesetSession
// Pitch
Pitch,
VocalPitch,
SaitenPitch,
ScoringPitch,

// Playback
PlaybackSpeed,

// Practice
SingingLyrics,

// Saiten status
SaitenStatus,
// Scoring status
ScoringStatus,
}
}
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke/Edit/EditorNotePlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public EditorNotePlayfield(int columns)

HitObjectArea.Add(singerVoiceVisualization = new SingerVoiceVisualization
{
Name = "Saiten Visualization",
Name = "Scoring Visualization",
RelativeSizeAxes = Axes.Both,
Alpha = 0.6f
});
Expand All @@ -43,7 +43,7 @@ public EditorNotePlayfield(int columns)
[BackgroundDependencyLoader(true)]
private void load()
{
// todo : load data from saiten manager.
// todo : load data from scoring manager.
}

public class SingerVoiceVisualization : VoiceVisualization<KeyValuePair<double, float?>>
Expand Down
12 changes: 6 additions & 6 deletions osu.Game.Rulesets.Karaoke/Edit/Setup/KaraokeSetupSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class KaraokeSetupSection : RulesetSetupSection
{
private KaraokeBeatmap karaokeBeatmap => Beatmap.PlayableBeatmap as KaraokeBeatmap;

private LabelledSwitchButton saitenable;
private LabelledSwitchButton scorable;
private LabelledSingerList singerList;

public KaraokeSetupSection()
Expand All @@ -27,10 +27,10 @@ private void load()
{
Children = new Drawable[]
{
saitenable = new LabelledSwitchButton
scorable = new LabelledSwitchButton
{
Label = "Saitenable",
Description = "Will not show saiten playfield if the option is unchecked.",
Label = "Scorable",
Description = "Will not show score playfield if the option is unchecked.",
Current = { Value = true }
},
singerList = new LabelledSingerList
Expand All @@ -47,13 +47,13 @@ protected override void LoadComplete()
{
base.LoadComplete();

saitenable.Current.BindValueChanged(_ => updateBeatmap());
scorable.Current.BindValueChanged(_ => updateBeatmap());
}

private void updateBeatmap()
{
// todo: update the value.
// karaokeBeatmap.Saitenable = saitenable.Current.Value;
// karaokeBeatmap.Scorable = scorable.Current.Value;
}
}
}
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke/Judgements/KaraokeNoteJudgement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ namespace osu.Game.Rulesets.Karaoke.Judgements
{
public class KaraokeNoteJudgement : KaraokeJudgement
{
public bool Saitenable { get; set; }
public bool Scorable { get; set; }

protected override double HealthIncreaseFor(HitResult result)
{
if (!Saitenable)
if (!Scorable)
return 0;

return result switch
Expand Down
12 changes: 6 additions & 6 deletions osu.Game.Rulesets.Karaoke/KaraokeControlInputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public enum KaraokeAction
[Description("Reset vocal pitch")]
ResetVocalPitch,

[Description("Increase saiten pitch")]
IncreaseSaitenPitch,
[Description("Increase scoring pitch")]
IncreaseScoringPitch,

[Description("Decrease saiten pitch")]
DecreaseSaitenPitch,
[Description("Decrease scoring pitch")]
DecreaseScoringPitch,

[Description("Reset saiten pitch")]
ResetSaitenPitch,
[Description("Reset scoring pitch")]
ResetScoringPitch,
}
}
Loading

0 comments on commit a82f59c

Please sign in to comment.