Skip to content

Commit bb822a5

Browse files
committed
Revert "Refactor Strumline getXPos to support multi-directional notes"
This reverts commit 0d8bb28.
1 parent 0d8bb28 commit bb822a5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

source/funkin/play/notes/Strumline.hx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,12 +1302,17 @@ class Strumline extends FlxSpriteGroup
13021302
#if mobile
13031303
if (inArrowContorlSchemeMode && isPlayer) pos = 35 * (FlxG.width / FlxG.height) / (FlxG.initialWidth / FlxG.initialHeight);
13041304
#end
1305-
1306-
var spacing:Float = Strumline.NOTE_SPACING * noteSpacingScale * strumlineScale.x;
1307-
var halfLength:Int = Math.floor(Strumline.DIRECTIONS.length / 2);
1308-
var baseOffset:Float = ((direction : Int) < halfLength) ? -pos * 2 : pos;
1309-
1310-
return baseOffset + (direction * spacing);
1305+
return switch (direction)
1306+
{
1307+
case NoteDirection.LEFT: -pos * 2;
1308+
case NoteDirection.DOWN:
1309+
-(pos * 2) + (1 * Strumline.NOTE_SPACING) * (noteSpacingScale * strumlineScale.x);
1310+
case NoteDirection.UP:
1311+
pos + (2 * Strumline.NOTE_SPACING) * (noteSpacingScale * strumlineScale.x);
1312+
case NoteDirection.RIGHT:
1313+
pos + (3 * Strumline.NOTE_SPACING) * (noteSpacingScale * strumlineScale.x);
1314+
default: -pos * 2;
1315+
}
13111316
}
13121317

13131318
/**

source/funkin/play/notes/notestyle/NoteStyle.hx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ class NoteStyle implements IRegistryEntry<NoteStyleData>
999999

10001000
target.antialiasing = !(_data.assets.holdNoteCover?.isPixel ?? false);
10011001
target.glow.antialiasing = !(_data.assets.holdNoteCover?.isPixel ?? false);
1002-
target.scale.set(getHoldCoverScale(), getHoldCoverScale());
1002+
target.scale.set(_data.assets.holdNoteCover?.scale ?? 1.0, _data.assets.holdNoteCover?.scale ?? 1.0);
10031003
target.updateHitbox();
10041004
target.glow.updateHitbox();
10051005

@@ -1157,11 +1157,6 @@ class NoteStyle implements IRegistryEntry<NoteStyleData>
11571157
return _data?.assets?.holdNoteCover?.offsets ?? fallback?.getHoldCoverOffsets() ?? [0.0, 0.0];
11581158
}
11591159

1160-
public function getHoldCoverScale():Float
1161-
{
1162-
return _data?.assets?.holdNoteCover?.scale ?? fallback?.getHoldCoverScale() ?? 1.0;
1163-
}
1164-
11651160
public function destroy():Void {}
11661161

11671162
/**

0 commit comments

Comments
 (0)