From 3f7f5c8593312191b0d528ba8b31f0fb94956082 Mon Sep 17 00:00:00 2001 From: Yoshman29 Date: Thu, 13 Oct 2022 23:23:10 +0200 Subject: [PATCH] float bpms --- buildnumber.txt | 2 +- source/Section.hx | 2 +- source/funkin/editors/ChartingState.hx | 6 +++--- source/funkin/system/Conductor.hx | 8 ++++---- source/funkin/system/Song.hx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 66e214a2..1fde7522 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -432 \ No newline at end of file +434 \ No newline at end of file diff --git a/source/Section.hx b/source/Section.hx index c859f6f3..f153da54 100644 --- a/source/Section.hx +++ b/source/Section.hx @@ -6,7 +6,7 @@ typedef SwagSection = var lengthInSteps:Int; var typeOfSection:Int; var mustHitSection:Bool; - var bpm:Int; + var bpm:Float; var changeBPM:Bool; var altAnim:Bool; } diff --git a/source/funkin/editors/ChartingState.hx b/source/funkin/editors/ChartingState.hx index 9f570d16..5982e235 100644 --- a/source/funkin/editors/ChartingState.hx +++ b/source/funkin/editors/ChartingState.hx @@ -83,7 +83,7 @@ class ChartingState extends MusicBeatState var characterList:Array; - var tempBpm:Int = 0; + var tempBpm:Float = 0; var vocals:FlxSound; @@ -465,7 +465,7 @@ class ChartingState extends MusicBeatState }*/ function sectionStartTime():Float { - var daBPM:Int = _song.bpm; + var daBPM:Float = _song.bpm; var daPos:Float = 0; for (i in 0...curSection) { @@ -840,7 +840,7 @@ class ChartingState extends MusicBeatState else { // get last bpm - var daBPM:Int = _song.bpm; + var daBPM:Float = _song.bpm; for (i in 0...curSection) if (_song.notes[i].changeBPM) daBPM = _song.notes[i].bpm; diff --git a/source/funkin/system/Conductor.hx b/source/funkin/system/Conductor.hx index ddcc57d0..a31418ac 100644 --- a/source/funkin/system/Conductor.hx +++ b/source/funkin/system/Conductor.hx @@ -11,7 +11,7 @@ typedef BPMChangeEvent = { var stepTime:Int; var songTime:Float; - var bpm:Int; + var bpm:Float; } class Conductor @@ -19,7 +19,7 @@ class Conductor /** * Current BPM */ - public static var bpm:Int = 100; + public static var bpm:Float = 100; /** * Current Crochet (time per beat), in milliseconds. @@ -58,7 +58,7 @@ class Conductor { bpmChangeMap = []; - var curBPM:Int = song.bpm; + var curBPM:Float = song.bpm; var totalSteps:Int = 0; var totalPos:Float = 0; for (i in 0...song.notes.length) @@ -81,7 +81,7 @@ class Conductor trace("new BPM map BUDDY " + bpmChangeMap); } - public static function changeBPM(newBpm:Int) + public static function changeBPM(newBpm:Float) { bpm = newBpm; diff --git a/source/funkin/system/Song.hx b/source/funkin/system/Song.hx index cf5d96a2..77ce46b8 100644 --- a/source/funkin/system/Song.hx +++ b/source/funkin/system/Song.hx @@ -11,7 +11,7 @@ typedef SwagSong = { var song:String; var notes:Array; - var bpm:Int; + var bpm:Float; var needsVoices:Bool; var speed:Float; var stage:String;