mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Framework updates.
This commit is contained in:
Submodule osu-framework updated: de1568254c...6e1f811d9d
@ -24,7 +24,7 @@ namespace osu.Desktop.VisualTests
|
|||||||
private double timePerTest = 200;
|
private double timePerTest = 200;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BaseGame game)
|
private void load(Framework.Game game)
|
||||||
{
|
{
|
||||||
Host.MaximumDrawHz = int.MaxValue;
|
Host.MaximumDrawHz = int.MaxValue;
|
||||||
Host.MaximumUpdateHz = int.MaxValue;
|
Host.MaximumUpdateHz = int.MaxValue;
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Desktop.VisualTests
|
|||||||
{
|
{
|
||||||
bool benchmark = args.Length > 0 && args[0] == @"-benchmark";
|
bool benchmark = args.Length > 0 && args[0] == @"-benchmark";
|
||||||
|
|
||||||
using (BasicGameHost host = Host.GetSuitableHost(@"osu"))
|
using (GameHost host = Host.GetSuitableHost(@"osu"))
|
||||||
{
|
{
|
||||||
Ruleset.Register(new OsuRuleset());
|
Ruleset.Register(new OsuRuleset());
|
||||||
Ruleset.Register(new TaikoRuleset());
|
Ruleset.Register(new TaikoRuleset());
|
||||||
|
@ -42,7 +42,7 @@ namespace osu.Desktop
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetHost(BasicGameHost host)
|
public override void SetHost(GameHost host)
|
||||||
{
|
{
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
var desktopWindow = host.Window as DesktopGameWindow;
|
var desktopWindow = host.Window as DesktopGameWindow;
|
||||||
|
@ -3,14 +3,9 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using osu.Desktop.Beatmaps.IO;
|
using osu.Desktop.Beatmaps.IO;
|
||||||
using osu.Framework;
|
|
||||||
using osu.Framework.Desktop;
|
using osu.Framework.Desktop;
|
||||||
using osu.Framework.Desktop.Platform;
|
using osu.Framework.Desktop.Platform;
|
||||||
using osu.Framework.Platform;
|
|
||||||
using osu.Game;
|
|
||||||
using osu.Game.IPC;
|
using osu.Game.IPC;
|
||||||
using osu.Game.Modes;
|
using osu.Game.Modes;
|
||||||
using osu.Game.Modes.Catch;
|
using osu.Game.Modes.Catch;
|
||||||
@ -51,8 +46,7 @@ namespace osu.Desktop
|
|||||||
Ruleset.Register(new ManiaRuleset());
|
Ruleset.Register(new ManiaRuleset());
|
||||||
Ruleset.Register(new CatchRuleset());
|
Ruleset.Register(new CatchRuleset());
|
||||||
|
|
||||||
BaseGame osu = new OsuGameDesktop(args);
|
host.Add(new OsuGameDesktop(args));
|
||||||
host.Add(osu);
|
|
||||||
host.Run();
|
host.Run();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -65,7 +65,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private OsuGameBase loadOsu(BasicGameHost host)
|
private OsuGameBase loadOsu(GameHost host)
|
||||||
{
|
{
|
||||||
var osu = new OsuGameBase();
|
var osu = new OsuGameBase();
|
||||||
host.Add(osu);
|
host.Add(osu);
|
||||||
|
@ -14,13 +14,13 @@ namespace osu.Game.Beatmaps.IO
|
|||||||
{
|
{
|
||||||
private class Reader
|
private class Reader
|
||||||
{
|
{
|
||||||
public Func<BasicStorage, string, bool> Test { get; set; }
|
public Func<Storage, 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(Storage storage, string path)
|
||||||
{
|
{
|
||||||
foreach (var reader in readers)
|
foreach (var reader in readers)
|
||||||
{
|
{
|
||||||
@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps.IO
|
|||||||
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<Storage, string, bool> test) where T : ArchiveReader
|
||||||
{
|
{
|
||||||
readers.Add(new Reader { Test = test, Type = typeof(T) });
|
readers.Add(new Reader { Test = test, Type = typeof(T) });
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ namespace osu.Game.Configuration
|
|||||||
public string GetUnicodeString(string nonunicode, string unicode)
|
public string GetUnicodeString(string nonunicode, string unicode)
|
||||||
=> Get<bool>(OsuConfig.ShowUnicode) ? unicode ?? nonunicode : nonunicode ?? unicode;
|
=> Get<bool>(OsuConfig.ShowUnicode) ? unicode ?? nonunicode : nonunicode ?? unicode;
|
||||||
|
|
||||||
public OsuConfigManager(BasicStorage storage) : base(storage)
|
public OsuConfigManager(Storage storage) : base(storage)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,12 +22,12 @@ namespace osu.Game.Database
|
|||||||
public class BeatmapDatabase
|
public class BeatmapDatabase
|
||||||
{
|
{
|
||||||
private SQLiteConnection connection { get; set; }
|
private SQLiteConnection connection { get; set; }
|
||||||
private BasicStorage storage;
|
private Storage storage;
|
||||||
public event Action<BeatmapSetInfo> BeatmapSetAdded;
|
public event Action<BeatmapSetInfo> BeatmapSetAdded;
|
||||||
|
|
||||||
private BeatmapImporter ipc;
|
private BeatmapImporter ipc;
|
||||||
|
|
||||||
public BeatmapDatabase(BasicStorage storage, BasicGameHost importHost = null)
|
public BeatmapDatabase(Storage storage, GameHost importHost = null)
|
||||||
{
|
{
|
||||||
this.storage = storage;
|
this.storage = storage;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ namespace osu.Game.IPC
|
|||||||
private IpcChannel<BeatmapImportMessage> channel;
|
private IpcChannel<BeatmapImportMessage> channel;
|
||||||
private BeatmapDatabase beatmaps;
|
private BeatmapDatabase beatmaps;
|
||||||
|
|
||||||
public BeatmapImporter(BasicGameHost host, BeatmapDatabase beatmaps = null)
|
public BeatmapImporter(GameHost host, BeatmapDatabase beatmaps = null)
|
||||||
{
|
{
|
||||||
this.beatmaps = beatmaps;
|
this.beatmaps = beatmaps;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ using osu.Game.Online.API;
|
|||||||
|
|
||||||
namespace osu.Game
|
namespace osu.Game
|
||||||
{
|
{
|
||||||
public class OsuGameBase : BaseGame, IOnlineComponent
|
public class OsuGameBase : Framework.Game, IOnlineComponent
|
||||||
{
|
{
|
||||||
protected OsuConfigManager LocalConfig;
|
protected OsuConfigManager LocalConfig;
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ namespace osu.Game
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetHost(BasicGameHost host)
|
public override void SetHost(GameHost host)
|
||||||
{
|
{
|
||||||
if (LocalConfig == null)
|
if (LocalConfig == null)
|
||||||
LocalConfig = new OsuConfigManager(host.Storage);
|
LocalConfig = new OsuConfigManager(host.Storage);
|
||||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Overlays
|
|||||||
private Bindable<bool> preferUnicode;
|
private Bindable<bool> preferUnicode;
|
||||||
private WorkingBeatmap current;
|
private WorkingBeatmap current;
|
||||||
private BeatmapDatabase beatmaps;
|
private BeatmapDatabase beatmaps;
|
||||||
private BaseGame game;
|
private Framework.Game game;
|
||||||
|
|
||||||
private Container dragContainer;
|
private Container dragContainer;
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ namespace osu.Game.Overlays
|
|||||||
updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev);
|
updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PerformLoad(BaseGame game)
|
protected override void PerformLoad(Framework.Game game)
|
||||||
{
|
{
|
||||||
this.game = game;
|
this.game = game;
|
||||||
base.PerformLoad(game);
|
base.PerformLoad(game);
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
|||||||
protected override string Header => "Updates";
|
protected override string Header => "Updates";
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BasicStorage storage, OsuConfigManager config)
|
private void load(Storage storage, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -29,10 +29,10 @@ namespace osu.Game.Screens
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseGame game;
|
Framework.Game game;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BaseGame game)
|
private void load(Framework.Game game)
|
||||||
{
|
{
|
||||||
this.game = game;
|
this.game = game;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Screens.Backgrounds
|
|||||||
public class BackgroundScreenDefault : BackgroundScreen
|
public class BackgroundScreenDefault : BackgroundScreen
|
||||||
{
|
{
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(BaseGame game)
|
private void load(Framework.Game game)
|
||||||
{
|
{
|
||||||
Add(new Background(@"Backgrounds/bg1"));
|
Add(new Background(@"Backgrounds/bg1"));
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
class PlayerInputManager : UserInputManager
|
class PlayerInputManager : UserInputManager
|
||||||
{
|
{
|
||||||
public PlayerInputManager(BasicGameHost host)
|
public PlayerInputManager(GameHost host)
|
||||||
: base(host)
|
: base(host)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(BeatmapDatabase beatmaps, AudioManager audio, BaseGame game,
|
private void load(BeatmapDatabase beatmaps, AudioManager audio, Framework.Game game,
|
||||||
OsuGame osuGame, OsuColour colours)
|
OsuGame osuGame, OsuColour colours)
|
||||||
{
|
{
|
||||||
const float carousel_width = 640;
|
const float carousel_width = 640;
|
||||||
@ -328,7 +328,7 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game, bool select = false)
|
private void addBeatmapSet(BeatmapSetInfo beatmapSet, Framework.Game game, bool select = false)
|
||||||
{
|
{
|
||||||
beatmapSet = database.GetWithChildren<BeatmapSetInfo>(beatmapSet.ID);
|
beatmapSet = database.GetWithChildren<BeatmapSetInfo>(beatmapSet.ID);
|
||||||
beatmapSet.Beatmaps.ForEach(b =>
|
beatmapSet.Beatmaps.ForEach(b =>
|
||||||
@ -368,7 +368,7 @@ namespace osu.Game.Screens.Select
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addBeatmapSets(BaseGame game, CancellationToken token)
|
private void addBeatmapSets(Framework.Game game, CancellationToken token)
|
||||||
{
|
{
|
||||||
foreach (var beatmapSet in database.Query<BeatmapSetInfo>())
|
foreach (var beatmapSet in database.Query<BeatmapSetInfo>())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user