rename library

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