1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 23:03:21 +08:00

Merge remote-tracking branch 'origin/master' into taiko-fixes

# Conflicts:
#	osu.Game.Rulesets.Taiko/UI/TaikoHitRenderer.cs
This commit is contained in:
smoogipooo 2017-04-18 17:12:23 +09:00
commit 579698f0a9
268 changed files with 1871 additions and 1254 deletions

@ -1 +1 @@
Subproject commit 979fb1ffdfaa08c39ff4f0cdda42e5b313d70534 Subproject commit 21a97586f7fa8d9aa65b4131824151d88a70b520

View File

@ -4,11 +4,6 @@
using NUnit.Framework; using NUnit.Framework;
using osu.Desktop.VisualTests; using osu.Desktop.VisualTests;
using osu.Framework.Desktop.Platform; using osu.Framework.Desktop.Platform;
using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Taiko;
namespace osu.Desktop.Tests namespace osu.Desktop.Tests
{ {
@ -20,11 +15,6 @@ namespace osu.Desktop.Tests
{ {
using (var host = new HeadlessGameHost()) using (var host = new HeadlessGameHost())
{ {
Ruleset.Register(new OsuRuleset());
Ruleset.Register(new TaikoRuleset());
Ruleset.Register(new ManiaRuleset());
Ruleset.Register(new CatchRuleset());
host.Run(new AutomatedVisualTestGame()); host.Run(new AutomatedVisualTestGame());
} }
} }

View File

@ -75,21 +75,21 @@
<Project>{69051C69-12AE-4E7D-A3E6-460D2E282312}</Project> <Project>{69051C69-12AE-4E7D-A3E6-460D2E282312}</Project>
<Name>osu.Desktop.VisualTests</Name> <Name>osu.Desktop.VisualTests</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj">
<Project>{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}</Project> <Project>{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}</Project>
<Name>osu.Game.Modes.Catch</Name> <Name>osu.Game.Rulesets.Catch</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj">
<Project>{48F4582B-7687-4621-9CBE-5C24197CB536}</Project> <Project>{48F4582B-7687-4621-9CBE-5C24197CB536}</Project>
<Name>osu.Game.Modes.Mania</Name> <Name>osu.Game.Rulesets.Mania</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Osu\osu.Game.Modes.Osu.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj">
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project> <Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
<Name>osu.Game.Modes.Osu</Name> <Name>osu.Game.Rulesets.Osu</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj">
<Project>{F167E17A-7DE6-4AF5-B920-A5112296C695}</Project> <Project>{F167E17A-7DE6-4AF5-B920-A5112296C695}</Project>
<Name>osu.Game.Modes.Taiko</Name> <Name>osu.Game.Rulesets.Taiko</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project> <Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>

View File

@ -4,11 +4,6 @@
using System; using System;
using osu.Framework.Desktop; using osu.Framework.Desktop;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Taiko;
namespace osu.Desktop.VisualTests namespace osu.Desktop.VisualTests
{ {
@ -21,11 +16,6 @@ namespace osu.Desktop.VisualTests
using (GameHost host = Host.GetSuitableHost(@"osu")) using (GameHost host = Host.GetSuitableHost(@"osu"))
{ {
Ruleset.Register(new OsuRuleset());
Ruleset.Register(new TaikoRuleset());
Ruleset.Register(new ManiaRuleset());
Ruleset.Register(new CatchRuleset());
if (benchmark) if (benchmark)
host.Run(new AutomatedVisualTestGame()); host.Run(new AutomatedVisualTestGame());
else else

View File

@ -9,21 +9,30 @@ using osu.Framework.Testing;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Modes.Catch.UI; using osu.Game.Rulesets.Catch.UI;
using osu.Game.Modes.Mania.UI; using osu.Game.Rulesets.Mania.UI;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.UI; using osu.Game.Rulesets.Osu.UI;
using osu.Game.Modes.Taiko.UI; using osu.Game.Rulesets.Taiko.UI;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Desktop.VisualTests.Beatmaps; using osu.Desktop.VisualTests.Beatmaps;
using osu.Framework.Allocation;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {
internal class TestCaseGamefield : TestCase internal class TestCaseGamefield : TestCase
{ {
private RulesetDatabase rulesets;
public override string Description => @"Showing hitobjects and what not."; public override string Description => @"Showing hitobjects and what not.";
[BackgroundDependencyLoader]
private void load(RulesetDatabase rulesets)
{
this.rulesets = rulesets;
}
public override void Reset() public override void Reset()
{ {
base.Reset(); base.Reset();
@ -36,7 +45,7 @@ namespace osu.Desktop.VisualTests.Tests
objects.Add(new HitCircle objects.Add(new HitCircle
{ {
StartTime = time, StartTime = time,
Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384)), Position = new Vector2(RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.X), RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.Y)),
Scale = RNG.NextSingle(0.5f, 1.0f), Scale = RNG.NextSingle(0.5f, 1.0f),
}); });
@ -49,6 +58,7 @@ namespace osu.Desktop.VisualTests.Tests
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
Difficulty = new BeatmapDifficulty(), Difficulty = new BeatmapDifficulty(),
Ruleset = rulesets.Query<RulesetInfo>().First(),
Metadata = new BeatmapMetadata Metadata = new BeatmapMetadata
{ {
Artist = @"Unknown", Artist = @"Unknown",

View File

@ -10,11 +10,11 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables;
using System.Collections.Generic; using System.Collections.Generic;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests

View File

@ -4,9 +4,9 @@
using OpenTK; using OpenTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Modes.Osu.Mods; using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Select.Leaderboards; using osu.Game.Screens.Select.Leaderboards;
using osu.Game.Users; using osu.Game.Users;

View File

@ -1,10 +1,11 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Overlays.Mods; using osu.Game.Overlays.Mods;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Modes; using osu.Game.Database;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {
@ -13,6 +14,13 @@ namespace osu.Desktop.VisualTests.Tests
public override string Description => @"Tests the mod select overlay"; public override string Description => @"Tests the mod select overlay";
private ModSelectOverlay modSelect; private ModSelectOverlay modSelect;
private RulesetDatabase rulesets;
[BackgroundDependencyLoader]
private void load(RulesetDatabase rulesets)
{
this.rulesets = rulesets;
}
public override void Reset() public override void Reset()
{ {
@ -26,10 +34,9 @@ namespace osu.Desktop.VisualTests.Tests
}); });
AddStep("Toggle", modSelect.ToggleVisibility); AddStep("Toggle", modSelect.ToggleVisibility);
AddStep("osu!", () => modSelect.PlayMode.Value = PlayMode.Osu);
AddStep("osu!taiko", () => modSelect.PlayMode.Value = PlayMode.Taiko); foreach (var ruleset in rulesets.AllRulesets)
AddStep("osu!catch", () => modSelect.PlayMode.Value = PlayMode.Catch); AddStep(ruleset.CreateInstance().Description, () => modSelect.Ruleset.Value = ruleset);
AddStep("osu!mania", () => modSelect.PlayMode.Value = PlayMode.Mania);
} }
} }
} }

View File

@ -6,7 +6,6 @@ using osu.Desktop.VisualTests.Platform;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Modes;
using osu.Game.Screens.Select; using osu.Game.Screens.Select;
using osu.Game.Screens.Select.Filter; using osu.Game.Screens.Select.Filter;
@ -20,13 +19,19 @@ namespace osu.Desktop.VisualTests.Tests
public override string Description => @"with fake data"; public override string Description => @"with fake data";
private RulesetDatabase rulesets;
public override void Reset() public override void Reset()
{ {
base.Reset(); base.Reset();
if (db == null) if (db == null)
{ {
storage = new TestStorage(@"TestCasePlaySongSelect"); storage = new TestStorage(@"TestCasePlaySongSelect");
db = new BeatmapDatabase(storage);
var backingDatabase = storage.GetDatabase(@"client");
rulesets = new RulesetDatabase(storage, backingDatabase);
db = new BeatmapDatabase(storage, backingDatabase, rulesets);
var sets = new List<BeatmapSetInfo>(); var sets = new List<BeatmapSetInfo>();
@ -72,7 +77,7 @@ namespace osu.Desktop.VisualTests.Tests
new BeatmapInfo new BeatmapInfo
{ {
OnlineBeatmapID = 1234 + i, OnlineBeatmapID = 1234 + i,
Mode = PlayMode.Osu, Ruleset = rulesets.Query<RulesetInfo>().First(),
Path = "normal.osu", Path = "normal.osu",
Version = "Normal", Version = "Normal",
Difficulty = new BeatmapDifficulty Difficulty = new BeatmapDifficulty
@ -83,7 +88,7 @@ namespace osu.Desktop.VisualTests.Tests
new BeatmapInfo new BeatmapInfo
{ {
OnlineBeatmapID = 1235 + i, OnlineBeatmapID = 1235 + i,
Mode = PlayMode.Osu, Ruleset = rulesets.Query<RulesetInfo>().First(),
Path = "hard.osu", Path = "hard.osu",
Version = "Hard", Version = "Hard",
Difficulty = new BeatmapDifficulty Difficulty = new BeatmapDifficulty
@ -94,7 +99,7 @@ namespace osu.Desktop.VisualTests.Tests
new BeatmapInfo new BeatmapInfo
{ {
OnlineBeatmapID = 1236 + i, OnlineBeatmapID = 1236 + i,
Mode = PlayMode.Osu, Ruleset = rulesets.Query<RulesetInfo>().First(),
Path = "insane.osu", Path = "insane.osu",
Version = "Insane", Version = "Insane",
Difficulty = new BeatmapDifficulty Difficulty = new BeatmapDifficulty

View File

@ -9,12 +9,12 @@ using osu.Game.Beatmaps;
using OpenTK; using OpenTK;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Modes; using osu.Game.Rulesets.Objects;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Desktop.VisualTests.Beatmaps; using osu.Desktop.VisualTests.Beatmaps;
using osu.Game.Rulesets.Osu.UI;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {
@ -22,12 +22,14 @@ namespace osu.Desktop.VisualTests.Tests
{ {
protected Player Player; protected Player Player;
private BeatmapDatabase db; private BeatmapDatabase db;
private RulesetDatabase rulesets;
public override string Description => @"Showing everything to play the game."; public override string Description => @"Showing everything to play the game.";
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(BeatmapDatabase db) private void load(BeatmapDatabase db, RulesetDatabase rulesets)
{ {
this.rulesets = rulesets;
this.db = db; this.db = db;
} }
@ -37,7 +39,7 @@ namespace osu.Desktop.VisualTests.Tests
WorkingBeatmap beatmap = null; WorkingBeatmap beatmap = null;
var beatmapInfo = db.Query<BeatmapInfo>().FirstOrDefault(b => b.Mode == PlayMode.Osu); var beatmapInfo = db.Query<BeatmapInfo>().FirstOrDefault(b => b.RulesetID == 0);
if (beatmapInfo != null) if (beatmapInfo != null)
beatmap = db.GetWorkingBeatmap(beatmapInfo); beatmap = db.GetWorkingBeatmap(beatmapInfo);
@ -51,8 +53,8 @@ namespace osu.Desktop.VisualTests.Tests
objects.Add(new HitCircle objects.Add(new HitCircle
{ {
StartTime = time, StartTime = time,
Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : 512, Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : OsuPlayfield.BASE_SIZE.X,
i % 4 < 2 ? 0 : 384), i % 4 < 2 ? 0 : OsuPlayfield.BASE_SIZE.Y),
NewCombo = i % 4 == 0 NewCombo = i % 4 == 0
}); });
@ -65,6 +67,7 @@ namespace osu.Desktop.VisualTests.Tests
BeatmapInfo = new BeatmapInfo BeatmapInfo = new BeatmapInfo
{ {
Difficulty = new BeatmapDifficulty(), Difficulty = new BeatmapDifficulty(),
Ruleset = rulesets.Query<RulesetInfo>().First(),
Metadata = new BeatmapMetadata Metadata = new BeatmapMetadata
{ {
Artist = @"Unknown", Artist = @"Unknown",

View File

@ -2,8 +2,8 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Modes.Osu.Mods; using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests

View File

@ -6,7 +6,7 @@ using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Game.Modes.Taiko.Objects.Drawables.Pieces; using osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {

View File

@ -7,11 +7,11 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Framework.Testing; using osu.Framework.Testing;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Taiko.Judgements; using osu.Game.Rulesets.Taiko.Judgements;
using osu.Game.Modes.Taiko.Objects; using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Modes.Taiko.Objects.Drawables; using osu.Game.Rulesets.Taiko.Objects.Drawables;
using osu.Game.Modes.Taiko.UI; using osu.Game.Rulesets.Taiko.UI;
using System; using System;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests

View File

@ -161,21 +161,21 @@
<Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project> <Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project>
<Name>osu.Game.Resources</Name> <Name>osu.Game.Resources</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Osu\osu.Game.Modes.Osu.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj">
<Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project> <Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project>
<Name>osu.Game.Modes.Osu</Name> <Name>osu.Game.Rulesets.Osu</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj">
<Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project> <Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project>
<Name>osu.Game.Modes.Catch</Name> <Name>osu.Game.Rulesets.Catch</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj">
<Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project> <Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project>
<Name>osu.Game.Modes.Mania</Name> <Name>osu.Game.Rulesets.Mania</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj">
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project> <Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Modes.Taiko</Name> <Name>osu.Game.Rulesets.Taiko</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project> <Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>

View File

@ -7,11 +7,6 @@ using osu.Desktop.Beatmaps.IO;
using osu.Framework.Desktop; using osu.Framework.Desktop;
using osu.Framework.Desktop.Platform; using osu.Framework.Desktop.Platform;
using osu.Game.IPC; using osu.Game.IPC;
using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Taiko;
namespace osu.Desktop namespace osu.Desktop
{ {
@ -41,11 +36,6 @@ namespace osu.Desktop
} }
else else
{ {
Ruleset.Register(new OsuRuleset());
Ruleset.Register(new TaikoRuleset());
Ruleset.Register(new ManiaRuleset());
Ruleset.Register(new CatchRuleset());
host.Run(new OsuGameDesktop(args)); host.Run(new OsuGameDesktop(args));
} }
return 0; return 0;

View File

@ -198,21 +198,21 @@
<Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project> <Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project>
<Name>osu.Game.Resources</Name> <Name>osu.Game.Resources</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Osu\osu.Game.Modes.Osu.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj">
<Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project> <Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project>
<Name>osu.Game.Modes.Osu</Name> <Name>osu.Game.Rulesets.Osu</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj">
<Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project> <Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project>
<Name>osu.Game.Modes.Catch</Name> <Name>osu.Game.Rulesets.Catch</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj">
<Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project> <Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project>
<Name>osu.Game.Modes.Mania</Name> <Name>osu.Game.Rulesets.Mania</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj">
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project> <Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Modes.Taiko</Name> <Name>osu.Game.Rulesets.Taiko</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project> <Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>

View File

@ -1,20 +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 osu.Game.Beatmaps;
using osu.Game.Modes.Catch.Objects;
using System.Collections.Generic;
namespace osu.Game.Modes.Catch.Beatmaps
{
internal class CatchBeatmapConverter : IBeatmapConverter<CatchBaseHit>
{
public Beatmap<CatchBaseHit> Convert(Beatmap original)
{
return new Beatmap<CatchBaseHit>(original)
{
HitObjects = new List<CatchBaseHit>() // Todo: Convert HitObjects
};
}
}
}

View File

@ -1,19 +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 osu.Game.Beatmaps;
using osu.Game.Modes.Catch.Objects;
namespace osu.Game.Modes.Catch.Beatmaps
{
internal class CatchBeatmapProcessor : IBeatmapProcessor<CatchBaseHit>
{
public void SetDefaults(CatchBaseHit hitObject, Beatmap<CatchBaseHit> beatmap)
{
}
public void PostProcess(Beatmap<CatchBaseHit> beatmap)
{
}
}
}

View File

@ -1,20 +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 osu.Game.Beatmaps;
using osu.Game.Modes.Mania.Objects;
using System.Collections.Generic;
namespace osu.Game.Modes.Mania.Beatmaps
{
internal class ManiaBeatmapConverter : IBeatmapConverter<ManiaBaseHit>
{
public Beatmap<ManiaBaseHit> Convert(Beatmap original)
{
return new Beatmap<ManiaBaseHit>(original)
{
HitObjects = new List<ManiaBaseHit>() // Todo: Implement
};
}
}
}

View File

@ -1,19 +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 osu.Game.Beatmaps;
using osu.Game.Modes.Mania.Objects;
namespace osu.Game.Modes.Mania.Beatmaps
{
internal class ManiaBeatmapProcessor : IBeatmapProcessor<ManiaBaseHit>
{
public void SetDefaults(ManiaBaseHit hitObject, Beatmap<ManiaBaseHit> beatmap)
{
}
public void PostProcess(Beatmap<ManiaBaseHit> beatmap)
{
}
}
}

View File

@ -1,32 +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 osu.Game.Beatmaps;
using osu.Game.Modes.Osu.Objects;
namespace osu.Game.Modes.Osu.Beatmaps
{
internal class OsuBeatmapProcessor : IBeatmapProcessor<OsuHitObject>
{
public void PostProcess(Beatmap<OsuHitObject> beatmap)
{
if (beatmap.ComboColors.Count == 0)
return;
int comboIndex = 0;
int colourIndex = 0;
foreach (var obj in beatmap.HitObjects)
{
if (obj.NewCombo)
{
comboIndex = 0;
colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count;
}
obj.ComboIndex = comboIndex++;
obj.ComboColour = beatmap.ComboColors[colourIndex];
}
}
}
}

View File

@ -1,19 +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 osu.Game.Beatmaps;
using osu.Game.Modes.Taiko.Objects;
namespace osu.Game.Modes.Taiko.Beatmaps
{
internal class TaikoBeatmapProcessor : IBeatmapProcessor<TaikoHitObject>
{
public void SetDefaults(TaikoHitObject hitObject, Beatmap<TaikoHitObject> beatmap)
{
}
public void PostProcess(Beatmap<TaikoHitObject> beatmap)
{
}
}
}

View File

@ -0,0 +1,23 @@
// 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.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Beatmaps;
using osu.Game.Rulesets.Objects;
namespace osu.Game.Rulesets.Catch.Beatmaps
{
internal class CatchBeatmapConverter : BeatmapConverter<CatchBaseHit>
{
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasXPosition) };
protected override IEnumerable<CatchBaseHit> ConvertHitObject(HitObject original, Beatmap beatmap)
{
yield return null;
}
}
}

View File

@ -2,11 +2,12 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Catch.Beatmaps; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Catch.Objects; using osu.Game.Rulesets.Catch.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic; using System.Collections.Generic;
namespace osu.Game.Modes.Catch namespace osu.Game.Rulesets.Catch
{ {
public class CatchDifficultyCalculator : DifficultyCalculator<CatchBaseHit> public class CatchDifficultyCalculator : DifficultyCalculator<CatchBaseHit>
{ {
@ -19,6 +20,6 @@ namespace osu.Game.Modes.Catch
return 0; return 0;
} }
protected override IBeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter(); protected override BeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter();
} }
} }

View File

@ -4,16 +4,16 @@
using OpenTK.Input; using OpenTK.Input;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Modes.Catch.Mods; using osu.Game.Rulesets.Catch.Mods;
using osu.Game.Modes.Catch.UI; using osu.Game.Rulesets.Catch.UI;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.Modes.Catch.Scoring; using osu.Game.Rulesets.Catch.Scoring;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
namespace osu.Game.Modes.Catch namespace osu.Game.Rulesets.Catch
{ {
public class CatchRuleset : Ruleset public class CatchRuleset : Ruleset
{ {
@ -76,8 +76,6 @@ namespace osu.Game.Modes.Catch
} }
} }
protected override PlayMode PlayMode => PlayMode.Catch;
public override string Description => "osu!catch"; public override string Description => "osu!catch";
public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o; public override FontAwesome Icon => FontAwesome.fa_osu_fruits_o;
@ -92,5 +90,7 @@ namespace osu.Game.Modes.Catch
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new CatchDifficultyCalculator(beatmap); public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new CatchDifficultyCalculator(beatmap);
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(); public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor();
public override int LegacyID => 2;
} }
} }

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Judgements; using osu.Game.Rulesets.Judgements;
namespace osu.Game.Modes.Catch.Judgements namespace osu.Game.Rulesets.Catch.Judgements
{ {
public class CatchJudgement : Judgement public class CatchJudgement : Judgement
{ {

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
namespace osu.Game.Modes.Catch.Mods namespace osu.Game.Rulesets.Catch.Mods
{ {
public class CatchModNoFail : ModNoFail public class CatchModNoFail : ModNoFail
{ {

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
namespace osu.Game.Modes.Catch.Objects namespace osu.Game.Rulesets.Catch.Objects
{ {
public abstract class CatchBaseHit : HitObject public abstract class CatchBaseHit : HitObject
{ {

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transforms; using osu.Framework.Graphics.Transforms;
using OpenTK; using OpenTK;
namespace osu.Game.Modes.Catch.Objects.Drawable namespace osu.Game.Rulesets.Catch.Objects.Drawable
{ {
internal class DrawableFruit : Sprite internal class DrawableFruit : Sprite
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Catch.Objects namespace osu.Game.Rulesets.Catch.Objects
{ {
public class Droplet : CatchBaseHit public class Droplet : CatchBaseHit
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Catch.Objects namespace osu.Game.Rulesets.Catch.Objects
{ {
public class Fruit : CatchBaseHit public class Fruit : CatchBaseHit
{ {

View File

@ -7,11 +7,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Catch")] [assembly: AssemblyTitle("osu.Game.Rulesets.Catch")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu.Game.Modes.Catch")] [assembly: AssemblyProduct("osu.Game.Rulesets.Catch")]
[assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -1,12 +1,12 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Catch.Judgements; using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Modes.Catch.Objects; using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
namespace osu.Game.Modes.Catch.Scoring namespace osu.Game.Rulesets.Catch.Scoring
{ {
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgement> internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgement>
{ {

View File

@ -2,15 +2,16 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Catch.Beatmaps; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Catch.Judgements; using osu.Game.Rulesets.Catch.Beatmaps;
using osu.Game.Modes.Catch.Objects; using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Modes.Catch.Scoring; using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Catch.Scoring;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.UI; using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
namespace osu.Game.Modes.Catch.UI namespace osu.Game.Rulesets.Catch.UI
{ {
public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgement> public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgement>
{ {
@ -21,9 +22,7 @@ namespace osu.Game.Modes.Catch.UI
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this); public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this);
protected override IBeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter(); protected override BeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter();
protected override IBeatmapProcessor<CatchBaseHit> CreateBeatmapProcessor() => new CatchBeatmapProcessor();
protected override Playfield<CatchBaseHit, CatchJudgement> CreatePlayfield() => new CatchPlayfield(); protected override Playfield<CatchBaseHit, CatchJudgement> CreatePlayfield() => new CatchPlayfield();

View File

@ -3,12 +3,12 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.Catch.Objects; using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
using OpenTK; using OpenTK;
using osu.Game.Modes.Catch.Judgements; using osu.Game.Rulesets.Catch.Judgements;
namespace osu.Game.Modes.Catch.UI namespace osu.Game.Rulesets.Catch.UI
{ {
public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgement> public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgement>
{ {

View File

@ -7,8 +7,8 @@
<ProjectGuid>{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}</ProjectGuid> <ProjectGuid>{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Catch</RootNamespace> <RootNamespace>osu.Game.Rulesets.Catch</RootNamespace>
<AssemblyName>osu.Game.Modes.Catch</AssemblyName> <AssemblyName>osu.Game.Rulesets.Catch</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
@ -48,7 +48,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Beatmaps\CatchBeatmapConverter.cs" /> <Compile Include="Beatmaps\CatchBeatmapConverter.cs" />
<Compile Include="Beatmaps\CatchBeatmapProcessor.cs" />
<Compile Include="CatchDifficultyCalculator.cs" /> <Compile Include="CatchDifficultyCalculator.cs" />
<Compile Include="Scoring\CatchScoreProcessor.cs" /> <Compile Include="Scoring\CatchScoreProcessor.cs" />
<Compile Include="Judgements\CatchJudgement.cs" /> <Compile Include="Judgements\CatchJudgement.cs" />
@ -74,9 +73,9 @@
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project> <Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
<Name>osu.Framework</Name> <Name>osu.Framework</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Osu\osu.Game.Modes.Osu.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj">
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project> <Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
<Name>osu.Game.Modes.Osu</Name> <Name>osu.Game.Rulesets.Osu</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project> <Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>

View File

@ -0,0 +1,23 @@
// 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.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
using System.Collections.Generic;
using System;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Beatmaps;
using osu.Game.Rulesets.Objects;
namespace osu.Game.Rulesets.Mania.Beatmaps
{
internal class ManiaBeatmapConverter : BeatmapConverter<ManiaBaseHit>
{
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasXPosition) };
protected override IEnumerable<ManiaBaseHit> ConvertHitObject(HitObject original, Beatmap beatmap)
{
yield return null;
}
}
}

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Judgements; using osu.Game.Rulesets.Judgements;
namespace osu.Game.Modes.Mania.Judgements namespace osu.Game.Rulesets.Mania.Judgements
{ {
public class ManiaJudgement : Judgement public class ManiaJudgement : Judgement
{ {

View File

@ -2,11 +2,12 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Mania.Beatmaps; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Mania.Objects; using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
using System.Collections.Generic; using System.Collections.Generic;
namespace osu.Game.Modes.Mania namespace osu.Game.Rulesets.Mania
{ {
public class ManiaDifficultyCalculator : DifficultyCalculator<ManiaBaseHit> public class ManiaDifficultyCalculator : DifficultyCalculator<ManiaBaseHit>
{ {
@ -20,6 +21,6 @@ namespace osu.Game.Modes.Mania
return 0; return 0;
} }
protected override IBeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter(); protected override BeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter();
} }
} }

View File

@ -3,16 +3,16 @@
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Modes.Mania.Mods; using osu.Game.Rulesets.Mania.Mods;
using osu.Game.Modes.Mania.UI; using osu.Game.Rulesets.Mania.UI;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.Modes.Mania.Scoring; using osu.Game.Rulesets.Mania.Scoring;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
namespace osu.Game.Modes.Mania namespace osu.Game.Rulesets.Mania
{ {
public class ManiaRuleset : Ruleset public class ManiaRuleset : Ruleset
{ {
@ -96,8 +96,6 @@ namespace osu.Game.Modes.Mania
} }
} }
protected override PlayMode PlayMode => PlayMode.Mania;
public override string Description => "osu!mania"; public override string Description => "osu!mania";
public override FontAwesome Icon => FontAwesome.fa_osu_mania_o; public override FontAwesome Icon => FontAwesome.fa_osu_mania_o;
@ -107,5 +105,7 @@ namespace osu.Game.Modes.Mania
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new ManiaDifficultyCalculator(beatmap); public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new ManiaDifficultyCalculator(beatmap);
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor(); public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor();
public override int LegacyID => 3;
} }
} }

View File

@ -2,10 +2,10 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using System; using System;
namespace osu.Game.Modes.Mania.Mods namespace osu.Game.Rulesets.Mania.Mods
{ {
public class ManiaModNoFail : ModNoFail public class ManiaModNoFail : ModNoFail
{ {

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Transforms;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using OpenTK; using OpenTK;
namespace osu.Game.Modes.Mania.Objects.Drawable namespace osu.Game.Rulesets.Mania.Objects.Drawable
{ {
public class DrawableNote : Sprite public class DrawableNote : Sprite
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Mania.Objects namespace osu.Game.Rulesets.Mania.Objects
{ {
public class HoldNote : Note public class HoldNote : Note
{ {

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
namespace osu.Game.Modes.Mania.Objects namespace osu.Game.Rulesets.Mania.Objects
{ {
public abstract class ManiaBaseHit : HitObject public abstract class ManiaBaseHit : HitObject
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Mania.Objects namespace osu.Game.Rulesets.Mania.Objects
{ {
public class Note : ManiaBaseHit public class Note : ManiaBaseHit
{ {

View File

@ -7,11 +7,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Mania")] [assembly: AssemblyTitle("osu.Game.Rulesets.Mania")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu.Game.Modes.Mania")] [assembly: AssemblyProduct("osu.Game.Rulesets.Mania")]
[assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -1,12 +1,12 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Mania.Judgements; using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Modes.Mania.Objects; using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
namespace osu.Game.Modes.Mania.Scoring namespace osu.Game.Rulesets.Mania.Scoring
{ {
internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgement> internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgement>
{ {

View File

@ -2,15 +2,16 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Mania.Beatmaps; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Mania.Judgements; using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Modes.Mania.Objects; using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Modes.Mania.Scoring; using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Mania.Scoring;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.UI; using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
namespace osu.Game.Modes.Mania.UI namespace osu.Game.Rulesets.Mania.UI
{ {
public class ManiaHitRenderer : HitRenderer<ManiaBaseHit, ManiaJudgement> public class ManiaHitRenderer : HitRenderer<ManiaBaseHit, ManiaJudgement>
{ {
@ -24,9 +25,7 @@ namespace osu.Game.Modes.Mania.UI
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor(this); public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor(this);
protected override IBeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter(); protected override BeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter();
protected override IBeatmapProcessor<ManiaBaseHit> CreateBeatmapProcessor() => new ManiaBeatmapProcessor();
protected override Playfield<ManiaBaseHit, ManiaJudgement> CreatePlayfield() => new ManiaPlayfield(columns); protected override Playfield<ManiaBaseHit, ManiaJudgement> CreatePlayfield() => new ManiaPlayfield(columns);

View File

@ -3,13 +3,13 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.Mania.Objects; using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Modes.Mania.Judgements; using osu.Game.Rulesets.Mania.Judgements;
namespace osu.Game.Modes.Mania.UI namespace osu.Game.Rulesets.Mania.UI
{ {
public class ManiaPlayfield : Playfield<ManiaBaseHit, ManiaJudgement> public class ManiaPlayfield : Playfield<ManiaBaseHit, ManiaJudgement>
{ {

View File

@ -7,8 +7,8 @@
<ProjectGuid>{48F4582B-7687-4621-9CBE-5C24197CB536}</ProjectGuid> <ProjectGuid>{48F4582B-7687-4621-9CBE-5C24197CB536}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Mania</RootNamespace> <RootNamespace>osu.Game.Rulesets.Mania</RootNamespace>
<AssemblyName>osu.Game.Modes.Mania</AssemblyName> <AssemblyName>osu.Game.Rulesets.Mania</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
@ -48,7 +48,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Beatmaps\ManiaBeatmapConverter.cs" /> <Compile Include="Beatmaps\ManiaBeatmapConverter.cs" />
<Compile Include="Beatmaps\ManiaBeatmapProcessor.cs" />
<Compile Include="Judgements\ManiaJudgement.cs" /> <Compile Include="Judgements\ManiaJudgement.cs" />
<Compile Include="ManiaDifficultyCalculator.cs" /> <Compile Include="ManiaDifficultyCalculator.cs" />
<Compile Include="Scoring\ManiaScoreProcessor.cs" /> <Compile Include="Scoring\ManiaScoreProcessor.cs" />
@ -67,13 +66,13 @@
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project> <Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
<Name>osu.Framework</Name> <Name>osu.Framework</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Osu\osu.Game.Modes.Osu.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj">
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project> <Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
<Name>osu.Game.Modes.Osu</Name> <Name>osu.Game.Rulesets.Osu</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj"> <ProjectReference Include="..\osu.Game.Rulesets.Taiko\osu.Game.Rulesets.Taiko.csproj">
<Project>{F167E17A-7DE6-4AF5-B920-A5112296C695}</Project> <Project>{F167E17A-7DE6-4AF5-B920-A5112296C695}</Project>
<Name>osu.Game.Modes.Taiko</Name> <Name>osu.Game.Rulesets.Taiko</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project> <Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>

View File

@ -0,0 +1,61 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Objects;
using System.Collections.Generic;
using osu.Game.Rulesets.Objects.Types;
using System;
using osu.Game.Rulesets.Osu.UI;
using osu.Game.Rulesets.Beatmaps;
namespace osu.Game.Rulesets.Osu.Beatmaps
{
internal class OsuBeatmapConverter : BeatmapConverter<OsuHitObject>
{
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasPosition) };
protected override IEnumerable<OsuHitObject> ConvertHitObject(HitObject original, Beatmap beatmap)
{
IHasCurve curveData = original as IHasCurve;
IHasEndTime endTimeData = original as IHasEndTime;
IHasPosition positionData = original as IHasPosition;
IHasCombo comboData = original as IHasCombo;
if (curveData != null)
{
yield return new Slider
{
StartTime = original.StartTime,
Samples = original.Samples,
CurveObject = curveData,
Position = positionData?.Position ?? Vector2.Zero,
NewCombo = comboData?.NewCombo ?? false
};
}
else if (endTimeData != null)
{
yield return new Spinner
{
StartTime = original.StartTime,
Samples = original.Samples,
EndTime = endTimeData.EndTime,
Position = positionData?.Position ?? OsuPlayfield.BASE_SIZE / 2,
};
}
else
{
yield return new HitCircle
{
StartTime = original.StartTime,
Samples = original.Samples,
Position = positionData?.Position ?? Vector2.Zero,
NewCombo = comboData?.NewCombo ?? false
};
}
}
}
}

View File

@ -3,96 +3,58 @@
using OpenTK; using OpenTK;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Objects.Types;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects;
using System.Collections.Generic; using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Modes.Objects.Types;
using System.Linq;
namespace osu.Game.Modes.Osu.Beatmaps namespace osu.Game.Rulesets.Osu.Beatmaps
{ {
internal class OsuBeatmapConverter : IBeatmapConverter<OsuHitObject> internal class OsuBeatmapProcessor : BeatmapProcessor<OsuHitObject>
{ {
public Beatmap<OsuHitObject> Convert(Beatmap original) public override void PostProcess(Beatmap<OsuHitObject> beatmap)
{ {
return new Beatmap<OsuHitObject>(original) applyStacking(beatmap);
if (beatmap.ComboColors.Count == 0)
return;
int comboIndex = 0;
int colourIndex = 0;
foreach (var obj in beatmap.HitObjects)
{ {
HitObjects = convertHitObjects(original.HitObjects, original.BeatmapInfo?.StackLeniency ?? 0.7f) if (obj.NewCombo)
}; {
comboIndex = 0;
colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count;
} }
private List<OsuHitObject> convertHitObjects(List<HitObject> hitObjects, float stackLeniency) obj.ComboIndex = comboIndex++;
{ obj.ComboColour = beatmap.ComboColors[colourIndex];
List<OsuHitObject> converted = hitObjects.Select(convertHitObject).ToList(); }
updateStacking(converted, stackLeniency);
return converted;
} }
private OsuHitObject convertHitObject(HitObject original) private void applyStacking(Beatmap<OsuHitObject> beatmap)
{ {
IHasCurve curveData = original as IHasCurve;
IHasEndTime endTimeData = original as IHasEndTime;
IHasPosition positionData = original as IHasPosition;
IHasCombo comboData = original as IHasCombo;
if (curveData != null)
{
return new Slider
{
StartTime = original.StartTime,
Samples = original.Samples,
CurveObject = curveData,
Position = positionData?.Position ?? Vector2.Zero,
NewCombo = comboData?.NewCombo ?? false
};
}
if (endTimeData != null)
{
return new Spinner
{
StartTime = original.StartTime,
Samples = original.Samples,
Position = new Vector2(512, 384) / 2,
EndTime = endTimeData.EndTime
};
}
return new HitCircle
{
StartTime = original.StartTime,
Samples = original.Samples,
Position = positionData?.Position ?? Vector2.Zero,
NewCombo = comboData?.NewCombo ?? false
};
}
private void updateStacking(List<OsuHitObject> hitObjects, float stackLeniency, int startIndex = 0, int endIndex = -1)
{
if (endIndex == -1)
endIndex = hitObjects.Count - 1;
const int stack_distance = 3; const int stack_distance = 3;
float stackThreshold = DrawableOsuHitObject.TIME_PREEMPT * stackLeniency; float stackThreshold = DrawableOsuHitObject.TIME_PREEMPT * beatmap.BeatmapInfo?.StackLeniency ?? 0.7f;
// Reset stacking inside the update range // Reset stacking
for (int i = startIndex; i <= endIndex; i++) for (int i = 0; i <= beatmap.HitObjects.Count - 1; i++)
hitObjects[i].StackHeight = 0; beatmap.HitObjects[i].StackHeight = 0;
// Extend the end index to include objects they are stacked on // Extend the end index to include objects they are stacked on
int extendedEndIndex = endIndex; int extendedEndIndex = beatmap.HitObjects.Count - 1;
for (int i = endIndex; i >= startIndex; i--) for (int i = beatmap.HitObjects.Count - 1; i >= 0; i--)
{ {
int stackBaseIndex = i; int stackBaseIndex = i;
for (int n = stackBaseIndex + 1; n < hitObjects.Count; n++) for (int n = stackBaseIndex + 1; n < beatmap.HitObjects.Count; n++)
{ {
OsuHitObject stackBaseObject = hitObjects[stackBaseIndex]; OsuHitObject stackBaseObject = beatmap.HitObjects[stackBaseIndex];
if (stackBaseObject is Spinner) break; if (stackBaseObject is Spinner) break;
OsuHitObject objectN = hitObjects[n]; OsuHitObject objectN = beatmap.HitObjects[n];
if (objectN is Spinner) if (objectN is Spinner)
continue; continue;
@ -115,14 +77,14 @@ namespace osu.Game.Modes.Osu.Beatmaps
if (stackBaseIndex > extendedEndIndex) if (stackBaseIndex > extendedEndIndex)
{ {
extendedEndIndex = stackBaseIndex; extendedEndIndex = stackBaseIndex;
if (extendedEndIndex == hitObjects.Count - 1) if (extendedEndIndex == beatmap.HitObjects.Count - 1)
break; break;
} }
} }
//Reverse pass for stack calculation. //Reverse pass for stack calculation.
int extendedStartIndex = startIndex; int extendedStartIndex = 0;
for (int i = extendedEndIndex; i > startIndex; i--) for (int i = extendedEndIndex; i > 0; i--)
{ {
int n = i; int n = i;
/* We should check every note which has not yet got a stack. /* We should check every note which has not yet got a stack.
@ -136,7 +98,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
* 2 and 1 will be ignored in the i loop because they already have a stack value. * 2 and 1 will be ignored in the i loop because they already have a stack value.
*/ */
OsuHitObject objectI = hitObjects[i]; OsuHitObject objectI = beatmap.HitObjects[i];
if (objectI.StackHeight != 0 || objectI is Spinner) continue; if (objectI.StackHeight != 0 || objectI is Spinner) continue;
/* If this object is a hitcircle, then we enter this "special" case. /* If this object is a hitcircle, then we enter this "special" case.
@ -147,7 +109,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
{ {
while (--n >= 0) while (--n >= 0)
{ {
OsuHitObject objectN = hitObjects[n]; OsuHitObject objectN = beatmap.HitObjects[n];
if (objectN is Spinner) continue; if (objectN is Spinner) continue;
double endTime = (objectN as IHasEndTime)?.EndTime ?? objectN.StartTime; double endTime = (objectN as IHasEndTime)?.EndTime ?? objectN.StartTime;
@ -174,7 +136,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
for (int j = n + 1; j <= i; j++) for (int j = n + 1; j <= i; j++)
{ {
//For each object which was declared under this slider, we will offset it to appear *below* the slider end (rather than above). //For each object which was declared under this slider, we will offset it to appear *below* the slider end (rather than above).
OsuHitObject objectJ = hitObjects[j]; OsuHitObject objectJ = beatmap.HitObjects[j];
if (Vector2.Distance(objectN.EndPosition, objectJ.Position) < stack_distance) if (Vector2.Distance(objectN.EndPosition, objectJ.Position) < stack_distance)
objectJ.StackHeight -= offset; objectJ.StackHeight -= offset;
} }
@ -199,9 +161,9 @@ namespace osu.Game.Modes.Osu.Beatmaps
/* We have hit the first slider in a possible stack. /* We have hit the first slider in a possible stack.
* From this point on, we ALWAYS stack positive regardless. * From this point on, we ALWAYS stack positive regardless.
*/ */
while (--n >= startIndex) while (--n >= 0)
{ {
OsuHitObject objectN = hitObjects[n]; OsuHitObject objectN = beatmap.HitObjects[n];
if (objectN is Spinner) continue; if (objectN is Spinner) continue;
if (objectI.StartTime - objectN.StartTime > stackThreshold) if (objectI.StartTime - objectN.StartTime > stackThreshold)

View File

@ -2,11 +2,11 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK; using OpenTK;
using osu.Game.Modes.Judgements; using osu.Game.Rulesets.Judgements;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Framework.Extensions; using osu.Framework.Extensions;
namespace osu.Game.Modes.Osu.Judgements namespace osu.Game.Rulesets.Osu.Judgements
{ {
public class OsuJudgement : Judgement public class OsuJudgement : Judgement
{ {

View File

@ -3,13 +3,13 @@
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using System; using System;
using System.Linq; using System.Linq;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
namespace osu.Game.Modes.Osu.Mods namespace osu.Game.Rulesets.Osu.Mods
{ {
public class OsuModNoFail : ModNoFail public class OsuModNoFail : ModNoFail
{ {

View File

@ -2,10 +2,10 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
using System.Collections.Generic; using System.Collections.Generic;
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
{ {
/// <summary> /// <summary>
/// Connects hit objects visually, for example with follow points. /// Connects hit objects visually, for example with follow points.

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
{ {
public class FollowPoint : Container public class FollowPoint : Container
{ {

View File

@ -4,9 +4,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using OpenTK; using OpenTK;
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
{ {
public class FollowPointRenderer : ConnectionRenderer<OsuHitObject> public class FollowPointRenderer : ConnectionRenderer<OsuHitObject>
{ {

View File

@ -3,12 +3,12 @@
using System; using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Pieces; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
using OpenTK; using OpenTK;
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
{ {

View File

@ -2,10 +2,10 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.ComponentModel; using System.ComponentModel;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject, OsuJudgement> public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject, OsuJudgement>
{ {

View File

@ -2,12 +2,12 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
using OpenTK; using OpenTK;
using osu.Game.Modes.Judgements; using osu.Game.Rulesets.Judgements;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
public class DrawableOsuJudgement : DrawableJudgement<OsuJudgement> public class DrawableOsuJudgement : DrawableJudgement<OsuJudgement>
{ {

View File

@ -3,13 +3,13 @@
using OpenTK; using OpenTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Pieces; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
{ {

View File

@ -4,12 +4,12 @@
using System; using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
public class DrawableSliderTick : DrawableOsuHitObject public class DrawableSliderTick : DrawableOsuHitObject
{ {

View File

@ -5,12 +5,13 @@ using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Pieces; using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Rulesets.Osu.UI;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
public class DrawableSpinner : DrawableOsuHitObject public class DrawableSpinner : DrawableOsuHitObject
{ {
@ -29,7 +30,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
Position = s.Position; Position = s.Position;
//take up full playfield. //take up full playfield.
Size = new Vector2(512); Size = OsuPlayfield.BASE_SIZE;
spinner = s; spinner = s;

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class ApproachCircle : Container public class ApproachCircle : Container
{ {

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Input; using osu.Framework.Input;
using OpenTK; using OpenTK;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class CirclePiece : Container public class CirclePiece : Container
{ {

View File

@ -5,7 +5,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using OpenTK; using OpenTK;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class ExplodePiece : Container public class ExplodePiece : Container
{ {

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using OpenTK; using OpenTK;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class FlashPiece : Container public class FlashPiece : Container
{ {

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class GlowPiece : Container public class GlowPiece : Container
{ {

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class NumberPiece : Container public class NumberPiece : Container
{ {

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class RingPiece : Container public class RingPiece : Container
{ {

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Framework.Input; using osu.Framework.Input;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class SliderBall : CircularContainer, ISliderProgress public class SliderBall : CircularContainer, ISliderProgress
{ {

View File

@ -15,7 +15,7 @@ using OpenTK;
using OpenTK.Graphics.ES30; using OpenTK.Graphics.ES30;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class SliderBody : Container, ISliderProgress public class SliderBody : Container, ISliderProgress
{ {

View File

@ -5,7 +5,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Graphics; using osu.Game.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class SliderBouncer : Container, ISliderProgress public class SliderBouncer : Container, ISliderProgress
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class SpinnerBackground : SpinnerDisc public class SpinnerBackground : SpinnerDisc
{ {

View File

@ -15,7 +15,7 @@ using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class SpinnerDisc : CircularContainer public class SpinnerDisc : CircularContainer
{ {

View File

@ -3,7 +3,7 @@
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class TrianglesPiece : Triangles public class TrianglesPiece : Triangles
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Rulesets.Osu.Objects
{ {
public class HitCircle : OsuHitObject public class HitCircle : OsuHitObject
{ {

View File

@ -1,15 +1,15 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
using OpenTK; using OpenTK;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Objects.Types;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Beatmaps.Timing; using osu.Game.Beatmaps.Timing;
using osu.Game.Database; using osu.Game.Database;
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Rulesets.Osu.Objects
{ {
public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition
{ {
@ -21,6 +21,8 @@ namespace osu.Game.Modes.Osu.Objects
private const double hit_window_300 = 30; private const double hit_window_300 = 30;
public Vector2 Position { get; set; } public Vector2 Position { get; set; }
public float X => Position.X;
public float Y => Position.Y;
public Vector2 StackedPosition => Position + StackOffset; public Vector2 StackedPosition => Position + StackOffset;

View File

@ -6,7 +6,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Rulesets.Osu.Objects
{ {
internal class OsuHitObjectDifficulty internal class OsuHitObjectDifficulty
{ {

View File

@ -3,15 +3,15 @@
using OpenTK; using OpenTK;
using osu.Game.Beatmaps.Timing; using osu.Game.Beatmaps.Timing;
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Objects.Types;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.Modes.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Database; using osu.Game.Database;
using System.Linq; using System.Linq;
using osu.Game.Audio; using osu.Game.Audio;
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Rulesets.Osu.Objects
{ {
public class Slider : OsuHitObject, IHasCurve public class Slider : OsuHitObject, IHasCurve
{ {

View File

@ -1,7 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Rulesets.Osu.Objects
{ {
public class SliderTick : OsuHitObject public class SliderTick : OsuHitObject
{ {

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Modes.Osu.Objects namespace osu.Game.Rulesets.Osu.Objects
{ {
public class Spinner : OsuHitObject, IHasEndTime public class Spinner : OsuHitObject, IHasEndTime
{ {

View File

@ -4,16 +4,16 @@
using OpenTK; using OpenTK;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Objects.Types;
using osu.Game.Modes.Replays; using osu.Game.Rulesets.Replays;
namespace osu.Game.Modes.Osu namespace osu.Game.Rulesets.Osu
{ {
public class OsuAutoReplay : Replay public class OsuAutoReplay : Replay
{ {

View File

@ -2,13 +2,14 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Objects.Types; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Osu.Beatmaps; using osu.Game.Rulesets.Objects.Types;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Rulesets.Osu.Objects;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace osu.Game.Modes.Osu namespace osu.Game.Rulesets.Osu
{ {
public class OsuDifficultyCalculator : DifficultyCalculator<OsuHitObject> public class OsuDifficultyCalculator : DifficultyCalculator<OsuHitObject>
{ {
@ -180,7 +181,7 @@ namespace osu.Game.Modes.Osu
return difficulty; return difficulty;
} }
protected override IBeatmapConverter<OsuHitObject> CreateBeatmapConverter() => new OsuBeatmapConverter(); protected override BeatmapConverter<OsuHitObject> CreateBeatmapConverter() => new OsuBeatmapConverter();
// Those values are used as array indices. Be careful when changing them! // Those values are used as array indices. Be careful when changing them!
public enum DifficultyType public enum DifficultyType

View File

@ -11,7 +11,7 @@ using OpenTK.Input;
using KeyboardState = osu.Framework.Input.KeyboardState; using KeyboardState = osu.Framework.Input.KeyboardState;
using MouseState = osu.Framework.Input.MouseState; using MouseState = osu.Framework.Input.MouseState;
namespace osu.Game.Modes.Osu namespace osu.Game.Rulesets.Osu
{ {
public class OsuKeyConversionInputManager : KeyConversionInputManager public class OsuKeyConversionInputManager : KeyConversionInputManager
{ {

View File

@ -4,18 +4,18 @@
using OpenTK.Input; using OpenTK.Input;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Modes.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Modes.Osu.Mods; using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.UI; using osu.Game.Rulesets.Osu.UI;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Game.Modes.Osu.Scoring; using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
namespace osu.Game.Modes.Osu namespace osu.Game.Rulesets.Osu
{ {
public class OsuRuleset : Ruleset public class OsuRuleset : Ruleset
{ {
@ -99,8 +99,6 @@ namespace osu.Game.Modes.Osu
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new OsuDifficultyCalculator(beatmap); public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new OsuDifficultyCalculator(beatmap);
protected override PlayMode PlayMode => PlayMode.Osu;
public override string Description => "osu!"; public override string Description => "osu!";
public override IEnumerable<KeyCounter> CreateGameplayKeys() => new KeyCounter[] public override IEnumerable<KeyCounter> CreateGameplayKeys() => new KeyCounter[]
@ -112,5 +110,7 @@ namespace osu.Game.Modes.Osu
}; };
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(); public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor();
public override int LegacyID => 0;
} }
} }

View File

@ -1,9 +1,9 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
namespace osu.Game.Modes.Osu.Scoring namespace osu.Game.Rulesets.Osu.Scoring
{ {
internal class OsuScore : Score internal class OsuScore : Score
{ {

View File

@ -1,13 +1,13 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Scoring;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
namespace osu.Game.Modes.Osu.Scoring namespace osu.Game.Rulesets.Osu.Scoring
{ {
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgement> internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgement>
{ {

View File

@ -3,17 +3,18 @@
using OpenTK; using OpenTK;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Beatmaps;
using osu.Game.Modes.Osu.Beatmaps; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.Scoring; using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Modes.Scoring; using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Modes.UI; using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
namespace osu.Game.Modes.Osu.UI namespace osu.Game.Rulesets.Osu.UI
{ {
public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgement> public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgement>
{ {
@ -24,9 +25,9 @@ namespace osu.Game.Modes.Osu.UI
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this); public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor(this);
protected override IBeatmapConverter<OsuHitObject> CreateBeatmapConverter() => new OsuBeatmapConverter(); protected override BeatmapConverter<OsuHitObject> CreateBeatmapConverter() => new OsuBeatmapConverter();
protected override IBeatmapProcessor<OsuHitObject> CreateBeatmapProcessor() => new OsuBeatmapProcessor(); protected override BeatmapProcessor<OsuHitObject> CreateBeatmapProcessor() => new OsuBeatmapProcessor();
protected override Playfield<OsuHitObject, OsuJudgement> CreatePlayfield() => new OsuPlayfield(); protected override Playfield<OsuHitObject, OsuJudgement> CreatePlayfield() => new OsuPlayfield();

View File

@ -4,16 +4,16 @@
using OpenTK; using OpenTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Modes.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Modes.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Modes.Osu.Objects.Drawables.Connections; using osu.Game.Rulesets.Osu.Objects.Drawables.Connections;
using osu.Game.Modes.UI; using osu.Game.Rulesets.UI;
using System.Linq; using System.Linq;
using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Cursor;
using osu.Game.Modes.Osu.Judgements; using osu.Game.Rulesets.Osu.Judgements;
namespace osu.Game.Modes.Osu.UI namespace osu.Game.Rulesets.Osu.UI
{ {
public class OsuPlayfield : Playfield<OsuHitObject, OsuJudgement> public class OsuPlayfield : Playfield<OsuHitObject, OsuJudgement>
{ {
@ -23,6 +23,8 @@ namespace osu.Game.Modes.Osu.UI
public override bool ProvidingUserCursor => true; public override bool ProvidingUserCursor => true;
public static readonly Vector2 BASE_SIZE = new Vector2(512, 384);
public override Vector2 Size public override Vector2 Size
{ {
get get
@ -34,7 +36,7 @@ namespace osu.Game.Modes.Osu.UI
} }
} }
public OsuPlayfield() : base(512) public OsuPlayfield() : base(BASE_SIZE.X)
{ {
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;

View File

@ -7,8 +7,8 @@
<ProjectGuid>{C92A607B-1FDD-4954-9F92-03FF547D9080}</ProjectGuid> <ProjectGuid>{C92A607B-1FDD-4954-9F92-03FF547D9080}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Osu</RootNamespace> <RootNamespace>osu.Game.Rulesets.Osu</RootNamespace>
<AssemblyName>osu.Game.Modes.Osu</AssemblyName> <AssemblyName>osu.Game.Rulesets.Osu</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />

Some files were not shown because too many files have changed in this diff Show More