From 9ff4885173e42dacf35097a6df52891a72aaeefa Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 11 Oct 2023 19:39:52 -0400 Subject: [PATCH 01/11] charting sound effects in progress! --- assets | 2 +- .../ui/debug/charting/ChartEditorCommand.hx | 16 ++++++++++------ .../ui/debug/charting/ChartEditorState.hx | 18 +++++++++++++++++- .../charting/ChartEditorToolboxHandler.hx | 4 ++++ 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/assets b/assets index 6e5ed4602..b767f2d43 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 6e5ed46026a2eb1e575c5accf9192b90c13ff857 +Subproject commit b767f2d43bf357e0d092fdf255a28963fe42cdff diff --git a/source/funkin/ui/debug/charting/ChartEditorCommand.hx b/source/funkin/ui/debug/charting/ChartEditorCommand.hx index c358c1d3d..ccefea67d 100644 --- a/source/funkin/ui/debug/charting/ChartEditorCommand.hx +++ b/source/funkin/ui/debug/charting/ChartEditorCommand.hx @@ -64,7 +64,7 @@ class AddNotesCommand implements ChartEditorCommand state.currentEventSelection = []; } - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteLay')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -78,7 +78,7 @@ class AddNotesCommand implements ChartEditorCommand state.currentSongChartNoteData = SongDataUtils.subtractNotes(state.currentSongChartNoteData, notes); state.currentNoteSelection = []; state.currentEventSelection = []; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -131,7 +131,7 @@ class RemoveNotesCommand implements ChartEditorCommand } state.currentNoteSelection = notes; state.currentEventSelection = []; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -252,7 +252,7 @@ class AddEventsCommand implements ChartEditorCommand state.currentEventSelection = events; } - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteLay')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -312,7 +312,7 @@ class RemoveEventsCommand implements ChartEditorCommand state.currentSongChartEventData.push(event); } state.currentEventSelection = events; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -376,7 +376,7 @@ class RemoveItemsCommand implements ChartEditorCommand state.currentNoteSelection = notes; state.currentEventSelection = events; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-08')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -777,6 +777,8 @@ class PasteItemsCommand implements ChartEditorCommand public function undo(state:ChartEditorState):Void { + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo')); + state.currentSongChartNoteData = SongDataUtils.subtractNotes(state.currentSongChartNoteData, addedNotes); state.currentSongChartEventData = SongDataUtils.subtractEvents(state.currentSongChartEventData, addedEvents); state.currentNoteSelection = []; @@ -829,6 +831,8 @@ class ExtendNoteLengthCommand implements ChartEditorCommand public function undo(state:ChartEditorState):Void { + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/undo')); + note.length = oldLength; state.saveDataDirty = true; diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 67e3c1dc8..277079e31 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -2096,11 +2096,18 @@ class ChartEditorState extends HaxeUIState } } + var dragLengthCurrent:Float = 0; + var stretchySounds:Bool = false; + /** * Handle display of the mouse cursor. */ function handleCursor():Void { + // Mouse sounds + if (FlxG.mouse.justPressed) FlxG.sound.play(Paths.sound("chartingSounds/ClickDown")); + if (FlxG.mouse.justReleased) FlxG.sound.play(Paths.sound("chartingSounds/ClickUp")); + // Note: If a menu is open in HaxeUI, don't handle cursor behavior. var shouldHandleCursor:Bool = !isCursorOverHaxeUI || (selectionBoxStartPos != null); var eventColumn:Int = (STRUMLINE_SIZE * 2 + 1) - 1; @@ -2449,6 +2456,14 @@ class ChartEditorState extends HaxeUIState if (dragLengthSteps > 0) { + if (dragLengthCurrent != dragLengthSteps) + { + stretchySounds = !stretchySounds; + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/stretch' + (stretchySounds ? '1' : '2') + '_UI')); + + dragLengthCurrent = dragLengthSteps; + } + gridGhostHoldNote.visible = true; gridGhostHoldNote.noteData = gridGhostNote.noteData; gridGhostHoldNote.noteDirection = gridGhostNote.noteData.getDirection(); @@ -2466,6 +2481,7 @@ class ChartEditorState extends HaxeUIState { if (dragLengthSteps > 0) { + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/stretchSNAP_UI')); // Apply the new length. performCommand(new ExtendNoteLengthCommand(currentPlaceNoteData, dragLengthMs)); } @@ -4206,7 +4222,7 @@ class ChartEditorState extends HaxeUIState function playMetronomeTick(high:Bool = false):Void { - ChartEditorAudioHandler.playSound(Paths.sound('pianoStuff/piano-${high ? '001' : '008'}')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/metronome${high ? '1' : '2'}')); } function isNoteSelected(note:Null):Bool diff --git a/source/funkin/ui/debug/charting/ChartEditorToolboxHandler.hx b/source/funkin/ui/debug/charting/ChartEditorToolboxHandler.hx index 6f89b6b63..25418a74e 100644 --- a/source/funkin/ui/debug/charting/ChartEditorToolboxHandler.hx +++ b/source/funkin/ui/debug/charting/ChartEditorToolboxHandler.hx @@ -72,6 +72,8 @@ class ChartEditorToolboxHandler { toolbox.showDialog(false); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/openWindow')); + switch (id) { case ChartEditorState.CHART_EDITOR_TOOLBOX_TOOLS_LAYOUT: @@ -109,6 +111,8 @@ class ChartEditorToolboxHandler { toolbox.hideDialog(DialogButton.CANCEL); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/exitWindow')); + switch (id) { case ChartEditorState.CHART_EDITOR_TOOLBOX_TOOLS_LAYOUT: From 0f08b1133e67c1f7bcc7d5a905e218b7ba595dad Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Sat, 14 Oct 2023 22:49:24 -0400 Subject: [PATCH 02/11] Rename some sounds used by the chart editor --- assets | 2 +- source/funkin/ui/debug/charting/ChartEditorCommand.hx | 8 +++++--- source/funkin/ui/debug/charting/ChartEditorState.hx | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/assets b/assets index b767f2d43..05973b6bb 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit b767f2d43bf357e0d092fdf255a28963fe42cdff +Subproject commit 05973b6bb816464b5cb46631285f17477d05cf08 diff --git a/source/funkin/ui/debug/charting/ChartEditorCommand.hx b/source/funkin/ui/debug/charting/ChartEditorCommand.hx index ccefea67d..e6caf61e7 100644 --- a/source/funkin/ui/debug/charting/ChartEditorCommand.hx +++ b/source/funkin/ui/debug/charting/ChartEditorCommand.hx @@ -114,7 +114,8 @@ class RemoveNotesCommand implements ChartEditorCommand state.currentSongChartNoteData = SongDataUtils.subtractNotes(state.currentSongChartNoteData, notes); state.currentNoteSelection = []; state.currentEventSelection = []; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01')); + + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteErase')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -296,7 +297,8 @@ class RemoveEventsCommand implements ChartEditorCommand { state.currentSongChartEventData = SongDataUtils.subtractEvents(state.currentSongChartEventData, events); state.currentEventSelection = []; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01')); + + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteErase')); state.saveDataDirty = true; state.noteDisplayDirty = true; @@ -352,7 +354,7 @@ class RemoveItemsCommand implements ChartEditorCommand state.currentNoteSelection = []; state.currentEventSelection = []; - ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-01')); + ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/noteErase')); state.saveDataDirty = true; state.noteDisplayDirty = true; diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 277079e31..b23df1d3a 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -3849,9 +3849,9 @@ class ChartEditorState extends HaxeUIState switch (noteData.getStrumlineIndex()) { case 0: // Player - if (hitsoundsEnabledPlayer) ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-09')); + if (hitsoundsEnabledPlayer) ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/hitNotePlayer')); case 1: // Opponent - if (hitsoundsEnabledOpponent) ChartEditorAudioHandler.playSound(Paths.sound('funnyNoise/funnyNoise-010')); + if (hitsoundsEnabledOpponent) ChartEditorAudioHandler.playSound(Paths.sound('chartingSounds/hitNoteOpponent')); } } } From 7a9b4d6bf028c053d334b263398c4b764de5e3d4 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 11 Oct 2023 01:04:56 -0400 Subject: [PATCH 03/11] Add the "death.cameraOffset" attribute to character data --- assets | 2 +- source/funkin/play/GameOverSubState.hx | 3 +++ source/funkin/play/character/BaseCharacter.hx | 5 +++++ source/funkin/play/character/CharacterData.hx | 16 +++++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/assets b/assets index 6e5ed4602..c1ef5f683 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 6e5ed46026a2eb1e575c5accf9192b90c13ff857 +Subproject commit c1ef5f68303b8069702193078c8228ffc9dc551e diff --git a/source/funkin/play/GameOverSubState.hx b/source/funkin/play/GameOverSubState.hx index 15ed0421e..cb350f028 100644 --- a/source/funkin/play/GameOverSubState.hx +++ b/source/funkin/play/GameOverSubState.hx @@ -103,6 +103,9 @@ class GameOverSubState extends MusicBeatSubState cameraFollowPoint = new FlxObject(PlayState.instance.cameraFollowPoint.x, PlayState.instance.cameraFollowPoint.y, 1, 1); cameraFollowPoint.x = boyfriend.getGraphicMidpoint().x; cameraFollowPoint.y = boyfriend.getGraphicMidpoint().y; + var offsets:Array = boyfriend.getDeathCameraOffsets(); + cameraFollowPoint.x += offsets[0]; + cameraFollowPoint.y += offsets[1]; add(cameraFollowPoint); FlxG.camera.target = null; diff --git a/source/funkin/play/character/BaseCharacter.hx b/source/funkin/play/character/BaseCharacter.hx index 30b549fd3..3a34144bf 100644 --- a/source/funkin/play/character/BaseCharacter.hx +++ b/source/funkin/play/character/BaseCharacter.hx @@ -188,6 +188,11 @@ class BaseCharacter extends Bopper shouldBop = false; } + public function getDeathCameraOffsets():Array + { + return _data.death?.cameraOffsets ?? [0.0, 0.0]; + } + /** * Gets the value of flipX from the character data. * `!getFlipX()` is the direction Boyfriend should face. diff --git a/source/funkin/play/character/CharacterData.hx b/source/funkin/play/character/CharacterData.hx index f1b316b7f..8be9f25c7 100644 --- a/source/funkin/play/character/CharacterData.hx +++ b/source/funkin/play/character/CharacterData.hx @@ -19,8 +19,10 @@ class CharacterDataParser * The current version string for the stage data format. * Handle breaking changes by incrementing this value * and adding migration to the `migrateStageData()` function. + * + * - Version 1.0.1 adds `death.cameraOffsets` */ - public static final CHARACTER_DATA_VERSION:String = '1.0.0'; + public static final CHARACTER_DATA_VERSION:String = '1.0.1'; /** * The current version rule check for the stage data format. @@ -603,6 +605,8 @@ typedef CharacterData = */ var healthIcon:Null; + var death:Null; + /** * The global offset to the character's position, in pixels. * @default [0, 0] @@ -695,3 +699,13 @@ typedef HealthIconData = */ var offsets:Null>; } + +typedef DeathData = +{ + /** + * The amount to offset the camera by while focusing on this character as they die. + * Default value focuses on the character's graphic midpoint. + * @default [0, 0] + */ + var ?cameraOffsets:Array; +} From 75b9aefb1ccf6944398f29d427cf36ac5151fa1c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 17 Oct 2023 20:14:36 -0400 Subject: [PATCH 04/11] senpai antialiasing fix --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index c1ef5f683..946cf0082 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit c1ef5f68303b8069702193078c8228ffc9dc551e +Subproject commit 946cf00829416b879881427d4e2fe09a09cb79ce From 1670cb70d041e8a8379dcb6a8509e7b3e6144e03 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 17 Oct 2023 20:21:12 -0400 Subject: [PATCH 05/11] dipshit mereg... --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index cb7a863e4..8eb0b74b4 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit cb7a863e4ab5a563828436be63c9f8cbbf09b4c5 +Subproject commit 8eb0b74b4149190f32f8bfab38bfdefa709b849d From 08845915eaec4c17ec0cef41f696c2868732aac8 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 17 Oct 2023 21:26:32 -0400 Subject: [PATCH 06/11] fixed cutscene skipping too fast from disabling inputs --- 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 d7c2a2a4c..e3aabc7a7 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1641,7 +1641,7 @@ class PlayState extends MusicBeatSubState */ function onConversationComplete():Void { - isInCutscene = true; + isInCutscene = false; remove(currentConversation); currentConversation = null; From a8a8cf96fd22102fbf0c502833b282eb63721f7b Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 17 Oct 2023 23:36:25 -0400 Subject: [PATCH 07/11] submodule merge fix --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index b9338b972..a66eb8353 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit b9338b97214f71b192f5cec760c5442ec2e8cbed +Subproject commit a66eb835318b7b4cf639d5add1de98a1a155d209 From 73022207fa6bc1bc063db5d82f1d0639dd32c140 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 18 Oct 2023 15:52:44 -0400 Subject: [PATCH 08/11] Merge hitsound audios --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index a66eb8353..f66c8559d 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit a66eb835318b7b4cf639d5add1de98a1a155d209 +Subproject commit f66c8559db05df42a8503abc7b59166c35ba0b2e From 26f83b5a81cdb49056e5c385ac12c8676d983cf5 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 18 Oct 2023 16:02:56 -0400 Subject: [PATCH 09/11] Fix _time of nullable compile error. --- source/funkin/ui/debug/charting/ChartEditorState.hx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 30d8fde7e..037388a73 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -4179,12 +4179,14 @@ class ChartEditorState extends HaxeUIState function moveSongToScrollPosition():Void { // Update the songPosition in the audio tracks. - if (audioInstTrack != null) audioInstTrack.time = scrollPositionInMs + playheadPositionInMs; + if (audioInstTrack != null) + { + audioInstTrack.time = scrollPositionInMs + playheadPositionInMs; + // Update the songPosition in the Conductor. + Conductor.update(audioInstTrack.time); + } if (audioVocalTrackGroup != null) audioVocalTrackGroup.time = scrollPositionInMs + playheadPositionInMs; - // Update the songPosition in the Conductor. - Conductor.update(audioInstTrack.time); - // We need to update the note sprites because we changed the scroll position. noteDisplayDirty = true; } From 8f23537bace34b63f884291ceb0bd031e5c6555e Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 18 Oct 2023 18:37:00 -0400 Subject: [PATCH 10/11] assets submod merge --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index a66eb8353..777410e4a 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit a66eb835318b7b4cf639d5add1de98a1a155d209 +Subproject commit 777410e4ad628f274065b0245f73a4985ffbf28a From 256a9e7a23e8a57cd9a7cdace69f5a60275b5ec2 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 18 Oct 2023 19:30:50 -0400 Subject: [PATCH 11/11] remote submodule stuff --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index e0839baaf..8968471e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "assets"] path = assets url = https://github.com/FunkinCrew/Funkin-history-rewrite-assets + branch = master [submodule "art"] path = art url = https://github.com/FunkinCrew/Funkin-history-rewrite-art