From 07ad25006008910a4c8c9a706b64267cfbca306f Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 25 Mar 2024 21:08:39 -0400 Subject: [PATCH 1/4] Fix an audio crash when exiting a cutscene --- source/funkin/play/PlayState.hx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index a8cb879a3..169809a63 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -2941,7 +2941,10 @@ class PlayState extends MusicBeatSubState if (overrideMusic) { // Stop the music. Do NOT destroy it, something still references it! - FlxG.sound.music.pause(); + if (FlxG.sound.music != null) + { + FlxG.sound.music.pause(); + } if (vocals != null) { vocals.pause(); @@ -2951,7 +2954,10 @@ class PlayState extends MusicBeatSubState else { // Stop and destroy the music. - FlxG.sound.music.pause(); + if (FlxG.sound.music != null) + { + FlxG.sound.music.pause(); + } if (vocals != null) { vocals.destroy(); From f4617cbbda6cb3b62ea7a7bdf351d8d3f366d533 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 25 Mar 2024 21:08:53 -0400 Subject: [PATCH 2/4] Add mac builds with proper arguments --- .vscode/settings.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 84af3a3fd..13a1862d2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -204,6 +204,21 @@ "label": "HTML5 / Debug (Watch)", "target": "html5", "args": ["-debug", "-watch", "-DFORCE_DEBUG_VERSION"] + }, + { + "label": "macOS / Debug", + "target": "mac", + "args": ["-debug", "-DFORCE_DEBUG_VERSION"] + }, + { + "label": "macOS / Release", + "target": "mac", + "args": ["-release"] + }, + { + "label": "macOS / Release (GitHub Actions)", + "target": "mac", + "args": ["-release", "-DGITHUB_BUILD"] } ], "cmake.configureOnOpen": false, From 90f861628d6869b9b148782ed0ce1c5bf8f66ccc Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 25 Mar 2024 21:09:02 -0400 Subject: [PATCH 3/4] Fix an HTML5 build issue. --- .../ui/debug/anim/DebugBoundingState.hx | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/source/funkin/ui/debug/anim/DebugBoundingState.hx b/source/funkin/ui/debug/anim/DebugBoundingState.hx index 86e84117a..1aa5d6e12 100644 --- a/source/funkin/ui/debug/anim/DebugBoundingState.hx +++ b/source/funkin/ui/debug/anim/DebugBoundingState.hx @@ -1,31 +1,35 @@ package funkin.ui.debug.anim; -import funkin.util.SerializerUtil; -import funkin.play.character.CharacterData; -import flixel.FlxCamera; -import flixel.FlxSprite; -import flixel.FlxState; import flixel.addons.display.FlxGridOverlay; import flixel.addons.ui.FlxInputText; import flixel.addons.ui.FlxUIDropDownMenu; +import flixel.FlxCamera; +import flixel.FlxSprite; +import flixel.FlxState; import flixel.graphics.frames.FlxAtlasFrames; import flixel.graphics.frames.FlxFrame; import flixel.group.FlxGroup; import flixel.math.FlxPoint; import flixel.text.FlxText; import flixel.util.FlxColor; -import funkin.util.MouseUtil; import flixel.util.FlxSpriteUtil; import flixel.util.FlxTimer; +import funkin.audio.FunkinSound; +import funkin.input.Cursor; import funkin.play.character.BaseCharacter; +import funkin.play.character.CharacterData; import funkin.play.character.CharacterData.CharacterDataParser; import funkin.play.character.SparrowCharacter; -import haxe.ui.RuntimeComponentBuilder; +import funkin.ui.mainmenu.MainMenuState; +import funkin.util.MouseUtil; +import funkin.util.SerializerUtil; +import funkin.util.SortUtil; import haxe.ui.components.DropDown; import haxe.ui.core.Component; +import haxe.ui.core.Screen; import haxe.ui.events.ItemEvent; import haxe.ui.events.UIEvent; -import funkin.ui.mainmenu.MainMenuState; +import haxe.ui.RuntimeComponentBuilder; import lime.utils.Assets as LimeAssets; import openfl.Assets; import openfl.events.Event; @@ -33,13 +37,8 @@ import openfl.events.IOErrorEvent; import openfl.geom.Rectangle; import openfl.net.FileReference; import openfl.net.URLLoader; -import funkin.ui.mainmenu.MainMenuState; import openfl.net.URLRequest; import openfl.utils.ByteArray; -import funkin.input.Cursor; -import funkin.play.character.CharacterData.CharacterDataParser; -import funkin.util.SortUtil; -import haxe.ui.core.Screen; using flixel.util.FlxSpriteUtil; From 5ae075e947c1fdbdd50614f0750f02f5b3f47fc2 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 25 Mar 2024 21:09:14 -0400 Subject: [PATCH 4/4] Fix a couple Flixel warnings on the results screen. --- source/funkin/play/ResultState.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/funkin/play/ResultState.hx b/source/funkin/play/ResultState.hx index c695b1db4..821f4ba3c 100644 --- a/source/funkin/play/ResultState.hx +++ b/source/funkin/play/ResultState.hx @@ -109,7 +109,7 @@ class ResultState extends MusicBeatSubState add(gf); var boyfriend:FlxSprite = FunkinSprite.createSparrow(640, -200, 'resultScreen/resultBoyfriendGOOD'); - boyfriend.animation.addByPrefix("fall", "Boyfriend Good", 24, false); + boyfriend.animation.addByPrefix("fall", "Boyfriend Good Anim0", 24, false); boyfriend.visible = false; boyfriend.animation.finishCallback = function(_) { boyfriend.animation.play('fall', true, false, 14); @@ -164,7 +164,7 @@ class ResultState extends MusicBeatSubState add(blackTopBar); var resultsAnim:FunkinSprite = FunkinSprite.createSparrow(-200, -10, "resultScreen/results"); - resultsAnim.animation.addByPrefix("result", "results", 24, false); + resultsAnim.animation.addByPrefix("result", "results instance 1", 24, false); resultsAnim.animation.play("result"); add(resultsAnim);