Skip to content

Commit d054011

Browse files
committed
Whitespace.
1 parent e7da1eb commit d054011

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

RhythmGameUtilities/Scripts/Parsers.cs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ public static TimeSignature[] ParseTimeSignatureChangesFromChartSection(
115115
{
116116
return section
117117
.Where(item => item.Value.Length >= 2 && item.Value[0] == TypeCode.TimeSignatureMarker)
118-
.OrderBy(item => int.Parse(item.Key)).Select(
119-
item => new TimeSignature
120-
{
121-
Position = int.Parse(item.Key),
122-
Numerator = int.Parse(item.Value.Skip(1).First()),
123-
Denominator = item.Value.Length > 2 ? int.Parse(item.Value.Skip(2).First()) : 2
124-
}).ToArray();
118+
.OrderBy(item => int.Parse(item.Key)).Select(item => new TimeSignature
119+
{
120+
Position = int.Parse(item.Key),
121+
Numerator = int.Parse(item.Value.Skip(1).First()),
122+
Denominator = item.Value.Length > 2 ? int.Parse(item.Value.Skip(2).First()) : 2
123+
}).ToArray();
125124
}
126125

127126
public static Tempo[] ParseTempoChangesFromChartSection(
@@ -130,15 +129,15 @@ public static Tempo[] ParseTempoChangesFromChartSection(
130129
return section
131130
.Where(item => item.Value[0] == TypeCode.BPM_Marker)
132131
.Select(item => new KeyValuePair<int, int>(int.Parse(item.Key), int.Parse(item.Value.Skip(1).First())))
133-
.OrderBy(item => item.Key).Select(
134-
item => new Tempo { Position = item.Key, BPM = item.Value }).ToArray();
132+
.OrderBy(item => item.Key).Select(item => new Tempo { Position = item.Key, BPM = item.Value })
133+
.ToArray();
135134
}
136135

137136
public static Note[] ParseNotesFromChartSection(KeyValuePair<string, string[]>[] section)
138137
{
139138
return section
140-
.Where(item => item.Value.Length == 3 && item.Value[0] == TypeCode.NoteMarker).Select(
141-
item => new Note
139+
.Where(item => item.Value.Length == 3 && item.Value[0] == TypeCode.NoteMarker).Select(item =>
140+
new Note
142141
{
143142
Position = int.Parse(item.Key),
144143
HandPosition = int.Parse(item.Value.Skip(1).First()),
@@ -151,10 +150,9 @@ public static Dictionary<int, string> ParseLyricsFromChartSection(
151150
{
152151
return section
153152
.Where(item => item.Value[0] == TypeCode.EventMarker)
154-
.Select(
155-
item => new KeyValuePair<int, string>(int.Parse(item.Key),
156-
JSON_VALUE_PATTERN.Matches(item.Value.Skip(1).First()).Select(part => part.Value.Trim('"'))
157-
.First()))
153+
.Select(item => new KeyValuePair<int, string>(int.Parse(item.Key),
154+
JSON_VALUE_PATTERN.Matches(item.Value.Skip(1).First()).Select(part => part.Value.Trim('"'))
155+
.First()))
158156
.Where(item => item.Value.StartsWith("lyric"))
159157
.ToDictionary(item => item.Key, x => x.Value);
160158
}

RhythmGameUtilities/Scripts/Utilities.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public static extern int ConvertSecondsToTicksInternal(float seconds, int resolu
2525
public static extern float CalculateAccuracyRatioInternal(int position, int currentPosition, int delta);
2626

2727
[DllImport("libRhythmGameUtilities", CallingConvention = CallingConvention.Cdecl)]
28-
public static extern IntPtr CalculateBeatBarsInternal(Tempo[] tempoChanges, int tempoChangesSize, int resolution,
28+
public static extern IntPtr CalculateBeatBarsInternal(Tempo[] tempoChanges, int tempoChangesSize,
29+
int resolution,
2930
int ts,
3031
bool includeHalfNotes, out int size);
3132

@@ -56,7 +57,8 @@ public static float ConvertTickToPosition(int tick, int resolution)
5657
public static int ConvertSecondsToTicks(float seconds, int resolution, Tempo[] tempoChanges,
5758
TimeSignature[] timeSignatureChanges)
5859
{
59-
return UtilitiesInternal.ConvertSecondsToTicksInternal(seconds, resolution, tempoChanges, tempoChanges.Length,
60+
return UtilitiesInternal.ConvertSecondsToTicksInternal(seconds, resolution, tempoChanges,
61+
tempoChanges.Length,
6062
timeSignatureChanges, timeSignatureChanges.Length);
6163
}
6264

@@ -84,7 +86,8 @@ public static int RoundUpToTheNearestMultiplier(int value, int multiplier)
8486
public static BeatBar[] CalculateBeatBars(Tempo[] tempoChanges, int resolution = 192, int ts = 4,
8587
bool includeHalfNotes = true)
8688
{
87-
var ptrArray = UtilitiesInternal.CalculateBeatBarsInternal(tempoChanges, tempoChanges.Length, resolution, ts,
89+
var ptrArray = UtilitiesInternal.CalculateBeatBarsInternal(tempoChanges, tempoChanges.Length, resolution,
90+
ts,
8891
includeHalfNotes,
8992
out var size);
9093

0 commit comments

Comments
 (0)