diff --git a/.vscode/launch.json b/.vscode/launch.json index f1083179b8..b8c026d891 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,7 @@ }, "type": "mono", "request": "launch", - "program": "${workspaceRoot}/osu.Desktop/bin/Debug/osu!.exe", + "program": "${workspaceRoot}/osu.Game/bin/Debug/osu!.exe", "args": [ "--tests" ], @@ -24,7 +24,7 @@ }, "type": "mono", "request": "launch", - "program": "${workspaceRoot}/osu.Desktop/bin/Debug/osu!.exe", + "program": "${workspaceRoot}/osu.Game/bin/Debug/osu!.exe", "cwd": "${workspaceRoot}", "preLaunchTask": "Build (Debug)", "runtimeExecutable": null, @@ -38,7 +38,7 @@ }, "type": "mono", "request": "launch", - "program": "${workspaceRoot}/osu.Desktop/bin/Release/osu!.exe", + "program": "${workspaceRoot}/osu.Game/bin/Release/osu!.exe", "cwd": "${workspaceRoot}", "preLaunchTask": "Build (Release)", "runtimeExecutable": null, diff --git a/osu-framework b/osu-framework index 3f4545aae8..e1352a8b0b 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3f4545aae82650dc87cac7dd5df64e6e47918da1 +Subproject commit e1352a8b0b5d1ba8acd9335a56c714d2ccc2f6a6 diff --git a/osu.Desktop.Deploy/Program.cs b/osu.Desktop.Deploy/Program.cs index a181a6fa5e..785f915a3e 100644 --- a/osu.Desktop.Deploy/Program.cs +++ b/osu.Desktop.Deploy/Program.cs @@ -29,7 +29,7 @@ namespace osu.Desktop.Deploy public static string SolutionName = ConfigurationManager.AppSettings["SolutionName"]; public static string ProjectName = ConfigurationManager.AppSettings["ProjectName"]; public static string NuSpecName = ConfigurationManager.AppSettings["NuSpecName"]; - public static string TargetName = ConfigurationManager.AppSettings["TargetName"]; + public static string TargetNames = ConfigurationManager.AppSettings["TargetName"]; public static string PackageName = ConfigurationManager.AppSettings["PackageName"]; public static string IconName = ConfigurationManager.AppSettings["IconName"]; public static string CodeSigningCertificate = ConfigurationManager.AppSettings["CodeSigningCertificate"]; @@ -100,7 +100,8 @@ namespace osu.Desktop.Deploy updateAssemblyInfo(version); write("Running build process..."); - runCommand(msbuild_path, $"/v:quiet /m /t:{TargetName.Replace('.', '_')} /p:OutputPath={stagingPath};Targets=\"Clean;Build\";Configuration=Release {SolutionName}.sln"); + foreach (string targetName in TargetNames.Split(',')) + runCommand(msbuild_path, $"/v:quiet /m /t:{targetName.Replace('.', '_')} /p:OutputPath={stagingPath};Targets=\"Clean;Build\";Configuration=Release {SolutionName}.sln"); write("Creating NuGet deployment package..."); runCommand(nuget_path, $"pack {NuSpecName} -Version {version} -Properties Configuration=Deploy -OutputDirectory {stagingPath} -BasePath {stagingPath}"); diff --git a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj index a66c9c8993..6727a86a91 100644 --- a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj +++ b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj @@ -111,10 +111,6 @@ - - {65dc628f-a640-4111-ab35-3a5652bc1e17} - osu.Framework.Desktop - {C76BF5B3-985E-4D39-95FE-97C9C879B83A} osu.Framework diff --git a/osu.Desktop.Tests/OpenTK.dll.config b/osu.Desktop.Tests/OpenTK.dll.config deleted file mode 100644 index 5620e3d9e2..0000000000 --- a/osu.Desktop.Tests/OpenTK.dll.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/osu.Desktop.Tests/app.config b/osu.Desktop.Tests/app.config deleted file mode 100644 index faeaf001de..0000000000 --- a/osu.Desktop.Tests/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/osu.Desktop.Tests/osu.Desktop.Tests.csproj b/osu.Desktop.Tests/osu.Desktop.Tests.csproj deleted file mode 100644 index f894b25f06..0000000000 --- a/osu.Desktop.Tests/osu.Desktop.Tests.csproj +++ /dev/null @@ -1,178 +0,0 @@ - - - - - Debug - AnyCPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D} - Library - Properties - osu.Desktop.Tests - osu.Desktop.Tests - v4.6.1 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - 6 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - True - - - $(SolutionDir)\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll - True - - - $(SolutionDir)\packages\OpenTK.3.0.0-git00009\lib\net20\OpenTK.dll - True - - - False - $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll - - - - $(SolutionDir)\packages\SQLiteNetExtensions.1.3.0\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\SQLiteNetExtensions.dll - - - $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll - - - $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {65DC628F-A640-4111-AB35-3A5652BC1E17} - osu.Framework.Desktop - - - {007b2356-ab6f-4bd9-96d5-116fc2dce69a} - osu.Framework.Testing - - - {C76BF5B3-985E-4D39-95FE-97C9C879B83A} - osu.Framework - - - {d9a367c9-4c1a-489f-9b05-a0cea2b53b58} - osu.Game.Resources - - - {58F6C80C-1253-4A0E-A465-B8C85EBEADF3} - osu.Game.Rulesets.Catch - - - {48F4582B-7687-4621-9CBE-5C24197CB536} - osu.Game.Rulesets.Mania - - - {C92A607B-1FDD-4954-9F92-03FF547D9080} - osu.Game.Rulesets.Osu - - - {F167E17A-7DE6-4AF5-B920-A5112296C695} - osu.Game.Rulesets.Taiko - - - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} - osu.Game - - - - - osu.licenseheader - - - - - - - - - - - - - - \ No newline at end of file diff --git a/osu.Desktop.Tests/packages.config b/osu.Desktop.Tests/packages.config deleted file mode 100644 index ea33822638..0000000000 --- a/osu.Desktop.Tests/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/osu.Desktop.VisualTests/OpenTK.dll.config b/osu.Desktop.VisualTests/OpenTK.dll.config deleted file mode 100644 index 627e9f6009..0000000000 --- a/osu.Desktop.VisualTests/OpenTK.dll.config +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/osu.Desktop.VisualTests/Program.cs b/osu.Desktop.VisualTests/Program.cs deleted file mode 100644 index 62465c69d2..0000000000 --- a/osu.Desktop.VisualTests/Program.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System; -using osu.Framework.Desktop; -using osu.Framework.Platform; -using osu.Framework.VisualTests; - -namespace osu.Desktop.VisualTests -{ - public static class Program - { - [STAThread] - public static void Main(string[] args) - { - bool benchmark = args.Length > 0 && args[0] == @"-benchmark"; - - using (GameHost host = Host.GetSuitableHost(@"osu")) - { - if (benchmark) - host.Run(new AutomatedVisualTestGame()); - else - host.Run(new VisualTestGame()); - } - } - } -} diff --git a/osu.Desktop.VisualTests/VisualTestGame.cs b/osu.Desktop.VisualTests/VisualTestGame.cs deleted file mode 100644 index 7655f6a59d..0000000000 --- a/osu.Desktop.VisualTests/VisualTestGame.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using osu.Framework.Platform; -using osu.Framework.VisualTests; -using osu.Game; -using osu.Game.Screens.Backgrounds; - -namespace osu.Desktop.VisualTests -{ - internal class VisualTestGame : OsuGameBase - { - protected override void LoadComplete() - { - base.LoadComplete(); - - LoadComponentAsync(new BackgroundScreenDefault { Depth = 10 }, AddInternal); - - // Have to construct this here, rather than in the constructor, because - // we depend on some dependencies to be loaded within OsuGameBase.load(). - Add(new TestBrowser()); - } - - public override void SetHost(GameHost host) - { - base.SetHost(host); - - host.UpdateThread.InactiveHz = host.UpdateThread.ActiveHz; - host.DrawThread.InactiveHz = host.DrawThread.ActiveHz; - host.InputThread.InactiveHz = host.InputThread.ActiveHz; - - host.Window.CursorState |= CursorState.Hidden; - } - } -} diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj deleted file mode 100644 index 33019909c6..0000000000 --- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj +++ /dev/null @@ -1,214 +0,0 @@ - - - - {69051C69-12AE-4E7D-A3E6-460D2E282312} - Debug - AnyCPU - WinExe - Properties - osu.Desktop.VisualTests - osu! - 3CF060CD28877D0E3112948951A64B2A7CEEC909 - codesigning.pfx - false - false - false - - - 3.5 - - - osu.Desktop.VisualTests.Program - OnOutputUpdated - false - LocalIntranet - v4.6.1 - true - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 2 - 1.0.0.%2a - false - true - 12.0.0 - 2.0 - - - - - - - true - full - false - bin\Debug\ - DEBUG - prompt - 0 - true - false - AnyCPU - true - AllRules.ruleset - false - false - false - 6 - - - none - true - bin\Release\ - CuttingEdge NoUpdate - prompt - 4 - true - false - AnyCPU - true - AllRules.ruleset - false - false - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\ppy.OpenTK.3.0\lib\net45\OpenTK.dll - True - - - $(SolutionDir)\packages\SharpCompress.0.17.1\lib\net45\SharpCompress.dll - True - - - False - $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll - - - - $(SolutionDir)\packages\SQLiteNetExtensions.1.3.0\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\SQLiteNetExtensions.dll - - - $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll - - - $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll - - - - - - - osu.licenseheader - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - {65dc628f-a640-4111-ab35-3a5652bc1e17} - osu.Framework.Desktop - - - {007b2356-ab6f-4bd9-96d5-116fc2dce69a} - osu.Framework.Testing - - - {c76bf5b3-985e-4d39-95fe-97c9c879b83a} - osu.Framework - - - {d9a367c9-4c1a-489f-9b05-a0cea2b53b58} - osu.Game.Resources - - - {c92a607b-1fdd-4954-9f92-03ff547d9080} - osu.Game.Rulesets.Osu - - - {58f6c80c-1253-4a0e-a465-b8c85ebeadf3} - osu.Game.Rulesets.Catch - - - {48f4582b-7687-4621-9cbe-5c24197cb536} - osu.Game.Rulesets.Mania - - - {f167e17a-7de6-4af5-b920-a5112296c695} - osu.Game.Rulesets.Taiko - - - {0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d} - osu.Game - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/osu.Desktop.VisualTests/packages.config b/osu.Desktop.VisualTests/packages.config deleted file mode 100644 index 2fb1023253..0000000000 --- a/osu.Desktop.VisualTests/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/osu.Desktop/OpenTK.dll.config b/osu.Desktop/OpenTK.dll.config deleted file mode 100644 index 5620e3d9e2..0000000000 --- a/osu.Desktop/OpenTK.dll.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/osu.Desktop/Properties/AssemblyInfo.cs b/osu.Desktop/Properties/AssemblyInfo.cs deleted file mode 100644 index fe7ad20124..0000000000 --- a/osu.Desktop/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using System.Reflection; -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!lazer")] -[assembly: AssemblyDescription("click the circles. to the beat.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("ppy Pty Ltd")] -[assembly: AssemblyProduct("osu!lazer")] -[assembly: AssemblyCopyright("ppy Pty Ltd 2007-2017")] -[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("55e28cb2-7b6c-4595-8dcc-9871d8aad7e9")] - -[assembly: AssemblyVersion("0.0.0")] -[assembly: AssemblyFileVersion("0.0.0")] diff --git a/osu.Desktop/app.config b/osu.Desktop/app.config deleted file mode 100644 index a704cc3750..0000000000 --- a/osu.Desktop/app.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj deleted file mode 100644 index 87d9ce8eec..0000000000 --- a/osu.Desktop/osu.Desktop.csproj +++ /dev/null @@ -1,275 +0,0 @@ - - - - {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D} - Debug - AnyCPU - WinExe - Properties - osu.Desktop - osu! - 3CF060CD28877D0E3112948951A64B2A7CEEC909 - codesigning.pfx - false - false - false - - - 3.5 - - - osu.Desktop.Program - OnOutputUpdated - false - LocalIntranet - v4.6.1 - true - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 2 - 1.0.0.%2a - false - true - 12.0.0 - 2.0 - - - - - - - true - full - false - bin\Debug\ - DEBUG - prompt - 0 - true - false - AnyCPU - true - AllRules.ruleset - false - false - false - - - 6 - - - none - true - bin\Release\ - - - prompt - 4 - true - false - AnyCPU - true - AllRules.ruleset - false - false - - - - - - - lazer.ico - - - Properties\app.manifest - - - true - bin\Debug\ - DEBUG - true - 0 - true - full - AnyCPU - false - 6 - prompt - AllRules.ruleset - --tests - false - - - - $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll - True - - - $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll - True - - - $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll - True - - - $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll - True - - - $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Mdb.dll - True - - - $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Pdb.dll - True - - - $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Rocks.dll - True - - - - $(SolutionDir)\packages\squirrel.windows.1.7.8\lib\Net45\NuGet.Squirrel.dll - True - - - $(SolutionDir)\packages\OpenTK.3.0.0-git00009\lib\net20\OpenTK.dll - True - - - $(SolutionDir)\packages\SharpCompress.0.18.1\lib\net45\SharpCompress.dll - True - - - $(SolutionDir)\packages\Splat.2.0.0\lib\Net45\Splat.dll - True - - - $(SolutionDir)\packages\squirrel.windows.1.7.8\lib\Net45\Squirrel.dll - True - - - - - - - - - - osu.licenseheader - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - {65dc628f-a640-4111-ab35-3a5652bc1e17} - osu.Framework.Desktop - - - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A} - osu.Framework.Testing - - - {c76bf5b3-985e-4d39-95fe-97c9c879b83a} - osu.Framework - - - {d9a367c9-4c1a-489f-9b05-a0cea2b53b58} - osu.Game.Resources - - - {230ac4f3-7783-49fb-9aec-b83cda3b9f3d} - osu.Desktop.Tests - - - {c92a607b-1fdd-4954-9f92-03ff547d9080} - osu.Game.Rulesets.Osu - - - {58f6c80c-1253-4a0e-a465-b8c85ebeadf3} - osu.Game.Rulesets.Catch - - - {48f4582b-7687-4621-9cbe-5c24197cb536} - osu.Game.Rulesets.Mania - - - {f167e17a-7de6-4af5-b920-a5112296c695} - osu.Game.Rulesets.Taiko - - - {0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d} - osu.Game - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/osu.Desktop/packages.config b/osu.Desktop/packages.config deleted file mode 100644 index 58f9102aa1..0000000000 --- a/osu.Desktop/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs index d6efe45adf..2efb0c0707 100644 --- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs +++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs @@ -6,7 +6,6 @@ using osu.Game.Rulesets.Catch.Objects; using System.Collections.Generic; using System; using osu.Game.Rulesets.Objects.Types; -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Osu.UI; @@ -24,7 +23,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps yield return new Fruit { StartTime = obj.StartTime, - Position = ((IHasXPosition)obj).X / OsuPlayfield.BASE_SIZE.X + NewCombo = (obj as IHasCombo)?.NewCombo ?? false, + X = ((IHasXPosition)obj).X / OsuPlayfield.BASE_SIZE.X }; } } diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs new file mode 100644 index 0000000000..7fac19d135 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs @@ -0,0 +1,38 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Catch.Objects; + +namespace osu.Game.Rulesets.Catch.Beatmaps +{ + internal class CatchBeatmapProcessor : BeatmapProcessor + { + public override void PostProcess(Beatmap beatmap) + { + if (beatmap.ComboColors.Count == 0) + return; + + int comboIndex = 0; + int colourIndex = 0; + + CatchBaseHit lastObj = null; + + foreach (var obj in beatmap.HitObjects) + { + if (obj.NewCombo) + { + if (lastObj != null) lastObj.LastInCombo = true; + + comboIndex = 0; + colourIndex = (colourIndex + 1) % beatmap.ComboColors.Count; + } + + obj.ComboIndex = comboIndex++; + obj.ComboColour = beatmap.ComboColors[colourIndex]; + + lastObj = obj; + } + } + } +} diff --git a/osu.Game.Rulesets.Catch/CatchDifficultyCalculator.cs b/osu.Game.Rulesets.Catch/CatchDifficultyCalculator.cs index a865299cff..3c6cc4b1a3 100644 --- a/osu.Game.Rulesets.Catch/CatchDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Catch/CatchDifficultyCalculator.cs @@ -2,7 +2,6 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Catch.Beatmaps; using osu.Game.Rulesets.Catch.Objects; using System.Collections.Generic; diff --git a/osu.Game.Rulesets.Catch/Objects/CatchBaseHit.cs b/osu.Game.Rulesets.Catch/Objects/CatchBaseHit.cs index de0547580f..2f33cf1093 100644 --- a/osu.Game.Rulesets.Catch/Objects/CatchBaseHit.cs +++ b/osu.Game.Rulesets.Catch/Objects/CatchBaseHit.cs @@ -2,11 +2,23 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Rulesets.Objects; +using osu.Game.Rulesets.Objects.Types; +using OpenTK.Graphics; namespace osu.Game.Rulesets.Catch.Objects { - public abstract class CatchBaseHit : HitObject + public abstract class CatchBaseHit : HitObject, IHasXPosition, IHasCombo { - public float Position { get; set; } + public float X { get; set; } + + public Color4 ComboColour { get; set; } = Color4.Gray; + public int ComboIndex { get; set; } + + public virtual bool NewCombo { get; set; } + + /// + /// The next fruit starts a new combo. Used for explodey. + /// + public virtual bool LastInCombo { get; set; } } } diff --git a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs index 3dd086fb48..e0c9f0c028 100644 --- a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs +++ b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableFruit.cs @@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable { public class DrawableFruit : DrawableScrollingHitObject { - private const float pulp_size = 30; + private const float pulp_size = 20; private class Pulp : Circle, IHasAccentColour { @@ -26,15 +26,26 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable { Size = new Vector2(pulp_size); - EdgeEffect = new EdgeEffectParameters - { - Type = EdgeEffectType.Glow, - Radius = 5, - Colour = AccentColour.Opacity(0.5f), - }; + Blending = BlendingMode.Additive; + Colour = Color4.White.Opacity(0.9f); } - public Color4 AccentColour { get; set; } = Color4.White; + private Color4 accentColour; + public Color4 AccentColour + { + get { return accentColour; } + set + { + accentColour = value; + + EdgeEffect = new EdgeEffectParameters + { + Type = EdgeEffectType.Glow, + Radius = 5, + Colour = accentColour.Lighten(100), + }; + } + } } @@ -42,12 +53,14 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable : base(h) { Origin = Anchor.Centre; - Size = new Vector2(pulp_size * 2, pulp_size * 2.6f); + Size = new Vector2(pulp_size * 2.2f, pulp_size * 2.8f); RelativePositionAxes = Axes.Both; - X = h.Position; + X = h.X; - Colour = new Color4(RNG.NextSingle(), RNG.NextSingle(), RNG.NextSingle(), 1); + AccentColour = HitObject.ComboColour; + + Masking = false; Rotation = (float)(RNG.NextDouble() - 0.5f) * 40; } @@ -71,6 +84,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable RelativePositionAxes = Axes.Both, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, + AccentColour = AccentColour, Scale = new Vector2(0.6f), }, new Pulp @@ -78,6 +92,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable RelativePositionAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, + AccentColour = AccentColour, Y = -0.08f }, new Pulp @@ -85,6 +100,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable RelativePositionAxes = Axes.Both, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, + AccentColour = AccentColour, Y = -0.08f }, new Pulp @@ -92,6 +108,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable RelativePositionAxes = Axes.Both, Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, + AccentColour = AccentColour, }, } } diff --git a/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs b/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs index 11e95622ca..16756e65f1 100644 --- a/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs +++ b/osu.Game.Rulesets.Catch/Scoring/CatchScoreProcessor.cs @@ -1,7 +1,10 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Catch.Judgements; using osu.Game.Rulesets.Catch.Objects; +using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.UI; @@ -9,13 +12,22 @@ namespace osu.Game.Rulesets.Catch.Scoring { internal class CatchScoreProcessor : ScoreProcessor { - public CatchScoreProcessor() - { - } - public CatchScoreProcessor(RulesetContainer rulesetContainer) : base(rulesetContainer) { } + + protected override void SimulateAutoplay(Beatmap beatmap) + { + foreach (var obj in beatmap.HitObjects) + { + var fruit = obj as Fruit; + + if (fruit != null) + AddJudgement(new CatchJudgement { Result = HitResult.Perfect }); + } + + base.SimulateAutoplay(beatmap); + } } } diff --git a/osu.Game.Rulesets.Catch/Tests/TestCaseCatchPlayer.cs b/osu.Game.Rulesets.Catch/Tests/TestCaseCatchPlayer.cs new file mode 100644 index 0000000000..8d18a712d8 --- /dev/null +++ b/osu.Game.Rulesets.Catch/Tests/TestCaseCatchPlayer.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using NUnit.Framework; +using osu.Game.Beatmaps; +using osu.Game.Rulesets.Catch.Objects; + +namespace osu.Game.Rulesets.Catch.Tests +{ + [TestFixture] + public class TestCaseCatchPlayer : Game.Tests.Visual.TestCasePlayer + { + protected override Beatmap CreateBeatmap() + { + var beatmap = new Beatmap(); + + for (int i = 0; i < 256; i++) + beatmap.HitObjects.Add(new Fruit { X = 0.5f, StartTime = i * 100, NewCombo = i % 8 == 0 }); + + return beatmap; + } + } +} diff --git a/osu.Desktop.Tests/Visual/TestCaseCatcher.cs b/osu.Game.Rulesets.Catch/Tests/TestCaseCatcher.cs similarity index 75% rename from osu.Desktop.Tests/Visual/TestCaseCatcher.cs rename to osu.Game.Rulesets.Catch/Tests/TestCaseCatcher.cs index 3f57b5eeb9..6a065e197d 100644 --- a/osu.Desktop.Tests/Visual/TestCaseCatcher.cs +++ b/osu.Game.Rulesets.Catch/Tests/TestCaseCatcher.cs @@ -1,17 +1,25 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; +using System.Collections.Generic; +using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; -using osu.Game.Rulesets; -using osu.Game.Rulesets.Catch; using osu.Game.Rulesets.Catch.UI; +using osu.Game.Tests.Visual; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Rulesets.Catch.Tests { + [TestFixture] internal class TestCaseCatcher : OsuTestCase { + public override IReadOnlyList RequiredTypes => new[] + { + typeof(CatcherArea), + }; + [BackgroundDependencyLoader] private void load(RulesetStore rulesets) { diff --git a/osu.Game.Rulesets.Catch/UI/CatchRulesetContainer.cs b/osu.Game.Rulesets.Catch/UI/CatchRulesetContainer.cs index 8f332bdcbf..8a6ef71996 100644 --- a/osu.Game.Rulesets.Catch/UI/CatchRulesetContainer.cs +++ b/osu.Game.Rulesets.Catch/UI/CatchRulesetContainer.cs @@ -3,7 +3,6 @@ using osu.Framework.Input; using osu.Game.Beatmaps; -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Catch.Beatmaps; using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Catch.Objects.Drawable; @@ -23,6 +22,8 @@ namespace osu.Game.Rulesets.Catch.UI public override ScoreProcessor CreateScoreProcessor() => new CatchScoreProcessor(this); + protected override BeatmapProcessor CreateBeatmapProcessor() => new CatchBeatmapProcessor(); + protected override BeatmapConverter CreateBeatmapConverter() => new CatchBeatmapConverter(); protected override Playfield CreatePlayfield() => new CatchPlayfield(); diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs index 5fc2cf9ef7..2930dbb7cc 100644 --- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs +++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs @@ -11,7 +11,6 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input.Bindings; using osu.Framework.MathUtils; using osu.Game.Rulesets.Catch.Objects; -using osu.Game.Rulesets.Catch.Objects.Drawable; using osu.Game.Rulesets.Objects.Drawables; using OpenTK; @@ -20,20 +19,25 @@ namespace osu.Game.Rulesets.Catch.UI public class CatcherArea : Container { private Catcher catcher; + private Container explodingFruitContainer; public void Add(DrawableHitObject fruit, Vector2 screenPosition) => catcher.AddToStack(fruit, screenPosition); - public bool CheckIfWeCanCatch(CatchBaseHit obj) => Math.Abs(catcher.Position.X - obj.Position) < catcher.DrawSize.X / DrawSize.X / 2; + public bool CheckIfWeCanCatch(CatchBaseHit obj) => Math.Abs(catcher.Position.X - obj.X) < catcher.DrawSize.X / DrawSize.X / 2; [BackgroundDependencyLoader] private void load() { Children = new Drawable[] { + explodingFruitContainer = new Container + { + RelativeSizeAxes = Axes.Both, + }, catcher = new Catcher { RelativePositionAxes = Axes.Both, - Anchor = Anchor.TopLeft, + ExplodingFruitTarget = explodingFruitContainer, Origin = Anchor.TopCentre, X = 0.5f, } @@ -51,18 +55,30 @@ namespace osu.Game.Rulesets.Catch.UI { private Texture texture; + private Container caughtFruit; + [BackgroundDependencyLoader] private void load(TextureStore textures) { texture = textures.Get(@"Play/Catch/fruit-catcher-idle"); - Child = createCatcherSprite(); + Children = new Drawable[] + { + createCatcherSprite(), + caughtFruit = new Container + { + Anchor = Anchor.TopCentre, + Origin = Anchor.BottomCentre, + } + }; } private int currentDirection; private bool dashing; + public Container ExplodingFruitTarget; + protected bool Dashing { get { return dashing; } @@ -139,16 +155,21 @@ namespace osu.Game.Rulesets.Catch.UI return false; } + /// + /// The relative space to cover in 1 millisecond. based on 1 game pixel per millisecond as in osu-stable. + /// + private const double base_speed = 1.0 / 512; + protected override void Update() { base.Update(); if (currentDirection == 0) return; - float speed = Dashing ? 1.5f : 1; + double dashModifier = Dashing ? 1 : 0.5; Scale = new Vector2(Math.Sign(currentDirection), 1); - X = (float)MathHelper.Clamp(X + Math.Sign(currentDirection) * Clock.ElapsedFrameTime / 1800 * speed, 0, 1); + X = (float)MathHelper.Clamp(X + Math.Sign(currentDirection) * Clock.ElapsedFrameTime * base_speed * dashModifier, 0, 1); } public void AddToStack(DrawableHitObject fruit, Vector2 absolutePosition) @@ -163,13 +184,45 @@ namespace osu.Game.Rulesets.Catch.UI float distance = fruit.DrawSize.X / 2 * fruit.Scale.X; - while (Children.OfType().Any(f => Vector2Extensions.DistanceSquared(f.Position, fruit.Position) < distance * distance)) + while (caughtFruit.Any(f => f.LifetimeEnd == double.MaxValue && Vector2Extensions.DistanceSquared(f.Position, fruit.Position) < distance * distance)) { fruit.X += RNG.Next(-5, 5); fruit.Y -= RNG.Next(0, 5); } - Add(fruit); + caughtFruit.Add(fruit); + + if (((CatchBaseHit)fruit.HitObject).LastInCombo) + explode(); + } + + private void explode() + { + var fruit = caughtFruit.ToArray(); + + foreach (var f in fruit) + { + var originalX = f.X * Scale.X; + + if (ExplodingFruitTarget != null) + { + f.Anchor = Anchor.TopLeft; + f.Position = caughtFruit.ToSpaceOfOtherDrawable(f.DrawPosition, ExplodingFruitTarget); + + caughtFruit.Remove(f); + + ExplodingFruitTarget.Add(f); + } + + f.MoveToY(f.Y - 50, 250, Easing.OutSine) + .Then() + .MoveToY(f.Y + 50, 500, Easing.InSine); + + f.MoveToX(f.X + originalX * 6, 1000); + f.FadeOut(750); + + f.Expire(); + } } } } diff --git a/osu.Game.Rulesets.Catch/app.config b/osu.Game.Rulesets.Catch/app.config index faeaf001de..11af32e2cf 100644 --- a/osu.Game.Rulesets.Catch/app.config +++ b/osu.Game.Rulesets.Catch/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file diff --git a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj index 18e1ee29ca..787825d482 100644 --- a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj +++ b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj @@ -16,7 +16,7 @@ true full false - bin\Debug\ + ..\osu.Game\bin\Debug\ DEBUG;TRACE prompt 4 @@ -26,30 +26,28 @@ pdbonly true - bin\Release\ + ..\osu.Game\bin\Release\ TRACE prompt 4 false + + $(SolutionDir)\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll + False + $(SolutionDir)\packages\OpenTK.3.0.0-git00009\lib\net20\OpenTK.dll - True + False - - - - - - - + @@ -59,6 +57,8 @@ + + @@ -77,14 +77,17 @@ {C76BF5B3-985E-4D39-95FE-97C9C879B83A} osu.Framework + False {C92A607B-1FDD-4954-9F92-03FF547D9080} osu.Game.Rulesets.Osu + False - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} + {2a66dd92-adb1-4994-89e2-c94e04acda0d} osu.Game + False diff --git a/osu.Game.Rulesets.Catch/packages.config b/osu.Game.Rulesets.Catch/packages.config index 0b1838ceee..cde428acea 100644 --- a/osu.Game.Rulesets.Catch/packages.config +++ b/osu.Game.Rulesets.Catch/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file diff --git a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs index be670936fd..d7c86e1f89 100644 --- a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs +++ b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Mania.Objects; using System; using System.Collections.Generic; diff --git a/osu.Game.Rulesets.Mania/ManiaDifficultyCalculator.cs b/osu.Game.Rulesets.Mania/ManiaDifficultyCalculator.cs index 1f01750f44..b98802db69 100644 --- a/osu.Game.Rulesets.Mania/ManiaDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Mania/ManiaDifficultyCalculator.cs @@ -2,7 +2,6 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Game.Beatmaps; -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Mania.Beatmaps; using osu.Game.Rulesets.Mania.Objects; using System.Collections.Generic; diff --git a/osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs b/osu.Game.Rulesets.Mania/Testing/TestCaseManiaHitObjects.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs rename to osu.Game.Rulesets.Mania/Testing/TestCaseManiaHitObjects.cs index d855e86aa0..a5568b7f6d 100644 --- a/osu.Desktop.Tests/Visual/TestCaseManiaHitObjects.cs +++ b/osu.Game.Rulesets.Mania/Testing/TestCaseManiaHitObjects.cs @@ -1,16 +1,18 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using NUnit.Framework; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Game.Rulesets.Mania; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; +using osu.Game.Tests.Visual; using OpenTK; using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Rulesets.Mania.Testing { + [TestFixture] internal class TestCaseManiaHitObjects : OsuTestCase { public TestCaseManiaHitObjects() diff --git a/osu.Desktop.Tests/Visual/TestCaseManiaPlayfield.cs b/osu.Game.Rulesets.Mania/Testing/TestCaseManiaPlayfield.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseManiaPlayfield.cs rename to osu.Game.Rulesets.Mania/Testing/TestCaseManiaPlayfield.cs index 28cc7e5af8..4b68334efb 100644 --- a/osu.Desktop.Tests/Visual/TestCaseManiaPlayfield.cs +++ b/osu.Game.Rulesets.Mania/Testing/TestCaseManiaPlayfield.cs @@ -3,22 +3,23 @@ using System; using System.Linq; +using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Timing; -using osu.Game.Rulesets.Mania; +using osu.Game.Rulesets.Mania.Judgements; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; using osu.Game.Rulesets.Mania.Timing; using osu.Game.Rulesets.Mania.UI; -using osu.Game.Rulesets.Timing; -using osu.Game.Rulesets; -using osu.Game.Rulesets.Mania.Judgements; using osu.Game.Rulesets.Objects.Drawables; +using osu.Game.Rulesets.Timing; +using osu.Game.Tests.Visual; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Rulesets.Mania.Testing { + [TestFixture] internal class TestCaseManiaPlayfield : OsuTestCase { private const double start_time = 500; diff --git a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs index e9c4895284..3b49d81674 100644 --- a/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs +++ b/osu.Game.Rulesets.Mania/UI/ManiaRulesetContainer.cs @@ -13,7 +13,6 @@ using osu.Framework.Lists; using osu.Framework.MathUtils; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Mania.Beatmaps; using osu.Game.Rulesets.Mania.Objects; using osu.Game.Rulesets.Mania.Objects.Drawables; diff --git a/osu.Game.Rulesets.Mania/app.config b/osu.Game.Rulesets.Mania/app.config index faeaf001de..11af32e2cf 100644 --- a/osu.Game.Rulesets.Mania/app.config +++ b/osu.Game.Rulesets.Mania/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file diff --git a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj index 739f1cf48c..fa8b9d35aa 100644 --- a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj +++ b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj @@ -16,7 +16,7 @@ true full false - bin\Debug\ + ..\osu.Game\bin\Debug\ DEBUG;TRACE prompt 4 @@ -26,26 +26,23 @@ pdbonly true - bin\Release\ + ..\osu.Game\bin\Release\ TRACE prompt 4 false + + $(SolutionDir)\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll + False + $(SolutionDir)\packages\OpenTK.3.0.0-git00009\lib\net20\OpenTK.dll - True + False - - - - - - - @@ -83,6 +80,8 @@ + + @@ -96,16 +95,6 @@ - - - {C76BF5B3-985E-4D39-95FE-97C9C879B83A} - osu.Framework - - - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} - osu.Game - - osu.licenseheader @@ -114,7 +103,18 @@ - + + + {C76BF5B3-985E-4D39-95FE-97C9C879B83A} + osu.Framework + False + + + {2a66dd92-adb1-4994-89e2-c94e04acda0d} + osu.Game + False + + - - - - - - - diff --git a/osu.Game.Tests/app.config b/osu.Game.Tests/app.config deleted file mode 100644 index faeaf001de..0000000000 --- a/osu.Game.Tests/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj deleted file mode 100644 index 07190bedb0..0000000000 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ /dev/null @@ -1,107 +0,0 @@ - - - - Debug - AnyCPU - {54377672-20B1-40AF-8087-5CF73BF3953A} - Library - osu.Game.Tests - osu.Game.Tests - v4.6.1 - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - false - 6 - - - true - bin\Release - prompt - 4 - false - false - - - - $(SolutionDir)\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll - True - - - $(SolutionDir)\packages\OpenTK.3.0.0-git00009\lib\net20\OpenTK.dll - True - - - - $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll - - - $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll - - - $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net40\SQLite.Net.Platform.Generic.dll - - - - - osu.licenseheader - - - - - - - - {65DC628F-A640-4111-AB35-3A5652BC1E17} - osu.Framework.Desktop - - - {c76bf5b3-985e-4d39-95fe-97c9c879b83a} - osu.Framework - - - {c92a607b-1fdd-4954-9f92-03ff547d9080} - osu.Game.Rulesets.Osu - - - {58f6c80c-1253-4a0e-a465-b8c85ebeadf3} - osu.Game.Rulesets.Catch - - - {48f4582b-7687-4621-9cbe-5c24197cb536} - osu.Game.Rulesets.Mania - - - {f167e17a-7de6-4af5-b920-a5112296c695} - osu.Game.Rulesets.Taiko - - - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} - osu.Game - - - {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58} - osu.Game.Resources - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/osu.Game.Tests/packages.config b/osu.Game.Tests/packages.config deleted file mode 100644 index af47f642e3..0000000000 --- a/osu.Game.Tests/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/osu.Game/Rulesets/Beatmaps/BeatmapConverter.cs b/osu.Game/Beatmaps/BeatmapConverter.cs similarity index 95% rename from osu.Game/Rulesets/Beatmaps/BeatmapConverter.cs rename to osu.Game/Beatmaps/BeatmapConverter.cs index e79d9eee4b..962c790fb2 100644 --- a/osu.Game/Rulesets/Beatmaps/BeatmapConverter.cs +++ b/osu.Game/Beatmaps/BeatmapConverter.cs @@ -5,9 +5,8 @@ using System; using System.Collections.Generic; using System.Linq; using osu.Game.Rulesets.Objects; -using osu.Game.Beatmaps; -namespace osu.Game.Rulesets.Beatmaps +namespace osu.Game.Beatmaps { /// /// Converts a Beatmap for another mode. diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index f58b3505c5..a1b678392b 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -429,6 +429,15 @@ namespace osu.Game.Beatmaps if (beatmapSet != null) { Undelete(beatmapSet); + + // ensure all files are present and accessible + foreach (var f in beatmapSet.Files) + { + if (!storage.Exists(f.FileInfo.StoragePath)) + using (Stream s = reader.GetStream(f.Filename)) + files.Add(s, false); + } + return beatmapSet; } diff --git a/osu.Game/Rulesets/Beatmaps/BeatmapProcessor.cs b/osu.Game/Beatmaps/BeatmapProcessor.cs similarity index 90% rename from osu.Game/Rulesets/Beatmaps/BeatmapProcessor.cs rename to osu.Game/Beatmaps/BeatmapProcessor.cs index ee9fc30f7b..04680fe6fb 100644 --- a/osu.Game/Rulesets/Beatmaps/BeatmapProcessor.cs +++ b/osu.Game/Beatmaps/BeatmapProcessor.cs @@ -1,10 +1,9 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Beatmaps; using osu.Game.Rulesets.Objects; -namespace osu.Game.Rulesets.Beatmaps +namespace osu.Game.Beatmaps { /// /// Processes a post-converted Beatmap. diff --git a/osu.Game/Rulesets/BeatmapStatistic.cs b/osu.Game/Beatmaps/BeatmapStatistic.cs similarity index 88% rename from osu.Game/Rulesets/BeatmapStatistic.cs rename to osu.Game/Beatmaps/BeatmapStatistic.cs index 11ac698851..c1838d059b 100644 --- a/osu.Game/Rulesets/BeatmapStatistic.cs +++ b/osu.Game/Beatmaps/BeatmapStatistic.cs @@ -3,7 +3,7 @@ using osu.Game.Graphics; -namespace osu.Game.Rulesets +namespace osu.Game.Beatmaps { public class BeatmapStatistic { diff --git a/osu.Game/Beatmaps/DifficultyCalculator.cs b/osu.Game/Beatmaps/DifficultyCalculator.cs index 5071e2c1b6..60cbf0ac61 100644 --- a/osu.Game/Beatmaps/DifficultyCalculator.cs +++ b/osu.Game/Beatmaps/DifficultyCalculator.cs @@ -1,7 +1,6 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Objects; using System.Collections.Generic; diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index bb3122489e..277846ee80 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -25,7 +25,7 @@ namespace osu.Game.Beatmaps { BeatmapInfo = beatmapInfo; BeatmapSetInfo = beatmapInfo.BeatmapSet; - Metadata = beatmapInfo.Metadata ?? BeatmapSetInfo.Metadata; + Metadata = beatmapInfo.Metadata ?? BeatmapSetInfo?.Metadata ?? new BeatmapMetadata(); Mods.ValueChanged += mods => applyRateAdjustments(); } diff --git a/osu.Game/IO/FileStore.cs b/osu.Game/IO/FileStore.cs index 1011fa3236..c3d8c1df46 100644 --- a/osu.Game/IO/FileStore.cs +++ b/osu.Game/IO/FileStore.cs @@ -78,33 +78,33 @@ namespace osu.Game.IO } } - public FileInfo Add(Stream data) + public FileInfo Add(Stream data, bool reference = true) { string hash = data.ComputeSHA2Hash(); var existing = Connection.Table().Where(f => f.Hash == hash).FirstOrDefault(); var info = existing ?? new FileInfo { Hash = hash }; - if (existing != null) + + string path = Path.Combine(prefix, info.StoragePath); + + // we may be re-adding a file to fix missing store entries. + if (!Storage.Exists(path)) { - info = existing; + data.Seek(0, SeekOrigin.Begin); + + using (var output = Storage.GetStream(path, FileAccess.Write)) + data.CopyTo(output); + + data.Seek(0, SeekOrigin.Begin); } - else - { - string path = Path.Combine(prefix, info.StoragePath); - - data.Seek(0, SeekOrigin.Begin); - - if (!Storage.Exists(path)) - using (var output = Storage.GetStream(path, FileAccess.Write)) - data.CopyTo(output); - - data.Seek(0, SeekOrigin.Begin); + if (existing == null) Connection.Insert(info); - } - Reference(info); + if (reference || existing == null) + Reference(info); + return info; } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 79e03a8141..448dccdd72 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Reflection; using osu.Framework.Allocation; using osu.Framework.Configuration; +using osu.Framework.Development; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.IO.Stores; @@ -59,25 +60,12 @@ namespace osu.Game public bool IsDeployedBuild => AssemblyName.Version.Major > 0; - public bool IsDebug - { - get - { - // ReSharper disable once RedundantAssignment - bool isDebug = false; - // Debug.Assert conditions are only evaluated in debug mode - Debug.Assert(isDebug = true); - // ReSharper disable once ConditionIsAlwaysTrueOrFalse - return isDebug; - } - } - public string Version { get { if (!IsDeployedBuild) - return @"local " + (IsDebug ? @"debug" : @"release"); + return @"local " + (DebugUtils.IsDebug ? @"debug" : @"release"); var assembly = AssemblyName; return $@"{assembly.Version.Major}.{assembly.Version.Minor}.{assembly.Version.Build}"; @@ -243,7 +231,7 @@ namespace osu.Game LocalConfig.Save(); } - connection.Dispose(); + connection?.Dispose(); base.Dispose(isDisposing); } diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Game/OsuGameDesktop.cs similarity index 95% rename from osu.Desktop/OsuGameDesktop.cs rename to osu.Game/OsuGameDesktop.cs index a623347540..47e64a0d5b 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Game/OsuGameDesktop.cs @@ -2,21 +2,19 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; -using osu.Game; -using System.Linq; -using System.Windows.Forms; -using osu.Framework.Platform; -using osu.Framework.Desktop.Platform; -using osu.Desktop.Overlays; -using System.Reflection; using System.Drawing; using System.IO; +using System.Linq; +using System.Reflection; using System.Threading.Tasks; +using System.Windows.Forms; using Microsoft.Win32; using osu.Framework.Graphics.Containers; +using osu.Framework.Platform; +using osu.Game.Overlays; using osu.Game.Screens.Menu; -namespace osu.Desktop +namespace osu.Game { internal class OsuGameDesktop : OsuGame { diff --git a/osu.Desktop/OsuTestBrowser.cs b/osu.Game/OsuTestBrowser.cs similarity index 92% rename from osu.Desktop/OsuTestBrowser.cs rename to osu.Game/OsuTestBrowser.cs index 23617de1c0..b0864e441f 100644 --- a/osu.Desktop/OsuTestBrowser.cs +++ b/osu.Game/OsuTestBrowser.cs @@ -3,10 +3,9 @@ using osu.Framework.Platform; using osu.Framework.Testing; -using osu.Game; using osu.Game.Screens.Backgrounds; -namespace osu.Desktop +namespace osu.Game { internal class OsuTestBrowser : OsuGameBase { diff --git a/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs b/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs index 9b1c5e5e49..a2f3ad545b 100644 --- a/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Audio/AudioDevicesSettings.cs @@ -59,14 +59,13 @@ namespace osu.Game.Overlays.Settings.Sections.Audio Children = new Drawable[] { - dropdown = new SettingsDropdown - { - Bindable = audio.AudioDevice - }, + dropdown = new SettingsDropdown() }; updateItems(); + dropdown.Bindable = audio.AudioDevice; + audio.OnNewDevice += onDeviceChanged; audio.OnLostDevice += onDeviceChanged; } diff --git a/osu.Game/Overlays/Settings/SettingsFooter.cs b/osu.Game/Overlays/Settings/SettingsFooter.cs index aef9f071db..cb1c861ee7 100644 --- a/osu.Game/Overlays/Settings/SettingsFooter.cs +++ b/osu.Game/Overlays/Settings/SettingsFooter.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using osu.Framework.Allocation; +using osu.Framework.Development; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Graphics; @@ -64,7 +65,7 @@ namespace osu.Game.Overlays.Settings Origin = Anchor.TopCentre, TextSize = 14, Text = game.Version, - Colour = game.IsDebug ? colours.Red : Color4.White, + Colour = DebugUtils.IsDebug ? colours.Red : Color4.White, }, }; } diff --git a/osu.Desktop/Overlays/VersionManager.cs b/osu.Game/Overlays/VersionManager.cs similarity index 95% rename from osu.Desktop/Overlays/VersionManager.cs rename to osu.Game/Overlays/VersionManager.cs index 1c0c1475b1..7b0b3520cb 100644 --- a/osu.Desktop/Overlays/VersionManager.cs +++ b/osu.Game/Overlays/VersionManager.cs @@ -3,26 +3,25 @@ using System; using System.Diagnostics; +using System.Net.Http; using osu.Framework.Allocation; +using osu.Framework.Development; using osu.Framework.Graphics; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; -using osu.Game.Graphics.Sprites; -using osu.Game.Overlays; -using osu.Game.Overlays.Notifications; -using Squirrel; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Textures; +using osu.Framework.Logging; +using osu.Game.Configuration; using osu.Game.Graphics; +using osu.Game.Graphics.Sprites; +using osu.Game.Overlays.Notifications; using OpenTK; using OpenTK.Graphics; -using System.Net.Http; -using osu.Framework.Logging; -using osu.Game; -using osu.Game.Configuration; +using Squirrel; -namespace osu.Desktop.Overlays +namespace osu.Game.Overlays { public class VersionManager : OverlayContainer { @@ -70,7 +69,7 @@ namespace osu.Desktop.Overlays }, new OsuSpriteText { - Colour = game.IsDebug ? colours.Red : Color4.White, + Colour = DebugUtils.IsDebug ? colours.Red : Color4.White, Text = game.Version }, } diff --git a/osu.Desktop/Program.cs b/osu.Game/Program.cs similarity index 92% rename from osu.Desktop/Program.cs rename to osu.Game/Program.cs index 1fab92e020..8044e9fa87 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Game/Program.cs @@ -4,11 +4,11 @@ using System; using System.IO; using System.Linq; -using osu.Framework.Desktop; -using osu.Framework.Desktop.Platform; +using osu.Framework; +using osu.Framework.Platform; using osu.Game.IPC; -namespace osu.Desktop +namespace osu.Game { public static class Program { diff --git a/osu.Game/Properties/AssemblyInfo.cs b/osu.Game/Properties/AssemblyInfo.cs index 4cc9549567..fe7ad20124 100644 --- a/osu.Game/Properties/AssemblyInfo.cs +++ b/osu.Game/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . +// Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Reflection; @@ -7,12 +7,12 @@ 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!main")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("osu!lazer")] +[assembly: AssemblyDescription("click the circles. to the beat.")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("osu!main")] -[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyCompany("ppy Pty Ltd")] +[assembly: AssemblyProduct("osu!lazer")] +[assembly: AssemblyCopyright("ppy Pty Ltd 2007-2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -22,17 +22,7 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d")] +[assembly: Guid("55e28cb2-7b6c-4595-8dcc-9871d8aad7e9")] -// 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")] +[assembly: AssemblyVersion("0.0.0")] +[assembly: AssemblyFileVersion("0.0.0")] diff --git a/osu.Desktop/Properties/app.manifest b/osu.Game/Properties/app.manifest similarity index 100% rename from osu.Desktop/Properties/app.manifest rename to osu.Game/Properties/app.manifest diff --git a/osu.Game.Tests/Resources/Resource.cs b/osu.Game/Resources/Resource.cs similarity index 100% rename from osu.Game.Tests/Resources/Resource.cs rename to osu.Game/Resources/Resource.cs diff --git a/osu.Game.Tests/Resources/Soleily - Renatus (Gamu) [Insane].osu b/osu.Game/Resources/Soleily - Renatus (Gamu) [Insane].osu similarity index 100% rename from osu.Game.Tests/Resources/Soleily - Renatus (Gamu) [Insane].osu rename to osu.Game/Resources/Soleily - Renatus (Gamu) [Insane].osu diff --git a/osu.Game/Rulesets/RulesetStore.cs b/osu.Game/Rulesets/RulesetStore.cs index 2956c11d7f..5eef4a8470 100644 --- a/osu.Game/Rulesets/RulesetStore.cs +++ b/osu.Game/Rulesets/RulesetStore.cs @@ -16,14 +16,29 @@ namespace osu.Game.Rulesets /// public class RulesetStore : DatabaseBackedStore { + private static readonly Dictionary loaded_assemblies = new Dictionary(); + public IEnumerable AllRulesets => Query().Where(r => r.Available); public RulesetStore(SQLiteConnection connection) : base(connection) { } + static RulesetStore() + { + AppDomain.CurrentDomain.AssemblyResolve += currentDomain_AssemblyResolve; + + foreach (string file in Directory.GetFiles(Environment.CurrentDirectory, $"{ruleset_library_prefix}.*.dll")) + loadRulesetFromFile(file); + } + + private static Assembly currentDomain_AssemblyResolve(object sender, ResolveEventArgs args) => loaded_assemblies.Keys.FirstOrDefault(a => a.FullName == args.Name); + + private const string ruleset_library_prefix = "osu.Game.Rulesets"; + protected override void Prepare(bool reset = false) { + Connection.CreateTable(); if (reset) @@ -31,60 +46,61 @@ namespace osu.Game.Rulesets Connection.DeleteAll(); } - List instances = new List(); + var instances = loaded_assemblies.Values.Select(r => (Ruleset)Activator.CreateInstance(r, new RulesetInfo())); - foreach (string file in Directory.GetFiles(Environment.CurrentDirectory, @"osu.Game.Rulesets.*.dll")) + Connection.RunInTransaction(() => { - try + //add all legacy modes in correct order + foreach (var r in instances.Where(r => r.LegacyID >= 0).OrderBy(r => r.LegacyID)) { - var assembly = Assembly.LoadFile(file); - var rulesets = assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(Ruleset))); - - if (rulesets.Count() != 1) - continue; - - foreach (Type rulesetType in rulesets) - instances.Add((Ruleset)Activator.CreateInstance(rulesetType, new RulesetInfo())); - } - catch (Exception) { } - } - - Connection.BeginTransaction(); - - //add all legacy modes in correct order - foreach (var r in instances.Where(r => r.LegacyID >= 0).OrderBy(r => r.LegacyID)) - { - Connection.InsertOrReplace(createRulesetInfo(r)); - } - - //add any other modes - foreach (var r in instances.Where(r => r.LegacyID < 0)) - { - var us = createRulesetInfo(r); - - var existing = Query().Where(ri => ri.InstantiationInfo == us.InstantiationInfo).FirstOrDefault(); - - if (existing == null) - Connection.Insert(us); - } - - //perform a consistency check - foreach (var r in Query()) - { - try - { - r.CreateInstance(); - r.Available = true; - } - catch - { - r.Available = false; + Connection.InsertOrReplace(createRulesetInfo(r)); } - Connection.Update(r); - } + //add any other modes + foreach (var r in instances.Where(r => r.LegacyID < 0)) + { + var us = createRulesetInfo(r); - Connection.Commit(); + var existing = Query().Where(ri => ri.InstantiationInfo == us.InstantiationInfo).FirstOrDefault(); + + if (existing == null) + Connection.Insert(us); + } + }); + + Connection.RunInTransaction(() => + { + //perform a consistency check + foreach (var r in Query()) + { + try + { + r.CreateInstance(); + r.Available = true; + } + catch + { + r.Available = false; + } + + Connection.Update(r); + } + }); + } + + private static void loadRulesetFromFile(string file) + { + var filename = Path.GetFileNameWithoutExtension(file); + + if (loaded_assemblies.Values.Any(t => t.Namespace == filename)) + return; + + try + { + var assembly = Assembly.LoadFrom(file); + loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsSubclassOf(typeof(Ruleset))); + } + catch (Exception) { } } private RulesetInfo createRulesetInfo(Ruleset ruleset) => new RulesetInfo diff --git a/osu.Game/Rulesets/Scoring/Score.cs b/osu.Game/Rulesets/Scoring/Score.cs index ff4632a9c2..7f053ec1c5 100644 --- a/osu.Game/Rulesets/Scoring/Score.cs +++ b/osu.Game/Rulesets/Scoring/Score.cs @@ -26,7 +26,7 @@ namespace osu.Game.Rulesets.Scoring public RulesetInfo Ruleset { get; set; } - public Mod[] Mods { get; set; } + public Mod[] Mods { get; set; } = { }; public User User; diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index 86ab9a0199..729df02ffd 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -17,7 +17,6 @@ using osu.Framework.Input; using osu.Game.Rulesets.Replays; using osu.Game.Rulesets.Scoring; using OpenTK; -using osu.Game.Rulesets.Beatmaps; namespace osu.Game.Rulesets.UI { diff --git a/osu.Game/Screens/Select/BeatmapInfoWedge.cs b/osu.Game/Screens/Select/BeatmapInfoWedge.cs index 872f7483b6..76c384b84c 100644 --- a/osu.Game/Screens/Select/BeatmapInfoWedge.cs +++ b/osu.Game/Screens/Select/BeatmapInfoWedge.cs @@ -16,7 +16,6 @@ using osu.Game.Beatmaps; using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; -using osu.Game.Rulesets; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Types; using osu.Framework.Graphics.Shapes; diff --git a/osu.Desktop.Tests/Beatmaps/TestWorkingBeatmap.cs b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs similarity index 91% rename from osu.Desktop.Tests/Beatmaps/TestWorkingBeatmap.cs rename to osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs index 084cfab309..da139775b1 100644 --- a/osu.Desktop.Tests/Beatmaps/TestWorkingBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs @@ -5,7 +5,7 @@ using osu.Framework.Audio.Track; using osu.Framework.Graphics.Textures; using osu.Game.Beatmaps; -namespace osu.Desktop.Tests.Beatmaps +namespace osu.Game.Tests.Beatmaps { public class TestWorkingBeatmap : WorkingBeatmap { diff --git a/osu.Desktop.Tests/Platform/TestStorage.cs b/osu.Game/Tests/Platform/TestStorage.cs similarity index 88% rename from osu.Desktop.Tests/Platform/TestStorage.cs rename to osu.Game/Tests/Platform/TestStorage.cs index 39e4d8049f..9f76df2a58 100644 --- a/osu.Desktop.Tests/Platform/TestStorage.cs +++ b/osu.Game/Tests/Platform/TestStorage.cs @@ -2,13 +2,13 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework; -using osu.Framework.Desktop.Platform; +using osu.Framework.Platform; using SQLite.Net; using SQLite.Net.Interop; using SQLite.Net.Platform.Generic; using SQLite.Net.Platform.Win32; -namespace osu.Desktop.Tests.Platform +namespace osu.Game.Tests.Platform { public class TestStorage : DesktopStorage { diff --git a/osu.Desktop.Tests/Visual/OsuTestCase.cs b/osu.Game/Tests/Visual/OsuTestCase.cs similarity index 77% rename from osu.Desktop.Tests/Visual/OsuTestCase.cs rename to osu.Game/Tests/Visual/OsuTestCase.cs index 1b48ded4e2..d722f7d711 100644 --- a/osu.Desktop.Tests/Visual/OsuTestCase.cs +++ b/osu.Game/Tests/Visual/OsuTestCase.cs @@ -1,17 +1,17 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Framework.Desktop.Platform; +using System; +using osu.Framework.Platform; using osu.Framework.Testing; -using osu.Game; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { public abstract class OsuTestCase : TestCase { public override void RunTest() { - using (var host = new HeadlessGameHost(realtime: false)) + using (var host = new HeadlessGameHost(AppDomain.CurrentDomain.FriendlyName.Replace(' ', '-'), realtime: false)) host.Run(new OsuTestCaseTestRunner(this)); } diff --git a/osu.Desktop.Tests/Visual/TestCaseBeatSyncedContainer.cs b/osu.Game/Tests/Visual/TestCaseBeatSyncedContainer.cs similarity index 97% rename from osu.Desktop.Tests/Visual/TestCaseBeatSyncedContainer.cs rename to osu.Game/Tests/Visual/TestCaseBeatSyncedContainer.cs index 130a034133..a5156c155b 100644 --- a/osu.Desktop.Tests/Visual/TestCaseBeatSyncedContainer.cs +++ b/osu.Game/Tests/Visual/TestCaseBeatSyncedContainer.cs @@ -15,7 +15,7 @@ using osu.Game.Graphics.Sprites; using osu.Game.Overlays; using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseBeatSyncedContainer : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseBeatmapDetailArea.cs b/osu.Game/Tests/Visual/TestCaseBeatmapDetailArea.cs similarity index 91% rename from osu.Desktop.Tests/Visual/TestCaseBeatmapDetailArea.cs rename to osu.Game/Tests/Visual/TestCaseBeatmapDetailArea.cs index 23b4ece4ec..7dffa6d590 100644 --- a/osu.Desktop.Tests/Visual/TestCaseBeatmapDetailArea.cs +++ b/osu.Game/Tests/Visual/TestCaseBeatmapDetailArea.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics; using osu.Game.Screens.Select; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { [TestFixture] internal class TestCaseBeatmapDetailArea : OsuTestCase diff --git a/osu.Desktop.Tests/Visual/TestCaseBeatmapDetails.cs b/osu.Game/Tests/Visual/TestCaseBeatmapDetails.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCaseBeatmapDetails.cs rename to osu.Game/Tests/Visual/TestCaseBeatmapDetails.cs index d0f631201a..cd4d97425b 100644 --- a/osu.Desktop.Tests/Visual/TestCaseBeatmapDetails.cs +++ b/osu.Game/Tests/Visual/TestCaseBeatmapDetails.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics; using osu.Game.Beatmaps; using osu.Game.Screens.Select; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseBeatmapDetails : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseBeatmapOptionsOverlay.cs b/osu.Game/Tests/Visual/TestCaseBeatmapOptionsOverlay.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseBeatmapOptionsOverlay.cs rename to osu.Game/Tests/Visual/TestCaseBeatmapOptionsOverlay.cs index 3265f8ec76..bdc2e0e105 100644 --- a/osu.Desktop.Tests/Visual/TestCaseBeatmapOptionsOverlay.cs +++ b/osu.Game/Tests/Visual/TestCaseBeatmapOptionsOverlay.cs @@ -6,7 +6,7 @@ using osu.Game.Screens.Select.Options; using OpenTK.Graphics; using OpenTK.Input; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseBeatmapOptionsOverlay : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseBreadcrumbs.cs b/osu.Game/Tests/Visual/TestCaseBreadcrumbs.cs similarity index 93% rename from osu.Desktop.Tests/Visual/TestCaseBreadcrumbs.cs rename to osu.Game/Tests/Visual/TestCaseBreadcrumbs.cs index 10e0c784ab..97c343f8ac 100644 --- a/osu.Desktop.Tests/Visual/TestCaseBreadcrumbs.cs +++ b/osu.Game/Tests/Visual/TestCaseBreadcrumbs.cs @@ -4,7 +4,7 @@ using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseBreadcrumbs : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseChatDisplay.cs b/osu.Game/Tests/Visual/TestCaseChatDisplay.cs similarity index 90% rename from osu.Desktop.Tests/Visual/TestCaseChatDisplay.cs rename to osu.Game/Tests/Visual/TestCaseChatDisplay.cs index ae051a1e40..847593fcec 100644 --- a/osu.Desktop.Tests/Visual/TestCaseChatDisplay.cs +++ b/osu.Game/Tests/Visual/TestCaseChatDisplay.cs @@ -4,7 +4,7 @@ using osu.Framework.Graphics.Containers; using osu.Game.Overlays; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseChatDisplay : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseContextMenu.cs b/osu.Game/Tests/Visual/TestCaseContextMenu.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCaseContextMenu.cs rename to osu.Game/Tests/Visual/TestCaseContextMenu.cs index 0d9c5e7ed1..28aae1f5b9 100644 --- a/osu.Desktop.Tests/Visual/TestCaseContextMenu.cs +++ b/osu.Game/Tests/Visual/TestCaseContextMenu.cs @@ -10,7 +10,7 @@ using osu.Game.Graphics.UserInterface; using OpenTK; using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseContextMenu : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseDialogOverlay.cs b/osu.Game/Tests/Visual/TestCaseDialogOverlay.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseDialogOverlay.cs rename to osu.Game/Tests/Visual/TestCaseDialogOverlay.cs index df15350453..a031125b3a 100644 --- a/osu.Desktop.Tests/Visual/TestCaseDialogOverlay.cs +++ b/osu.Game/Tests/Visual/TestCaseDialogOverlay.cs @@ -5,7 +5,7 @@ using osu.Game.Graphics; using osu.Game.Overlays; using osu.Game.Overlays.Dialog; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseDialogOverlay : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseDirect.cs b/osu.Game/Tests/Visual/TestCaseDirect.cs similarity index 97% rename from osu.Desktop.Tests/Visual/TestCaseDirect.cs rename to osu.Game/Tests/Visual/TestCaseDirect.cs index 9fd93c3f1e..1fb9dbea8f 100644 --- a/osu.Desktop.Tests/Visual/TestCaseDirect.cs +++ b/osu.Game/Tests/Visual/TestCaseDirect.cs @@ -7,7 +7,7 @@ using osu.Game.Beatmaps; using osu.Game.Overlays; using osu.Game.Rulesets; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { public class TestCaseDirect : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseDrawableRoom.cs b/osu.Game/Tests/Visual/TestCaseDrawableRoom.cs similarity index 97% rename from osu.Desktop.Tests/Visual/TestCaseDrawableRoom.cs rename to osu.Game/Tests/Visual/TestCaseDrawableRoom.cs index 04d551afe4..7113bcbff5 100644 --- a/osu.Desktop.Tests/Visual/TestCaseDrawableRoom.cs +++ b/osu.Game/Tests/Visual/TestCaseDrawableRoom.cs @@ -10,7 +10,7 @@ using osu.Game.Rulesets; using osu.Game.Screens.Multiplayer; using osu.Game.Users; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseDrawableRoom : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseDrawings.cs b/osu.Game/Tests/Visual/TestCaseDrawings.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseDrawings.cs rename to osu.Game/Tests/Visual/TestCaseDrawings.cs index 81fd8cad03..c805d88cb4 100644 --- a/osu.Desktop.Tests/Visual/TestCaseDrawings.cs +++ b/osu.Game/Tests/Visual/TestCaseDrawings.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using osu.Game.Screens.Tournament; using osu.Game.Screens.Tournament.Teams; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseDrawings : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseEditorMenuBar.cs b/osu.Game/Tests/Visual/TestCaseEditorMenuBar.cs similarity index 97% rename from osu.Desktop.Tests/Visual/TestCaseEditorMenuBar.cs rename to osu.Game/Tests/Visual/TestCaseEditorMenuBar.cs index 9cb3053ff2..8b5132fe08 100644 --- a/osu.Desktop.Tests/Visual/TestCaseEditorMenuBar.cs +++ b/osu.Game/Tests/Visual/TestCaseEditorMenuBar.cs @@ -5,7 +5,7 @@ using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Edit.Menus; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { public class TestCaseEditorMenuBar : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseGamefield.cs b/osu.Game/Tests/Visual/TestCaseGamefield.cs similarity index 66% rename from osu.Desktop.Tests/Visual/TestCaseGamefield.cs rename to osu.Game/Tests/Visual/TestCaseGamefield.cs index 73c61f5669..af86b6ec06 100644 --- a/osu.Desktop.Tests/Visual/TestCaseGamefield.cs +++ b/osu.Game/Tests/Visual/TestCaseGamefield.cs @@ -1,60 +1,30 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System.Collections.Generic; -using osu.Desktop.Tests.Beatmaps; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.MathUtils; -using osu.Framework.Timing; -using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Rulesets; -using osu.Game.Rulesets.Catch; -using osu.Game.Rulesets.Catch.UI; -using osu.Game.Rulesets.Mania; -using osu.Game.Rulesets.Mania.UI; -using osu.Game.Rulesets.Objects; -using osu.Game.Rulesets.Osu; -using osu.Game.Rulesets.Osu.Objects; -using osu.Game.Rulesets.Osu.UI; -using osu.Game.Rulesets.Taiko; -using osu.Game.Rulesets.Taiko.UI; -using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseGamefield : OsuTestCase { - private RulesetStore rulesets; - public override string Description => @"Showing hitobjects and what not."; - [BackgroundDependencyLoader] - private void load(RulesetStore rulesets) - { - this.rulesets = rulesets; - } - protected override void LoadComplete() { base.LoadComplete(); - List objects = new List(); - - int time = 500; + /*int time = 500; for (int i = 0; i < 100; i++) { - objects.Add(new HitCircle - { - StartTime = time, - Position = new Vector2(RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.X), RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.Y)), - Scale = RNG.NextSingle(0.5f, 1.0f), - }); + objects.Add(new HitCircle + { + StartTime = time, + Position = new Vector2(RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.X), RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.Y)), + Scale = RNG.NextSingle(0.5f, 1.0f), + }); time += RNG.Next(50, 500); - } + }*/ var controlPointInfo = new ControlPointInfo(); controlPointInfo.TimingPoints.Add(new TimingControlPoint @@ -62,7 +32,7 @@ namespace osu.Desktop.Tests.Visual BeatLength = 200 }); - WorkingBeatmap beatmap = new TestWorkingBeatmap(new Beatmap + /*WorkingBeatmap beatmap = new TestWorkingBeatmap(new Beatmap { HitObjects = objects, BeatmapInfo = new BeatmapInfo @@ -114,7 +84,7 @@ namespace osu.Desktop.Tests.Visual } } } - }); + });*/ } } } diff --git a/osu.Desktop.Tests/Visual/TestCaseGraph.cs b/osu.Game/Tests/Visual/TestCaseGraph.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseGraph.cs rename to osu.Game/Tests/Visual/TestCaseGraph.cs index 13342d1ff1..714f284879 100644 --- a/osu.Desktop.Tests/Visual/TestCaseGraph.cs +++ b/osu.Game/Tests/Visual/TestCaseGraph.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseGraph : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseKeyConfiguration.cs b/osu.Game/Tests/Visual/TestCaseKeyConfiguration.cs similarity index 91% rename from osu.Desktop.Tests/Visual/TestCaseKeyConfiguration.cs rename to osu.Game/Tests/Visual/TestCaseKeyConfiguration.cs index cab285c72e..e473ce8778 100644 --- a/osu.Desktop.Tests/Visual/TestCaseKeyConfiguration.cs +++ b/osu.Game/Tests/Visual/TestCaseKeyConfiguration.cs @@ -3,7 +3,7 @@ using osu.Game.Overlays; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { public class TestCaseKeyConfiguration : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs b/osu.Game/Tests/Visual/TestCaseKeyCounter.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs rename to osu.Game/Tests/Visual/TestCaseKeyCounter.cs index ffe37c83a6..622fb15f4f 100644 --- a/osu.Desktop.Tests/Visual/TestCaseKeyCounter.cs +++ b/osu.Game/Tests/Visual/TestCaseKeyCounter.cs @@ -6,7 +6,7 @@ using osu.Framework.MathUtils; using osu.Game.Screens.Play; using OpenTK.Input; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseKeyCounter : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseLeaderboard.cs b/osu.Game/Tests/Visual/TestCaseLeaderboard.cs similarity index 85% rename from osu.Desktop.Tests/Visual/TestCaseLeaderboard.cs rename to osu.Game/Tests/Visual/TestCaseLeaderboard.cs index f67db2f41a..832003e6ab 100644 --- a/osu.Desktop.Tests/Visual/TestCaseLeaderboard.cs +++ b/osu.Game/Tests/Visual/TestCaseLeaderboard.cs @@ -1,15 +1,13 @@ // Copyright (c) 2007-2017 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.Rulesets.Mods; -using osu.Game.Rulesets.Osu.Mods; using osu.Game.Rulesets.Scoring; using osu.Game.Screens.Select.Leaderboards; using osu.Game.Users; +using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseLeaderboard : OsuTestCase { @@ -27,7 +25,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 1, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 6602580, @@ -45,7 +43,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 1, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 4608074, @@ -63,7 +61,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 1, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 1014222, @@ -81,7 +79,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 1, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 1541390, @@ -99,7 +97,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 1, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 2243452, @@ -117,7 +115,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 0.9826, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 2705430, @@ -135,7 +133,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 0.9654, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 7151382, @@ -153,7 +151,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 0.6025, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 2051389, @@ -171,7 +169,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 0.5140, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 6169483, @@ -189,7 +187,7 @@ namespace osu.Desktop.Tests.Visual Accuracy = 0.4222, MaxCombo = 244, TotalScore = 1707827, - Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, + //Mods = new Mod[] { new OsuModHidden(), new OsuModHardRock(), }, User = new User { Id = 6702666, diff --git a/osu.Desktop.Tests/Visual/TestCaseMedalOverlay.cs b/osu.Game/Tests/Visual/TestCaseMedalOverlay.cs similarity index 92% rename from osu.Desktop.Tests/Visual/TestCaseMedalOverlay.cs rename to osu.Game/Tests/Visual/TestCaseMedalOverlay.cs index 747f2190b0..fecf37538b 100644 --- a/osu.Desktop.Tests/Visual/TestCaseMedalOverlay.cs +++ b/osu.Game/Tests/Visual/TestCaseMedalOverlay.cs @@ -4,7 +4,7 @@ using osu.Game.Overlays; using osu.Game.Users; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseMedalOverlay : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseMenuButtonSystem.cs b/osu.Game/Tests/Visual/TestCaseMenuButtonSystem.cs similarity index 92% rename from osu.Desktop.Tests/Visual/TestCaseMenuButtonSystem.cs rename to osu.Game/Tests/Visual/TestCaseMenuButtonSystem.cs index 3c7ee343bb..0b50c9cf47 100644 --- a/osu.Desktop.Tests/Visual/TestCaseMenuButtonSystem.cs +++ b/osu.Game/Tests/Visual/TestCaseMenuButtonSystem.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics.Shapes; using osu.Game.Screens.Menu; using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseMenuButtonSystem : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseMenuOverlays.cs b/osu.Game/Tests/Visual/TestCaseMenuOverlays.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseMenuOverlays.cs rename to osu.Game/Tests/Visual/TestCaseMenuOverlays.cs index 1f4ad9d3da..e27de96bee 100644 --- a/osu.Desktop.Tests/Visual/TestCaseMenuOverlays.cs +++ b/osu.Game/Tests/Visual/TestCaseMenuOverlays.cs @@ -5,7 +5,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Logging; using osu.Game.Screens.Play; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseMenuOverlays : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseMods.cs b/osu.Game/Tests/Visual/TestCaseMods.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseMods.cs rename to osu.Game/Tests/Visual/TestCaseMods.cs index f48030067d..ef250edcc3 100644 --- a/osu.Desktop.Tests/Visual/TestCaseMods.cs +++ b/osu.Game/Tests/Visual/TestCaseMods.cs @@ -8,7 +8,7 @@ using osu.Game.Rulesets; using osu.Game.Screens.Play.HUD; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseMods : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseMusicController.cs b/osu.Game/Tests/Visual/TestCaseMusicController.cs similarity index 93% rename from osu.Desktop.Tests/Visual/TestCaseMusicController.cs rename to osu.Game/Tests/Visual/TestCaseMusicController.cs index 8d71527a21..323c32bf10 100644 --- a/osu.Desktop.Tests/Visual/TestCaseMusicController.cs +++ b/osu.Game/Tests/Visual/TestCaseMusicController.cs @@ -6,11 +6,10 @@ using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Timing; -using osu.Game; using osu.Game.Beatmaps; using osu.Game.Overlays; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseMusicController : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseNotificationOverlay.cs b/osu.Game/Tests/Visual/TestCaseNotificationOverlay.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCaseNotificationOverlay.cs rename to osu.Game/Tests/Visual/TestCaseNotificationOverlay.cs index 1e46fbda35..fead5c8b24 100644 --- a/osu.Desktop.Tests/Visual/TestCaseNotificationOverlay.cs +++ b/osu.Game/Tests/Visual/TestCaseNotificationOverlay.cs @@ -10,7 +10,7 @@ using osu.Framework.MathUtils; using osu.Game.Overlays; using osu.Game.Overlays.Notifications; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { [TestFixture] internal class TestCaseNotificationOverlay : OsuTestCase diff --git a/osu.Desktop.Tests/Visual/TestCaseOnScreenDisplay.cs b/osu.Game/Tests/Visual/TestCaseOnScreenDisplay.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseOnScreenDisplay.cs rename to osu.Game/Tests/Visual/TestCaseOnScreenDisplay.cs index 0b7a822e1d..8749d240f8 100644 --- a/osu.Desktop.Tests/Visual/TestCaseOnScreenDisplay.cs +++ b/osu.Game/Tests/Visual/TestCaseOnScreenDisplay.cs @@ -5,7 +5,7 @@ using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Game.Overlays; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseOnScreenDisplay : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCasePlaySongSelect.cs b/osu.Game/Tests/Visual/TestCasePlaySongSelect.cs similarity index 79% rename from osu.Desktop.Tests/Visual/TestCasePlaySongSelect.cs rename to osu.Game/Tests/Visual/TestCasePlaySongSelect.cs index 8d1ae7d913..feff7497d8 100644 --- a/osu.Desktop.Tests/Visual/TestCasePlaySongSelect.cs +++ b/osu.Game/Tests/Visual/TestCasePlaySongSelect.cs @@ -2,25 +2,34 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.Collections.Generic; -using osu.Desktop.Tests.Platform; +using osu.Framework.Allocation; using osu.Framework.MathUtils; using osu.Game.Beatmaps; using osu.Game.Database; +using osu.Game.IO; using osu.Game.Rulesets; using osu.Game.Screens.Select; using osu.Game.Screens.Select.Filter; +using osu.Game.Tests.Platform; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCasePlaySongSelect : OsuTestCase { - private readonly BeatmapManager manager; + private BeatmapManager manager; public override string Description => @"with fake data"; - private readonly RulesetStore rulesets; + private RulesetStore rulesets; - public TestCasePlaySongSelect() + private DependencyContainer dependencies; + + private FileStore files; + + protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) => dependencies = new DependencyContainer(parent); + + [BackgroundDependencyLoader] + private void load() { PlaySongSelect songSelect; @@ -31,8 +40,9 @@ namespace osu.Desktop.Tests.Visual var backingDatabase = storage.GetDatabase(@"client"); backingDatabase.CreateTable(); - rulesets = new RulesetStore(backingDatabase); - manager = new BeatmapManager(storage, null, backingDatabase, rulesets, null); + dependencies.Cache(rulesets = new RulesetStore(backingDatabase)); + dependencies.Cache(files = new FileStore(backingDatabase, storage)); + dependencies.Cache(manager = new BeatmapManager(storage, files, backingDatabase, rulesets, null)); for (int i = 0; i < 100; i += 10) manager.Import(createTestBeatmapSet(i)); diff --git a/osu.Desktop.Tests/Visual/TestCasePlayer.cs b/osu.Game/Tests/Visual/TestCasePlayer.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCasePlayer.cs rename to osu.Game/Tests/Visual/TestCasePlayer.cs index 03ee82dc73..4a25a52e36 100644 --- a/osu.Desktop.Tests/Visual/TestCasePlayer.cs +++ b/osu.Game/Tests/Visual/TestCasePlayer.cs @@ -1,22 +1,22 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using osu.Desktop.Tests.Beatmaps; +using System.IO; +using System.Linq; +using System.Text; using osu.Framework.Allocation; using osu.Framework.Graphics.Shapes; using osu.Game.Beatmaps; -using osu.Game.Rulesets; -using osu.Game.Screens.Play; -using OpenTK.Graphics; -using osu.Game.Rulesets.Mods; -using System.Linq; using osu.Game.Beatmaps.Formats; -using System.Text; -using System.IO; +using osu.Game.Rulesets; +using osu.Game.Rulesets.Mods; +using osu.Game.Screens.Play; +using osu.Game.Tests.Beatmaps; +using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { - internal class TestCasePlayer : OsuTestCase + public class TestCasePlayer : OsuTestCase { protected Player Player; private RulesetStore rulesets; @@ -45,7 +45,7 @@ namespace osu.Desktop.Tests.Visual loadPlayerFor(rulesets.Query().First()); } - private void loadPlayerFor(RulesetInfo r) + protected virtual Beatmap CreateBeatmap() { Beatmap beatmap; @@ -53,6 +53,13 @@ namespace osu.Desktop.Tests.Visual using (var reader = new StreamReader(stream)) beatmap = BeatmapDecoder.GetDecoder(reader).Decode(reader); + return beatmap; + } + + private void loadPlayerFor(RulesetInfo r) + { + var beatmap = CreateBeatmap(); + beatmap.BeatmapInfo.Ruleset = r; var instance = r.CreateInstance(); diff --git a/osu.Desktop.Tests/Visual/TestCaseReplay.cs b/osu.Game/Tests/Visual/TestCaseReplay.cs similarity index 92% rename from osu.Desktop.Tests/Visual/TestCaseReplay.cs rename to osu.Game/Tests/Visual/TestCaseReplay.cs index 50aefb7af7..2e56daccfc 100644 --- a/osu.Desktop.Tests/Visual/TestCaseReplay.cs +++ b/osu.Game/Tests/Visual/TestCaseReplay.cs @@ -1,12 +1,12 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System.Linq; using osu.Game.Beatmaps; using osu.Game.Rulesets; using osu.Game.Screens.Play; -using System.Linq; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseReplay : TestCasePlayer { diff --git a/osu.Desktop.Tests/Visual/TestCaseReplaySettingsOverlay.cs b/osu.Game/Tests/Visual/TestCaseReplaySettingsOverlay.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseReplaySettingsOverlay.cs rename to osu.Game/Tests/Visual/TestCaseReplaySettingsOverlay.cs index ab865dcab0..256c3d25c9 100644 --- a/osu.Desktop.Tests/Visual/TestCaseReplaySettingsOverlay.cs +++ b/osu.Game/Tests/Visual/TestCaseReplaySettingsOverlay.cs @@ -6,7 +6,7 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Play; using osu.Game.Screens.Play.ReplaySettings; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseReplaySettingsOverlay : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseResults.cs b/osu.Game/Tests/Visual/TestCaseResults.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseResults.cs rename to osu.Game/Tests/Visual/TestCaseResults.cs index a0622b302a..62154a535a 100644 --- a/osu.Desktop.Tests/Visual/TestCaseResults.cs +++ b/osu.Game/Tests/Visual/TestCaseResults.cs @@ -9,7 +9,7 @@ using osu.Game.Rulesets.Scoring; using osu.Game.Screens.Ranking; using osu.Game.Users; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseResults : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseRoomInspector.cs b/osu.Game/Tests/Visual/TestCaseRoomInspector.cs similarity index 97% rename from osu.Desktop.Tests/Visual/TestCaseRoomInspector.cs rename to osu.Game/Tests/Visual/TestCaseRoomInspector.cs index db557baed2..dd773b361a 100644 --- a/osu.Desktop.Tests/Visual/TestCaseRoomInspector.cs +++ b/osu.Game/Tests/Visual/TestCaseRoomInspector.cs @@ -9,7 +9,7 @@ using osu.Game.Rulesets; using osu.Game.Screens.Multiplayer; using osu.Game.Users; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseRoomInspector : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseScoreCounter.cs b/osu.Game/Tests/Visual/TestCaseScoreCounter.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCaseScoreCounter.cs rename to osu.Game/Tests/Visual/TestCaseScoreCounter.cs index ac96deb209..543ff12fcb 100644 --- a/osu.Desktop.Tests/Visual/TestCaseScoreCounter.cs +++ b/osu.Game/Tests/Visual/TestCaseScoreCounter.cs @@ -8,7 +8,7 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Play.HUD; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseScoreCounter : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseScrollingPlayfield.cs b/osu.Game/Tests/Visual/TestCaseScrollingPlayfield.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCaseScrollingPlayfield.cs rename to osu.Game/Tests/Visual/TestCaseScrollingPlayfield.cs index fc8f70b7ce..d0761e5841 100644 --- a/osu.Desktop.Tests/Visual/TestCaseScrollingPlayfield.cs +++ b/osu.Game/Tests/Visual/TestCaseScrollingPlayfield.cs @@ -4,8 +4,6 @@ using System; using System.Collections.Generic; using NUnit.Framework; -using OpenTK; -using osu.Desktop.Tests.Beatmaps; using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -14,15 +12,16 @@ using osu.Framework.Input; using osu.Framework.Timing; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; -using osu.Game.Rulesets.Beatmaps; using osu.Game.Rulesets.Judgements; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Timing; using osu.Game.Rulesets.UI; +using osu.Game.Tests.Beatmaps; +using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { /// /// The most minimal implementation of a playfield with scrolling hit objects. diff --git a/osu.Desktop.Tests/Visual/TestCaseSettings.cs b/osu.Game/Tests/Visual/TestCaseSettings.cs similarity index 91% rename from osu.Desktop.Tests/Visual/TestCaseSettings.cs rename to osu.Game/Tests/Visual/TestCaseSettings.cs index 1f4b88e9e3..dfc0b66e21 100644 --- a/osu.Desktop.Tests/Visual/TestCaseSettings.cs +++ b/osu.Game/Tests/Visual/TestCaseSettings.cs @@ -3,7 +3,7 @@ using osu.Game.Overlays; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseSettings : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseSkipButton.cs b/osu.Game/Tests/Visual/TestCaseSkipButton.cs similarity index 90% rename from osu.Desktop.Tests/Visual/TestCaseSkipButton.cs rename to osu.Game/Tests/Visual/TestCaseSkipButton.cs index 0e73314850..49be015adf 100644 --- a/osu.Desktop.Tests/Visual/TestCaseSkipButton.cs +++ b/osu.Game/Tests/Visual/TestCaseSkipButton.cs @@ -3,7 +3,7 @@ using osu.Game.Screens.Play; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseSkipButton : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseSocial.cs b/osu.Game/Tests/Visual/TestCaseSocial.cs similarity index 96% rename from osu.Desktop.Tests/Visual/TestCaseSocial.cs rename to osu.Game/Tests/Visual/TestCaseSocial.cs index da60c82cea..4f90e4ceff 100644 --- a/osu.Desktop.Tests/Visual/TestCaseSocial.cs +++ b/osu.Game/Tests/Visual/TestCaseSocial.cs @@ -4,7 +4,7 @@ using osu.Game.Overlays; using osu.Game.Users; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { public class TestCaseSocial : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseSongProgress.cs b/osu.Game/Tests/Visual/TestCaseSongProgress.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseSongProgress.cs rename to osu.Game/Tests/Visual/TestCaseSongProgress.cs index fceb773ae6..96ff76e9c6 100644 --- a/osu.Desktop.Tests/Visual/TestCaseSongProgress.cs +++ b/osu.Game/Tests/Visual/TestCaseSongProgress.cs @@ -8,7 +8,7 @@ using osu.Framework.Timing; using osu.Game.Rulesets.Objects; using osu.Game.Screens.Play; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseSongProgress : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseStoryboard.cs b/osu.Game/Tests/Visual/TestCaseStoryboard.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseStoryboard.cs rename to osu.Game/Tests/Visual/TestCaseStoryboard.cs index 878198e8d2..f7ac58c632 100644 --- a/osu.Desktop.Tests/Visual/TestCaseStoryboard.cs +++ b/osu.Game/Tests/Visual/TestCaseStoryboard.cs @@ -1,19 +1,18 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Timing; -using osu.Game; using osu.Game.Beatmaps; using osu.Game.Overlays; using osu.Game.Storyboards.Drawables; +using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseStoryboard : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseTabControl.cs b/osu.Game/Tests/Visual/TestCaseTabControl.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseTabControl.cs rename to osu.Game/Tests/Visual/TestCaseTabControl.cs index 4bdea2615d..6db74f2cfb 100644 --- a/osu.Desktop.Tests/Visual/TestCaseTabControl.cs +++ b/osu.Game/Tests/Visual/TestCaseTabControl.cs @@ -7,7 +7,7 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Screens.Select.Filter; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { public class TestCaseTabControl : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseTextAwesome.cs b/osu.Game/Tests/Visual/TestCaseTextAwesome.cs similarity index 94% rename from osu.Desktop.Tests/Visual/TestCaseTextAwesome.cs rename to osu.Game/Tests/Visual/TestCaseTextAwesome.cs index b98c0f700d..32934d3c5e 100644 --- a/osu.Desktop.Tests/Visual/TestCaseTextAwesome.cs +++ b/osu.Game/Tests/Visual/TestCaseTextAwesome.cs @@ -9,7 +9,7 @@ using osu.Game.Graphics; using OpenTK; using OpenTK.Graphics; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseTextAwesome : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseTwoLayerButton.cs b/osu.Game/Tests/Visual/TestCaseTwoLayerButton.cs similarity index 89% rename from osu.Desktop.Tests/Visual/TestCaseTwoLayerButton.cs rename to osu.Game/Tests/Visual/TestCaseTwoLayerButton.cs index ac641d75a2..83e0e4b442 100644 --- a/osu.Desktop.Tests/Visual/TestCaseTwoLayerButton.cs +++ b/osu.Game/Tests/Visual/TestCaseTwoLayerButton.cs @@ -3,7 +3,7 @@ using osu.Game.Graphics.UserInterface; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseTwoLayerButton : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseUserPanel.cs b/osu.Game/Tests/Visual/TestCaseUserPanel.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseUserPanel.cs rename to osu.Game/Tests/Visual/TestCaseUserPanel.cs index b42fd3136d..60932f8424 100644 --- a/osu.Desktop.Tests/Visual/TestCaseUserPanel.cs +++ b/osu.Game/Tests/Visual/TestCaseUserPanel.cs @@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers; using osu.Game.Users; using OpenTK; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseUserPanel : OsuTestCase { diff --git a/osu.Desktop.Tests/Visual/TestCaseUserProfile.cs b/osu.Game/Tests/Visual/TestCaseUserProfile.cs similarity index 95% rename from osu.Desktop.Tests/Visual/TestCaseUserProfile.cs rename to osu.Game/Tests/Visual/TestCaseUserProfile.cs index a94177c1b6..f5fced2915 100644 --- a/osu.Desktop.Tests/Visual/TestCaseUserProfile.cs +++ b/osu.Game/Tests/Visual/TestCaseUserProfile.cs @@ -6,7 +6,7 @@ using System.Linq; using osu.Game.Overlays; using osu.Game.Users; -namespace osu.Desktop.Tests.Visual +namespace osu.Game.Tests.Visual { internal class TestCaseUserProfile : OsuTestCase { diff --git a/osu.Game/app.config b/osu.Game/app.config index faeaf001de..a704cc3750 100644 --- a/osu.Game/app.config +++ b/osu.Game/app.config @@ -2,6 +2,10 @@ + + + + diff --git a/osu.Desktop/lazer.ico b/osu.Game/lazer.ico similarity index 100% rename from osu.Desktop/lazer.ico rename to osu.Game/lazer.ico diff --git a/osu.Desktop/osu!.res b/osu.Game/osu!.res similarity index 100% rename from osu.Desktop/osu!.res rename to osu.Game/osu!.res diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 92bcaf90f0..2d286fe1b8 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -1,17 +1,47 @@  - - + + {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D} Debug AnyCPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} - Library + WinExe Properties osu.Game - osu.Game + osu! + 3CF060CD28877D0E3112948951A64B2A7CEEC909 + codesigning.pfx + false + false + false + + + 3.5 + + + osu.Game.Program + OnOutputUpdated + false + LocalIntranet v4.6.1 - 512 - + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 2 + 1.0.0.%2a + false + true + 12.0.0 + 2.0 + + @@ -20,26 +50,110 @@ full false bin\Debug\ - DEBUG;TRACE + TRACE;DEBUG prompt - 4 + 0 + true + false + AnyCPU + true + AllRules.ruleset + false + false false + + 6 - pdbonly + none true bin\Release\ - TRACE + + prompt 4 + true + false + AnyCPU + true + AllRules.ruleset + false false + + + + + + lazer.ico + + + Properties\app.manifest + + + true + bin\Debug\ + TRACE;DEBUG + true + 0 + true + full + AnyCPU + false + 6 + prompt + AllRules.ruleset + --tests + false + + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll + True + + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.MsDelta.dll + True + + + $(SolutionDir)\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll + True + + + $(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll + True + + + + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll + True + + + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Mdb.dll + True + + + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Pdb.dll + True + + + $(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.Rocks.dll + True + + $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll True + + $(SolutionDir)\packages\squirrel.windows.1.7.8\lib\Net45\NuGet.Squirrel.dll + True + + + $(SolutionDir)\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll + True + $(SolutionDir)\packages\OpenTK.3.0.0-git00009\lib\net20\OpenTK.dll True @@ -48,6 +162,10 @@ $(SolutionDir)\packages\SharpCompress.0.18.1\lib\net45\SharpCompress.dll True + + $(SolutionDir)\packages\Splat.2.0.0\lib\Net45\Splat.dll + True + $(SolutionDir)\packages\SQLite.Net.Core-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll True @@ -60,504 +178,55 @@ $(SolutionDir)\packages\SQLite.Net-PCL.3.1.1\lib\net4\SQLite.Net.Platform.Win32.dll True - - - - - $(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll - - + $(SolutionDir)\packages\SQLiteNetExtensions.1.3.0\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\SQLiteNetExtensions.dll + True + + $(SolutionDir)\packages\squirrel.windows.1.7.8\lib\Net45\Squirrel.dll + True + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + osu.licenseheader + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + @@ -570,14 +239,545 @@ - - osu.licenseheader - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/osu.Desktop/osu.nuspec b/osu.Game/osu.nuspec similarity index 100% rename from osu.Desktop/osu.nuspec rename to osu.Game/osu.nuspec diff --git a/osu.Game/packages.config b/osu.Game/packages.config index 292ba22c06..a75b516ab9 100644 --- a/osu.Game/packages.config +++ b/osu.Game/packages.config @@ -4,11 +4,16 @@ Copyright (c) 2007-2017 ppy Pty Ltd . Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE --> - + + + + - - - + + + + + \ No newline at end of file diff --git a/osu.sln b/osu.sln index 3799c890b9..ccef0c370c 100644 --- a/osu.sln +++ b/osu.sln @@ -1,24 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop", "osu.Desktop\osu.Desktop.csproj", "{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{0D37A2AD-80A4-464F-A1DE-1560B70F1CE3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game", "osu.Game\osu.Game.csproj", "{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Framework", "osu-framework\osu.Framework\osu.Framework.csproj", "{C76BF5B3-985E-4D39-95FE-97C9C879B83A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game", "osu.Game\osu.Game.csproj", "{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Resources", "osu-resources\osu.Game.Resources\osu.Game.Resources.csproj", "{D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Framework", "Framework", "{7A75DFA2-DE65-4458-98AF-26AF96FFD6DC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Framework.Desktop", "osu-framework\osu.Framework.Desktop\osu.Framework.Desktop.csproj", "{65DC628F-A640-4111-AB35-3A5652BC1E17}" -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.Rulesets.Osu", "osu.Game.Rulesets.Osu\osu.Game.Rulesets.Osu.csproj", "{C92A607B-1FDD-4954-9F92-03FF547D9080}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Rulesets.Catch", "osu.Game.Rulesets.Catch\osu.Game.Rulesets.Catch.csproj", "{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}" @@ -27,16 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Rulesets.Taiko", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Game.Rulesets.Mania", "osu.Game.Rulesets.Mania\osu.Game.Rulesets.Mania.csproj", "{48F4582B-7687-4621-9CBE-5C24197CB536}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.Tests", "osu.Desktop.Tests\osu.Desktop.Tests.csproj", "{230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Desktop.Deploy", "osu.Desktop.Deploy\osu.Desktop.Deploy.csproj", "{BAEA2F74-0315-4667-84E0-ACAC0B4BF785}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{6EAD7610-89D8-48A2-8BE0-E348297E4D8B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{80683232-505E-41EA-A37C-2CFCF1C88C57}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu.Framework.Testing", "osu-framework\osu.Framework.Testing\osu.Framework.Testing.csproj", "{007B2356-AB6F-4BD9-96D5-116FC2DCE69A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -56,30 +38,12 @@ Global {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.Release|Any CPU.Build.0 = Release|Any CPU {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU {C76BF5B3-985E-4D39-95FE-97C9C879B83A}.VisualTests|Any CPU.Build.0 = Debug|Any CPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.Release|Any CPU.Build.0 = Release|Any CPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Release|Any CPU.ActiveCfg = Release|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.Release|Any CPU.Build.0 = Release|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58}.VisualTests|Any CPU.Build.0 = Debug|Any CPU - {65DC628F-A640-4111-AB35-3A5652BC1E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65DC628F-A640-4111-AB35-3A5652BC1E17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65DC628F-A640-4111-AB35-3A5652BC1E17}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65DC628F-A640-4111-AB35-3A5652BC1E17}.Release|Any CPU.Build.0 = Release|Any CPU - {65DC628F-A640-4111-AB35-3A5652BC1E17}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU - {65DC628F-A640-4111-AB35-3A5652BC1E17}.VisualTests|Any CPU.Build.0 = Debug|Any CPU - {54377672-20B1-40AF-8087-5CF73BF3953A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {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 - {54377672-20B1-40AF-8087-5CF73BF3953A}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU - {54377672-20B1-40AF-8087-5CF73BF3953A}.VisualTests|Any CPU.Build.0 = Debug|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 @@ -104,40 +68,13 @@ Global {48F4582B-7687-4621-9CBE-5C24197CB536}.Release|Any CPU.Build.0 = Release|Any CPU {48F4582B-7687-4621-9CBE-5C24197CB536}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU {48F4582B-7687-4621-9CBE-5C24197CB536}.VisualTests|Any CPU.Build.0 = Debug|Any CPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.Release|Any CPU.Build.0 = Release|Any CPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D}.VisualTests|Any CPU.Build.0 = Debug|Any CPU {BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.Release|Any CPU.ActiveCfg = Release|Any CPU {BAEA2F74-0315-4667-84E0-ACAC0B4BF785}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.Release|Any CPU.Build.0 = Release|Any CPU - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.VisualTests|Any CPU.ActiveCfg = Debug|Any CPU - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A}.VisualTests|Any CPU.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {2A66DD92-ADB1-4994-89E2-C94E04ACDA0D} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} - {C76BF5B3-985E-4D39-95FE-97C9C879B83A} = {7A75DFA2-DE65-4458-98AF-26AF96FFD6DC} - {0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} - {D9A367C9-4C1A-489F-9B05-A0CEA2B53B58} = {0D37A2AD-80A4-464F-A1DE-1560B70F1CE3} - {65DC628F-A640-4111-AB35-3A5652BC1E17} = {7A75DFA2-DE65-4458-98AF-26AF96FFD6DC} - {54377672-20B1-40AF-8087-5CF73BF3953A} = {80683232-505E-41EA-A37C-2CFCF1C88C57} - {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} - {230AC4F3-7783-49FB-9AEC-B83CDA3B9F3D} = {80683232-505E-41EA-A37C-2CFCF1C88C57} - {BAEA2F74-0315-4667-84E0-ACAC0B4BF785} = {6EAD7610-89D8-48A2-8BE0-E348297E4D8B} - {007B2356-AB6F-4BD9-96D5-116FC2DCE69A} = {7A75DFA2-DE65-4458-98AF-26AF96FFD6DC} - EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.TextStylePolicy = $1