adjusted IGameMode trait
This commit is contained in:
+5
-3
@@ -1,5 +1,3 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use rosu_map::section::{general::GameMode, hit_objects::CurveBuffers};
|
||||
|
||||
use crate::model::{
|
||||
@@ -17,7 +15,7 @@ use super::{
|
||||
/// A [`Beatmap`] for [`Osu`] calculations.
|
||||
pub type OsuBeatmap<'a> = Converted<'a, Osu>;
|
||||
|
||||
pub fn try_convert(map: &mut Cow<'_, Beatmap>) -> ConvertStatus {
|
||||
pub fn check_convert(map: &Beatmap) -> ConvertStatus {
|
||||
if map.mode == GameMode::Osu {
|
||||
ConvertStatus::Noop
|
||||
} else {
|
||||
@@ -25,6 +23,10 @@ pub fn try_convert(map: &mut Cow<'_, Beatmap>) -> ConvertStatus {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn try_convert(map: &mut Beatmap) -> ConvertStatus {
|
||||
check_convert(map)
|
||||
}
|
||||
|
||||
pub fn convert_objects(
|
||||
converted: &OsuBeatmap<'_>,
|
||||
scaling_factor: &ScalingFactor,
|
||||
|
||||
+5
-3
@@ -1,5 +1,3 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use rosu_map::util::Pos;
|
||||
|
||||
use crate::{
|
||||
@@ -41,7 +39,11 @@ impl IGameMode for Osu {
|
||||
type GradualDifficulty = OsuGradualDifficulty;
|
||||
type GradualPerformance = OsuGradualPerformance;
|
||||
|
||||
fn try_convert(map: &mut Cow<'_, Beatmap>) -> ConvertStatus {
|
||||
fn check_convert(map: &Beatmap) -> ConvertStatus {
|
||||
convert::check_convert(map)
|
||||
}
|
||||
|
||||
fn try_convert(map: &mut Beatmap) -> ConvertStatus {
|
||||
convert::try_convert(map)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user