sinmai-mods/MoreChartFormats/MaiSxt/Structures/SxtRow.cs
2024-05-27 10:59:40 +07:00

27 lines
907 B
C#

using System.Runtime.CompilerServices;
using Manager;
using MoreChartFormats.Simai.Structures;
namespace MoreChartFormats.MaiSxt.Structures;
public struct SxtRow
{
public float Bar;
public float Grid;
public float HoldDuration;
public int Position;
public int NoteType;
public int SlideId;
public int SlidePattern;
// public int SlideCount;
public float? SlideDelay;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly NotesTime NotesTime(NotesReader nr) => new NotesTime((int)Bar, (int)(Grid * nr.getResolution()), nr);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly NotesTime SlideDelayNotesTime(NotesReferences refs) => SlideDelay.HasValue
? ParserUtilities.NotesTimeFromBars(refs, SlideDelay.Value)
: new NotesTime(0, refs.Header._resolutionTime / 4, refs.Reader);
}