mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-12-11 16:51:21 -05:00
Merge branch 'develop' into fps-setting
This commit is contained in:
commit
01b1ce679c
4 changed files with 34 additions and 8 deletions
|
@ -406,7 +406,7 @@ class Strumline extends FlxSpriteGroup
|
|||
|
||||
if (Preferences.downscroll)
|
||||
{
|
||||
holdNote.y = this.y + calculateNoteYPos(holdNote.strumTime, vwoosh) - holdNote.height + STRUMLINE_SIZE / 2;
|
||||
holdNote.y = this.y - INITIAL_OFFSET + calculateNoteYPos(holdNote.strumTime, vwoosh) - holdNote.height + STRUMLINE_SIZE / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -435,7 +435,7 @@ class Strumline extends FlxSpriteGroup
|
|||
|
||||
if (Preferences.downscroll)
|
||||
{
|
||||
holdNote.y = this.y - holdNote.height + STRUMLINE_SIZE / 2;
|
||||
holdNote.y = this.y - INITIAL_OFFSET - holdNote.height + STRUMLINE_SIZE / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -450,7 +450,7 @@ class Strumline extends FlxSpriteGroup
|
|||
|
||||
if (Preferences.downscroll)
|
||||
{
|
||||
holdNote.y = this.y + calculateNoteYPos(holdNote.strumTime, vwoosh) - holdNote.height + STRUMLINE_SIZE / 2;
|
||||
holdNote.y = this.y - INITIAL_OFFSET + calculateNoteYPos(holdNote.strumTime, vwoosh) - holdNote.height + STRUMLINE_SIZE / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -852,6 +852,11 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass implements
|
|||
}
|
||||
}
|
||||
|
||||
public override function toString():String
|
||||
{
|
||||
return 'Stage($id)';
|
||||
}
|
||||
|
||||
static function _fetchData(id:String):Null<StageData>
|
||||
{
|
||||
return StageRegistry.instance.parseEntryDataWithMigration(id, StageRegistry.instance.fetchEntryVersion(id));
|
||||
|
|
|
@ -29,6 +29,7 @@ import funkin.graphics.shaders.StrokeShader;
|
|||
import funkin.input.Controls;
|
||||
import funkin.play.PlayStatePlaylist;
|
||||
import funkin.play.song.Song;
|
||||
import funkin.ui.story.Level;
|
||||
import funkin.save.Save;
|
||||
import funkin.save.Save.SaveScoreData;
|
||||
import funkin.ui.AtlasText;
|
||||
|
@ -191,10 +192,24 @@ class FreeplayState extends MusicBeatSubState
|
|||
// programmatically adds the songs via LevelRegistry and SongRegistry
|
||||
for (levelId in LevelRegistry.instance.listSortedLevelIds())
|
||||
{
|
||||
for (songId in LevelRegistry.instance.parseEntryData(levelId).songs)
|
||||
var level:Level = LevelRegistry.instance.fetchEntry(levelId);
|
||||
|
||||
if (level == null)
|
||||
{
|
||||
trace('[WARN] Could not find level with id (${levelId})');
|
||||
continue;
|
||||
}
|
||||
|
||||
for (songId in level.getSongs())
|
||||
{
|
||||
var song:Song = SongRegistry.instance.fetchEntry(songId);
|
||||
|
||||
if (song == null)
|
||||
{
|
||||
trace('[WARN] Could not find song with id (${songId})');
|
||||
continue;
|
||||
}
|
||||
|
||||
// Only display songs which actually have available charts for the current character.
|
||||
var availableDifficultiesForSong:Array<String> = song.listDifficulties(displayedVariations, false);
|
||||
if (availableDifficultiesForSong.length == 0) continue;
|
||||
|
|
|
@ -57,8 +57,7 @@ class LoadingState extends MusicBeatSubState
|
|||
funkay.scrollFactor.set();
|
||||
funkay.screenCenter();
|
||||
|
||||
loadBar = new FunkinSprite(0, FlxG.height - 20).makeSolidColor(FlxG.width, 10, 0xFFff16d2);
|
||||
loadBar.screenCenter(X);
|
||||
loadBar = new FunkinSprite(0, FlxG.height - 20).makeSolidColor(0, 10, 0xFFff16d2);
|
||||
add(loadBar);
|
||||
|
||||
initSongsManifest().onComplete(function(lib) {
|
||||
|
@ -163,8 +162,15 @@ class LoadingState extends MusicBeatSubState
|
|||
targetShit = FlxMath.remapToRange(callbacks.numRemaining / callbacks.length, 1, 0, 0, 1);
|
||||
|
||||
var lerpWidth:Int = Std.int(FlxMath.lerp(loadBar.width, FlxG.width * targetShit, 0.2));
|
||||
loadBar.setGraphicSize(lerpWidth, loadBar.height);
|
||||
loadBar.updateHitbox();
|
||||
// this if-check prevents the setGraphicSize function
|
||||
// from setting the width of the loadBar to the height of the loadBar
|
||||
// this is a behaviour that is implemented in the setGraphicSize function
|
||||
// if the width parameter is equal to 0
|
||||
if (lerpWidth > 0)
|
||||
{
|
||||
loadBar.setGraphicSize(lerpWidth, loadBar.height);
|
||||
loadBar.updateHitbox();
|
||||
}
|
||||
FlxG.watch.addQuick('percentage?', callbacks.numRemaining / callbacks.length);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue