mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 14:43:22 +08:00
Converted all files to use CRLF line endings.
This commit is contained in:
parent
b7976dce46
commit
4edd9b0cb3
56
README.md
56
README.md
@ -1,28 +1,28 @@
|
|||||||
# osu! [![Build status](https://ci.appveyor.com/api/projects/status/u2p01nx7l6og8buh?svg=true)](https://ci.appveyor.com/project/peppy/osu)
|
# osu! [![Build status](https://ci.appveyor.com/api/projects/status/u2p01nx7l6og8buh?svg=true)](https://ci.appveyor.com/project/peppy/osu)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[osu! on the web](https://osu.ppy.sh) | [dev chat](https://discord.gg/ppy)
|
[osu! on the web](https://osu.ppy.sh) | [dev chat](https://discord.gg/ppy)
|
||||||
|
|
||||||
Rhythm is just a *click* away. The future of osu! and the beginning of an open era!
|
Rhythm is just a *click* away. The future of osu! and the beginning of an open era!
|
||||||
|
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
- A desktop platform which can compile .NET 4.5.
|
- A desktop platform which can compile .NET 4.5.
|
||||||
- Visual Studio or MonoDevelop is recommended.
|
- Visual Studio or MonoDevelop is recommended.
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
We welcome all contributions, but keep in mind that we already have a lot of the UI designed. If you wish to work on something with the intention on having it included in the official distribution, please open an issue for discussion and we will give you what you need from a design perspective to proceed. If you want to make *changes* to the design, we recommend you open an issue with your intentions before spending too much time, to ensure no effort is wasted.
|
We welcome all contributions, but keep in mind that we already have a lot of the UI designed. If you wish to work on something with the intention on having it included in the official distribution, please open an issue for discussion and we will give you what you need from a design perspective to proceed. If you want to make *changes* to the design, we recommend you open an issue with your intentions before spending too much time, to ensure no effort is wasted.
|
||||||
|
|
||||||
Contributions can be made via pull requests to this repository. We hope to credit and reward larger contributions via a [bounty system](https://goo.gl/nFdoyI). If you're unsure of what you can help with, check out the [list](https://github.com/ppy/osu/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Abounty) of available issues with bounty.
|
Contributions can be made via pull requests to this repository. We hope to credit and reward larger contributions via a [bounty system](https://goo.gl/nFdoyI). If you're unsure of what you can help with, check out the [list](https://github.com/ppy/osu/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Abounty) of available issues with bounty.
|
||||||
|
|
||||||
Note that while we already have certain standards in place, nothing is set in stone. If you have an issue with the way code is structured; with any libraries we are using; with any processes involved with contributing, *please* bring it up. I welcome all feedback so we can make contributing to this project as pain-free as possible.
|
Note that while we already have certain standards in place, nothing is set in stone. If you have an issue with the way code is structured; with any libraries we are using; with any processes involved with contributing, *please* bring it up. I welcome all feedback so we can make contributing to this project as pain-free as possible.
|
||||||
|
|
||||||
# Licence
|
# Licence
|
||||||
|
|
||||||
The osu! client code and framework are licensed under the [MIT licence](https://opensource.org/licenses/MIT). Please see [the licence file](LICENCE) for more information. [tl;dr](https://tldrlegal.com/license/mit-license) you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.
|
The osu! client code and framework are licensed under the [MIT licence](https://opensource.org/licenses/MIT). Please see [the licence file](LICENCE) for more information. [tl;dr](https://tldrlegal.com/license/mit-license) you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source.
|
||||||
|
|
||||||
Please note that this *does not cover* the usage of the "osu!" or "ppy" branding in any software, resources, advertising or promotion, as this is protected by trademark law.
|
Please note that this *does not cover* the usage of the "osu!" or "ppy" branding in any software, resources, advertising or promotion, as this is protected by trademark law.
|
||||||
|
|
||||||
Please also note that game resources are covered by a separate licence. Please see the [ppy/osu-resources](https://github.com/ppy/osu-resources) repository for clarifications.
|
Please also note that game resources are covered by a separate licence. Please see the [ppy/osu-resources](https://github.com/ppy/osu-resources) repository for clarifications.
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 30ff0e1a99a10e735611bb3ffa35352061f52d8a
|
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 0505cf0d3b317667dbc95346f57b67fdbcdb4dee
|
|
@ -1,4 +1,4 @@
|
|||||||
// 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-framework/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 OpenTK;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 OpenTK;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 osu.Framework.GameModes.Testing;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 OpenTK;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// 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-framework/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.GameModes.Testing;
|
using osu.Framework.GameModes.Testing;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{69051C69-12AE-4E7D-A3E6-460D2E282312}</ProjectGuid>
|
<ProjectGuid>{69051C69-12AE-4E7D-A3E6-460D2E282312}</ProjectGuid>
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
using osu.Game.Beatmaps.IO;
|
using osu.Game.Beatmaps.IO;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Desktop.Beatmaps.IO
|
namespace osu.Desktop.Beatmaps.IO
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads an extracted legacy beatmap from disk.
|
/// Reads an extracted legacy beatmap from disk.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LegacyFilesystemReader : ArchiveReader
|
public class LegacyFilesystemReader : ArchiveReader
|
||||||
{
|
{
|
||||||
static LegacyFilesystemReader()
|
static LegacyFilesystemReader()
|
||||||
{
|
{
|
||||||
AddReader<LegacyFilesystemReader>((storage, path) => Directory.Exists(path));
|
AddReader<LegacyFilesystemReader>((storage, path) => Directory.Exists(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string basePath { get; set; }
|
private string basePath { get; set; }
|
||||||
private string[] beatmaps { get; set; }
|
private string[] beatmaps { get; set; }
|
||||||
private Beatmap firstMap { get; set; }
|
private Beatmap firstMap { get; set; }
|
||||||
|
|
||||||
public LegacyFilesystemReader(string path)
|
public LegacyFilesystemReader(string path)
|
||||||
{
|
{
|
||||||
basePath = path;
|
basePath = path;
|
||||||
beatmaps = Directory.GetFiles(basePath, @"*.osu").Select(f => Path.GetFileName(f)).ToArray();
|
beatmaps = Directory.GetFiles(basePath, @"*.osu").Select(f => Path.GetFileName(f)).ToArray();
|
||||||
if (beatmaps.Length == 0)
|
if (beatmaps.Length == 0)
|
||||||
throw new FileNotFoundException(@"This directory contains no beatmaps");
|
throw new FileNotFoundException(@"This directory contains no beatmaps");
|
||||||
using (var stream = new StreamReader(ReadFile(beatmaps[0])))
|
using (var stream = new StreamReader(ReadFile(beatmaps[0])))
|
||||||
{
|
{
|
||||||
var decoder = BeatmapDecoder.GetDecoder(stream);
|
var decoder = BeatmapDecoder.GetDecoder(stream);
|
||||||
firstMap = decoder.Decode(stream);
|
firstMap = decoder.Decode(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string[] ReadBeatmaps()
|
public override string[] ReadBeatmaps()
|
||||||
@ -48,10 +48,11 @@ namespace osu.Desktop.Beatmaps.IO
|
|||||||
public override BeatmapMetadata ReadMetadata()
|
public override BeatmapMetadata ReadMetadata()
|
||||||
{
|
{
|
||||||
return firstMap.Metadata;
|
return firstMap.Metadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
// no-op
|
// no-op
|
||||||
}
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}</ProjectGuid>
|
<ProjectGuid>{2A66DD92-ADB1-4994-89E2-C94E04ACDA0D}</ProjectGuid>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
@ -9,135 +9,137 @@ using osu.Game.Beatmaps.Samples;
|
|||||||
using osu.Game.GameModes.Play;
|
using osu.Game.GameModes.Play;
|
||||||
using osu.Game.Tests.Resources;
|
using osu.Game.Tests.Resources;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Beatmaps.Formats
|
namespace osu.Game.Tests.Beatmaps.Formats
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class OsuLegacyDecoderTest
|
public class OsuLegacyDecoderTest
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[TestFixtureSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
OsuLegacyDecoder.Register();
|
OsuLegacyDecoder.Register();
|
||||||
}
|
|
||||||
[Test]
|
|
||||||
public void TestDecodeMetadata()
|
|
||||||
{
|
|
||||||
var decoder = new OsuLegacyDecoder();
|
|
||||||
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
|
||||||
{
|
|
||||||
var beatmap = decoder.Decode(new StreamReader(stream));
|
|
||||||
var meta = beatmap.Metadata;
|
|
||||||
Assert.AreEqual(241526, meta.BeatmapSetID);
|
|
||||||
Assert.AreEqual("Soleily", meta.Artist);
|
|
||||||
Assert.AreEqual("Soleily", meta.ArtistUnicode);
|
|
||||||
Assert.AreEqual("03. Renatus - Soleily 192kbps.mp3", meta.AudioFile);
|
|
||||||
Assert.AreEqual("Gamu", meta.Author);
|
|
||||||
Assert.AreEqual("machinetop_background.jpg", meta.BackgroundFile);
|
|
||||||
Assert.AreEqual(164471, meta.PreviewTime);
|
|
||||||
Assert.AreEqual(string.Empty, meta.Source);
|
|
||||||
Assert.AreEqual("MBC7 Unisphere 地球ヤバイEP Chikyu Yabai", meta.Tags);
|
|
||||||
Assert.AreEqual("Renatus", meta.Title);
|
|
||||||
Assert.AreEqual("Renatus", meta.TitleUnicode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDecodeGeneral()
|
public void TestDecodeMetadata()
|
||||||
{
|
{
|
||||||
var decoder = new OsuLegacyDecoder();
|
var decoder = new OsuLegacyDecoder();
|
||||||
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
{
|
{
|
||||||
var beatmap = decoder.Decode(new StreamReader(stream));
|
var beatmap = decoder.Decode(new StreamReader(stream));
|
||||||
Assert.AreEqual(0, beatmap.AudioLeadIn);
|
var meta = beatmap.Metadata;
|
||||||
Assert.AreEqual(false, beatmap.Countdown);
|
Assert.AreEqual(241526, meta.BeatmapSetID);
|
||||||
Assert.AreEqual(SampleSet.Soft, beatmap.SampleSet);
|
Assert.AreEqual("Soleily", meta.Artist);
|
||||||
Assert.AreEqual(0.7f, beatmap.StackLeniency);
|
Assert.AreEqual("Soleily", meta.ArtistUnicode);
|
||||||
Assert.AreEqual(false, beatmap.SpecialStyle);
|
Assert.AreEqual("03. Renatus - Soleily 192kbps.mp3", meta.AudioFile);
|
||||||
Assert.AreEqual(PlayMode.Osu, beatmap.Mode);
|
Assert.AreEqual("Gamu", meta.Author);
|
||||||
Assert.AreEqual(false, beatmap.LetterboxInBreaks);
|
Assert.AreEqual("machinetop_background.jpg", meta.BackgroundFile);
|
||||||
Assert.AreEqual(false, beatmap.WidescreenStoryboard);
|
Assert.AreEqual(164471, meta.PreviewTime);
|
||||||
}
|
Assert.AreEqual(string.Empty, meta.Source);
|
||||||
|
Assert.AreEqual("MBC7 Unisphere 地球ヤバイEP Chikyu Yabai", meta.Tags);
|
||||||
|
Assert.AreEqual("Renatus", meta.Title);
|
||||||
|
Assert.AreEqual("Renatus", meta.TitleUnicode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDecodeEditor()
|
public void TestDecodeGeneral()
|
||||||
{
|
{
|
||||||
var decoder = new OsuLegacyDecoder();
|
var decoder = new OsuLegacyDecoder();
|
||||||
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
{
|
{
|
||||||
var beatmap = decoder.Decode(new StreamReader(stream));
|
var beatmap = decoder.Decode(new StreamReader(stream));
|
||||||
int[] expectedBookmarks =
|
Assert.AreEqual(0, beatmap.AudioLeadIn);
|
||||||
{
|
Assert.AreEqual(false, beatmap.Countdown);
|
||||||
11505, 22054, 32604, 43153, 53703, 64252, 74802, 85351,
|
Assert.AreEqual(SampleSet.Soft, beatmap.SampleSet);
|
||||||
95901, 106450, 116999, 119637, 130186, 140735, 151285,
|
Assert.AreEqual(0.7f, beatmap.StackLeniency);
|
||||||
161834, 164471, 175020, 185570, 196119, 206669, 209306
|
Assert.AreEqual(false, beatmap.SpecialStyle);
|
||||||
};
|
Assert.AreEqual(PlayMode.Osu, beatmap.Mode);
|
||||||
Assert.AreEqual(expectedBookmarks.Length, beatmap.Bookmarks.Length);
|
Assert.AreEqual(false, beatmap.LetterboxInBreaks);
|
||||||
for (int i = 0; i < expectedBookmarks.Length; i++)
|
Assert.AreEqual(false, beatmap.WidescreenStoryboard);
|
||||||
Assert.AreEqual(expectedBookmarks[i], beatmap.Bookmarks[i]);
|
}
|
||||||
Assert.AreEqual(1.8, beatmap.DistanceSpacing);
|
|
||||||
Assert.AreEqual(4, beatmap.BeatDivisor);
|
|
||||||
Assert.AreEqual(4, beatmap.GridSize);
|
|
||||||
Assert.AreEqual(2, beatmap.TimelineZoom);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDecodeDifficulty()
|
public void TestDecodeEditor()
|
||||||
{
|
{
|
||||||
var decoder = new OsuLegacyDecoder();
|
var decoder = new OsuLegacyDecoder();
|
||||||
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
{
|
{
|
||||||
var beatmap = decoder.Decode(new StreamReader(stream));
|
var beatmap = decoder.Decode(new StreamReader(stream));
|
||||||
var difficulty = beatmap.BaseDifficulty;
|
int[] expectedBookmarks =
|
||||||
Assert.AreEqual(6.5f, difficulty.DrainRate);
|
{
|
||||||
Assert.AreEqual(4, difficulty.CircleSize);
|
11505, 22054, 32604, 43153, 53703, 64252, 74802, 85351,
|
||||||
Assert.AreEqual(8, difficulty.OverallDifficulty);
|
95901, 106450, 116999, 119637, 130186, 140735, 151285,
|
||||||
Assert.AreEqual(9, difficulty.ApproachRate);
|
161834, 164471, 175020, 185570, 196119, 206669, 209306
|
||||||
Assert.AreEqual(1.8f, difficulty.SliderMultiplier);
|
};
|
||||||
Assert.AreEqual(2, difficulty.SliderTickRate);
|
Assert.AreEqual(expectedBookmarks.Length, beatmap.Bookmarks.Length);
|
||||||
}
|
for (int i = 0; i < expectedBookmarks.Length; i++)
|
||||||
|
Assert.AreEqual(expectedBookmarks[i], beatmap.Bookmarks[i]);
|
||||||
|
Assert.AreEqual(1.8, beatmap.DistanceSpacing);
|
||||||
|
Assert.AreEqual(4, beatmap.BeatDivisor);
|
||||||
|
Assert.AreEqual(4, beatmap.GridSize);
|
||||||
|
Assert.AreEqual(2, beatmap.TimelineZoom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestDecodeColors()
|
public void TestDecodeDifficulty()
|
||||||
{
|
{
|
||||||
var decoder = new OsuLegacyDecoder();
|
var decoder = new OsuLegacyDecoder();
|
||||||
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
{
|
{
|
||||||
var beatmap = decoder.Decode(new StreamReader(stream));
|
var beatmap = decoder.Decode(new StreamReader(stream));
|
||||||
|
var difficulty = beatmap.BaseDifficulty;
|
||||||
|
Assert.AreEqual(6.5f, difficulty.DrainRate);
|
||||||
|
Assert.AreEqual(4, difficulty.CircleSize);
|
||||||
|
Assert.AreEqual(8, difficulty.OverallDifficulty);
|
||||||
|
Assert.AreEqual(9, difficulty.ApproachRate);
|
||||||
|
Assert.AreEqual(1.8f, difficulty.SliderMultiplier);
|
||||||
|
Assert.AreEqual(2, difficulty.SliderTickRate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestDecodeColors()
|
||||||
|
{
|
||||||
|
var decoder = new OsuLegacyDecoder();
|
||||||
|
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
|
{
|
||||||
|
var beatmap = decoder.Decode(new StreamReader(stream));
|
||||||
Color4[] expected =
|
Color4[] expected =
|
||||||
{
|
{
|
||||||
new Color4(142, 199, 255, 255),
|
new Color4(142, 199, 255, 255),
|
||||||
new Color4(255, 128, 128, 255),
|
new Color4(255, 128, 128, 255),
|
||||||
new Color4(128, 255, 255, 255),
|
new Color4(128, 255, 255, 255),
|
||||||
new Color4(128, 255, 128, 255),
|
new Color4(128, 255, 128, 255),
|
||||||
new Color4(255, 187, 255, 255),
|
new Color4(255, 187, 255, 255),
|
||||||
new Color4(255, 177, 140, 255),
|
new Color4(255, 177, 140, 255),
|
||||||
};
|
};
|
||||||
Assert.AreEqual(expected.Length, beatmap.ComboColors.Count);
|
Assert.AreEqual(expected.Length, beatmap.ComboColors.Count);
|
||||||
for (int i = 0; i < expected.Length; i++)
|
for (int i = 0; i < expected.Length; i++)
|
||||||
Assert.AreEqual(expected[i], beatmap.ComboColors[i]);
|
Assert.AreEqual(expected[i], beatmap.ComboColors[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
public void TestDecodeHitObjects()
|
[Test]
|
||||||
{
|
public void TestDecodeHitObjects()
|
||||||
var decoder = new OsuLegacyDecoder();
|
{
|
||||||
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
var decoder = new OsuLegacyDecoder();
|
||||||
{
|
using (var stream = Resource.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
var beatmap = decoder.Decode(new StreamReader(stream));
|
{
|
||||||
var slider = beatmap.HitObjects[0] as Slider;
|
var beatmap = decoder.Decode(new StreamReader(stream));
|
||||||
Assert.IsNotNull(slider);
|
var slider = beatmap.HitObjects[0] as Slider;
|
||||||
Assert.AreEqual(new Vector2(192, 168), slider.Position);
|
Assert.IsNotNull(slider);
|
||||||
Assert.AreEqual(956, slider.StartTime);
|
Assert.AreEqual(new Vector2(192, 168), slider.Position);
|
||||||
Assert.AreEqual(SampleType.None, slider.Sample.Type);
|
Assert.AreEqual(956, slider.StartTime);
|
||||||
var circle = beatmap.HitObjects[1] as Circle;
|
Assert.AreEqual(SampleType.None, slider.Sample.Type);
|
||||||
Assert.IsNotNull(circle);
|
var circle = beatmap.HitObjects[1] as Circle;
|
||||||
Assert.AreEqual(new Vector2(304, 56), circle.Position);
|
Assert.IsNotNull(circle);
|
||||||
Assert.AreEqual(1285, circle.StartTime);
|
Assert.AreEqual(new Vector2(304, 56), circle.Position);
|
||||||
|
Assert.AreEqual(1285, circle.StartTime);
|
||||||
Assert.AreEqual(SampleType.Clap, circle.Sample.Type);
|
Assert.AreEqual(SampleType.Clap, circle.Sample.Type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,81 +1,82 @@
|
|||||||
using System;
|
using System;
|
||||||
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.GameModes.Play;
|
||||||
using osu.Game.Tests.Resources;
|
using osu.Game.Tests.Resources;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Beatmaps.IO
|
namespace osu.Game.Tests.Beatmaps.IO
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class OszArchiveReaderTest
|
public class OszArchiveReaderTest
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[TestFixtureSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
OszArchiveReader.Register();
|
OszArchiveReader.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestReadBeatmaps()
|
public void TestReadBeatmaps()
|
||||||
{
|
{
|
||||||
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
|
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
|
||||||
{
|
{
|
||||||
var reader = new OszArchiveReader(osz);
|
var reader = new OszArchiveReader(osz);
|
||||||
string[] expected =
|
string[] expected =
|
||||||
{
|
{
|
||||||
"Soleily - Renatus (Deif) [Platter].osu",
|
"Soleily - Renatus (Deif) [Platter].osu",
|
||||||
"Soleily - Renatus (Deif) [Rain].osu",
|
"Soleily - Renatus (Deif) [Rain].osu",
|
||||||
"Soleily - Renatus (Deif) [Salad].osu",
|
"Soleily - Renatus (Deif) [Salad].osu",
|
||||||
"Soleily - Renatus (ExPew) [Another].osu",
|
"Soleily - Renatus (ExPew) [Another].osu",
|
||||||
"Soleily - Renatus (ExPew) [Hyper].osu",
|
"Soleily - Renatus (ExPew) [Hyper].osu",
|
||||||
"Soleily - Renatus (ExPew) [Normal].osu",
|
"Soleily - Renatus (ExPew) [Normal].osu",
|
||||||
"Soleily - Renatus (Gamu) [Hard].osu",
|
"Soleily - Renatus (Gamu) [Hard].osu",
|
||||||
"Soleily - Renatus (Gamu) [Insane].osu",
|
"Soleily - Renatus (Gamu) [Insane].osu",
|
||||||
"Soleily - Renatus (Gamu) [Normal].osu",
|
"Soleily - Renatus (Gamu) [Normal].osu",
|
||||||
"Soleily - Renatus (MMzz) [Futsuu].osu",
|
"Soleily - Renatus (MMzz) [Futsuu].osu",
|
||||||
"Soleily - Renatus (MMzz) [Muzukashii].osu",
|
"Soleily - Renatus (MMzz) [Muzukashii].osu",
|
||||||
"Soleily - Renatus (MMzz) [Oni].osu"
|
"Soleily - Renatus (MMzz) [Oni].osu"
|
||||||
};
|
};
|
||||||
var maps = reader.ReadBeatmaps();
|
var maps = reader.ReadBeatmaps();
|
||||||
foreach (var map in expected)
|
foreach (var map in expected)
|
||||||
Assert.Contains(map, maps);
|
Assert.Contains(map, maps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestReadMetadata()
|
public void TestReadMetadata()
|
||||||
{
|
{
|
||||||
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
|
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
|
||||||
{
|
{
|
||||||
var reader = new OszArchiveReader(osz);
|
var reader = new OszArchiveReader(osz);
|
||||||
var meta = reader.ReadMetadata();
|
var meta = reader.ReadMetadata();
|
||||||
Assert.AreEqual(241526, meta.BeatmapSetID);
|
Assert.AreEqual(241526, meta.BeatmapSetID);
|
||||||
Assert.AreEqual("Soleily", meta.Artist);
|
Assert.AreEqual("Soleily", meta.Artist);
|
||||||
Assert.AreEqual("Soleily", meta.ArtistUnicode);
|
Assert.AreEqual("Soleily", meta.ArtistUnicode);
|
||||||
Assert.AreEqual("03. Renatus - Soleily 192kbps.mp3", meta.AudioFile);
|
Assert.AreEqual("03. Renatus - Soleily 192kbps.mp3", meta.AudioFile);
|
||||||
Assert.AreEqual("Deif", meta.Author);
|
Assert.AreEqual("Deif", meta.Author);
|
||||||
Assert.AreEqual("machinetop_background.jpg", meta.BackgroundFile);
|
Assert.AreEqual("machinetop_background.jpg", meta.BackgroundFile);
|
||||||
Assert.AreEqual(164471, meta.PreviewTime);
|
Assert.AreEqual(164471, meta.PreviewTime);
|
||||||
Assert.AreEqual(string.Empty, meta.Source);
|
Assert.AreEqual(string.Empty, meta.Source);
|
||||||
Assert.AreEqual("MBC7 Unisphere 地球ヤバイEP Chikyu Yabai", meta.Tags);
|
Assert.AreEqual("MBC7 Unisphere 地球ヤバイEP Chikyu Yabai", meta.Tags);
|
||||||
Assert.AreEqual("Renatus", meta.Title);
|
Assert.AreEqual("Renatus", meta.Title);
|
||||||
Assert.AreEqual("Renatus", meta.TitleUnicode);
|
Assert.AreEqual("Renatus", meta.TitleUnicode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[Test]
|
|
||||||
public void TestReadFile()
|
[Test]
|
||||||
{
|
public void TestReadFile()
|
||||||
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
|
{
|
||||||
{
|
using (var osz = Resource.OpenResource("Beatmaps.241526 Soleily - Renatus.osz"))
|
||||||
var reader = new OszArchiveReader(osz);
|
{
|
||||||
using (var stream = new StreamReader(
|
var reader = new OszArchiveReader(osz);
|
||||||
reader.ReadFile("Soleily - Renatus (Deif) [Platter].osu")))
|
using (var stream = new StreamReader(
|
||||||
{
|
reader.ReadFile("Soleily - Renatus (Deif) [Platter].osu")))
|
||||||
Assert.AreEqual("osu file format v13", stream.ReadLine().Trim());
|
{
|
||||||
}
|
Assert.AreEqual("osu file format v13", stream.ReadLine().Trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Resources
|
namespace osu.Game.Tests.Resources
|
||||||
{
|
{
|
||||||
public static class Resource
|
public static class Resource
|
||||||
{
|
{
|
||||||
public static Stream OpenResource(string name)
|
public static Stream OpenResource(string name)
|
||||||
{
|
{
|
||||||
return Assembly.GetExecutingAssembly().GetManifestResourceStream(
|
return Assembly.GetExecutingAssembly().GetManifestResourceStream(
|
||||||
$@"osu.Game.Tests.Resources.{name}") ??
|
$@"osu.Game.Tests.Resources.{name}") ??
|
||||||
Assembly.LoadFrom("osu.Game.Resources.dll").GetManifestResourceStream(
|
Assembly.LoadFrom("osu.Game.Resources.dll").GetManifestResourceStream(
|
||||||
$@"osu.Game.Resources.{name}");
|
$@"osu.Game.Resources.{name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NUnit" version="2.6.4" targetFramework="net45" />
|
<package id="NUnit" version="2.6.4" targetFramework="net45" />
|
||||||
<package id="ppy.OpenTK" version="1.1.2225.3" targetFramework="net45" />
|
<package id="ppy.OpenTK" version="1.1.2225.3" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -1,18 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps
|
namespace osu.Game.Beatmaps
|
||||||
{
|
{
|
||||||
public class BaseDifficulty
|
public class BaseDifficulty
|
||||||
{
|
{
|
||||||
[PrimaryKey, AutoIncrement]
|
[PrimaryKey, AutoIncrement]
|
||||||
public int ID { get; set; }
|
public int ID { get; set; }
|
||||||
public float DrainRate { get; set; }
|
public float DrainRate { get; set; }
|
||||||
public float CircleSize { get; set; }
|
public float CircleSize { get; set; }
|
||||||
public float OverallDifficulty { get; set; }
|
public float OverallDifficulty { get; set; }
|
||||||
public float ApproachRate { get; set; }
|
public float ApproachRate { get; set; }
|
||||||
public float SliderMultiplier { get; set; }
|
public float SliderMultiplier { get; set; }
|
||||||
public float SliderTickRate { get; set; }
|
public float SliderTickRate { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 osu.Game.GameModes.Play;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
namespace osu.Game.Beatmaps.Events
|
namespace osu.Game.Beatmaps.Events
|
||||||
{
|
{
|
||||||
public enum EventType
|
public enum EventType
|
||||||
{
|
{
|
||||||
Background = 0,
|
Background = 0,
|
||||||
Video = 1,
|
Video = 1,
|
||||||
Break = 2,
|
Break = 2,
|
||||||
Colour = 3,
|
Colour = 3,
|
||||||
Sprite = 4,
|
Sprite = 4,
|
||||||
Sample = 5,
|
Sample = 5,
|
||||||
Animation = 6
|
Animation = 6
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,25 +1,26 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.Formats
|
namespace osu.Game.Beatmaps.Formats
|
||||||
{
|
{
|
||||||
public abstract class BeatmapDecoder
|
public abstract class BeatmapDecoder
|
||||||
{
|
{
|
||||||
private static Dictionary<string, Type> decoders { get; } = new Dictionary<string, Type>();
|
private static Dictionary<string, Type> decoders { get; } = new Dictionary<string, Type>();
|
||||||
|
|
||||||
public static BeatmapDecoder GetDecoder(TextReader stream)
|
public static BeatmapDecoder GetDecoder(TextReader stream)
|
||||||
{
|
{
|
||||||
var line = stream.ReadLine().Trim();
|
var line = stream.ReadLine().Trim();
|
||||||
if (!decoders.ContainsKey(line))
|
if (!decoders.ContainsKey(line))
|
||||||
throw new IOException(@"Unknown file format");
|
throw new IOException(@"Unknown file format");
|
||||||
return (BeatmapDecoder)Activator.CreateInstance(decoders[line]);
|
return (BeatmapDecoder)Activator.CreateInstance(decoders[line]);
|
||||||
}
|
}
|
||||||
protected static void AddDecoder<T>(string magic) where T : BeatmapDecoder
|
|
||||||
{
|
protected static void AddDecoder<T>(string magic) where T : BeatmapDecoder
|
||||||
decoders[magic] = typeof(T);
|
{
|
||||||
}
|
decoders[magic] = typeof(T);
|
||||||
|
}
|
||||||
public abstract Beatmap Decode(TextReader stream);
|
|
||||||
}
|
public abstract Beatmap Decode(TextReader stream);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -1,48 +1,48 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.IO
|
namespace osu.Game.Beatmaps.IO
|
||||||
{
|
{
|
||||||
public abstract class ArchiveReader : IDisposable
|
public abstract class ArchiveReader : IDisposable
|
||||||
{
|
{
|
||||||
private class Reader
|
private class Reader
|
||||||
{
|
{
|
||||||
public Func<BasicStorage, string, bool> Test { get; set; }
|
public Func<BasicStorage, string, bool> Test { get; set; }
|
||||||
public Type Type { get; set; }
|
public Type Type { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<Reader> readers { get; } = new List<Reader>();
|
private static List<Reader> readers { get; } = new List<Reader>();
|
||||||
|
|
||||||
public static ArchiveReader GetReader(BasicStorage storage, string path)
|
public static ArchiveReader GetReader(BasicStorage storage, string path)
|
||||||
{
|
{
|
||||||
foreach (var reader in readers)
|
foreach (var reader in readers)
|
||||||
{
|
{
|
||||||
if (reader.Test(storage, path))
|
if (reader.Test(storage, path))
|
||||||
return (ArchiveReader)Activator.CreateInstance(reader.Type, storage.GetStream(path));
|
return (ArchiveReader)Activator.CreateInstance(reader.Type, storage.GetStream(path));
|
||||||
}
|
}
|
||||||
throw new IOException(@"Unknown file format");
|
throw new IOException(@"Unknown file format");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void AddReader<T>(Func<BasicStorage, string, bool> test) where T : ArchiveReader
|
protected static void AddReader<T>(Func<BasicStorage, string, bool> test) where T : ArchiveReader
|
||||||
{
|
{
|
||||||
readers.Add(new Reader { Test = test, Type = typeof(T) });
|
readers.Add(new Reader { Test = test, Type = typeof(T) });
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the beatmap metadata from this archive.
|
/// Reads the beatmap metadata from this archive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract BeatmapMetadata ReadMetadata();
|
public abstract BeatmapMetadata ReadMetadata();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of beatmap file names.
|
/// Gets a list of beatmap file names.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract string[] ReadBeatmaps();
|
public abstract string[] ReadBeatmaps();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens a stream for reading a specific file from this archive.
|
/// Opens a stream for reading a specific file from this archive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract Stream ReadFile(string name);
|
public abstract Stream ReadFile(string name);
|
||||||
|
|
||||||
public abstract void Dispose();
|
public abstract void Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,39 +1,39 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Ionic.Zip;
|
using Ionic.Zip;
|
||||||
using osu.Game.Beatmaps.Formats;
|
using osu.Game.Beatmaps.Formats;
|
||||||
|
|
||||||
namespace osu.Game.Beatmaps.IO
|
namespace osu.Game.Beatmaps.IO
|
||||||
{
|
{
|
||||||
public sealed class OszArchiveReader : ArchiveReader
|
public sealed class OszArchiveReader : ArchiveReader
|
||||||
{
|
{
|
||||||
public static void Register()
|
public static void Register()
|
||||||
{
|
{
|
||||||
AddReader<OszArchiveReader>((storage, path) =>
|
AddReader<OszArchiveReader>((storage, path) =>
|
||||||
{
|
{
|
||||||
using (var stream = storage.GetStream(path))
|
using (var stream = storage.GetStream(path))
|
||||||
return ZipFile.IsZipFile(stream, false);
|
return ZipFile.IsZipFile(stream, false);
|
||||||
});
|
});
|
||||||
OsuLegacyDecoder.Register();
|
OsuLegacyDecoder.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ZipFile archive { get; set; }
|
private ZipFile archive { get; set; }
|
||||||
private string[] beatmaps { get; set; }
|
private string[] beatmaps { get; set; }
|
||||||
private Beatmap firstMap { get; set; }
|
private Beatmap firstMap { get; set; }
|
||||||
|
|
||||||
public OszArchiveReader(Stream archiveStream)
|
public OszArchiveReader(Stream archiveStream)
|
||||||
{
|
{
|
||||||
archive = ZipFile.Read(archiveStream);
|
archive = ZipFile.Read(archiveStream);
|
||||||
beatmaps = archive.Entries.Where(e => e.FileName.EndsWith(@".osu"))
|
beatmaps = archive.Entries.Where(e => e.FileName.EndsWith(@".osu"))
|
||||||
.Select(e => e.FileName).ToArray();
|
.Select(e => e.FileName).ToArray();
|
||||||
if (beatmaps.Length == 0)
|
if (beatmaps.Length == 0)
|
||||||
throw new FileNotFoundException(@"This directory contains no beatmaps");
|
throw new FileNotFoundException(@"This directory contains no beatmaps");
|
||||||
using (var stream = new StreamReader(ReadFile(beatmaps[0])))
|
using (var stream = new StreamReader(ReadFile(beatmaps[0])))
|
||||||
{
|
{
|
||||||
var decoder = BeatmapDecoder.GetDecoder(stream);
|
var decoder = BeatmapDecoder.GetDecoder(stream);
|
||||||
firstMap = decoder.Decode(stream);
|
firstMap = decoder.Decode(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string[] ReadBeatmaps()
|
public override string[] ReadBeatmaps()
|
||||||
@ -43,9 +43,9 @@ namespace osu.Game.Beatmaps.IO
|
|||||||
|
|
||||||
public override Stream ReadFile(string name)
|
public override Stream ReadFile(string name)
|
||||||
{
|
{
|
||||||
ZipEntry entry = archive.Entries.SingleOrDefault(e => e.FileName == name);
|
ZipEntry entry = archive.Entries.SingleOrDefault(e => e.FileName == name);
|
||||||
if (entry == null)
|
if (entry == null)
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
return entry.OpenReader();
|
return entry.OpenReader();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,9 +53,10 @@ namespace osu.Game.Beatmaps.IO
|
|||||||
{
|
{
|
||||||
return firstMap.Metadata;
|
return firstMap.Metadata;
|
||||||
}
|
}
|
||||||
public override void Dispose()
|
|
||||||
{
|
public override void Dispose()
|
||||||
archive.Dispose();
|
{
|
||||||
|
archive.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Catch
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Catch
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Catch
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Objects.Osu;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Mania
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Mania
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Mania
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Osu
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Beatmaps.Objects.Osu
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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
|
namespace osu.Game.Beatmaps.Objects.Taiko
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Samples
|
namespace osu.Game.Beatmaps.Samples
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Samples
|
namespace osu.Game.Beatmaps.Samples
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Configuration;
|
using osu.Framework.Configuration;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
@ -7,44 +7,45 @@ using osu.Game.Beatmaps.Formats;
|
|||||||
using osu.Game.Beatmaps.IO;
|
using osu.Game.Beatmaps.IO;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public class BeatmapDatabase
|
public class BeatmapDatabase
|
||||||
{
|
{
|
||||||
private static SQLiteConnection connection { get; set; }
|
private static SQLiteConnection connection { get; set; }
|
||||||
|
|
||||||
public BeatmapDatabase(BasicStorage storage)
|
public BeatmapDatabase(BasicStorage storage)
|
||||||
{
|
{
|
||||||
if (connection == null)
|
if (connection == null)
|
||||||
{
|
{
|
||||||
connection = storage.GetDatabase(@"beatmaps");
|
connection = storage.GetDatabase(@"beatmaps");
|
||||||
connection.CreateTable<BeatmapMetadata>();
|
connection.CreateTable<BeatmapMetadata>();
|
||||||
connection.CreateTable<BaseDifficulty>();
|
connection.CreateTable<BaseDifficulty>();
|
||||||
connection.CreateTable<BeatmapSet>();
|
connection.CreateTable<BeatmapSet>();
|
||||||
connection.CreateTable<Beatmap>();
|
connection.CreateTable<Beatmap>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void AddBeatmap(ArchiveReader input)
|
|
||||||
{
|
public void AddBeatmap(ArchiveReader input)
|
||||||
var metadata = input.ReadMetadata();
|
{
|
||||||
|
var metadata = input.ReadMetadata();
|
||||||
if (connection.Table<BeatmapSet>().Count(b => b.BeatmapSetID == metadata.BeatmapSetID) != 0)
|
if (connection.Table<BeatmapSet>().Count(b => b.BeatmapSetID == metadata.BeatmapSetID) != 0)
|
||||||
return;
|
return;
|
||||||
string[] mapNames = input.ReadBeatmaps();
|
string[] mapNames = input.ReadBeatmaps();
|
||||||
var beatmapSet = new BeatmapSet { BeatmapSetID = metadata.BeatmapSetID };
|
var beatmapSet = new BeatmapSet { BeatmapSetID = metadata.BeatmapSetID };
|
||||||
var maps = new List<Beatmap>();
|
var maps = new List<Beatmap>();
|
||||||
foreach (var name in mapNames)
|
foreach (var name in mapNames)
|
||||||
{
|
{
|
||||||
using (var stream = new StreamReader(input.ReadFile(name)))
|
using (var stream = new StreamReader(input.ReadFile(name)))
|
||||||
{
|
{
|
||||||
var decoder = BeatmapDecoder.GetDecoder(stream);
|
var decoder = BeatmapDecoder.GetDecoder(stream);
|
||||||
var beatmap = decoder.Decode(stream);
|
var beatmap = decoder.Decode(stream);
|
||||||
maps.Add(beatmap);
|
maps.Add(beatmap);
|
||||||
beatmap.BaseDifficultyID = connection.Insert(beatmap.BaseDifficulty);
|
beatmap.BaseDifficultyID = connection.Insert(beatmap.BaseDifficulty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
beatmapSet.BeatmapMetadataID = connection.Insert(metadata);
|
beatmapSet.BeatmapMetadataID = connection.Insert(metadata);
|
||||||
connection.Insert(beatmapSet);
|
connection.Insert(beatmapSet);
|
||||||
connection.InsertAll(maps);
|
connection.InsertAll(maps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.GameModes.Backgrounds
|
namespace osu.Game.GameModes.Backgrounds
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.GameModes.Direct
|
namespace osu.Game.GameModes.Direct
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using OpenTK;
|
using OpenTK;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Framework.Graphics;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Framework.Graphics;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Framework.Graphics;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Framework.Graphics;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Framework.Graphics;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 OpenTK;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 System.Collections.Generic;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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.Input;
|
using OpenTK.Input;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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 OpenTK;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//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;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user