mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Split retrieving of beatmap and storyboard decoder
Storyboard works again. Not satisfied with the solution though.
This commit is contained in:
@ -9,34 +9,25 @@ using osu.Game.Storyboards;
|
||||
|
||||
namespace osu.Game.Beatmaps.Formats
|
||||
{
|
||||
public class LegacyDecoder : BeatmapDecoder
|
||||
public abstract class LegacyDecoder : Decoder
|
||||
{
|
||||
public static void Register()
|
||||
{
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v14");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v13");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v12");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v11");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v10");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v9");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v8");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v7");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v6");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v5");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v4");
|
||||
AddDecoder<LegacyBeatmapDecoder>(@"osu file format v3");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v14");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v13");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v12");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v11");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v10");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v9");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v8");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v7");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v6");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v5");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v4");
|
||||
AddDecoder<LegacyBeatmapDecoder, LegacyStoryboardDecoder>(@"osu file format v3");
|
||||
// TODO: differences between versions
|
||||
}
|
||||
|
||||
public LegacyDecoder()
|
||||
{
|
||||
}
|
||||
|
||||
public LegacyDecoder(string header)
|
||||
{
|
||||
BeatmapVersion = int.Parse(header.Substring(17));
|
||||
}
|
||||
|
||||
protected Beatmap Beatmap;
|
||||
protected Storyboard Storyboard;
|
||||
|
||||
@ -105,10 +96,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void ProcessSection(Section section, string line)
|
||||
{
|
||||
|
||||
}
|
||||
protected abstract void ProcessSection(Section section, string line);
|
||||
|
||||
/// <summary>
|
||||
/// Decodes any beatmap variables present in a line into their real values.
|
||||
|
Reference in New Issue
Block a user