From 1b68c3a8d6f66905a9a508a1cb692fe3beb7b4a2 Mon Sep 17 00:00:00 2001 From: lemz Date: Thu, 6 Jun 2024 17:07:48 +0200 Subject: [PATCH 1/9] squashed commits --- source/funkin/ui/credits/CreditsState.hx | 144 ++++++++++++++++++----- 1 file changed, 115 insertions(+), 29 deletions(-) diff --git a/source/funkin/ui/credits/CreditsState.hx b/source/funkin/ui/credits/CreditsState.hx index e12a542d6..990c763e2 100644 --- a/source/funkin/ui/credits/CreditsState.hx +++ b/source/funkin/ui/credits/CreditsState.hx @@ -7,6 +7,8 @@ import flixel.FlxSprite; import funkin.ui.mainmenu.MainMenuState; import flixel.group.FlxSpriteGroup; import funkin.util.TouchUtil; +import funkin.ui.credits.CreditsData.CreditsDataRole; +import funkin.ui.credits.CreditsData.CreditsDataMember; /** * The state used to display the credits scroll. @@ -77,6 +79,9 @@ class CreditsState extends MusicBeatState var scrollPaused:Bool = false; + var backersToBuild:Array; + var entriesToBuild:Array; + public function new() { super(); @@ -86,6 +91,22 @@ class CreditsState extends MusicBeatState { super.create(); + backersToBuild = CreditsDataHandler.fetchBackerEntries(); + + entriesToBuild = []; + for (entry in CreditsDataHandler.CREDITS_DATA.entries) + { + entriesToBuild.push( + { + data: entry, + lineIndexToBuild: 0, + backerIndexToBuild: 0, + hasBuiltHeader: (entry.header == null), + hasBuiltBody: (entry.body.length == 0), + hasBuiltBackers: (!entry.appendBackers || backersToBuild.length == 0) + }); + } + // Background var bg = new FlxSprite(Paths.image('menuDesat')); bg.scrollFactor.x = 0; @@ -105,7 +126,7 @@ class CreditsState extends MusicBeatState creditsGroup.x = Math.max(funkin.ui.FullScreenScaleMode.gameNotchSize.x, SCREEN_PAD); creditsGroup.y = STARTING_HEIGHT; - buildCreditsGroup(); + // buildCreditsGroup(); add(creditsGroup); @@ -124,39 +145,44 @@ class CreditsState extends MusicBeatState #end } - function buildCreditsGroup():Void + var creditsLineY:Float = 0; + + function buildCreditsEntryLine(entry:CreditsEntry):Void { - var y:Float = 0; - - for (entry in CreditsDataHandler.CREDITS_DATA.entries) + if (!entry.hasBuiltHeader) { - if (entry.header != null) - { - var header = buildCreditsLine(entry.header, y, true, CreditsSide.Left); - header.bold = true; - creditsGroup.add(header); - y += CREDITS_HEADER_FONT_SIZE + (header.textField.numLines * CREDITS_HEADER_FONT_SIZE); - } + var header:FlxText = buildCreditsLine(entry.data.header, creditsLineY, true, CreditsSide.Left); + creditsLineY += CREDITS_HEADER_FONT_SIZE + (header.textField.numLines * CREDITS_HEADER_FONT_SIZE); + entry.hasBuiltHeader = true; + return; + } - for (line in entry?.body ?? []) - { - var entry = buildCreditsLine(line.line, y, false, CreditsSide.Left); - creditsGroup.add(entry); - y += CREDITS_FONT_SIZE * entry.textField.numLines; - } + if (!entry.hasBuiltBody) + { + var lineData:CreditsDataMember = entry.data.body[entry.lineIndexToBuild]; + var line:FlxText = buildCreditsLine(lineData.line, creditsLineY, false, CreditsSide.Left); + creditsLineY += CREDITS_FONT_SIZE * line.textField.numLines; + entry.lineIndexToBuild++; - if (entry.appendBackers) + if (entry.lineIndexToBuild >= entry.data.body.length) { - var backers = CreditsDataHandler.fetchBackerEntries(); - for (backer in backers) - { - creditsGroup.add(buildCreditsLine(backer, y, false, CreditsSide.Left)); - y += CREDITS_FONT_SIZE; - } + entry.hasBuiltBody = true; } + return; + } - // Padding between each role. - y += CREDITS_FONT_SIZE * 2.5; + if (!entry.hasBuiltBackers) + { + var backer:String = backersToBuild[entry.backerIndexToBuild]; + creditsGroup.add(buildCreditsLine(backer, creditsLineY, false, CreditsSide.Left)); + creditsLineY += CREDITS_FONT_SIZE; + + entry.backerIndexToBuild++; + if (entry.backerIndexToBuild >= backersToBuild.length) + { + entry.hasBuiltBackers = true; + } + return; } } @@ -169,16 +195,66 @@ class CreditsState extends MusicBeatState var width = (side == CreditsSide.Center) ? FULL_WIDTH : (FULL_WIDTH / 2); var size = header ? CREDITS_HEADER_FONT_SIZE : CREDITS_FONT_SIZE; - var creditsLine:FlxText = new FlxText(xPos, yPos, width, text); + // using a cast since creditsGroup is FlxSpriteGroup + // we could also do FlxTypedSpriteGroup + var creditsLine:FlxText = cast(creditsGroup.recycle(() -> new FlxText()), FlxText); + creditsLine.x = xPos + creditsGroup.x; + creditsLine.y = yPos + creditsGroup.y; + creditsLine.fieldWidth = width; + creditsLine.text = text; + creditsLine.bold = header; creditsLine.setFormat(CREDITS_FONT, size, CREDITS_FONT_COLOR, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, CREDITS_FONT_STROKE_COLOR, true); return creditsLine; } + function killOffScreenLines():Void + { + creditsGroup.forEachExists(function(creditsLine:FlxSprite) { + if (creditsLine.y + creditsLine.height <= 0) + { + creditsLine.kill(); + trace("killed line"); + } + }); + } + + function buildNextLine():Void + { + // no more entriesToBuild + if (entriesToBuild.length == 0) + { + return; + } + + // line is off-screen + if (creditsGroup.y + creditsLineY >= FlxG.height) + { + return; + } + + var entry:CreditsEntry = entriesToBuild[0]; + buildCreditsEntryLine(entry); + + // check if everything has been built + if (!entry.hasBuiltHeader || !entry.hasBuiltBody || !entry.hasBuiltBackers) + { + return; + } + + entriesToBuild.shift(); + + // offset that each entry has + creditsLineY += CREDITS_FONT_SIZE * 2.5; + } + public override function update(elapsed:Float):Void { super.update(elapsed); + killOffScreenLines(); + buildNextLine(); + if (!scrollPaused) { // TODO: Replace with whatever the special note button is. @@ -206,7 +282,7 @@ class CreditsState extends MusicBeatState function hasEnded():Bool { - return creditsGroup.y < -creditsGroup.height; + return creditsGroup.getFirstExisting() == null && entriesToBuild.length == 0; } function exit():Void @@ -226,3 +302,13 @@ enum CreditsSide Center; Right; } + +typedef CreditsEntry = +{ + var data:CreditsDataRole; + var lineIndexToBuild:Int; + var backerIndexToBuild:Int; + var hasBuiltHeader:Bool; + var hasBuiltBody:Bool; + var hasBuiltBackers:Bool; +} From 4557a681d126711712baeffa7acaba4c589dbd20 Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Thu, 26 Jun 2025 00:17:19 -0500 Subject: [PATCH 2/9] This desync is Pissing me off... I'm the original Starwalker --- source/funkin/play/PlayState.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index c1dd68661..357fc479b 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2369,6 +2369,8 @@ class PlayState extends MusicBeatSubState #if FEATURE_NEWGROUNDS Events.logStartSong(currentSong.id, currentVariation); #end + + resyncVocals(); } /** From d4c7339373a57dcdf3e71c9fe7bd70ef8221ec75 Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:46:00 -0500 Subject: [PATCH 3/9] allow `TouchUtil` functions to be used outside of `FEATURE_TOUCH_CONTROLS` --- .../funkin/mobile/ui/options/ControlsSchemeMenu.hx | 2 ++ source/funkin/play/PauseSubState.hx | 2 ++ source/funkin/ui/charSelect/CharSelectSubState.hx | 9 +++++++-- source/funkin/ui/freeplay/LetterSort.hx | 8 ++++++-- source/funkin/ui/story/StoryMenuState.hx | 6 ++++-- source/funkin/util/TouchUtil.hx | 13 +------------ 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx b/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx index 34ba6dd01..72750d68b 100644 --- a/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx +++ b/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx @@ -290,6 +290,7 @@ class ControlsSchemeMenu extends MusicBeatSubState }); } + #if FEATURE_TOUCH_CONTROLS /** * Handles touch dragging. */ @@ -357,5 +358,6 @@ class ControlsSchemeMenu extends MusicBeatSubState { hitboxShowcases.x = MathUtil.smoothLerp(hitboxShowcases.x, (-1500 * currentIndex) + (-1500 / (availableSchemes.length + 1) * currentIndex), elapsed, 0.5); } + #end } } diff --git a/source/funkin/play/PauseSubState.hx b/source/funkin/play/PauseSubState.hx index 01b73e294..42f2deaa2 100644 --- a/source/funkin/play/PauseSubState.hx +++ b/source/funkin/play/PauseSubState.hx @@ -552,6 +552,7 @@ class PauseSubState extends MusicBeatSubState changeSelection(1); } + #if FEATURE_TOUCH_CONTROLS if (!SwipeUtil.justSwipedAny && !justOpened) { for (i in 0...menuEntryText.members.length) @@ -571,6 +572,7 @@ class PauseSubState extends MusicBeatSubState break; } } + #end if (controls.ACCEPT) { diff --git a/source/funkin/ui/charSelect/CharSelectSubState.hx b/source/funkin/ui/charSelect/CharSelectSubState.hx index 9c26a3984..7cb8833ac 100644 --- a/source/funkin/ui/charSelect/CharSelectSubState.hx +++ b/source/funkin/ui/charSelect/CharSelectSubState.hx @@ -786,12 +786,14 @@ class CharSelectSubState extends MusicBeatSubState mobileAccept = false; - if (controls.UI_UP_R || controls.UI_DOWN_R || controls.UI_LEFT_R || controls.UI_RIGHT_R || TouchUtil.justReleased) selectSound.pitch = 1; + if (controls.UI_UP_R || controls.UI_DOWN_R || controls.UI_LEFT_R || controls.UI_RIGHT_R #if FEATURE_TOUCH_CONTROLS || TouchUtil.justReleased #end) + selectSound.pitch = 1; syncAudio(elapsed); if (allowInput && !pressedSelect) { + #if FEATURE_TOUCH_CONTROLS if (TouchUtil.pressed || TouchUtil.justReleased) { for (i => hitbox in grpHitboxes.members) @@ -822,6 +824,7 @@ class CharSelectSubState extends MusicBeatSubState { mobileAccept = true; } + #end // if (controls.UI_UP) holdTmrUp += elapsed; @@ -913,7 +916,7 @@ class CharSelectSubState extends MusicBeatSubState { curChar = availableChars.get(getCurrentSelected()); - if (allowInput && pressedSelect && (controls.BACK || (mobileDeny && TouchUtil.justReleased))) + if (allowInput && pressedSelect && (controls.BACK #if FEATURE_TOUCH_CONTROLS || (mobileDeny && TouchUtil.justReleased) #end)) { mobileDeny = false; cursorConfirmed.visible = false; @@ -969,7 +972,9 @@ class CharSelectSubState extends MusicBeatSubState goToFreeplay(); }); } + #if FEATURE_TOUCH_CONTROLS else if (pressedSelect && TouchUtil.justReleased) mobileDeny = true; + #end mobileAccept = false; } diff --git a/source/funkin/ui/freeplay/LetterSort.hx b/source/funkin/ui/freeplay/LetterSort.hx index 7ef9084bd..4112f33e2 100644 --- a/source/funkin/ui/freeplay/LetterSort.hx +++ b/source/funkin/ui/freeplay/LetterSort.hx @@ -107,6 +107,7 @@ class LetterSort extends FlxSpriteGroup if (inputEnabled) { + #if FEATURE_TOUCH_CONTROLS if (TouchUtil.pressAction()) { for (index => letter in letterHitboxes) @@ -132,12 +133,15 @@ class LetterSort extends FlxSpriteGroup break; } } + #end @:privateAccess { - if (controls.FREEPLAY_LEFT || (TouchUtil.overlaps(swipeBounds, instance.funnyCam) && SwipeUtil.swipeLeft)) changeSelection(-1); + if (controls.FREEPLAY_LEFT #if FEATURE_TOUCH_CONTROLS + || (TouchUtil.overlaps(swipeBounds, instance.funnyCam) && SwipeUtil.swipeLeft) #end) changeSelection(-1); - if (controls.FREEPLAY_RIGHT || (TouchUtil.overlaps(swipeBounds, instance.funnyCam) && SwipeUtil.swipeRight)) changeSelection(1); + if (controls.FREEPLAY_RIGHT #if FEATURE_TOUCH_CONTROLS + || (TouchUtil.overlaps(swipeBounds, instance.funnyCam) && SwipeUtil.swipeRight) #end) changeSelection(1); } } } diff --git a/source/funkin/ui/story/StoryMenuState.hx b/source/funkin/ui/story/StoryMenuState.hx index a58ebbc26..ec92f4b5c 100644 --- a/source/funkin/ui/story/StoryMenuState.hx +++ b/source/funkin/ui/story/StoryMenuState.hx @@ -391,7 +391,7 @@ class StoryMenuState extends MusicBeatState changeDifficulty(-1); } - if (controls.UI_RIGHT || TouchUtil.overlaps(rightDifficultyArrow)) + if (controls.UI_RIGHT #if FEATURE_TOUCH_CONTROLS || TouchUtil.overlaps(rightDifficultyArrow) #end) { rightDifficultyArrow.animation.play('press'); } @@ -400,7 +400,7 @@ class StoryMenuState extends MusicBeatState rightDifficultyArrow.animation.play('idle'); } - if (controls.UI_LEFT || TouchUtil.overlaps(leftDifficultyArrow)) + if (controls.UI_LEFT #if FEATURE_TOUCH_CONTROLS || TouchUtil.overlaps(leftDifficultyArrow) #end) { leftDifficultyArrow.animation.play('press'); } @@ -415,6 +415,7 @@ class StoryMenuState extends MusicBeatState selectLevel(); } + #if FEATURE_TOUCH_CONTROLS if (TouchUtil.justReleased && !TouchUtil.overlaps(leftDifficultyArrow) && !SwipeUtil.justSwipedAny) { for (i in 0...levelTitles.members.length) @@ -427,6 +428,7 @@ class StoryMenuState extends MusicBeatState (item == selectedItem) ? selectLevel() : changeLevel(i - levelList.indexOf(currentLevelId)); } } + #end } if (controls.BACK) goBack(); diff --git a/source/funkin/util/TouchUtil.hx b/source/funkin/util/TouchUtil.hx index f33e5cb10..81940812b 100644 --- a/source/funkin/util/TouchUtil.hx +++ b/source/funkin/util/TouchUtil.hx @@ -68,11 +68,9 @@ class TouchUtil */ public static function overlaps(?object:FlxBasic, ?camera:FlxCamera):Bool { - #if FEATURE_TOUCH_CONTROLS if (object == null || touch == null) return false; return touch.overlaps(object, camera ?? object.camera); - #end return false; } @@ -87,14 +85,12 @@ class TouchUtil */ public static function overlapsComplex(?object:FlxObject, ?camera:FlxCamera):Bool { - #if FEATURE_TOUCH_CONTROLS if (object == null || touch == null) return false; if (camera == null) camera = object.cameras[0]; @:privateAccess return object.overlapsPoint(touch.getWorldPosition(camera, object._point), true, camera); - #end return false; } @@ -111,7 +107,6 @@ class TouchUtil */ public static function overlapsComplexPoint(?object:FlxObject, point:FlxPoint, ?inScreenSpace:Bool = false, ?camera:FlxCamera):Bool { - #if FEATURE_TOUCH_CONTROLS if (object == null || point == null) return false; if (camera == null) camera = object.cameras[0]; @@ -123,7 +118,6 @@ class TouchUtil } point.putWeak(); - #end return false; } @@ -137,7 +131,6 @@ class TouchUtil */ public static function pressAction(?object:FlxBasic, ?camera:FlxCamera, useOverlapsComplex:Bool = true):Bool { - #if FEATURE_TOUCH_CONTROLS if (TouchUtil.touch == null || (TouchUtil.touch != null && TouchUtil.touch.ticksDeltaSincePress > 200)) return false; if (object == null && camera == null) @@ -149,7 +142,6 @@ class TouchUtil final overlapsObject:Bool = useOverlapsComplex ? overlapsComplex(cast(object, FlxObject), camera) : overlaps(object, camera); return justReleased && overlapsObject; } - #end return false; } @@ -189,13 +181,10 @@ class TouchUtil } #else @:noCompletion - inline static function get_touch():FlxMouse + static function get_touch():FlxMouse { - #if FEATURE_TOUCH_CONTROLS FlxG.mouse.visible = true; return FlxG.mouse; - #end - return null; } #end } From a11bde6f7618709f10ad0183ece0a3063149e965 Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:55:14 +0300 Subject: [PATCH 4/9] update `haxeui-core` and remove `flixel-text-input`. --- hmm.json | 9 +-------- project.hxp | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/hmm.json b/hmm.json index d849bcf54..dfda131ad 100644 --- a/hmm.json +++ b/hmm.json @@ -55,13 +55,6 @@ "ref": "b9118f47f43a66bc0e5fbfcfd9903f0425e918ee", "url": "https://github.com/FunkinCrew/flixel-addons" }, - { - "name": "flixel-text-input", - "type": "git", - "dir": null, - "ref": "951a0103a17bfa55eed86703ce50b4fb0d7590bc", - "url": "https://github.com/FunkinCrew/flixel-text-input" - }, { "name": "flxanimate", "type": "git", @@ -97,7 +90,7 @@ "name": "haxeui-core", "type": "git", "dir": null, - "ref": "07fc7aa8098deaea633b0726d01f83eb4ef8a832", + "ref": "47ee9f5fa02d422e186e844f87e68220cabfcc5b", "url": "https://github.com/haxeui/haxeui-core" }, { diff --git a/project.hxp b/project.hxp index 2a269eb5a..55530bfcf 100644 --- a/project.hxp +++ b/project.hxp @@ -1035,7 +1035,6 @@ class Project extends HXProject // addHaxelib('flixel-ui'); // UI framework (DEPRECATED) addHaxelib('haxeui-core'); // UI framework addHaxelib('haxeui-flixel'); // Integrate HaxeUI with Flixel - addHaxelib('flixel-text-input'); // Improved text field rendering for HaxeUI addHaxelib('polymod'); // Modding framework addHaxelib('flxanimate'); // Texture atlas rendering From adf2b49a721b9bc8610f0aa7330e53596552f0bf Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Fri, 27 Jun 2025 09:45:32 +0300 Subject: [PATCH 5/9] update `haxeui-flixel`. --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index dfda131ad..b3099e6f0 100644 --- a/hmm.json +++ b/hmm.json @@ -97,7 +97,7 @@ "name": "haxeui-flixel", "type": "git", "dir": null, - "ref": "b899a4c7d7318c5ff2b1bb645fbc73728fad1ac9", + "ref": "100f2c96beab619cfe72c567a058c41c71e3e998", "url": "https://github.com/haxeui/haxeui-flixel" }, { From 73ec37a47354209df5f3a327c5aa0ddf18d91a71 Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Sat, 28 Jun 2025 02:50:59 -0500 Subject: [PATCH 6/9] Move resync threshold to a constant variable --- source/funkin/play/PlayState.hx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 14da90b47..6fd8460a6 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -619,6 +619,12 @@ class PlayState extends MusicBeatSubState return FlxG?.sound?.music?.length; } + /** + * The threshold for resyncing the song. + * If the vocals deviate from the instrumental by more than this amount, then `resyncVocals()` will be called. + */ + static final RESYNC_THRESHOLD:Float = 30; + // TODO: Refactor or document var generatedMusic:Bool = false; @@ -1689,7 +1695,9 @@ class PlayState extends MusicBeatSubState } if (!startingSong - && (Math.abs(FlxG.sound.music.time - correctSync) > 30 || Math.abs(playerVoicesError) > 30 || Math.abs(opponentVoicesError) > 30)) + && (Math.abs(FlxG.sound.music.time - correctSync) > RESYNC_THRESHOLD + || Math.abs(playerVoicesError) > RESYNC_THRESHOLD + || Math.abs(opponentVoicesError) > RESYNC_THRESHOLD)) { trace("VOCALS NEED RESYNC"); if (vocals != null) From c49666c4b4c24a8e8dfbebbb228375953760d3c2 Mon Sep 17 00:00:00 2001 From: Hundrec Date: Sat, 28 Jun 2025 18:18:24 +0800 Subject: [PATCH 7/9] Fix remaining smoothLerp deprecations --- source/funkin/mobile/ui/options/ControlsSchemeMenu.hx | 4 ++-- source/funkin/mobile/ui/options/objects/HitboxShowcase.hx | 2 +- source/funkin/ui/mainmenu/MainMenuState.hx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx b/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx index 34ba6dd01..16d2e7741 100644 --- a/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx +++ b/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx @@ -344,7 +344,7 @@ class ControlsSchemeMenu extends MusicBeatSubState if (TouchUtil.pressed && dragDistance != 0) { final showcasesTargetX:Float = originX + dragDistance * 10; - hitboxShowcases.x = MathUtil.smoothLerp(hitboxShowcases.x, showcasesTargetX, elapsed, 0.5); + hitboxShowcases.x = MathUtil.smoothLerpPrecision(hitboxShowcases.x, showcasesTargetX, elapsed, 0.5); final minShowcasesX:Float = -1500 * availableSchemes.length; hitboxShowcases.x = FlxMath.bound(hitboxShowcases.x, minShowcasesX, 400); @@ -355,7 +355,7 @@ class ControlsSchemeMenu extends MusicBeatSubState } else { - hitboxShowcases.x = MathUtil.smoothLerp(hitboxShowcases.x, (-1500 * currentIndex) + (-1500 / (availableSchemes.length + 1) * currentIndex), elapsed, 0.5); + hitboxShowcases.x = MathUtil.smoothLerpPrecision(hitboxShowcases.x, (-1500 * currentIndex) + (-1500 / (availableSchemes.length + 1) * currentIndex), elapsed, 0.5); } } } diff --git a/source/funkin/mobile/ui/options/objects/HitboxShowcase.hx b/source/funkin/mobile/ui/options/objects/HitboxShowcase.hx index 9e515b969..270ebb729 100644 --- a/source/funkin/mobile/ui/options/objects/HitboxShowcase.hx +++ b/source/funkin/mobile/ui/options/objects/HitboxShowcase.hx @@ -110,7 +110,7 @@ class HitboxShowcase extends FlxSpriteGroup { super.update(elapsed); - alpha = MathUtil.smoothLerp(alpha, HITBOX_SHOWCASE_ALPHA[selected ? 1 : 0], elapsed, 0.2); + alpha = MathUtil.smoothLerpPrecision(alpha, HITBOX_SHOWCASE_ALPHA[selected ? 1 : 0], elapsed, 0.2); } function get_selected():Bool diff --git a/source/funkin/ui/mainmenu/MainMenuState.hx b/source/funkin/ui/mainmenu/MainMenuState.hx index 675d86116..3c07a46fe 100644 --- a/source/funkin/ui/mainmenu/MainMenuState.hx +++ b/source/funkin/ui/mainmenu/MainMenuState.hx @@ -456,8 +456,8 @@ class MainMenuState extends MusicBeatState gyroPan.add(FlxG.gyroscope.pitch * -1.25, FlxG.gyroscope.roll * -1.25); // our pseudo damping - gyroPan.x = MathUtil.smoothLerp(gyroPan.x, 0, elapsed, 2.5); - gyroPan.y = MathUtil.smoothLerp(gyroPan.y, 0, elapsed, 2.5); + gyroPan.x = MathUtil.smoothLerpPrecision(gyroPan.x, 0, elapsed, 2.5); + gyroPan.y = MathUtil.smoothLerpPrecision(gyroPan.y, 0, elapsed, 2.5); // how far away from bg mid do we want to pan via gyroPan camFollow.x = bg.getGraphicMidpoint().x - gyroPan.x; From 58f101bf019dcc5c0adfb04ca63eb431673c1cd6 Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Fri, 27 Jun 2025 20:23:23 -0500 Subject: [PATCH 8/9] chore: Run Haxe Formatter on the source code --- source/funkin/mobile/input/PreciseInputHandler.hx | 2 -- source/funkin/play/song/Song.hx | 1 - .../toolboxes/ChartEditorMetadataToolbox.hx | 2 +- source/funkin/ui/debug/latency/LatencyState.hx | 2 +- .../funkin/ui/debug/stageeditor/StageEditorState.hx | 13 ++++++------- .../toolboxes/StageEditorObjectAnimsToolbox.hx | 2 +- .../toolboxes/StageEditorObjectPropertiesToolbox.hx | 2 +- .../toolboxes/StageEditorStageToolbox.hx | 2 +- source/funkin/ui/freeplay/FreeplayStyle.hx | 1 - 9 files changed, 11 insertions(+), 16 deletions(-) diff --git a/source/funkin/mobile/input/PreciseInputHandler.hx b/source/funkin/mobile/input/PreciseInputHandler.hx index b4c243ce6..f240a2c94 100644 --- a/source/funkin/mobile/input/PreciseInputHandler.hx +++ b/source/funkin/mobile/input/PreciseInputHandler.hx @@ -31,7 +31,6 @@ class PreciseInputHandler static function handleHintDown(hint:FunkinHint):Void { final timestamp:Int64 = PreciseInputManager.getCurrentTimestamp(); - @:privateAccess if (hint.input?.justPressed ?? false) { @@ -48,7 +47,6 @@ class PreciseInputHandler static function handleHintUp(hint:FunkinHint):Void { final timestamp:Int64 = PreciseInputManager.getCurrentTimestamp(); - @:privateAccess if (hint.input?.justReleased ?? false) { diff --git a/source/funkin/play/song/Song.hx b/source/funkin/play/song/Song.hx index 8da7a18dd..ed7295abc 100644 --- a/source/funkin/play/song/Song.hx +++ b/source/funkin/play/song/Song.hx @@ -199,7 +199,6 @@ class Song implements IPlayStateScriptedClass implements IRegistryEntry = SongRegistry.instance.getScriptedEntryClassName(songId); - @:privateAccess if (songClassName != null) result = SongRegistry.instance.createScriptedEntry(songClassName); } diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx index d7ac0e042..640c62491 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorMetadataToolbox.hx @@ -118,7 +118,7 @@ class ChartEditorMetadataToolbox extends ChartEditorBaseToolbox if (valid) { - chartEditorState.currentSongNoteStyle = event.data.id; + chartEditorState.currentSongNoteStyle = event.data.id; } }; var startingValueNoteStyle = ChartEditorDropdowns.populateDropdownWithNoteStyles(inputNoteStyle, chartEditorState.currentSongMetadata.playData.noteStyle); diff --git a/source/funkin/ui/debug/latency/LatencyState.hx b/source/funkin/ui/debug/latency/LatencyState.hx index cb9ade241..be2bd0f46 100644 --- a/source/funkin/ui/debug/latency/LatencyState.hx +++ b/source/funkin/ui/debug/latency/LatencyState.hx @@ -412,7 +412,7 @@ class LatencyState extends MusicBeatSubState if (TouchUtil.overlapsComplex(visualOffsetRightArrow) && touchPressCheck) { cleanup(); - FlxG.switchState(() -> new funkin.ui.options.OptionsState()); + FlxG.switchState(() -> new funkin.ui.options.OptionsState()); localConductor.audioVisualOffset += 1 * multiply; } diff --git a/source/funkin/ui/debug/stageeditor/StageEditorState.hx b/source/funkin/ui/debug/stageeditor/StageEditorState.hx index b05ae1f15..266ff7a7c 100644 --- a/source/funkin/ui/debug/stageeditor/StageEditorState.hx +++ b/source/funkin/ui/debug/stageeditor/StageEditorState.hx @@ -1260,14 +1260,13 @@ class StageEditorState extends UIState if (exitConfirmDialog == null) { exitConfirmDialog = Dialogs.messageBox("You are about to leave the Editor without Saving.\n\nAre you sure? ", "Leave Editor", - MessageBoxType.TYPE_YESNO, true, - function(btn:DialogButton) { + MessageBoxType.TYPE_YESNO, true, function(btn:DialogButton) { exitConfirmDialog = null; - if (btn == DialogButton.YES) - { - saved = true; - onMenuItemClick("exit"); - } + if (btn == DialogButton.YES) + { + saved = true; + onMenuItemClick("exit"); + } }); } diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx index 6cd0b4f4e..548feb444 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectAnimsToolbox.hx @@ -114,7 +114,7 @@ class StageEditorObjectAnimsToolbox extends StageEditorDefaultToolbox objAnims.selectedIndex = objAnims.dataSource.size - 1; } - + this.onDialogClosed = onClose; } diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx index 8c0ae8655..5dd3aceaa 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorObjectPropertiesToolbox.hx @@ -121,7 +121,7 @@ class StageEditorObjectPropertiesToolbox extends StageEditorDefaultToolbox linkedObj.color = FlxColor.fromString(_.value) ?? 0xFFFFFFFF; } } - + this.onDialogClosed = onClose; } diff --git a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx index c8077c667..0224e693a 100644 --- a/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx +++ b/source/funkin/ui/debug/stageeditor/toolboxes/StageEditorStageToolbox.hx @@ -51,7 +51,7 @@ class StageEditorStageToolbox extends StageEditorDefaultToolbox } refresh(); - + this.onDialogClosed = onClose; } diff --git a/source/funkin/ui/freeplay/FreeplayStyle.hx b/source/funkin/ui/freeplay/FreeplayStyle.hx index f2fb8b7fa..037aaf056 100644 --- a/source/funkin/ui/freeplay/FreeplayStyle.hx +++ b/source/funkin/ui/freeplay/FreeplayStyle.hx @@ -21,7 +21,6 @@ class FreeplayStyle implements IRegistryEntry * The full data for a freeplay style. */ // public final _data:FreeplayStyleData; - public function new(id:String) { this.id = id; From 46c40f67ccab54f85e158e919e8740b0aa91dcb2 Mon Sep 17 00:00:00 2001 From: Abnormal <86753001+AbnormalPoof@users.noreply.github.com> Date: Sat, 28 Jun 2025 05:16:57 -0500 Subject: [PATCH 9/9] the lime bump of the century --- hmm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmm.json b/hmm.json index b3099e6f0..50c9a7e24 100644 --- a/hmm.json +++ b/hmm.json @@ -170,7 +170,7 @@ "name": "lime", "type": "git", "dir": null, - "ref": "71c0f93e91c10975426d7518b826c1584a4f4b73", + "ref": "045ede0363120ff0425529a4902e4da44fd6d293", "url": "https://github.com/FunkinCrew/lime-mobile" }, {