impl c#'s unstable sort & refactor sort things

This commit is contained in:
MaxOhn
2024-02-15 15:46:44 +01:00
parent 25eec40e06
commit 100d01483c
11 changed files with 213 additions and 59 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ use crate::{
},
hit_object::{HitObject, HitObjectKind, HoldNote, Slider, Spinner},
},
util::{float_ext::FloatExt, legacy_sort::legacy_sort, tandem_sort::TandemSorter},
util::{float_ext::FloatExt, sort},
};
use super::{Beatmap, DEFAULT_SLIDER_LENIENCY};
@@ -282,7 +282,7 @@ impl From<BeatmapState> for Beatmap {
slider_tick_rate,
} = state.difficulty.into();
let mut sorter = TandemSorter::new(
let mut sorter = sort::TandemSorter::new(
&state.hit_objects,
|a, b| a.start_time.total_cmp(&b.start_time),
true,
@@ -292,7 +292,7 @@ impl From<BeatmapState> for Beatmap {
sorter.sort(&mut state.hit_sounds);
if state.mode == GameMode::Mania {
legacy_sort(&mut state.hit_objects);
sort::osu_legacy(&mut state.hit_objects);
}
Beatmap {