diff --git a/buildnumber.txt b/buildnumber.txt index 61721cab..bb18bf4e 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -938 \ No newline at end of file +939 \ No newline at end of file diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index 637717f4..987962c4 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -45,6 +45,7 @@ class Note extends FlxSprite } public var sustainLength:Float = 0; + public var stepLength:Float = 0; public var isSustainNote:Bool = false; public var noteTypeID:Int = 0; @@ -199,7 +200,7 @@ class Note extends FlxSprite // is long sustain lastScrollSpeed = scrollSpeed; - scale.y = Conductor.stepCrochet / 100 * 1.5 * scrollSpeed * 0.7; + scale.y = stepLength / 100 * 1.5 * scrollSpeed * 0.7; updateHitbox(); } diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 0f8a53ef..826a6f81 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -442,12 +442,14 @@ class PlayState extends MusicBeatState var noteData:Array = songData.notes; var playerCounter:Int = 0; var daBeats:Int = 0; // Not exactly representative of 'daBeats' lol, just how much it has looped + var stepCrochet = Conductor.stepCrochet; for (section in noteData) { if (section == null || section.sectionNotes == null) continue; - // var coolSection:Int = Std.int(section.lengthInSteps / 4); + if (section.changeBPM && section.bpm > 0) + stepCrochet = ((60 / section.bpm) * 250); for (songNotes in section.sectionNotes) { @@ -473,17 +475,19 @@ class PlayState extends MusicBeatState swagNote.nextNote = (swagNote = new Note(daStrumTime, daNoteData % 4, daNoteType, gottaHitNote, swagNote)); swagNote.sustainLength = songNotes[2]; swagNote.scrollFactor.set(0, 0); + swagNote.stepLength = stepCrochet; notes.add(swagNote); // calculate sustain length and fix - var susLength:Float = swagNote.sustainLength / Conductor.stepCrochet; + var susLength:Float = swagNote.sustainLength / stepCrochet; if (susLength > 0.75) susLength++; // create sustains for (susNote in 0...Math.floor(susLength)) { - swagNote = new Note(daStrumTime + (Conductor.stepCrochet * susNote), daNoteData % 4, daNoteType, gottaHitNote, swagNote, true); + swagNote = new Note(daStrumTime + (stepCrochet * susNote), daNoteData % 4, daNoteType, gottaHitNote, swagNote, true); swagNote.scrollFactor.set(); + swagNote.stepLength = stepCrochet; notes.add(swagNote); } } diff --git a/source/funkin/mods/ZipFolderLibrary.hx b/source/funkin/mods/ZipFolderLibrary.hx index 57021c3d..0545b36e 100644 --- a/source/funkin/mods/ZipFolderLibrary.hx +++ b/source/funkin/mods/ZipFolderLibrary.hx @@ -147,8 +147,20 @@ class ZipFolderLibrary extends AssetLibrary implements ModsAssetLibrary { } public function getFiles(folder:String):Array { - // TODO - return []; + var content:Array = []; + + if (!folder.endsWith("/")) folder = folder + "/"; + if (!__parseAsset(folder)) return []; + + @:privateAccess + for(k=>e in assets) { + if (k.toLowerCase().startsWith(_parsedAsset)) { + var fileName = k.substr(_parsedAsset.length); + if (!fileName.contains("/")) + content.push(fileName); + } + } + return content; } #end } \ No newline at end of file