From 7b491afb79eb7b5e0814a7f5798015d82b344940 Mon Sep 17 00:00:00 2001 From: HEIHUAa <112499486+HEIHUAa@users.noreply.github.com> Date: Mon, 17 Aug 2026 08:42:22 +0800 Subject: [PATCH] fix --- source/funkin/backend/FunkinSprite.hx | 8 ++++---- source/funkin/backend/FunkinText.hx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/funkin/backend/FunkinSprite.hx b/source/funkin/backend/FunkinSprite.hx index df2630376..0ad2ffafb 100644 --- a/source/funkin/backend/FunkinSprite.hx +++ b/source/funkin/backend/FunkinSprite.hx @@ -215,15 +215,15 @@ class FunkinSprite extends FlxAnimate implements IBeatReceiver implements IOffse private inline function __prepareZoomFactor(?rect:FlxRect, camera:FlxCamera):FlxRect { if (Flags.USE_LEGACY_ZOOM_FACTOR) return (rect ?? FlxRect.get()).set( - camera.width * 0.5, - camera.height * 0.5, + camera.width * 0.5 + camera.scroll.x * scrollFactor.x, + camera.height * 0.5 + camera.scroll.y * scrollFactor.y, (camera.scaleX > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleX, 1, zoomFactor)), (camera.scaleY > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleY, 1, zoomFactor)) ); else return (rect ?? FlxRect.get()).set( - camera.width * 0.5 + camera.scroll.x * scrollFactor.x, - camera.height * 0.5 + camera.scroll.y * scrollFactor.y, + camera.width * 0.5, + camera.height * 0.5, (camera.scaleX > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleX, 1, zoomFactor)), (camera.scaleY > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleY, 1, zoomFactor)) ); diff --git a/source/funkin/backend/FunkinText.hx b/source/funkin/backend/FunkinText.hx index 344d2f41f..0abc5d5c5 100644 --- a/source/funkin/backend/FunkinText.hx +++ b/source/funkin/backend/FunkinText.hx @@ -68,15 +68,15 @@ class FunkinText extends FlxText private inline function __prepareZoomFactor(rect:FlxRect, camera:FlxCamera):FlxRect { if (Flags.USE_LEGACY_ZOOM_FACTOR) return rect.set( - camera.width * 0.5, - camera.height * 0.5, + camera.width * 0.5 + camera.scroll.x * scrollFactor.x, + camera.height * 0.5 + camera.scroll.y * scrollFactor.y, (camera.scaleX > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleX, 1, zoomFactor)), (camera.scaleY > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleY, 1, zoomFactor)) ); else return rect.set( - camera.width * 0.5 + camera.scroll.x * scrollFactor.x, - camera.height * 0.5 + camera.scroll.y * scrollFactor.y, + camera.width * 0.5, + camera.height * 0.5, (camera.scaleX > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleX, 1, zoomFactor)), (camera.scaleY > 0 ? Math.max : Math.min)(0, FlxMath.lerp(1 / camera.scaleY, 1, zoomFactor)) );