mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Naming changes
This commit is contained in:
@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
/// <summary>
|
||||
/// <see cref="MonoStreak"/>s that are grouped together within this <see cref="AlternatingMonoPattern"/>.
|
||||
/// </summary>
|
||||
public readonly List<MonoStreak> Payload = new List<MonoStreak>();
|
||||
public readonly List<MonoStreak> MonoStreaks = new List<MonoStreak>();
|
||||
|
||||
/// <summary>
|
||||
/// The parent <see cref="RepeatingHitPatterns"/> that contains this <see cref="AlternatingMonoPattern"/>
|
||||
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
public RepeatingHitPatterns? Parent;
|
||||
|
||||
/// <summary>
|
||||
/// Index of this encoding within it's parent encoding
|
||||
/// Index of this <see cref="AlternatingMonoPattern"/> within it's parent <see cref="RepeatingHitPatterns"/>
|
||||
/// </summary>
|
||||
public int Index;
|
||||
|
||||
@ -34,9 +34,9 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
public bool IsRepetitionOf(AlternatingMonoPattern other)
|
||||
{
|
||||
return HasIdenticalMonoLength(other) &&
|
||||
other.Payload.Count == Payload.Count &&
|
||||
(other.Payload[0].EncodedData[0].BaseObject as Hit)?.Type ==
|
||||
(Payload[0].EncodedData[0].BaseObject as Hit)?.Type;
|
||||
other.MonoStreaks.Count == MonoStreaks.Count &&
|
||||
(other.MonoStreaks[0].HitObjects[0].BaseObject as Hit)?.Type ==
|
||||
(MonoStreaks[0].HitObjects[0].BaseObject as Hit)?.Type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
/// </summary>
|
||||
public bool HasIdenticalMonoLength(AlternatingMonoPattern other)
|
||||
{
|
||||
return other.Payload[0].RunLength == Payload[0].RunLength;
|
||||
return other.MonoStreaks[0].RunLength == MonoStreaks[0].RunLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
/// <summary>
|
||||
/// List of <see cref="DifficultyHitObject"/>s that are encoded within this <see cref="MonoStreak"/>.
|
||||
/// </summary>
|
||||
public List<TaikoDifficultyHitObject> EncodedData { get; private set; } = new List<TaikoDifficultyHitObject>();
|
||||
public List<TaikoDifficultyHitObject> HitObjects { get; private set; } = new List<TaikoDifficultyHitObject>();
|
||||
|
||||
/// <summary>
|
||||
/// The parent <see cref="AlternatingMonoPattern"/> that contains this <see cref="MonoStreak"/>
|
||||
@ -24,13 +24,13 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
public AlternatingMonoPattern? Parent;
|
||||
|
||||
/// <summary>
|
||||
/// Index of this encoding within it's parent encoding
|
||||
/// Index of this <see cref="MonoStreak"/> within it's parent <see cref="AlternatingMonoPattern"/>
|
||||
/// </summary>
|
||||
public int Index;
|
||||
|
||||
/// <summary>
|
||||
/// How long the mono pattern encoded within is
|
||||
/// </summary>
|
||||
public int RunLength => EncodedData.Count;
|
||||
public int RunLength => HitObjects.Count;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
/// <summary>
|
||||
/// The <see cref="AlternatingMonoPattern"/>s that are grouped together within this <see cref="RepeatingHitPatterns"/>.
|
||||
/// </summary>
|
||||
public readonly List<AlternatingMonoPattern> Payload = new List<AlternatingMonoPattern>();
|
||||
public readonly List<AlternatingMonoPattern> AlternatingMonoPatterns = new List<AlternatingMonoPattern>();
|
||||
|
||||
/// <summary>
|
||||
/// The previous <see cref="RepeatingHitPatterns"/>. This is used to determine the repetition interval.
|
||||
@ -39,24 +39,24 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if other is considered a repetition of this encoding. This is true if other's first two payloads
|
||||
/// Returns true if other is considered a repetition of this pattern. This is true if other's first two payloads
|
||||
/// have identical mono lengths.
|
||||
/// </summary>
|
||||
private bool isRepetitionOf(RepeatingHitPatterns other)
|
||||
{
|
||||
if (Payload.Count != other.Payload.Count) return false;
|
||||
if (AlternatingMonoPatterns.Count != other.AlternatingMonoPatterns.Count) return false;
|
||||
|
||||
for (int i = 0; i < Math.Min(Payload.Count, 2); i++)
|
||||
for (int i = 0; i < Math.Min(AlternatingMonoPatterns.Count, 2); i++)
|
||||
{
|
||||
if (!Payload[i].HasIdenticalMonoLength(other.Payload[i])) return false;
|
||||
if (!AlternatingMonoPatterns[i].HasIdenticalMonoLength(other.AlternatingMonoPatterns[i])) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the closest previous <see cref="RepeatingHitPatterns"/> that has the identical <see cref="Payload"/>.
|
||||
/// Interval is defined as the amount of <see cref="RepeatingHitPatterns"/> chunks between the current and repeated encoding.
|
||||
/// Finds the closest previous <see cref="RepeatingHitPatterns"/> that has the identical <see cref="AlternatingMonoPatterns"/>.
|
||||
/// Interval is defined as the amount of <see cref="RepeatingHitPatterns"/> chunks between the current and repeated patterns.
|
||||
/// </summary>
|
||||
public void FindRepetitionInterval()
|
||||
{
|
||||
|
Reference in New Issue
Block a user