1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 17:53:15 +08:00

Merge branch 'refs/heads/master' into better-anchors

# Conflicts:
#	osu.Game.Mode.Osu/UI/OsuComboCounter.cs
#	osu.Game.Mode.Osu/UI/OsuScoreOverlay.cs
This commit is contained in:
Dean Herbert 2016-11-15 14:33:13 +09:00
commit abdfe42388
130 changed files with 1313 additions and 719 deletions

@ -1 +1 @@
Subproject commit cf7dd12f24d0b60bae2a4ebaa6ef0eaa67b0fd52 Subproject commit e5ad12e4aff8b638ee9d7b8a5542a85fab054ffa

View File

@ -1,13 +1,11 @@
using System; using osu.Framework;
using System.IO;
using osu.Framework;
using osu.Framework.Desktop.Platform; using osu.Framework.Desktop.Platform;
using SQLite.Net; using SQLite.Net;
using SQLite.Net.Platform.Generic;
using SQLite.Net.Interop; using SQLite.Net.Interop;
using SQLite.Net.Platform.Win32; using SQLite.Net.Platform.Generic;
using SQLite.Net.Platform.Win32;
namespace osu.Desktop.Platform
namespace osu.Desktop.VisualTests.Platform
{ {
public class TestStorage : DesktopStorage public class TestStorage : DesktopStorage
{ {

View File

@ -7,12 +7,16 @@ using osu.Framework.Graphics;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Objects; using osu.Game.Modes.Catch;
using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Modes.Catch.UI;
using osu.Game.GameModes.Play.Catch; using osu.Game.Modes.Mania;
using osu.Game.GameModes.Play.Mania; using osu.Game.Modes.Mania.UI;
using osu.Game.GameModes.Play.Osu; using osu.Game.Modes.Objects;
using osu.Game.GameModes.Play.Taiko; using osu.Game.Modes.Osu;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.Taiko;
using osu.Game.Modes.Taiko.UI;
using OpenTK; using OpenTK;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests

View File

@ -5,11 +5,12 @@ using osu.Framework;
using osu.Framework.GameModes.Testing; using osu.Framework.GameModes.Testing;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps.Objects;
using osu.Game.Beatmaps.Objects.Osu;
using osu.Game.Beatmaps.Objects.Osu.Drawable;
using OpenTK; using OpenTK;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.Objects.Drawables;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {

View File

@ -2,7 +2,7 @@
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.GameModes.Testing; using osu.Framework.GameModes.Testing;
using osu.Game.GameModes.Menu; using osu.Game.Screens.Menu;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {

View File

@ -1,19 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.GameModes.Testing; using osu.Framework.GameModes.Testing;
using osu.Game.Overlays; using osu.Framework.Graphics;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Framework; using osu.Game.Overlays;
namespace osu.Desktop.Tests namespace osu.Desktop.VisualTests.Tests
{ {
class TestCaseMusicController : TestCase class TestCaseMusicController : TestCase
{ {

View File

@ -1,16 +1,14 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.GameModes.Testing;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Desktop.Platform; using osu.Desktop.VisualTests.Platform;
using osu.Framework.GameModes.Testing;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using SQLiteNetExtensions.Extensions; using osu.Game.Screens.Play;
using osu.Framework;
using osu.Game;
namespace osu.Desktop.Tests namespace osu.Desktop.VisualTests.Tests
{ {
class TestCasePlaySongSelect : TestCase class TestCasePlaySongSelect : TestCase
{ {

View File

@ -7,12 +7,12 @@ using osu.Framework.MathUtils;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Formats;
using osu.Game.Beatmaps.Objects;
using osu.Game.Beatmaps.Objects.Osu;
using osu.Game.GameModes.Play;
using OpenTK; using OpenTK;
using osu.Framework; using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Screens.Play;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {

View File

@ -6,12 +6,18 @@ using osu.Framework.GameModes.Testing;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.GameModes.Play;
using osu.Game.GameModes.Play.Catch;
using osu.Game.GameModes.Play.Mania;
using osu.Game.GameModes.Play.Osu;
using osu.Game.GameModes.Play.Taiko;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Catch.UI;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Mania.UI;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.Taiko;
using osu.Game.Modes.Taiko.UI;
using osu.Game.Modes.UI;
using osu.Game.Screens.Play;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;

View File

@ -10,9 +10,7 @@ using osu.Framework.Desktop.Platform;
using System.Reflection; using System.Reflection;
using System.IO; using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.GameModes.Play;
using SQLiteNetExtensions.Extensions; using SQLiteNetExtensions.Extensions;
using osu.Desktop.Platform;
using osu.Framework.Allocation; using osu.Framework.Allocation;
namespace osu.Desktop.VisualTests namespace osu.Desktop.VisualTests

View File

@ -150,6 +150,22 @@
<Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project> <Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project>
<Name>osu.Game.Resources</Name> <Name>osu.Game.Resources</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj">
<Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj">
<Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project>
<Name>osu.Game.Modes.Catch</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj">
<Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project>
<Name>osu.Game.Modes.Mania</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj">
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Modes.Taiko</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project> <Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>
<Name>osu.Game</Name> <Name>osu.Game</Name>
@ -158,9 +174,9 @@
<ItemGroup> <ItemGroup>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Tests\TestCaseChatDisplay.cs" /> <Compile Include="Tests\TestCaseChatDisplay.cs" />
<Compile Include="Tests\TestCaseGamefield.cs" />
<Compile Include="Tests\TestCaseMusicController.cs" /> <Compile Include="Tests\TestCaseMusicController.cs" />
<Compile Include="Tests\TestCasePlayer.cs" /> <Compile Include="Tests\TestCasePlayer.cs" />
<Compile Include="Tests\TestCaseGamefield.cs" />
<Compile Include="Tests\TestCaseHitObjects.cs" /> <Compile Include="Tests\TestCaseHitObjects.cs" />
<Compile Include="Tests\TestCaseKeyCounter.cs" /> <Compile Include="Tests\TestCaseKeyCounter.cs" />
<Compile Include="Tests\TestCaseMenuButtonSystem.cs" /> <Compile Include="Tests\TestCaseMenuButtonSystem.cs" />
@ -172,9 +188,7 @@
<Compile Include="Tests\TestCaseOptions.cs" /> <Compile Include="Tests\TestCaseOptions.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup />
<Folder Include="Platform\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
@ -195,4 +209,4 @@
<PostBuildEvent> <PostBuildEvent>
</PostBuildEvent> </PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -10,6 +10,11 @@ using osu.Framework.Desktop.Platform;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game; using osu.Game;
using osu.Game.IPC; using osu.Game.IPC;
using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Taiko;
namespace osu.Desktop namespace osu.Desktop
{ {
@ -31,6 +36,11 @@ namespace osu.Desktop
} }
else else
{ {
Ruleset.Register(new OsuRuleset());
Ruleset.Register(new TaikoRuleset());
Ruleset.Register(new ManiaRuleset());
Ruleset.Register(new CatchRuleset());
BaseGame osu = new OsuGame(args); BaseGame osu = new OsuGame(args);
host.Add(osu); host.Add(osu);
host.Run(); host.Run();

View File

@ -59,7 +59,8 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>false</RunCodeAnalysis> <RunCodeAnalysis>false</RunCodeAnalysis>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<Commandlineparameters></Commandlineparameters> <Commandlineparameters>
</Commandlineparameters>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType> <DebugType>none</DebugType>
@ -129,6 +130,22 @@
<Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project> <Project>{d9a367c9-4c1a-489f-9b05-a0cea2b53b58}</Project>
<Name>osu.Game.Resources</Name> <Name>osu.Game.Resources</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj">
<Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj">
<Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project>
<Name>osu.Game.Modes.Catch</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj">
<Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project>
<Name>osu.Game.Modes.Mania</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj">
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Modes.Taiko</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project> <Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>
<Name>osu.Game</Name> <Name>osu.Game</Name>
@ -139,10 +156,7 @@
<Compile Include="Beatmaps\IO\LegacyFilesystemReader.cs" /> <Compile Include="Beatmaps\IO\LegacyFilesystemReader.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup />
<Folder Include="Beatmaps\" />
<Folder Include="Beatmaps\IO\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -3,6 +3,7 @@
using System; using System;
using osu.Framework; using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
@ -10,10 +11,11 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables;
using OpenTK; using OpenTK;
using osu.Framework.Allocation;
namespace osu.Game.Beatmaps.Objects.Osu.Drawable namespace osu.Game.Modes.Osu.Objects.Drawables
{ {
public class DrawableCircle : DrawableHitObject public class DrawableCircle : DrawableHitObject
{ {
@ -34,7 +36,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
RelativePositionAxes = Axes.Both; RelativePositionAxes = Axes.Both;
Position = new Vector2(h.Position.X / 512, h.Position.Y / 384); Position = new Vector2(h.Position.X / 512, h.Position.Y / 384);
Children = new Framework.Graphics.Drawable[] Children = new Drawable[]
{ {
glow = new GlowLayer glow = new GlowLayer
{ {
@ -193,7 +195,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
Children = new Framework.Graphics.Drawable[] Children = new Drawable[]
{ {
ring = new Sprite ring = new Sprite
{ {
@ -225,7 +227,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
BlendingMode = BlendingMode.Additive; BlendingMode = BlendingMode.Additive;
Alpha = 0; Alpha = 0;
Children = new Framework.Graphics.Drawable[] Children = new Drawable[]
{ {
new Box new Box
{ {
@ -247,7 +249,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
BlendingMode = BlendingMode.Additive; BlendingMode = BlendingMode.Additive;
Alpha = 0; Alpha = 0;
Children = new Framework.Graphics.Drawable[] Children = new Drawable[]
{ {
new Triangles new Triangles
{ {
@ -274,7 +276,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
Children = new Framework.Graphics.Drawable[] Children = new Drawable[]
{ {
disc = new Sprite disc = new Sprite
{ {
@ -329,7 +331,7 @@ namespace osu.Game.Beatmaps.Objects.Osu.Drawable
{ {
base.Update(); base.Update();
foreach (Framework.Graphics.Drawable d in Children) foreach (Drawable d in Children)
d.Position -= new Vector2(0, (float)(d.Scale.X * (Time.Elapsed / 2880))); d.Position -= new Vector2(0, (float)(d.Scale.X * (Time.Elapsed / 2880)));
} }
} }

View File

@ -1,9 +1,7 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics; namespace osu.Game.Modes.Osu.Objects
namespace osu.Game.Beatmaps.Objects.Osu
{ {
public class Circle : OsuBaseHit public class Circle : OsuBaseHit
{ {

View File

@ -0,0 +1,29 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Beatmaps.Samples;
using osu.Game.Modes.Objects;
using OpenTK;
namespace osu.Game.Modes.Osu.Objects
{
public abstract class OsuBaseHit : HitObject
{
public Vector2 Position { get; set; }
[Flags]
internal enum HitObjectType
{
Circle = 1,
Slider = 2,
NewCombo = 4,
CircleNewCombo = 5,
SliderNewCombo = 6,
Spinner = 8,
ColourHax = 122,
Hold = 128,
ManiaLong = 128,
}
}
}

View File

@ -1,12 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.Modes.Objects;
namespace osu.Game.Beatmaps.Objects.Osu namespace osu.Game.Modes.Osu.Objects
{ {
class OsuConverter : HitObjectConverter<OsuBaseHit> public class OsuConverter : HitObjectConverter<OsuBaseHit>
{ {
public override List<OsuBaseHit> Convert(List<HitObject> input) public override List<OsuBaseHit> Convert(List<HitObject> input)
{ {

View File

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Samples;
using osu.Game.Modes.Objects;
using OpenTK;
namespace osu.Game.Modes.Osu.Objects
{
public class OsuHitObjectParser : HitObjectParser
{
public override HitObject Parse(string text)
{
string[] split = text.Split(',');
var type = (OsuBaseHit.HitObjectType)int.Parse(split[3]);
bool combo = type.HasFlag(OsuBaseHit.HitObjectType.NewCombo);
type &= (OsuBaseHit.HitObjectType)0xF;
type &= ~OsuBaseHit.HitObjectType.NewCombo;
OsuBaseHit result;
switch (type)
{
case OsuBaseHit.HitObjectType.Circle:
result = new Circle();
break;
case OsuBaseHit.HitObjectType.Slider:
result = new Slider();
break;
case OsuBaseHit.HitObjectType.Spinner:
result = new Spinner();
break;
default:
//throw new InvalidOperationException($@"Unknown hit object type {type}");
return null;
}
result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
result.StartTime = double.Parse(split[2]);
result.Sample = new HitSampleInfo { Type = (SampleType)int.Parse(split[4]) };
result.NewCombo = combo;
// TODO: "addition" field
return result;
}
}
}

View File

@ -4,7 +4,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenTK; using OpenTK;
namespace osu.Game.Beatmaps.Objects.Osu namespace osu.Game.Modes.Osu.Objects
{ {
public class Slider : OsuBaseHit public class Slider : OsuBaseHit
{ {

View File

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

View File

@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,22 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI;
namespace osu.Game.Modes.Osu
{
public class OsuRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new OsuHitRenderer { Objects = objects };
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
protected override PlayMode PlayMode => PlayMode.Osu;
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Mode.Osu")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu.Game.Mode.Osu")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c92a607b-1fdd-4954-9f92-03ff547d9080")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,17 +1,11 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.UI;
using OpenTK; using OpenTK;
using osu.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
namespace osu.Game.GameModes.Play.Osu namespace osu.Game.Modes.Osu.UI
{ {
/// <summary> /// <summary>
/// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard. /// Uses the 'x' symbol and has a pop-out effect while rolling over. Used in osu! standard.

View File

@ -1,12 +1,15 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics; using osu.Game.Modes.Objects;
using osu.Game.Beatmaps.Objects; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Modes.UI;
using osu.Game.Beatmaps.Objects.Osu.Drawable; using Circle = osu.Game.Modes.Osu.Objects.Circle;
using DrawableCircle = osu.Game.Modes.Osu.Objects.Drawables.DrawableCircle;
using OsuBaseHit = osu.Game.Modes.Osu.Objects.OsuBaseHit;
using OsuConverter = osu.Game.Modes.Osu.Objects.OsuConverter;
namespace osu.Game.GameModes.Play.Osu namespace osu.Game.Modes.Osu.UI
{ {
public class OsuHitRenderer : HitRenderer<OsuBaseHit> public class OsuHitRenderer : HitRenderer<OsuBaseHit>
{ {

View File

@ -3,12 +3,12 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using OpenTK;
using osu.Framework;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.UI;
using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.GameModes.Play.Osu namespace osu.Game.Modes.Osu.UI
{ {
public class OsuPlayfield : Playfield public class OsuPlayfield : Playfield
{ {

View File

@ -1,21 +1,16 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Modes.UI;
using OpenTK; using OpenTK;
using OpenTK.Input; using OpenTK.Input;
using osu.Game.Beatmaps.Objects;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
namespace osu.Game.GameModes.Play.Osu namespace osu.Game.Modes.Osu.UI
{ {
class ScoreOverlayOsu : ScoreOverlay public class OsuScoreOverlay : ScoreOverlay
{ {
protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter() protected override PercentageCounter CreateAccuracyCounter() => new PercentageCounter()
{ {
@ -45,12 +40,12 @@ namespace osu.Game.GameModes.Play.Osu
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Margin = new MarginPadding(10), Margin = new MarginPadding(10),
Counters = new KeyCounter[] Counters = new KeyCounter[]
{ {
new KeyCounterKeyboard(@"Z", Key.Z), new KeyCounterKeyboard(@"Z", Key.Z),
new KeyCounterKeyboard(@"X", Key.X), new KeyCounterKeyboard(@"X", Key.X),
new KeyCounterMouse(@"M1", MouseButton.Left), new KeyCounterMouse(@"M1", MouseButton.Left),
new KeyCounterMouse(@"M2", MouseButton.Right), new KeyCounterMouse(@"M2", MouseButton.Right),
} }
}; };
} }
} }

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C92A607B-1FDD-4954-9F92-03FF547D9080}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Osu</RootNamespace>
<AssemblyName>osu.Game.Modes.Osu</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Objects\OsuHitObjectParser.cs" />
<Compile Include="UI\OsuComboCounter.cs" />
<Compile Include="UI\OsuHitRenderer.cs" />
<Compile Include="UI\OsuPlayfield.cs" />
<Compile Include="OsuRuleset.cs" />
<Compile Include="Objects\HitCircle.cs" />
<Compile Include="Objects\Drawables\DrawableHitCircle.cs" />
<Compile Include="Objects\OsuBaseHit.cs" />
<Compile Include="Objects\OsuConverter.cs" />
<Compile Include="Objects\Slider.cs" />
<Compile Include="Objects\Spinner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\OsuScoreOverlay.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
<Name>osu.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0d3fbf8a-7464-4cf7-8c90-3e7886df2d4d}</Project>
<Name>osu.Game</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net452" />
</packages>

View File

@ -0,0 +1,23 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Modes.Catch.UI;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI;
namespace osu.Game.Modes.Catch
{
public class CatchRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new CatchHitRenderer { Objects = objects };
protected override PlayMode PlayMode => PlayMode.Catch;
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
}
}

View File

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

View File

@ -1,15 +1,11 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using osu.Game.Modes.Objects;
using System.Text; using osu.Game.Modes.Osu.Objects;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Objects.Catch;
using osu.Game.Beatmaps.Objects.Osu;
namespace osu.Game.Beatmaps.Objects.Catch namespace osu.Game.Modes.Catch.Objects
{ {
class CatchConverter : HitObjectConverter<CatchBaseHit> class CatchConverter : HitObjectConverter<CatchBaseHit>
{ {

View File

@ -1,20 +1,14 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using osu.Framework.Allocation;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using OpenTK; using OpenTK;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Beatmaps.Objects.Catch.Drawable namespace osu.Game.Modes.Catch.Objects.Drawable
{ {
class DrawableFruit : Sprite class DrawableFruit : Sprite
{ {

View File

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

View File

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

View File

@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Catch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu.Game.Modes.Catch")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("58f6c80c-1253-4a0e-a465-b8c85ebeadf3")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,15 +1,10 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Osu.UI;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.GameModes.Play.Osu;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace osu.Game.GameModes.Play.Catch namespace osu.Game.Modes.Catch.UI
{ {
/// <summary> /// <summary>
/// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch. /// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch.

View File

@ -1,12 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics; using osu.Game.Modes.Catch.Objects;
using osu.Game.Beatmaps.Objects; using osu.Game.Modes.Objects;
using osu.Game.Beatmaps.Objects.Catch; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Beatmaps.Objects.Catch.Drawable; using osu.Game.Modes.UI;
namespace osu.Game.GameModes.Play.Catch namespace osu.Game.Modes.Catch.UI
{ {
public class CatchHitRenderer : HitRenderer<CatchBaseHit> public class CatchHitRenderer : HitRenderer<CatchBaseHit>
{ {

View File

@ -2,14 +2,11 @@
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.UI;
using OpenTK; using OpenTK;
using OpenTK.Graphics;
using osu.Framework;
using osu.Framework.Allocation;
namespace osu.Game.GameModes.Play.Catch namespace osu.Game.Modes.Catch.UI
{ {
public class CatchPlayfield : Playfield public class CatchPlayfield : Playfield
{ {

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{58F6C80C-1253-4A0E-A465-B8C85EBEADF3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Catch</RootNamespace>
<AssemblyName>osu.Game.Modes.Catch</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Objects\CatchBaseHit.cs" />
<Compile Include="Objects\CatchConverter.cs" />
<Compile Include="Objects\Drawable\DrawableFruit.cs" />
<Compile Include="Objects\Droplet.cs" />
<Compile Include="Objects\Fruit.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\CatchComboCounter.cs" />
<Compile Include="UI\CatchHitRenderer.cs" />
<Compile Include="UI\CatchPlayfield.cs" />
<Compile Include="CatchRuleset.cs" />
</ItemGroup>
<ItemGroup>
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
<Name>osu.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj">
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
<Name>osu.Game</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
</packages>

View File

@ -0,0 +1,24 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Modes.Mania.UI;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI;
namespace osu.Game.Modes.Mania
{
public class ManiaRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new ManiaHitRenderer { Objects = objects };
protected override PlayMode PlayMode => PlayMode.Mania;
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
}
}

View File

@ -1,15 +1,14 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations;
using OpenTK;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transformations;
using osu.Framework.Graphics;
using OpenTK;
namespace osu.Game.Beatmaps.Objects.Mania.Drawable namespace osu.Game.Modes.Mania.Objects.Drawable
{ {
public class DrawableNote : Sprite public class DrawableNote : Sprite
{ {

View File

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

View File

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

View File

@ -3,9 +3,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
namespace osu.Game.Beatmaps.Objects.Mania namespace osu.Game.Modes.Mania.Objects
{ {
class ManiaConverter : HitObjectConverter<ManiaBaseHit> class ManiaConverter : HitObjectConverter<ManiaBaseHit>
{ {

View File

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

View File

@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Mania")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu.Game.Modes.Mania")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("48f4582b-7687-4621-9cbe-5c24197cb536")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,18 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
using osu.Framework;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Game.GameModes.Play.Taiko; using osu.Game.Modes.Taiko.UI;
using System; using OpenTK.Graphics;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace osu.Game.GameModes.Play.Mania namespace osu.Game.Modes.Mania.UI
{ {
/// <summary> /// <summary>
/// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania. /// Similar to osu!taiko, with a pop-out animation when failing (rolling). Used in osu!mania.

View File

@ -1,13 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK; using osu.Game.Modes.Mania.Objects;
using osu.Framework.Graphics; using osu.Game.Modes.Objects;
using osu.Game.Beatmaps.Objects; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Beatmaps.Objects.Mania; using osu.Game.Modes.UI;
using osu.Game.Beatmaps.Objects.Mania.Drawable;
namespace osu.Game.GameModes.Play.Mania namespace osu.Game.Modes.Mania.UI
{ {
public class ManiaHitRenderer : HitRenderer<ManiaBaseHit> public class ManiaHitRenderer : HitRenderer<ManiaBaseHit>
{ {

View File

@ -3,10 +3,11 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Modes.UI;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.GameModes.Play.Mania namespace osu.Game.Modes.Mania.UI
{ {
public class ManiaPlayfield : Playfield public class ManiaPlayfield : Playfield
{ {

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{48F4582B-7687-4621-9CBE-5C24197CB536}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Mania</RootNamespace>
<AssemblyName>osu.Game.Modes.Mania</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Objects\Drawable\DrawableNote.cs" />
<Compile Include="Objects\HoldNote.cs" />
<Compile Include="Objects\ManiaBaseHit.cs" />
<Compile Include="Objects\ManiaConverter.cs" />
<Compile Include="Objects\Note.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\ManiaComboCounter.cs" />
<Compile Include="UI\ManiaHitRenderer.cs" />
<Compile Include="UI\ManiaPlayfield.cs" />
<Compile Include="ManiaRuleset.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
<Name>osu.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj">
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj">
<Project>{F167E17A-7DE6-4AF5-B920-A5112296C695}</Project>
<Name>osu.Game.Modes.Taiko</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
<Name>osu.Game</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
</packages>

View File

@ -1,15 +1,14 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using OpenTK; using OpenTK;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Beatmaps.Objects.Taiko.Drawable namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
class DrawableTaikoHit : Sprite class DrawableTaikoHit : Sprite
{ {

View File

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

View File

@ -1,11 +1,11 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Game.Beatmaps.Objects.Osu; using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
namespace osu.Game.Beatmaps.Objects.Taiko namespace osu.Game.Modes.Taiko.Objects
{ {
class TaikoConverter : HitObjectConverter<TaikoBaseHit> class TaikoConverter : HitObjectConverter<TaikoBaseHit>
{ {

View File

@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Taiko")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu.Game.Modes.Taiko")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f167e17a-7de6-4af5-b920-a5112296c695")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,23 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.Taiko.UI;
using osu.Game.Modes.UI;
namespace osu.Game.Modes.Taiko
{
public class TaikoRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new TaikoHitRenderer { Objects = objects };
protected override PlayMode PlayMode => PlayMode.Taiko;
public override HitObjectParser CreateHitObjectParser() => new OsuHitObjectParser();
}
}

View File

@ -1,15 +1,11 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using System; using osu.Game.Modes.UI;
using System.Collections.Generic; using OpenTK;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace osu.Game.GameModes.Play.Taiko namespace osu.Game.Modes.Taiko.UI
{ {
/// <summary> /// <summary>
/// Allows tint and scaling animations. Used in osu!taiko. /// Allows tint and scaling animations. Used in osu!taiko.

View File

@ -1,12 +1,12 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics; using osu.Game.Modes.Objects;
using osu.Game.Beatmaps.Objects; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Beatmaps.Objects.Taiko; using osu.Game.Modes.Taiko.Objects;
using osu.Game.Beatmaps.Objects.Taiko.Drawable; using osu.Game.Modes.UI;
namespace osu.Game.GameModes.Play.Taiko namespace osu.Game.Modes.Taiko.UI
{ {
public class TaikoHitRenderer : HitRenderer<TaikoBaseHit> public class TaikoHitRenderer : HitRenderer<TaikoBaseHit>
{ {

View File

@ -1,16 +1,15 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Modes.UI;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Textures;
namespace osu.Game.GameModes.Play.Taiko namespace osu.Game.Modes.Taiko.UI
{ {
public class TaikoPlayfield : Playfield public class TaikoPlayfield : Playfield
{ {

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F167E17A-7DE6-4AF5-B920-A5112296C695}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>osu.Game.Modes.Taiko</RootNamespace>
<AssemblyName>osu.Game.Modes.Taiko</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTK, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\ppy.OpenTK.2.0.50727.1339\lib\net45\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Objects\Drawable\DrawableTaikoHit.cs" />
<Compile Include="Objects\TaikoBaseHit.cs" />
<Compile Include="Objects\TaikoConverter.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\TaikoComboCounter.cs" />
<Compile Include="UI\TaikoHitRenderer.cs" />
<Compile Include="UI\TaikoPlayfield.cs" />
<Compile Include="TaikoRuleset.cs" />
</ItemGroup>
<ItemGroup>
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\osu-framework\osu.Framework\osu.Framework.csproj">
<Project>{C76BF5B3-985E-4D39-95FE-97C9C879B83A}</Project>
<Name>osu.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj">
<Project>{C92A607B-1FDD-4954-9F92-03FF547D9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
<Name>osu.Game</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ppy.OpenTK" version="2.0.50727.1339" targetFramework="net45" />
</packages>

View File

@ -5,9 +5,11 @@ using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Formats;
using osu.Game.Beatmaps.Objects.Osu;
using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Samples;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Screens.Play;
using osu.Game.Tests.Resources; using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Beatmaps.Formats namespace osu.Game.Tests.Beatmaps.Formats
@ -19,6 +21,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
public void SetUp() public void SetUp()
{ {
OsuLegacyDecoder.Register(); OsuLegacyDecoder.Register();
Ruleset.Register(new OsuRuleset());
} }
[Test] [Test]
public void TestDecodeMetadata() public void TestDecodeMetadata()

View File

@ -8,7 +8,12 @@ using osu.Framework.Desktop.Platform;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.IPC; using osu.Game.IPC;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using osu.Game.Modes.Catch;
using osu.Game.Modes.Mania;
using osu.Game.Modes.Osu;
using osu.Game.Modes.Taiko;
using osu.Game.Screens.Play;
namespace osu.Game.Tests.Beatmaps.IO namespace osu.Game.Tests.Beatmaps.IO
{ {
@ -20,6 +25,10 @@ namespace osu.Game.Tests.Beatmaps.IO
[OneTimeSetUp] [OneTimeSetUp]
public void SetUp() public void SetUp()
{ {
Ruleset.Register(new OsuRuleset());
Ruleset.Register(new TaikoRuleset());
Ruleset.Register(new ManiaRuleset());
Ruleset.Register(new CatchRuleset());
} }
[Test] [Test]

View File

@ -2,7 +2,8 @@
using System.IO; using System.IO;
using NUnit.Framework; using NUnit.Framework;
using osu.Game.Beatmaps.IO; using osu.Game.Beatmaps.IO;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using osu.Game.Modes.Osu;
using osu.Game.Tests.Resources; using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Beatmaps.IO namespace osu.Game.Tests.Beatmaps.IO
@ -14,8 +15,9 @@ namespace osu.Game.Tests.Beatmaps.IO
public void SetUp() public void SetUp()
{ {
OszArchiveReader.Register(); OszArchiveReader.Register();
Ruleset.Register(new OsuRuleset());
} }
[Test] [Test]
public void TestReadBeatmaps() public void TestReadBeatmaps()
{ {

View File

@ -66,6 +66,22 @@
<Project>{c76bf5b3-985e-4d39-95fe-97c9c879b83a}</Project> <Project>{c76bf5b3-985e-4d39-95fe-97c9c879b83a}</Project>
<Name>osu.Framework</Name> <Name>osu.Framework</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\osu.Game.Mode.Osu\osu.Game.Modes.Osu.csproj">
<Project>{c92a607b-1fdd-4954-9f92-03ff547d9080}</Project>
<Name>osu.Game.Modes.Osu</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Catch\osu.Game.Modes.Catch.csproj">
<Project>{58f6c80c-1253-4a0e-a465-b8c85ebeadf3}</Project>
<Name>osu.Game.Modes.Catch</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Mania\osu.Game.Modes.Mania.csproj">
<Project>{48f4582b-7687-4621-9cbe-5c24197cb536}</Project>
<Name>osu.Game.Modes.Mania</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game.Modes.Taiko\osu.Game.Modes.Taiko.csproj">
<Project>{f167e17a-7de6-4af5-b920-a5112296c695}</Project>
<Name>osu.Game.Modes.Taiko</Name>
</ProjectReference>
<ProjectReference Include="..\osu.Game\osu.Game.csproj"> <ProjectReference Include="..\osu.Game\osu.Game.csproj">
<Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project> <Project>{0D3FBF8A-7464-4CF7-8C90-3E7886DF2D4D}</Project>
<Name>osu.Game</Name> <Name>osu.Game</Name>

View File

@ -3,9 +3,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Beatmaps.Objects;
using osu.Game.Beatmaps.Timing; using osu.Game.Beatmaps.Timing;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Modes.Objects;
namespace osu.Game.Beatmaps namespace osu.Game.Beatmaps
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using osu.Game.Beatmaps.Objects; using osu.Game.Modes.Objects;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Beatmaps.Formats namespace osu.Game.Beatmaps.Formats
@ -48,6 +48,8 @@ namespace osu.Game.Beatmaps.Formats
new Color4(121,9,13, 255), new Color4(121,9,13, 255),
}; };
if (colours.Count == 0) return;
int i = -1; int i = -1;
foreach (HitObject h in b.HitObjects) foreach (HitObject h in b.HitObjects)

View File

@ -5,10 +5,11 @@ using System.IO;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Beatmaps.Events; using osu.Game.Beatmaps.Events;
using osu.Game.Beatmaps.Objects;
using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Samples;
using osu.Game.Beatmaps.Timing; using osu.Game.Beatmaps.Timing;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using osu.Game.Modes.Objects;
using osu.Game.Screens.Play;
namespace osu.Game.Beatmaps.Formats namespace osu.Game.Beatmaps.Formats
{ {
@ -220,7 +221,9 @@ namespace osu.Game.Beatmaps.Formats
BaseDifficulty = new BaseDifficulty(), BaseDifficulty = new BaseDifficulty(),
}, },
}; };
HitObjectParser parser = null;
var section = Section.None; var section = Section.None;
string line; string line;
while (true) while (true)
@ -232,14 +235,14 @@ namespace osu.Game.Beatmaps.Formats
continue; continue;
if (line.StartsWith(@"osu file format v")) if (line.StartsWith(@"osu file format v"))
continue; continue;
if (line.StartsWith(@"[") && line.EndsWith(@"]")) if (line.StartsWith(@"[") && line.EndsWith(@"]"))
{ {
if (!Enum.TryParse(line.Substring(1, line.Length - 2), out section)) if (!Enum.TryParse(line.Substring(1, line.Length - 2), out section))
throw new InvalidDataException($@"Unknown osu section {line}"); throw new InvalidDataException($@"Unknown osu section {line}");
continue; continue;
} }
string val = line, key = null; string val = line, key = null;
if (section != Section.Events && section != Section.TimingPoints && section != Section.HitObjects) if (section != Section.Events && section != Section.TimingPoints && section != Section.HitObjects)
{ {
@ -250,6 +253,7 @@ namespace osu.Game.Beatmaps.Formats
{ {
case Section.General: case Section.General:
handleGeneral(beatmap, key, val); handleGeneral(beatmap, key, val);
parser = Ruleset.GetRuleset(beatmap.BeatmapInfo.Mode).CreateHitObjectParser();
break; break;
case Section.Editor: case Section.Editor:
handleEditor(beatmap, key, val); handleEditor(beatmap, key, val);
@ -270,13 +274,13 @@ namespace osu.Game.Beatmaps.Formats
handleColours(beatmap, key, val); handleColours(beatmap, key, val);
break; break;
case Section.HitObjects: case Section.HitObjects:
var h = HitObject.Parse(beatmap.BeatmapInfo.Mode, val); var obj = parser?.Parse(val);
if (h != null) if (obj != null)
beatmap.HitObjects.Add(h); beatmap.HitObjects.Add(obj);
break; break;
} }
} }
return beatmap; return beatmap;
} }
} }

View File

@ -1,58 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using OpenTK;
using osu.Game.Beatmaps.Samples;
namespace osu.Game.Beatmaps.Objects.Osu
{
public abstract class OsuBaseHit : HitObject
{
public Vector2 Position { get; set; }
public static OsuBaseHit Parse(string val)
{
string[] split = val.Split(',');
var type = (HitObjectType)int.Parse(split[3]);
bool combo = type.HasFlag(HitObjectType.NewCombo);
type &= (HitObjectType)0xF;
type &= ~HitObjectType.NewCombo;
OsuBaseHit result;
switch (type)
{
case HitObjectType.Circle:
result = new Circle();
break;
case HitObjectType.Slider:
result = new Slider();
break;
case HitObjectType.Spinner:
result = new Spinner();
break;
default:
throw new InvalidOperationException($@"Unknown hit object type {type}");
}
result.Position = new Vector2(int.Parse(split[0]), int.Parse(split[1]));
result.StartTime = double.Parse(split[2]);
result.Sample = new HitSampleInfo { Type = (SampleType)int.Parse(split[4]) };
result.NewCombo = combo;
// TODO: "addition" field
return result;
}
[Flags]
private enum HitObjectType
{
Circle = 1,
Slider = 2,
NewCombo = 4,
CircleNewCombo = 5,
SliderNewCombo = 6,
Spinner = 8,
ColourHax = 122,
Hold = 128,
ManiaLong = 128,
}
}
}

View File

@ -3,8 +3,9 @@
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Screens.Play;
namespace osu.Game.Configuration namespace osu.Game.Configuration
{ {

View File

@ -1,7 +1,8 @@
using System; using System;
using System.Linq; using System.Linq;
using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Samples;
using osu.Game.GameModes.Play; using osu.Game.Modes;
using osu.Game.Screens.Play;
using SQLite.Net.Attributes; using SQLite.Net.Attributes;
using SQLiteNetExtensions.Attributes; using SQLiteNetExtensions.Attributes;

View File

@ -1,7 +1,6 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.GameModes.Play;
using SQLite.Net.Attributes; using SQLite.Net.Attributes;
namespace osu.Game.Database namespace osu.Game.Database

View File

@ -1,13 +0,0 @@
using osu.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace osu.Game.GameModes.Menu
{
internal class MenuVisualisation : Drawable
{
}
}

View File

@ -1,20 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Objects;
using osu.Game.GameModes.Play.Osu;
namespace osu.Game.GameModes.Play.Catch
{
class CatchRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new CatchHitRenderer { Objects = objects };
}
}

View File

@ -1,20 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Objects;
using osu.Game.GameModes.Play.Osu;
namespace osu.Game.GameModes.Play.Mania
{
class ManiaRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new ManiaHitRenderer { Objects = objects };
}
}

View File

@ -1,18 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Objects;
namespace osu.Game.GameModes.Play.Osu
{
class OsuRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new OsuHitRenderer { Objects = objects };
}}

View File

@ -1,38 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Objects;
using osu.Game.GameModes.Play.Catch;
using osu.Game.GameModes.Play.Mania;
using osu.Game.GameModes.Play.Osu;
using osu.Game.GameModes.Play.Taiko;
namespace osu.Game.GameModes.Play
{
public abstract class Ruleset
{
public abstract ScoreOverlay CreateScoreOverlay();
public abstract HitRenderer CreateHitRendererWith(List<HitObject> objects);
public static Ruleset GetRuleset(PlayMode mode)
{
switch (mode)
{
default:
return new OsuRuleset();
case PlayMode.Catch:
return new CatchRuleset();
case PlayMode.Mania:
return new ManiaRuleset();
case PlayMode.Taiko:
return new TaikoRuleset();
}
}
}
}

View File

@ -1,20 +0,0 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Game.Beatmaps.Objects;
using osu.Game.GameModes.Play.Osu;
namespace osu.Game.GameModes.Play.Taiko
{
class TaikoRuleset : Ruleset
{
public override ScoreOverlay CreateScoreOverlay() => new ScoreOverlayOsu();
public override HitRenderer CreateHitRendererWith(List<HitObject> objects) => new TaikoHitRenderer { Objects = objects };
}
}

View File

@ -2,15 +2,10 @@
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework; using osu.Framework;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps.Objects.Osu.Drawable;
namespace osu.Game.Beatmaps.Objects namespace osu.Game.Modes.Objects.Drawables
{ {
public abstract class DrawableHitObject : Container, IStateful<ArmedState> public abstract class DrawableHitObject : Container, IStateful<ArmedState>
{ {

View File

@ -1,12 +1,10 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps.Objects.Osu;
using osu.Game.Beatmaps.Samples; using osu.Game.Beatmaps.Samples;
using osu.Game.GameModes.Play;
using OpenTK.Graphics; using OpenTK.Graphics;
namespace osu.Game.Beatmaps.Objects namespace osu.Game.Modes.Objects
{ {
/// <summary> /// <summary>
/// A hitobject describes a point in a beatmap /// A hitobject describes a point in a beatmap
@ -23,17 +21,5 @@ namespace osu.Game.Beatmaps.Objects
public double Duration => EndTime - StartTime; public double Duration => EndTime - StartTime;
public HitSampleInfo Sample; public HitSampleInfo Sample;
public static HitObject Parse(PlayMode mode, string val)
{
//TODO: move to modular HitObjectParser system rather than static parsing. (https://github.com/ppy/osu/pull/60/files#r83135780)
switch (mode)
{
case PlayMode.Osu:
return OsuBaseHit.Parse(val);
default:
return null;
}
}
} }
} }

View File

@ -4,13 +4,14 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace osu.Game.Beatmaps.Objects namespace osu.Game.Modes.Objects
{ {
public abstract class HitObjectConverter<T> public abstract class HitObjectConverter<T>
where T : HitObject where T : HitObject
{ {
public abstract List<T> Convert(List<HitObject> input); public abstract List<T> Convert(List<HitObject> input);
} }
public class HitObjectConvertException : Exception public class HitObjectConvertException : Exception
{ {
public HitObject Input { get; } public HitObject Input { get; }

View File

@ -7,9 +7,10 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace osu.Game.GameModes.Charts namespace osu.Game.Modes.Objects
{ {
class ChartInfo : GameModeWhiteBox public abstract class HitObjectParser
{ {
public abstract HitObject Parse(string text);
} }
} }

View File

@ -4,7 +4,7 @@
using System.ComponentModel; using System.ComponentModel;
namespace osu.Game.GameModes.Play namespace osu.Game.Modes
{ {
public enum PlayMode public enum PlayMode
{ {

39
osu.Game/Modes/Ruleset.cs Normal file
View File

@ -0,0 +1,39 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Modes.Objects;
using osu.Game.Modes.UI;
using System.Reflection;
using osu.Framework.Extensions;
using System;
using System.Collections.Concurrent;
using System.Linq;
namespace osu.Game.Modes
{
public abstract class Ruleset
{
private static ConcurrentDictionary<PlayMode, Type> availableRulesets = new ConcurrentDictionary<PlayMode, Type>();
public abstract ScoreOverlay CreateScoreOverlay();
public abstract HitRenderer CreateHitRendererWith(List<HitObject> objects);
public abstract HitObjectParser CreateHitObjectParser();
public static void Register(Ruleset ruleset) => availableRulesets.TryAdd(ruleset.PlayMode, ruleset.GetType());
protected abstract PlayMode PlayMode { get; }
public static Ruleset GetRuleset(PlayMode mode)
{
Type type;
if (!availableRulesets.TryGetValue(mode, out type))
return null;
return Activator.CreateInstance(type) as Ruleset;
}
}
}

View File

@ -1,22 +1,13 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Framework.Timing;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Allocation;
namespace osu.Game.GameModes.Play namespace osu.Game.Modes.UI
{ {
public abstract class ComboCounter : Container public abstract class ComboCounter : Container
{ {

View File

@ -1,18 +1,13 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Framework.Timing;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace osu.Game.GameModes.Play namespace osu.Game.Modes.UI
{ {
/// <summary> /// <summary>
/// Used to display combo with a roll-up animation in results screen. /// Used to display combo with a roll-up animation in results screen.

View File

@ -1,16 +1,16 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps.Objects;
using osu.Framework;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables;
namespace osu.Game.GameModes.Play namespace osu.Game.Modes.UI
{ {
public abstract class HitRenderer : Container public abstract class HitRenderer : Container
{ {

View File

@ -1,10 +1,9 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
namespace osu.Game.GameModes.Play namespace osu.Game.Modes.UI
{ {
public class Playfield : Container public class Playfield : Container
{ {

View File

@ -2,16 +2,12 @@
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps.Objects;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Modes.Objects;
namespace osu.Game.GameModes.Play namespace osu.Game.Modes.UI
{ {
public abstract class ScoreOverlay : Container public abstract class ScoreOverlay : Container
{ {

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Game.Online.Chat.Display.osu.Online.Social;
using OpenTK; using OpenTK;
using osu.Framework; using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;

View File

@ -1,74 +1,67 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Allocation;
namespace osu.Game.Online.Chat.Display namespace osu.Game.Online.Chat.Display
{ {
namespace osu.Online.Social public class ChatLine : Container
{ {
public class ChatLine : Container public readonly Message Message;
const float padding = 200;
const float text_size = 20;
public ChatLine(Message message)
{ {
public readonly Message Message; this.Message = message;
const float padding = 200; RelativeSizeAxes = Axes.X;
const float text_size = 20; AutoSizeAxes = Axes.Y;
public ChatLine(Message message) Children = new Drawable[]
{ {
this.Message = message; new Container
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Children = new Drawable[]
{ {
new Container Size = new Vector2(padding, text_size),
Children = new Drawable[]
{ {
Size = new Vector2(padding, text_size), new SpriteText
Children = new Drawable[]
{ {
new SpriteText Text = Message.Timestamp.LocalDateTime.ToLongTimeString(),
{ TextSize = text_size,
Text = Message.Timestamp.LocalDateTime.ToLongTimeString(), Colour = new Color4(128, 128, 128, 255)
TextSize = text_size, },
Colour = new Color4(128, 128, 128, 255) new SpriteText
},
new SpriteText
{
Text = Message.User.Name,
TextSize = text_size,
Origin = Anchor.TopRight,
Anchor = Anchor.TopRight,
}
}
},
new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = padding + 10 },
Children = new Drawable[]
{ {
new SpriteText Text = Message.User.Name,
{ TextSize = text_size,
Text = Message.Content, Origin = Anchor.TopRight,
TextSize = text_size, Anchor = Anchor.TopRight,
RelativeSizeAxes = Axes.X,
}
} }
} }
}; },
} new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = padding + 10 },
Children = new Drawable[]
{
new SpriteText
{
Text = Message.Content,
TextSize = text_size,
RelativeSizeAxes = Axes.X,
}
}
}
};
} }
} }
} }

View File

@ -6,22 +6,23 @@ using System.Threading;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.GameModes; using osu.Framework.GameModes;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.GameModes.Menu;
using OpenTK; using OpenTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Game.GameModes.Play;
using osu.Game.Overlays; using osu.Game.Overlays;
using osu.Framework; using osu.Framework;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Game.Input; using osu.Game.Input;
using OpenTK.Input; using OpenTK.Input;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Game.GameModes;
using osu.Game.Graphics.UserInterface.Volume; using osu.Game.Graphics.UserInterface.Volume;
using osu.Game.Database; using osu.Game.Database;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Modes;
using osu.Game.Screens;
using osu.Game.Screens.Menu;
using osu.Game.Screens.Play;
namespace osu.Game namespace osu.Game
{ {

View File

@ -9,10 +9,11 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Transformations; using osu.Framework.Graphics.Transformations;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.GameModes.Play;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Modes;
using osu.Game.Screens.Play;
namespace osu.Game.Overlays namespace osu.Game.Overlays
{ {

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