new chart editor, sm file support, bpm changes, and scroll speed changes.

This commit is contained in:
KadeDeveloper
2021-07-19 21:19:03 -07:00
parent c69e83d8e0
commit aa2119d034
25 changed files with 2046 additions and 355 deletions

View File

@@ -28,8 +28,6 @@ class Conductor
public static var safeZoneOffset:Float = Math.floor((safeFrames / 60) * 1000); // is calculated in create(), is safeFrames in milliseconds
public static var timeScale:Float = Conductor.safeZoneOffset / 166;
public static var lengthInSteps:Float = 0;
public static var bpmChangeMap:Array<BPMChangeEvent> = [];
public function new()
@@ -70,15 +68,27 @@ class Conductor
trace("new BPM map BUDDY " + bpmChangeMap);
}
public static function changeBPM(newBpm:Float)
public static function recalculateTimingStruct(SONG:Song)
{
for(i in SONG.eventObjects)
{
/*TimingStruct.addTiming(beat,bpm,endBeat, Std.parseFloat(OFFSET));
if (changeEvents.length != 0)
{
var data = TimingStruct.AllTimings[currentIndex - 1];
data.endBeat = beat;
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
}*/
}
}
public static function changeBPM(newBpm:Float, ?recalcLength = true)
{
bpm = newBpm;
crochet = ((60 / bpm) * 1000);
stepCrochet = crochet / 4;
lengthInSteps = (FlxG.sound.music.length / stepCrochet);
trace("\nLength in in steps: " + lengthInSteps);
}
}