Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ppy.osu.Game from 2022.709.1 to 2022.810.0 #158

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Gamebosu/GamebosuRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override IEnumerable<KeyBinding> GetDefaultKeyBindings(int variant = 0) =
new KeyBinding(InputKey.BackSpace, GamebosuAction.ButtonStart),
};

public override Drawable CreateIcon() => new RulesetIcon(new TextureStore(new TextureLoaderStore(CreateResourceStore()), false))
public override Drawable CreateIcon() => new RulesetIcon(this)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Expand Down
14 changes: 12 additions & 2 deletions osu.Game.Rulesets.Gamebosu/Graphics/RulesetIcon.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// gamebosu! ruleset. Copyright Lucas ARRIESSE aka Game4all. Licensed under GPLv3.
// See LICENSE at root of repo for more information on licensing.

using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Platform;
using osuTK;
using osuTK.Graphics;

Expand All @@ -14,7 +16,15 @@ public class RulesetIcon : CompositeDrawable
{
protected override bool CanBeFlattened => true;

public RulesetIcon(TextureStore store)
private readonly GamebosuRuleset ruleset;

public RulesetIcon(GamebosuRuleset ruleset)
{
this.ruleset = ruleset;
}

[BackgroundDependencyLoader]
private void load(GameHost host)
{
AutoSizeAxes = Axes.Both;
InternalChildren = new Drawable[]
Expand All @@ -31,7 +41,7 @@ public RulesetIcon(TextureStore store)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Texture = store.Get("Textures/logo_pixelated.png"),
Texture = new TextureStore(host.Renderer, new TextureLoaderStore(ruleset.CreateResourceStore())).Get("Textures/logo_pixelated.png"),
FillMode = FillMode.Fit,
Size = new Vector2(40)
}
Expand Down
10 changes: 9 additions & 1 deletion osu.Game.Rulesets.Gamebosu/UI/Gameboy/DrawableGameboyScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using System;
using osu.Framework.Allocation;
using osu.Framework.Platform;
using SixLabors.ImageSharp.PixelFormats;

namespace osu.Game.Rulesets.Gamebosu.UI.Gameboy
{
Expand All @@ -16,9 +19,14 @@ public class DrawableGameboyScreen : Sprite, IVideoOutput
private readonly SpanTextureUpload upload;
private Memory<byte> screenData;

[BackgroundDependencyLoader]
private void load(GameHost host)
{
Texture = host.Renderer.CreateTexture(160, 144, false, TextureFilteringMode.Nearest, WrapMode.ClampToEdge, WrapMode.ClampToEdge, new Rgba32(0xFFFFFFFF));
}

public DrawableGameboyScreen()
{
Texture = new Texture(160, 144);
screenData = new Memory<byte>(new byte[160 * 144 * sizeof(int)]); //since the 4 components of a color (r, g, b a) are each a byte (4 bytes in total), the same as an int.
upload = new SpanTextureUpload(screenData);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EmbeddedResource Include="Resources\**\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2022.709.1" />
<PackageReference Include="ppy.osu.Game" Version="2022.810.0" />
<ProjectReference Include="..\Emux\Emux.GameBoy\Emux.GameBoy.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release'">
Expand Down