From c82ae011fb125a8a41c2c7f74140306e51376285 Mon Sep 17 00:00:00 2001 From: smoogipooo Date: Thu, 16 Mar 2017 12:40:35 +0900 Subject: [PATCH 1/4] Make ScoreProcessors take generic judgements. --- osu.Game.Modes.Catch/CatchRuleset.cs | 2 - osu.Game.Modes.Catch/CatchScoreProcessor.cs | 21 ++++++++ osu.Game.Modes.Catch/UI/CatchHitRenderer.cs | 4 +- .../osu.Game.Modes.Catch.csproj | 1 + osu.Game.Modes.Catch/packages.config | 1 + osu.Game.Modes.Mania/ManiaRuleset.cs | 2 - osu.Game.Modes.Mania/ManiaScoreProcessor.cs | 21 ++++++++ osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs | 4 +- .../osu.Game.Modes.Mania.csproj | 1 + osu.Game.Modes.Mania/packages.config | 1 + osu.Game.Modes.Osu/OsuRuleset.cs | 2 - osu.Game.Modes.Osu/OsuScoreProcessor.cs | 13 ++--- osu.Game.Modes.Osu/UI/OsuHitRenderer.cs | 4 +- osu.Game.Modes.Osu/packages.config | 1 + osu.Game.Modes.Taiko/TaikoRuleset.cs | 2 - osu.Game.Modes.Taiko/TaikoScoreProcessor.cs | 21 ++++++++ osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 4 +- .../osu.Game.Modes.Taiko.csproj | 1 + osu.Game.Modes.Taiko/packages.config | 1 + osu.Game/Database/ScoreDatabase.cs | 3 +- osu.Game/Modes/Ruleset.cs | 2 - osu.Game/Modes/ScoreProcesssor.cs | 50 ++++++++++++------- osu.Game/Modes/UI/HitRenderer.cs | 23 ++++----- osu.Game/Screens/Play/Player.cs | 7 +-- osu.Game/packages.config | 1 + 25 files changed, 137 insertions(+), 56 deletions(-) create mode 100644 osu.Game.Modes.Catch/CatchScoreProcessor.cs create mode 100644 osu.Game.Modes.Mania/ManiaScoreProcessor.cs create mode 100644 osu.Game.Modes.Taiko/TaikoScoreProcessor.cs diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index cb695aaabe..0166948fcb 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -87,8 +87,6 @@ namespace osu.Game.Modes.Catch new KeyCounterMouse(MouseButton.Right) }; - public override ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0) => null; - public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new CatchDifficultyCalculator(beatmap); } } diff --git a/osu.Game.Modes.Catch/CatchScoreProcessor.cs b/osu.Game.Modes.Catch/CatchScoreProcessor.cs new file mode 100644 index 0000000000..e653297a15 --- /dev/null +++ b/osu.Game.Modes.Catch/CatchScoreProcessor.cs @@ -0,0 +1,21 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Modes.Catch.Judgements; +using osu.Game.Modes.Catch.Objects; +using osu.Game.Modes.UI; + +namespace osu.Game.Modes.Catch +{ + internal class CatchScoreProcessor : ScoreProcessor + { + public CatchScoreProcessor(HitRenderer hitRenderer) + : base(hitRenderer) + { + } + + protected override void UpdateCalculations(CatchJudgementInfo newJudgement) + { + } + } +} diff --git a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs index e45ca7d293..c02b6b6c49 100644 --- a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs +++ b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs @@ -17,11 +17,13 @@ namespace osu.Game.Modes.Catch.UI { } + public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this); + protected override IBeatmapConverter CreateBeatmapConverter() => new CatchBeatmapConverter(); protected override IBeatmapProcessor CreateBeatmapProcessor() => new CatchBeatmapProcessor(); - protected override Playfield CreatePlayfield() => new CatchPlayfield(); + protected override Playfield CreatePlayfield() => new CatchPlayfield(); protected override DrawableHitObject GetVisualRepresentation(CatchBaseHit h) => null; } diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj index e6861b54ef..a32416173d 100644 --- a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -50,6 +50,7 @@ + diff --git a/osu.Game.Modes.Catch/packages.config b/osu.Game.Modes.Catch/packages.config index 4031dd62a8..08fca09c35 100644 --- a/osu.Game.Modes.Catch/packages.config +++ b/osu.Game.Modes.Catch/packages.config @@ -1,4 +1,5 @@  +