mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-05 06:14:36 +00:00
Merge pull request #477 from FunkinCrew/bugfix/song-compile-define
Fix loading issue tied to -DSONG compile define.
This commit is contained in:
commit
f00c6085e4
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