From d83149dc70c4eaba5bc0081e5c73426cfe2199bc Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Sat, 27 Sep 2025 20:18:44 +0300 Subject: [PATCH] FIx html5 compile. --- source/funkin/InitState.hx | 8 ++++++++ source/funkin/ui/debug/ChartPlaytestState.hx | 2 ++ source/funkin/util/file/FNFCUtil.hx | 2 ++ 3 files changed, 12 insertions(+) diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index 84b48160a..e807fdf5d 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -387,6 +387,7 @@ class InitState extends FlxState fnfsTargetPath: params.stage.stagePath, })); } + #if sys else if (params.song.shouldLoadSong && params.song.songPath != null) { FlxG.switchState(() -> new ChartPlaytestState( @@ -399,6 +400,13 @@ class InitState extends FlxState // FlxG.sound.cache(Paths.music('freakyMenu/freakyMenu')); FlxG.switchState(() -> new TitleState()); } + #else + else + { + // FlxG.sound.cache(Paths.music('freakyMenu/freakyMenu')); + FlxG.switchState(() -> new TitleState()); + } + #end } /** diff --git a/source/funkin/ui/debug/ChartPlaytestState.hx b/source/funkin/ui/debug/ChartPlaytestState.hx index d4dbd9489..01ab2d582 100644 --- a/source/funkin/ui/debug/ChartPlaytestState.hx +++ b/source/funkin/ui/debug/ChartPlaytestState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug; +#if sys import flixel.FlxSubState; import flixel.text.FlxText; import flixel.tweens.FlxTween; @@ -146,3 +147,4 @@ typedef ChartPlaytestStateParams = { fnfcFilePath:Null }; +#end diff --git a/source/funkin/util/file/FNFCUtil.hx b/source/funkin/util/file/FNFCUtil.hx index 6d07c5bb1..3ff470fdc 100644 --- a/source/funkin/util/file/FNFCUtil.hx +++ b/source/funkin/util/file/FNFCUtil.hx @@ -1,5 +1,6 @@ package funkin.util.file; +#if sys import funkin.data.song.SongData.SongChartData; import funkin.ui.transition.LoadingState; import funkin.audio.FunkinSound; @@ -184,3 +185,4 @@ class FNFCUtil return song; } } +#end