move sound field of HitObject to Beatmap
This commit is contained in:
@@ -12,8 +12,6 @@ pub struct HitObject {
|
||||
pub start_time: f64,
|
||||
/// The type of the object.
|
||||
pub kind: HitObjectKind,
|
||||
/// The hitsound of the object. Used as color in osu!taiko.
|
||||
pub sound: u8,
|
||||
}
|
||||
|
||||
impl HitObject {
|
||||
|
||||
+4
-1
@@ -608,8 +608,8 @@ macro_rules! parse_hitobjects_body {
|
||||
pos,
|
||||
start_time: time,
|
||||
kind,
|
||||
sound,
|
||||
});
|
||||
$self.sounds.push(sound);
|
||||
|
||||
prev_time = time;
|
||||
$buf.clear();
|
||||
@@ -813,6 +813,9 @@ pub struct Beatmap {
|
||||
pub tick_rate: f64,
|
||||
/// All hitobjects of the beatmap.
|
||||
pub hit_objects: Vec<HitObject>,
|
||||
/// Store the sounds for all objects in their own Vec to minimize the struct size.
|
||||
/// Hitsounds are only used in osu!taiko in which they represent color.
|
||||
pub sounds: Vec<u8>,
|
||||
|
||||
#[cfg(not(feature = "sliders"))]
|
||||
/// Beats per minute
|
||||
|
||||
Reference in New Issue
Block a user