From e9ed7223b60ea482602bb9d46ccd3c9e2b605010 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 15 Dec 2023 02:29:32 -0500 Subject: [PATCH 1/5] no debugger --- assets | 2 +- source/funkin/ui/debug/charting/ChartEditorState.hx | 9 +++++++++ .../charting/handlers/ChartEditorToolboxHandler.hx | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/assets b/assets index dfaf23dfa..c354795f7 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit dfaf23dfa11ff67be2eea9113a80ff5dc0040f76 +Subproject commit c354795f7f560fa096b855c6e6bca745f77fa414 diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 78de08fdf..9b2ffadde 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -124,6 +124,7 @@ import flixel.group.FlxGroup.FlxTypedGroup; import funkin.audio.visualize.PolygonVisGroup; import flixel.input.mouse.FlxMouseEvent; import flixel.text.FlxText; +import flixel.system.debug.log.LogStyle; using Lambda; @@ -544,6 +545,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState */ var playtestPracticeMode:Bool = false; + /** + * Enables or disables the "debugger" popup that appears when you run into a flixel error. + */ + var enabledDebuggerPopup:Bool = true; + // Visuals /** @@ -4766,6 +4772,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState return; } + LogStyle.WARNING.openConsole = enabledDebuggerPopup; + LogStyle.ERROR.openConsole = enabledDebuggerPopup; + // TODO: Rework asset system so we can remove this. switch (currentSongStage) { diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx index a9a9c375d..98d04887d 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx @@ -488,6 +488,16 @@ class ChartEditorToolboxHandler state.playtestStartTime = checkboxStartTime.selected; }; + var checkboxDebugger:Null = toolbox.findComponent('playtestDebuggerCheckbox', CheckBox); + + if (checkboxDebugger == null) throw 'ChartEditorToolboxHandler.buildToolboxPlaytestPropertiesLayout() - Could not find playtestDebuggerCheckbox component.'; + + state.enabledDebuggerPopup = checkboxDebugger.selected; + + checkboxDebugger.onClick = _ -> { + state.enabledDebuggerPopup = checkboxDebugger.selected; + }; + return toolbox; } From b1c933283055bfd4c0431f5b820840a18d848a52 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 2 Jan 2024 01:33:10 -0500 Subject: [PATCH 2/5] Fix an issue where hold notes early in a song would not render properly. --- source/funkin/play/notes/SustainTrail.hx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/funkin/play/notes/SustainTrail.hx b/source/funkin/play/notes/SustainTrail.hx index ab4bf5f16..7367b97af 100644 --- a/source/funkin/play/notes/SustainTrail.hx +++ b/source/funkin/play/notes/SustainTrail.hx @@ -149,9 +149,9 @@ class SustainTrail extends FlxSprite if (sustainLength == s) return s; height = sustainHeight(s, getScrollSpeed()); - // updateColorTransform(); + this.sustainLength = s; updateClipping(); - return sustainLength = s; + return this.sustainLength; } /** @@ -162,13 +162,15 @@ class SustainTrail extends FlxSprite public function updateClipping(songTime:Float = 0):Void { var clipHeight:Float = FlxMath.bound(sustainHeight(sustainLength - (songTime - strumTime), getScrollSpeed()), 0, height); - if (clipHeight == 0) + if (clipHeight <= 0.1) { visible = false; return; } else + { visible = true; + } var bottomHeight:Float = graphic.height * zoom * endOffset; var partHeight:Float = clipHeight - bottomHeight; From ddfecf2cfcf494a9f59abe4709eb3cb60bedafe0 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 2 Jan 2024 14:07:07 -0500 Subject: [PATCH 3/5] Clean up difficulty label behavior --- assets | 2 +- .../ui/debug/charting/ChartEditorState.hx | 40 +++++++++++++------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/assets b/assets index 6f17eb051..9ecc4d26f 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 6f17eb051e2609d59a591d4e6eb78e37c6e90adb +Subproject commit 9ecc4d26fe6b26f31782cccfcd7331bd8a318ce1 diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index bf1b70d55..203bd1508 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -2422,6 +2422,23 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState this.refreshToolbox(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT); } + playbarDifficulty.onClick = _ -> { + if (FlxG.keys.pressed.CONTROL) + { + this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true); + } + else + { + incrementDifficulty(-1); + this.refreshToolbox(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT); + } + } + + playbarDifficulty.onRightClick = _ -> { + incrementDifficulty(1); + this.refreshToolbox(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT); + } + // Add functionality to the menu items. // File @@ -2619,10 +2636,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState menubarLabelPlaybackSpeed.text = 'Playback Speed - ${pitchDisplay}x'; } - playbarDifficulty.onClick = _ -> { - this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true); - } - menubarItemToggleToolboxDifficulty.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, event.value); menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value); menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT, event.value); @@ -4394,8 +4407,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState if (playbarSongRemaining.value != songRemainingString) playbarSongRemaining.value = songRemainingString; playbarNoteSnap.text = '1/${noteSnapQuant}'; - playbarDifficulty.text = "Difficulty: " + selectedDifficulty.toTitleCase(); - playbarBPM.text = "BPM: " + (Conductor.currentTimeChange?.bpm ?? 0.0); + playbarDifficulty.text = '${selectedDifficulty.toTitleCase()}'; + // playbarBPM.text = 'BPM: ${(Conductor.currentTimeChange?.bpm ?? 0.0)}'; } function handlePlayhead():Void @@ -4750,16 +4763,16 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState { super.handleQuickWatch(); - FlxG.watch.addQuick('musicTime', audioInstTrack?.time ?? 0.0); + FlxG.watch.addQuick('musicTime', audioInstTrack?.time); FlxG.watch.addQuick('scrollPosInPixels', scrollPositionInPixels); FlxG.watch.addQuick('playheadPosInPixels', playheadPositionInPixels); - FlxG.watch.addQuick("tapNotesRendered", renderedNotes.members.length); - FlxG.watch.addQuick("holdNotesRendered", renderedHoldNotes.members.length); - FlxG.watch.addQuick("eventsRendered", renderedEvents.members.length); - FlxG.watch.addQuick("notesSelected", currentNoteSelection.length); - FlxG.watch.addQuick("eventsSelected", currentEventSelection.length); + FlxG.watch.addQuick("tapNotesRendered", renderedNotes?.members?.length); + FlxG.watch.addQuick("holdNotesRendered", renderedHoldNotes?.members?.length); + FlxG.watch.addQuick("eventsRendered", renderedEvents?.members?.length); + FlxG.watch.addQuick("notesSelected", currentNoteSelection?.length); + FlxG.watch.addQuick("eventsSelected", currentEventSelection?.length); } function handlePostUpdate():Void @@ -5124,7 +5137,8 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState } } - this.success('Switch Difficulty', 'Switched difficulty to ${selectedDifficulty.toTitleCase()}'); + // Removed this notification because you can see your difficulty in the playbar now. + // this.success('Switch Difficulty', 'Switched difficulty to ${selectedDifficulty.toTitleCase()}'); } /** From 200f5702efb57fbca21f8d47edd8f31563b5f7e4 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 3 Jan 2024 02:51:52 -0500 Subject: [PATCH 4/5] disable note vwoosh, and fix gameover song not looping --- source/funkin/play/GameOverSubState.hx | 1 + source/funkin/play/notes/Strumline.hx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/funkin/play/GameOverSubState.hx b/source/funkin/play/GameOverSubState.hx index d2ba83191..153fcc7ac 100644 --- a/source/funkin/play/GameOverSubState.hx +++ b/source/funkin/play/GameOverSubState.hx @@ -289,6 +289,7 @@ class GameOverSubState extends MusicBeatSubState { gameOverMusic.loadEmbedded(musicPath); gameOverMusic.volume = startingVolume; + gameOverMusic.looped = true; gameOverMusic.play(); } } diff --git a/source/funkin/play/notes/Strumline.hx b/source/funkin/play/notes/Strumline.hx index 0145dee3f..948e9fa5b 100644 --- a/source/funkin/play/notes/Strumline.hx +++ b/source/funkin/play/notes/Strumline.hx @@ -274,7 +274,9 @@ class Strumline extends FlxSpriteGroup static function calculateNoteYPos(strumTime:Float, vwoosh:Bool = true):Float { // Make the note move faster visually as it moves offscreen. - var vwoosh:Float = (strumTime < Conductor.songPosition) && vwoosh ? 2.0 : 1.0; + // var vwoosh:Float = (strumTime < Conductor.songPosition) && vwoosh ? 2.0 : 1.0; + // ^^^ commented this out... do NOT make it move faster as it moves offscreen! + var vwoosh:Float = 1.0; var scrollSpeed:Float = PlayState.instance?.currentChart?.scrollSpeed ?? 1.0; return Constants.PIXELS_PER_MS * (Conductor.songPosition - strumTime) * scrollSpeed * vwoosh * (Preferences.downscroll ? 1 : -1); From 07bd2e44cd7f996cc0f2ec6ecc0426899cb944d5 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 3 Jan 2024 20:12:46 -0500 Subject: [PATCH 5/5] Fix a funny bug when restarting after game over --- source/funkin/play/GameOverSubState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/play/GameOverSubState.hx b/source/funkin/play/GameOverSubState.hx index 153fcc7ac..dadd5a3d9 100644 --- a/source/funkin/play/GameOverSubState.hx +++ b/source/funkin/play/GameOverSubState.hx @@ -289,7 +289,7 @@ class GameOverSubState extends MusicBeatSubState { gameOverMusic.loadEmbedded(musicPath); gameOverMusic.volume = startingVolume; - gameOverMusic.looped = true; + gameOverMusic.looped = !isEnding; gameOverMusic.play(); } }