diff --git a/osu.Game.Rulesets.Catch/Replays/CatchReplayFrame.cs b/osu.Game.Rulesets.Catch/Replays/CatchReplayFrame.cs
index 3909522b52..d45223a1cb 100644
--- a/osu.Game.Rulesets.Catch/Replays/CatchReplayFrame.cs
+++ b/osu.Game.Rulesets.Catch/Replays/CatchReplayFrame.cs
@@ -5,7 +5,6 @@ using osu.Game.Beatmaps;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;
-using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Catch.Replays
{
@@ -25,7 +24,7 @@ namespace osu.Game.Rulesets.Catch.Replays
Dashing = dashing;
}
- public void ConvertFrom(LegacyReplayFrame legacyFrame, Score score, Beatmap beatmap)
+ public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
{
// Todo: This needs to be re-scaled
X = legacyFrame.Position.X;
diff --git a/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs b/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs
index a9d0e96110..9e773d0e24 100644
--- a/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs
+++ b/osu.Game.Rulesets.Mania/Replays/ManiaReplayFrame.cs
@@ -7,7 +7,6 @@ using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;
-using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Mania.Replays
{
@@ -25,10 +24,10 @@ namespace osu.Game.Rulesets.Mania.Replays
Actions.AddRange(actions);
}
- public void ConvertFrom(LegacyReplayFrame legacyFrame, Score score, Beatmap beatmap)
+ public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
{
// We don't need to fully convert, just create the converter
- var converter = new ManiaBeatmapConverter(beatmap.BeatmapInfo.Ruleset.Equals(score.Ruleset), beatmap);
+ var converter = new ManiaBeatmapConverter(beatmap.BeatmapInfo.RulesetID == 3, beatmap);
// NB: Via co-op mod, osu-stable can have two stages with floor(col/2) and ceil(col/2) columns. This will need special handling
// elsewhere in the game if we do choose to support the old co-op mod anyway. For now, assume that there is only one stage.
diff --git a/osu.Game.Rulesets.Osu/Replays/OsuReplayFrame.cs b/osu.Game.Rulesets.Osu/Replays/OsuReplayFrame.cs
index 4e0d22abd1..bcdfe07417 100644
--- a/osu.Game.Rulesets.Osu/Replays/OsuReplayFrame.cs
+++ b/osu.Game.Rulesets.Osu/Replays/OsuReplayFrame.cs
@@ -6,7 +6,6 @@ using osu.Game.Beatmaps;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;
-using osu.Game.Rulesets.Scoring;
using OpenTK;
namespace osu.Game.Rulesets.Osu.Replays
@@ -27,7 +26,7 @@ namespace osu.Game.Rulesets.Osu.Replays
Actions.AddRange(actions);
}
- public void ConvertFrom(LegacyReplayFrame legacyFrame, Score score, Beatmap beatmap)
+ public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
{
Position = legacyFrame.Position;
if (legacyFrame.MouseLeft) Actions.Add(OsuAction.LeftButton);
diff --git a/osu.Game.Rulesets.Taiko/Replays/TaikoReplayFrame.cs b/osu.Game.Rulesets.Taiko/Replays/TaikoReplayFrame.cs
index 335e5e1b6f..6cd63f6c70 100644
--- a/osu.Game.Rulesets.Taiko/Replays/TaikoReplayFrame.cs
+++ b/osu.Game.Rulesets.Taiko/Replays/TaikoReplayFrame.cs
@@ -6,7 +6,6 @@ using osu.Game.Beatmaps;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Replays.Legacy;
using osu.Game.Rulesets.Replays.Types;
-using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Taiko.Replays
{
@@ -24,7 +23,7 @@ namespace osu.Game.Rulesets.Taiko.Replays
Actions.AddRange(actions);
}
- public void ConvertFrom(LegacyReplayFrame legacyFrame, Score score, Beatmap beatmap)
+ public void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap)
{
if (legacyFrame.MouseRight1) Actions.Add(TaikoAction.LeftRim);
if (legacyFrame.MouseRight2) Actions.Add(TaikoAction.RightRim);
diff --git a/osu.Game/Rulesets/Replays/Types/IConvertibleReplayFrame.cs b/osu.Game/Rulesets/Replays/Types/IConvertibleReplayFrame.cs
index 16943e5c1d..ac1e5e29ec 100644
--- a/osu.Game/Rulesets/Replays/Types/IConvertibleReplayFrame.cs
+++ b/osu.Game/Rulesets/Replays/Types/IConvertibleReplayFrame.cs
@@ -3,12 +3,20 @@
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Replays.Legacy;
-using osu.Game.Rulesets.Scoring;
namespace osu.Game.Rulesets.Replays.Types
{
+ ///
+ /// A type of which can be converted from a .
+ ///
public interface IConvertibleReplayFrame
{
- void ConvertFrom(LegacyReplayFrame legacyFrame, Score score, Beatmap beatmap);
+ ///
+ /// Populates this using values from a .
+ ///
+ /// The to extract values from.
+ /// The score.
+ /// The beatmap.
+ void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap);
}
}
diff --git a/osu.Game/Rulesets/Scoring/Legacy/LegacyScoreParser.cs b/osu.Game/Rulesets/Scoring/Legacy/LegacyScoreParser.cs
index ea36b818b3..998d2aa0b7 100644
--- a/osu.Game/Rulesets/Scoring/Legacy/LegacyScoreParser.cs
+++ b/osu.Game/Rulesets/Scoring/Legacy/LegacyScoreParser.cs
@@ -24,7 +24,6 @@ namespace osu.Game.Rulesets.Scoring.Legacy
}
private Beatmap currentBeatmap;
- private Score currentScore;
private Ruleset currentRuleset;
public Score Parse(Stream stream)
@@ -33,7 +32,7 @@ namespace osu.Game.Rulesets.Scoring.Legacy
using (SerializationReader sr = new SerializationReader(stream))
{
- currentScore = score = new Score { Ruleset = rulesets.GetRuleset(sr.ReadByte()) };
+ score = new Score { Ruleset = rulesets.GetRuleset(sr.ReadByte()) };
currentRuleset = score.Ruleset.CreateInstance();
/* score.Pass = true;*/
@@ -142,7 +141,7 @@ namespace osu.Game.Rulesets.Scoring.Legacy
var convertible = currentRuleset.CreateConvertibleReplayFrame();
if (convertible == null)
throw new InvalidOperationException($"Legacy replay cannot be converted for the ruleset: {currentRuleset.Description}");
- convertible.ConvertFrom(legacyFrame, currentScore, currentBeatmap);
+ convertible.ConvertFrom(legacyFrame, currentBeatmap);
return (ReplayFrame)convertible;
}