parse: remove bpm field from TimingPoint

This commit is contained in:
MaxOhn
2021-01-22 15:45:12 +01:00
parent adade9a84a
commit 52979f790f
3 changed files with 1 additions and 11 deletions
-3
View File
@@ -116,17 +116,14 @@ mod test {
TimingPoint { TimingPoint {
time: 1.0, time: 1.0,
beat_len: 10.0, beat_len: 10.0,
bpm: 0.0,
}, },
TimingPoint { TimingPoint {
time: 3.0, time: 3.0,
beat_len: 10.0, beat_len: 10.0,
bpm: 0.0,
}, },
TimingPoint { TimingPoint {
time: 4.0, time: 4.0,
beat_len: 10.0, beat_len: 10.0,
bpm: 0.0,
}, },
], ],
difficulty_points: vec![ difficulty_points: vec![
-1
View File
@@ -4,7 +4,6 @@ use std::cmp::Ordering;
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Copy, Clone, Debug, PartialEq)]
pub struct TimingPoint { pub struct TimingPoint {
pub beat_len: f32, pub beat_len: f32,
pub bpm: f32, // TODO: Remove
pub time: f32, pub time: f32,
} }
+1 -7
View File
@@ -369,13 +369,7 @@ impl Beatmap {
prev_diff = time; prev_diff = time;
} }
} else { } else {
let point = TimingPoint { self.timing_points.push(TimingPoint { time, beat_len });
time,
bpm: 60_000.0 / beat_len,
beat_len,
};
self.timing_points.push(point);
if time < prev_time { if time < prev_time {
unsorted_timings = true; unsorted_timings = true;