Skip to content
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch.Tests/Resources/old-skin/skin.ini

This file was deleted.

1 change: 1 addition & 0 deletions osu.Game.Rulesets.Mania/ManiaRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class ManiaRuleset : Ruleset, ILegacyRuleset
return new ManiaArgonSkinTransformer(skin, beatmap);

case DefaultLegacySkin:
case RetroSkin:
return new ManiaClassicSkinTransformer(skin, beatmap);

case LegacySkin:
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
6 changes: 0 additions & 6 deletions osu.Game.Rulesets.Osu.Tests/Resources/old-skin/skin.ini

This file was deleted.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Binary file not shown.
Diff not rendered.
5 changes: 0 additions & 5 deletions osu.Game.Rulesets.Taiko.Tests/Resources/old-skin/skin.ini

This file was deleted.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-0.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-1.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-2.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-3.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-4.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-5.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-6.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-7.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-8.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-9.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-comma.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-dot.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-percent.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/score-x.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/scorebar-bg.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/scorebar-colour-0.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/scorebar-colour-1.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/scorebar-colour-2.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/scorebar-colour-3.png
Diff not rendered.
Binary file removed osu.Game.Tests/Resources/old-skin/scorebar-ki.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 0 additions & 2 deletions osu.Game.Tests/Resources/old-skin/skin.ini

This file was deleted.

1 change: 1 addition & 0 deletions osu.Game/Overlays/Settings/Sections/SkinSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private void skinsChanged(IRealmCollection<SkinInfo> sender, ChangeSet changes)
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.ARGON_PRO_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.TRIANGLES_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.CLASSIC_SKIN).ToLive(realm));
dropdownItems.Add(sender.Single(s => s.ID == SkinInfo.RETRO_SKIN).ToLive(realm));

dropdownItems.Add(random_skin_info);

Expand Down
1 change: 1 addition & 0 deletions osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ private Background createBackground()
case TrianglesSkin:
case ArgonSkin:
case DefaultLegacySkin:
case RetroSkin:
// default skins should use the default background rotation, which won't be the case if a SkinBackground is created for them.
break;

Expand Down
58 changes: 58 additions & 0 deletions osu.Game/Skinning/RetroSkin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using JetBrains.Annotations;
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using osu.Game.Extensions;
using osu.Game.IO;

namespace osu.Game.Skinning
{
/// <summary>
/// A skin that looks like osu!stable as it was around 2008.
/// </summary>
/// <remarks>
/// "Around 2008" was chosen as the cutoff for this skin because that's when the look of core gameplay settled into its final design (until <see cref="DefaultLegacySkin"/>). Skin elements from later versions of osu! were preferred as long as they only fixed bugs or applied minor tweaks to 2008 elements.
/// </remarks>
public class RetroSkin : LegacySkin
{
public static SkinInfo CreateInfo() => new SkinInfo
{
ID = Skinning.SkinInfo.RETRO_SKIN,
Name = "osu! \"retro\" (2008)",
Creator = "team osu!",
Protected = true,
InstantiationInfo = typeof(RetroSkin).GetInvariantInstantiationInfo(),
};

public RetroSkin(IStorageResourceProvider resources)
: this(CreateInfo(), resources)
{
}

[UsedImplicitly(ImplicitUseKindFlags.InstantiatedWithFixedConstructorSignature)]
public RetroSkin(SkinInfo skin, IStorageResourceProvider resources)
: base(
skin,
resources,
new NamespacedResourceStore<byte[]>(resources.Resources, "Skins/Retro")
)
{
}

public override Texture? GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT)
{
// Retro taiko hit explosions use osu textures
if (componentName.StartsWith("taiko-hit", StringComparison.Ordinal))
componentName = componentName.Substring(6);

// Retro taiko slider has no fail variant, but it needs to exist to avoid displaying nothing
if (componentName == "taiko-slider-fail")
componentName = "taiko-slider";

return base.GetTexture(componentName, wrapModeS, wrapModeT);
}
}
}
1 change: 1 addition & 0 deletions osu.Game/Skinning/SkinInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class SkinInfo : RealmObject, IHasRealmFiles, IEquatable<SkinInfo>, IHasG
internal static readonly Guid ARGON_SKIN = new Guid("CFFA69DE-B3E3-4DEE-8563-3C4F425C05D0");
internal static readonly Guid ARGON_PRO_SKIN = new Guid("9FC9CF5D-0F16-4C71-8256-98868321AC43");
internal static readonly Guid CLASSIC_SKIN = new Guid("81F02CD3-EEC6-4865-AC23-FAE26A386187");
internal static readonly Guid RETRO_SKIN = new Guid("0555C76A-CC6B-4BB4-9548-DF76BA72EF25");
internal static readonly Guid RANDOM_SKIN = new Guid("D39DFEFB-477C-4372-B1EA-2BCEA5FB8908");

[PrimaryKey]
Expand Down
6 changes: 6 additions & 0 deletions osu.Game/Skinning/SkinManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public class SkinManager : ModelManager<SkinInfo>, ISkinSource, IStorageResource

private Skin trianglesSkin { get; }

private Skin retroSkin { get; }

public override bool PauseImports
{
get => base.PauseImports;
Expand Down Expand Up @@ -91,6 +93,7 @@ public SkinManager(Storage storage, RealmAccess realm, GameHost host, IResourceS

var defaultSkins = new[]
{
retroSkin = new RetroSkin(this),
DefaultClassicSkin = new DefaultLegacySkin(this),
trianglesSkin = new TrianglesSkin(this),
argonSkin = new ArgonSkin(this),
Expand Down Expand Up @@ -369,6 +372,9 @@ public void SetSkinFromConfiguration(string guidString)
{
if (guid == SkinInfo.CLASSIC_SKIN)
skinInfo = DefaultClassicSkin.SkinInfo;

if (guid == SkinInfo.RETRO_SKIN)
skinInfo = retroSkin.SkinInfo;
}

CurrentSkinInfo.Value = skinInfo ?? trianglesSkin.SkinInfo;
Expand Down
1 change: 1 addition & 0 deletions osu.Game/Skinning/SkinnableSprite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ static bool isUserSkin(ISkin skin)
|| skin.GetType() == typeof(ArgonProSkin)
|| skin.GetType() == typeof(ArgonSkin)
|| skin.GetType() == typeof(DefaultLegacySkin)
|| skin.GetType() == typeof(RetroSkin)
|| skin.GetType() == typeof(LegacySkin);
}
}
Expand Down
6 changes: 3 additions & 3 deletions osu.Game/Tests/Visual/SkinnableTestScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public abstract partial class SkinnableTestScene : OsuGridTestScene, IStorageRes
private Skin legacySkin;
private Skin argonSkin;
private Skin specialSkin;
private Skin oldSkin;
private Skin retroSkin;

[Resolved]
private GameHost host { get; set; }
Expand All @@ -54,7 +54,7 @@ private void load()
metricsSkin = new TestLegacySkin(new SkinInfo { Name = "metrics-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/metrics_skin"), this, true);
legacySkin = new DefaultLegacySkin(this);
specialSkin = new TestLegacySkin(new SkinInfo { Name = "special-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/special_skin"), this, true);
oldSkin = new TestLegacySkin(new SkinInfo { Name = "old-skin" }, new NamespacedResourceStore<byte[]>(dllStore, "Resources/old_skin"), this, true);
retroSkin = new RetroSkin(this);
}

private readonly List<Drawable> createdDrawables = new List<Drawable>();
Expand All @@ -70,7 +70,7 @@ protected void SetContents(Func<ISkin, Drawable> creationFunction)
Cell(2).Child = createProvider(metricsSkin, creationFunction, beatmap);
Cell(3).Child = createProvider(legacySkin, creationFunction, beatmap);
Cell(4).Child = createProvider(specialSkin, creationFunction, beatmap);
Cell(5).Child = createProvider(oldSkin, creationFunction, beatmap);
Cell(5).Child = createProvider(retroSkin, creationFunction, beatmap);
}

protected IEnumerable<Drawable> CreatedDrawables => createdDrawables;
Expand Down
Loading