Merge pull request #420 from FunkinCrew/bugfix/some-mac-fixins

MacOS fixins
This commit is contained in:
Cameron Taylor 2024-03-26 01:30:00 -04:00 committed by GitHub
commit 593b9f30d2
4 changed files with 37 additions and 17 deletions

15
.vscode/settings.json vendored
View file

@ -204,6 +204,21 @@
"label": "HTML5 / Debug (Watch)", "label": "HTML5 / Debug (Watch)",
"target": "html5", "target": "html5",
"args": ["-debug", "-watch", "-DFORCE_DEBUG_VERSION"] "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, "cmake.configureOnOpen": false,

View file

@ -2941,7 +2941,10 @@ class PlayState extends MusicBeatSubState
if (overrideMusic) if (overrideMusic)
{ {
// Stop the music. Do NOT destroy it, something still references it! // Stop the music. Do NOT destroy it, something still references it!
if (FlxG.sound.music != null)
{
FlxG.sound.music.pause(); FlxG.sound.music.pause();
}
if (vocals != null) if (vocals != null)
{ {
vocals.pause(); vocals.pause();
@ -2951,7 +2954,10 @@ class PlayState extends MusicBeatSubState
else else
{ {
// Stop and destroy the music. // Stop and destroy the music.
if (FlxG.sound.music != null)
{
FlxG.sound.music.pause(); FlxG.sound.music.pause();
}
if (vocals != null) if (vocals != null)
{ {
vocals.destroy(); vocals.destroy();

View file

@ -109,7 +109,7 @@ class ResultState extends MusicBeatSubState
add(gf); add(gf);
var boyfriend:FlxSprite = FunkinSprite.createSparrow(640, -200, 'resultScreen/resultBoyfriendGOOD'); 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.visible = false;
boyfriend.animation.finishCallback = function(_) { boyfriend.animation.finishCallback = function(_) {
boyfriend.animation.play('fall', true, false, 14); boyfriend.animation.play('fall', true, false, 14);
@ -164,7 +164,7 @@ class ResultState extends MusicBeatSubState
add(blackTopBar); add(blackTopBar);
var resultsAnim:FunkinSprite = FunkinSprite.createSparrow(-200, -10, "resultScreen/results"); 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"); resultsAnim.animation.play("result");
add(resultsAnim); add(resultsAnim);

View file

@ -1,31 +1,35 @@
package funkin.ui.debug.anim; 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.display.FlxGridOverlay;
import flixel.addons.ui.FlxInputText; import flixel.addons.ui.FlxInputText;
import flixel.addons.ui.FlxUIDropDownMenu; import flixel.addons.ui.FlxUIDropDownMenu;
import flixel.FlxCamera;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.graphics.frames.FlxAtlasFrames; import flixel.graphics.frames.FlxAtlasFrames;
import flixel.graphics.frames.FlxFrame; import flixel.graphics.frames.FlxFrame;
import flixel.group.FlxGroup; import flixel.group.FlxGroup;
import flixel.math.FlxPoint; import flixel.math.FlxPoint;
import flixel.text.FlxText; import flixel.text.FlxText;
import flixel.util.FlxColor; import flixel.util.FlxColor;
import funkin.util.MouseUtil;
import flixel.util.FlxSpriteUtil; import flixel.util.FlxSpriteUtil;
import flixel.util.FlxTimer; import flixel.util.FlxTimer;
import funkin.audio.FunkinSound;
import funkin.input.Cursor;
import funkin.play.character.BaseCharacter; import funkin.play.character.BaseCharacter;
import funkin.play.character.CharacterData;
import funkin.play.character.CharacterData.CharacterDataParser; import funkin.play.character.CharacterData.CharacterDataParser;
import funkin.play.character.SparrowCharacter; 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.components.DropDown;
import haxe.ui.core.Component; import haxe.ui.core.Component;
import haxe.ui.core.Screen;
import haxe.ui.events.ItemEvent; import haxe.ui.events.ItemEvent;
import haxe.ui.events.UIEvent; import haxe.ui.events.UIEvent;
import funkin.ui.mainmenu.MainMenuState; import haxe.ui.RuntimeComponentBuilder;
import lime.utils.Assets as LimeAssets; import lime.utils.Assets as LimeAssets;
import openfl.Assets; import openfl.Assets;
import openfl.events.Event; import openfl.events.Event;
@ -33,13 +37,8 @@ import openfl.events.IOErrorEvent;
import openfl.geom.Rectangle; import openfl.geom.Rectangle;
import openfl.net.FileReference; import openfl.net.FileReference;
import openfl.net.URLLoader; import openfl.net.URLLoader;
import funkin.ui.mainmenu.MainMenuState;
import openfl.net.URLRequest; import openfl.net.URLRequest;
import openfl.utils.ByteArray; 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; using flixel.util.FlxSpriteUtil;