From 9a7a385af1e051a1affd19725eb14b731da5f921 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Sat, 6 Apr 2024 01:11:27 -0400 Subject: [PATCH 1/4] Fix segmentation fault on Linux by rebuilding Lime. --- .vscode/settings.json | 5 +++++ hmm.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 13a1862d2..96481461d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -96,6 +96,11 @@ "target": "windows", "args": ["-debug", "-DFORCE_DEBUG_VERSION"] }, + { + "label": "Linux / Debug", + "target": "linux", + "args": ["-debug", "-DFORCE_DEBUG_VERSION"] + }, { "label": "HashLink / Debug", "target": "hl", diff --git a/hmm.json b/hmm.json index 641ef1bbd..8c07023c7 100644 --- a/hmm.json +++ b/hmm.json @@ -104,7 +104,7 @@ "name": "lime", "type": "git", "dir": null, - "ref": "1359fe6ad52e91175dc636a516d460bd54ea22ed", + "ref": "43ebebdd8119936b99f23407057025c7849c5f5b", "url": "https://github.com/FunkinCrew/lime" }, { From 6d374c7af9e0e784bedd1c949b59c5c468b04c3d Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 8 Apr 2024 18:39:51 -0400 Subject: [PATCH 2/4] Fix loading issue tied to -DSONG compile define. --- .vscode/settings.json | 5 ++++ source/funkin/InitState.hx | 33 +++++++++++++++++++++ source/funkin/ui/transition/LoadingState.hx | 1 - 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 13a1862d2..0cca68aab 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -130,6 +130,11 @@ "-DFORCE_DEBUG_VERSION" ] }, + { + "label": "Windows / Debug (Straight to Play - 2hot)", + "target": "windows", + "args": ["-debug", "-DSONG=2hot", "-DFORCE_DEBUG_VERSION"] + }, { "label": "HashLink / Debug (Straight to Play - Bopeebo Normal)", "target": "hl", diff --git a/source/funkin/InitState.hx b/source/funkin/InitState.hx index 6ea77ec18..9b842bc13 100644 --- a/source/funkin/InitState.hx +++ b/source/funkin/InitState.hx @@ -261,6 +261,35 @@ class InitState extends FlxState return; } + // TODO: Rework loading behavior so we don't have to do this. + switch (songId) + { + case 'tutorial' | 'bopeebo' | 'fresh' | 'dadbattle': + Paths.setCurrentLevel('week1'); + PlayStatePlaylist.campaignId = 'week1'; + case 'spookeez' | 'south' | 'monster': + Paths.setCurrentLevel('week2'); + PlayStatePlaylist.campaignId = 'week2'; + case 'pico' | 'philly-nice' | 'blammed': + Paths.setCurrentLevel('week3'); + PlayStatePlaylist.campaignId = 'week3'; + case 'high' | 'satin-panties' | 'milf': + Paths.setCurrentLevel('week4'); + PlayStatePlaylist.campaignId = 'week4'; + case 'cocoa' | 'eggnog' | 'winter-horrorland': + Paths.setCurrentLevel('week5'); + PlayStatePlaylist.campaignId = 'week5'; + case 'senpai' | 'roses' | 'thorns': + Paths.setCurrentLevel('week6'); + PlayStatePlaylist.campaignId = 'week6'; + case 'ugh' | 'guns' | 'stress': + Paths.setCurrentLevel('week7'); + PlayStatePlaylist.campaignId = 'week7'; + case 'darnell' | 'lit-up' | '2hot' | 'blazin': + Paths.setCurrentLevel('weekend1'); + PlayStatePlaylist.campaignId = 'weekend1'; + } + LoadingState.loadPlayState( { targetSong: songData, @@ -283,6 +312,10 @@ class InitState extends FlxState return; } + // TODO: Rework loading behavior so we don't have to do this. + Paths.setCurrentLevel(levelId); + PlayStatePlaylist.campaignId = levelId; + PlayStatePlaylist.playlistSongIds = currentLevel.getSongs(); PlayStatePlaylist.isStoryMode = true; PlayStatePlaylist.campaignScore = 0; diff --git a/source/funkin/ui/transition/LoadingState.hx b/source/funkin/ui/transition/LoadingState.hx index af8798ae2..347190993 100644 --- a/source/funkin/ui/transition/LoadingState.hx +++ b/source/funkin/ui/transition/LoadingState.hx @@ -281,7 +281,6 @@ class LoadingState extends MusicBeatSubState { // TODO: This section is a hack! Redo this later when we have a proper asset caching system. FunkinSprite.preparePurgeCache(); - FunkinSprite.cacheTexture(Paths.image('combo')); FunkinSprite.cacheTexture(Paths.image('healthBar')); FunkinSprite.cacheTexture(Paths.image('menuDesat')); FunkinSprite.cacheTexture(Paths.image('combo')); From dbcbb73338db3dcb3ad758a8d2a1d8f4153db51e Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 9 Apr 2024 15:10:58 -0400 Subject: [PATCH 3/4] Main menu fix and Week 3 train fix --- assets | 2 +- source/funkin/ui/mainmenu/MainMenuState.hx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets b/assets index e8f4d2d91..1a7a0b6cc 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit e8f4d2d91c7bd5a922465e7d67a0efb7d7574bd6 +Subproject commit 1a7a0b6cc60dc8131f1651caa7abef0c1944a10c diff --git a/source/funkin/ui/mainmenu/MainMenuState.hx b/source/funkin/ui/mainmenu/MainMenuState.hx index f38db1ccd..ecd67b4da 100644 --- a/source/funkin/ui/mainmenu/MainMenuState.hx +++ b/source/funkin/ui/mainmenu/MainMenuState.hx @@ -174,6 +174,7 @@ class MainMenuState extends MusicBeatState { FlxG.cameras.reset(new FunkinCamera()); FlxG.camera.follow(camFollow, null, 0.06); + FlxG.camera.snapToTarget(); } function createMenuItem(name:String, atlas:String, callback:Void->Void, fireInstantly:Bool = false):Void From eb752c242f3c59d275640bacc875e99b80c5d5e5 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 9 Apr 2024 20:13:59 -0400 Subject: [PATCH 4/4] assets submod --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 1a7a0b6cc..bef67ec4b 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 1a7a0b6cc60dc8131f1651caa7abef0c1944a10c +Subproject commit bef67ec4b3c834416e73ce4e7c3e7128c5d7de63