mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 11:23:23 +08:00
commit
5076ff7684
@ -1 +1 @@
|
||||
Subproject commit de1568254c4c9a4ea540ccad94700c5c51f70dc2
|
||||
Subproject commit 56535b834cf2329e5abc8ecf698d19ece9ef7b07
|
@ -24,7 +24,7 @@ namespace osu.Desktop.VisualTests
|
||||
private double timePerTest = 200;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BaseGame game)
|
||||
private void load(Framework.Game game)
|
||||
{
|
||||
Host.MaximumDrawHz = int.MaxValue;
|
||||
Host.MaximumUpdateHz = int.MaxValue;
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Desktop.VisualTests
|
||||
{
|
||||
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 TaikoRuleset());
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Desktop
|
||||
};
|
||||
}
|
||||
|
||||
public override void SetHost(BasicGameHost host)
|
||||
public override void SetHost(GameHost host)
|
||||
{
|
||||
base.SetHost(host);
|
||||
var desktopWindow = host.Window as DesktopGameWindow;
|
||||
|
@ -3,14 +3,9 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using osu.Desktop.Beatmaps.IO;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Desktop;
|
||||
using osu.Framework.Desktop.Platform;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game;
|
||||
using osu.Game.IPC;
|
||||
using osu.Game.Modes;
|
||||
using osu.Game.Modes.Catch;
|
||||
@ -51,8 +46,7 @@ namespace osu.Desktop
|
||||
Ruleset.Register(new ManiaRuleset());
|
||||
Ruleset.Register(new CatchRuleset());
|
||||
|
||||
BaseGame osu = new OsuGameDesktop(args);
|
||||
host.Add(osu);
|
||||
host.Add(new OsuGameDesktop(args));
|
||||
host.Run();
|
||||
}
|
||||
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();
|
||||
host.Add(osu);
|
||||
|
@ -14,13 +14,13 @@ namespace osu.Game.Beatmaps.IO
|
||||
{
|
||||
private class Reader
|
||||
{
|
||||
public Func<BasicStorage, string, bool> Test { get; set; }
|
||||
public Func<Storage, string, bool> Test { get; set; }
|
||||
public Type Type { get; set; }
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps.IO
|
||||
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) });
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ namespace osu.Game.Configuration
|
||||
public string GetUnicodeString(string nonunicode, string 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
|
||||
{
|
||||
private SQLiteConnection connection { get; set; }
|
||||
private BasicStorage storage;
|
||||
private Storage storage;
|
||||
public event Action<BeatmapSetInfo> BeatmapSetAdded;
|
||||
|
||||
private BeatmapImporter ipc;
|
||||
|
||||
public BeatmapDatabase(BasicStorage storage, BasicGameHost importHost = null)
|
||||
public BeatmapDatabase(Storage storage, GameHost importHost = null)
|
||||
{
|
||||
this.storage = storage;
|
||||
|
||||
|
@ -13,7 +13,7 @@ namespace osu.Game.IPC
|
||||
private IpcChannel<BeatmapImportMessage> channel;
|
||||
private BeatmapDatabase beatmaps;
|
||||
|
||||
public BeatmapImporter(BasicGameHost host, BeatmapDatabase beatmaps = null)
|
||||
public BeatmapImporter(GameHost host, BeatmapDatabase beatmaps = null)
|
||||
{
|
||||
this.beatmaps = beatmaps;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using osu.Game.Online.API;
|
||||
|
||||
namespace osu.Game
|
||||
{
|
||||
public class OsuGameBase : BaseGame, IOnlineComponent
|
||||
public class OsuGameBase : Framework.Game, IOnlineComponent
|
||||
{
|
||||
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)
|
||||
LocalConfig = new OsuConfigManager(host.Storage);
|
||||
|
@ -45,7 +45,7 @@ namespace osu.Game.Overlays
|
||||
private Bindable<bool> preferUnicode;
|
||||
private WorkingBeatmap current;
|
||||
private BeatmapDatabase beatmaps;
|
||||
private BaseGame game;
|
||||
private Framework.Game game;
|
||||
|
||||
private Container dragContainer;
|
||||
|
||||
@ -322,7 +322,7 @@ namespace osu.Game.Overlays
|
||||
updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev);
|
||||
}
|
||||
|
||||
protected override void PerformLoad(BaseGame game)
|
||||
protected override void PerformLoad(Framework.Game game)
|
||||
{
|
||||
this.game = game;
|
||||
base.PerformLoad(game);
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.General
|
||||
protected override string Header => "Updates";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BasicStorage storage, OsuConfigManager config)
|
||||
private void load(Storage storage, OsuConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -18,10 +18,10 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OptionLabel { Text = "Resolution: TODO dropdown" },
|
||||
new OsuCheckbox
|
||||
new OptionEnumDropDown<WindowMode>
|
||||
{
|
||||
LabelText = "Fullscreen mode",
|
||||
Bindable = config.GetBindable<bool>(FrameworkConfig.Fullscreen),
|
||||
LabelText = "Screen mode",
|
||||
Bindable = config.GetBindable<WindowMode>(FrameworkConfig.WindowMode),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
|
@ -29,10 +29,10 @@ namespace osu.Game.Screens
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseGame game;
|
||||
Framework.Game game;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BaseGame game)
|
||||
private void load(Framework.Game game)
|
||||
{
|
||||
this.game = game;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Screens.Backgrounds
|
||||
public class BackgroundScreenDefault : BackgroundScreen
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(BaseGame game)
|
||||
private void load(Framework.Game game)
|
||||
{
|
||||
Add(new Background(@"Backgrounds/bg1"));
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
class PlayerInputManager : UserInputManager
|
||||
{
|
||||
public PlayerInputManager(BasicGameHost host)
|
||||
public PlayerInputManager(GameHost host)
|
||||
: base(host)
|
||||
{
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Screens.Select
|
||||
FilterControl filter;
|
||||
|
||||
[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)
|
||||
{
|
||||
const float carousel_width = 640;
|
||||
@ -317,7 +317,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.Beatmaps.ForEach(b =>
|
||||
@ -357,7 +357,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>())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user