convert fnf bpm changes to ke bpm changes

This commit is contained in:
KadeDeveloper 2021-08-11 21:18:49 -07:00
parent 7c3b2860fc
commit ab948419c5
3 changed files with 31 additions and 4 deletions

View File

@ -86,9 +86,6 @@ class MusicBeatState extends FlxUIState
var step = ((60 / data.bpm) * 1000) / 4; var step = ((60 / data.bpm) * 1000) / 4;
var startInMS = (data.startTime * 1000); var startInMS = (data.startTime * 1000);
var percent = (Conductor.songPosition - startInMS) / (data.length * 1000);
curDecimalBeat = data.startBeat + (((Conductor.songPosition/1000) - data.startTime) * (data.bpm / 60)); curDecimalBeat = data.startBeat + (((Conductor.songPosition/1000) - data.startTime) * (data.bpm / 60));
var ste:Int = Math.floor(data.startStep + ((Conductor.songPosition - startInMS) / step)); var ste:Int = Math.floor(data.startStep + ((Conductor.songPosition - startInMS) / step));
if (ste >= 0) if (ste >= 0)

View File

@ -456,6 +456,34 @@ class PlayState extends MusicBeatState
SONG.eventObjects = convertedStuff; SONG.eventObjects = convertedStuff;
var ba = SONG.bpm;
var index = 0;
trace("conversion stuff " + SONG.song + " " + SONG.notes.length);
for(i in SONG.notes)
{
var currentBeat = 4 * index;
var currentSeg = TimingStruct.getTimingAtBeat(currentBeat);
if (currentSeg == null)
continue;
var beat:Float = currentSeg.startBeat + (currentBeat - currentSeg.startBeat);
if (i.changeBPM && i.bpm != ba)
{
trace("converting changebpm for section " + index);
ba = i.bpm;
SONG.eventObjects.push(new Song.Event("FNF BPM Change " + index,beat,i.bpm,"BPM Change"));
}
index++;
}
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + PlayStateChangeables.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + PlayStateChangeables.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: '
+ Conductor.timeScale + '\nBotPlay : ' + PlayStateChangeables.botPlay); + Conductor.timeScale + '\nBotPlay : ' + PlayStateChangeables.botPlay);
@ -3748,8 +3776,8 @@ class PlayState extends MusicBeatState
{ {
if (!visibleCombos.contains(numScore)) if (!visibleCombos.contains(numScore))
{ {
numScore.destroy();
tween.cancel(); tween.cancel();
numScore.destroy();
} }
}, },
startDelay: Conductor.crochet * 0.002 startDelay: Conductor.crochet * 0.002

View File

@ -18,6 +18,8 @@ class Section
public var startTime:Float = 0; public var startTime:Float = 0;
public var endTime:Float = 0; public var endTime:Float = 0;
public var sectionNotes:Array<Array<Dynamic>> = []; public var sectionNotes:Array<Array<Dynamic>> = [];
public var changeBPM:Bool = false;
public var bpm:Float = 0;
public var lengthInSteps:Int = 16; public var lengthInSteps:Int = 16;
public var typeOfSection:Int = 0; public var typeOfSection:Int = 0;