mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Merge branch 'master' into tooltips
This commit is contained in:
commit
af9a45fd6c
5
.vscode/tasks.json
vendored
5
.vscode/tasks.json
vendored
@ -8,10 +8,7 @@
|
||||
"taskName": "build",
|
||||
"isShellCommand": true,
|
||||
"showOutput": "silent",
|
||||
"command": "xbuild",
|
||||
"windows": {
|
||||
"command": "msbuild"
|
||||
},
|
||||
"command": "msbuild",
|
||||
"args": [
|
||||
// Ask msbuild to generate full paths for file names.
|
||||
"/property:GenerateFullPaths=true"
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 979fb1ffdfaa08c39ff4f0cdda42e5b313d70534
|
||||
Subproject commit 21a97586f7fa8d9aa65b4131824151d88a70b520
|
@ -4,11 +4,6 @@
|
||||
using NUnit.Framework;
|
||||
using osu.Desktop.VisualTests;
|
||||
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
|
||||
{
|
||||
@ -20,11 +15,6 @@ namespace osu.Desktop.Tests
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
@ -75,21 +75,21 @@
|
||||
<Project>{69051C69-12AE-4E7D-A3E6-460D2E282312}</Project>
|
||||
<Name>osu.Desktop.VisualTests</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Catch</Name>
|
||||
<Name>osu.Game.Rulesets.Catch</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Mania</Name>
|
||||
<Name>osu.Game.Rulesets.Mania</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Osu</Name>
|
||||
<Name>osu.Game.Rulesets.Osu</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Taiko</Name>
|
||||
<Name>osu.Game.Rulesets.Taiko</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
|
||||
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
|
||||
|
@ -4,11 +4,6 @@
|
||||
using System;
|
||||
using osu.Framework.Desktop;
|
||||
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
|
||||
{
|
||||
@ -21,11 +16,6 @@ namespace osu.Desktop.VisualTests
|
||||
|
||||
using (GameHost host = Host.GetSuitableHost(@"osu"))
|
||||
{
|
||||
Ruleset.Register(new OsuRuleset());
|
||||
Ruleset.Register(new TaikoRuleset());
|
||||
Ruleset.Register(new ManiaRuleset());
|
||||
Ruleset.Register(new CatchRuleset());
|
||||
|
||||
if (benchmark)
|
||||
host.Run(new AutomatedVisualTestGame());
|
||||
else
|
||||
|
@ -9,21 +9,30 @@ using osu.Framework.Testing;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes.Catch.UI;
|
||||
using osu.Game.Modes.Mania.UI;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.UI;
|
||||
using osu.Game.Modes.Taiko.UI;
|
||||
using osu.Game.Rulesets.Catch.UI;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Rulesets.Taiko.UI;
|
||||
using System.Collections.Generic;
|
||||
using osu.Desktop.VisualTests.Beatmaps;
|
||||
using osu.Framework.Allocation;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
internal class TestCaseGamefield : TestCase
|
||||
{
|
||||
private RulesetDatabase rulesets;
|
||||
|
||||
public override string Description => @"Showing hitobjects and what not.";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(RulesetDatabase rulesets)
|
||||
{
|
||||
this.rulesets = rulesets;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
@ -36,7 +45,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
objects.Add(new HitCircle
|
||||
{
|
||||
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),
|
||||
});
|
||||
|
||||
@ -49,6 +58,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
Difficulty = new BeatmapDifficulty(),
|
||||
Ruleset = rulesets.Query<RulesetInfo>().First(),
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
Artist = @"Unknown",
|
||||
|
@ -10,11 +10,11 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
|
@ -4,9 +4,9 @@
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.Osu.Mods;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
using osu.Game.Users;
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Overlays.Mods;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Database;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
@ -13,6 +14,13 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
public override string Description => @"Tests the mod select overlay";
|
||||
|
||||
private ModSelectOverlay modSelect;
|
||||
private RulesetDatabase rulesets;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(RulesetDatabase rulesets)
|
||||
{
|
||||
this.rulesets = rulesets;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
@ -26,10 +34,9 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
});
|
||||
|
||||
AddStep("Toggle", modSelect.ToggleVisibility);
|
||||
AddStep("osu!", () => modSelect.PlayMode.Value = PlayMode.Osu);
|
||||
AddStep("osu!taiko", () => modSelect.PlayMode.Value = PlayMode.Taiko);
|
||||
AddStep("osu!catch", () => modSelect.PlayMode.Value = PlayMode.Catch);
|
||||
AddStep("osu!mania", () => modSelect.PlayMode.Value = PlayMode.Mania);
|
||||
|
||||
foreach (var ruleset in rulesets.AllRulesets)
|
||||
AddStep(ruleset.CreateInstance().Description, () => modSelect.Ruleset.Value = ruleset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ using osu.Desktop.VisualTests.Platform;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Screens.Select;
|
||||
using osu.Game.Screens.Select.Filter;
|
||||
|
||||
@ -20,13 +19,19 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
public override string Description => @"with fake data";
|
||||
|
||||
private RulesetDatabase rulesets;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
if (db == null)
|
||||
{
|
||||
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>();
|
||||
|
||||
@ -72,7 +77,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
new BeatmapInfo
|
||||
{
|
||||
OnlineBeatmapID = 1234 + i,
|
||||
Mode = PlayMode.Osu,
|
||||
Ruleset = rulesets.Query<RulesetInfo>().First(),
|
||||
Path = "normal.osu",
|
||||
Version = "Normal",
|
||||
Difficulty = new BeatmapDifficulty
|
||||
@ -83,7 +88,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
new BeatmapInfo
|
||||
{
|
||||
OnlineBeatmapID = 1235 + i,
|
||||
Mode = PlayMode.Osu,
|
||||
Ruleset = rulesets.Query<RulesetInfo>().First(),
|
||||
Path = "hard.osu",
|
||||
Version = "Hard",
|
||||
Difficulty = new BeatmapDifficulty
|
||||
@ -94,7 +99,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
new BeatmapInfo
|
||||
{
|
||||
OnlineBeatmapID = 1236 + i,
|
||||
Mode = PlayMode.Osu,
|
||||
Ruleset = rulesets.Query<RulesetInfo>().First(),
|
||||
Path = "insane.osu",
|
||||
Version = "Insane",
|
||||
Difficulty = new BeatmapDifficulty
|
||||
|
@ -9,12 +9,12 @@ using osu.Game.Beatmaps;
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Screens.Play;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Desktop.VisualTests.Beatmaps;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
@ -22,12 +22,14 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
protected Player Player;
|
||||
private BeatmapDatabase db;
|
||||
private RulesetDatabase rulesets;
|
||||
|
||||
public override string Description => @"Showing everything to play the game.";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BeatmapDatabase db)
|
||||
private void load(BeatmapDatabase db, RulesetDatabase rulesets)
|
||||
{
|
||||
this.rulesets = rulesets;
|
||||
this.db = db;
|
||||
}
|
||||
|
||||
@ -37,7 +39,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
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)
|
||||
beatmap = db.GetWorkingBeatmap(beatmapInfo);
|
||||
|
||||
@ -51,8 +53,8 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
objects.Add(new HitCircle
|
||||
{
|
||||
StartTime = time,
|
||||
Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : 512,
|
||||
i % 4 < 2 ? 0 : 384),
|
||||
Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : OsuPlayfield.BASE_SIZE.X,
|
||||
i % 4 < 2 ? 0 : OsuPlayfield.BASE_SIZE.Y),
|
||||
NewCombo = i % 4 == 0
|
||||
});
|
||||
|
||||
@ -65,6 +67,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
BeatmapInfo = new BeatmapInfo
|
||||
{
|
||||
Difficulty = new BeatmapDifficulty(),
|
||||
Ruleset = rulesets.Query<RulesetInfo>().First(),
|
||||
Metadata = new BeatmapMetadata
|
||||
{
|
||||
Artist = @"Unknown",
|
||||
|
@ -2,8 +2,8 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.Osu.Mods;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
@ -16,6 +16,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
public override string Description => @"With fake data";
|
||||
|
||||
private SongProgress progress;
|
||||
private SongProgressGraph graph;
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
@ -23,11 +24,20 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
|
||||
Add(progress = new SongProgress
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AudioClock = new StopwatchClock(true),
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Origin = Anchor.BottomLeft,
|
||||
});
|
||||
|
||||
Add(graph = new SongProgressGraph
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 200,
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
});
|
||||
|
||||
AddStep("Toggle Bar", progress.ToggleBar);
|
||||
AddWaitStep(5);
|
||||
AddStep("Toggle Bar", progress.ToggleBar);
|
||||
@ -44,6 +54,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
objects.Add(new HitObject { StartTime = i });
|
||||
|
||||
progress.Objects = objects;
|
||||
graph.Objects = objects;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
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
|
||||
{
|
||||
|
@ -7,11 +7,11 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Taiko.Judgements;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.Taiko.Objects.Drawables;
|
||||
using osu.Game.Modes.Taiko.UI;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Taiko.Judgements;
|
||||
using osu.Game.Rulesets.Taiko.Objects;
|
||||
using osu.Game.Rulesets.Taiko.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Taiko.UI;
|
||||
using System;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
|
@ -161,21 +161,21 @@
|
||||
<Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project>
|
||||
<Name>osu.Game.Resources</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Osu</Name>
|
||||
<Name>osu.Game.Rulesets.Osu</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Catch</Name>
|
||||
<Name>osu.Game.Rulesets.Catch</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Mania</Name>
|
||||
<Name>osu.Game.Rulesets.Mania</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Taiko</Name>
|
||||
<Name>osu.Game.Rulesets.Taiko</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
|
||||
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>
|
||||
|
@ -7,11 +7,6 @@ using osu.Desktop.Beatmaps.IO;
|
||||
using osu.Framework.Desktop;
|
||||
using osu.Framework.Desktop.Platform;
|
||||
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
|
||||
{
|
||||
@ -41,11 +36,6 @@ namespace osu.Desktop
|
||||
}
|
||||
else
|
||||
{
|
||||
Ruleset.Register(new OsuRuleset());
|
||||
Ruleset.Register(new TaikoRuleset());
|
||||
Ruleset.Register(new ManiaRuleset());
|
||||
Ruleset.Register(new CatchRuleset());
|
||||
|
||||
host.Run(new OsuGameDesktop(args));
|
||||
}
|
||||
return 0;
|
||||
|
@ -198,21 +198,21 @@
|
||||
<Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project>
|
||||
<Name>osu.Game.Resources</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Osu</Name>
|
||||
<Name>osu.Game.Rulesets.Osu</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Catch</Name>
|
||||
<Name>osu.Game.Rulesets.Catch</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Mania</Name>
|
||||
<Name>osu.Game.Rulesets.Mania</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Taiko</Name>
|
||||
<Name>osu.Game.Rulesets.Taiko</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
|
||||
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>
|
||||
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
23
osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
Normal file
23
osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -2,11 +2,12 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Catch.Beatmaps;
|
||||
using osu.Game.Modes.Catch.Objects;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Modes.Catch
|
||||
namespace osu.Game.Rulesets.Catch
|
||||
{
|
||||
public class CatchDifficultyCalculator : DifficultyCalculator<CatchBaseHit>
|
||||
{
|
||||
@ -19,6 +20,6 @@ namespace osu.Game.Modes.Catch
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected override IBeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter();
|
||||
protected override BeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter();
|
||||
}
|
||||
}
|
@ -4,16 +4,16 @@
|
||||
using OpenTK.Input;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Catch.Mods;
|
||||
using osu.Game.Modes.Catch.UI;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Catch.Mods;
|
||||
using osu.Game.Rulesets.Catch.UI;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Catch.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Catch.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Catch
|
||||
namespace osu.Game.Rulesets.Catch
|
||||
{
|
||||
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 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 ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor();
|
||||
|
||||
public override int LegacyID => 2;
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
// 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.Modes.Judgements;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Catch.Judgements
|
||||
namespace osu.Game.Rulesets.Catch.Judgements
|
||||
{
|
||||
public class CatchJudgement : Judgement
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
// 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.Modes.Mods;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Modes.Catch.Mods
|
||||
namespace osu.Game.Rulesets.Catch.Mods
|
||||
{
|
||||
public class CatchModNoFail : ModNoFail
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
// 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.Modes.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Modes.Catch.Objects
|
||||
namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
public abstract class CatchBaseHit : HitObject
|
||||
{
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Graphics.Transforms;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Catch.Objects.Drawable
|
||||
namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
||||
{
|
||||
internal class DrawableFruit : Sprite
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Catch.Objects
|
||||
namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
public class Droplet : CatchBaseHit
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Catch.Objects
|
||||
namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
public class Fruit : CatchBaseHit
|
||||
{
|
@ -7,11 +7,11 @@ using System.Runtime.InteropServices;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("osu.Game.Modes.Catch")]
|
||||
[assembly: AssemblyTitle("osu.Game.Rulesets.Catch")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("osu.Game.Modes.Catch")]
|
||||
[assembly: AssemblyProduct("osu.Game.Rulesets.Catch")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
@ -1,12 +1,12 @@
|
||||
// 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.Modes.Catch.Judgements;
|
||||
using osu.Game.Modes.Catch.Objects;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Catch.Judgements;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
||||
namespace osu.Game.Modes.Catch.Scoring
|
||||
namespace osu.Game.Rulesets.Catch.Scoring
|
||||
{
|
||||
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgement>
|
||||
{
|
@ -2,15 +2,16 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Catch.Beatmaps;
|
||||
using osu.Game.Modes.Catch.Judgements;
|
||||
using osu.Game.Modes.Catch.Objects;
|
||||
using osu.Game.Modes.Catch.Scoring;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Beatmaps;
|
||||
using osu.Game.Rulesets.Catch.Judgements;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.Catch.Scoring;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
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>
|
||||
{
|
||||
@ -21,9 +22,7 @@ namespace osu.Game.Modes.Catch.UI
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this);
|
||||
|
||||
protected override IBeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter();
|
||||
|
||||
protected override IBeatmapProcessor<CatchBaseHit> CreateBeatmapProcessor() => new CatchBeatmapProcessor();
|
||||
protected override BeatmapConverter<CatchBaseHit> CreateBeatmapConverter() => new CatchBeatmapConverter();
|
||||
|
||||
protected override Playfield<CatchBaseHit, CatchJudgement> CreatePlayfield() => new CatchPlayfield();
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Modes.Catch.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Catch.Objects;
|
||||
using osu.Game.Rulesets.UI;
|
||||
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>
|
||||
{
|
@ -7,8 +7,8 @@
|
||||
<ProjectGuid>{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>osu.Game.Modes.Catch</RootNamespace>
|
||||
<AssemblyName>osu.Game.Modes.Catch</AssemblyName>
|
||||
<RootNamespace>osu.Game.Rulesets.Catch</RootNamespace>
|
||||
<AssemblyName>osu.Game.Rulesets.Catch</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
@ -48,7 +48,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Beatmaps\CatchBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\CatchBeatmapProcessor.cs" />
|
||||
<Compile Include="CatchDifficultyCalculator.cs" />
|
||||
<Compile Include="Scoring\CatchScoreProcessor.cs" />
|
||||
<Compile Include="Judgements\CatchJudgement.cs" />
|
||||
@ -74,9 +73,9 @@
|
||||
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
|
||||
<Name>osu.Framework</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Osu</Name>
|
||||
<Name>osu.Game.Rulesets.Osu</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
|
||||
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
|
23
osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs
Normal file
23
osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
// 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.Modes.Judgements;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
|
||||
namespace osu.Game.Modes.Mania.Judgements
|
||||
namespace osu.Game.Rulesets.Mania.Judgements
|
||||
{
|
||||
public class ManiaJudgement : Judgement
|
||||
{
|
@ -2,11 +2,12 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Mania.Beatmaps;
|
||||
using osu.Game.Modes.Mania.Objects;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Modes.Mania
|
||||
namespace osu.Game.Rulesets.Mania
|
||||
{
|
||||
public class ManiaDifficultyCalculator : DifficultyCalculator<ManiaBaseHit>
|
||||
{
|
||||
@ -20,6 +21,6 @@ namespace osu.Game.Modes.Mania
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected override IBeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter();
|
||||
protected override BeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter();
|
||||
}
|
||||
}
|
@ -3,16 +3,16 @@
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Mania.Mods;
|
||||
using osu.Game.Modes.Mania.UI;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Mania.Mods;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Mania.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Mania.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Mania
|
||||
namespace osu.Game.Rulesets.Mania
|
||||
{
|
||||
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 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 ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor();
|
||||
|
||||
public override int LegacyID => 3;
|
||||
}
|
||||
}
|
@ -2,10 +2,10 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Modes.Mania.Mods
|
||||
namespace osu.Game.Rulesets.Mania.Mods
|
||||
{
|
||||
public class ManiaModNoFail : ModNoFail
|
||||
{
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Transforms;
|
||||
using osu.Framework.Graphics;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Mania.Objects.Drawable
|
||||
namespace osu.Game.Rulesets.Mania.Objects.Drawable
|
||||
{
|
||||
public class DrawableNote : Sprite
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Mania.Objects
|
||||
namespace osu.Game.Rulesets.Mania.Objects
|
||||
{
|
||||
public class HoldNote : Note
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
// 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.Modes.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Modes.Mania.Objects
|
||||
namespace osu.Game.Rulesets.Mania.Objects
|
||||
{
|
||||
public abstract class ManiaBaseHit : HitObject
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Mania.Objects
|
||||
namespace osu.Game.Rulesets.Mania.Objects
|
||||
{
|
||||
public class Note : ManiaBaseHit
|
||||
{
|
@ -7,11 +7,11 @@ using System.Runtime.InteropServices;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("osu.Game.Modes.Mania")]
|
||||
[assembly: AssemblyTitle("osu.Game.Rulesets.Mania")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("osu.Game.Modes.Mania")]
|
||||
[assembly: AssemblyProduct("osu.Game.Rulesets.Mania")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
@ -1,12 +1,12 @@
|
||||
// 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.Modes.Mania.Judgements;
|
||||
using osu.Game.Modes.Mania.Objects;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Mania.Judgements;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
||||
namespace osu.Game.Modes.Mania.Scoring
|
||||
namespace osu.Game.Rulesets.Mania.Scoring
|
||||
{
|
||||
internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgement>
|
||||
{
|
@ -2,15 +2,16 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Mania.Beatmaps;
|
||||
using osu.Game.Modes.Mania.Judgements;
|
||||
using osu.Game.Modes.Mania.Objects;
|
||||
using osu.Game.Modes.Mania.Scoring;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Beatmaps;
|
||||
using osu.Game.Rulesets.Mania.Judgements;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.Mania.Scoring;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
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>
|
||||
{
|
||||
@ -24,9 +25,7 @@ namespace osu.Game.Modes.Mania.UI
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new ManiaScoreProcessor(this);
|
||||
|
||||
protected override IBeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter();
|
||||
|
||||
protected override IBeatmapProcessor<ManiaBaseHit> CreateBeatmapProcessor() => new ManiaBeatmapProcessor();
|
||||
protected override BeatmapConverter<ManiaBaseHit> CreateBeatmapConverter() => new ManiaBeatmapConverter();
|
||||
|
||||
protected override Playfield<ManiaBaseHit, ManiaJudgement> CreatePlayfield() => new ManiaPlayfield(columns);
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Modes.Mania.Objects;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Mania.Objects;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using OpenTK;
|
||||
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>
|
||||
{
|
@ -7,8 +7,8 @@
|
||||
<ProjectGuid>{48F4582B-7687-4621-9CBE-5C24197CB536}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>osu.Game.Modes.Mania</RootNamespace>
|
||||
<AssemblyName>osu.Game.Modes.Mania</AssemblyName>
|
||||
<RootNamespace>osu.Game.Rulesets.Mania</RootNamespace>
|
||||
<AssemblyName>osu.Game.Rulesets.Mania</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
@ -48,7 +48,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Beatmaps\ManiaBeatmapConverter.cs" />
|
||||
<Compile Include="Beatmaps\ManiaBeatmapProcessor.cs" />
|
||||
<Compile Include="Judgements\ManiaJudgement.cs" />
|
||||
<Compile Include="ManiaDifficultyCalculator.cs" />
|
||||
<Compile Include="Scoring\ManiaScoreProcessor.cs" />
|
||||
@ -67,13 +66,13 @@
|
||||
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
|
||||
<Name>osu.Framework</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Osu</Name>
|
||||
<Name>osu.Game.Rulesets.Osu</Name>
|
||||
</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>
|
||||
<Name>osu.Game.Modes.Taiko</Name>
|
||||
<Name>osu.Game.Rulesets.Taiko</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
|
||||
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
|
61
osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs
Normal file
61
osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -3,96 +3,58 @@
|
||||
|
||||
using OpenTK;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using System.Linq;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
|
||||
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)
|
||||
};
|
||||
}
|
||||
|
||||
private List<OsuHitObject> convertHitObjects(List<HitObject> hitObjects, float stackLeniency)
|
||||
{
|
||||
List<OsuHitObject> converted = hitObjects.Select(convertHitObject).ToList();
|
||||
|
||||
updateStacking(converted, stackLeniency);
|
||||
|
||||
return converted;
|
||||
}
|
||||
|
||||
private OsuHitObject convertHitObject(HitObject original)
|
||||
{
|
||||
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
|
||||
if (obj.NewCombo)
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Samples = original.Samples,
|
||||
CurveObject = curveData,
|
||||
Position = positionData?.Position ?? Vector2.Zero,
|
||||
NewCombo = comboData?.NewCombo ?? false
|
||||
};
|
||||
}
|
||||
comboIndex = 0;
|
||||
colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count;
|
||||
}
|
||||
|
||||
if (endTimeData != null)
|
||||
{
|
||||
return new Spinner
|
||||
{
|
||||
StartTime = original.StartTime,
|
||||
Samples = original.Samples,
|
||||
Position = new Vector2(512, 384) / 2,
|
||||
EndTime = endTimeData.EndTime
|
||||
};
|
||||
obj.ComboIndex = comboIndex++;
|
||||
obj.ComboColour = beatmap.ComboColors[colourIndex];
|
||||
}
|
||||
|
||||
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)
|
||||
private void applyStacking(Beatmap<OsuHitObject> beatmap)
|
||||
{
|
||||
if (endIndex == -1)
|
||||
endIndex = hitObjects.Count - 1;
|
||||
|
||||
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
|
||||
for (int i = startIndex; i <= endIndex; i++)
|
||||
hitObjects[i].StackHeight = 0;
|
||||
// Reset stacking
|
||||
for (int i = 0; i <= beatmap.HitObjects.Count - 1; i++)
|
||||
beatmap.HitObjects[i].StackHeight = 0;
|
||||
|
||||
// Extend the end index to include objects they are stacked on
|
||||
int extendedEndIndex = endIndex;
|
||||
for (int i = endIndex; i >= startIndex; i--)
|
||||
int extendedEndIndex = beatmap.HitObjects.Count - 1;
|
||||
for (int i = beatmap.HitObjects.Count - 1; i >= 0; 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;
|
||||
|
||||
OsuHitObject objectN = hitObjects[n];
|
||||
OsuHitObject objectN = beatmap.HitObjects[n];
|
||||
if (objectN is Spinner)
|
||||
continue;
|
||||
|
||||
@ -115,14 +77,14 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
if (stackBaseIndex > extendedEndIndex)
|
||||
{
|
||||
extendedEndIndex = stackBaseIndex;
|
||||
if (extendedEndIndex == hitObjects.Count - 1)
|
||||
if (extendedEndIndex == beatmap.HitObjects.Count - 1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Reverse pass for stack calculation.
|
||||
int extendedStartIndex = startIndex;
|
||||
for (int i = extendedEndIndex; i > startIndex; i--)
|
||||
int extendedStartIndex = 0;
|
||||
for (int i = extendedEndIndex; i > 0; i--)
|
||||
{
|
||||
int n = i;
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
OsuHitObject objectI = hitObjects[i];
|
||||
OsuHitObject objectI = beatmap.HitObjects[i];
|
||||
if (objectI.StackHeight != 0 || objectI is Spinner) continue;
|
||||
|
||||
/* 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)
|
||||
{
|
||||
OsuHitObject objectN = hitObjects[n];
|
||||
OsuHitObject objectN = beatmap.HitObjects[n];
|
||||
if (objectN is Spinner) continue;
|
||||
|
||||
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 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)
|
||||
objectJ.StackHeight -= offset;
|
||||
}
|
||||
@ -199,9 +161,9 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
||||
/* We have hit the first slider in a possible stack.
|
||||
* 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 (objectI.StartTime - objectN.StartTime > stackThreshold)
|
@ -2,11 +2,11 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Framework.Extensions;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Judgements
|
||||
namespace osu.Game.Rulesets.Osu.Judgements
|
||||
{
|
||||
public class OsuJudgement : Judgement
|
||||
{
|
@ -3,13 +3,13 @@
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using System;
|
||||
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
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
{
|
||||
/// <summary>
|
||||
/// Connects hit objects visually, for example with follow points.
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
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
|
||||
{
|
@ -4,9 +4,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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>
|
||||
{
|
@ -3,12 +3,12 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
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
|
||||
{
|
@ -2,10 +2,10 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.ComponentModel;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
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>
|
||||
{
|
@ -2,12 +2,12 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
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>
|
||||
{
|
@ -3,13 +3,13 @@
|
||||
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableSlider : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
||||
{
|
@ -4,12 +4,12 @@
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
{
|
||||
public class DrawableSliderTick : DrawableOsuHitObject
|
||||
{
|
@ -5,12 +5,13 @@ using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables.Pieces;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
using OpenTK;
|
||||
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
|
||||
{
|
||||
@ -29,7 +30,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
Position = s.Position;
|
||||
|
||||
//take up full playfield.
|
||||
Size = new Vector2(512);
|
||||
Size = new Vector2(OsuPlayfield.BASE_SIZE.X);
|
||||
|
||||
spinner = s;
|
||||
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
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
|
||||
{
|
@ -10,7 +10,7 @@ using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class CirclePiece : Container
|
||||
{
|
@ -5,7 +5,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class ExplodePiece : Container
|
||||
{
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class FlashPiece : Container
|
||||
{
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
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
|
||||
{
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class NumberPiece : Container
|
||||
{
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class RingPiece : Container
|
||||
{
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SliderBall : CircularContainer, ISliderProgress
|
||||
{
|
@ -15,7 +15,7 @@ using OpenTK;
|
||||
using OpenTK.Graphics.ES30;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SliderBody : Container, ISliderProgress
|
||||
{
|
@ -5,7 +5,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
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
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SpinnerBackground : SpinnerDisc
|
||||
{
|
@ -15,7 +15,7 @@ using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class SpinnerDisc : CircularContainer
|
||||
{
|
@ -3,7 +3,7 @@
|
||||
|
||||
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
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
public class HitCircle : OsuHitObject
|
||||
{
|
@ -1,15 +1,15 @@
|
||||
// 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.Modes.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using OpenTK;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Database;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
public abstract class OsuHitObject : HitObject, IHasCombo, IHasPosition
|
||||
{
|
||||
@ -21,6 +21,8 @@ namespace osu.Game.Modes.Osu.Objects
|
||||
private const double hit_window_300 = 30;
|
||||
|
||||
public Vector2 Position { get; set; }
|
||||
public float X => Position.X;
|
||||
public float Y => Position.Y;
|
||||
|
||||
public Vector2 StackedPosition => Position + StackOffset;
|
||||
|
@ -6,7 +6,7 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
internal class OsuHitObjectDifficulty
|
||||
{
|
@ -3,15 +3,15 @@
|
||||
|
||||
using OpenTK;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Database;
|
||||
using System.Linq;
|
||||
using osu.Game.Audio;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
public class Slider : OsuHitObject, IHasCurve
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects
|
||||
namespace osu.Game.Rulesets.Osu.Objects
|
||||
{
|
||||
public class SliderTick : OsuHitObject
|
||||
{
|
@ -1,9 +1,9 @@
|
||||
// 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.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
|
||||
{
|
@ -4,16 +4,16 @@
|
||||
using OpenTK;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Modes.Replays;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
public class OsuAutoReplay : Replay
|
||||
{
|
||||
@ -213,7 +213,7 @@ namespace osu.Game.Modes.Osu
|
||||
|
||||
ReplayButtonState button = buttonIndex % 2 == 0 ? ReplayButtonState.Left1 : ReplayButtonState.Right1;
|
||||
|
||||
double hEndTime = (h as IHasEndTime)?.EndTime ?? h.StartTime;
|
||||
double hEndTime = ((h as IHasEndTime)?.EndTime ?? h.StartTime) + KEY_UP_DELAY;
|
||||
|
||||
ReplayFrame newFrame = new ReplayFrame(h.StartTime, targetPosition.X, targetPosition.Y, button);
|
||||
ReplayFrame endFrame = new ReplayFrame(hEndTime + endDelay, h.EndPosition.X, h.EndPosition.Y, ReplayButtonState.None);
|
@ -2,13 +2,14 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Objects.Types;
|
||||
using osu.Game.Modes.Osu.Beatmaps;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osu.Game.Rulesets.Osu.Beatmaps;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
public class OsuDifficultyCalculator : DifficultyCalculator<OsuHitObject>
|
||||
{
|
||||
@ -180,7 +181,7 @@ namespace osu.Game.Modes.Osu
|
||||
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!
|
||||
public enum DifficultyType
|
@ -11,7 +11,7 @@ using OpenTK.Input;
|
||||
using KeyboardState = osu.Framework.Input.KeyboardState;
|
||||
using MouseState = osu.Framework.Input.MouseState;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
public class OsuKeyConversionInputManager : KeyConversionInputManager
|
||||
{
|
@ -4,18 +4,18 @@
|
||||
using OpenTK.Input;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Mods;
|
||||
using osu.Game.Modes.Osu.Mods;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.UI;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.UI;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Modes.Osu.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Osu.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
namespace osu.Game.Rulesets.Osu
|
||||
{
|
||||
public class OsuRuleset : Ruleset
|
||||
{
|
||||
@ -99,8 +99,6 @@ namespace osu.Game.Modes.Osu
|
||||
|
||||
public override DifficultyCalculator CreateDifficultyCalculator(Beatmap beatmap) => new OsuDifficultyCalculator(beatmap);
|
||||
|
||||
protected override PlayMode PlayMode => PlayMode.Osu;
|
||||
|
||||
public override string Description => "osu!";
|
||||
|
||||
public override IEnumerable<KeyCounter> CreateGameplayKeys() => new KeyCounter[]
|
||||
@ -112,5 +110,7 @@ namespace osu.Game.Modes.Osu
|
||||
};
|
||||
|
||||
public override ScoreProcessor CreateScoreProcessor() => new OsuScoreProcessor();
|
||||
|
||||
public override int LegacyID => 0;
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
// 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.Modes.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Scoring
|
||||
namespace osu.Game.Rulesets.Osu.Scoring
|
||||
{
|
||||
internal class OsuScore : Score
|
||||
{
|
@ -1,13 +1,13 @@
|
||||
// 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.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Scoring
|
||||
namespace osu.Game.Rulesets.Osu.Scoring
|
||||
{
|
||||
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgement>
|
||||
{
|
@ -3,17 +3,18 @@
|
||||
|
||||
using OpenTK;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Beatmaps;
|
||||
using osu.Game.Modes.Osu.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Scoring;
|
||||
using osu.Game.Modes.Scoring;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Beatmaps;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Beatmaps;
|
||||
using osu.Game.Rulesets.Osu.Judgements;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Scoring;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Game.Modes.Osu.UI
|
||||
namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgement>
|
||||
{
|
||||
@ -24,9 +25,9 @@ namespace osu.Game.Modes.Osu.UI
|
||||
|
||||
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();
|
||||
|
@ -4,16 +4,16 @@
|
||||
using OpenTK;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Objects;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables.Connections;
|
||||
using osu.Game.Modes.UI;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Connections;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using System.Linq;
|
||||
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>
|
||||
{
|
||||
@ -23,6 +23,8 @@ namespace osu.Game.Modes.Osu.UI
|
||||
|
||||
public override bool ProvidingUserCursor => true;
|
||||
|
||||
public static readonly Vector2 BASE_SIZE = new Vector2(512, 384);
|
||||
|
||||
public override Vector2 Size
|
||||
{
|
||||
get
|
||||
@ -34,7 +36,7 @@ namespace osu.Game.Modes.Osu.UI
|
||||
}
|
||||
}
|
||||
|
||||
public OsuPlayfield() : base(512)
|
||||
public OsuPlayfield() : base(BASE_SIZE.X)
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
@ -94,4 +96,4 @@ namespace osu.Game.Modes.Osu.UI
|
||||
judgementLayer.Add(explosion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -7,8 +7,8 @@
|
||||
<ProjectGuid>{C92A607B-1FDD-4954-9F92-03FF547D9080}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>osu.Game.Modes.Osu</RootNamespace>
|
||||
<AssemblyName>osu.Game.Modes.Osu</AssemblyName>
|
||||
<RootNamespace>osu.Game.Rulesets.Osu</RootNamespace>
|
||||
<AssemblyName>osu.Game.Rulesets.Osu</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user