mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-06-19 00:23:12 +00:00
Merge branch 'rewrite/master' into bugfix/blazin-stuck-blocking
This commit is contained in:
commit
c8d8227790
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
|
@ -135,6 +135,11 @@
|
||||||
"-DFORCE_DEBUG_VERSION"
|
"-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)",
|
"label": "HashLink / Debug (Straight to Play - Bopeebo Normal)",
|
||||||
"target": "hl",
|
"target": "hl",
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
<library name="week6" preload="true" />
|
<library name="week6" preload="true" />
|
||||||
<library name="week7" preload="true" />
|
<library name="week7" preload="true" />
|
||||||
<library name="weekend1" preload="true" />
|
<library name="weekend1" preload="true" />
|
||||||
|
<library name="videos" preload="true" />
|
||||||
</section>
|
</section>
|
||||||
<section if="NO_PRELOAD_ALL">
|
<section if="NO_PRELOAD_ALL">
|
||||||
<library name="songs" preload="false" />
|
<library name="songs" preload="false" />
|
||||||
|
@ -58,10 +59,13 @@
|
||||||
<library name="week6" preload="false" />
|
<library name="week6" preload="false" />
|
||||||
<library name="week7" preload="false" />
|
<library name="week7" preload="false" />
|
||||||
<library name="weekend1" preload="false" />
|
<library name="weekend1" preload="false" />
|
||||||
|
<library name="videos" preload="false" />
|
||||||
</section>
|
</section>
|
||||||
<library name="art" preload="false" />
|
<library name="art" preload="false" />
|
||||||
<assets path="assets/songs" library="songs" exclude="*.fla|*.ogg|*.wav" if="web" />
|
<assets path="assets/songs" library="songs" exclude="*.fla|*.ogg|*.wav" if="web" />
|
||||||
<assets path="assets/songs" library="songs" exclude="*.fla|*.mp3|*.wav" unless="web" />
|
<assets path="assets/songs" library="songs" exclude="*.fla|*.mp3|*.wav" unless="web" />
|
||||||
|
<!-- Videos go in their own library because web never needs to preload them, they can just be streamed. -->
|
||||||
|
<assets path="assets/videos" library="videos" />
|
||||||
<assets path="assets/shared" library="shared" exclude="*.fla|*.ogg|*.wav" if="web" />
|
<assets path="assets/shared" library="shared" exclude="*.fla|*.ogg|*.wav" if="web" />
|
||||||
<assets path="assets/shared" library="shared" exclude="*.fla|*.mp3|*.wav" unless="web" />
|
<assets path="assets/shared" library="shared" exclude="*.fla|*.mp3|*.wav" unless="web" />
|
||||||
<assets path="assets/tutorial" library="tutorial" exclude="*.fla|*.ogg|*.wav" if="web" />
|
<assets path="assets/tutorial" library="tutorial" exclude="*.fla|*.ogg|*.wav" if="web" />
|
||||||
|
|
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit c73fd0b0ab8f904ac22b594afc847be2d10587f4
|
Subproject commit cb6a3e268375eac6ee1fa8d3fa2eacee9576217f
|
|
@ -261,6 +261,35 @@ class InitState extends FlxState
|
||||||
return;
|
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(
|
LoadingState.loadPlayState(
|
||||||
{
|
{
|
||||||
targetSong: songData,
|
targetSong: songData,
|
||||||
|
@ -283,6 +312,10 @@ class InitState extends FlxState
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Rework loading behavior so we don't have to do this.
|
||||||
|
Paths.setCurrentLevel(levelId);
|
||||||
|
PlayStatePlaylist.campaignId = levelId;
|
||||||
|
|
||||||
PlayStatePlaylist.playlistSongIds = currentLevel.getSongs();
|
PlayStatePlaylist.playlistSongIds = currentLevel.getSongs();
|
||||||
PlayStatePlaylist.isStoryMode = true;
|
PlayStatePlaylist.isStoryMode = true;
|
||||||
PlayStatePlaylist.campaignScore = 0;
|
PlayStatePlaylist.campaignScore = 0;
|
||||||
|
|
|
@ -113,7 +113,7 @@ class Paths
|
||||||
|
|
||||||
public static function videos(key:String, ?library:String):String
|
public static function videos(key:String, ?library:String):String
|
||||||
{
|
{
|
||||||
return getPath('videos/$key.${Constants.EXT_VIDEO}', BINARY, library);
|
return getPath('videos/$key.${Constants.EXT_VIDEO}', BINARY, library ?? 'videos');
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function voices(song:String, ?suffix:String = ''):String
|
public static function voices(song:String, ?suffix:String = ''):String
|
||||||
|
|
|
@ -240,8 +240,8 @@ class PolymodHandler
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
assetLibraryPaths: [
|
assetLibraryPaths: [
|
||||||
'default' => 'preload', 'shared' => 'shared', 'songs' => 'songs', 'tutorial' => 'tutorial', 'week1' => 'week1', 'week2' => 'week2',
|
'default' => 'preload', 'shared' => 'shared', 'songs' => 'songs', 'videos' => 'videos', 'tutorial' => 'tutorial', 'week1' => 'week1',
|
||||||
'week3' => 'week3', 'week4' => 'week4', 'week5' => 'week5', 'week6' => 'week6', 'week7' => 'week7', 'weekend1' => 'weekend1',
|
'week2' => 'week2', 'week3' => 'week3', 'week4' => 'week4', 'week5' => 'week5', 'week6' => 'week6', 'week7' => 'week7', 'weekend1' => 'weekend1',
|
||||||
],
|
],
|
||||||
coreAssetRedirect: CORE_FOLDER,
|
coreAssetRedirect: CORE_FOLDER,
|
||||||
}
|
}
|
||||||
|
|
|
@ -2786,7 +2786,7 @@ class PlayState extends MusicBeatSubState
|
||||||
// adds current song data into the tallies for the level (story levels)
|
// adds current song data into the tallies for the level (story levels)
|
||||||
Highscore.talliesLevel = Highscore.combineTallies(Highscore.tallies, Highscore.talliesLevel);
|
Highscore.talliesLevel = Highscore.combineTallies(Highscore.tallies, Highscore.talliesLevel);
|
||||||
|
|
||||||
if (Save.instance.isSongHighScore(currentSong.id, currentDifficulty, data))
|
if (!isPracticeMode && !isBotPlayMode && Save.instance.isSongHighScore(currentSong.id, currentDifficulty, data))
|
||||||
{
|
{
|
||||||
Save.instance.setSongScore(currentSong.id, currentDifficulty, data);
|
Save.instance.setSongScore(currentSong.id, currentDifficulty, data);
|
||||||
#if newgrounds
|
#if newgrounds
|
||||||
|
@ -3072,18 +3072,18 @@ class PlayState extends MusicBeatSubState
|
||||||
title: PlayStatePlaylist.isStoryMode ? ('${PlayStatePlaylist.campaignTitle}') : ('${currentChart.songName} by ${currentChart.songArtist}'),
|
title: PlayStatePlaylist.isStoryMode ? ('${PlayStatePlaylist.campaignTitle}') : ('${currentChart.songName} by ${currentChart.songArtist}'),
|
||||||
scoreData:
|
scoreData:
|
||||||
{
|
{
|
||||||
score: songScore,
|
score: PlayStatePlaylist.isStoryMode ? PlayStatePlaylist.campaignScore : songScore,
|
||||||
tallies:
|
tallies:
|
||||||
{
|
{
|
||||||
sick: Highscore.tallies.sick,
|
sick: talliesToUse.sick,
|
||||||
good: Highscore.tallies.good,
|
good: talliesToUse.good,
|
||||||
bad: Highscore.tallies.bad,
|
bad: talliesToUse.bad,
|
||||||
shit: Highscore.tallies.shit,
|
shit: talliesToUse.shit,
|
||||||
missed: Highscore.tallies.missed,
|
missed: talliesToUse.missed,
|
||||||
combo: Highscore.tallies.combo,
|
combo: talliesToUse.combo,
|
||||||
maxCombo: Highscore.tallies.maxCombo,
|
maxCombo: talliesToUse.maxCombo,
|
||||||
totalNotesHit: Highscore.tallies.totalNotesHit,
|
totalNotesHit: talliesToUse.totalNotesHit,
|
||||||
totalNotes: Highscore.tallies.totalNotes,
|
totalNotes: talliesToUse.totalNotes,
|
||||||
},
|
},
|
||||||
accuracy: Highscore.tallies.totalNotesHit / Highscore.tallies.totalNotes,
|
accuracy: Highscore.tallies.totalNotesHit / Highscore.tallies.totalNotes,
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,8 +67,13 @@ class VideoCutscene
|
||||||
if (!openfl.Assets.exists(filePath))
|
if (!openfl.Assets.exists(filePath))
|
||||||
{
|
{
|
||||||
// Display a popup.
|
// Display a popup.
|
||||||
lime.app.Application.current.window.alert('Video file does not exist: ${filePath}', 'Error playing video');
|
// lime.app.Application.current.window.alert('Video file does not exist: ${filePath}', 'Error playing video');
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
|
// TODO: After moving videos to their own library,
|
||||||
|
// this function ALWAYS FAILS on web, but the video still plays.
|
||||||
|
// I think that's due to a weird quirk with how OpenFL libraries work.
|
||||||
|
trace('Video file does not exist: ${filePath}');
|
||||||
}
|
}
|
||||||
|
|
||||||
var rawFilePath = Paths.stripLibrary(filePath);
|
var rawFilePath = Paths.stripLibrary(filePath);
|
||||||
|
|
|
@ -693,7 +693,7 @@ class Save
|
||||||
trace("[SAVE] Checking for legacy save data...");
|
trace("[SAVE] Checking for legacy save data...");
|
||||||
var legacySave:FlxSave = new FlxSave();
|
var legacySave:FlxSave = new FlxSave();
|
||||||
legacySave.bind(SAVE_NAME_LEGACY, SAVE_PATH_LEGACY);
|
legacySave.bind(SAVE_NAME_LEGACY, SAVE_PATH_LEGACY);
|
||||||
if (legacySave?.data == null)
|
if (legacySave.isEmpty())
|
||||||
{
|
{
|
||||||
trace("[SAVE] No legacy save data found.");
|
trace("[SAVE] No legacy save data found.");
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -99,12 +99,19 @@ class CreditsDataHandler
|
||||||
|
|
||||||
static function fetchCreditsData():funkin.data.JsonFile
|
static function fetchCreditsData():funkin.data.JsonFile
|
||||||
{
|
{
|
||||||
|
#if !macro
|
||||||
var rawJson:String = openfl.Assets.getText(CREDITS_DATA_PATH).trim();
|
var rawJson:String = openfl.Assets.getText(CREDITS_DATA_PATH).trim();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
fileName: CREDITS_DATA_PATH,
|
fileName: CREDITS_DATA_PATH,
|
||||||
contents: rawJson
|
contents: rawJson
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
return {
|
||||||
|
fileName: CREDITS_DATA_PATH,
|
||||||
|
contents: null
|
||||||
|
};
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
static function parseCreditsData(file:JsonFile):Null<CreditsData>
|
static function parseCreditsData(file:JsonFile):Null<CreditsData>
|
||||||
|
|
|
@ -117,12 +117,6 @@ class ChartEditorNoteSprite extends FlxSprite
|
||||||
{
|
{
|
||||||
noteFrameCollection.pushFrame(frame);
|
noteFrameCollection.pushFrame(frame);
|
||||||
}
|
}
|
||||||
var frameCollectionNormal2:FlxAtlasFrames = Paths.getSparrowAtlas('NoteHoldNormal');
|
|
||||||
|
|
||||||
for (frame in frameCollectionNormal2.frames)
|
|
||||||
{
|
|
||||||
noteFrameCollection.pushFrame(frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pixel notes
|
// Pixel notes
|
||||||
var graphicPixel = FlxG.bitmap.add(Paths.image('weeb/pixelUI/arrows-pixels', 'week6'), false, null);
|
var graphicPixel = FlxG.bitmap.add(Paths.image('weeb/pixelUI/arrows-pixels', 'week6'), false, null);
|
||||||
|
|
|
@ -37,8 +37,8 @@ class AlbumRoll extends FlxSpriteGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
var newAlbumArt:FlxAtlasSprite;
|
var newAlbumArt:FlxAtlasSprite;
|
||||||
var difficultyStars:DifficultyStars;
|
|
||||||
|
|
||||||
|
// var difficultyStars:DifficultyStars;
|
||||||
var _exitMovers:Null<FreeplayState.ExitMoverData>;
|
var _exitMovers:Null<FreeplayState.ExitMoverData>;
|
||||||
|
|
||||||
var albumData:Album;
|
var albumData:Album;
|
||||||
|
@ -65,9 +65,9 @@ class AlbumRoll extends FlxSpriteGroup
|
||||||
|
|
||||||
add(newAlbumArt);
|
add(newAlbumArt);
|
||||||
|
|
||||||
difficultyStars = new DifficultyStars(140, 39);
|
// difficultyStars = new DifficultyStars(140, 39);
|
||||||
difficultyStars.stars.visible = false;
|
// difficultyStars.stars.visible = false;
|
||||||
add(difficultyStars);
|
// add(difficultyStars);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAlbumFinish(animName:String):Void
|
function onAlbumFinish(animName:String):Void
|
||||||
|
@ -86,7 +86,7 @@ class AlbumRoll extends FlxSpriteGroup
|
||||||
{
|
{
|
||||||
if (albumId == null)
|
if (albumId == null)
|
||||||
{
|
{
|
||||||
difficultyStars.stars.visible = false;
|
// difficultyStars.stars.visible = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,13 +132,6 @@ class AlbumRoll extends FlxSpriteGroup
|
||||||
speed: 0.4,
|
speed: 0.4,
|
||||||
wait: 0
|
wait: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
exitMovers.set([difficultyStars],
|
|
||||||
{
|
|
||||||
x: FlxG.width * 1.2,
|
|
||||||
speed: 0.2,
|
|
||||||
wait: 0.3
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var titleTimer:Null<FlxTimer> = null;
|
var titleTimer:Null<FlxTimer> = null;
|
||||||
|
@ -151,10 +144,10 @@ class AlbumRoll extends FlxSpriteGroup
|
||||||
newAlbumArt.visible = true;
|
newAlbumArt.visible = true;
|
||||||
newAlbumArt.playAnimation(animNames.get('$albumId-active'), false, false, false);
|
newAlbumArt.playAnimation(animNames.get('$albumId-active'), false, false, false);
|
||||||
|
|
||||||
difficultyStars.stars.visible = false;
|
// difficultyStars.stars.visible = false;
|
||||||
new FlxTimer().start(0.75, function(_) {
|
new FlxTimer().start(0.75, function(_) {
|
||||||
// showTitle();
|
// showTitle();
|
||||||
showStars();
|
// showStars();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,18 +156,16 @@ class AlbumRoll extends FlxSpriteGroup
|
||||||
newAlbumArt.playAnimation(animNames.get('$albumId-trans'), false, false, false);
|
newAlbumArt.playAnimation(animNames.get('$albumId-trans'), false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDifficultyStars(?difficulty:Int):Void
|
// public function setDifficultyStars(?difficulty:Int):Void
|
||||||
{
|
// {
|
||||||
if (difficulty == null) return;
|
// if (difficulty == null) return;
|
||||||
|
// difficultyStars.difficulty = difficulty;
|
||||||
difficultyStars.difficulty = difficulty;
|
// }
|
||||||
}
|
// /**
|
||||||
|
// * Make the album stars visible.
|
||||||
/**
|
// */
|
||||||
* Make the album stars visible.
|
// public function showStars():Void
|
||||||
*/
|
// {
|
||||||
public function showStars():Void
|
// difficultyStars.stars.visible = false; // true;
|
||||||
{
|
// }
|
||||||
difficultyStars.stars.visible = false; // true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,106 +0,0 @@
|
||||||
package funkin.ui.freeplay;
|
|
||||||
|
|
||||||
import flixel.group.FlxSpriteGroup;
|
|
||||||
import funkin.graphics.adobeanimate.FlxAtlasSprite;
|
|
||||||
import funkin.graphics.shaders.HSVShader;
|
|
||||||
|
|
||||||
class DifficultyStars extends FlxSpriteGroup
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Internal handler var for difficulty... ranges from 0... to 15
|
|
||||||
* 0 is 1 star... 15 is 0 stars!
|
|
||||||
*/
|
|
||||||
var curDifficulty(default, set):Int = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Range between 0 and 15
|
|
||||||
*/
|
|
||||||
public var difficulty(default, set):Int = 1;
|
|
||||||
|
|
||||||
public var stars:FlxAtlasSprite;
|
|
||||||
|
|
||||||
var flames:FreeplayFlames;
|
|
||||||
|
|
||||||
var hsvShader:HSVShader;
|
|
||||||
|
|
||||||
public function new(x:Float, y:Float)
|
|
||||||
{
|
|
||||||
super(x, y);
|
|
||||||
|
|
||||||
hsvShader = new HSVShader();
|
|
||||||
|
|
||||||
flames = new FreeplayFlames(0, 0);
|
|
||||||
add(flames);
|
|
||||||
|
|
||||||
stars = new FlxAtlasSprite(0, 0, Paths.animateAtlas("freeplay/freeplayStars"));
|
|
||||||
stars.anim.play("diff stars");
|
|
||||||
add(stars);
|
|
||||||
|
|
||||||
stars.shader = hsvShader;
|
|
||||||
|
|
||||||
for (memb in flames.members)
|
|
||||||
memb.shader = hsvShader;
|
|
||||||
}
|
|
||||||
|
|
||||||
override function update(elapsed:Float):Void
|
|
||||||
{
|
|
||||||
super.update(elapsed);
|
|
||||||
|
|
||||||
// "loops" the current animation
|
|
||||||
// for clarity, the animation file looks like
|
|
||||||
// frame : stars
|
|
||||||
// 0-99: 1 star
|
|
||||||
// 100-199: 2 stars
|
|
||||||
// ......
|
|
||||||
// 1300-1499: 15 stars
|
|
||||||
// 1500 : 0 stars
|
|
||||||
if (curDifficulty < 15 && stars.anim.curFrame >= (curDifficulty + 1) * 100)
|
|
||||||
{
|
|
||||||
stars.anim.play("diff stars", true, false, curDifficulty * 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_difficulty(value:Int):Int
|
|
||||||
{
|
|
||||||
difficulty = value;
|
|
||||||
|
|
||||||
if (difficulty <= 0)
|
|
||||||
{
|
|
||||||
difficulty = 0;
|
|
||||||
curDifficulty = 15;
|
|
||||||
}
|
|
||||||
else if (difficulty <= 15)
|
|
||||||
{
|
|
||||||
difficulty = value;
|
|
||||||
curDifficulty = difficulty - 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
difficulty = 15;
|
|
||||||
curDifficulty = difficulty - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (difficulty > 10) flames.flameCount = difficulty - 10;
|
|
||||||
else
|
|
||||||
flames.flameCount = 0;
|
|
||||||
|
|
||||||
return difficulty;
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_curDifficulty(value:Int):Int
|
|
||||||
{
|
|
||||||
curDifficulty = value;
|
|
||||||
if (curDifficulty == 15)
|
|
||||||
{
|
|
||||||
stars.anim.play("diff stars", true, false, 1500);
|
|
||||||
stars.anim.pause();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
stars.anim.curFrame = Std.int(curDifficulty * 100);
|
|
||||||
stars.anim.play("diff stars", true, false, curDifficulty * 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
return curDifficulty;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -469,6 +469,10 @@ class FreeplayState extends MusicBeatSubState
|
||||||
|
|
||||||
albumRoll.playIntro();
|
albumRoll.playIntro();
|
||||||
|
|
||||||
|
new FlxTimer().start(0.75, function(_) {
|
||||||
|
// albumRoll.showTitle();
|
||||||
|
});
|
||||||
|
|
||||||
FlxTween.tween(grpDifficulties, {x: 90}, 0.6, {ease: FlxEase.quartOut});
|
FlxTween.tween(grpDifficulties, {x: 90}, 0.6, {ease: FlxEase.quartOut});
|
||||||
|
|
||||||
var diffSelLeft:DifficultySelector = new DifficultySelector(20, grpDifficulties.y - 10, false, controls);
|
var diffSelLeft:DifficultySelector = new DifficultySelector(20, grpDifficulties.y - 10, false, controls);
|
||||||
|
@ -1039,9 +1043,6 @@ class FreeplayState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the difficulty star count on the right.
|
|
||||||
albumRoll.setDifficultyStars(daSong?.songRating);
|
|
||||||
|
|
||||||
// Set the album graphic and play the animation if relevant.
|
// Set the album graphic and play the animation if relevant.
|
||||||
var newAlbumId:String = daSong?.albumId;
|
var newAlbumId:String = daSong?.albumId;
|
||||||
if (albumRoll.albumId != newAlbumId)
|
if (albumRoll.albumId != newAlbumId)
|
||||||
|
@ -1161,10 +1162,6 @@ class FreeplayState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
currentDifficulty = rememberedDifficulty;
|
currentDifficulty = rememberedDifficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the difficulty star count on the right.
|
|
||||||
var daSong:Null<FreeplaySongData> = grpCapsules.members[curSelected]?.songData;
|
|
||||||
albumRoll.setDifficultyStars(daSong?.songRating ?? 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeSelection(change:Int = 0):Void
|
function changeSelection(change:Int = 0):Void
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package funkin.ui.mainmenu;
|
package funkin.ui.mainmenu;
|
||||||
|
|
||||||
|
import funkin.graphics.FunkinSprite;
|
||||||
import flixel.addons.transition.FlxTransitionableState;
|
import flixel.addons.transition.FlxTransitionableState;
|
||||||
import funkin.ui.debug.DebugMenuSubState;
|
import funkin.ui.debug.DebugMenuSubState;
|
||||||
import flixel.FlxObject;
|
import flixel.FlxObject;
|
||||||
|
@ -56,7 +57,8 @@ class MainMenuState extends MusicBeatState
|
||||||
persistentUpdate = false;
|
persistentUpdate = false;
|
||||||
persistentDraw = true;
|
persistentDraw = true;
|
||||||
|
|
||||||
var bg:FlxSprite = new FlxSprite(Paths.image('menuBG'));
|
var bg = FunkinSprite.create('menuDesat');
|
||||||
|
bg.color = 0xFFFDE871;
|
||||||
bg.scrollFactor.x = 0;
|
bg.scrollFactor.x = 0;
|
||||||
bg.scrollFactor.y = 0.17;
|
bg.scrollFactor.y = 0.17;
|
||||||
bg.setGraphicSize(Std.int(bg.width * 1.2));
|
bg.setGraphicSize(Std.int(bg.width * 1.2));
|
||||||
|
@ -174,6 +176,7 @@ class MainMenuState extends MusicBeatState
|
||||||
{
|
{
|
||||||
FlxG.cameras.reset(new FunkinCamera());
|
FlxG.cameras.reset(new FunkinCamera());
|
||||||
FlxG.camera.follow(camFollow, null, 0.06);
|
FlxG.camera.follow(camFollow, null, 0.06);
|
||||||
|
FlxG.camera.snapToTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMenuItem(name:String, atlas:String, callback:Void->Void, fireInstantly:Bool = false):Void
|
function createMenuItem(name:String, atlas:String, callback:Void->Void, fireInstantly:Bool = false):Void
|
||||||
|
|
|
@ -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.
|
// TODO: This section is a hack! Redo this later when we have a proper asset caching system.
|
||||||
FunkinSprite.preparePurgeCache();
|
FunkinSprite.preparePurgeCache();
|
||||||
FunkinSprite.cacheTexture(Paths.image('combo'));
|
|
||||||
FunkinSprite.cacheTexture(Paths.image('healthBar'));
|
FunkinSprite.cacheTexture(Paths.image('healthBar'));
|
||||||
FunkinSprite.cacheTexture(Paths.image('menuDesat'));
|
FunkinSprite.cacheTexture(Paths.image('menuDesat'));
|
||||||
FunkinSprite.cacheTexture(Paths.image('combo'));
|
FunkinSprite.cacheTexture(Paths.image('combo'));
|
||||||
|
|
Loading…
Reference in a new issue