From 0f4538f69f76d8e0dd2f86435c65c58246e3a816 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 17:23:33 +0900 Subject: [PATCH 01/10] Rename GameModes namespace to Screens. --- .../Tests/TestCaseGamefield.cs | 8 +- .../Tests/TestCaseMenuButtonSystem.cs | 2 +- .../Tests/TestCasePlaySongSelect.cs | 2 +- .../Tests/TestCasePlayer.cs | 2 +- .../Tests/TestCaseScoreCounter.cs | 10 +- osu.Desktop.VisualTests/VisualTestGame.cs | 1 - .../Beatmaps/Formats/OsuLegacyDecoderTest.cs | 2 +- .../Beatmaps/IO/ImportBeatmapTest.cs | 2 +- .../Beatmaps/IO/OszArchiveReaderTest.cs | 1 - osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs | 2 +- osu.Game/Beatmaps/Objects/HitObject.cs | 2 +- osu.Game/Configuration/OsuConfigManager.cs | 2 +- osu.Game/Database/BeatmapInfo.cs | 2 +- osu.Game/Database/BeatmapMetadata.cs | 1 - osu.Game/GameModes/Menu/MenuVisualisation.cs | 13 --- .../Online/Chat/Display/ChannelDisplay.cs | 1 - osu.Game/Online/Chat/Display/ChatLine.cs | 91 ++++++++-------- osu.Game/OsuGame.cs | 6 +- osu.Game/Overlays/Toolbar.cs | 2 +- osu.Game/Overlays/ToolbarModeButton.cs | 2 +- osu.Game/Overlays/ToolbarModeSelector.cs | 2 +- .../{GameModes => Screens}/BackgroundMode.cs | 18 ++-- .../Backgrounds/BackgroundModeCustom.cs | 2 +- .../Backgrounds/BackgroundModeDefault.cs | 2 +- .../Backgrounds/BackgroundModeEmpty.cs | 2 +- .../Charts/ChartInfo.cs | 8 +- .../Charts/ChartListing.cs | 2 +- .../Direct/OnlineListing.cs | 2 +- .../Edit/EditSongSelect.cs | 4 +- .../{GameModes => Screens}/Edit/Editor.cs | 9 +- .../GameModeWhiteBox.cs | 6 +- .../{GameModes => Screens}/Menu/Button.cs | 12 +-- .../Menu/ButtonSystem.cs | 5 +- .../Menu/FlowContainerWithOrigin.cs | 6 +- osu.Game/{GameModes => Screens}/Menu/Intro.cs | 10 +- .../{GameModes => Screens}/Menu/MainMenu.cs | 21 ++-- osu.Game/Screens/Menu/MenuVisualisation.cs | 8 ++ .../{GameModes => Screens}/Menu/OsuLogo.cs | 7 +- .../Multiplayer/Lobby.cs | 5 +- .../Multiplayer/Match.cs | 9 +- .../Multiplayer/MatchCreate.cs | 5 +- .../Multiplayer/MatchSongSelect.cs | 11 +- .../{GameModes => Screens}/OsuGameMode.cs | 10 +- .../Play/Catch/CatchComboCounter.cs | 9 +- .../Play/Catch/CatchHitRenderer.cs | 4 +- .../Play/Catch/CatchPlayfield.cs | 6 +- .../Play/Catch/CatchRuleset.cs | 8 +- .../Play/ComboCounter.cs | 11 +- .../Play/ComboResultCounter.cs | 9 +- .../Play/HitRenderer.cs | 9 +- .../Play/Mania/ManiaComboCounter.cs | 12 +-- .../Play/Mania/ManiaHitRenderer.cs | 5 +- .../Play/Mania/ManiaPlayfield.cs | 2 +- .../Play/Mania/ManiaRuleset.cs | 8 +- .../{GameModes => Screens}/Play/ModSelect.cs | 11 +- .../Play/Osu/OsuComboCounter.cs | 9 +- .../Play/Osu/OsuHitRenderer.cs | 3 +- .../Play/Osu/OsuPlayfield.cs | 5 +- .../Play/Osu/OsuRuleset.cs | 6 +- .../Play/Osu/ScoreOverlayOsu.cs | 8 +- .../{GameModes => Screens}/Play/PlayMode.cs | 2 +- .../Play/PlaySongSelect.cs | 33 +++--- .../{GameModes => Screens}/Play/Player.cs | 23 ++-- .../{GameModes => Screens}/Play/Playfield.cs | 3 +- .../{GameModes => Screens}/Play/Ruleset.cs | 14 +-- .../Play/ScoreOverlay.cs | 6 +- .../Play/Taiko/TaikoComboCounter.cs | 9 +- .../Play/Taiko/TaikoHitRenderer.cs | 4 +- .../Play/Taiko/TaikoPlayfield.cs | 8 +- .../Play/Taiko/TaikoRuleset.cs | 8 +- .../{GameModes => Screens}/Ranking/Results.cs | 4 +- osu.Game/osu.Game.csproj | 100 +++++++++--------- 72 files changed, 246 insertions(+), 413 deletions(-) delete mode 100644 osu.Game/GameModes/Menu/MenuVisualisation.cs rename osu.Game/{GameModes => Screens}/BackgroundMode.cs (92%) rename osu.Game/{GameModes => Screens}/Backgrounds/BackgroundModeCustom.cs (91%) rename osu.Game/{GameModes => Screens}/Backgrounds/BackgroundModeDefault.cs (88%) rename osu.Game/{GameModes => Screens}/Backgrounds/BackgroundModeEmpty.cs (81%) rename osu.Game/{GameModes => Screens}/Charts/ChartInfo.cs (55%) rename osu.Game/{GameModes => Screens}/Charts/ChartListing.cs (88%) rename osu.Game/{GameModes => Screens}/Direct/OnlineListing.cs (82%) rename osu.Game/{GameModes => Screens}/Edit/EditSongSelect.cs (84%) rename osu.Game/{GameModes => Screens}/Edit/Editor.cs (77%) rename osu.Game/{GameModes => Screens}/GameModeWhiteBox.cs (95%) rename osu.Game/{GameModes => Screens}/Menu/Button.cs (95%) rename osu.Game/{GameModes => Screens}/Menu/ButtonSystem.cs (96%) rename osu.Game/{GameModes => Screens}/Menu/FlowContainerWithOrigin.cs (87%) rename osu.Game/{GameModes => Screens}/Menu/Intro.cs (92%) rename osu.Game/{GameModes => Screens}/Menu/MainMenu.cs (85%) create mode 100644 osu.Game/Screens/Menu/MenuVisualisation.cs rename osu.Game/{GameModes => Screens}/Menu/OsuLogo.cs (95%) rename osu.Game/{GameModes => Screens}/Multiplayer/Lobby.cs (75%) rename osu.Game/{GameModes => Screens}/Multiplayer/Match.cs (81%) rename osu.Game/{GameModes => Screens}/Multiplayer/MatchCreate.cs (74%) rename osu.Game/{GameModes => Screens}/Multiplayer/MatchSongSelect.cs (54%) rename osu.Game/{GameModes => Screens}/OsuGameMode.cs (90%) rename osu.Game/{GameModes => Screens}/Play/Catch/CatchComboCounter.cs (87%) rename osu.Game/{GameModes => Screens}/Play/Catch/CatchHitRenderer.cs (81%) rename osu.Game/{GameModes => Screens}/Play/Catch/CatchPlayfield.cs (76%) rename osu.Game/{GameModes => Screens}/Play/Catch/CatchRuleset.cs (73%) rename osu.Game/{GameModes => Screens}/Play/ComboCounter.cs (93%) rename osu.Game/{GameModes => Screens}/Play/ComboResultCounter.cs (88%) rename osu.Game/{GameModes => Screens}/Play/HitRenderer.cs (93%) rename osu.Game/{GameModes => Screens}/Play/Mania/ManiaComboCounter.cs (89%) rename osu.Game/{GameModes => Screens}/Play/Mania/ManiaHitRenderer.cs (85%) rename osu.Game/{GameModes => Screens}/Play/Mania/ManiaPlayfield.cs (93%) rename osu.Game/{GameModes => Screens}/Play/Mania/ManiaRuleset.cs (73%) rename osu.Game/{GameModes => Screens}/Play/ModSelect.cs (77%) rename osu.Game/{GameModes => Screens}/Play/Osu/OsuComboCounter.cs (92%) rename osu.Game/{GameModes => Screens}/Play/Osu/OsuHitRenderer.cs (88%) rename osu.Game/{GameModes => Screens}/Play/Osu/OsuPlayfield.cs (93%) rename osu.Game/{GameModes => Screens}/Play/Osu/OsuRuleset.cs (77%) rename osu.Game/{GameModes => Screens}/Play/Osu/ScoreOverlayOsu.cs (86%) rename osu.Game/{GameModes => Screens}/Play/PlayMode.cs (88%) rename osu.Game/{GameModes => Screens}/Play/PlaySongSelect.cs (95%) rename osu.Game/{GameModes => Screens}/Play/Player.cs (90%) rename osu.Game/{GameModes => Screens}/Play/Playfield.cs (78%) rename osu.Game/{GameModes => Screens}/Play/Ruleset.cs (74%) rename osu.Game/{GameModes => Screens}/Play/ScoreOverlay.cs (89%) rename osu.Game/{GameModes => Screens}/Play/Taiko/TaikoComboCounter.cs (90%) rename osu.Game/{GameModes => Screens}/Play/Taiko/TaikoHitRenderer.cs (81%) rename osu.Game/{GameModes => Screens}/Play/Taiko/TaikoPlayfield.cs (88%) rename osu.Game/{GameModes => Screens}/Play/Taiko/TaikoRuleset.cs (73%) rename osu.Game/{GameModes => Screens}/Ranking/Results.cs (88%) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index d5b9a9fd03..db0de0a3f9 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -9,10 +9,10 @@ using osu.Framework.Timing; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Objects.Osu; -using osu.Game.GameModes.Play.Catch; -using osu.Game.GameModes.Play.Mania; -using osu.Game.GameModes.Play.Osu; -using osu.Game.GameModes.Play.Taiko; +using osu.Game.Screens.Play.Catch; +using osu.Game.Screens.Play.Mania; +using osu.Game.Screens.Play.Osu; +using osu.Game.Screens.Play.Taiko; using OpenTK; namespace osu.Desktop.VisualTests.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs b/osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs index eaa0a3eea4..c7889134bb 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseMenuButtonSystem.cs @@ -2,7 +2,7 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.GameModes.Testing; -using osu.Game.GameModes.Menu; +using osu.Game.Screens.Menu; namespace osu.Desktop.VisualTests.Tests { diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs index c3d6263d86..0ef743792d 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs @@ -5,10 +5,10 @@ using osu.Framework.GameModes.Testing; using System.Collections.Generic; using osu.Desktop.Platform; using osu.Game.Database; -using osu.Game.GameModes.Play; using SQLiteNetExtensions.Extensions; using osu.Framework; using osu.Game; +using osu.Game.Screens.Play; namespace osu.Desktop.Tests { diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index 03e382b71e..e69b669335 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -9,10 +9,10 @@ using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Objects.Osu; -using osu.Game.GameModes.Play; using OpenTK; using osu.Framework; using osu.Framework.Allocation; +using osu.Game.Screens.Play; namespace osu.Desktop.VisualTests.Tests { diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs index eb5f51d883..87a5e1ec45 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs @@ -6,12 +6,12 @@ using osu.Framework.GameModes.Testing; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.MathUtils; -using osu.Game.GameModes.Play; -using osu.Game.GameModes.Play.Catch; -using osu.Game.GameModes.Play.Mania; -using osu.Game.GameModes.Play.Osu; -using osu.Game.GameModes.Play.Taiko; using osu.Game.Graphics.UserInterface; +using osu.Game.Screens.Play; +using osu.Game.Screens.Play.Catch; +using osu.Game.Screens.Play.Mania; +using osu.Game.Screens.Play.Osu; +using osu.Game.Screens.Play.Taiko; using OpenTK; using OpenTK.Graphics; diff --git a/osu.Desktop.VisualTests/VisualTestGame.cs b/osu.Desktop.VisualTests/VisualTestGame.cs index 881a8e9bde..4d5d349fca 100644 --- a/osu.Desktop.VisualTests/VisualTestGame.cs +++ b/osu.Desktop.VisualTests/VisualTestGame.cs @@ -10,7 +10,6 @@ using osu.Framework.Desktop.Platform; using System.Reflection; using System.IO; using System.Collections.Generic; -using osu.Game.GameModes.Play; using SQLiteNetExtensions.Extensions; using osu.Desktop.Platform; using osu.Framework.Allocation; diff --git a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs index 2d854ab3b7..f5aee52853 100644 --- a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs @@ -7,7 +7,7 @@ using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Beatmaps.Samples; -using osu.Game.GameModes.Play; +using osu.Game.Screens.Play; using osu.Game.Tests.Resources; namespace osu.Game.Tests.Beatmaps.Formats diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index 8f604696b5..28dd5661b1 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -8,7 +8,7 @@ using osu.Framework.Desktop.Platform; using osu.Framework.Platform; using osu.Game.Database; using osu.Game.IPC; -using osu.Game.GameModes.Play; +using osu.Game.Screens.Play; namespace osu.Game.Tests.Beatmaps.IO { diff --git a/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs b/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs index ea26cce467..8a0364a03b 100644 --- a/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs @@ -2,7 +2,6 @@ using System.IO; using NUnit.Framework; using osu.Game.Beatmaps.IO; -using osu.Game.GameModes.Play; using osu.Game.Tests.Resources; namespace osu.Game.Tests.Beatmaps.IO diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index e988498093..165f1808ee 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -8,7 +8,7 @@ using osu.Game.Beatmaps.Events; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Timing; -using osu.Game.GameModes.Play; +using osu.Game.Screens.Play; namespace osu.Game.Beatmaps.Formats { diff --git a/osu.Game/Beatmaps/Objects/HitObject.cs b/osu.Game/Beatmaps/Objects/HitObject.cs index ef6659224f..597d6b4c6a 100644 --- a/osu.Game/Beatmaps/Objects/HitObject.cs +++ b/osu.Game/Beatmaps/Objects/HitObject.cs @@ -3,7 +3,7 @@ using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Beatmaps.Samples; -using osu.Game.GameModes.Play; +using osu.Game.Screens.Play; using OpenTK.Graphics; namespace osu.Game.Beatmaps.Objects diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 109d3eb527..bf56e10429 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -3,8 +3,8 @@ using osu.Framework.Configuration; using osu.Framework.Platform; -using osu.Game.GameModes.Play; using osu.Game.Online.API; +using osu.Game.Screens.Play; namespace osu.Game.Configuration { diff --git a/osu.Game/Database/BeatmapInfo.cs b/osu.Game/Database/BeatmapInfo.cs index 14bfcb337e..de3ba15508 100644 --- a/osu.Game/Database/BeatmapInfo.cs +++ b/osu.Game/Database/BeatmapInfo.cs @@ -1,7 +1,7 @@ using System; using System.Linq; using osu.Game.Beatmaps.Samples; -using osu.Game.GameModes.Play; +using osu.Game.Screens.Play; using SQLite.Net.Attributes; using SQLiteNetExtensions.Attributes; diff --git a/osu.Game/Database/BeatmapMetadata.cs b/osu.Game/Database/BeatmapMetadata.cs index 0b4d692abc..45b7b8de0f 100644 --- a/osu.Game/Database/BeatmapMetadata.cs +++ b/osu.Game/Database/BeatmapMetadata.cs @@ -1,7 +1,6 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.GameModes.Play; using SQLite.Net.Attributes; namespace osu.Game.Database diff --git a/osu.Game/GameModes/Menu/MenuVisualisation.cs b/osu.Game/GameModes/Menu/MenuVisualisation.cs deleted file mode 100644 index 84f150c413..0000000000 --- a/osu.Game/GameModes/Menu/MenuVisualisation.cs +++ /dev/null @@ -1,13 +0,0 @@ -using osu.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace osu.Game.GameModes.Menu -{ - internal class MenuVisualisation : Drawable - { - } -} diff --git a/osu.Game/Online/Chat/Display/ChannelDisplay.cs b/osu.Game/Online/Chat/Display/ChannelDisplay.cs index b3a08a1196..93e235f3f3 100644 --- a/osu.Game/Online/Chat/Display/ChannelDisplay.cs +++ b/osu.Game/Online/Chat/Display/ChannelDisplay.cs @@ -8,7 +8,6 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; -using osu.Game.Online.Chat.Display.osu.Online.Social; using OpenTK; using osu.Framework; using osu.Framework.Allocation; diff --git a/osu.Game/Online/Chat/Display/ChatLine.cs b/osu.Game/Online/Chat/Display/ChatLine.cs index 662a72f533..f214c24443 100644 --- a/osu.Game/Online/Chat/Display/ChatLine.cs +++ b/osu.Game/Online/Chat/Display/ChatLine.cs @@ -1,74 +1,67 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Sprites; using OpenTK; using OpenTK.Graphics; -using osu.Framework; -using osu.Framework.Graphics.Primitives; -using osu.Framework.Allocation; namespace osu.Game.Online.Chat.Display { - namespace osu.Online.Social + public class ChatLine : Container { - public class ChatLine : Container + public readonly Message Message; + + const float padding = 200; + const float text_size = 20; + + public ChatLine(Message message) { - public readonly Message Message; + this.Message = message; - const float padding = 200; - const float text_size = 20; + RelativeSizeAxes = Axes.X; + AutoSizeAxes = Axes.Y; - public ChatLine(Message message) + Children = new Drawable[] { - this.Message = message; - - RelativeSizeAxes = Axes.X; - AutoSizeAxes = Axes.Y; - - Children = new Drawable[] + new Container { - new Container + Size = new Vector2(padding, text_size), + Children = new Drawable[] { - Size = new Vector2(padding, text_size), - Children = new Drawable[] + new SpriteText { - new SpriteText - { - Text = Message.Timestamp.LocalDateTime.ToLongTimeString(), - TextSize = text_size, - Colour = new Color4(128, 128, 128, 255) - }, - new SpriteText - { - Text = Message.User.Name, - TextSize = text_size, - Origin = Anchor.TopRight, - Anchor = Anchor.TopRight, - } - } - }, - new Container - { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - Padding = new MarginPadding { Left = padding + 10 }, - Children = new Drawable[] + Text = Message.Timestamp.LocalDateTime.ToLongTimeString(), + TextSize = text_size, + Colour = new Color4(128, 128, 128, 255) + }, + new SpriteText { - new SpriteText - { - Text = Message.Content, - TextSize = text_size, - RelativeSizeAxes = Axes.X, - } + Text = Message.User.Name, + TextSize = text_size, + Origin = Anchor.TopRight, + Anchor = Anchor.TopRight, } } - }; - } + }, + new Container + { + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Padding = new MarginPadding { Left = padding + 10 }, + Children = new Drawable[] + { + new SpriteText + { + Text = Message.Content, + TextSize = text_size, + RelativeSizeAxes = Axes.X, + } + } + } + }; } } } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index c80562fc11..e78c58a656 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -6,22 +6,22 @@ using System.Threading; using osu.Framework.Configuration; using osu.Framework.GameModes; using osu.Game.Configuration; -using osu.Game.GameModes.Menu; using OpenTK; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Platform; -using osu.Game.GameModes.Play; using osu.Game.Overlays; using osu.Framework; using osu.Framework.Input; using osu.Game.Input; using OpenTK.Input; using osu.Framework.Logging; -using osu.Game.GameModes; using osu.Game.Graphics.UserInterface.Volume; using osu.Game.Database; using osu.Framework.Allocation; +using osu.Game.Screens; +using osu.Game.Screens.Menu; +using osu.Game.Screens.Play; namespace osu.Game { diff --git a/osu.Game/Overlays/Toolbar.cs b/osu.Game/Overlays/Toolbar.cs index 4f2513b130..77b35740ce 100644 --- a/osu.Game/Overlays/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar.cs @@ -9,10 +9,10 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transformations; using osu.Game.Configuration; -using osu.Game.GameModes.Play; using osu.Game.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Allocation; +using osu.Game.Screens.Play; namespace osu.Game.Overlays { diff --git a/osu.Game/Overlays/ToolbarModeButton.cs b/osu.Game/Overlays/ToolbarModeButton.cs index bd88eae7c9..e2982597f5 100644 --- a/osu.Game/Overlays/ToolbarModeButton.cs +++ b/osu.Game/Overlays/ToolbarModeButton.cs @@ -2,11 +2,11 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Extensions; -using osu.Game.GameModes.Play; using osu.Game.Graphics; using OpenTK.Graphics; using osu.Framework; using osu.Framework.Allocation; +using osu.Game.Screens.Play; namespace osu.Game.Overlays { diff --git a/osu.Game/Overlays/ToolbarModeSelector.cs b/osu.Game/Overlays/ToolbarModeSelector.cs index 3b17a28f81..a0b8216f98 100644 --- a/osu.Game/Overlays/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/ToolbarModeSelector.cs @@ -6,13 +6,13 @@ using System.Linq; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Transformations; -using osu.Game.GameModes.Play; using OpenTK; using OpenTK.Graphics; using osu.Framework; using osu.Framework.Caching; using osu.Framework.Graphics.Sprites; using osu.Framework.Allocation; +using osu.Game.Screens.Play; namespace osu.Game.Overlays { diff --git a/osu.Game/GameModes/BackgroundMode.cs b/osu.Game/Screens/BackgroundMode.cs similarity index 92% rename from osu.Game/GameModes/BackgroundMode.cs rename to osu.Game/Screens/BackgroundMode.cs index dd485df9d9..cf28abc1ac 100644 --- a/osu.Game/GameModes/BackgroundMode.cs +++ b/osu.Game/Screens/BackgroundMode.cs @@ -2,20 +2,16 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework.GameModes; -using osu.Framework.Graphics.Transformations; -using OpenTK; -using osu.Framework.Graphics; -using osu.Framework.Input; -using osu.Framework; using System.Threading; +using osu.Framework; using osu.Framework.Allocation; +using osu.Framework.GameModes; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Transformations; +using osu.Framework.Input; +using OpenTK; -namespace osu.Game.GameModes +namespace osu.Game.Screens { public abstract class BackgroundMode : GameMode, IEquatable { diff --git a/osu.Game/GameModes/Backgrounds/BackgroundModeCustom.cs b/osu.Game/Screens/Backgrounds/BackgroundModeCustom.cs similarity index 91% rename from osu.Game/GameModes/Backgrounds/BackgroundModeCustom.cs rename to osu.Game/Screens/Backgrounds/BackgroundModeCustom.cs index 0afb9c3945..9a2901ed63 100644 --- a/osu.Game/GameModes/Backgrounds/BackgroundModeCustom.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundModeCustom.cs @@ -3,7 +3,7 @@ using osu.Game.Graphics.Background; -namespace osu.Game.GameModes.Backgrounds +namespace osu.Game.Screens.Backgrounds { public class BackgroundModeCustom : BackgroundMode { diff --git a/osu.Game/GameModes/Backgrounds/BackgroundModeDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundModeDefault.cs similarity index 88% rename from osu.Game/GameModes/Backgrounds/BackgroundModeDefault.cs rename to osu.Game/Screens/Backgrounds/BackgroundModeDefault.cs index c7fe2139dc..aec43212f5 100644 --- a/osu.Game/GameModes/Backgrounds/BackgroundModeDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundModeDefault.cs @@ -5,7 +5,7 @@ using osu.Framework; using osu.Framework.Allocation; using osu.Game.Graphics.Background; -namespace osu.Game.GameModes.Backgrounds +namespace osu.Game.Screens.Backgrounds { public class BackgroundModeDefault : BackgroundMode { diff --git a/osu.Game/GameModes/Backgrounds/BackgroundModeEmpty.cs b/osu.Game/Screens/Backgrounds/BackgroundModeEmpty.cs similarity index 81% rename from osu.Game/GameModes/Backgrounds/BackgroundModeEmpty.cs rename to osu.Game/Screens/Backgrounds/BackgroundModeEmpty.cs index 6f38c03010..fafb5324b7 100644 --- a/osu.Game/GameModes/Backgrounds/BackgroundModeEmpty.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundModeEmpty.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.GameModes.Backgrounds +namespace osu.Game.Screens.Backgrounds { public class BackgroundModeEmpty : BackgroundMode { diff --git a/osu.Game/GameModes/Charts/ChartInfo.cs b/osu.Game/Screens/Charts/ChartInfo.cs similarity index 55% rename from osu.Game/GameModes/Charts/ChartInfo.cs rename to osu.Game/Screens/Charts/ChartInfo.cs index 67a11e632a..ef928ecf4c 100644 --- a/osu.Game/GameModes/Charts/ChartInfo.cs +++ b/osu.Game/Screens/Charts/ChartInfo.cs @@ -1,13 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace osu.Game.GameModes.Charts +namespace osu.Game.Screens.Charts { class ChartInfo : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Charts/ChartListing.cs b/osu.Game/Screens/Charts/ChartListing.cs similarity index 88% rename from osu.Game/GameModes/Charts/ChartListing.cs rename to osu.Game/Screens/Charts/ChartListing.cs index 7be9d09bcf..b3512907c1 100644 --- a/osu.Game/GameModes/Charts/ChartListing.cs +++ b/osu.Game/Screens/Charts/ChartListing.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace osu.Game.GameModes.Charts +namespace osu.Game.Screens.Charts { class ChartListing : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Direct/OnlineListing.cs b/osu.Game/Screens/Direct/OnlineListing.cs similarity index 82% rename from osu.Game/GameModes/Direct/OnlineListing.cs rename to osu.Game/Screens/Direct/OnlineListing.cs index c30017cb77..d4b6db51a4 100644 --- a/osu.Game/GameModes/Direct/OnlineListing.cs +++ b/osu.Game/Screens/Direct/OnlineListing.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.GameModes.Direct +namespace osu.Game.Screens.Direct { class OnlineListing : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Edit/EditSongSelect.cs b/osu.Game/Screens/Edit/EditSongSelect.cs similarity index 84% rename from osu.Game/GameModes/Edit/EditSongSelect.cs rename to osu.Game/Screens/Edit/EditSongSelect.cs index c4686b03ac..323a92f3b5 100644 --- a/osu.Game/GameModes/Edit/EditSongSelect.cs +++ b/osu.Game/Screens/Edit/EditSongSelect.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; -using osu.Game.GameModes.Backgrounds; +using osu.Game.Screens.Backgrounds; -namespace osu.Game.GameModes.Edit +namespace osu.Game.Screens.Edit { class EditSongSelect : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs similarity index 77% rename from osu.Game/GameModes/Edit/Editor.cs rename to osu.Game/Screens/Edit/Editor.cs index 495e2eef8e..058f1623fa 100644 --- a/osu.Game/GameModes/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -1,16 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Framework.GameModes; -using osu.Game.GameModes.Backgrounds; +using osu.Game.Screens.Backgrounds; using OpenTK.Graphics; -namespace osu.Game.GameModes.Edit +namespace osu.Game.Screens.Edit { class Editor : GameModeWhiteBox { diff --git a/osu.Game/GameModes/GameModeWhiteBox.cs b/osu.Game/Screens/GameModeWhiteBox.cs similarity index 95% rename from osu.Game/GameModes/GameModeWhiteBox.cs rename to osu.Game/Screens/GameModeWhiteBox.cs index 60630c5a9b..ac6cc5ece3 100644 --- a/osu.Game/GameModes/GameModeWhiteBox.cs +++ b/osu.Game/Screens/GameModeWhiteBox.cs @@ -9,13 +9,11 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.UserInterface; -using osu.Game.GameModes.Backgrounds; +using osu.Game.Screens.Backgrounds; using OpenTK; using OpenTK.Graphics; -using osu.Framework; -using osu.Framework.Allocation; -namespace osu.Game.GameModes +namespace osu.Game.Screens { public class GameModeWhiteBox : OsuGameMode { diff --git a/osu.Game/GameModes/Menu/Button.cs b/osu.Game/Screens/Menu/Button.cs similarity index 95% rename from osu.Game/GameModes/Menu/Button.cs rename to osu.Game/Screens/Menu/Button.cs index 8509766132..fa5dbb3b99 100644 --- a/osu.Game/GameModes/Menu/Button.cs +++ b/osu.Game/Screens/Menu/Button.cs @@ -1,18 +1,16 @@ -using OpenTK; -using OpenTK.Graphics; -using OpenTK.Input; +using System; using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.Input; using osu.Game.Graphics; -using System; -using osu.Framework.Allocation; +using OpenTK; +using OpenTK.Graphics; +using OpenTK.Input; -namespace osu.Game.GameModes.Menu +namespace osu.Game.Screens.Menu { /// /// Button designed specifically for the osu!next main menu. diff --git a/osu.Game/GameModes/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs similarity index 96% rename from osu.Game/GameModes/Menu/ButtonSystem.cs rename to osu.Game/Screens/Menu/ButtonSystem.cs index dec776da13..2d8ed9c374 100644 --- a/osu.Game/GameModes/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; @@ -13,10 +14,8 @@ using osu.Game.Graphics; using OpenTK; using OpenTK.Graphics; using OpenTK.Input; -using osu.Framework; -using osu.Framework.Allocation; -namespace osu.Game.GameModes.Menu +namespace osu.Game.Screens.Menu { public partial class ButtonSystem : Container, IStateful { diff --git a/osu.Game/GameModes/Menu/FlowContainerWithOrigin.cs b/osu.Game/Screens/Menu/FlowContainerWithOrigin.cs similarity index 87% rename from osu.Game/GameModes/Menu/FlowContainerWithOrigin.cs rename to osu.Game/Screens/Menu/FlowContainerWithOrigin.cs index d59c291d14..fc72365812 100644 --- a/osu.Game/GameModes/Menu/FlowContainerWithOrigin.cs +++ b/osu.Game/Screens/Menu/FlowContainerWithOrigin.cs @@ -1,8 +1,8 @@ -using OpenTK; -using osu.Framework.Graphics; +using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using OpenTK; -namespace osu.Game.GameModes.Menu +namespace osu.Game.Screens.Menu { /// /// A flow container with an origin based on one of its contained drawables. diff --git a/osu.Game/GameModes/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs similarity index 92% rename from osu.Game/GameModes/Menu/Intro.cs rename to osu.Game/Screens/Menu/Intro.cs index 92d64f838b..4875c8b7eb 100644 --- a/osu.Game/GameModes/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -1,19 +1,17 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Threading; +using osu.Framework.Allocation; +using osu.Framework.Audio; using osu.Framework.Audio.Sample; using osu.Framework.Audio.Track; using osu.Framework.GameModes; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; -using osu.Game.GameModes.Backgrounds; +using osu.Game.Screens.Backgrounds; using OpenTK.Graphics; -using osu.Framework; -using osu.Framework.Allocation; -using osu.Framework.Audio; -namespace osu.Game.GameModes.Menu +namespace osu.Game.Screens.Menu { class Intro : OsuGameMode { diff --git a/osu.Game/GameModes/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs similarity index 85% rename from osu.Game/GameModes/Menu/MainMenu.cs rename to osu.Game/Screens/Menu/MainMenu.cs index ed29d5e3db..11aaf3cc19 100644 --- a/osu.Game/GameModes/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -1,26 +1,21 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Linq; +using osu.Framework.Allocation; using osu.Framework.GameModes; using osu.Framework.GameModes.Testing; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; -using osu.Game.GameModes.Backgrounds; -using osu.Game.GameModes.Charts; -using osu.Game.GameModes.Direct; -using osu.Game.GameModes.Edit; -using osu.Game.GameModes.Multiplayer; -using osu.Game.GameModes.Play; using osu.Game.Graphics.Containers; +using osu.Game.Screens.Backgrounds; +using osu.Game.Screens.Charts; +using osu.Game.Screens.Direct; +using osu.Game.Screens.Edit; +using osu.Game.Screens.Multiplayer; +using osu.Game.Screens.Play; using OpenTK; -using osu.Framework; -using osu.Game.Overlays; -using System.Threading.Tasks; -using osu.Game.Configuration; -using osu.Framework.Allocation; -namespace osu.Game.GameModes.Menu +namespace osu.Game.Screens.Menu { public class MainMenu : OsuGameMode { diff --git a/osu.Game/Screens/Menu/MenuVisualisation.cs b/osu.Game/Screens/Menu/MenuVisualisation.cs new file mode 100644 index 0000000000..194b0eee02 --- /dev/null +++ b/osu.Game/Screens/Menu/MenuVisualisation.cs @@ -0,0 +1,8 @@ +using osu.Framework.Graphics; + +namespace osu.Game.Screens.Menu +{ + internal class MenuVisualisation : Drawable + { + } +} diff --git a/osu.Game/GameModes/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs similarity index 95% rename from osu.Game/GameModes/Menu/OsuLogo.cs rename to osu.Game/Screens/Menu/OsuLogo.cs index 0663b79161..6047339b25 100644 --- a/osu.Game/GameModes/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -2,17 +2,16 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using osu.Framework.Input; -using osu.Framework; using OpenTK; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Textures; -namespace osu.Game.GameModes.Menu +namespace osu.Game.Screens.Menu { /// /// osu! logo and its attachments (pulsing, visualiser etc.) diff --git a/osu.Game/GameModes/Multiplayer/Lobby.cs b/osu.Game/Screens/Multiplayer/Lobby.cs similarity index 75% rename from osu.Game/GameModes/Multiplayer/Lobby.cs rename to osu.Game/Screens/Multiplayer/Lobby.cs index 6700736234..565e671150 100644 --- a/osu.Game/GameModes/Multiplayer/Lobby.cs +++ b/osu.Game/Screens/Multiplayer/Lobby.cs @@ -3,11 +3,8 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace osu.Game.GameModes.Multiplayer +namespace osu.Game.Screens.Multiplayer { class Lobby : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Multiplayer/Match.cs b/osu.Game/Screens/Multiplayer/Match.cs similarity index 81% rename from osu.Game/GameModes/Multiplayer/Match.cs rename to osu.Game/Screens/Multiplayer/Match.cs index d5dfdffdb3..11d9ef4b8e 100644 --- a/osu.Game/GameModes/Multiplayer/Match.cs +++ b/osu.Game/Screens/Multiplayer/Match.cs @@ -3,15 +3,12 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Framework.GameModes; -using osu.Game.GameModes.Backgrounds; -using osu.Game.GameModes.Play; +using osu.Game.Screens.Backgrounds; +using osu.Game.Screens.Play; using OpenTK.Graphics; -namespace osu.Game.GameModes.Multiplayer +namespace osu.Game.Screens.Multiplayer { class Match : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Multiplayer/MatchCreate.cs b/osu.Game/Screens/Multiplayer/MatchCreate.cs similarity index 74% rename from osu.Game/GameModes/Multiplayer/MatchCreate.cs rename to osu.Game/Screens/Multiplayer/MatchCreate.cs index 8d134d170e..c6c070661c 100644 --- a/osu.Game/GameModes/Multiplayer/MatchCreate.cs +++ b/osu.Game/Screens/Multiplayer/MatchCreate.cs @@ -3,11 +3,8 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace osu.Game.GameModes.Multiplayer +namespace osu.Game.Screens.Multiplayer { class MatchCreate : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Multiplayer/MatchSongSelect.cs b/osu.Game/Screens/Multiplayer/MatchSongSelect.cs similarity index 54% rename from osu.Game/GameModes/Multiplayer/MatchSongSelect.cs rename to osu.Game/Screens/Multiplayer/MatchSongSelect.cs index da86641c04..442dea9f30 100644 --- a/osu.Game/GameModes/Multiplayer/MatchSongSelect.cs +++ b/osu.Game/Screens/Multiplayer/MatchSongSelect.cs @@ -1,16 +1,9 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework.GameModes; -using osu.Game.GameModes.Backgrounds; -using OpenTK.Graphics; +using osu.Game.Screens.Backgrounds; -namespace osu.Game.GameModes.Multiplayer +namespace osu.Game.Screens.Multiplayer { class MatchSongSelect : GameModeWhiteBox { diff --git a/osu.Game/GameModes/OsuGameMode.cs b/osu.Game/Screens/OsuGameMode.cs similarity index 90% rename from osu.Game/GameModes/OsuGameMode.cs rename to osu.Game/Screens/OsuGameMode.cs index 0c44a6488a..b919e257d4 100644 --- a/osu.Game/GameModes/OsuGameMode.cs +++ b/osu.Game/Screens/OsuGameMode.cs @@ -2,21 +2,13 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework; using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.GameModes; -using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps; -using osu.Game.Graphics.Background; using osu.Game.Graphics.Containers; -namespace osu.Game.GameModes +namespace osu.Game.Screens { public abstract class OsuGameMode : GameMode { diff --git a/osu.Game/GameModes/Play/Catch/CatchComboCounter.cs b/osu.Game/Screens/Play/Catch/CatchComboCounter.cs similarity index 87% rename from osu.Game/GameModes/Play/Catch/CatchComboCounter.cs rename to osu.Game/Screens/Play/Catch/CatchComboCounter.cs index cf6f153ea1..19c9a4ddf2 100644 --- a/osu.Game/GameModes/Play/Catch/CatchComboCounter.cs +++ b/osu.Game/Screens/Play/Catch/CatchComboCounter.cs @@ -1,15 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Screens.Play.Osu; using OpenTK.Graphics; -using osu.Game.GameModes.Play.Osu; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace osu.Game.GameModes.Play.Catch +namespace osu.Game.Screens.Play.Catch { /// /// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch. diff --git a/osu.Game/GameModes/Play/Catch/CatchHitRenderer.cs b/osu.Game/Screens/Play/Catch/CatchHitRenderer.cs similarity index 81% rename from osu.Game/GameModes/Play/Catch/CatchHitRenderer.cs rename to osu.Game/Screens/Play/Catch/CatchHitRenderer.cs index 729839de7c..114dd0c930 100644 --- a/osu.Game/GameModes/Play/Catch/CatchHitRenderer.cs +++ b/osu.Game/Screens/Play/Catch/CatchHitRenderer.cs @@ -1,12 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Objects.Catch; -using osu.Game.Beatmaps.Objects.Catch.Drawable; -namespace osu.Game.GameModes.Play.Catch +namespace osu.Game.Screens.Play.Catch { public class CatchHitRenderer : HitRenderer { diff --git a/osu.Game/GameModes/Play/Catch/CatchPlayfield.cs b/osu.Game/Screens/Play/Catch/CatchPlayfield.cs similarity index 76% rename from osu.Game/GameModes/Play/Catch/CatchPlayfield.cs rename to osu.Game/Screens/Play/Catch/CatchPlayfield.cs index 7db68771c0..92ab69a627 100644 --- a/osu.Game/GameModes/Play/Catch/CatchPlayfield.cs +++ b/osu.Game/Screens/Play/Catch/CatchPlayfield.cs @@ -2,14 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using OpenTK; -using OpenTK.Graphics; -using osu.Framework; -using osu.Framework.Allocation; -namespace osu.Game.GameModes.Play.Catch +namespace osu.Game.Screens.Play.Catch { public class CatchPlayfield : Playfield { diff --git a/osu.Game/GameModes/Play/Catch/CatchRuleset.cs b/osu.Game/Screens/Play/Catch/CatchRuleset.cs similarity index 73% rename from osu.Game/GameModes/Play/Catch/CatchRuleset.cs rename to osu.Game/Screens/Play/Catch/CatchRuleset.cs index 5aa77f1f2e..ab887a23f8 100644 --- a/osu.Game/GameModes/Play/Catch/CatchRuleset.cs +++ b/osu.Game/Screens/Play/Catch/CatchRuleset.cs @@ -1,15 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Game.Beatmaps.Objects; -using osu.Game.GameModes.Play.Osu; +using osu.Game.Screens.Play.Osu; -namespace osu.Game.GameModes.Play.Catch +namespace osu.Game.Screens.Play.Catch { class CatchRuleset : Ruleset { diff --git a/osu.Game/GameModes/Play/ComboCounter.cs b/osu.Game/Screens/Play/ComboCounter.cs similarity index 93% rename from osu.Game/GameModes/Play/ComboCounter.cs rename to osu.Game/Screens/Play/ComboCounter.cs index 96660afb6a..f634e215b5 100644 --- a/osu.Game/GameModes/Play/ComboCounter.cs +++ b/osu.Game/Screens/Play/ComboCounter.cs @@ -1,22 +1,13 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.MathUtils; -using osu.Framework.Timing; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework.Allocation; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public abstract class ComboCounter : Container { diff --git a/osu.Game/GameModes/Play/ComboResultCounter.cs b/osu.Game/Screens/Play/ComboResultCounter.cs similarity index 88% rename from osu.Game/GameModes/Play/ComboResultCounter.cs rename to osu.Game/Screens/Play/ComboResultCounter.cs index 9607c6df14..0c6eb8f2fe 100644 --- a/osu.Game/GameModes/Play/ComboResultCounter.cs +++ b/osu.Game/Screens/Play/ComboResultCounter.cs @@ -1,18 +1,13 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; using osu.Framework.MathUtils; -using osu.Framework.Timing; using osu.Game.Graphics.UserInterface; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { /// /// Used to display combo with a roll-up animation in results screen. diff --git a/osu.Game/GameModes/Play/HitRenderer.cs b/osu.Game/Screens/Play/HitRenderer.cs similarity index 93% rename from osu.Game/GameModes/Play/HitRenderer.cs rename to osu.Game/Screens/Play/HitRenderer.cs index 0766e0f6b4..8dd1ab97aa 100644 --- a/osu.Game/GameModes/Play/HitRenderer.cs +++ b/osu.Game/Screens/Play/HitRenderer.cs @@ -1,16 +1,15 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; using System.Collections.Generic; +using System.Linq; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps.Objects; -using osu.Framework; -using System; -using System.Linq; -using osu.Framework.Allocation; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public abstract class HitRenderer : Container { diff --git a/osu.Game/GameModes/Play/Mania/ManiaComboCounter.cs b/osu.Game/Screens/Play/Mania/ManiaComboCounter.cs similarity index 89% rename from osu.Game/GameModes/Play/Mania/ManiaComboCounter.cs rename to osu.Game/Screens/Play/Mania/ManiaComboCounter.cs index 0a087225fc..9be76a112f 100644 --- a/osu.Game/GameModes/Play/Mania/ManiaComboCounter.cs +++ b/osu.Game/Screens/Play/Mania/ManiaComboCounter.cs @@ -1,18 +1,12 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK.Graphics; -using osu.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; -using osu.Game.GameModes.Play.Taiko; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using osu.Game.Screens.Play.Taiko; +using OpenTK.Graphics; -namespace osu.Game.GameModes.Play.Mania +namespace osu.Game.Screens.Play.Mania { /// /// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania. diff --git a/osu.Game/GameModes/Play/Mania/ManiaHitRenderer.cs b/osu.Game/Screens/Play/Mania/ManiaHitRenderer.cs similarity index 85% rename from osu.Game/GameModes/Play/Mania/ManiaHitRenderer.cs rename to osu.Game/Screens/Play/Mania/ManiaHitRenderer.cs index 417ed1b698..73c106949b 100644 --- a/osu.Game/GameModes/Play/Mania/ManiaHitRenderer.cs +++ b/osu.Game/Screens/Play/Mania/ManiaHitRenderer.cs @@ -1,13 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; -using osu.Framework.Graphics; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Objects.Mania; -using osu.Game.Beatmaps.Objects.Mania.Drawable; -namespace osu.Game.GameModes.Play.Mania +namespace osu.Game.Screens.Play.Mania { public class ManiaHitRenderer : HitRenderer { diff --git a/osu.Game/GameModes/Play/Mania/ManiaPlayfield.cs b/osu.Game/Screens/Play/Mania/ManiaPlayfield.cs similarity index 93% rename from osu.Game/GameModes/Play/Mania/ManiaPlayfield.cs rename to osu.Game/Screens/Play/Mania/ManiaPlayfield.cs index c5b13fdaeb..b5f91de664 100644 --- a/osu.Game/GameModes/Play/Mania/ManiaPlayfield.cs +++ b/osu.Game/Screens/Play/Mania/ManiaPlayfield.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics.Sprites; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.GameModes.Play.Mania +namespace osu.Game.Screens.Play.Mania { public class ManiaPlayfield : Playfield { diff --git a/osu.Game/GameModes/Play/Mania/ManiaRuleset.cs b/osu.Game/Screens/Play/Mania/ManiaRuleset.cs similarity index 73% rename from osu.Game/GameModes/Play/Mania/ManiaRuleset.cs rename to osu.Game/Screens/Play/Mania/ManiaRuleset.cs index 3b37082c39..193a1b35ac 100644 --- a/osu.Game/GameModes/Play/Mania/ManiaRuleset.cs +++ b/osu.Game/Screens/Play/Mania/ManiaRuleset.cs @@ -1,15 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Game.Beatmaps.Objects; -using osu.Game.GameModes.Play.Osu; +using osu.Game.Screens.Play.Osu; -namespace osu.Game.GameModes.Play.Mania +namespace osu.Game.Screens.Play.Mania { class ManiaRuleset : Ruleset { diff --git a/osu.Game/GameModes/Play/ModSelect.cs b/osu.Game/Screens/Play/ModSelect.cs similarity index 77% rename from osu.Game/GameModes/Play/ModSelect.cs rename to osu.Game/Screens/Play/ModSelect.cs index 33cb00ce35..cead514e11 100644 --- a/osu.Game/GameModes/Play/ModSelect.cs +++ b/osu.Game/Screens/Play/ModSelect.cs @@ -1,16 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using OpenTK.Graphics; using osu.Framework.GameModes; -using osu.Game.GameModes.Backgrounds; +using osu.Game.Screens.Backgrounds; +using OpenTK.Graphics; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { class ModSelect : GameModeWhiteBox { diff --git a/osu.Game/GameModes/Play/Osu/OsuComboCounter.cs b/osu.Game/Screens/Play/Osu/OsuComboCounter.cs similarity index 92% rename from osu.Game/GameModes/Play/Osu/OsuComboCounter.cs rename to osu.Game/Screens/Play/Osu/OsuComboCounter.cs index 5fdc4fcc5e..3a86f79ac1 100644 --- a/osu.Game/GameModes/Play/Osu/OsuComboCounter.cs +++ b/osu.Game/Screens/Play/Osu/OsuComboCounter.cs @@ -2,15 +2,8 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK; -using osu.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework.Allocation; -namespace osu.Game.GameModes.Play.Osu +namespace osu.Game.Screens.Play.Osu { /// /// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard. diff --git a/osu.Game/GameModes/Play/Osu/OsuHitRenderer.cs b/osu.Game/Screens/Play/Osu/OsuHitRenderer.cs similarity index 88% rename from osu.Game/GameModes/Play/Osu/OsuHitRenderer.cs rename to osu.Game/Screens/Play/Osu/OsuHitRenderer.cs index 9e12d69d2b..b982998c3e 100644 --- a/osu.Game/GameModes/Play/Osu/OsuHitRenderer.cs +++ b/osu.Game/Screens/Play/Osu/OsuHitRenderer.cs @@ -1,12 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Beatmaps.Objects.Osu.Drawable; -namespace osu.Game.GameModes.Play.Osu +namespace osu.Game.Screens.Play.Osu { public class OsuHitRenderer : HitRenderer { diff --git a/osu.Game/GameModes/Play/Osu/OsuPlayfield.cs b/osu.Game/Screens/Play/Osu/OsuPlayfield.cs similarity index 93% rename from osu.Game/GameModes/Play/Osu/OsuPlayfield.cs rename to osu.Game/Screens/Play/Osu/OsuPlayfield.cs index 09a7666246..291bfd16be 100644 --- a/osu.Game/GameModes/Play/Osu/OsuPlayfield.cs +++ b/osu.Game/Screens/Play/Osu/OsuPlayfield.cs @@ -3,12 +3,11 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using OpenTK; -using osu.Framework; using osu.Framework.Graphics.Sprites; +using OpenTK; using OpenTK.Graphics; -namespace osu.Game.GameModes.Play.Osu +namespace osu.Game.Screens.Play.Osu { public class OsuPlayfield : Playfield { diff --git a/osu.Game/GameModes/Play/Osu/OsuRuleset.cs b/osu.Game/Screens/Play/Osu/OsuRuleset.cs similarity index 77% rename from osu.Game/GameModes/Play/Osu/OsuRuleset.cs rename to osu.Game/Screens/Play/Osu/OsuRuleset.cs index 33eeb72e3f..afc461d876 100644 --- a/osu.Game/GameModes/Play/Osu/OsuRuleset.cs +++ b/osu.Game/Screens/Play/Osu/OsuRuleset.cs @@ -1,14 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Game.Beatmaps.Objects; -namespace osu.Game.GameModes.Play.Osu +namespace osu.Game.Screens.Play.Osu { class OsuRuleset : Ruleset { diff --git a/osu.Game/GameModes/Play/Osu/ScoreOverlayOsu.cs b/osu.Game/Screens/Play/Osu/ScoreOverlayOsu.cs similarity index 86% rename from osu.Game/GameModes/Play/Osu/ScoreOverlayOsu.cs rename to osu.Game/Screens/Play/Osu/ScoreOverlayOsu.cs index 1622379fe8..dda22cbbb6 100644 --- a/osu.Game/GameModes/Play/Osu/ScoreOverlayOsu.cs +++ b/osu.Game/Screens/Play/Osu/ScoreOverlayOsu.cs @@ -1,18 +1,12 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; using OpenTK; using OpenTK.Input; -using osu.Game.Beatmaps.Objects; -namespace osu.Game.GameModes.Play.Osu +namespace osu.Game.Screens.Play.Osu { class ScoreOverlayOsu : ScoreOverlay { diff --git a/osu.Game/GameModes/Play/PlayMode.cs b/osu.Game/Screens/Play/PlayMode.cs similarity index 88% rename from osu.Game/GameModes/Play/PlayMode.cs rename to osu.Game/Screens/Play/PlayMode.cs index 8234baa523..c1c3f25e72 100644 --- a/osu.Game/GameModes/Play/PlayMode.cs +++ b/osu.Game/Screens/Play/PlayMode.cs @@ -4,7 +4,7 @@ using System.ComponentModel; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public enum PlayMode { diff --git a/osu.Game/GameModes/Play/PlaySongSelect.cs b/osu.Game/Screens/Play/PlaySongSelect.cs similarity index 95% rename from osu.Game/GameModes/Play/PlaySongSelect.cs rename to osu.Game/Screens/Play/PlaySongSelect.cs index d083808e5d..352a307f63 100644 --- a/osu.Game/GameModes/Play/PlaySongSelect.cs +++ b/osu.Game/Screens/Play/PlaySongSelect.cs @@ -2,29 +2,26 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Diagnostics; -using osu.Framework.Configuration; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Sprites; -using osu.Game.GameModes.Backgrounds; -using osu.Framework; -using osu.Game.Database; -using osu.Framework.Graphics.Primitives; using System.Linq; -using OpenTK; -using OpenTK.Graphics; -using osu.Framework.Graphics.UserInterface; using System.Threading.Tasks; -using osu.Framework.Audio.Track; -using osu.Game.Beatmaps.Drawable; -using osu.Framework.Extensions.IEnumerableExtensions; -using osu.Game.Beatmaps; -using osu.Framework.GameModes; using osu.Framework.Allocation; using osu.Framework.Audio; +using osu.Framework.Audio.Track; +using osu.Framework.Configuration; +using osu.Framework.GameModes; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.UserInterface; +using osu.Game.Beatmaps; +using osu.Game.Beatmaps.Drawable; +using osu.Game.Database; +using osu.Game.Screens.Backgrounds; +using OpenTK; +using OpenTK.Graphics; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public class PlaySongSelect : OsuGameMode { diff --git a/osu.Game/GameModes/Play/Player.cs b/osu.Game/Screens/Play/Player.cs similarity index 90% rename from osu.Game/GameModes/Play/Player.cs rename to osu.Game/Screens/Play/Player.cs index a511921c4e..62a0e7dce5 100644 --- a/osu.Game/GameModes/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -1,28 +1,21 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics; -using osu.Game.Beatmaps.Objects; -using osu.Game.GameModes.Backgrounds; -using osu.Game.GameModes.Play.Catch; -using osu.Game.GameModes.Play.Mania; -using osu.Game.GameModes.Play.Osu; -using osu.Game.GameModes.Play.Taiko; -using osu.Framework; -using osu.Game.Database; -using osu.Framework.Timing; -using osu.Framework.Audio.Track; -using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Allocation; using osu.Framework.Audio; -using osu.Framework.Graphics.Cursor; +using osu.Framework.Audio.Track; +using osu.Framework.Extensions.IEnumerableExtensions; +using osu.Framework.Graphics; using osu.Framework.Input; using osu.Framework.Platform; +using osu.Framework.Timing; +using osu.Game.Beatmaps.Objects; +using osu.Game.Database; +using osu.Game.Screens.Backgrounds; using OpenTK.Input; using MouseState = osu.Framework.Input.MouseState; -using osu.Framework.Graphics.Primitives; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public class Player : OsuGameMode { diff --git a/osu.Game/GameModes/Play/Playfield.cs b/osu.Game/Screens/Play/Playfield.cs similarity index 78% rename from osu.Game/GameModes/Play/Playfield.cs rename to osu.Game/Screens/Play/Playfield.cs index d87bec8011..1acd52638b 100644 --- a/osu.Game/GameModes/Play/Playfield.cs +++ b/osu.Game/Screens/Play/Playfield.cs @@ -1,10 +1,9 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework; using osu.Framework.Graphics.Containers; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public class Playfield : Container { diff --git a/osu.Game/GameModes/Play/Ruleset.cs b/osu.Game/Screens/Play/Ruleset.cs similarity index 74% rename from osu.Game/GameModes/Play/Ruleset.cs rename to osu.Game/Screens/Play/Ruleset.cs index a5cbc63269..5deb994309 100644 --- a/osu.Game/GameModes/Play/Ruleset.cs +++ b/osu.Game/Screens/Play/Ruleset.cs @@ -1,18 +1,14 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Game.Beatmaps.Objects; -using osu.Game.GameModes.Play.Catch; -using osu.Game.GameModes.Play.Mania; -using osu.Game.GameModes.Play.Osu; -using osu.Game.GameModes.Play.Taiko; +using osu.Game.Screens.Play.Catch; +using osu.Game.Screens.Play.Mania; +using osu.Game.Screens.Play.Osu; +using osu.Game.Screens.Play.Taiko; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public abstract class Ruleset { diff --git a/osu.Game/GameModes/Play/ScoreOverlay.cs b/osu.Game/Screens/Play/ScoreOverlay.cs similarity index 89% rename from osu.Game/GameModes/Play/ScoreOverlay.cs rename to osu.Game/Screens/Play/ScoreOverlay.cs index 3d60df1858..f242a97da2 100644 --- a/osu.Game/GameModes/Play/ScoreOverlay.cs +++ b/osu.Game/Screens/Play/ScoreOverlay.cs @@ -2,16 +2,12 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Beatmaps.Objects; using osu.Game.Graphics.UserInterface; -namespace osu.Game.GameModes.Play +namespace osu.Game.Screens.Play { public abstract class ScoreOverlay : Container { diff --git a/osu.Game/GameModes/Play/Taiko/TaikoComboCounter.cs b/osu.Game/Screens/Play/Taiko/TaikoComboCounter.cs similarity index 90% rename from osu.Game/GameModes/Play/Taiko/TaikoComboCounter.cs rename to osu.Game/Screens/Play/Taiko/TaikoComboCounter.cs index 70afd31988..beb96f94f9 100644 --- a/osu.Game/GameModes/Play/Taiko/TaikoComboCounter.cs +++ b/osu.Game/Screens/Play/Taiko/TaikoComboCounter.cs @@ -1,15 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK; using osu.Framework.Graphics.Transformations; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using OpenTK; -namespace osu.Game.GameModes.Play.Taiko +namespace osu.Game.Screens.Play.Taiko { /// /// Allows tint and scaling animations. Used in osu!taiko. diff --git a/osu.Game/GameModes/Play/Taiko/TaikoHitRenderer.cs b/osu.Game/Screens/Play/Taiko/TaikoHitRenderer.cs similarity index 81% rename from osu.Game/GameModes/Play/Taiko/TaikoHitRenderer.cs rename to osu.Game/Screens/Play/Taiko/TaikoHitRenderer.cs index 837185d4d8..ec02c89d9a 100644 --- a/osu.Game/GameModes/Play/Taiko/TaikoHitRenderer.cs +++ b/osu.Game/Screens/Play/Taiko/TaikoHitRenderer.cs @@ -1,12 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Graphics; using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Objects.Taiko; -using osu.Game.Beatmaps.Objects.Taiko.Drawable; -namespace osu.Game.GameModes.Play.Taiko +namespace osu.Game.Screens.Play.Taiko { public class TaikoHitRenderer : HitRenderer { diff --git a/osu.Game/GameModes/Play/Taiko/TaikoPlayfield.cs b/osu.Game/Screens/Play/Taiko/TaikoPlayfield.cs similarity index 88% rename from osu.Game/GameModes/Play/Taiko/TaikoPlayfield.cs rename to osu.Game/Screens/Play/Taiko/TaikoPlayfield.cs index b563cc718a..c8dee06a45 100644 --- a/osu.Game/GameModes/Play/Taiko/TaikoPlayfield.cs +++ b/osu.Game/Screens/Play/Taiko/TaikoPlayfield.cs @@ -1,16 +1,14 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //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.Containers; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; using OpenTK; using OpenTK.Graphics; -using osu.Framework; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Textures; -namespace osu.Game.GameModes.Play.Taiko +namespace osu.Game.Screens.Play.Taiko { public class TaikoPlayfield : Playfield { diff --git a/osu.Game/GameModes/Play/Taiko/TaikoRuleset.cs b/osu.Game/Screens/Play/Taiko/TaikoRuleset.cs similarity index 73% rename from osu.Game/GameModes/Play/Taiko/TaikoRuleset.cs rename to osu.Game/Screens/Play/Taiko/TaikoRuleset.cs index dacf17df21..0ae94a118a 100644 --- a/osu.Game/GameModes/Play/Taiko/TaikoRuleset.cs +++ b/osu.Game/Screens/Play/Taiko/TaikoRuleset.cs @@ -1,15 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Game.Beatmaps.Objects; -using osu.Game.GameModes.Play.Osu; +using osu.Game.Screens.Play.Osu; -namespace osu.Game.GameModes.Play.Taiko +namespace osu.Game.Screens.Play.Taiko { class TaikoRuleset : Ruleset { diff --git a/osu.Game/GameModes/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs similarity index 88% rename from osu.Game/GameModes/Ranking/Results.cs rename to osu.Game/Screens/Ranking/Results.cs index 5c941e85a8..b1d55ab54a 100644 --- a/osu.Game/GameModes/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -2,10 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.GameModes; -using osu.Game.GameModes.Backgrounds; +using osu.Game.Screens.Backgrounds; using OpenTK.Graphics; -namespace osu.Game.GameModes.Ranking +namespace osu.Game.Screens.Ranking { class Results : GameModeWhiteBox { diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 09e19ef4e5..4e056a03e7 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -102,56 +102,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + @@ -159,15 +159,15 @@ - + - - + + From 06f4f9391858949be3ced5886cb6df7b8af90b9b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 18:03:20 +0900 Subject: [PATCH 02/10] Move play modes to Modes namespace. --- .../Tests/TestCaseGamefield.cs | 12 +-- .../Tests/TestCaseHitObjects.cs | 6 +- .../Tests/TestCasePlaySongSelect.cs | 1 + .../Tests/TestCasePlayer.cs | 4 +- .../Tests/TestCaseScoreCounter.cs | 9 +- .../Beatmaps/Formats/OsuLegacyDecoderTest.cs | 3 +- .../Beatmaps/IO/ImportBeatmapTest.cs | 1 + osu.Game/Beatmaps/Beatmap.cs | 2 +- osu.Game/Beatmaps/Formats/BeatmapDecoder.cs | 2 +- osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs | 3 +- osu.Game/Configuration/OsuConfigManager.cs | 1 + osu.Game/Database/BeatmapInfo.cs | 1 + .../Play => Modes}/Catch/CatchComboCounter.cs | 4 +- .../Play => Modes}/Catch/CatchHitRenderer.cs | 6 +- .../Play => Modes}/Catch/CatchPlayfield.cs | 2 +- .../Play => Modes}/Catch/CatchRuleset.cs | 6 +- .../{Screens/Play => Modes}/ComboCounter.cs | 2 +- .../Play => Modes}/ComboResultCounter.cs | 2 +- .../{Screens/Play => Modes}/HitRenderer.cs | 4 +- .../Play => Modes}/Mania/ManiaComboCounter.cs | 4 +- .../Play => Modes}/Mania/ManiaHitRenderer.cs | 6 +- .../Play => Modes}/Mania/ManiaPlayfield.cs | 2 +- .../Play => Modes}/Mania/ManiaRuleset.cs | 6 +- .../Objects/Catch/CatchBaseHit.cs | 2 +- .../Objects/Catch/CatchConverter.cs | 9 +- .../Objects/Catch/Drawable/DrawableFruit.cs | 12 +-- .../Objects/Catch/Droplet.cs | 2 +- .../Objects/Catch/Fruit.cs | 2 +- .../Objects/DrawableHitObject.cs | 7 +- .../{Beatmaps => Modes}/Objects/HitObject.cs | 5 +- .../Objects/HitObjectConverter.cs | 2 +- .../Objects/Mania/Drawable/DrawableNote.cs | 7 +- .../Objects/Mania/HoldNote.cs | 2 +- .../Objects/Mania/ManiaBaseHit.cs | 2 +- .../Objects/Mania/ManiaConverter.cs | 4 +- .../{Beatmaps => Modes}/Objects/Mania/Note.cs | 2 +- .../{Beatmaps => Modes}/Objects/Osu/Circle.cs | 4 +- .../Objects/Osu/Drawable/DrawableCircle.cs | 4 +- .../Objects/Osu/OsuBaseHit.cs | 4 +- .../Objects/Osu/OsuConverter.cs | 3 +- .../{Beatmaps => Modes}/Objects/Osu/Slider.cs | 2 +- .../Objects/Osu/Spinner.cs | 2 +- .../Taiko/Drawable/DrawableTaikoHit.cs | 7 +- .../Objects/Taiko/TaikoBaseHit.cs | 2 +- .../Objects/Taiko/TaikoConverter.cs | 5 +- .../Play => Modes}/Osu/OsuComboCounter.cs | 2 +- .../Play => Modes}/Osu/OsuHitRenderer.cs | 8 +- .../Play => Modes}/Osu/OsuPlayfield.cs | 2 +- .../{Screens/Play => Modes}/Osu/OsuRuleset.cs | 4 +- .../Play => Modes}/Osu/ScoreOverlayOsu.cs | 2 +- osu.Game/{Screens/Play => Modes}/PlayMode.cs | 2 +- osu.Game/{Screens/Play => Modes}/Playfield.cs | 2 +- osu.Game/{Screens/Play => Modes}/Ruleset.cs | 12 +-- .../{Screens/Play => Modes}/ScoreOverlay.cs | 4 +- .../Play => Modes}/Taiko/TaikoComboCounter.cs | 2 +- .../Play => Modes}/Taiko/TaikoHitRenderer.cs | 6 +- .../Play => Modes}/Taiko/TaikoPlayfield.cs | 2 +- .../Play => Modes}/Taiko/TaikoRuleset.cs | 6 +- osu.Game/OsuGame.cs | 1 + osu.Game/Overlays/Toolbar.cs | 1 + osu.Game/Overlays/ToolbarModeButton.cs | 1 + osu.Game/Overlays/ToolbarModeSelector.cs | 1 + osu.Game/Screens/Menu/MainMenu.cs | 1 + osu.Game/Screens/Play/PlaySongSelect.cs | 1 + osu.Game/Screens/Play/Player.cs | 3 +- osu.Game/osu.Game.csproj | 92 +++++++++---------- 66 files changed, 163 insertions(+), 172 deletions(-) rename osu.Game/{Screens/Play => Modes}/Catch/CatchComboCounter.cs (93%) rename osu.Game/{Screens/Play => Modes}/Catch/CatchHitRenderer.cs (80%) rename osu.Game/{Screens/Play => Modes}/Catch/CatchPlayfield.cs (90%) rename osu.Game/{Screens/Play => Modes}/Catch/CatchRuleset.cs (78%) rename osu.Game/{Screens/Play => Modes}/ComboCounter.cs (96%) rename osu.Game/{Screens/Play => Modes}/ComboResultCounter.cs (95%) rename osu.Game/{Screens/Play => Modes}/HitRenderer.cs (93%) rename osu.Game/{Screens/Play => Modes}/Mania/ManiaComboCounter.cs (94%) rename osu.Game/{Screens/Play => Modes}/Mania/ManiaHitRenderer.cs (86%) rename osu.Game/{Screens/Play => Modes}/Mania/ManiaPlayfield.cs (93%) rename osu.Game/{Screens/Play => Modes}/Mania/ManiaRuleset.cs (78%) rename osu.Game/{Beatmaps => Modes}/Objects/Catch/CatchBaseHit.cs (82%) rename osu.Game/{Beatmaps => Modes}/Objects/Catch/CatchConverter.cs (80%) rename osu.Game/{Beatmaps => Modes}/Objects/Catch/Drawable/DrawableFruit.cs (84%) rename osu.Game/{Beatmaps => Modes}/Objects/Catch/Droplet.cs (80%) rename osu.Game/{Beatmaps => Modes}/Objects/Catch/Fruit.cs (80%) rename osu.Game/{Beatmaps => Modes}/Objects/DrawableHitObject.cs (88%) rename osu.Game/{Beatmaps => Modes}/Objects/HitObject.cs (88%) rename osu.Game/{Beatmaps => Modes}/Objects/HitObjectConverter.cs (91%) rename osu.Game/{Beatmaps => Modes}/Objects/Mania/Drawable/DrawableNote.cs (91%) rename osu.Game/{Beatmaps => Modes}/Objects/Mania/HoldNote.cs (79%) rename osu.Game/{Beatmaps => Modes}/Objects/Mania/ManiaBaseHit.cs (82%) rename osu.Game/{Beatmaps => Modes}/Objects/Mania/ManiaConverter.cs (90%) rename osu.Game/{Beatmaps => Modes}/Objects/Mania/Note.cs (80%) rename osu.Game/{Beatmaps => Modes}/Objects/Osu/Circle.cs (73%) rename osu.Game/{Beatmaps => Modes}/Objects/Osu/Drawable/DrawableCircle.cs (96%) rename osu.Game/{Beatmaps => Modes}/Objects/Osu/OsuBaseHit.cs (94%) rename osu.Game/{Beatmaps => Modes}/Objects/Osu/OsuConverter.cs (87%) rename osu.Game/{Beatmaps => Modes}/Objects/Osu/Slider.cs (85%) rename osu.Game/{Beatmaps => Modes}/Objects/Osu/Spinner.cs (80%) rename osu.Game/{Beatmaps => Modes}/Objects/Taiko/Drawable/DrawableTaikoHit.cs (91%) rename osu.Game/{Beatmaps => Modes}/Objects/Taiko/TaikoBaseHit.cs (85%) rename osu.Game/{Beatmaps => Modes}/Objects/Taiko/TaikoConverter.cs (87%) rename osu.Game/{Screens/Play => Modes}/Osu/OsuComboCounter.cs (96%) rename osu.Game/{Screens/Play => Modes}/Osu/OsuHitRenderer.cs (76%) rename osu.Game/{Screens/Play => Modes}/Osu/OsuPlayfield.cs (94%) rename osu.Game/{Screens/Play => Modes}/Osu/OsuRuleset.cs (84%) rename osu.Game/{Screens/Play => Modes}/Osu/ScoreOverlayOsu.cs (94%) rename osu.Game/{Screens/Play => Modes}/PlayMode.cs (89%) rename osu.Game/{Screens/Play => Modes}/Playfield.cs (85%) rename osu.Game/{Screens/Play => Modes}/Ruleset.cs (77%) rename osu.Game/{Screens/Play => Modes}/ScoreOverlay.cs (93%) rename osu.Game/{Screens/Play => Modes}/Taiko/TaikoComboCounter.cs (95%) rename osu.Game/{Screens/Play => Modes}/Taiko/TaikoHitRenderer.cs (80%) rename osu.Game/{Screens/Play => Modes}/Taiko/TaikoPlayfield.cs (93%) rename osu.Game/{Screens/Play => Modes}/Taiko/TaikoRuleset.cs (78%) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index db0de0a3f9..4793f9f157 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -7,12 +7,12 @@ using osu.Framework.Graphics; using osu.Framework.MathUtils; using osu.Framework.Timing; using osu.Game.Beatmaps; -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Osu; -using osu.Game.Screens.Play.Catch; -using osu.Game.Screens.Play.Mania; -using osu.Game.Screens.Play.Osu; -using osu.Game.Screens.Play.Taiko; +using osu.Game.Modes.Catch; +using osu.Game.Modes.Mania; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Osu; +using osu.Game.Modes.Taiko; using OpenTK; namespace osu.Desktop.VisualTests.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index f1d4e72601..c55b326b82 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -5,11 +5,11 @@ using osu.Framework; using osu.Framework.GameModes.Testing; using osu.Framework.Graphics; using osu.Framework.Timing; -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Osu; -using osu.Game.Beatmaps.Objects.Osu.Drawable; using OpenTK; using osu.Framework.Allocation; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Objects.Osu.Drawable; namespace osu.Desktop.VisualTests.Tests { diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs index 0ef743792d..caf4c90aa7 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs @@ -8,6 +8,7 @@ using osu.Game.Database; using SQLiteNetExtensions.Extensions; using osu.Framework; using osu.Game; +using osu.Game.Modes; using osu.Game.Screens.Play; namespace osu.Desktop.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index e69b669335..c3b7034f79 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -7,11 +7,11 @@ using osu.Framework.MathUtils; using osu.Framework.Timing; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Osu; using OpenTK; using osu.Framework; using osu.Framework.Allocation; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Osu; using osu.Game.Screens.Play; namespace osu.Desktop.VisualTests.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs index 87a5e1ec45..005124e3c5 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs @@ -7,11 +7,12 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.MathUtils; using osu.Game.Graphics.UserInterface; +using osu.Game.Modes; +using osu.Game.Modes.Catch; +using osu.Game.Modes.Mania; +using osu.Game.Modes.Osu; +using osu.Game.Modes.Taiko; using osu.Game.Screens.Play; -using osu.Game.Screens.Play.Catch; -using osu.Game.Screens.Play.Mania; -using osu.Game.Screens.Play.Osu; -using osu.Game.Screens.Play.Taiko; using OpenTK; using OpenTK.Graphics; diff --git a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs index f5aee52853..226725b93f 100644 --- a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs @@ -5,8 +5,9 @@ using OpenTK; using OpenTK.Graphics; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; -using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Beatmaps.Samples; +using osu.Game.Modes; +using osu.Game.Modes.Objects.Osu; using osu.Game.Screens.Play; using osu.Game.Tests.Resources; diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index 28dd5661b1..0c53ef380c 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -8,6 +8,7 @@ using osu.Framework.Desktop.Platform; using osu.Framework.Platform; using osu.Game.Database; using osu.Game.IPC; +using osu.Game.Modes; using osu.Game.Screens.Play; namespace osu.Game.Tests.Beatmaps.IO diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index 4769e2fb64..4d6c6a8056 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using OpenTK.Graphics; -using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Timing; using osu.Game.Database; +using osu.Game.Modes.Objects; namespace osu.Game.Beatmaps { diff --git a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs index ca11b97587..7ff3dbac2b 100644 --- a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.IO; -using osu.Game.Beatmaps.Objects; +using osu.Game.Modes.Objects; using OpenTK.Graphics; namespace osu.Game.Beatmaps.Formats diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index 165f1808ee..2cf4e66927 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -5,9 +5,10 @@ using System.IO; using OpenTK.Graphics; using osu.Game.Database; using osu.Game.Beatmaps.Events; -using osu.Game.Beatmaps.Objects; using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Timing; +using osu.Game.Modes; +using osu.Game.Modes.Objects; using osu.Game.Screens.Play; namespace osu.Game.Beatmaps.Formats diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index bf56e10429..86e26048ab 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -3,6 +3,7 @@ using osu.Framework.Configuration; using osu.Framework.Platform; +using osu.Game.Modes; using osu.Game.Online.API; using osu.Game.Screens.Play; diff --git a/osu.Game/Database/BeatmapInfo.cs b/osu.Game/Database/BeatmapInfo.cs index de3ba15508..736f8b9927 100644 --- a/osu.Game/Database/BeatmapInfo.cs +++ b/osu.Game/Database/BeatmapInfo.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using osu.Game.Beatmaps.Samples; +using osu.Game.Modes; using osu.Game.Screens.Play; using SQLite.Net.Attributes; using SQLiteNetExtensions.Attributes; diff --git a/osu.Game/Screens/Play/Catch/CatchComboCounter.cs b/osu.Game/Modes/Catch/CatchComboCounter.cs similarity index 93% rename from osu.Game/Screens/Play/Catch/CatchComboCounter.cs rename to osu.Game/Modes/Catch/CatchComboCounter.cs index 19c9a4ddf2..ee972ac49a 100644 --- a/osu.Game/Screens/Play/Catch/CatchComboCounter.cs +++ b/osu.Game/Modes/Catch/CatchComboCounter.cs @@ -1,10 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Screens.Play.Osu; +using osu.Game.Modes.Osu; using OpenTK.Graphics; -namespace osu.Game.Screens.Play.Catch +namespace osu.Game.Modes.Catch { /// /// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch. diff --git a/osu.Game/Screens/Play/Catch/CatchHitRenderer.cs b/osu.Game/Modes/Catch/CatchHitRenderer.cs similarity index 80% rename from osu.Game/Screens/Play/Catch/CatchHitRenderer.cs rename to osu.Game/Modes/Catch/CatchHitRenderer.cs index 114dd0c930..a796d70c0e 100644 --- a/osu.Game/Screens/Play/Catch/CatchHitRenderer.cs +++ b/osu.Game/Modes/Catch/CatchHitRenderer.cs @@ -1,10 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Catch; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Catch; -namespace osu.Game.Screens.Play.Catch +namespace osu.Game.Modes.Catch { public class CatchHitRenderer : HitRenderer { diff --git a/osu.Game/Screens/Play/Catch/CatchPlayfield.cs b/osu.Game/Modes/Catch/CatchPlayfield.cs similarity index 90% rename from osu.Game/Screens/Play/Catch/CatchPlayfield.cs rename to osu.Game/Modes/Catch/CatchPlayfield.cs index 92ab69a627..ca323f81d5 100644 --- a/osu.Game/Screens/Play/Catch/CatchPlayfield.cs +++ b/osu.Game/Modes/Catch/CatchPlayfield.cs @@ -5,7 +5,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using OpenTK; -namespace osu.Game.Screens.Play.Catch +namespace osu.Game.Modes.Catch { public class CatchPlayfield : Playfield { diff --git a/osu.Game/Screens/Play/Catch/CatchRuleset.cs b/osu.Game/Modes/Catch/CatchRuleset.cs similarity index 78% rename from osu.Game/Screens/Play/Catch/CatchRuleset.cs rename to osu.Game/Modes/Catch/CatchRuleset.cs index ab887a23f8..a92518b0db 100644 --- a/osu.Game/Screens/Play/Catch/CatchRuleset.cs +++ b/osu.Game/Modes/Catch/CatchRuleset.cs @@ -2,10 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Beatmaps.Objects; -using osu.Game.Screens.Play.Osu; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu; -namespace osu.Game.Screens.Play.Catch +namespace osu.Game.Modes.Catch { class CatchRuleset : Ruleset { diff --git a/osu.Game/Screens/Play/ComboCounter.cs b/osu.Game/Modes/ComboCounter.cs similarity index 96% rename from osu.Game/Screens/Play/ComboCounter.cs rename to osu.Game/Modes/ComboCounter.cs index f634e215b5..cc00ac700a 100644 --- a/osu.Game/Screens/Play/ComboCounter.cs +++ b/osu.Game/Modes/ComboCounter.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.MathUtils; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { public abstract class ComboCounter : Container { diff --git a/osu.Game/Screens/Play/ComboResultCounter.cs b/osu.Game/Modes/ComboResultCounter.cs similarity index 95% rename from osu.Game/Screens/Play/ComboResultCounter.cs rename to osu.Game/Modes/ComboResultCounter.cs index 0c6eb8f2fe..4ae203363e 100644 --- a/osu.Game/Screens/Play/ComboResultCounter.cs +++ b/osu.Game/Modes/ComboResultCounter.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.MathUtils; using osu.Game.Graphics.UserInterface; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { /// /// Used to display combo with a roll-up animation in results screen. diff --git a/osu.Game/Screens/Play/HitRenderer.cs b/osu.Game/Modes/HitRenderer.cs similarity index 93% rename from osu.Game/Screens/Play/HitRenderer.cs rename to osu.Game/Modes/HitRenderer.cs index 8dd1ab97aa..e73669ff6a 100644 --- a/osu.Game/Screens/Play/HitRenderer.cs +++ b/osu.Game/Modes/HitRenderer.cs @@ -7,9 +7,9 @@ using System.Linq; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Game.Beatmaps.Objects; +using osu.Game.Modes.Objects; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { public abstract class HitRenderer : Container { diff --git a/osu.Game/Screens/Play/Mania/ManiaComboCounter.cs b/osu.Game/Modes/Mania/ManiaComboCounter.cs similarity index 94% rename from osu.Game/Screens/Play/Mania/ManiaComboCounter.cs rename to osu.Game/Modes/Mania/ManiaComboCounter.cs index 9be76a112f..26e654622f 100644 --- a/osu.Game/Screens/Play/Mania/ManiaComboCounter.cs +++ b/osu.Game/Modes/Mania/ManiaComboCounter.cs @@ -3,10 +3,10 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; -using osu.Game.Screens.Play.Taiko; +using osu.Game.Modes.Taiko; using OpenTK.Graphics; -namespace osu.Game.Screens.Play.Mania +namespace osu.Game.Modes.Mania { /// /// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania. diff --git a/osu.Game/Screens/Play/Mania/ManiaHitRenderer.cs b/osu.Game/Modes/Mania/ManiaHitRenderer.cs similarity index 86% rename from osu.Game/Screens/Play/Mania/ManiaHitRenderer.cs rename to osu.Game/Modes/Mania/ManiaHitRenderer.cs index 73c106949b..82f6bd1e9d 100644 --- a/osu.Game/Screens/Play/Mania/ManiaHitRenderer.cs +++ b/osu.Game/Modes/Mania/ManiaHitRenderer.cs @@ -1,10 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Mania; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Mania; -namespace osu.Game.Screens.Play.Mania +namespace osu.Game.Modes.Mania { public class ManiaHitRenderer : HitRenderer { diff --git a/osu.Game/Screens/Play/Mania/ManiaPlayfield.cs b/osu.Game/Modes/Mania/ManiaPlayfield.cs similarity index 93% rename from osu.Game/Screens/Play/Mania/ManiaPlayfield.cs rename to osu.Game/Modes/Mania/ManiaPlayfield.cs index b5f91de664..277927ffde 100644 --- a/osu.Game/Screens/Play/Mania/ManiaPlayfield.cs +++ b/osu.Game/Modes/Mania/ManiaPlayfield.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics.Sprites; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.Screens.Play.Mania +namespace osu.Game.Modes.Mania { public class ManiaPlayfield : Playfield { diff --git a/osu.Game/Screens/Play/Mania/ManiaRuleset.cs b/osu.Game/Modes/Mania/ManiaRuleset.cs similarity index 78% rename from osu.Game/Screens/Play/Mania/ManiaRuleset.cs rename to osu.Game/Modes/Mania/ManiaRuleset.cs index 193a1b35ac..29935ce6f8 100644 --- a/osu.Game/Screens/Play/Mania/ManiaRuleset.cs +++ b/osu.Game/Modes/Mania/ManiaRuleset.cs @@ -2,10 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Beatmaps.Objects; -using osu.Game.Screens.Play.Osu; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu; -namespace osu.Game.Screens.Play.Mania +namespace osu.Game.Modes.Mania { class ManiaRuleset : Ruleset { diff --git a/osu.Game/Beatmaps/Objects/Catch/CatchBaseHit.cs b/osu.Game/Modes/Objects/Catch/CatchBaseHit.cs similarity index 82% rename from osu.Game/Beatmaps/Objects/Catch/CatchBaseHit.cs rename to osu.Game/Modes/Objects/Catch/CatchBaseHit.cs index 590bd8f5b3..29bc967e01 100644 --- a/osu.Game/Beatmaps/Objects/Catch/CatchBaseHit.cs +++ b/osu.Game/Modes/Objects/Catch/CatchBaseHit.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Catch +namespace osu.Game.Modes.Objects.Catch { public abstract class CatchBaseHit : HitObject { diff --git a/osu.Game/Beatmaps/Objects/Catch/CatchConverter.cs b/osu.Game/Modes/Objects/Catch/CatchConverter.cs similarity index 80% rename from osu.Game/Beatmaps/Objects/Catch/CatchConverter.cs rename to osu.Game/Modes/Objects/Catch/CatchConverter.cs index 317a4e9bb1..49d889df23 100644 --- a/osu.Game/Beatmaps/Objects/Catch/CatchConverter.cs +++ b/osu.Game/Modes/Objects/Catch/CatchConverter.cs @@ -1,15 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Game.Beatmaps.Objects.Catch; -using osu.Game.Beatmaps.Objects.Osu; +using osu.Game.Modes.Objects.Osu; -namespace osu.Game.Beatmaps.Objects.Catch +namespace osu.Game.Modes.Objects.Catch { class CatchConverter : HitObjectConverter { diff --git a/osu.Game/Beatmaps/Objects/Catch/Drawable/DrawableFruit.cs b/osu.Game/Modes/Objects/Catch/Drawable/DrawableFruit.cs similarity index 84% rename from osu.Game/Beatmaps/Objects/Catch/Drawable/DrawableFruit.cs rename to osu.Game/Modes/Objects/Catch/Drawable/DrawableFruit.cs index 4664bacc30..b0a5a2f16d 100644 --- a/osu.Game/Beatmaps/Objects/Catch/Drawable/DrawableFruit.cs +++ b/osu.Game/Modes/Objects/Catch/Drawable/DrawableFruit.cs @@ -1,20 +1,14 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using OpenTK; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Textures; -namespace osu.Game.Beatmaps.Objects.Catch.Drawable +namespace osu.Game.Modes.Objects.Catch.Drawable { class DrawableFruit : Sprite { diff --git a/osu.Game/Beatmaps/Objects/Catch/Droplet.cs b/osu.Game/Modes/Objects/Catch/Droplet.cs similarity index 80% rename from osu.Game/Beatmaps/Objects/Catch/Droplet.cs rename to osu.Game/Modes/Objects/Catch/Droplet.cs index fd7967315d..e33dc29138 100644 --- a/osu.Game/Beatmaps/Objects/Catch/Droplet.cs +++ b/osu.Game/Modes/Objects/Catch/Droplet.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Catch +namespace osu.Game.Modes.Objects.Catch { public class Droplet : CatchBaseHit { diff --git a/osu.Game/Beatmaps/Objects/Catch/Fruit.cs b/osu.Game/Modes/Objects/Catch/Fruit.cs similarity index 80% rename from osu.Game/Beatmaps/Objects/Catch/Fruit.cs rename to osu.Game/Modes/Objects/Catch/Fruit.cs index 9ef76de841..ee7bc38c6d 100644 --- a/osu.Game/Beatmaps/Objects/Catch/Fruit.cs +++ b/osu.Game/Modes/Objects/Catch/Fruit.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Catch +namespace osu.Game.Modes.Objects.Catch { public class Fruit : CatchBaseHit { diff --git a/osu.Game/Beatmaps/Objects/DrawableHitObject.cs b/osu.Game/Modes/Objects/DrawableHitObject.cs similarity index 88% rename from osu.Game/Beatmaps/Objects/DrawableHitObject.cs rename to osu.Game/Modes/Objects/DrawableHitObject.cs index 380e527de4..8af7186d63 100644 --- a/osu.Game/Beatmaps/Objects/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/DrawableHitObject.cs @@ -2,15 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using osu.Framework; using osu.Framework.Graphics.Containers; -using osu.Game.Beatmaps.Objects.Osu.Drawable; -namespace osu.Game.Beatmaps.Objects +namespace osu.Game.Modes.Objects { public abstract class DrawableHitObject : Container, IStateful { diff --git a/osu.Game/Beatmaps/Objects/HitObject.cs b/osu.Game/Modes/Objects/HitObject.cs similarity index 88% rename from osu.Game/Beatmaps/Objects/HitObject.cs rename to osu.Game/Modes/Objects/HitObject.cs index 597d6b4c6a..fe63579d67 100644 --- a/osu.Game/Beatmaps/Objects/HitObject.cs +++ b/osu.Game/Modes/Objects/HitObject.cs @@ -1,12 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Beatmaps.Samples; -using osu.Game.Screens.Play; +using osu.Game.Modes.Objects.Osu; using OpenTK.Graphics; -namespace osu.Game.Beatmaps.Objects +namespace osu.Game.Modes.Objects { /// /// A hitobject describes a point in a beatmap diff --git a/osu.Game/Beatmaps/Objects/HitObjectConverter.cs b/osu.Game/Modes/Objects/HitObjectConverter.cs similarity index 91% rename from osu.Game/Beatmaps/Objects/HitObjectConverter.cs rename to osu.Game/Modes/Objects/HitObjectConverter.cs index 723199d8f1..73a27f9e96 100644 --- a/osu.Game/Beatmaps/Objects/HitObjectConverter.cs +++ b/osu.Game/Modes/Objects/HitObjectConverter.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace osu.Game.Beatmaps.Objects +namespace osu.Game.Modes.Objects { public abstract class HitObjectConverter where T : HitObject diff --git a/osu.Game/Beatmaps/Objects/Mania/Drawable/DrawableNote.cs b/osu.Game/Modes/Objects/Mania/Drawable/DrawableNote.cs similarity index 91% rename from osu.Game/Beatmaps/Objects/Mania/Drawable/DrawableNote.cs rename to osu.Game/Modes/Objects/Mania/Drawable/DrawableNote.cs index ed8b42df61..34c7217dbb 100644 --- a/osu.Game/Beatmaps/Objects/Mania/Drawable/DrawableNote.cs +++ b/osu.Game/Modes/Objects/Mania/Drawable/DrawableNote.cs @@ -1,15 +1,14 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using OpenTK; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Textures; -namespace osu.Game.Beatmaps.Objects.Mania.Drawable +namespace osu.Game.Modes.Objects.Mania.Drawable { public class DrawableNote : Sprite { diff --git a/osu.Game/Beatmaps/Objects/Mania/HoldNote.cs b/osu.Game/Modes/Objects/Mania/HoldNote.cs similarity index 79% rename from osu.Game/Beatmaps/Objects/Mania/HoldNote.cs rename to osu.Game/Modes/Objects/Mania/HoldNote.cs index 37e95d8df1..fd6ff8ba6d 100644 --- a/osu.Game/Beatmaps/Objects/Mania/HoldNote.cs +++ b/osu.Game/Modes/Objects/Mania/HoldNote.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Mania +namespace osu.Game.Modes.Objects.Mania { public class HoldNote : Note { diff --git a/osu.Game/Beatmaps/Objects/Mania/ManiaBaseHit.cs b/osu.Game/Modes/Objects/Mania/ManiaBaseHit.cs similarity index 82% rename from osu.Game/Beatmaps/Objects/Mania/ManiaBaseHit.cs rename to osu.Game/Modes/Objects/Mania/ManiaBaseHit.cs index d3fe475c6f..09ad613f1b 100644 --- a/osu.Game/Beatmaps/Objects/Mania/ManiaBaseHit.cs +++ b/osu.Game/Modes/Objects/Mania/ManiaBaseHit.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Mania +namespace osu.Game.Modes.Objects.Mania { public abstract class ManiaBaseHit : HitObject { diff --git a/osu.Game/Beatmaps/Objects/Mania/ManiaConverter.cs b/osu.Game/Modes/Objects/Mania/ManiaConverter.cs similarity index 90% rename from osu.Game/Beatmaps/Objects/Mania/ManiaConverter.cs rename to osu.Game/Modes/Objects/Mania/ManiaConverter.cs index cc03244709..06a2481875 100644 --- a/osu.Game/Beatmaps/Objects/Mania/ManiaConverter.cs +++ b/osu.Game/Modes/Objects/Mania/ManiaConverter.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; -using osu.Game.Beatmaps.Objects.Osu; +using osu.Game.Modes.Objects.Osu; -namespace osu.Game.Beatmaps.Objects.Mania +namespace osu.Game.Modes.Objects.Mania { class ManiaConverter : HitObjectConverter { diff --git a/osu.Game/Beatmaps/Objects/Mania/Note.cs b/osu.Game/Modes/Objects/Mania/Note.cs similarity index 80% rename from osu.Game/Beatmaps/Objects/Mania/Note.cs rename to osu.Game/Modes/Objects/Mania/Note.cs index d6e9b0e66c..df8c06f9bd 100644 --- a/osu.Game/Beatmaps/Objects/Mania/Note.cs +++ b/osu.Game/Modes/Objects/Mania/Note.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Mania +namespace osu.Game.Modes.Objects.Mania { public class Note : ManiaBaseHit { diff --git a/osu.Game/Beatmaps/Objects/Osu/Circle.cs b/osu.Game/Modes/Objects/Osu/Circle.cs similarity index 73% rename from osu.Game/Beatmaps/Objects/Osu/Circle.cs rename to osu.Game/Modes/Objects/Osu/Circle.cs index 9b7f92f29e..7a5a21b710 100644 --- a/osu.Game/Beatmaps/Objects/Osu/Circle.cs +++ b/osu.Game/Modes/Objects/Osu/Circle.cs @@ -1,9 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK.Graphics; - -namespace osu.Game.Beatmaps.Objects.Osu +namespace osu.Game.Modes.Objects.Osu { public class Circle : OsuBaseHit { diff --git a/osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs b/osu.Game/Modes/Objects/Osu/Drawable/DrawableCircle.cs similarity index 96% rename from osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs rename to osu.Game/Modes/Objects/Osu/Drawable/DrawableCircle.cs index 65d93ec651..eebe86a847 100644 --- a/osu.Game/Beatmaps/Objects/Osu/Drawable/DrawableCircle.cs +++ b/osu.Game/Modes/Objects/Osu/Drawable/DrawableCircle.cs @@ -3,6 +3,7 @@ using System; using osu.Framework; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; @@ -11,9 +12,8 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.Input; using osu.Framework.MathUtils; using OpenTK; -using osu.Framework.Allocation; -namespace osu.Game.Beatmaps.Objects.Osu.Drawable +namespace osu.Game.Modes.Objects.Osu.Drawable { public class DrawableCircle : DrawableHitObject { diff --git a/osu.Game/Beatmaps/Objects/Osu/OsuBaseHit.cs b/osu.Game/Modes/Objects/Osu/OsuBaseHit.cs similarity index 94% rename from osu.Game/Beatmaps/Objects/Osu/OsuBaseHit.cs rename to osu.Game/Modes/Objects/Osu/OsuBaseHit.cs index e4bb272404..db479e0ffd 100644 --- a/osu.Game/Beatmaps/Objects/Osu/OsuBaseHit.cs +++ b/osu.Game/Modes/Objects/Osu/OsuBaseHit.cs @@ -2,10 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using OpenTK; using osu.Game.Beatmaps.Samples; +using OpenTK; -namespace osu.Game.Beatmaps.Objects.Osu +namespace osu.Game.Modes.Objects.Osu { public abstract class OsuBaseHit : HitObject { diff --git a/osu.Game/Beatmaps/Objects/Osu/OsuConverter.cs b/osu.Game/Modes/Objects/Osu/OsuConverter.cs similarity index 87% rename from osu.Game/Beatmaps/Objects/Osu/OsuConverter.cs rename to osu.Game/Modes/Objects/Osu/OsuConverter.cs index 5629fccd5c..29ab69d470 100644 --- a/osu.Game/Beatmaps/Objects/Osu/OsuConverter.cs +++ b/osu.Game/Modes/Objects/Osu/OsuConverter.cs @@ -1,10 +1,9 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -namespace osu.Game.Beatmaps.Objects.Osu +namespace osu.Game.Modes.Objects.Osu { class OsuConverter : HitObjectConverter { diff --git a/osu.Game/Beatmaps/Objects/Osu/Slider.cs b/osu.Game/Modes/Objects/Osu/Slider.cs similarity index 85% rename from osu.Game/Beatmaps/Objects/Osu/Slider.cs rename to osu.Game/Modes/Objects/Osu/Slider.cs index fef9cd858c..1ebadac973 100644 --- a/osu.Game/Beatmaps/Objects/Osu/Slider.cs +++ b/osu.Game/Modes/Objects/Osu/Slider.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using OpenTK; -namespace osu.Game.Beatmaps.Objects.Osu +namespace osu.Game.Modes.Objects.Osu { public class Slider : OsuBaseHit { diff --git a/osu.Game/Beatmaps/Objects/Osu/Spinner.cs b/osu.Game/Modes/Objects/Osu/Spinner.cs similarity index 80% rename from osu.Game/Beatmaps/Objects/Osu/Spinner.cs rename to osu.Game/Modes/Objects/Osu/Spinner.cs index e19af7c5ba..64a755ad64 100644 --- a/osu.Game/Beatmaps/Objects/Osu/Spinner.cs +++ b/osu.Game/Modes/Objects/Osu/Spinner.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Osu +namespace osu.Game.Modes.Objects.Osu { public class Spinner : OsuBaseHit { diff --git a/osu.Game/Beatmaps/Objects/Taiko/Drawable/DrawableTaikoHit.cs b/osu.Game/Modes/Objects/Taiko/Drawable/DrawableTaikoHit.cs similarity index 91% rename from osu.Game/Beatmaps/Objects/Taiko/Drawable/DrawableTaikoHit.cs rename to osu.Game/Modes/Objects/Taiko/Drawable/DrawableTaikoHit.cs index 7113016d51..5a77aa1c58 100644 --- a/osu.Game/Beatmaps/Objects/Taiko/Drawable/DrawableTaikoHit.cs +++ b/osu.Game/Modes/Objects/Taiko/Drawable/DrawableTaikoHit.cs @@ -1,15 +1,14 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework; +using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using OpenTK; -using osu.Framework.Allocation; -using osu.Framework.Graphics.Textures; -namespace osu.Game.Beatmaps.Objects.Taiko.Drawable +namespace osu.Game.Modes.Objects.Taiko.Drawable { class DrawableTaikoHit : Sprite { diff --git a/osu.Game/Beatmaps/Objects/Taiko/TaikoBaseHit.cs b/osu.Game/Modes/Objects/Taiko/TaikoBaseHit.cs similarity index 85% rename from osu.Game/Beatmaps/Objects/Taiko/TaikoBaseHit.cs rename to osu.Game/Modes/Objects/Taiko/TaikoBaseHit.cs index 6b8f241306..3805326b2a 100644 --- a/osu.Game/Beatmaps/Objects/Taiko/TaikoBaseHit.cs +++ b/osu.Game/Modes/Objects/Taiko/TaikoBaseHit.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Beatmaps.Objects.Taiko +namespace osu.Game.Modes.Objects.Taiko { public class TaikoBaseHit : HitObject { diff --git a/osu.Game/Beatmaps/Objects/Taiko/TaikoConverter.cs b/osu.Game/Modes/Objects/Taiko/TaikoConverter.cs similarity index 87% rename from osu.Game/Beatmaps/Objects/Taiko/TaikoConverter.cs rename to osu.Game/Modes/Objects/Taiko/TaikoConverter.cs index d70e8f8406..62d90beedc 100644 --- a/osu.Game/Beatmaps/Objects/Taiko/TaikoConverter.cs +++ b/osu.Game/Modes/Objects/Taiko/TaikoConverter.cs @@ -1,11 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; using System.Collections.Generic; -using osu.Game.Beatmaps.Objects.Osu; +using osu.Game.Modes.Objects.Osu; -namespace osu.Game.Beatmaps.Objects.Taiko +namespace osu.Game.Modes.Objects.Taiko { class TaikoConverter : HitObjectConverter { diff --git a/osu.Game/Screens/Play/Osu/OsuComboCounter.cs b/osu.Game/Modes/Osu/OsuComboCounter.cs similarity index 96% rename from osu.Game/Screens/Play/Osu/OsuComboCounter.cs rename to osu.Game/Modes/Osu/OsuComboCounter.cs index 3a86f79ac1..58edaa096c 100644 --- a/osu.Game/Screens/Play/Osu/OsuComboCounter.cs +++ b/osu.Game/Modes/Osu/OsuComboCounter.cs @@ -3,7 +3,7 @@ using OpenTK; -namespace osu.Game.Screens.Play.Osu +namespace osu.Game.Modes.Osu { /// /// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard. diff --git a/osu.Game/Screens/Play/Osu/OsuHitRenderer.cs b/osu.Game/Modes/Osu/OsuHitRenderer.cs similarity index 76% rename from osu.Game/Screens/Play/Osu/OsuHitRenderer.cs rename to osu.Game/Modes/Osu/OsuHitRenderer.cs index b982998c3e..ffed72d8f1 100644 --- a/osu.Game/Screens/Play/Osu/OsuHitRenderer.cs +++ b/osu.Game/Modes/Osu/OsuHitRenderer.cs @@ -1,11 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Osu; -using osu.Game.Beatmaps.Objects.Osu.Drawable; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Objects.Osu.Drawable; -namespace osu.Game.Screens.Play.Osu +namespace osu.Game.Modes.Osu { public class OsuHitRenderer : HitRenderer { diff --git a/osu.Game/Screens/Play/Osu/OsuPlayfield.cs b/osu.Game/Modes/Osu/OsuPlayfield.cs similarity index 94% rename from osu.Game/Screens/Play/Osu/OsuPlayfield.cs rename to osu.Game/Modes/Osu/OsuPlayfield.cs index 291bfd16be..33dc9a7cc4 100644 --- a/osu.Game/Screens/Play/Osu/OsuPlayfield.cs +++ b/osu.Game/Modes/Osu/OsuPlayfield.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.Screens.Play.Osu +namespace osu.Game.Modes.Osu { public class OsuPlayfield : Playfield { diff --git a/osu.Game/Screens/Play/Osu/OsuRuleset.cs b/osu.Game/Modes/Osu/OsuRuleset.cs similarity index 84% rename from osu.Game/Screens/Play/Osu/OsuRuleset.cs rename to osu.Game/Modes/Osu/OsuRuleset.cs index afc461d876..bf7c7498ec 100644 --- a/osu.Game/Screens/Play/Osu/OsuRuleset.cs +++ b/osu.Game/Modes/Osu/OsuRuleset.cs @@ -2,9 +2,9 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Beatmaps.Objects; +using osu.Game.Modes.Objects; -namespace osu.Game.Screens.Play.Osu +namespace osu.Game.Modes.Osu { class OsuRuleset : Ruleset { diff --git a/osu.Game/Screens/Play/Osu/ScoreOverlayOsu.cs b/osu.Game/Modes/Osu/ScoreOverlayOsu.cs similarity index 94% rename from osu.Game/Screens/Play/Osu/ScoreOverlayOsu.cs rename to osu.Game/Modes/Osu/ScoreOverlayOsu.cs index dda22cbbb6..3654191b8d 100644 --- a/osu.Game/Screens/Play/Osu/ScoreOverlayOsu.cs +++ b/osu.Game/Modes/Osu/ScoreOverlayOsu.cs @@ -6,7 +6,7 @@ using osu.Game.Graphics.UserInterface; using OpenTK; using OpenTK.Input; -namespace osu.Game.Screens.Play.Osu +namespace osu.Game.Modes.Osu { class ScoreOverlayOsu : ScoreOverlay { diff --git a/osu.Game/Screens/Play/PlayMode.cs b/osu.Game/Modes/PlayMode.cs similarity index 89% rename from osu.Game/Screens/Play/PlayMode.cs rename to osu.Game/Modes/PlayMode.cs index c1c3f25e72..d1b0f23ee4 100644 --- a/osu.Game/Screens/Play/PlayMode.cs +++ b/osu.Game/Modes/PlayMode.cs @@ -4,7 +4,7 @@ using System.ComponentModel; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { public enum PlayMode { diff --git a/osu.Game/Screens/Play/Playfield.cs b/osu.Game/Modes/Playfield.cs similarity index 85% rename from osu.Game/Screens/Play/Playfield.cs rename to osu.Game/Modes/Playfield.cs index 1acd52638b..4fe1887962 100644 --- a/osu.Game/Screens/Play/Playfield.cs +++ b/osu.Game/Modes/Playfield.cs @@ -3,7 +3,7 @@ using osu.Framework.Graphics.Containers; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { public class Playfield : Container { diff --git a/osu.Game/Screens/Play/Ruleset.cs b/osu.Game/Modes/Ruleset.cs similarity index 77% rename from osu.Game/Screens/Play/Ruleset.cs rename to osu.Game/Modes/Ruleset.cs index 5deb994309..12d0fbb718 100644 --- a/osu.Game/Screens/Play/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -2,13 +2,13 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Beatmaps.Objects; -using osu.Game.Screens.Play.Catch; -using osu.Game.Screens.Play.Mania; -using osu.Game.Screens.Play.Osu; -using osu.Game.Screens.Play.Taiko; +using osu.Game.Modes.Catch; +using osu.Game.Modes.Mania; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu; +using osu.Game.Modes.Taiko; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { public abstract class Ruleset { diff --git a/osu.Game/Screens/Play/ScoreOverlay.cs b/osu.Game/Modes/ScoreOverlay.cs similarity index 93% rename from osu.Game/Screens/Play/ScoreOverlay.cs rename to osu.Game/Modes/ScoreOverlay.cs index f242a97da2..52b42f640f 100644 --- a/osu.Game/Screens/Play/ScoreOverlay.cs +++ b/osu.Game/Modes/ScoreOverlay.cs @@ -4,10 +4,10 @@ using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Game.Beatmaps.Objects; using osu.Game.Graphics.UserInterface; +using osu.Game.Modes.Objects; -namespace osu.Game.Screens.Play +namespace osu.Game.Modes { public abstract class ScoreOverlay : Container { diff --git a/osu.Game/Screens/Play/Taiko/TaikoComboCounter.cs b/osu.Game/Modes/Taiko/TaikoComboCounter.cs similarity index 95% rename from osu.Game/Screens/Play/Taiko/TaikoComboCounter.cs rename to osu.Game/Modes/Taiko/TaikoComboCounter.cs index beb96f94f9..ac7211a92e 100644 --- a/osu.Game/Screens/Play/Taiko/TaikoComboCounter.cs +++ b/osu.Game/Modes/Taiko/TaikoComboCounter.cs @@ -4,7 +4,7 @@ using osu.Framework.Graphics.Transformations; using OpenTK; -namespace osu.Game.Screens.Play.Taiko +namespace osu.Game.Modes.Taiko { /// /// Allows tint and scaling animations. Used in osu!taiko. diff --git a/osu.Game/Screens/Play/Taiko/TaikoHitRenderer.cs b/osu.Game/Modes/Taiko/TaikoHitRenderer.cs similarity index 80% rename from osu.Game/Screens/Play/Taiko/TaikoHitRenderer.cs rename to osu.Game/Modes/Taiko/TaikoHitRenderer.cs index ec02c89d9a..5b6119e2ad 100644 --- a/osu.Game/Screens/Play/Taiko/TaikoHitRenderer.cs +++ b/osu.Game/Modes/Taiko/TaikoHitRenderer.cs @@ -1,10 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps.Objects; -using osu.Game.Beatmaps.Objects.Taiko; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Taiko; -namespace osu.Game.Screens.Play.Taiko +namespace osu.Game.Modes.Taiko { public class TaikoHitRenderer : HitRenderer { diff --git a/osu.Game/Screens/Play/Taiko/TaikoPlayfield.cs b/osu.Game/Modes/Taiko/TaikoPlayfield.cs similarity index 93% rename from osu.Game/Screens/Play/Taiko/TaikoPlayfield.cs rename to osu.Game/Modes/Taiko/TaikoPlayfield.cs index c8dee06a45..7d999ae213 100644 --- a/osu.Game/Screens/Play/Taiko/TaikoPlayfield.cs +++ b/osu.Game/Modes/Taiko/TaikoPlayfield.cs @@ -8,7 +8,7 @@ using osu.Framework.Graphics.Textures; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.Screens.Play.Taiko +namespace osu.Game.Modes.Taiko { public class TaikoPlayfield : Playfield { diff --git a/osu.Game/Screens/Play/Taiko/TaikoRuleset.cs b/osu.Game/Modes/Taiko/TaikoRuleset.cs similarity index 78% rename from osu.Game/Screens/Play/Taiko/TaikoRuleset.cs rename to osu.Game/Modes/Taiko/TaikoRuleset.cs index 0ae94a118a..b90c96113d 100644 --- a/osu.Game/Screens/Play/Taiko/TaikoRuleset.cs +++ b/osu.Game/Modes/Taiko/TaikoRuleset.cs @@ -2,10 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Beatmaps.Objects; -using osu.Game.Screens.Play.Osu; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu; -namespace osu.Game.Screens.Play.Taiko +namespace osu.Game.Modes.Taiko { class TaikoRuleset : Ruleset { diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index e78c58a656..bccaa398ff 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -19,6 +19,7 @@ using osu.Framework.Logging; using osu.Game.Graphics.UserInterface.Volume; using osu.Game.Database; using osu.Framework.Allocation; +using osu.Game.Modes; using osu.Game.Screens; using osu.Game.Screens.Menu; using osu.Game.Screens.Play; diff --git a/osu.Game/Overlays/Toolbar.cs b/osu.Game/Overlays/Toolbar.cs index 77b35740ce..0e343a05dd 100644 --- a/osu.Game/Overlays/Toolbar.cs +++ b/osu.Game/Overlays/Toolbar.cs @@ -12,6 +12,7 @@ using osu.Game.Configuration; using osu.Game.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Allocation; +using osu.Game.Modes; using osu.Game.Screens.Play; namespace osu.Game.Overlays diff --git a/osu.Game/Overlays/ToolbarModeButton.cs b/osu.Game/Overlays/ToolbarModeButton.cs index e2982597f5..c10b8514db 100644 --- a/osu.Game/Overlays/ToolbarModeButton.cs +++ b/osu.Game/Overlays/ToolbarModeButton.cs @@ -6,6 +6,7 @@ using osu.Game.Graphics; using OpenTK.Graphics; using osu.Framework; using osu.Framework.Allocation; +using osu.Game.Modes; using osu.Game.Screens.Play; namespace osu.Game.Overlays diff --git a/osu.Game/Overlays/ToolbarModeSelector.cs b/osu.Game/Overlays/ToolbarModeSelector.cs index a0b8216f98..9b6d8a7fe1 100644 --- a/osu.Game/Overlays/ToolbarModeSelector.cs +++ b/osu.Game/Overlays/ToolbarModeSelector.cs @@ -12,6 +12,7 @@ using osu.Framework; using osu.Framework.Caching; using osu.Framework.Graphics.Sprites; using osu.Framework.Allocation; +using osu.Game.Modes; using osu.Game.Screens.Play; namespace osu.Game.Overlays diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 11aaf3cc19..8ab8596cd6 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -7,6 +7,7 @@ using osu.Framework.GameModes.Testing; using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; using osu.Game.Graphics.Containers; +using osu.Game.Modes; using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Charts; using osu.Game.Screens.Direct; diff --git a/osu.Game/Screens/Play/PlaySongSelect.cs b/osu.Game/Screens/Play/PlaySongSelect.cs index 352a307f63..4c4c188e04 100644 --- a/osu.Game/Screens/Play/PlaySongSelect.cs +++ b/osu.Game/Screens/Play/PlaySongSelect.cs @@ -17,6 +17,7 @@ using osu.Framework.Graphics.UserInterface; using osu.Game.Beatmaps; using osu.Game.Beatmaps.Drawable; using osu.Game.Database; +using osu.Game.Modes; using osu.Game.Screens.Backgrounds; using OpenTK; using OpenTK.Graphics; diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 62a0e7dce5..4030d02986 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -9,8 +9,9 @@ using osu.Framework.Graphics; using osu.Framework.Input; using osu.Framework.Platform; using osu.Framework.Timing; -using osu.Game.Beatmaps.Objects; using osu.Game.Database; +using osu.Game.Modes; +using osu.Game.Modes.Objects; using osu.Game.Screens.Backgrounds; using OpenTK.Input; using MouseState = osu.Framework.Input.MouseState; diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 4e056a03e7..9317741df2 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -71,28 +71,28 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -121,37 +121,37 @@ - - + + - - + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - + @@ -159,15 +159,15 @@ - + - - + + From 4590be552fcc61bdbd1ae8372115fb91dfdeb294 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 18:54:24 +0900 Subject: [PATCH 03/10] Move play modes to their own projects. --- .../Platform/TestStorage.cs | 12 ++- .../Tests/TestCaseGamefield.cs | 6 +- .../Tests/TestCaseHitObjects.cs | 4 +- .../Tests/TestCaseMusicController.cs | 13 +-- .../Tests/TestCasePlaySongSelect.cs | 9 +- .../Tests/TestCasePlayer.cs | 2 +- .../Tests/TestCaseScoreCounter.cs | 5 ++ osu.Desktop.VisualTests/VisualTestGame.cs | 1 - .../osu.Desktop.VisualTests.csproj | 24 +++-- osu.Desktop/osu.Desktop.csproj | 12 +-- .../Objects/Drawables/DrawableHitCircle.cs | 15 ++-- .../Objects/HitCircle.cs | 2 +- .../Objects}/OsuBaseHit.cs | 3 +- .../Objects}/OsuConverter.cs | 5 +- .../Objects}/Slider.cs | 2 +- .../Objects}/Spinner.cs | 2 +- osu.Game.Mode.Osu/OpenTK.dll.config | 25 ++++++ .../Osu => osu.Game.Mode.Osu}/OsuRuleset.cs | 4 +- osu.Game.Mode.Osu/Properties/AssemblyInfo.cs | 36 ++++++++ .../UI}/OsuComboCounter.cs | 3 +- .../UI}/OsuHitRenderer.cs | 9 +- .../UI}/OsuPlayfield.cs | 3 +- .../UI}/ScoreOverlayOsu.cs | 17 ++-- osu.Game.Mode.Osu/app.config | 11 +++ osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj | 80 +++++++++++++++++ osu.Game.Mode.Osu/packages.config | 4 + .../CatchRuleset.cs | 4 +- .../Objects}/CatchBaseHit.cs | 4 +- .../Objects}/CatchConverter.cs | 5 +- .../Objects}/Drawable/DrawableFruit.cs | 2 +- .../Objects}/Droplet.cs | 2 +- .../Objects}/Fruit.cs | 2 +- osu.Game.Modes.Catch/OpenTK.dll.config | 25 ++++++ .../Properties/AssemblyInfo.cs | 36 ++++++++ .../UI}/CatchComboCounter.cs | 4 +- .../UI}/CatchHitRenderer.cs | 5 +- .../UI}/CatchPlayfield.cs | 3 +- .../osu.Game.Modes.Catch.csproj | 85 ++++++++++++++++++ osu.Game.Modes.Catch/packages.config | 4 + .../ManiaRuleset.cs | 3 + .../Objects}/Drawable/DrawableNote.cs | 4 +- .../Objects}/HoldNote.cs | 2 +- .../Objects}/ManiaBaseHit.cs | 4 +- .../Objects}/ManiaConverter.cs | 5 +- .../Objects}/Note.cs | 2 +- osu.Game.Modes.Mania/OpenTK.dll.config | 25 ++++++ .../Properties/AssemblyInfo.cs | 36 ++++++++ .../UI}/ManiaComboCounter.cs | 4 +- .../UI}/ManiaHitRenderer.cs | 5 +- .../UI}/ManiaPlayfield.cs | 3 +- osu.Game.Modes.Mania/app.config | 11 +++ .../osu.Game.Modes.Mania.csproj | 90 +++++++++++++++++++ osu.Game.Modes.Mania/packages.config | 4 + .../Objects}/Drawable/DrawableTaikoHit.cs | 2 +- .../Objects}/TaikoBaseHit.cs | 4 +- .../Objects}/TaikoConverter.cs | 5 +- osu.Game.Modes.Taiko/OpenTK.dll.config | 25 ++++++ .../Properties/AssemblyInfo.cs | 36 ++++++++ .../TaikoRuleset.cs | 4 +- .../UI}/TaikoComboCounter.cs | 3 +- .../UI}/TaikoHitRenderer.cs | 5 +- .../UI}/TaikoPlayfield.cs | 3 +- .../osu.Game.Modes.Taiko.csproj | 83 +++++++++++++++++ osu.Game.Modes.Taiko/packages.config | 4 + .../Beatmaps/Formats/OsuLegacyDecoderTest.cs | 2 +- osu.Game.Tests/osu.Game.Tests.csproj | 4 + osu.Game/Modes/Objects/HitObject.cs | 3 +- osu.Game/Modes/Objects/HitObjectConverter.cs | 1 + osu.Game/Modes/Ruleset.cs | 21 +++-- osu.Game/Modes/{ => UI}/ComboCounter.cs | 2 +- osu.Game/Modes/{ => UI}/ComboResultCounter.cs | 2 +- osu.Game/Modes/{ => UI}/HitRenderer.cs | 2 +- osu.Game/Modes/{ => UI}/Playfield.cs | 2 +- osu.Game/Modes/{ => UI}/ScoreOverlay.cs | 2 +- osu.Game/Screens/Play/Player.cs | 1 + osu.Game/osu.Game.csproj | 46 ++-------- osu.sln | 28 ++++++ 77 files changed, 820 insertions(+), 158 deletions(-) rename osu.Game/Modes/Objects/Osu/Drawable/DrawableCircle.cs => osu.Game.Mode.Osu/Objects/Drawables/DrawableHitCircle.cs (92%) rename osu.Game/Modes/Objects/Osu/Circle.cs => osu.Game.Mode.Osu/Objects/HitCircle.cs (81%) rename {osu.Game/Modes/Objects/Osu => osu.Game.Mode.Osu/Objects}/OsuBaseHit.cs (93%) rename {osu.Game/Modes/Objects/Osu => osu.Game.Mode.Osu/Objects}/OsuConverter.cs (75%) rename {osu.Game/Modes/Objects/Osu => osu.Game.Mode.Osu/Objects}/Slider.cs (86%) rename {osu.Game/Modes/Objects/Osu => osu.Game.Mode.Osu/Objects}/Spinner.cs (81%) create mode 100644 osu.Game.Mode.Osu/OpenTK.dll.config rename {osu.Game/Modes/Osu => osu.Game.Mode.Osu}/OsuRuleset.cs (76%) create mode 100644 osu.Game.Mode.Osu/Properties/AssemblyInfo.cs rename {osu.Game/Modes/Osu => osu.Game.Mode.Osu/UI}/OsuComboCounter.cs (95%) rename {osu.Game/Modes/Osu => osu.Game.Mode.Osu/UI}/OsuHitRenderer.cs (64%) rename {osu.Game/Modes/Osu => osu.Game.Mode.Osu/UI}/OsuPlayfield.cs (93%) rename {osu.Game/Modes/Osu => osu.Game.Mode.Osu/UI}/ScoreOverlayOsu.cs (74%) create mode 100644 osu.Game.Mode.Osu/app.config create mode 100644 osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj create mode 100644 osu.Game.Mode.Osu/packages.config rename {osu.Game/Modes/Catch => osu.Game.Modes.Catch}/CatchRuleset.cs (83%) rename {osu.Game/Modes/Objects/Catch => osu.Game.Modes.Catch/Objects}/CatchBaseHit.cs (75%) rename {osu.Game/Modes/Objects/Catch => osu.Game.Modes.Catch/Objects}/CatchConverter.cs (87%) rename {osu.Game/Modes/Objects/Catch => osu.Game.Modes.Catch/Objects}/Drawable/DrawableFruit.cs (93%) rename {osu.Game/Modes/Objects/Catch => osu.Game.Modes.Catch/Objects}/Droplet.cs (81%) rename {osu.Game/Modes/Objects/Catch => osu.Game.Modes.Catch/Objects}/Fruit.cs (81%) create mode 100644 osu.Game.Modes.Catch/OpenTK.dll.config create mode 100644 osu.Game.Modes.Catch/Properties/AssemblyInfo.cs rename {osu.Game/Modes/Catch => osu.Game.Modes.Catch/UI}/CatchComboCounter.cs (93%) rename {osu.Game/Modes/Catch => osu.Game.Modes.Catch/UI}/CatchHitRenderer.cs (83%) rename {osu.Game/Modes/Catch => osu.Game.Modes.Catch/UI}/CatchPlayfield.cs (87%) create mode 100644 osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj create mode 100644 osu.Game.Modes.Catch/packages.config rename {osu.Game/Modes/Mania => osu.Game.Modes.Mania}/ManiaRuleset.cs (83%) rename {osu.Game/Modes/Objects/Mania => osu.Game.Modes.Mania/Objects}/Drawable/DrawableNote.cs (93%) rename {osu.Game/Modes/Objects/Mania => osu.Game.Modes.Mania/Objects}/HoldNote.cs (80%) rename {osu.Game/Modes/Objects/Mania => osu.Game.Modes.Mania/Objects}/ManiaBaseHit.cs (75%) rename {osu.Game/Modes/Objects/Mania => osu.Game.Modes.Mania/Objects}/ManiaConverter.cs (88%) rename {osu.Game/Modes/Objects/Mania => osu.Game.Modes.Mania/Objects}/Note.cs (81%) create mode 100644 osu.Game.Modes.Mania/OpenTK.dll.config create mode 100644 osu.Game.Modes.Mania/Properties/AssemblyInfo.cs rename {osu.Game/Modes/Mania => osu.Game.Modes.Mania/UI}/ManiaComboCounter.cs (94%) rename {osu.Game/Modes/Mania => osu.Game.Modes.Mania/UI}/ManiaHitRenderer.cs (87%) rename {osu.Game/Modes/Mania => osu.Game.Modes.Mania/UI}/ManiaPlayfield.cs (92%) create mode 100644 osu.Game.Modes.Mania/app.config create mode 100644 osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj create mode 100644 osu.Game.Modes.Mania/packages.config rename {osu.Game/Modes/Objects/Taiko => osu.Game.Modes.Taiko/Objects}/Drawable/DrawableTaikoHit.cs (93%) rename {osu.Game/Modes/Objects/Taiko => osu.Game.Modes.Taiko/Objects}/TaikoBaseHit.cs (79%) rename {osu.Game/Modes/Objects/Taiko => osu.Game.Modes.Taiko/Objects}/TaikoConverter.cs (87%) create mode 100644 osu.Game.Modes.Taiko/OpenTK.dll.config create mode 100644 osu.Game.Modes.Taiko/Properties/AssemblyInfo.cs rename {osu.Game/Modes/Taiko => osu.Game.Modes.Taiko}/TaikoRuleset.cs (83%) rename {osu.Game/Modes/Taiko => osu.Game.Modes.Taiko/UI}/TaikoComboCounter.cs (94%) rename {osu.Game/Modes/Taiko => osu.Game.Modes.Taiko/UI}/TaikoHitRenderer.cs (83%) rename {osu.Game/Modes/Taiko => osu.Game.Modes.Taiko/UI}/TaikoPlayfield.cs (91%) create mode 100644 osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj create mode 100644 osu.Game.Modes.Taiko/packages.config rename osu.Game/Modes/{ => UI}/ComboCounter.cs (96%) rename osu.Game/Modes/{ => UI}/ComboResultCounter.cs (95%) rename osu.Game/Modes/{ => UI}/HitRenderer.cs (95%) rename osu.Game/Modes/{ => UI}/Playfield.cs (86%) rename osu.Game/Modes/{ => UI}/ScoreOverlay.cs (95%) diff --git a/osu.Desktop.VisualTests/Platform/TestStorage.cs b/osu.Desktop.VisualTests/Platform/TestStorage.cs index bffa3420d4..2a6b5a787c 100644 --- a/osu.Desktop.VisualTests/Platform/TestStorage.cs +++ b/osu.Desktop.VisualTests/Platform/TestStorage.cs @@ -1,13 +1,11 @@ -using System; -using System.IO; -using osu.Framework; +using osu.Framework; using osu.Framework.Desktop.Platform; using SQLite.Net; -using SQLite.Net.Platform.Generic; using SQLite.Net.Interop; -using SQLite.Net.Platform.Win32; - -namespace osu.Desktop.Platform +using SQLite.Net.Platform.Generic; +using SQLite.Net.Platform.Win32; + +namespace osu.Desktop.VisualTests.Platform { public class TestStorage : DesktopStorage { diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index 4793f9f157..1ffe76bdda 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -8,11 +8,15 @@ using osu.Framework.MathUtils; using osu.Framework.Timing; using osu.Game.Beatmaps; using osu.Game.Modes.Catch; +using osu.Game.Modes.Catch.UI; using osu.Game.Modes.Mania; +using osu.Game.Modes.Mania.UI; using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Osu; using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.Objects; +using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Taiko; +using osu.Game.Modes.Taiko.UI; using OpenTK; namespace osu.Desktop.VisualTests.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index c55b326b82..904123dd50 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -8,8 +8,8 @@ using osu.Framework.Timing; using OpenTK; using osu.Framework.Allocation; using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Osu; -using osu.Game.Modes.Objects.Osu.Drawable; +using osu.Game.Modes.Osu.Objects; +using osu.Game.Modes.Osu.Objects.Drawables; namespace osu.Desktop.VisualTests.Tests { diff --git a/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs b/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs index bdf20ee73c..72ab3b7a7f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseMusicController.cs @@ -1,19 +1,12 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using osu.Framework.Allocation; -using osu.Framework.Graphics; using osu.Framework.GameModes.Testing; -using osu.Game.Overlays; +using osu.Framework.Graphics; using osu.Framework.Timing; -using osu.Framework; +using osu.Game.Overlays; -namespace osu.Desktop.Tests +namespace osu.Desktop.VisualTests.Tests { class TestCaseMusicController : TestCase { diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs index caf4c90aa7..d6e656e57f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlaySongSelect.cs @@ -1,17 +1,14 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.GameModes.Testing; using System.Collections.Generic; -using osu.Desktop.Platform; +using osu.Desktop.VisualTests.Platform; +using osu.Framework.GameModes.Testing; using osu.Game.Database; -using SQLiteNetExtensions.Extensions; -using osu.Framework; -using osu.Game; using osu.Game.Modes; using osu.Game.Screens.Play; -namespace osu.Desktop.Tests +namespace osu.Desktop.VisualTests.Tests { class TestCasePlaySongSelect : TestCase { diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index c3b7034f79..862377c131 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -11,7 +11,7 @@ using OpenTK; using osu.Framework; using osu.Framework.Allocation; using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Osu.Objects; using osu.Game.Screens.Play; namespace osu.Desktop.VisualTests.Tests diff --git a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs index 005124e3c5..7629c33780 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseScoreCounter.cs @@ -9,9 +9,14 @@ using osu.Framework.MathUtils; using osu.Game.Graphics.UserInterface; using osu.Game.Modes; using osu.Game.Modes.Catch; +using osu.Game.Modes.Catch.UI; using osu.Game.Modes.Mania; +using osu.Game.Modes.Mania.UI; using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Taiko; +using osu.Game.Modes.Taiko.UI; +using osu.Game.Modes.UI; using osu.Game.Screens.Play; using OpenTK; using OpenTK.Graphics; diff --git a/osu.Desktop.VisualTests/VisualTestGame.cs b/osu.Desktop.VisualTests/VisualTestGame.cs index 4d5d349fca..0dc260e1fd 100644 --- a/osu.Desktop.VisualTests/VisualTestGame.cs +++ b/osu.Desktop.VisualTests/VisualTestGame.cs @@ -11,7 +11,6 @@ using System.Reflection; using System.IO; using System.Collections.Generic; using SQLiteNetExtensions.Extensions; -using osu.Desktop.Platform; using osu.Framework.Allocation; namespace osu.Desktop.VisualTests diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj index e8f8656f15..d12ecc273d 100644 --- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj +++ b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj @@ -150,6 +150,22 @@ {d9a367c9-4c1a-489f-9b05-a0cea2b53b58} osu.Game.Resources + + {c92a607b-1fdd-4954-9f92-03ff547d9080} + osu.Game.Modes.Osu + + + {58f6c80c-1253-4a0e-a465-b8c85ebeadf3} + osu.Game.Modes.Catch + + + {48f4582b-7687-4621-9cbe-5c24197cb536} + osu.Game.Modes.Mania + + + {f167e17a-7de6-4af5-b920-a5112296c695} + osu.Game.Modes.Taiko + {0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d} osu.Game @@ -158,9 +174,9 @@ + - @@ -172,9 +188,7 @@ - - - + + + + + + + + diff --git a/osu.Game/Modes/Osu/OsuRuleset.cs b/osu.Game.Mode.Osu/OsuRuleset.cs similarity index 76% rename from osu.Game/Modes/Osu/OsuRuleset.cs rename to osu.Game.Mode.Osu/OsuRuleset.cs index bf7c7498ec..27154fa646 100644 --- a/osu.Game/Modes/Osu/OsuRuleset.cs +++ b/osu.Game.Mode.Osu/OsuRuleset.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.UI; +using osu.Game.Modes.UI; namespace osu.Game.Modes.Osu { @@ -10,5 +12,5 @@ namespace osu.Game.Modes.Osu { public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu(); - public override HitRenderer CreateHitRendererWith(List objects) => new OsuHitRenderer { Objects = objects }; + public override HitRenderer CreateHitRendererWith(List objects) => new UI.OsuHitRenderer { Objects = objects }; }} diff --git a/osu.Game.Mode.Osu/Properties/AssemblyInfo.cs b/osu.Game.Mode.Osu/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1b0664acf5 --- /dev/null +++ b/osu.Game.Mode.Osu/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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.Mode.Osu")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("osu.Game.Mode.Osu")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c92a607b-1fdd-4954-9f92-03ff547d9080")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/osu.Game/Modes/Osu/OsuComboCounter.cs b/osu.Game.Mode.Osu/UI/OsuComboCounter.cs similarity index 95% rename from osu.Game/Modes/Osu/OsuComboCounter.cs rename to osu.Game.Mode.Osu/UI/OsuComboCounter.cs index 58edaa096c..a10a1fbcbf 100644 --- a/osu.Game/Modes/Osu/OsuComboCounter.cs +++ b/osu.Game.Mode.Osu/UI/OsuComboCounter.cs @@ -1,9 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Modes.UI; using OpenTK; -namespace osu.Game.Modes.Osu +namespace osu.Game.Modes.Osu.UI { /// /// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard. diff --git a/osu.Game/Modes/Osu/OsuHitRenderer.cs b/osu.Game.Mode.Osu/UI/OsuHitRenderer.cs similarity index 64% rename from osu.Game/Modes/Osu/OsuHitRenderer.cs rename to osu.Game.Mode.Osu/UI/OsuHitRenderer.cs index ffed72d8f1..94f4ba2fd4 100644 --- a/osu.Game/Modes/Osu/OsuHitRenderer.cs +++ b/osu.Game.Mode.Osu/UI/OsuHitRenderer.cs @@ -2,10 +2,13 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Osu; -using osu.Game.Modes.Objects.Osu.Drawable; +using osu.Game.Modes.UI; +using Circle = osu.Game.Modes.Osu.Objects.Circle; +using DrawableCircle = osu.Game.Modes.Osu.Objects.Drawables.DrawableCircle; +using OsuBaseHit = osu.Game.Modes.Osu.Objects.OsuBaseHit; +using OsuConverter = osu.Game.Modes.Osu.Objects.OsuConverter; -namespace osu.Game.Modes.Osu +namespace osu.Game.Modes.Osu.UI { public class OsuHitRenderer : HitRenderer { diff --git a/osu.Game/Modes/Osu/OsuPlayfield.cs b/osu.Game.Mode.Osu/UI/OsuPlayfield.cs similarity index 93% rename from osu.Game/Modes/Osu/OsuPlayfield.cs rename to osu.Game.Mode.Osu/UI/OsuPlayfield.cs index 33dc9a7cc4..93700db30b 100644 --- a/osu.Game/Modes/Osu/OsuPlayfield.cs +++ b/osu.Game.Mode.Osu/UI/OsuPlayfield.cs @@ -4,10 +4,11 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; +using osu.Game.Modes.UI; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.Modes.Osu +namespace osu.Game.Modes.Osu.UI { public class OsuPlayfield : Playfield { diff --git a/osu.Game/Modes/Osu/ScoreOverlayOsu.cs b/osu.Game.Mode.Osu/UI/ScoreOverlayOsu.cs similarity index 74% rename from osu.Game/Modes/Osu/ScoreOverlayOsu.cs rename to osu.Game.Mode.Osu/UI/ScoreOverlayOsu.cs index 3654191b8d..911a462ca2 100644 --- a/osu.Game/Modes/Osu/ScoreOverlayOsu.cs +++ b/osu.Game.Mode.Osu/UI/ScoreOverlayOsu.cs @@ -3,12 +3,13 @@ using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; +using osu.Game.Modes.UI; using OpenTK; using OpenTK.Input; -namespace osu.Game.Modes.Osu +namespace osu.Game.Modes.Osu.UI { - class ScoreOverlayOsu : ScoreOverlay + public class ScoreOverlayOsu : ScoreOverlay { protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter() { @@ -38,12 +39,12 @@ namespace osu.Game.Modes.Osu Origin = Anchor.BottomRight, Position = new Vector2(10), Counters = new KeyCounter[] - { - new KeyCounterKeyboard(@"Z", Key.Z), - new KeyCounterKeyboard(@"X", Key.X), - new KeyCounterMouse(@"M1", MouseButton.Left), - new KeyCounterMouse(@"M2", MouseButton.Right), - } + { + new KeyCounterKeyboard(@"Z", Key.Z), + new KeyCounterKeyboard(@"X", Key.X), + new KeyCounterMouse(@"M1", MouseButton.Left), + new KeyCounterMouse(@"M2", MouseButton.Right), + } }; } } diff --git a/osu.Game.Mode.Osu/app.config b/osu.Game.Mode.Osu/app.config new file mode 100644 index 0000000000..757f23cb22 --- /dev/null +++ b/osu.Game.Mode.Osu/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj b/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj new file mode 100644 index 0000000000..e53a760db6 --- /dev/null +++ b/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj @@ -0,0 +1,80 @@ + + + + + Debug + AnyCPU + {C92A607B-1FDD-4954-9F92-03FF547D9080} + Library + Properties + osu.Game.Modes.Osu + osu.Game.Mode.Osu + v4.5 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + True + + + + + + + + + + + + + + + + + + + + + + + {C76BF5B3-985E-4D39-95FE-97C9C879B83A} + osu.Framework + + + {0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d} + osu.Game + + + + + + + + + + \ No newline at end of file diff --git a/osu.Game.Mode.Osu/packages.config b/osu.Game.Mode.Osu/packages.config new file mode 100644 index 0000000000..e1adbd7260 --- /dev/null +++ b/osu.Game.Mode.Osu/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/osu.Game/Modes/Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs similarity index 83% rename from osu.Game/Modes/Catch/CatchRuleset.cs rename to osu.Game.Modes.Catch/CatchRuleset.cs index a92518b0db..91385155b8 100644 --- a/osu.Game/Modes/Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -2,8 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; +using osu.Game.Modes.Catch.UI; using osu.Game.Modes.Objects; -using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.UI; +using osu.Game.Modes.UI; namespace osu.Game.Modes.Catch { diff --git a/osu.Game/Modes/Objects/Catch/CatchBaseHit.cs b/osu.Game.Modes.Catch/Objects/CatchBaseHit.cs similarity index 75% rename from osu.Game/Modes/Objects/Catch/CatchBaseHit.cs rename to osu.Game.Modes.Catch/Objects/CatchBaseHit.cs index 29bc967e01..67e94e7000 100644 --- a/osu.Game/Modes/Objects/Catch/CatchBaseHit.cs +++ b/osu.Game.Modes.Catch/Objects/CatchBaseHit.cs @@ -1,7 +1,9 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Catch +using osu.Game.Modes.Objects; + +namespace osu.Game.Modes.Catch.Objects { public abstract class CatchBaseHit : HitObject { diff --git a/osu.Game/Modes/Objects/Catch/CatchConverter.cs b/osu.Game.Modes.Catch/Objects/CatchConverter.cs similarity index 87% rename from osu.Game/Modes/Objects/Catch/CatchConverter.cs rename to osu.Game.Modes.Catch/Objects/CatchConverter.cs index 49d889df23..81eabc15a2 100644 --- a/osu.Game/Modes/Objects/Catch/CatchConverter.cs +++ b/osu.Game.Modes.Catch/Objects/CatchConverter.cs @@ -2,9 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.Objects; -namespace osu.Game.Modes.Objects.Catch +namespace osu.Game.Modes.Catch.Objects { class CatchConverter : HitObjectConverter { diff --git a/osu.Game/Modes/Objects/Catch/Drawable/DrawableFruit.cs b/osu.Game.Modes.Catch/Objects/Drawable/DrawableFruit.cs similarity index 93% rename from osu.Game/Modes/Objects/Catch/Drawable/DrawableFruit.cs rename to osu.Game.Modes.Catch/Objects/Drawable/DrawableFruit.cs index b0a5a2f16d..dd9cfbcc6b 100644 --- a/osu.Game/Modes/Objects/Catch/Drawable/DrawableFruit.cs +++ b/osu.Game.Modes.Catch/Objects/Drawable/DrawableFruit.cs @@ -8,7 +8,7 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using OpenTK; -namespace osu.Game.Modes.Objects.Catch.Drawable +namespace osu.Game.Modes.Catch.Objects.Drawable { class DrawableFruit : Sprite { diff --git a/osu.Game/Modes/Objects/Catch/Droplet.cs b/osu.Game.Modes.Catch/Objects/Droplet.cs similarity index 81% rename from osu.Game/Modes/Objects/Catch/Droplet.cs rename to osu.Game.Modes.Catch/Objects/Droplet.cs index e33dc29138..42ad809e2c 100644 --- a/osu.Game/Modes/Objects/Catch/Droplet.cs +++ b/osu.Game.Modes.Catch/Objects/Droplet.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Catch +namespace osu.Game.Modes.Catch.Objects { public class Droplet : CatchBaseHit { diff --git a/osu.Game/Modes/Objects/Catch/Fruit.cs b/osu.Game.Modes.Catch/Objects/Fruit.cs similarity index 81% rename from osu.Game/Modes/Objects/Catch/Fruit.cs rename to osu.Game.Modes.Catch/Objects/Fruit.cs index ee7bc38c6d..f1cb3d6db4 100644 --- a/osu.Game/Modes/Objects/Catch/Fruit.cs +++ b/osu.Game.Modes.Catch/Objects/Fruit.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Catch +namespace osu.Game.Modes.Catch.Objects { public class Fruit : CatchBaseHit { diff --git a/osu.Game.Modes.Catch/OpenTK.dll.config b/osu.Game.Modes.Catch/OpenTK.dll.config new file mode 100644 index 0000000000..5620e3d9e2 --- /dev/null +++ b/osu.Game.Modes.Catch/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osu.Game.Modes.Catch/Properties/AssemblyInfo.cs b/osu.Game.Modes.Catch/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..4f0e60baaf --- /dev/null +++ b/osu.Game.Modes.Catch/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("osu.Game.Modes.Catch")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("58f6c80c-1253-4a0e-a465-b8c85ebeadf3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/osu.Game/Modes/Catch/CatchComboCounter.cs b/osu.Game.Modes.Catch/UI/CatchComboCounter.cs similarity index 93% rename from osu.Game/Modes/Catch/CatchComboCounter.cs rename to osu.Game.Modes.Catch/UI/CatchComboCounter.cs index ee972ac49a..685516f352 100644 --- a/osu.Game/Modes/Catch/CatchComboCounter.cs +++ b/osu.Game.Modes.Catch/UI/CatchComboCounter.cs @@ -1,10 +1,10 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.UI; using OpenTK.Graphics; -namespace osu.Game.Modes.Catch +namespace osu.Game.Modes.Catch.UI { /// /// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch. diff --git a/osu.Game/Modes/Catch/CatchHitRenderer.cs b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs similarity index 83% rename from osu.Game/Modes/Catch/CatchHitRenderer.cs rename to osu.Game.Modes.Catch/UI/CatchHitRenderer.cs index a796d70c0e..4d58ce6278 100644 --- a/osu.Game/Modes/Catch/CatchHitRenderer.cs +++ b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs @@ -1,10 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Modes.Catch.Objects; using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Catch; +using osu.Game.Modes.UI; -namespace osu.Game.Modes.Catch +namespace osu.Game.Modes.Catch.UI { public class CatchHitRenderer : HitRenderer { diff --git a/osu.Game/Modes/Catch/CatchPlayfield.cs b/osu.Game.Modes.Catch/UI/CatchPlayfield.cs similarity index 87% rename from osu.Game/Modes/Catch/CatchPlayfield.cs rename to osu.Game.Modes.Catch/UI/CatchPlayfield.cs index ca323f81d5..4b6b2ab531 100644 --- a/osu.Game/Modes/Catch/CatchPlayfield.cs +++ b/osu.Game.Modes.Catch/UI/CatchPlayfield.cs @@ -3,9 +3,10 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Game.Modes.UI; using OpenTK; -namespace osu.Game.Modes.Catch +namespace osu.Game.Modes.Catch.UI { public class CatchPlayfield : Playfield { diff --git a/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj new file mode 100644 index 0000000000..1db852e438 --- /dev/null +++ b/osu.Game.Modes.Catch/osu.Game.Modes.Catch.csproj @@ -0,0 +1,85 @@ + + + + + Debug + AnyCPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3} + Library + Properties + osu.Game.Modes.Catch + osu.Game.Modes.Catch + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {C76BF5B3-985E-4D39-95FE-97C9C879B83A} + osu.Framework + + + {C92A607B-1FDD-4954-9F92-03FF547D9080} + osu.Game.Modes.Osu + + + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} + osu.Game + + + + + \ No newline at end of file diff --git a/osu.Game.Modes.Catch/packages.config b/osu.Game.Modes.Catch/packages.config new file mode 100644 index 0000000000..4da07d9f06 --- /dev/null +++ b/osu.Game.Modes.Catch/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/osu.Game/Modes/Mania/ManiaRuleset.cs b/osu.Game.Modes.Mania/ManiaRuleset.cs similarity index 83% rename from osu.Game/Modes/Mania/ManiaRuleset.cs rename to osu.Game.Modes.Mania/ManiaRuleset.cs index 29935ce6f8..5dd9167e75 100644 --- a/osu.Game/Modes/Mania/ManiaRuleset.cs +++ b/osu.Game.Modes.Mania/ManiaRuleset.cs @@ -2,8 +2,11 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; +using osu.Game.Modes.Mania.UI; using osu.Game.Modes.Objects; using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.UI; +using osu.Game.Modes.UI; namespace osu.Game.Modes.Mania { diff --git a/osu.Game/Modes/Objects/Mania/Drawable/DrawableNote.cs b/osu.Game.Modes.Mania/Objects/Drawable/DrawableNote.cs similarity index 93% rename from osu.Game/Modes/Objects/Mania/Drawable/DrawableNote.cs rename to osu.Game.Modes.Mania/Objects/Drawable/DrawableNote.cs index 34c7217dbb..1d81ab16f8 100644 --- a/osu.Game/Modes/Objects/Mania/Drawable/DrawableNote.cs +++ b/osu.Game.Modes.Mania/Objects/Drawable/DrawableNote.cs @@ -2,13 +2,13 @@ //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.Sprites; using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; +using osu.Framework.Graphics; using OpenTK; -namespace osu.Game.Modes.Objects.Mania.Drawable +namespace osu.Game.Modes.Mania.Objects.Drawable { public class DrawableNote : Sprite { diff --git a/osu.Game/Modes/Objects/Mania/HoldNote.cs b/osu.Game.Modes.Mania/Objects/HoldNote.cs similarity index 80% rename from osu.Game/Modes/Objects/Mania/HoldNote.cs rename to osu.Game.Modes.Mania/Objects/HoldNote.cs index fd6ff8ba6d..7c12593d79 100644 --- a/osu.Game/Modes/Objects/Mania/HoldNote.cs +++ b/osu.Game.Modes.Mania/Objects/HoldNote.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Mania +namespace osu.Game.Modes.Mania.Objects { public class HoldNote : Note { diff --git a/osu.Game/Modes/Objects/Mania/ManiaBaseHit.cs b/osu.Game.Modes.Mania/Objects/ManiaBaseHit.cs similarity index 75% rename from osu.Game/Modes/Objects/Mania/ManiaBaseHit.cs rename to osu.Game.Modes.Mania/Objects/ManiaBaseHit.cs index 09ad613f1b..efb2c20959 100644 --- a/osu.Game/Modes/Objects/Mania/ManiaBaseHit.cs +++ b/osu.Game.Modes.Mania/Objects/ManiaBaseHit.cs @@ -1,7 +1,9 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Mania +using osu.Game.Modes.Objects; + +namespace osu.Game.Modes.Mania.Objects { public abstract class ManiaBaseHit : HitObject { diff --git a/osu.Game/Modes/Objects/Mania/ManiaConverter.cs b/osu.Game.Modes.Mania/Objects/ManiaConverter.cs similarity index 88% rename from osu.Game/Modes/Objects/Mania/ManiaConverter.cs rename to osu.Game.Modes.Mania/Objects/ManiaConverter.cs index 06a2481875..d07d88d970 100644 --- a/osu.Game/Modes/Objects/Mania/ManiaConverter.cs +++ b/osu.Game.Modes.Mania/Objects/ManiaConverter.cs @@ -3,9 +3,10 @@ using System; using System.Collections.Generic; -using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.Objects; -namespace osu.Game.Modes.Objects.Mania +namespace osu.Game.Modes.Mania.Objects { class ManiaConverter : HitObjectConverter { diff --git a/osu.Game/Modes/Objects/Mania/Note.cs b/osu.Game.Modes.Mania/Objects/Note.cs similarity index 81% rename from osu.Game/Modes/Objects/Mania/Note.cs rename to osu.Game.Modes.Mania/Objects/Note.cs index df8c06f9bd..ec1ee270e3 100644 --- a/osu.Game/Modes/Objects/Mania/Note.cs +++ b/osu.Game.Modes.Mania/Objects/Note.cs @@ -1,7 +1,7 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Mania +namespace osu.Game.Modes.Mania.Objects { public class Note : ManiaBaseHit { diff --git a/osu.Game.Modes.Mania/OpenTK.dll.config b/osu.Game.Modes.Mania/OpenTK.dll.config new file mode 100644 index 0000000000..5620e3d9e2 --- /dev/null +++ b/osu.Game.Modes.Mania/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osu.Game.Modes.Mania/Properties/AssemblyInfo.cs b/osu.Game.Modes.Mania/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..0ac2657410 --- /dev/null +++ b/osu.Game.Modes.Mania/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("osu.Game.Modes.Mania")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("48f4582b-7687-4621-9cbe-5c24197cb536")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/osu.Game/Modes/Mania/ManiaComboCounter.cs b/osu.Game.Modes.Mania/UI/ManiaComboCounter.cs similarity index 94% rename from osu.Game/Modes/Mania/ManiaComboCounter.cs rename to osu.Game.Modes.Mania/UI/ManiaComboCounter.cs index 26e654622f..dccd871def 100644 --- a/osu.Game/Modes/Mania/ManiaComboCounter.cs +++ b/osu.Game.Modes.Mania/UI/ManiaComboCounter.cs @@ -3,10 +3,10 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Transformations; -using osu.Game.Modes.Taiko; +using osu.Game.Modes.Taiko.UI; using OpenTK.Graphics; -namespace osu.Game.Modes.Mania +namespace osu.Game.Modes.Mania.UI { /// /// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania. diff --git a/osu.Game/Modes/Mania/ManiaHitRenderer.cs b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs similarity index 87% rename from osu.Game/Modes/Mania/ManiaHitRenderer.cs rename to osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs index 82f6bd1e9d..2e4514cb85 100644 --- a/osu.Game/Modes/Mania/ManiaHitRenderer.cs +++ b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs @@ -1,10 +1,11 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Modes.Mania.Objects; using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Mania; +using osu.Game.Modes.UI; -namespace osu.Game.Modes.Mania +namespace osu.Game.Modes.Mania.UI { public class ManiaHitRenderer : HitRenderer { diff --git a/osu.Game/Modes/Mania/ManiaPlayfield.cs b/osu.Game.Modes.Mania/UI/ManiaPlayfield.cs similarity index 92% rename from osu.Game/Modes/Mania/ManiaPlayfield.cs rename to osu.Game.Modes.Mania/UI/ManiaPlayfield.cs index 277927ffde..bd905cef9a 100644 --- a/osu.Game/Modes/Mania/ManiaPlayfield.cs +++ b/osu.Game.Modes.Mania/UI/ManiaPlayfield.cs @@ -3,10 +3,11 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; +using osu.Game.Modes.UI; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.Modes.Mania +namespace osu.Game.Modes.Mania.UI { public class ManiaPlayfield : Playfield { diff --git a/osu.Game.Modes.Mania/app.config b/osu.Game.Modes.Mania/app.config new file mode 100644 index 0000000000..44ccc4b77a --- /dev/null +++ b/osu.Game.Modes.Mania/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj new file mode 100644 index 0000000000..2ccfff5dcd --- /dev/null +++ b/osu.Game.Modes.Mania/osu.Game.Modes.Mania.csproj @@ -0,0 +1,90 @@ + + + + + Debug + AnyCPU + {48F4582B-7687-4621-9CBE-5C24197CB536} + Library + Properties + osu.Game.Modes.Mania + osu.Game.Modes.Mania + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + {C76BF5B3-985E-4D39-95FE-97C9C879B83A} + osu.Framework + + + {C92A607B-1FDD-4954-9F92-03FF547D9080} + osu.Game.Modes.Osu + + + {F167E17A-7DE6-4AF5-B920-A5112296C695} + osu.Game.Modes.Taiko + + + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} + osu.Game + + + + + + + + + + \ No newline at end of file diff --git a/osu.Game.Modes.Mania/packages.config b/osu.Game.Modes.Mania/packages.config new file mode 100644 index 0000000000..4da07d9f06 --- /dev/null +++ b/osu.Game.Modes.Mania/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/osu.Game/Modes/Objects/Taiko/Drawable/DrawableTaikoHit.cs b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs similarity index 93% rename from osu.Game/Modes/Objects/Taiko/Drawable/DrawableTaikoHit.cs rename to osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs index 5a77aa1c58..8ef57160d5 100644 --- a/osu.Game/Modes/Objects/Taiko/Drawable/DrawableTaikoHit.cs +++ b/osu.Game.Modes.Taiko/Objects/Drawable/DrawableTaikoHit.cs @@ -8,7 +8,7 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Transformations; using OpenTK; -namespace osu.Game.Modes.Objects.Taiko.Drawable +namespace osu.Game.Modes.Taiko.Objects.Drawable { class DrawableTaikoHit : Sprite { diff --git a/osu.Game/Modes/Objects/Taiko/TaikoBaseHit.cs b/osu.Game.Modes.Taiko/Objects/TaikoBaseHit.cs similarity index 79% rename from osu.Game/Modes/Objects/Taiko/TaikoBaseHit.cs rename to osu.Game.Modes.Taiko/Objects/TaikoBaseHit.cs index 3805326b2a..ed3f154d20 100644 --- a/osu.Game/Modes/Objects/Taiko/TaikoBaseHit.cs +++ b/osu.Game.Modes.Taiko/Objects/TaikoBaseHit.cs @@ -1,7 +1,9 @@ //Copyright (c) 2007-2016 ppy Pty Ltd . //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -namespace osu.Game.Modes.Objects.Taiko +using osu.Game.Modes.Objects; + +namespace osu.Game.Modes.Taiko.Objects { public class TaikoBaseHit : HitObject { diff --git a/osu.Game/Modes/Objects/Taiko/TaikoConverter.cs b/osu.Game.Modes.Taiko/Objects/TaikoConverter.cs similarity index 87% rename from osu.Game/Modes/Objects/Taiko/TaikoConverter.cs rename to osu.Game.Modes.Taiko/Objects/TaikoConverter.cs index 62d90beedc..4f849d538b 100644 --- a/osu.Game/Modes/Objects/Taiko/TaikoConverter.cs +++ b/osu.Game.Modes.Taiko/Objects/TaikoConverter.cs @@ -2,9 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.Objects; -namespace osu.Game.Modes.Objects.Taiko +namespace osu.Game.Modes.Taiko.Objects { class TaikoConverter : HitObjectConverter { diff --git a/osu.Game.Modes.Taiko/OpenTK.dll.config b/osu.Game.Modes.Taiko/OpenTK.dll.config new file mode 100644 index 0000000000..5620e3d9e2 --- /dev/null +++ b/osu.Game.Modes.Taiko/OpenTK.dll.config @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osu.Game.Modes.Taiko/Properties/AssemblyInfo.cs b/osu.Game.Modes.Taiko/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..fe4ac44ab7 --- /dev/null +++ b/osu.Game.Modes.Taiko/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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.Taiko")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("osu.Game.Modes.Taiko")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f167e17a-7de6-4af5-b920-a5112296c695")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/osu.Game/Modes/Taiko/TaikoRuleset.cs b/osu.Game.Modes.Taiko/TaikoRuleset.cs similarity index 83% rename from osu.Game/Modes/Taiko/TaikoRuleset.cs rename to osu.Game.Modes.Taiko/TaikoRuleset.cs index b90c96113d..1764b542da 100644 --- a/osu.Game/Modes/Taiko/TaikoRuleset.cs +++ b/osu.Game.Modes.Taiko/TaikoRuleset.cs @@ -3,7 +3,9 @@ using System.Collections.Generic; using osu.Game.Modes.Objects; -using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.UI; +using osu.Game.Modes.Taiko.UI; +using osu.Game.Modes.UI; namespace osu.Game.Modes.Taiko { diff --git a/osu.Game/Modes/Taiko/TaikoComboCounter.cs b/osu.Game.Modes.Taiko/UI/TaikoComboCounter.cs similarity index 94% rename from osu.Game/Modes/Taiko/TaikoComboCounter.cs rename to osu.Game.Modes.Taiko/UI/TaikoComboCounter.cs index ac7211a92e..cc94e5e4ea 100644 --- a/osu.Game/Modes/Taiko/TaikoComboCounter.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoComboCounter.cs @@ -2,9 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics.Transformations; +using osu.Game.Modes.UI; using OpenTK; -namespace osu.Game.Modes.Taiko +namespace osu.Game.Modes.Taiko.UI { /// /// Allows tint and scaling animations. Used in osu!taiko. diff --git a/osu.Game/Modes/Taiko/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs similarity index 83% rename from osu.Game/Modes/Taiko/TaikoHitRenderer.cs rename to osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index 5b6119e2ad..28180b5d24 100644 --- a/osu.Game/Modes/Taiko/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -2,9 +2,10 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Modes.Objects; -using osu.Game.Modes.Objects.Taiko; +using osu.Game.Modes.Taiko.Objects; +using osu.Game.Modes.UI; -namespace osu.Game.Modes.Taiko +namespace osu.Game.Modes.Taiko.UI { public class TaikoHitRenderer : HitRenderer { diff --git a/osu.Game/Modes/Taiko/TaikoPlayfield.cs b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs similarity index 91% rename from osu.Game/Modes/Taiko/TaikoPlayfield.cs rename to osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs index 7d999ae213..b9bf31bb56 100644 --- a/osu.Game/Modes/Taiko/TaikoPlayfield.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoPlayfield.cs @@ -5,10 +5,11 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; +using osu.Game.Modes.UI; using OpenTK; using OpenTK.Graphics; -namespace osu.Game.Modes.Taiko +namespace osu.Game.Modes.Taiko.UI { public class TaikoPlayfield : Playfield { diff --git a/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj new file mode 100644 index 0000000000..d49c3c2466 --- /dev/null +++ b/osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {F167E17A-7DE6-4AF5-B920-A5112296C695} + Library + Properties + osu.Game.Modes.Taiko + osu.Game.Modes.Taiko + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + {C76BF5B3-985E-4D39-95FE-97C9C879B83A} + osu.Framework + + + {C92A607B-1FDD-4954-9F92-03FF547D9080} + osu.Game.Modes.Osu + + + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} + osu.Game + + + + + \ No newline at end of file diff --git a/osu.Game.Modes.Taiko/packages.config b/osu.Game.Modes.Taiko/packages.config new file mode 100644 index 0000000000..4da07d9f06 --- /dev/null +++ b/osu.Game.Modes.Taiko/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs index 226725b93f..db2e4b7d7e 100644 --- a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs @@ -7,7 +7,7 @@ using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Samples; using osu.Game.Modes; -using osu.Game.Modes.Objects.Osu; +using osu.Game.Modes.Osu.Objects; using osu.Game.Screens.Play; using osu.Game.Tests.Resources; diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index d4a1976f17..646ee756d5 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -66,6 +66,10 @@ {c76bf5b3-985e-4d39-95fe-97c9c879b83a} osu.Framework + + {c92a607b-1fdd-4954-9f92-03ff547d9080} + osu.Game.Modes.Osu + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} osu.Game diff --git a/osu.Game/Modes/Objects/HitObject.cs b/osu.Game/Modes/Objects/HitObject.cs index fe63579d67..62c47d7059 100644 --- a/osu.Game/Modes/Objects/HitObject.cs +++ b/osu.Game/Modes/Objects/HitObject.cs @@ -2,7 +2,6 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps.Samples; -using osu.Game.Modes.Objects.Osu; using OpenTK.Graphics; namespace osu.Game.Modes.Objects @@ -29,7 +28,7 @@ namespace osu.Game.Modes.Objects switch (mode) { case PlayMode.Osu: - return OsuBaseHit.Parse(val); + return null; //return OsuBaseHit.Parse(val); default: return null; } diff --git a/osu.Game/Modes/Objects/HitObjectConverter.cs b/osu.Game/Modes/Objects/HitObjectConverter.cs index 73a27f9e96..66a73956fa 100644 --- a/osu.Game/Modes/Objects/HitObjectConverter.cs +++ b/osu.Game/Modes/Objects/HitObjectConverter.cs @@ -11,6 +11,7 @@ namespace osu.Game.Modes.Objects { public abstract List Convert(List input); } + public class HitObjectConvertException : Exception { public HitObject Input { get; } diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index 12d0fbb718..842b9ed211 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -2,11 +2,8 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Game.Modes.Catch; -using osu.Game.Modes.Mania; using osu.Game.Modes.Objects; -using osu.Game.Modes.Osu; -using osu.Game.Modes.Taiko; +using osu.Game.Modes.UI; namespace osu.Game.Modes { @@ -21,13 +18,15 @@ namespace osu.Game.Modes switch (mode) { default: - return new OsuRuleset(); - case PlayMode.Catch: - return new CatchRuleset(); - case PlayMode.Mania: - return new ManiaRuleset(); - case PlayMode.Taiko: - return new TaikoRuleset(); + return null; + + // return new OsuRuleset(); + //case PlayMode.Catch: + // return new CatchRuleset(); + //case PlayMode.Mania: + // return new ManiaRuleset(); + //case PlayMode.Taiko: + // return new TaikoRuleset(); } } } diff --git a/osu.Game/Modes/ComboCounter.cs b/osu.Game/Modes/UI/ComboCounter.cs similarity index 96% rename from osu.Game/Modes/ComboCounter.cs rename to osu.Game/Modes/UI/ComboCounter.cs index cc00ac700a..d371110308 100644 --- a/osu.Game/Modes/ComboCounter.cs +++ b/osu.Game/Modes/UI/ComboCounter.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Transformations; using osu.Framework.MathUtils; -namespace osu.Game.Modes +namespace osu.Game.Modes.UI { public abstract class ComboCounter : Container { diff --git a/osu.Game/Modes/ComboResultCounter.cs b/osu.Game/Modes/UI/ComboResultCounter.cs similarity index 95% rename from osu.Game/Modes/ComboResultCounter.cs rename to osu.Game/Modes/UI/ComboResultCounter.cs index 4ae203363e..840a2e0b73 100644 --- a/osu.Game/Modes/ComboResultCounter.cs +++ b/osu.Game/Modes/UI/ComboResultCounter.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.MathUtils; using osu.Game.Graphics.UserInterface; -namespace osu.Game.Modes +namespace osu.Game.Modes.UI { /// /// Used to display combo with a roll-up animation in results screen. diff --git a/osu.Game/Modes/HitRenderer.cs b/osu.Game/Modes/UI/HitRenderer.cs similarity index 95% rename from osu.Game/Modes/HitRenderer.cs rename to osu.Game/Modes/UI/HitRenderer.cs index e73669ff6a..475d2ec897 100644 --- a/osu.Game/Modes/HitRenderer.cs +++ b/osu.Game/Modes/UI/HitRenderer.cs @@ -9,7 +9,7 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Modes.Objects; -namespace osu.Game.Modes +namespace osu.Game.Modes.UI { public abstract class HitRenderer : Container { diff --git a/osu.Game/Modes/Playfield.cs b/osu.Game/Modes/UI/Playfield.cs similarity index 86% rename from osu.Game/Modes/Playfield.cs rename to osu.Game/Modes/UI/Playfield.cs index 4fe1887962..24aecb8a22 100644 --- a/osu.Game/Modes/Playfield.cs +++ b/osu.Game/Modes/UI/Playfield.cs @@ -3,7 +3,7 @@ using osu.Framework.Graphics.Containers; -namespace osu.Game.Modes +namespace osu.Game.Modes.UI { public class Playfield : Container { diff --git a/osu.Game/Modes/ScoreOverlay.cs b/osu.Game/Modes/UI/ScoreOverlay.cs similarity index 95% rename from osu.Game/Modes/ScoreOverlay.cs rename to osu.Game/Modes/UI/ScoreOverlay.cs index 52b42f640f..2270533d47 100644 --- a/osu.Game/Modes/ScoreOverlay.cs +++ b/osu.Game/Modes/UI/ScoreOverlay.cs @@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers; using osu.Game.Graphics.UserInterface; using osu.Game.Modes.Objects; -namespace osu.Game.Modes +namespace osu.Game.Modes.UI { public abstract class ScoreOverlay : Container { diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 4030d02986..926fd77222 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -12,6 +12,7 @@ using osu.Framework.Timing; using osu.Game.Database; using osu.Game.Modes; using osu.Game.Modes.Objects; +using osu.Game.Modes.UI; using osu.Game.Screens.Backgrounds; using OpenTK.Input; using MouseState = osu.Framework.Input.MouseState; diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 9317741df2..9e8a3a0141 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -71,28 +71,9 @@ - - - - - - - - - - - - - - - - - - - @@ -121,37 +102,23 @@ - - - - - - - - - - - - - - - - + + + - - + + - @@ -159,15 +126,12 @@ - - - diff --git a/osu.sln b/osu.sln index 3d79d4444f..9677a752fb 100644 --- a/osu.sln +++ b/osu.sln @@ -21,6 +21,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.VisualTests", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Tests", "osu.Game.Tests\osu.Game.Tests.csproj", "{54377672-20B1-40AF-8087-5CF73BF3953A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Modes.Osu", "osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj", "{C92A607B-1FDD-4954-9F92-03FF547D9080}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Modes.Catch", "osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj", "{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Modes.Taiko", "osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj", "{F167E17A-7DE6-4AF5-B920-A5112296C695}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Modes.Mania", "osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj", "{48F4582B-7687-4621-9CBE-5C24197CB536}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +63,22 @@ Global {54377672-20B1-40AF-8087-5CF73BF3953A}.Debug|Any CPU.Build.0 = Debug|Any CPU {54377672-20B1-40AF-8087-5CF73BF3953A}.Release|Any CPU.ActiveCfg = Release|Any CPU {54377672-20B1-40AF-8087-5CF73BF3953A}.Release|Any CPU.Build.0 = Release|Any CPU + {C92A607B-1FDD-4954-9F92-03FF547D9080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C92A607B-1FDD-4954-9F92-03FF547D9080}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C92A607B-1FDD-4954-9F92-03FF547D9080}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C92A607B-1FDD-4954-9F92-03FF547D9080}.Release|Any CPU.Build.0 = Release|Any CPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3}.Release|Any CPU.Build.0 = Release|Any CPU + {F167E17A-7DE6-4AF5-B920-A5112296C695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F167E17A-7DE6-4AF5-B920-A5112296C695}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F167E17A-7DE6-4AF5-B920-A5112296C695}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F167E17A-7DE6-4AF5-B920-A5112296C695}.Release|Any CPU.Build.0 = Release|Any CPU + {48F4582B-7687-4621-9CBE-5C24197CB536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48F4582B-7687-4621-9CBE-5C24197CB536}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48F4582B-7687-4621-9CBE-5C24197CB536}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48F4582B-7687-4621-9CBE-5C24197CB536}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -67,6 +91,10 @@ Global {65DC628F-A640-4111-AB35-3A5652BC1E17} = {7A75DFA2-DE65-4458-98AF-26AF96FFD6DC} {69051C69-12AE-4E7D-A3E6-460D2E282312} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} {54377672-20B1-40AF-8087-5CF73BF3953A} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} + {C92A607B-1FDD-4954-9F92-03FF547D9080} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} + {58F6C80C-1253-4A0E-A465-B8C85EBEADF3} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} + {F167E17A-7DE6-4AF5-B920-A5112296C695} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} + {48F4582B-7687-4621-9CBE-5C24197CB536} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 From 6c7fab0e31b129c17631eca3e43c74621a919c5b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 19:20:21 +0900 Subject: [PATCH 04/10] Fix some remaining naming discrepancies. --- osu.Game.Mode.Osu/OsuRuleset.cs | 7 ++++--- .../UI/{ScoreOverlayOsu.cs => OsuScoreOverlay.cs} | 2 +- osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj | 4 ++-- osu.Game.Modes.Catch/CatchRuleset.cs | 2 +- osu.Game.Modes.Mania/ManiaRuleset.cs | 2 +- osu.Game.Modes.Taiko/TaikoRuleset.cs | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) rename osu.Game.Mode.Osu/UI/{ScoreOverlayOsu.cs => OsuScoreOverlay.cs} (94%) diff --git a/osu.Game.Mode.Osu/OsuRuleset.cs b/osu.Game.Mode.Osu/OsuRuleset.cs index 27154fa646..666f51f041 100644 --- a/osu.Game.Mode.Osu/OsuRuleset.cs +++ b/osu.Game.Mode.Osu/OsuRuleset.cs @@ -8,9 +8,10 @@ using osu.Game.Modes.UI; namespace osu.Game.Modes.Osu { - class OsuRuleset : Ruleset + public class OsuRuleset : Ruleset { - public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu(); + public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new UI.OsuHitRenderer { Objects = objects }; - }} + } +} diff --git a/osu.Game.Mode.Osu/UI/ScoreOverlayOsu.cs b/osu.Game.Mode.Osu/UI/OsuScoreOverlay.cs similarity index 94% rename from osu.Game.Mode.Osu/UI/ScoreOverlayOsu.cs rename to osu.Game.Mode.Osu/UI/OsuScoreOverlay.cs index 911a462ca2..dd1b3739c2 100644 --- a/osu.Game.Mode.Osu/UI/ScoreOverlayOsu.cs +++ b/osu.Game.Mode.Osu/UI/OsuScoreOverlay.cs @@ -9,7 +9,7 @@ using OpenTK.Input; namespace osu.Game.Modes.Osu.UI { - public class ScoreOverlayOsu : ScoreOverlay + public class OsuScoreOverlay : ScoreOverlay { protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter() { diff --git a/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj b/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj index e53a760db6..2c38463e9d 100644 --- a/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj +++ b/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj @@ -8,7 +8,7 @@ Library Properties osu.Game.Modes.Osu - osu.Game.Mode.Osu + osu.Game.Modes.Osu v4.5 512 @@ -52,7 +52,7 @@ - + diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index 91385155b8..992d0fff59 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -11,7 +11,7 @@ namespace osu.Game.Modes.Catch { class CatchRuleset : Ruleset { - public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu(); + public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new CatchHitRenderer { Objects = objects }; } diff --git a/osu.Game.Modes.Mania/ManiaRuleset.cs b/osu.Game.Modes.Mania/ManiaRuleset.cs index 5dd9167e75..07f2545fd3 100644 --- a/osu.Game.Modes.Mania/ManiaRuleset.cs +++ b/osu.Game.Modes.Mania/ManiaRuleset.cs @@ -12,7 +12,7 @@ namespace osu.Game.Modes.Mania { class ManiaRuleset : Ruleset { - public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu(); + public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new ManiaHitRenderer { Objects = objects }; } diff --git a/osu.Game.Modes.Taiko/TaikoRuleset.cs b/osu.Game.Modes.Taiko/TaikoRuleset.cs index 1764b542da..f8322e32dc 100644 --- a/osu.Game.Modes.Taiko/TaikoRuleset.cs +++ b/osu.Game.Modes.Taiko/TaikoRuleset.cs @@ -11,7 +11,7 @@ namespace osu.Game.Modes.Taiko { class TaikoRuleset : Ruleset { - public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu(); + public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new TaikoHitRenderer { Objects = objects }; } From 07fee61989e3f230d1a8ef9dbfc2c272eba4a741 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 19:20:27 +0900 Subject: [PATCH 05/10] Use reflection to load Rulesets. --- osu.Game/Modes/Ruleset.cs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index 842b9ed211..d98bd82bfc 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -4,6 +4,10 @@ using System.Collections.Generic; using osu.Game.Modes.Objects; using osu.Game.Modes.UI; +using System.Reflection; +using osu.Framework.Extensions; +using System; +using System.Linq; namespace osu.Game.Modes { @@ -15,19 +19,16 @@ namespace osu.Game.Modes public static Ruleset GetRuleset(PlayMode mode) { - switch (mode) - { - default: - return null; + Type type = AppDomain.CurrentDomain.GetAssemblies() + .Where(a => a.FullName.Contains($@"osu.Game.Modes.{mode}")) + .SelectMany(a => a.GetTypes()) + .Where(t => t.Name == $@"{mode}Ruleset") + .FirstOrDefault(); - // return new OsuRuleset(); - //case PlayMode.Catch: - // return new CatchRuleset(); - //case PlayMode.Mania: - // return new ManiaRuleset(); - //case PlayMode.Taiko: - // return new TaikoRuleset(); - } + if (type == null) + return null; + + return Activator.CreateInstance(type) as Ruleset; } } } From 5dd4e31011a652a86ae1bb11cfb2c64218f2009e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 19:49:29 +0900 Subject: [PATCH 06/10] Move DrawableHitObject. --- osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs | 1 + osu.Game.Mode.Osu/Objects/Drawables/DrawableHitCircle.cs | 1 + osu.Game.Mode.Osu/UI/OsuHitRenderer.cs | 1 + osu.Game.Modes.Catch/UI/CatchHitRenderer.cs | 1 + osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs | 1 + osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs | 1 + osu.Game/Modes/Objects/{ => Drawables}/DrawableHitObject.cs | 2 +- osu.Game/Modes/UI/HitRenderer.cs | 1 + osu.Game/Screens/Play/Player.cs | 1 + osu.Game/osu.Game.csproj | 2 +- 10 files changed, 10 insertions(+), 2 deletions(-) rename osu.Game/Modes/Objects/{ => Drawables}/DrawableHitObject.cs (94%) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index 904123dd50..1c6c61d51e 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -8,6 +8,7 @@ using osu.Framework.Timing; using OpenTK; using osu.Framework.Allocation; using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Osu.Objects; using osu.Game.Modes.Osu.Objects.Drawables; diff --git a/osu.Game.Mode.Osu/Objects/Drawables/DrawableHitCircle.cs b/osu.Game.Mode.Osu/Objects/Drawables/DrawableHitCircle.cs index ea65073bdc..62481b5511 100644 --- a/osu.Game.Mode.Osu/Objects/Drawables/DrawableHitCircle.cs +++ b/osu.Game.Mode.Osu/Objects/Drawables/DrawableHitCircle.cs @@ -12,6 +12,7 @@ using osu.Framework.Graphics.Transformations; using osu.Framework.Input; using osu.Framework.MathUtils; using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using OpenTK; namespace osu.Game.Modes.Osu.Objects.Drawables diff --git a/osu.Game.Mode.Osu/UI/OsuHitRenderer.cs b/osu.Game.Mode.Osu/UI/OsuHitRenderer.cs index 94f4ba2fd4..218dc39ba6 100644 --- a/osu.Game.Mode.Osu/UI/OsuHitRenderer.cs +++ b/osu.Game.Mode.Osu/UI/OsuHitRenderer.cs @@ -2,6 +2,7 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.UI; using Circle = osu.Game.Modes.Osu.Objects.Circle; using DrawableCircle = osu.Game.Modes.Osu.Objects.Drawables.DrawableCircle; diff --git a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs index 4d58ce6278..9e1d2af571 100644 --- a/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs +++ b/osu.Game.Modes.Catch/UI/CatchHitRenderer.cs @@ -3,6 +3,7 @@ using osu.Game.Modes.Catch.Objects; using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.UI; namespace osu.Game.Modes.Catch.UI diff --git a/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs index 2e4514cb85..a13e829e07 100644 --- a/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs +++ b/osu.Game.Modes.Mania/UI/ManiaHitRenderer.cs @@ -3,6 +3,7 @@ using osu.Game.Modes.Mania.Objects; using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.UI; namespace osu.Game.Modes.Mania.UI diff --git a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs index 28180b5d24..cf72cfbc47 100644 --- a/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs +++ b/osu.Game.Modes.Taiko/UI/TaikoHitRenderer.cs @@ -2,6 +2,7 @@ //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Taiko.Objects; using osu.Game.Modes.UI; diff --git a/osu.Game/Modes/Objects/DrawableHitObject.cs b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs similarity index 94% rename from osu.Game/Modes/Objects/DrawableHitObject.cs rename to osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs index 8af7186d63..d5674d8314 100644 --- a/osu.Game/Modes/Objects/DrawableHitObject.cs +++ b/osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs @@ -5,7 +5,7 @@ using System; using osu.Framework; using osu.Framework.Graphics.Containers; -namespace osu.Game.Modes.Objects +namespace osu.Game.Modes.Objects.Drawables { public abstract class DrawableHitObject : Container, IStateful { diff --git a/osu.Game/Modes/UI/HitRenderer.cs b/osu.Game/Modes/UI/HitRenderer.cs index 475d2ec897..5f4b0b9b02 100644 --- a/osu.Game/Modes/UI/HitRenderer.cs +++ b/osu.Game/Modes/UI/HitRenderer.cs @@ -8,6 +8,7 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; namespace osu.Game.Modes.UI { diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 926fd77222..8bc1a3d151 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -12,6 +12,7 @@ using osu.Framework.Timing; using osu.Game.Database; using osu.Game.Modes; using osu.Game.Modes.Objects; +using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.UI; using osu.Game.Screens.Backgrounds; using OpenTK.Input; diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 9e8a3a0141..ede412f27c 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -71,7 +71,7 @@ - + From 0011d7f7204a238330bf39a87e181b3fc0837d90 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 20:24:44 +0900 Subject: [PATCH 07/10] Simplify linq. --- osu.Game/Modes/Ruleset.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index d98bd82bfc..64a91f2108 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -19,11 +19,11 @@ namespace osu.Game.Modes public static Ruleset GetRuleset(PlayMode mode) { - Type type = AppDomain.CurrentDomain.GetAssemblies() + Type type = AppDomain.CurrentDomain + .GetAssemblies() .Where(a => a.FullName.Contains($@"osu.Game.Modes.{mode}")) .SelectMany(a => a.GetTypes()) - .Where(t => t.Name == $@"{mode}Ruleset") - .FirstOrDefault(); + .FirstOrDefault(t => t.Name == $@"{mode}Ruleset"); if (type == null) return null; From d3f810f72f3b46ba0e4b8ee2a5c6a25c87ff24ef Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 22:03:39 +0900 Subject: [PATCH 08/10] Introduce concept of HitObjectParsers, fix tests and stop using reflection (unreliable due to lazy loading). --- osu.Desktop/Program.cs | 10 +++++ osu.Desktop/osu.Desktop.csproj | 12 +++++ osu.Game.Mode.Osu/Objects/OsuBaseHit.cs | 32 +------------ .../Objects/OsuHitObjectParser.cs | 45 +++++++++++++++++++ osu.Game.Mode.Osu/OsuRuleset.cs | 3 ++ osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj | 1 + osu.Game.Modes.Catch/CatchRuleset.cs | 5 ++- osu.Game.Modes.Mania/ManiaRuleset.cs | 5 ++- osu.Game.Modes.Taiko/TaikoRuleset.cs | 5 ++- .../Beatmaps/Formats/OsuLegacyDecoderTest.cs | 2 + .../Beatmaps/IO/ImportBeatmapTest.cs | 8 ++++ .../Beatmaps/IO/OszArchiveReaderTest.cs | 5 ++- osu.Game.Tests/osu.Game.Tests.csproj | 12 +++++ osu.Game/Beatmaps/Formats/BeatmapDecoder.cs | 2 + osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs | 17 ++++--- osu.Game/Modes/Objects/HitObject.cs | 12 ----- osu.Game/Modes/Objects/HitObjectParser.cs | 16 +++++++ osu.Game/Modes/Ruleset.cs | 12 ++--- osu.Game/osu.Game.csproj | 1 + 19 files changed, 146 insertions(+), 59 deletions(-) create mode 100644 osu.Game.Mode.Osu/Objects/OsuHitObjectParser.cs create mode 100644 osu.Game/Modes/Objects/HitObjectParser.cs diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index 18009417cb..47575ca208 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -10,6 +10,11 @@ using osu.Framework.Desktop.Platform; using osu.Framework.Platform; using osu.Game; 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 { @@ -31,6 +36,11 @@ namespace osu.Desktop } else { + Ruleset.Register(new OsuRuleset()); + Ruleset.Register(new TaikoRuleset()); + Ruleset.Register(new ManiaRuleset()); + Ruleset.Register(new CatchRuleset()); + BaseGame osu = new OsuGame(args); host.Add(osu); host.Run(); diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj index 28e591a558..95d3ad64c5 100644 --- a/osu.Desktop/osu.Desktop.csproj +++ b/osu.Desktop/osu.Desktop.csproj @@ -134,6 +134,18 @@ {c92a607b-1fdd-4954-9f92-03ff547d9080} osu.Game.Modes.Osu + + {58f6c80c-1253-4a0e-a465-b8c85ebeadf3} + osu.Game.Modes.Catch + + + {48f4582b-7687-4621-9cbe-5c24197cb536} + osu.Game.Modes.Mania + + + {f167e17a-7de6-4af5-b920-a5112296c695} + osu.Game.Modes.Taiko + {0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d} osu.Game diff --git a/osu.Game.Mode.Osu/Objects/OsuBaseHit.cs b/osu.Game.Mode.Osu/Objects/OsuBaseHit.cs index 81c9e0b4e9..0bd3d62d9e 100644 --- a/osu.Game.Mode.Osu/Objects/OsuBaseHit.cs +++ b/osu.Game.Mode.Osu/Objects/OsuBaseHit.cs @@ -13,7 +13,7 @@ namespace osu.Game.Modes.Osu.Objects public Vector2 Position { get; set; } [Flags] - private enum HitObjectType + internal enum HitObjectType { Circle = 1, Slider = 2, @@ -25,35 +25,5 @@ namespace osu.Game.Modes.Osu.Objects Hold = 128, ManiaLong = 128, } - - public static OsuBaseHit Parse(string val) - { - string[] split = val.Split(','); - var type = (HitObjectType)int.Parse(split[3]); - bool combo = type.HasFlag(HitObjectType.NewCombo); - type &= (HitObjectType)0xF; - type &= ~HitObjectType.NewCombo; - OsuBaseHit result; - switch (type) - { - case HitObjectType.Circle: - result = new Circle(); - break; - case HitObjectType.Slider: - result = new Slider(); - break; - case HitObjectType.Spinner: - result = new Spinner(); - break; - default: - throw new InvalidOperationException($@"Unknown hit object type {type}"); - } - result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])); - result.StartTime = double.Parse(split[2]); - result.Sample = new HitSampleInfo { Type = (SampleType)int.Parse(split[4]) }; - result.NewCombo = combo; - // TODO: "addition" field - return result; - } } } diff --git a/osu.Game.Mode.Osu/Objects/OsuHitObjectParser.cs b/osu.Game.Mode.Osu/Objects/OsuHitObjectParser.cs new file mode 100644 index 0000000000..81c218e8e1 --- /dev/null +++ b/osu.Game.Mode.Osu/Objects/OsuHitObjectParser.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using osu.Game.Beatmaps.Samples; +using osu.Game.Modes.Objects; +using OpenTK; + +namespace osu.Game.Modes.Osu.Objects +{ + public class OsuHitObjectParser : HitObjectParser + { + public override HitObject Parse(string text) + { + string[] split = text.Split(','); + var type = (OsuBaseHit.HitObjectType)int.Parse(split[3]); + bool combo = type.HasFlag(OsuBaseHit.HitObjectType.NewCombo); + type &= (OsuBaseHit.HitObjectType)0xF; + type &= ~OsuBaseHit.HitObjectType.NewCombo; + OsuBaseHit result; + switch (type) + { + case OsuBaseHit.HitObjectType.Circle: + result = new Circle(); + break; + case OsuBaseHit.HitObjectType.Slider: + result = new Slider(); + break; + case OsuBaseHit.HitObjectType.Spinner: + result = new Spinner(); + break; + default: + //throw new InvalidOperationException($@"Unknown hit object type {type}"); + return null; + } + result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1])); + result.StartTime = double.Parse(split[2]); + result.Sample = new HitSampleInfo { Type = (SampleType)int.Parse(split[4]) }; + result.NewCombo = combo; + // TODO: "addition" field + return result; + } + } +} diff --git a/osu.Game.Mode.Osu/OsuRuleset.cs b/osu.Game.Mode.Osu/OsuRuleset.cs index 666f51f041..4e8b8fde2b 100644 --- a/osu.Game.Mode.Osu/OsuRuleset.cs +++ b/osu.Game.Mode.Osu/OsuRuleset.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.Objects; using osu.Game.Modes.Osu.UI; using osu.Game.Modes.UI; @@ -13,5 +14,7 @@ namespace osu.Game.Modes.Osu public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new UI.OsuHitRenderer { Objects = objects }; + + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj b/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj index 2c38463e9d..9a5668b35e 100644 --- a/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj +++ b/osu.Game.Mode.Osu/osu.Game.Modes.Osu.csproj @@ -41,6 +41,7 @@ + diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index 992d0fff59..5a55db5ede 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -4,15 +4,18 @@ using System.Collections.Generic; using osu.Game.Modes.Catch.UI; using osu.Game.Modes.Objects; +using osu.Game.Modes.Osu.Objects; using osu.Game.Modes.Osu.UI; using osu.Game.Modes.UI; namespace osu.Game.Modes.Catch { - class CatchRuleset : Ruleset + public class CatchRuleset : Ruleset { public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new CatchHitRenderer { Objects = objects }; + + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game.Modes.Mania/ManiaRuleset.cs b/osu.Game.Modes.Mania/ManiaRuleset.cs index 07f2545fd3..f92ce9ba1a 100644 --- a/osu.Game.Modes.Mania/ManiaRuleset.cs +++ b/osu.Game.Modes.Mania/ManiaRuleset.cs @@ -5,15 +5,18 @@ using System.Collections.Generic; using osu.Game.Modes.Mania.UI; using osu.Game.Modes.Objects; using osu.Game.Modes.Osu; +using osu.Game.Modes.Osu.Objects; using osu.Game.Modes.Osu.UI; using osu.Game.Modes.UI; namespace osu.Game.Modes.Mania { - class ManiaRuleset : Ruleset + public class ManiaRuleset : Ruleset { public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new ManiaHitRenderer { Objects = objects }; + + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game.Modes.Taiko/TaikoRuleset.cs b/osu.Game.Modes.Taiko/TaikoRuleset.cs index f8322e32dc..a85c2c7a32 100644 --- a/osu.Game.Modes.Taiko/TaikoRuleset.cs +++ b/osu.Game.Modes.Taiko/TaikoRuleset.cs @@ -3,16 +3,19 @@ using System.Collections.Generic; 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.Modes.UI; namespace osu.Game.Modes.Taiko { - class TaikoRuleset : Ruleset + public class TaikoRuleset : Ruleset { public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override HitRenderer CreateHitRendererWith(List objects) => new TaikoHitRenderer { Objects = objects }; + + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs index db2e4b7d7e..90b62ef98a 100644 --- a/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/OsuLegacyDecoderTest.cs @@ -7,6 +7,7 @@ using osu.Game.Beatmaps; using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Samples; using osu.Game.Modes; +using osu.Game.Modes.Osu; using osu.Game.Modes.Osu.Objects; using osu.Game.Screens.Play; using osu.Game.Tests.Resources; @@ -20,6 +21,7 @@ namespace osu.Game.Tests.Beatmaps.Formats public void SetUp() { OsuLegacyDecoder.Register(); + Ruleset.Register(new OsuRuleset()); } [Test] public void TestDecodeMetadata() diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index 0c53ef380c..7acbdbf3d9 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -9,6 +9,10 @@ using osu.Framework.Platform; using osu.Game.Database; 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; using osu.Game.Screens.Play; namespace osu.Game.Tests.Beatmaps.IO @@ -21,6 +25,10 @@ namespace osu.Game.Tests.Beatmaps.IO [OneTimeSetUp] public void SetUp() { + Ruleset.Register(new OsuRuleset()); + Ruleset.Register(new TaikoRuleset()); + Ruleset.Register(new ManiaRuleset()); + Ruleset.Register(new CatchRuleset()); } [Test] diff --git a/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs b/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs index 8a0364a03b..1343ae7241 100644 --- a/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/OszArchiveReaderTest.cs @@ -2,6 +2,8 @@ using System.IO; using NUnit.Framework; using osu.Game.Beatmaps.IO; +using osu.Game.Modes; +using osu.Game.Modes.Osu; using osu.Game.Tests.Resources; namespace osu.Game.Tests.Beatmaps.IO @@ -13,8 +15,9 @@ namespace osu.Game.Tests.Beatmaps.IO public void SetUp() { OszArchiveReader.Register(); + Ruleset.Register(new OsuRuleset()); } - + [Test] public void TestReadBeatmaps() { diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index 646ee756d5..d59e90c2f4 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -70,6 +70,18 @@ {c92a607b-1fdd-4954-9f92-03ff547d9080} osu.Game.Modes.Osu + + {58f6c80c-1253-4a0e-a465-b8c85ebeadf3} + osu.Game.Modes.Catch + + + {48f4582b-7687-4621-9cbe-5c24197cb536} + osu.Game.Modes.Mania + + + {f167e17a-7de6-4af5-b920-a5112296c695} + osu.Game.Modes.Taiko + {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} osu.Game diff --git a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs index 7ff3dbac2b..b5dd0c995e 100644 --- a/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/BeatmapDecoder.cs @@ -48,6 +48,8 @@ namespace osu.Game.Beatmaps.Formats new Color4(121,9,13, 255), }; + if (colours.Count == 0) return; + int i = -1; foreach (HitObject h in b.HitObjects) diff --git a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs index 2cf4e66927..5468e616f0 100644 --- a/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs +++ b/osu.Game/Beatmaps/Formats/OsuLegacyDecoder.cs @@ -221,7 +221,9 @@ namespace osu.Game.Beatmaps.Formats BaseDifficulty = new BaseDifficulty(), }, }; - + + HitObjectParser parser = null; + var section = Section.None; string line; while (true) @@ -233,14 +235,14 @@ namespace osu.Game.Beatmaps.Formats continue; if (line.StartsWith(@"osu file format v")) continue; - + if (line.StartsWith(@"[") && line.EndsWith(@"]")) { if (!Enum.TryParse(line.Substring(1, line.Length - 2), out section)) throw new InvalidDataException($@"Unknown osu section {line}"); continue; } - + string val = line, key = null; if (section != Section.Events && section != Section.TimingPoints && section != Section.HitObjects) { @@ -251,6 +253,7 @@ namespace osu.Game.Beatmaps.Formats { case Section.General: handleGeneral(beatmap, key, val); + parser = Ruleset.GetRuleset(beatmap.BeatmapInfo.Mode).CreateHitObjectParser(); break; case Section.Editor: handleEditor(beatmap, key, val); @@ -271,13 +274,13 @@ namespace osu.Game.Beatmaps.Formats handleColours(beatmap, key, val); break; case Section.HitObjects: - var h = HitObject.Parse(beatmap.BeatmapInfo.Mode, val); - if (h != null) - beatmap.HitObjects.Add(h); + var obj = parser?.Parse(val); + if (obj != null) + beatmap.HitObjects.Add(obj); break; } } - + return beatmap; } } diff --git a/osu.Game/Modes/Objects/HitObject.cs b/osu.Game/Modes/Objects/HitObject.cs index 62c47d7059..abb88726b6 100644 --- a/osu.Game/Modes/Objects/HitObject.cs +++ b/osu.Game/Modes/Objects/HitObject.cs @@ -21,17 +21,5 @@ namespace osu.Game.Modes.Objects public double Duration => EndTime - StartTime; public HitSampleInfo Sample; - - public static HitObject Parse(PlayMode mode, string val) - { - //TODO: move to modular HitObjectParser system rather than static parsing. (https://github.com/ppy/osu/pull/60/files#r83135780) - switch (mode) - { - case PlayMode.Osu: - return null; //return OsuBaseHit.Parse(val); - default: - return null; - } - } } } diff --git a/osu.Game/Modes/Objects/HitObjectParser.cs b/osu.Game/Modes/Objects/HitObjectParser.cs new file mode 100644 index 0000000000..261e92ff96 --- /dev/null +++ b/osu.Game/Modes/Objects/HitObjectParser.cs @@ -0,0 +1,16 @@ +//Copyright (c) 2007-2016 ppy Pty Ltd . +//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace osu.Game.Modes.Objects +{ + public abstract class HitObjectParser + { + public abstract HitObject Parse(string text); + } +} diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index 64a91f2108..7fc4b3221d 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -13,17 +13,19 @@ namespace osu.Game.Modes { public abstract class Ruleset { + private static List availableRulesets = new List(); + public abstract ScoreOverlay CreateScoreOverlay(); public abstract HitRenderer CreateHitRendererWith(List objects); + public abstract HitObjectParser CreateHitObjectParser(); + + public static void Register(Ruleset ruleset) => availableRulesets.Add(ruleset.GetType()); + public static Ruleset GetRuleset(PlayMode mode) { - Type type = AppDomain.CurrentDomain - .GetAssemblies() - .Where(a => a.FullName.Contains($@"osu.Game.Modes.{mode}")) - .SelectMany(a => a.GetTypes()) - .FirstOrDefault(t => t.Name == $@"{mode}Ruleset"); + Type type = availableRulesets.FirstOrDefault(t => t.Name == $@"{mode}Ruleset"); if (type == null) return null; diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index ede412f27c..88f78b57be 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -63,6 +63,7 @@ + From e01057df3d9865d2711196b2e2b94e981323b206 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 23:13:47 +0900 Subject: [PATCH 09/10] Add thread safety somewhere it will never be required. --- osu.Game.Modes.Catch/CatchRuleset.cs | 2 ++ osu.Game.Modes.Mania/ManiaRuleset.cs | 2 ++ osu.Game.Modes.Taiko/TaikoRuleset.cs | 2 ++ osu.Game/Modes/Ruleset.cs | 11 +++++++---- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index 5a55db5ede..38edc6714b 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -16,6 +16,8 @@ namespace osu.Game.Modes.Catch public override HitRenderer CreateHitRendererWith(List objects) => new CatchHitRenderer { Objects = objects }; + protected override PlayMode PlayMode => PlayMode.Mania; + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game.Modes.Mania/ManiaRuleset.cs b/osu.Game.Modes.Mania/ManiaRuleset.cs index f92ce9ba1a..cb122084df 100644 --- a/osu.Game.Modes.Mania/ManiaRuleset.cs +++ b/osu.Game.Modes.Mania/ManiaRuleset.cs @@ -17,6 +17,8 @@ namespace osu.Game.Modes.Mania public override HitRenderer CreateHitRendererWith(List objects) => new ManiaHitRenderer { Objects = objects }; + protected override PlayMode PlayMode => PlayMode.Mania; + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game.Modes.Taiko/TaikoRuleset.cs b/osu.Game.Modes.Taiko/TaikoRuleset.cs index a85c2c7a32..fa9d0862c7 100644 --- a/osu.Game.Modes.Taiko/TaikoRuleset.cs +++ b/osu.Game.Modes.Taiko/TaikoRuleset.cs @@ -16,6 +16,8 @@ namespace osu.Game.Modes.Taiko public override HitRenderer CreateHitRendererWith(List objects) => new TaikoHitRenderer { Objects = objects }; + protected override PlayMode PlayMode => PlayMode.Taiko; + public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } } diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index 7fc4b3221d..dddcd0d0c5 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -7,13 +7,14 @@ using osu.Game.Modes.UI; using System.Reflection; using osu.Framework.Extensions; using System; +using System.Collections.Concurrent; using System.Linq; namespace osu.Game.Modes { public abstract class Ruleset { - private static List availableRulesets = new List(); + private static ConcurrentDictionary availableRulesets = new ConcurrentDictionary(); public abstract ScoreOverlay CreateScoreOverlay(); @@ -21,13 +22,15 @@ namespace osu.Game.Modes public abstract HitObjectParser CreateHitObjectParser(); - public static void Register(Ruleset ruleset) => availableRulesets.Add(ruleset.GetType()); + public static void Register(Ruleset ruleset) => availableRulesets.TryAdd(ruleset.PlayMode, ruleset.GetType()); + + protected virtual PlayMode PlayMode => PlayMode.Osu; public static Ruleset GetRuleset(PlayMode mode) { - Type type = availableRulesets.FirstOrDefault(t => t.Name == $@"{mode}Ruleset"); + Type type; - if (type == null) + if (!availableRulesets.TryGetValue(mode, out type)) return null; return Activator.CreateInstance(type) as Ruleset; From 08bf7c6d39fad8c3112d02734544c02d7a84ef88 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 14 Nov 2016 23:18:21 +0900 Subject: [PATCH 10/10] Make abstract ruleset no play mode. --- osu.Game.Mode.Osu/OsuRuleset.cs | 4 +++- osu.Game.Modes.Catch/CatchRuleset.cs | 2 +- osu.Game/Modes/Ruleset.cs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game.Mode.Osu/OsuRuleset.cs b/osu.Game.Mode.Osu/OsuRuleset.cs index 4e8b8fde2b..ac43e5501c 100644 --- a/osu.Game.Mode.Osu/OsuRuleset.cs +++ b/osu.Game.Mode.Osu/OsuRuleset.cs @@ -13,8 +13,10 @@ namespace osu.Game.Modes.Osu { public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); - public override HitRenderer CreateHitRendererWith(List objects) => new UI.OsuHitRenderer { Objects = objects }; + public override HitRenderer CreateHitRendererWith(List objects) => new OsuHitRenderer { Objects = objects }; public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); + + protected override PlayMode PlayMode => PlayMode.Osu; } } diff --git a/osu.Game.Modes.Catch/CatchRuleset.cs b/osu.Game.Modes.Catch/CatchRuleset.cs index 38edc6714b..0195859cb7 100644 --- a/osu.Game.Modes.Catch/CatchRuleset.cs +++ b/osu.Game.Modes.Catch/CatchRuleset.cs @@ -16,7 +16,7 @@ namespace osu.Game.Modes.Catch public override HitRenderer CreateHitRendererWith(List objects) => new CatchHitRenderer { Objects = objects }; - protected override PlayMode PlayMode => PlayMode.Mania; + protected override PlayMode PlayMode => PlayMode.Catch; public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser(); } diff --git a/osu.Game/Modes/Ruleset.cs b/osu.Game/Modes/Ruleset.cs index dddcd0d0c5..d35aab6568 100644 --- a/osu.Game/Modes/Ruleset.cs +++ b/osu.Game/Modes/Ruleset.cs @@ -24,7 +24,7 @@ namespace osu.Game.Modes public static void Register(Ruleset ruleset) => availableRulesets.TryAdd(ruleset.PlayMode, ruleset.GetType()); - protected virtual PlayMode PlayMode => PlayMode.Osu; + protected abstract PlayMode PlayMode { get; } public static Ruleset GetRuleset(PlayMode mode) {