Temporary changes

This commit is contained in:
Craftplacer 2020-08-12 06:38:05 +02:00
parent 8ffaa49839
commit 69590113d6
3 changed files with 21 additions and 3 deletions

View File

@ -10,6 +10,7 @@ using System.Text;
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Formats;
@ -19,6 +20,7 @@ using osu.Game.Rulesets.Catch;
using osu.Game.Rulesets.Mania; using osu.Game.Rulesets.Mania;
using osu.Game.Rulesets.Osu; using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Taiko; using osu.Game.Rulesets.Taiko;
using osu.Game.Skinning;
using osu.Game.Tests.Resources; using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Beatmaps.Formats namespace osu.Game.Tests.Beatmaps.Formats
@ -61,7 +63,11 @@ namespace osu.Game.Tests.Beatmaps.Formats
var stream = new MemoryStream(); var stream = new MemoryStream();
using (var writer = new StreamWriter(stream, Encoding.UTF8, 1024, true)) using (var writer = new StreamWriter(stream, Encoding.UTF8, 1024, true))
new LegacyBeatmapEncoder(beatmap).Encode(writer); using (var rs = new ResourceStore<byte[]>())
{
var skin = new LegacyBeatmapSkin(beatmap.BeatmapInfo, rs, null);
new LegacyBeatmapEncoder(beatmap, skin).Encode(writer);
}
stream.Position = 0; stream.Position = 0;

View File

@ -4,6 +4,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.IO.Stores;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Formats;
@ -14,6 +15,7 @@ using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Beatmaps; using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Screens.Edit; using osu.Game.Screens.Edit;
using osu.Game.Skinning;
using osuTK; using osuTK;
using Decoder = osu.Game.Beatmaps.Formats.Decoder; using Decoder = osu.Game.Beatmaps.Formats.Decoder;
@ -351,7 +353,11 @@ namespace osu.Game.Tests.Editing
using (var encoded = new MemoryStream()) using (var encoded = new MemoryStream())
{ {
using (var sw = new StreamWriter(encoded)) using (var sw = new StreamWriter(encoded))
new LegacyBeatmapEncoder(beatmap).Encode(sw); using (var rs = new ResourceStore<byte[]>())
{
var skin = new LegacyBeatmapSkin(beatmap.BeatmapInfo, rs, null);
new LegacyBeatmapEncoder(beatmap, skin).Encode(sw);
}
return encoded.ToArray(); return encoded.ToArray();
} }

View File

@ -6,8 +6,10 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps.Formats; using osu.Game.Beatmaps.Formats;
using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Objects;
using osu.Game.Skinning;
namespace osu.Game.Screens.Edit namespace osu.Game.Screens.Edit
{ {
@ -85,7 +87,11 @@ namespace osu.Game.Screens.Edit
using (var stream = new MemoryStream()) using (var stream = new MemoryStream())
{ {
using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true)) using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true))
new LegacyBeatmapEncoder(editorBeatmap).Encode(sw); using (var rs = new ResourceStore<byte[]>())
{
var skin = new LegacyBeatmapSkin(editorBeatmap.BeatmapInfo, rs, null);
new LegacyBeatmapEncoder(editorBeatmap, skin).Encode(sw);
}
savedStates.Add(stream.ToArray()); savedStates.Add(stream.ToArray());
} }