sinmai-mods/MoreChartFormats/MaiSxt/Structures/SxtRow.cs

27 lines
907 B
C#
Raw Normal View History

2024-05-27 05:59:40 +02:00
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);
}