update BGM.cs and THNoteHold.cs
This commit is contained in:
@@ -49,6 +49,8 @@ public partial class BGM : AudioStreamPlayer
|
|||||||
var buffer = f.GetBuffer((long)f.GetLength());
|
var buffer = f.GetBuffer((long)f.GetLength());
|
||||||
|
|
||||||
/// WAV HEADER PARSING ///
|
/// WAV HEADER PARSING ///
|
||||||
|
/// https://medium.com/swlh/reversing-a-wav-file-in-c-482fc3dfe3c4
|
||||||
|
|
||||||
// bit format
|
// bit format
|
||||||
var bf = new byte[]{ buffer[34], buffer[35] };
|
var bf = new byte[]{ buffer[34], buffer[35] };
|
||||||
var bitFormat = BitConverter.ToUInt16(bf) switch
|
var bitFormat = BitConverter.ToUInt16(bf) switch
|
||||||
|
|||||||
@@ -26,14 +26,15 @@ namespace WacK.Things.TunnelObjects
|
|||||||
holdScroll.AddChild(longThing);
|
holdScroll.AddChild(longThing);
|
||||||
longThing.Position = new Vector2(0, (float)-holdData.time * Play.ScrollPxPerSec);
|
longThing.Position = new Vector2(0, (float)-holdData.time * Play.ScrollPxPerSec);
|
||||||
|
|
||||||
// only draw visible hold-mids
|
// don't draw invisible hold-mids
|
||||||
var drawableMids = holdData.points.Values.Where(e => e.type == NotePlayType.HoldMid || e.type == NotePlayType.HoldEnd).ToList();
|
var drawableMids = holdData.points.Values.Where(e => e.type != NotePlayType.HoldMidInvis).ToList();
|
||||||
if (drawableMids.Count > 0)
|
if (drawableMids.Count > 0)
|
||||||
{
|
{
|
||||||
var lastMid = holdData.points.Values[^1];
|
var lastMid = holdData.points.Values[^1];
|
||||||
if (drawableMids[^1] != lastMid) drawableMids.Add(lastMid);
|
if (drawableMids[^1] != lastMid) drawableMids.Add(lastMid);
|
||||||
}
|
}
|
||||||
else // would most likely happen if HoldEnd is missing
|
else
|
||||||
|
// would most likely happen if HoldEnd is missing
|
||||||
drawableMids = holdData.points.Values.ToList();
|
drawableMids = holdData.points.Values.ToList();
|
||||||
|
|
||||||
if (drawableMids.Count() > 0)
|
if (drawableMids.Count() > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user