From 607b5757fdc6f558c75eedfd1b7fee8d478a1e85 Mon Sep 17 00:00:00 2001 From: FabsTheFabs Date: Wed, 6 Mar 2024 05:05:03 +0000 Subject: [PATCH 01/14] added decimal point to waveform duration --- .../debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx index af1d75444..bd2fd8ba3 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx @@ -272,19 +272,19 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox // waveformPlayer.waveform.forceUpdate = true; waveformPlayer.waveform.waveformData = playerVoice?.waveformData; // Set the width and duration to render the full waveform, with the clipRect applied we only render a segment of it. - waveformPlayer.waveform.duration = (playerVoice?.length ?? 1000) / Constants.MS_PER_SEC; + waveformPlayer.waveform.duration = (playerVoice?.length ?? 1000.0) / Constants.MS_PER_SEC; // Build opponent waveform. // waveformOpponent.waveform.forceUpdate = true; // note: if song only has one set of vocals (Vocals.ogg/mp3) then this is null and crashes charting editor // so we null check waveformOpponent.waveform.waveformData = opponentVoice?.waveformData; - waveformOpponent.waveform.duration = (opponentVoice?.length ?? 1000) / Constants.MS_PER_SEC; + waveformOpponent.waveform.duration = (opponentVoice?.length ?? 1000.0) / Constants.MS_PER_SEC; // Build instrumental waveform. // waveformInstrumental.waveform.forceUpdate = true; waveformInstrumental.waveform.waveformData = chartEditorState.audioInstTrack.waveformData; - waveformInstrumental.waveform.duration = (instTrack?.length ?? 1000) / Constants.MS_PER_SEC; + waveformInstrumental.waveform.duration = (instTrack?.lenth ?? 1000.0) / Constants.MS_PER_SEC; addOffsetsToAudioPreview(); } From 6bc1eb7278dab1e01f32125026c33cf1cc67a6ea Mon Sep 17 00:00:00 2001 From: FabsTheFabs Date: Wed, 6 Mar 2024 05:06:57 +0000 Subject: [PATCH 02/14] typo oops --- .../ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx index bd2fd8ba3..46721edfa 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorOffsetsToolbox.hx @@ -284,7 +284,7 @@ class ChartEditorOffsetsToolbox extends ChartEditorBaseToolbox // Build instrumental waveform. // waveformInstrumental.waveform.forceUpdate = true; waveformInstrumental.waveform.waveformData = chartEditorState.audioInstTrack.waveformData; - waveformInstrumental.waveform.duration = (instTrack?.lenth ?? 1000.0) / Constants.MS_PER_SEC; + waveformInstrumental.waveform.duration = (instTrack?.length ?? 1000.0) / Constants.MS_PER_SEC; addOffsetsToAudioPreview(); } From a516e9199f714a2be5488d2ee4d063c3430f3c80 Mon Sep 17 00:00:00 2001 From: Mike Welsh Date: Tue, 5 Mar 2024 23:21:57 -0800 Subject: [PATCH 03/14] Remove DynamicTools; fix pause menu on HTML5 Calls intended for `ArrayTools.clone` were being routed to `DynamicTools.clone` due to the order of `using` statements in `imports.hx`. This caused the pause menu to break due to arrays becoming fubar (missing length property). Using `DynamicTools` is a little dangerous, so remove it in favor of calling `Reflect.copy` directly. --- source/funkin/import.hx | 1 - .../funkin/ui/debug/charting/ChartEditorState.hx | 4 ++-- source/funkin/util/tools/DynamicTools.hx | 14 -------------- 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 source/funkin/util/tools/DynamicTools.hx diff --git a/source/funkin/import.hx b/source/funkin/import.hx index 02055d4ed..250de99cb 100644 --- a/source/funkin/import.hx +++ b/source/funkin/import.hx @@ -13,7 +13,6 @@ using Lambda; using StringTools; using funkin.util.tools.ArraySortTools; using funkin.util.tools.ArrayTools; -using funkin.util.tools.DynamicTools; using funkin.util.tools.FloatTools; using funkin.util.tools.Int64Tools; using funkin.util.tools.IntTools; diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index b9e412b36..0e1aa4f4d 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -4530,14 +4530,14 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState { // Create an event and place it in the chart. // TODO: Figure out configuring event data. - var newEventData:SongEventData = new SongEventData(cursorSnappedMs, eventKindToPlace, eventDataToPlace.clone()); + var newEventData:SongEventData = new SongEventData(cursorSnappedMs, eventKindToPlace, Reflect.copy(eventDataToPlace)); performCommand(new AddEventsCommand([newEventData], FlxG.keys.pressed.CONTROL)); } else { // Create a note and place it in the chart. - var newNoteData:SongNoteData = new SongNoteData(cursorSnappedMs, cursorColumn, 0, noteKindToPlace.clone()); + var newNoteData:SongNoteData = new SongNoteData(cursorSnappedMs, cursorColumn, 0, Reflect.copy(noteKindToPlace)); performCommand(new AddNotesCommand([newNoteData], FlxG.keys.pressed.CONTROL)); diff --git a/source/funkin/util/tools/DynamicTools.hx b/source/funkin/util/tools/DynamicTools.hx deleted file mode 100644 index 47501ea22..000000000 --- a/source/funkin/util/tools/DynamicTools.hx +++ /dev/null @@ -1,14 +0,0 @@ -package funkin.util.tools; - -class DynamicTools -{ - /** - * Creates a full clone of the input `Dynamic`. Only guaranteed to work on anonymous structures. - * @param input The `Dynamic` to clone. - * @return A clone of the input `Dynamic`. - */ - public static function clone(input:Dynamic):Dynamic - { - return Reflect.copy(input); - } -} From b2d3fe17d7b7af1e0d21786d357f12815a1aa498 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 6 Mar 2024 02:56:10 -0500 Subject: [PATCH 04/14] fun lil pitch effect on result scren --- source/funkin/play/ResultState.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/funkin/play/ResultState.hx b/source/funkin/play/ResultState.hx index f77c3fc6b..a78d61583 100644 --- a/source/funkin/play/ResultState.hx +++ b/source/funkin/play/ResultState.hx @@ -347,6 +347,10 @@ class ResultState extends MusicBeatSubState if (controls.PAUSE) { + FlxTween.tween(FlxG.sound.music, {volume: 0}, 0.8); + FlxTween.tween(FlxG.sound.music, {pitch: 3}, 0.1, {onComplete: _ -> { + FlxTween.tween(FlxG.sound.music, {pitch: 0.5}, 0.4); + }}); if (params.storyMode) { openSubState(new funkin.ui.transition.StickerSubState(null, (sticker) -> new StoryMenuState(sticker))); From 332a81ec72a36af65757bf66a640d38e88f4ae77 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 6 Mar 2024 17:22:11 -0500 Subject: [PATCH 05/14] No longer miss notes during ending cutscene --- source/funkin/play/PlayState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index ab693ef46..a6e4b4632 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1032,7 +1032,7 @@ class PlayState extends MusicBeatSubState if (isInCutscene && !disableKeys) handleCutsceneKeys(elapsed); // Moving notes into position is now done by Strumline.update(). - processNotes(elapsed); + if (!isInCutscene) processNotes(elapsed); justUnpaused = false; } From aff7bbb4e9bd6d8307e1d0ef79d88cee035c7a40 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 6 Mar 2024 17:22:22 -0500 Subject: [PATCH 06/14] Update assets submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 095e91fb3..bf61ea3c9 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 095e91fb33dad70a5b51e37542e335cedd025d09 +Subproject commit bf61ea3c9b56bc82c36976d5aa8052bc16ff1b4e From 69b28ca42c5f8f0be4052f09df05f3e782de2bc6 Mon Sep 17 00:00:00 2001 From: Mike Welsh Date: Wed, 6 Mar 2024 22:48:44 -0800 Subject: [PATCH 07/14] Add #if FLX_DEBUG in TrackerUtil `Tracker.addProfile` only exists when FLX_DEBUG is set, so add this conditional check to fix non-debug builds. --- source/funkin/util/TrackerUtil.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/funkin/util/TrackerUtil.hx b/source/funkin/util/TrackerUtil.hx index b8ed0c995..ffe374c5f 100644 --- a/source/funkin/util/TrackerUtil.hx +++ b/source/funkin/util/TrackerUtil.hx @@ -17,7 +17,9 @@ class TrackerUtil */ public static function initTrackers():Void { + #if FLX_DEBUG Tracker.addProfile(new TrackerProfile(Highscore, ["tallies"])); FlxG.console.registerClass(Highscore); + #end } } From b0abef0d527dcb90060a1b142fa4f4ed393a5ba2 Mon Sep 17 00:00:00 2001 From: Mike Welsh Date: Wed, 6 Mar 2024 23:37:50 -0800 Subject: [PATCH 08/14] Use correct resource URL when loading videos On HTML5, `VideoCutscene` was not stripping the library prefix from the video file path, causing the video to fail to load. Fixes FPIQ-281. --- source/funkin/play/cutscene/VideoCutscene.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/play/cutscene/VideoCutscene.hx b/source/funkin/play/cutscene/VideoCutscene.hx index 2d31b0a28..ff56e0919 100644 --- a/source/funkin/play/cutscene/VideoCutscene.hx +++ b/source/funkin/play/cutscene/VideoCutscene.hx @@ -61,7 +61,7 @@ class VideoCutscene VideoCutscene.cutsceneType = cutsceneType; #if html5 - playVideoHTML5(filePath); + playVideoHTML5(rawFilePath); #elseif hxCodec playVideoNative(rawFilePath); #else From 427e4810ad768879e5585915abb50f7ec5f43c7a Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 7 Mar 2024 03:57:16 -0500 Subject: [PATCH 09/14] faster bf processing... --- source/funkin/util/logging/AnsiTrace.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/funkin/util/logging/AnsiTrace.hx b/source/funkin/util/logging/AnsiTrace.hx index c8d27b86f..9fdc19e1b 100644 --- a/source/funkin/util/logging/AnsiTrace.hx +++ b/source/funkin/util/logging/AnsiTrace.hx @@ -52,7 +52,12 @@ class AnsiTrace public static function traceBF() { #if sys - if (colorSupported) Sys.println(ansiBF.join("\n")); + if (colorSupported) + { + for (line in ansiBF) + Sys.stdout().writeString(line + "\n"); + Sys.stdout().flush(); + } #end } From c385b7887f83d4bf5309c1aaa16ea32e4058b312 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 7 Mar 2024 15:41:00 -0500 Subject: [PATCH 10/14] Update assets submodule --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index bf61ea3c9..3510a2459 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit bf61ea3c9b56bc82c36976d5aa8052bc16ff1b4e +Subproject commit 3510a245986914ff72736f121347cf4a11db0b35 From a6c44412c50e2dc8ef663f9349bf3e08fde13e38 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 7 Mar 2024 23:20:02 -0500 Subject: [PATCH 11/14] Exclude WAV files from builds. --- Project.xml | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Project.xml b/Project.xml index c368dacef..99c46ef9f 100644 --- a/Project.xml +++ b/Project.xml @@ -22,8 +22,8 @@ - - + +
@@ -53,28 +53,28 @@
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +