rename library
This commit is contained in:
+5
-6
@@ -1,12 +1,11 @@
|
||||
[package]
|
||||
name = "rosu-pp"
|
||||
version = "1.1.0"
|
||||
name = "akatsuki-pp"
|
||||
version = "1.1.2"
|
||||
edition = "2021"
|
||||
authors = ["MaxOhn <ohn.m@hotmail.de>"]
|
||||
authors = ["MaxOhn <ohn.m@hotmail.de>", "tsunyoku <tsunyoku@gmail.com>"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/MaxOhn/rosu-pp"
|
||||
documentation = "https://docs.rs/rosu-pp/"
|
||||
repository = "https://github.com/osuAkatsuki/akatsuki-pp-rs"
|
||||
description = "Difficulty and performance calculation for osu!"
|
||||
keywords = ["osu", "pp", "stars", "performance", "difficulty"]
|
||||
|
||||
@@ -27,4 +26,4 @@ proptest = "1.4.0"
|
||||
opt-level = 3
|
||||
|
||||
[profile.test.package.rand_chacha]
|
||||
opt-level = 3
|
||||
opt-level = 3
|
||||
|
||||
@@ -14,8 +14,8 @@ use crate::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::catch::{Catch, CatchDifficultyAttributes};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::catch::{Catch, CatchDifficultyAttributes};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/2118524.osu")
|
||||
/// .unwrap()
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, GradualDifficulty, Difficulty};
|
||||
/// use akatsuki_pp::{Beatmap, GradualDifficulty, Difficulty};
|
||||
///
|
||||
/// let map = Beatmap::from_path("./resources/2785319.osu").unwrap();
|
||||
/// let difficulty = Difficulty::new().mods(64); // DT
|
||||
|
||||
@@ -35,7 +35,7 @@ use crate::model::mode::IGameMode;
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty, any::DifficultyAttributes};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty, any::DifficultyAttributes};
|
||||
///
|
||||
/// let map = Beatmap::from_path("./resources/2118524.osu").unwrap();
|
||||
///
|
||||
|
||||
@@ -32,7 +32,7 @@ use crate::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, GradualPerformance, Difficulty, any::ScoreState};
|
||||
/// use akatsuki_pp::{Beatmap, GradualPerformance, Difficulty, any::ScoreState};
|
||||
///
|
||||
/// let map = Beatmap::from_path("./resources/2785319.osu").unwrap();
|
||||
/// let difficulty = Difficulty::new().mods(64); // DT
|
||||
|
||||
@@ -31,8 +31,8 @@ use super::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::catch::{Catch, CatchGradualDifficulty};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::catch::{Catch, CatchGradualDifficulty};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/2118524.osu")
|
||||
/// .unwrap()
|
||||
|
||||
@@ -21,8 +21,8 @@ use crate::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::catch::{Catch, CatchGradualPerformance, CatchScoreState};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::catch::{Catch, CatchGradualPerformance, CatchScoreState};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/2118524.osu")
|
||||
/// .unwrap()
|
||||
|
||||
+4
-4
@@ -14,17 +14,17 @@
|
||||
//!
|
||||
//! ```
|
||||
//! // Decode the map
|
||||
//! let map = rosu_pp::Beatmap::from_path("./resources/2785319.osu").unwrap();
|
||||
//! let map = akatsuki_pp::Beatmap::from_path("./resources/2785319.osu").unwrap();
|
||||
//!
|
||||
//! // Calculate difficulty attributes
|
||||
//! let diff_attrs = rosu_pp::Difficulty::new()
|
||||
//! let diff_attrs = akatsuki_pp::Difficulty::new()
|
||||
//! .mods(8 + 16) // HDHR
|
||||
//! .calculate(&map);
|
||||
//!
|
||||
//! let stars = diff_attrs.stars();
|
||||
//!
|
||||
//! // Calculate performance attributes
|
||||
//! let perf_attrs = rosu_pp::Performance::new(diff_attrs)
|
||||
//! let perf_attrs = akatsuki_pp::Performance::new(diff_attrs)
|
||||
//! // To speed up the calculation, we used the previous attributes.
|
||||
//! // **Note** that this should only be done if the map and all difficulty
|
||||
//! // settings stay the same, otherwise the final attributes will be incorrect!
|
||||
@@ -55,7 +55,7 @@
|
||||
//! score state.
|
||||
//!
|
||||
//! ```
|
||||
//! use rosu_pp::{Beatmap, GradualPerformance, Difficulty, any::ScoreState};
|
||||
//! use akatsuki_pp::{Beatmap, GradualPerformance, Difficulty, any::ScoreState};
|
||||
//!
|
||||
//! let map = Beatmap::from_path("./resources/1028484.osu").unwrap();
|
||||
//!
|
||||
|
||||
@@ -24,8 +24,8 @@ use super::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::mania::ManiaGradualDifficulty;
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::mania::ManiaGradualDifficulty;
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/1638954.osu")
|
||||
/// .unwrap()
|
||||
|
||||
@@ -20,8 +20,8 @@ use super::{ManiaPerformanceAttributes, ManiaScoreState};
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::mania::{Mania, ManiaGradualPerformance, ManiaScoreState};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::mania::{Mania, ManiaGradualPerformance, ManiaScoreState};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/1638954.osu")
|
||||
/// .unwrap()
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ use rosu_mods::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::GameMods;
|
||||
/// use akatsuki_pp::GameMods;
|
||||
/// use rosu_mods::{GameModsIntermode, GameModsLegacy, GameMods as GameModsLazer};
|
||||
///
|
||||
/// let int = GameMods::from(64 + 8);
|
||||
|
||||
@@ -30,8 +30,8 @@ use super::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::osu::{Osu, OsuGradualDifficulty};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::osu::{Osu, OsuGradualDifficulty};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/2785319.osu")
|
||||
/// .unwrap()
|
||||
|
||||
@@ -20,8 +20,8 @@ use super::{OsuPerformanceAttributes, OsuScoreState};
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::osu::{Osu, OsuGradualPerformance, OsuScoreState};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::osu::{Osu, OsuGradualPerformance, OsuScoreState};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/2785319.osu")
|
||||
/// .unwrap()
|
||||
|
||||
+6
-6
@@ -6,27 +6,27 @@ use crate::{Beatmap, GameMods};
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # use rosu_pp::{OsuPP, Beatmap};
|
||||
/// # use akatsuki_pp::Beatmap;
|
||||
/// # use akatsuki_pp::osu_2019::OsuPP;
|
||||
/// # /*
|
||||
/// let map: Beatmap = ...
|
||||
/// # */
|
||||
/// # let map = Beatmap::default();
|
||||
/// let attrs = OsuPP::new(&map)
|
||||
/// let attrs = OsuPP::from_map(&map)
|
||||
/// .mods(8 + 64) // HDDT
|
||||
/// .combo(1234)
|
||||
/// .misses(1)
|
||||
/// .accuracy(98.5) // should be set last
|
||||
/// .calculate();
|
||||
///
|
||||
/// println!("PP: {} | Stars: {}", attrs.pp(), attrs.stars());
|
||||
/// println!("PP: {} | Stars: {}", attrs.pp, attrs.difficulty.stars);
|
||||
///
|
||||
/// let next_result = OsuPP::new(&map)
|
||||
/// .attributes(attrs) // reusing previous results for performance
|
||||
/// let next_result = OsuPP::from_attributes(attrs.difficulty) // reusing previous results for performance
|
||||
/// .mods(8 + 64) // has to be the same to reuse attributes
|
||||
/// .accuracy(99.5)
|
||||
/// .calculate();
|
||||
///
|
||||
/// println!("PP: {} | Stars: {}", next_result.pp(), next_result.stars());
|
||||
/// println!("PP: {} | Stars: {}", next_result.pp, next_result.difficulty.stars);
|
||||
/// ```
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct OsuPP<'m> {
|
||||
|
||||
@@ -26,8 +26,8 @@ use super::{
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::taiko::{Taiko, TaikoGradualDifficulty};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::taiko::{Taiko, TaikoGradualDifficulty};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/1028484.osu")
|
||||
/// .unwrap()
|
||||
|
||||
@@ -20,8 +20,8 @@ use super::TaikoPerformanceAttributes;
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// use rosu_pp::{Beatmap, Difficulty};
|
||||
/// use rosu_pp::taiko::{Taiko, TaikoGradualPerformance, TaikoScoreState};
|
||||
/// use akatsuki_pp::{Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::taiko::{Taiko, TaikoGradualPerformance, TaikoScoreState};
|
||||
///
|
||||
/// let converted = Beatmap::from_path("./resources/1028484.osu")
|
||||
/// .unwrap()
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ impl<T: fmt::Debug> fmt::Debug for Weak<T> {
|
||||
}
|
||||
|
||||
/// ```compile_fail
|
||||
/// use rosu_pp::{taiko::TaikoGradualDifficulty, Beatmap, Difficulty};
|
||||
/// use akatsuki_pp::{taiko::TaikoGradualDifficulty, Beatmap, Difficulty};
|
||||
///
|
||||
/// let converted = Beatmap::from_bytes(&[]).unwrap().unchecked_into_converted();
|
||||
/// let difficulty = Difficulty::new();
|
||||
|
||||
+3
-1
@@ -1,4 +1,6 @@
|
||||
use rosu_pp::{catch::Catch, mania::Mania, model::mode::GameMode, osu::Osu, taiko::Taiko, Beatmap};
|
||||
use akatsuki_pp::{
|
||||
catch::Catch, mania::Mania, model::mode::GameMode, osu::Osu, taiko::Taiko, Beatmap,
|
||||
};
|
||||
|
||||
use crate::common::assert_eq_float;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
use std::panic::{self, UnwindSafe};
|
||||
|
||||
use rosu_pp::{
|
||||
use akatsuki_pp::{
|
||||
catch::{Catch, CatchDifficultyAttributes},
|
||||
mania::{Mania, ManiaDifficultyAttributes},
|
||||
osu::{Osu, OsuDifficultyAttributes},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::panic::{self, UnwindSafe};
|
||||
|
||||
use rosu_pp::{
|
||||
use akatsuki_pp::{
|
||||
catch::{CatchPerformance, CatchPerformanceAttributes},
|
||||
mania::{ManiaPerformance, ManiaPerformanceAttributes},
|
||||
osu::{OsuPerformance, OsuPerformanceAttributes},
|
||||
|
||||
Reference in New Issue
Block a user