From 8259266f448de5aee8b212609b1d5a79886f3bfe Mon Sep 17 00:00:00 2001 From: Ralty <78720179+Raltyro@users.noreply.github.com> Date: Sat, 19 Jul 2025 14:10:54 +0700 Subject: [PATCH] Small fixes --- libs.xml | 2 +- project.xml | 2 +- source/funkin/game/SplashGroup.hx | 14 ++++++-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/libs.xml b/libs.xml index e4247aca..85ff5c3f 100644 --- a/libs.xml +++ b/libs.xml @@ -16,8 +16,8 @@ + - diff --git a/project.xml b/project.xml index 8b56b56f..31cffad6 100644 --- a/project.xml +++ b/project.xml @@ -211,7 +211,7 @@ - +
diff --git a/source/funkin/game/SplashGroup.hx b/source/funkin/game/SplashGroup.hx index cc2b75a1..77c807f7 100644 --- a/source/funkin/game/SplashGroup.hx +++ b/source/funkin/game/SplashGroup.hx @@ -52,15 +52,11 @@ class SplashGroup extends FlxTypedGroup { function createSplash(imagePath:String) { var splash = new Splash(); - splash.antialiasing = true; splash.active = splash.visible = false; splash.loadSprite(Paths.image(imagePath)); - if (xml.has.scale) splash.scale.scale(Std.parseFloat(xml.att.scale).getDefault(1)); - if (xml.has.alpha) splash.alpha = Std.parseFloat(xml.att.alpha).getDefault(1); - if (xml.has.antialiasing) splash.antialiasing = xml.att.antialiasing == "true"; - _scale = splash.scale.x; - _alpha = splash.alpha; - _antialiasing = splash.antialiasing; + _scale = xml.has.scale ? Std.parseFloat(xml.att.scale).getDefault(1) : 1; + _alpha = xml.has.alpha ? Std.parseFloat(xml.att.alpha).getDefault(1) : 1; + _antialiasing = xml.has.antialiasing ? xml.att.antialiasing == "true" : true; return splash; } @@ -90,6 +86,8 @@ class SplashGroup extends FlxTypedGroup { } splash.animation.finishCallback = function(name:String) { splash.active = splash.visible = false; + splash.strum = null; + splash.strumID = null; }; } @@ -128,7 +126,7 @@ class SplashGroup extends FlxTypedGroup { __splash.antialiasing = _antialiasing; __splash.cameras = strum.lastDrawCameras; - __splash.setPosition(strum.x + ((strum.width - __splash.width) / 2), strum.y + ((strum.height - __splash.height) / 2)); + __splash.setPosition(strum.x + 0.5 * (strum.width - __splash.width), strum.y + 0.5 * (strum.height - __splash.height)); __splash.active = __splash.visible = true; __splash.playAnim(getSplashAnim(strum.ID), true); __splash.scrollFactor.set(strum.scrollFactor.x, strum.scrollFactor.y);