parse: remove bpm field from TimingPoint
This commit is contained in:
@@ -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![
|
||||||
|
|||||||
@@ -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
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user