Implement most of the legacy beatmap decoder

Missing timing points, events, and hit object decoders remain to be
written
This commit is contained in:
Drew DeVault
2016-10-07 16:19:24 -04:00
committed by Dean Herbert
parent 32ab8f97bb
commit 9b4bc3e36d
5 changed files with 128 additions and 11 deletions

View File

@ -1,7 +1,9 @@
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Beatmaps.Objects.Osu;
using osu.Game.Beatmaps.Samples;
using osu.Game.GameModes.Play;
namespace osu.Game.Beatmaps.Objects
{
@ -16,5 +18,16 @@ namespace osu.Game.Beatmaps.Objects
public double Duration => (EndTime ?? StartTime) - StartTime;
public HitSampleInfo Sample;
public static HitObject Parse(PlayMode mode, string val)
{
switch (mode)
{
case PlayMode.Osu:
return OsuBaseHit.Parse(val);
default:
return null;
}
}
}
}