From 69d82f560db632db8318997cc730c27bef92a9af Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:16:30 +0800 Subject: [PATCH 1/5] repair ScriptableShader.shader = null (#877) --- source/funkin/backend/shaders/ScriptableShader.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/funkin/backend/shaders/ScriptableShader.hx b/source/funkin/backend/shaders/ScriptableShader.hx index 72a4a150a5..c77bd18e36 100644 --- a/source/funkin/backend/shaders/ScriptableShader.hx +++ b/source/funkin/backend/shaders/ScriptableShader.hx @@ -30,6 +30,8 @@ class ScriptableShader extends FlxBasic implements IHScriptCustomBehaviour { if((shader is CustomShader)) scriptName = cast(shader, CustomShader).fileName; else throw "Missing name for shader script, please provide a scriptName, or use CustomShader"; + this.shader = shader; + script = Script.create(Paths.script('shaders/$scriptName')); script.setParent(shader); script.set("shader", shader); From 8fc1493759b22bad67fffe494761b9fec94c4d92 Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:16:41 +0800 Subject: [PATCH 2/5] optimize updateInput (#878) * optimize updateInput * resize optimize * __notePerStrum optimize * Update StrumLine.hx --- source/funkin/game/StrumLine.hx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index e803bba8b4..1fc38c0f99 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -253,7 +253,7 @@ class StrumLine extends FlxTypedGroup { var __notePerStrum:Array = []; function __inputProcessPressed(note:Note) { - if (__pressed[note.strumID] && note.isSustainNote && note.sustainParent.wasGoodHit && note.strumTime < __updateNote_songPos && !note.wasGoodHit) { + if (__pressed[note.strumID] && note.isSustainNote && note.strumTime < __updateNote_songPos && !note.wasGoodHit && note.sustainParent.wasGoodHit) { PlayState.instance.goodNoteHit(this, note); } } @@ -284,9 +284,11 @@ class StrumLine extends FlxTypedGroup { if (cpu) return; - __pressed.resize(members.length); - __justPressed.resize(members.length); - __justReleased.resize(members.length); + if (__pressed.length != members.length) { + __pressed.resize(members.length); + __justPressed.resize(members.length); + __justReleased.resize(members.length); + } for (i in 0...members.length) { __pressed[i] = members[i].__getPressed(this); @@ -304,17 +306,17 @@ class StrumLine extends FlxTypedGroup { __notePerStrum = cast new haxe.ds.Vector(members.length); // [for(_ in 0...members.length) null]; - if (__justPressed.contains(true)) { - notes.forEachAlive(__inputProcessJustPressed); + if (__pressed.contains(true)) { + if (__justPressed.contains(true)) { + notes.forEachAlive(__inputProcessJustPressed); - if (!ghostTapping) for (k => pr in __justPressed) if (pr && __notePerStrum[k] == null) - PlayState.instance.noteMiss(this, null, k, ID); // FUCK YOU - } + if (!ghostTapping) for (k => pr in __justPressed) if (pr && __notePerStrum[k] == null) + PlayState.instance.noteMiss(this, null, k, ID); // FUCK YOU - if (__pressed.contains(true)) { - for (e in __notePerStrum) - if (e != null) - PlayState.instance.goodNoteHit(this, e); + for (e in __notePerStrum) + if (e != null) + PlayState.instance.goodNoteHit(this, e); + } for (c in characters) if (c.lastAnimContext != DANCE) @@ -324,7 +326,7 @@ class StrumLine extends FlxTypedGroup { } forEach(function(str:Strum) { - str.updatePlayerInput(str.__getPressed(this), str.__getJustPressed(this), str.__getJustReleased(this)); + str.updatePlayerInput(__pressed[str.ID], __justPressed[str.ID], __justReleased[str.ID]); }); PlayState.instance.gameAndCharsCall("onPostInputUpdate"); From 9d9640071c06c9d9af31a76005f45aea90c3354f Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Wed, 21 Jan 2026 08:26:55 +0800 Subject: [PATCH 3/5] NoteGroup optimize (#881) * NoteGroup optimize * CoolUtil.bound faster --- source/funkin/game/Note.hx | 2 +- source/funkin/game/NoteGroup.hx | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index 26d38ee3b7..f46ad19be1 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -311,7 +311,7 @@ class Note extends FlxSprite } public function updateSustainClip() if (wasGoodHit && !noSustainClip) { - var t = FlxMath.bound((Conductor.songPosition - strumTime) / height * 0.45 * lastScrollSpeed, 0, 1); + var t = CoolUtil.bound((Conductor.songPosition - strumTime) / height * 0.45 * lastScrollSpeed, 0, 1); var rect = clipRect == null ? FlxRect.get() : clipRect; clipRect = rect.set(0, frameHeight * t, frameWidth, frameHeight * (1 - t)); } diff --git a/source/funkin/game/NoteGroup.hx b/source/funkin/game/NoteGroup.hx index ec67ba5c14..58e427d30b 100644 --- a/source/funkin/game/NoteGroup.hx +++ b/source/funkin/game/NoteGroup.hx @@ -53,14 +53,11 @@ class NoteGroup extends FlxTypedGroup { public override function update(elapsed:Float) { i = length-1; __loopSprite = null; - __time = __getSongPos(); + __time = __getSongPos() + limit; while(i >= 0) { __loopSprite = members[i--]; - if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.active) { - continue; - } - if (__loopSprite.strumTime - __time > limit) - break; + if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.active) continue; + if (__loopSprite.strumTime > __time) break; __loopSprite.update(elapsed); } } @@ -74,12 +71,11 @@ class NoteGroup extends FlxTypedGroup { i = length-1; __loopSprite = null; - __time = __getSongPos(); + __time = __getSongPos() + limit; while(i >= 0) { __loopSprite = members[i--]; - if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.visible) - continue; - if (__loopSprite.strumTime - __time > limit) break; + if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.visible) continue; + if (__loopSprite.strumTime > __time) break; __loopSprite.draw(); } __currentlyLooping = oldCur; @@ -97,16 +93,15 @@ class NoteGroup extends FlxTypedGroup { public override function forEach(noteFunc:Note->Void, recursive:Bool = false) { i = length-1; __loopSprite = null; - __time = __getSongPos(); + __time = __getSongPos() + limit; var oldCur = __currentlyLooping; __currentlyLooping = true; while(i >= 0) { __loopSprite = members[i--]; - if (__loopSprite == null || !__loopSprite.exists) - continue; - if (__loopSprite.strumTime - __time > limit) break; + if (__loopSprite == null || !__loopSprite.exists) continue; + if (__loopSprite.strumTime > __time) break; noteFunc(__loopSprite); } __currentlyLooping = oldCur; From 0cfb3e52c5265281e358fdff01e34b431d36de5e Mon Sep 17 00:00:00 2001 From: Frakits <90983918+Frakits@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:54:14 +0200 Subject: [PATCH 4/5] makes commit with github desktop W FRAKITS --- FEATURES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FEATURES.md b/FEATURES.md index 97a28fc189..1c274985f9 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -73,7 +73,7 @@ _**QOL = Quality of Life**_ - If you need to rearrange the weeks in-game, you can use the `data/weeks/weeks.txt` file. - Editors for Charts and Characters (Stage coming soon) - Undos/Redos supported - - Warning on closing unsaved work + - Warning on closing unsaved work. - Clean UI (for ocd freaks) - Mature Chart editor (Character editor rework soon) - Features not found in other editors! From f8f9d6eb4abf76eacbfd981fd558ee22e3befda6 Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Sun, 25 Jan 2026 19:18:18 +0800 Subject: [PATCH 5/5] Use fastSinCos for notes (#889) * Update Strum.hx * Update Strum.hx --- source/funkin/game/Strum.hx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/funkin/game/Strum.hx b/source/funkin/game/Strum.hx index a5edb48bc9..0862154b73 100644 --- a/source/funkin/game/Strum.hx +++ b/source/funkin/game/Strum.hx @@ -174,8 +174,9 @@ class Strum extends FlxSprite { if (daNote.isSustainNote) offset.y -= height * 0.5; if (Std.int(daNote.__noteAngle % 360) != 0) { - var noteAngleCos = FlxMath.fastCos(daNote.__noteAngle / PIX180); - var noteAngleSin = FlxMath.fastSin(daNote.__noteAngle / PIX180); + var noteAngle = FlxMath.fastSinCos(daNote.__noteAngle / PIX180); + var noteAngleCos = noteAngle.cos; + var noteAngleSin = noteAngle.sin; var aOffset:FlxPoint = FlxPoint.get( (daNote.origin.x / daNote.scale.x) - daNote.offset.x,