diff --git a/source/funkin/play/notes/StrumlineNote.hx b/source/funkin/play/notes/StrumlineNote.hx index c33c8b578..16df9f502 100644 --- a/source/funkin/play/notes/StrumlineNote.hx +++ b/source/funkin/play/notes/StrumlineNote.hx @@ -85,7 +85,8 @@ class StrumlineNote extends FlxSprite noteStyle.applyStrumlineFrames(this); noteStyle.applyStrumlineAnimations(this, this.direction); - this.scale.set(noteStyle.getStrumlineScale()); + var scale = noteStyle.getStrumlineScale(); + this.scale.set(scale, scale); this.updateHitbox(); noteStyle.applyStrumlineOffsets(this); diff --git a/source/funkin/play/notes/SustainTrail.hx b/source/funkin/play/notes/SustainTrail.hx index 90b36b009..a9af468b9 100644 --- a/source/funkin/play/notes/SustainTrail.hx +++ b/source/funkin/play/notes/SustainTrail.hx @@ -87,6 +87,7 @@ class SustainTrail extends FlxSprite public var bottomClip:Float = 0.9; public var isPixel:Bool; + public var noteStyleOffsets:Array; var graphicWidth:Float = 0; var graphicHeight:Float = 0; @@ -107,6 +108,7 @@ class SustainTrail extends FlxSprite this.noteDirection = noteDirection; setupHoldNoteGraphic(noteStyle); + noteStyleOffsets = noteStyle.getHoldNoteOffsets(); indices = new DrawData(12, true, TRIANGLE_VERTEX_INDICES); @@ -137,7 +139,6 @@ class SustainTrail extends FlxSprite zoom = 1.0; zoom *= noteStyle.fetchHoldNoteScale(); - zoom *= 0.7; // CALCULATE SIZE graphicWidth = graphic.width / 8 * zoom; // amount of notes * 2 @@ -202,7 +203,7 @@ class SustainTrail extends FlxSprite { width = graphicWidth; height = graphicHeight; - offset.set(0, 0); + offset.set(noteStyleOffsets[0], noteStyleOffsets[1]); origin.set(width * 0.5, height * 0.5); } diff --git a/source/funkin/play/notes/notestyle/NoteStyle.hx b/source/funkin/play/notes/notestyle/NoteStyle.hx index 9079fee64..a5ff19cba 100644 --- a/source/funkin/play/notes/notestyle/NoteStyle.hx +++ b/source/funkin/play/notes/notestyle/NoteStyle.hx @@ -93,7 +93,8 @@ class NoteStyle implements IRegistryEntry buildNoteAnimations(target); // Set the scale. - target.scale.set(getNoteScale()); + var scale = getNoteScale(); + target.scale.set(scale, scale); target.updateHitbox(); } @@ -224,6 +225,13 @@ class NoteStyle implements IRegistryEntry return data?.scale ?? 1.0; } + public function getHoldNoteOffsets():Array + { + var data = _data?.assets?.holdNote; + if (data == null && fallback != null) return fallback.getHoldNoteOffsets(); + return data?.offsets ?? [0.0, 0.0]; + } + public function applyStrumlineFrames(target:StrumlineNote):Void { // TODO: Add support for multi-Sparrow. @@ -304,9 +312,16 @@ class NoteStyle implements IRegistryEntry return thx.Arrays.filterNull(result); } + public function getStrumlineOffsets():Array + { + var data = _data?.assets?.noteStrumline; + if (data == null && fallback != null) return fallback.getStrumlineOffsets(); + return data?.offsets ?? [0.0, 0.0]; + } + public function applyStrumlineOffsets(target:StrumlineNote):Void { - var offsets = _data?.assets?.noteStrumline?.offsets ?? [0.0, 0.0]; + var offsets = getStrumlineOffsets(); target.x += offsets[0]; target.y += offsets[1]; }