diff --git a/assets/data/splashes/default.xml b/assets/data/splashes/default.xml index bd3a5616..e484dc03 100644 --- a/assets/data/splashes/default.xml +++ b/assets/data/splashes/default.xml @@ -1,19 +1,15 @@ - + - - + - - + - - + - - + \ No newline at end of file diff --git a/buildnumber.txt b/buildnumber.txt index 90c86a92..3f952cd0 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2028 \ No newline at end of file +2031 \ No newline at end of file diff --git a/source/funkin/game/SplashGroup.hx b/source/funkin/game/SplashGroup.hx index bac3b88f..397dab03 100644 --- a/source/funkin/game/SplashGroup.hx +++ b/source/funkin/game/SplashGroup.hx @@ -103,15 +103,17 @@ class SplashGroup extends FlxTypedGroup { return animationNames[id][FlxG.random.int(0, animationNames[id].length-1)]; } + var __splash:FunkinSprite; public function showOnStrum(strum:Strum) { if (!valid) return null; - var splash = recycle(); + __splash = recycle(); - splash.cameras = strum.lastDrawCameras; - splash.setPosition(strum.x + ((strum.width - splash.width) / 2), strum.y + ((strum.height - splash.height) / 2)); - splash.active = splash.visible = true; - splash.playAnim(getSplashAnim(strum.ID), true); + __splash.cameras = strum.lastDrawCameras; + __splash.setPosition(strum.x + ((strum.width - __splash.width) / 2), strum.y + ((strum.height - __splash.height) / 2)); + __splash.active = __splash.visible = true; + __splash.playAnim(getSplashAnim(strum.ID), true); + __splash.scrollFactor.set(strum.scrollFactor.x, strum.scrollFactor.y); - return splash; + return __splash; } } \ No newline at end of file diff --git a/source/funkin/game/SplashHandler.hx b/source/funkin/game/SplashHandler.hx index 2c04d2bf..3104fee1 100644 --- a/source/funkin/game/SplashHandler.hx +++ b/source/funkin/game/SplashHandler.hx @@ -31,9 +31,10 @@ class SplashHandler extends FlxTypedGroup { grpMap = null; } + var __grp:SplashGroup; public function showSplash(name:String, strum:Strum) { - var grp = getSplashGroup(name); - add(grp.showOnStrum(strum)); + __grp = getSplashGroup(name); + add(__grp.showOnStrum(strum)); // max 8 rendered splashes while(members.length > 8) diff --git a/source/funkin/system/FunkinSprite.hx b/source/funkin/system/FunkinSprite.hx index f60295fc..9aa403fa 100644 --- a/source/funkin/system/FunkinSprite.hx +++ b/source/funkin/system/FunkinSprite.hx @@ -43,13 +43,18 @@ class FunkinSprite extends FlxSprite implements IBeatReceiver implements IOffset public static function copyFrom(source:FunkinSprite) { var spr = new FunkinSprite(); - spr.setPosition(source.x, source.y); - spr.frames = source.frames; - if (source.animateAtlas != null && source.atlasPath != null) - spr.loadSprite(source.atlasPath); - spr.animation.copyFrom(source.animation); - spr.visible = source.visible; - spr.alpha = source.alpha; + @:privateAccess { + spr.setPosition(source.x, source.y); + spr.frames = source.frames; + if (source.animateAtlas != null && source.atlasPath != null) + spr.loadSprite(source.atlasPath); + spr.animation.copyFrom(source.animation); + spr.visible = source.visible; + spr.alpha = source.alpha; + spr.antialiasing = source.antialiasing; + spr.scale.set(source.scale.x, source.scale.y); + spr.scrollFactor.set(source.scrollFactor.x, source.scrollFactor.y); + } return spr; }