mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
Fix loading issue tied to -DSONG compile define.
This commit is contained in:
parent
90f53a78c1
commit
6d374c7af9
3 changed files with 38 additions and 1 deletions
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'));
|
||||
|
|
Loading…
Reference in a new issue